--- /srv/reproducible-results/rbuild-debian/r-b-build.IYayjMLQ/b1/opensubdiv_3.6.0-2_arm64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.IYayjMLQ/b2/opensubdiv_3.6.0-2_arm64.changes ├── Files │ @@ -1,9 +1,9 @@ │ │ 09b4b15bc1f97a3b3fa2befe39f490e3 153112 libdevel optional libosd-dev_3.6.0-2_arm64.deb │ - 6151277815be6864d2e244c48c2df8d4 31492836 doc optional libosd-doc_3.6.0-2_all.deb │ + 8113aec01d2ae4cdabc15fc085f959e0 31492776 doc optional libosd-doc_3.6.0-2_all.deb │ 8cd73ba98f669623ab62283947f80372 3486184 debug optional libosdcpu3.6.0-dbgsym_3.6.0-2_arm64.deb │ 39a27bbae01a76ebd0e3dc3d51d3382f 303108 libs optional libosdcpu3.6.0_3.6.0-2_arm64.deb │ 88c52eb78ef58cf26e5b722afac09318 546928 debug optional libosdgpu3.6.0-dbgsym_3.6.0-2_arm64.deb │ 451467bd3b002209b276bedf72d58ccf 135520 libs optional libosdgpu3.6.0_3.6.0-2_arm64.deb │ 1854c046a4831b956bcc0244a282c4de 12154108 debug optional opensubdiv-tools-dbgsym_3.6.0-2_arm64.deb │ 93f6a6c3e3d6a6130b686cfe87a8213e 582156 graphics optional opensubdiv-tools_3.6.0-2_arm64.deb ├── libosd-doc_3.6.0-2_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-06-17 18:57:37.000000 debian-binary │ │ --rw-r--r-- 0 0 0 25404 2024-06-17 18:57:37.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 31467240 2024-06-17 18:57:37.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 25552 2024-06-17 18:57:37.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 31467032 2024-06-17 18:57:37.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -53,17 +53,17 @@ │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00701.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00704.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00704.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00704_source.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00707.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00707.js │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00710.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00710.js │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00713.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00716.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ │ @@ -110,17 +110,17 @@ │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00767.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00767.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00770.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00773.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00776.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00779.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00782.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00785.html │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -33,59 +33,59 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6576 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 76687 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7385 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 109 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 65516 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7311 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 195 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27167 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6558 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35228 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7765 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 150 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40418 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7504 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 88831 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7075 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 120 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75919 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6436 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45702 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6387 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14299 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6558 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35228 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7311 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 195 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27167 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7504 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 88831 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7075 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75919 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7765 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40418 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6387 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14299 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6436 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45702 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8007 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 171 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 74098 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7837 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 190 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 147347 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6698 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66668 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9468 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 404 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 84414 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7136 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38039 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6563 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 64 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19420 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8223 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 130 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 212261 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9923 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 456 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 177059 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6698 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66668 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7136 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38039 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9468 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 404 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 84414 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9923 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 456 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 177059 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6563 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 64 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19420 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8223 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 130 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 212261 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7813 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 163 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 67819 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7336 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 111 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 167871 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6745 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734.html │ │ │ │ @@ -96,158 +96,158 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 50494 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00737_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7304 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 160 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 53848 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11427 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1173 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22911 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6082 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 85953 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6289 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24307 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5644 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38294 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6114 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29126 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5899 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22113 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5644 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38294 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5899 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22113 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6082 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 85953 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6202 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 163473 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6289 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24307 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6267 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 81483 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6202 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 163473 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6114 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29126 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6437 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 121 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 46438 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7580 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 130 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 135867 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5827 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100442 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6298 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38674 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6298 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38674 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5827 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100442 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6474 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 59 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 53913 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5836 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 89790 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5753 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 38297 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6425 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6807 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 67 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23841 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6807 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33910 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7125 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 115 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 128979 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33910 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7125 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 115 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 128979 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6425 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23841 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4478 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10583 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6897 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 65 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 34223 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7174 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 115 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 252040 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6161 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14083 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6499 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21925 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6452 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 79 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25442 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6499 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21925 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6161 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14083 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7052 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 124 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 223874 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6580 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 99 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12709 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7052 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 124 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 223874 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6818 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35394 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6818 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35394 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6452 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25442 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6246 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22526 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6509 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 18296 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6592 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 101 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12826 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6358 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22933 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6357 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26984 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7017 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 128 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49761 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6766 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27921 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6766 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27921 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6357 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26984 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7017 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 128 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49761 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6410 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 73 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22723 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7225 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 224157 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6574 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12790 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6509 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18618 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7225 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 224157 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7199 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 121 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 239108 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6509 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18618 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6486 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19962 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6497 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21040 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11270 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 424 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29216 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6445 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23459 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6745 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47052 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6486 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19962 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6745 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47052 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6574 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12790 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6445 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23459 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6497 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21040 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11270 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 424 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29216 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6381 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 61 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 111061 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8721 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 262 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 21259 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6381 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 61 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 110976 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4474 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12883 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6911 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44339 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6381 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110647 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14201 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 2466 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 182425 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6370 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19254 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6687 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27492 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14201 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 2466 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 182425 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6370 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19254 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6911 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44339 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6687 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27492 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6381 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110647 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6375 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 69 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 20016 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4659 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00905.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00905.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5892 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00906.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 216 2024-06-17 18:57:37.000000 ./usr/share/doc/opensubdiv/doxy_html/a00906.js │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
vertexDescriptor.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../vtr/stackBuffer.h"
│ │ │ │ +#include "../vtr/stackBuffer.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ @@ -503,15 +503,15 @@ │ │ │ │
443} // end namespace Bfr
│ │ │ │
444
│ │ │ │
445} // end namespace OPENSUBDIV_VERSION
│ │ │ │
446using namespace OPENSUBDIV_VERSION;
│ │ │ │
447} // end namespace OpenSubdiv
│ │ │ │
448
│ │ │ │
449#endif /* OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_H */
│ │ │ │ -
Definition limits.h:32
│ │ │ │ +
Definition limits.h:32
│ │ │ │
Simple class used by subclasses of SurfaceFactory to describe a vertex.
│ │ │ │
float GetVertexSharpness() const
Return the sharpness of the vertex.
│ │ │ │
bool Finalize()
Terminate the sequence of specifications.
│ │ │ │
void SetManifold(bool isManifold)
Declare the vertex neighborhood as manifold (ordered)
│ │ │ │
bool Initialize(int numIncidentFaces)
Initialize specification with the number of incident faces.
│ │ │ │
bool IsManifold() const
Return if vertex neighborhood is manifold.
│ │ │ │
bool HasEdgeSharpness() const
Return if sharpness was assigned to the incident edges.
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
tessellation.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/parameterization.h"
│ │ │ │ +#include "../bfr/parameterization.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  VertexDescriptor
 Simple class used by subclasses of SurfaceFactory to describe a vertex. More...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ @@ -340,17 +340,17 @@ │ │ │ │
379
│ │ │ │
380} // end namespace OPENSUBDIV_VERSION
│ │ │ │
381using namespace OPENSUBDIV_VERSION;
│ │ │ │
382
│ │ │ │
383} // end namespace OpenSubdiv
│ │ │ │
384
│ │ │ │
385#endif /* OPENSUBDIV3_BFR_TESSELLATION */
│ │ │ │ -
Definition limits.h:32
│ │ │ │ -
Simple class defining the 2D parameterization of a face.
│ │ │ │ -
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │ +
Definition limits.h:32
│ │ │ │ +
Simple class defining the 2D parameterization of a face.
│ │ │ │ +
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │
void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const
Returns the (u,v) coordinate of a given vertex.
│ │ │ │
Encapsulates a specific tessellation pattern of a Parameterization.
│ │ │ │
int GetFaceSize() const
Return the size of the face.
│ │ │ │
int GetNumBoundaryCoords() const
Return the number of boundary coordinates.
│ │ │ │
~Tessellation()
│ │ │ │
void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], int const interiorIndices[])
Reassign all facet coordinate indices.
│ │ │ │
int GetCoordStride() const
Return the number of elements between each coordinate.
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,31 +90,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surfaceFactoryCache.h File Reference
│ │ │ │ +
surfaceFactoryMeshAdapter.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/irregularPatchType.h"
│ │ │ │ -#include <map>
│ │ │ │ #include <cstdint>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Tessellation
 Encapsulates a specific tessellation pattern of a Parameterization. More...
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  SurfaceFactoryCache
 Container used internally by SurfaceFactory to store reusable information. More...
 
class  SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >
 Template for declaring thread-safe subclasses of SurfaceFactoryCache. More...
class  SurfaceFactoryMeshAdapter
 Abstract interface adapting SurfaceFactory to a connected mesh representation. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -surfaceFactoryCache.h File Reference │ │ │ │ │ +surfaceFactoryMeshAdapter.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../bfr/irregularPatchType.h" │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -  Container used internally by _S_u_r_f_a_c_e_F_a_c_t_o_r_y to store reusable │ │ │ │ │ - information. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_<_ _M_U_T_E_X___T_Y_P_E_,_ _R_E_A_D___L_O_C_K___G_U_A_R_D___T_Y_P_E_, │ │ │ │ │ - _W_R_I_T_E___L_O_C_K___G_U_A_R_D___T_Y_P_E_ _> │ │ │ │ │ -  Template for declaring thread-safe subclasses of _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ +  Abstract interface adapting _S_u_r_f_a_c_e_F_a_c_t_o_r_y to a connected mesh │ │ │ │ │ + representation. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00680 = [ │ │ │ │ │ - ["SurfaceFactoryCache", "a00949.html", "a00949"], │ │ │ │ │ - ["SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >", "a00953.html", "a00953"] │ │ │ │ │ + ["SurfaceFactoryMeshAdapter", "a00957.html", "a00957"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactoryCache.h
│ │ │ │ +
surfaceFactoryMeshAdapter.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,126 +119,149 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../bfr/irregularPatchType.h"
│ │ │ │ +
30#include <cstdint>
│ │ │ │
31
│ │ │ │ -
32#include <map>
│ │ │ │ -
33#include <cstdint>
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │
34
│ │ │ │ -
35namespace OpenSubdiv {
│ │ │ │ -
36namespace OPENSUBDIV_VERSION {
│ │ │ │ -
37
│ │ │ │ -
38namespace Bfr {
│ │ │ │ -
39
│ │ │ │ -
52//
│ │ │ │ -
53// Initial/expected use requires simple searches of and additions to the
│ │ │ │ -
54// cache by the SurfaceFactory or its Builders. Longer term, with the
│ │ │ │ -
55// possibility of instances of caches being shared between meshes and
│ │ │ │ -
56// factories, additional options and/or public methods may be warranted
│ │ │ │ -
57// to limit what is cached or to prune the cache if it gets too large.
│ │ │ │ -
58//
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
60public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63
│ │ │ │ - │ │ │ │ - │ │ │ │ -
66
│ │ │ │ -
67protected:
│ │ │ │ -
69 // Access restricted to the Factory, its Builders, etc.
│ │ │ │ -
70 friend class SurfaceFactory;
│ │ │ │ -
71
│ │ │ │ -
72 typedef std::uint64_t KeyType;
│ │ │ │ -
73 typedef internal::IrregularPatchSharedPtr DataType;
│ │ │ │ -
75
│ │ │ │ -
76protected:
│ │ │ │ -
78 size_t Size() const { return _map.size(); }
│ │ │ │ -
79
│ │ │ │ -
80 //
│ │ │ │ -
81 // Potential overrides by subclasses for thread-safety:
│ │ │ │ -
82 //
│ │ │ │ -
83 virtual DataType Find(KeyType const & key) const;
│ │ │ │ -
84 virtual DataType Add(KeyType const & key, DataType const & data);
│ │ │ │ -
85
│ │ │ │ -
86 //
│ │ │ │ -
87 // Common implementation used by all subclasses:
│ │ │ │ -
88 //
│ │ │ │ -
89 DataType find(KeyType const & key) const;
│ │ │ │ -
90 DataType add(KeyType const & key, DataType const & data);
│ │ │ │ -
92
│ │ │ │ -
93private:
│ │ │ │ -
94 typedef std::map<KeyType, DataType> MapType;
│ │ │ │ -
95
│ │ │ │ -
96 MapType _map;
│ │ │ │ -
97};
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
113// Separate read and write locks are provided to support mutex types
│ │ │ │ -
114// allowing shared (read) or exclusive (write) access.
│ │ │ │ -
115//
│ │ │ │ -
116template <class MUTEX_TYPE, class READ_LOCK_GUARD_TYPE,
│ │ │ │ -
117 class WRITE_LOCK_GUARD_TYPE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
119public:
│ │ │ │ - │ │ │ │ -
121 ~SurfaceFactoryCacheThreaded() override = default;
│ │ │ │ -
122
│ │ │ │ -
123protected:
│ │ │ │ -
125 //
│ │ │ │ -
126 // Virtual overrides from base:
│ │ │ │ -
127 //
│ │ │ │ -
128 DataType Find(KeyType const & key) const override {
│ │ │ │ -
129 READ_LOCK_GUARD_TYPE lockGuard(_mutex);
│ │ │ │ -
130 return find(key);
│ │ │ │ -
131 }
│ │ │ │ -
132
│ │ │ │ -
133 DataType Add(KeyType const & key, DataType const & data) override {
│ │ │ │ -
134 WRITE_LOCK_GUARD_TYPE lockGuard(_mutex);
│ │ │ │ -
135 return add(key, data);
│ │ │ │ -
136 }
│ │ │ │ -
138
│ │ │ │ -
139private:
│ │ │ │ -
140 MUTEX_TYPE mutable _mutex;
│ │ │ │ -
141};
│ │ │ │ -
│ │ │ │ -
142
│ │ │ │ -
143} // end namespace Bfr
│ │ │ │ -
144
│ │ │ │ -
145} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
146using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
147
│ │ │ │ -
148} // end namespace OpenSubdiv
│ │ │ │ -
149
│ │ │ │ -
150#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H */
│ │ │ │ - │ │ │ │ -
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ -
Container used internally by SurfaceFactory to store reusable information.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
SurfaceFactoryCache(SurfaceFactoryCache const &)=delete
│ │ │ │ -
SurfaceFactoryCache & operator=(SurfaceFactoryCache const &)=delete
│ │ │ │ -
Template for declaring thread-safe subclasses of SurfaceFactoryCache.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
35namespace Bfr {
│ │ │ │ +
36
│ │ │ │ +
37class VertexDescriptor;
│ │ │ │ +
38
│ │ │ │ +
43// SurfaceFactoryMeshAdapter is an abstract class that defines the interface
│ │ │ │ +
44// through which subclasses of SurfaceFactory adapt to a connected mesh
│ │ │ │ +
45// representation. The interface defines methods that describe the mesh
│ │ │ │ +
46// topology and control indices in the neighborhood of a mesh -- from
│ │ │ │ +
47// which the SurfaceFactory to identifies an appropriate limit surface.
│ │ │ │ +
48//
│ │ │ │ +
49// SurfaceFactoryMeshAdapter methods require a subclass to provide a complete
│ │ │ │ +
50// description of the topology around a base face, as well as indices
│ │ │ │ +
51// associated with it (both vertex and face-varying). The intent here is
│ │ │ │ +
52// to keep the number of methods required to a minimum, and also to minimize
│ │ │ │ +
53// the number of invocations required by the factory.
│ │ │ │ +
54//
│ │ │ │ +
55// With the need to support both linear and non-linear cases (for which
│ │ │ │ +
56// linear is trivial by comparison) and the limit surface for both vertex
│ │ │ │ +
57// and face-varying topologies, the result is a small set of methods
│ │ │ │ +
58// covering this matrix of functionality.
│ │ │ │ +
59//
│ │ │ │ +
60// Since face-varying data may differ in topology from the vertex data --
│ │ │ │ +
61// with each set of face-varying data potentially having its own unique
│ │ │ │ +
62// topology -- sets of face-varying data are uniquely distinguished by an
│ │ │ │ +
63// associated integer (a face-varying ID).
│ │ │ │ +
64//
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66public:
│ │ │ │ +
68 typedef int Index;
│ │ │ │ +
69
│ │ │ │ +
80 typedef std::intptr_t FVarID;
│ │ │ │ +
81
│ │ │ │ +
82protected:
│ │ │ │ + │ │ │ │ +
85 virtual ~SurfaceFactoryMeshAdapter() { }
│ │ │ │ +
87
│ │ │ │ +
88protected:
│ │ │ │ +
90
│ │ │ │ +
94
│ │ │ │ +
96 virtual bool isFaceHole(Index faceIndex) const = 0;
│ │ │ │ +
97
│ │ │ │ +
99 virtual int getFaceSize(Index faceIndex) const = 0;
│ │ │ │ +
101
│ │ │ │ +
103
│ │ │ │ +
111
│ │ │ │ +
113 virtual int getFaceVertexIndices(Index faceIndex,
│ │ │ │ +
114 Index vertexIndices[]) const = 0;
│ │ │ │ +
115
│ │ │ │ +
117 virtual int getFaceFVarValueIndices(Index faceIndex,
│ │ │ │ +
118 FVarID fvarID, Index fvarValueIndices[]) const = 0;
│ │ │ │ +
120
│ │ │ │ +
121protected:
│ │ │ │ +
123
│ │ │ │ +
159
│ │ │ │ + │ │ │ │ +
162 Index faceIndex, int faceVertex,
│ │ │ │ +
163 VertexDescriptor * vertexDescriptor) const = 0;
│ │ │ │ +
164
│ │ │ │ + │ │ │ │ +
167 Index faceIndex, int faceVertex,
│ │ │ │ +
168 Index vertexIndices[]) const = 0;
│ │ │ │ +
169
│ │ │ │ + │ │ │ │ +
173 Index faceIndex, int faceVertex,
│ │ │ │ +
174 FVarID fvarID, Index fvarValueIndices[]) const = 0;
│ │ │ │ +
176
│ │ │ │ +
177protected:
│ │ │ │ +
179
│ │ │ │ + │ │ │ │ +
204 Index faceIndex, Index vertexIndices[]) const;
│ │ │ │ +
205
│ │ │ │ + │ │ │ │ +
207 Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const;
│ │ │ │ +
209
│ │ │ │ +
210private:
│ │ │ │ +
211 // No private members
│ │ │ │ +
212};
│ │ │ │ +
│ │ │ │ +
213
│ │ │ │ +
214//
│ │ │ │ +
215// Inline defaults for optional methods:
│ │ │ │ +
216//
│ │ │ │ +
217inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
219 Index, Index[]) const {
│ │ │ │ +
220 return false;
│ │ │ │ +
221}
│ │ │ │ +
│ │ │ │ +
222
│ │ │ │ +
223inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
225 Index, FVarID, Index[]) const {
│ │ │ │ +
226 return false;
│ │ │ │ +
227}
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
229} // end namespace Bfr
│ │ │ │ +
230
│ │ │ │ +
231} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
232using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
233
│ │ │ │ +
234} // end namespace OpenSubdiv
│ │ │ │ +
235
│ │ │ │ +
236#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H */
│ │ │ │ + │ │ │ │ +
Abstract interface adapting SurfaceFactory to a connected mesh representation.
│ │ │ │ +
virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather face-varying indices of incident faces around a face-vertex.
│ │ │ │ +
virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int faceVertex, Index vertexIndices[]) const =0
Gather vertex indices of incident faces around a face-vertex.
│ │ │ │ +
virtual int getFaceSize(Index faceIndex) const =0
Returns the size of a face (number of vertices)
│ │ │ │ + │ │ │ │ +
virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0
Describe the topology of incident faces around a face-vertex.
│ │ │ │ +
virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index vertexIndices[]) const
│ │ │ │ +
virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const
│ │ │ │ +
virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather the face-varying indices of the face's vertices.
│ │ │ │ +
virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const =0
Gather the indices of the face's vertices.
│ │ │ │ +
virtual bool isFaceHole(Index faceIndex) const =0
Returns if a face is a hole.
│ │ │ │ +
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ +
Simple class used by subclasses of SurfaceFactory to describe a vertex.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surfaceFactoryCache.h │ │ │ │ │ +surfaceFactoryMeshAdapter.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,131 +24,179 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../bfr/irregularPatchType.h" │ │ │ │ │ +30#include │ │ │ │ │ 31 │ │ │ │ │ -32#include │ │ │ │ │ -33#include │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Bfr { │ │ │ │ │ -39 │ │ │ │ │ -52// │ │ │ │ │ -53// Initial/expected use requires simple searches of and additions to the │ │ │ │ │ -54// cache by the SurfaceFactory or its Builders. Longer term, with the │ │ │ │ │ -55// possibility of instances of caches being shared between meshes and │ │ │ │ │ -56// factories, additional options and/or public methods may be warranted │ │ │ │ │ -57// to limit what is cached or to prune the cache if it gets too large. │ │ │ │ │ -58// │ │ │ │ │ -_5_9class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e { │ │ │ │ │ -60public: │ │ │ │ │ -_6_1 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(); │ │ │ │ │ -_6_2 virtual _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(); │ │ │ │ │ -63 │ │ │ │ │ -_6_4 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e const &) = delete; │ │ │ │ │ -_6_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e & _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e const &) = delete; │ │ │ │ │ -66 │ │ │ │ │ -67protected: │ │ │ │ │ -69 // Access restricted to the Factory, its Builders, etc. │ │ │ │ │ -70 friend class _S_u_r_f_a_c_e_F_a_c_t_o_r_y; │ │ │ │ │ -71 │ │ │ │ │ -72 typedef std::uint64_t KeyType; │ │ │ │ │ -73 typedef internal::IrregularPatchSharedPtr DataType; │ │ │ │ │ -75 │ │ │ │ │ -76protected: │ │ │ │ │ -78 size_t Size() const { return _map.size(); } │ │ │ │ │ -79 │ │ │ │ │ -80 // │ │ │ │ │ -81 // Potential overrides by subclasses for thread-safety: │ │ │ │ │ -82 // │ │ │ │ │ -83 virtual DataType Find(KeyType const & key) const; │ │ │ │ │ -84 virtual DataType Add(KeyType const & key, DataType const & data); │ │ │ │ │ -85 │ │ │ │ │ -86 // │ │ │ │ │ -87 // Common implementation used by all subclasses: │ │ │ │ │ -88 // │ │ │ │ │ -89 DataType find(KeyType const & key) const; │ │ │ │ │ -90 DataType add(KeyType const & key, DataType const & data); │ │ │ │ │ -92 │ │ │ │ │ -93private: │ │ │ │ │ -94 typedef std::map MapType; │ │ │ │ │ -95 │ │ │ │ │ -96 MapType _map; │ │ │ │ │ -97}; │ │ │ │ │ -98 │ │ │ │ │ -113// Separate read and write locks are provided to support mutex types │ │ │ │ │ -114// allowing shared (read) or exclusive (write) access. │ │ │ │ │ -115// │ │ │ │ │ -116template │ │ │ │ │ -_1_1_8class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e { │ │ │ │ │ -119public: │ │ │ │ │ -_1_2_0 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d() : _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e() { } │ │ │ │ │ -_1_2_1 _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d() override = default; │ │ │ │ │ -122 │ │ │ │ │ -123protected: │ │ │ │ │ -125 // │ │ │ │ │ -126 // Virtual overrides from base: │ │ │ │ │ -127 // │ │ │ │ │ -128 DataType Find(KeyType const & key) const override { │ │ │ │ │ -129 READ_LOCK_GUARD_TYPE lockGuard(_mutex); │ │ │ │ │ -130 return find(key); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -133 DataType Add(KeyType const & key, DataType const & data) override { │ │ │ │ │ -134 WRITE_LOCK_GUARD_TYPE lockGuard(_mutex); │ │ │ │ │ -135 return add(key, data); │ │ │ │ │ -136 } │ │ │ │ │ -138 │ │ │ │ │ -139private: │ │ │ │ │ -140 MUTEX_TYPE mutable _mutex; │ │ │ │ │ -141}; │ │ │ │ │ -142 │ │ │ │ │ -143} // end namespace Bfr │ │ │ │ │ -144 │ │ │ │ │ -145} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -146using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -147 │ │ │ │ │ -148} // end namespace OpenSubdiv │ │ │ │ │ -149 │ │ │ │ │ -150#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H */ │ │ │ │ │ +35namespace Bfr { │ │ │ │ │ +36 │ │ │ │ │ +37class VertexDescriptor; │ │ │ │ │ +38 │ │ │ │ │ +43// SurfaceFactoryMeshAdapter is an abstract class that defines the interface │ │ │ │ │ +44// through which subclasses of SurfaceFactory adapt to a connected mesh │ │ │ │ │ +45// representation. The interface defines methods that describe the mesh │ │ │ │ │ +46// topology and control indices in the neighborhood of a mesh -- from │ │ │ │ │ +47// which the SurfaceFactory to identifies an appropriate limit surface. │ │ │ │ │ +48// │ │ │ │ │ +49// SurfaceFactoryMeshAdapter methods require a subclass to provide a complete │ │ │ │ │ +50// description of the topology around a base face, as well as indices │ │ │ │ │ +51// associated with it (both vertex and face-varying). The intent here is │ │ │ │ │ +52// to keep the number of methods required to a minimum, and also to minimize │ │ │ │ │ +53// the number of invocations required by the factory. │ │ │ │ │ +54// │ │ │ │ │ +55// With the need to support both linear and non-linear cases (for which │ │ │ │ │ +56// linear is trivial by comparison) and the limit surface for both vertex │ │ │ │ │ +57// and face-varying topologies, the result is a small set of methods │ │ │ │ │ +58// covering this matrix of functionality. │ │ │ │ │ +59// │ │ │ │ │ +60// Since face-varying data may differ in topology from the vertex data -- │ │ │ │ │ +61// with each set of face-varying data potentially having its own unique │ │ │ │ │ +62// topology -- sets of face-varying data are uniquely distinguished by an │ │ │ │ │ +63// associated integer (a face-varying ID). │ │ │ │ │ +64// │ │ │ │ │ +_6_5class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r { │ │ │ │ │ +66public: │ │ │ │ │ +_6_8 typedef int _I_n_d_e_x; │ │ │ │ │ +69 │ │ │ │ │ +_8_0 typedef std::intptr_t _F_V_a_r_I_D; │ │ │ │ │ +81 │ │ │ │ │ +82protected: │ │ │ │ │ +84 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r() { } │ │ │ │ │ +85 virtual _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r() { } │ │ │ │ │ +87 │ │ │ │ │ +88protected: │ │ │ │ │ +90 │ │ │ │ │ +94 │ │ │ │ │ +_9_6 virtual bool _i_s_F_a_c_e_H_o_l_e(_I_n_d_e_x faceIndex) const = 0; │ │ │ │ │ +97 │ │ │ │ │ +_9_9 virtual int _g_e_t_F_a_c_e_S_i_z_e(_I_n_d_e_x faceIndex) const = 0; │ │ │ │ │ +101 │ │ │ │ │ +103 │ │ │ │ │ +111 │ │ │ │ │ +_1_1_3 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ +114 _I_n_d_e_x vertexIndices[]) const = 0; │ │ │ │ │ +115 │ │ │ │ │ +_1_1_7 virtual int _g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ +118 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const = 0; │ │ │ │ │ +120 │ │ │ │ │ +121protected: │ │ │ │ │ +123 │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 virtual int _p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ +162 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +163 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r * vertexDescriptor) const = 0; │ │ │ │ │ +164 │ │ │ │ │ +_1_6_6 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s( │ │ │ │ │ +167 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +168 _I_n_d_e_x vertexIndices[]) const = 0; │ │ │ │ │ +169 │ │ │ │ │ +_1_7_2 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s( │ │ │ │ │ +173 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +174 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const = 0; │ │ │ │ │ +176 │ │ │ │ │ +177protected: │ │ │ │ │ +179 │ │ │ │ │ +203 virtual bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +204 _I_n_d_e_x faceIndex, _I_n_d_e_x vertexIndices[]) const; │ │ │ │ │ +205 │ │ │ │ │ +206 virtual bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +207 _I_n_d_e_x faceIndex, _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const; │ │ │ │ │ +209 │ │ │ │ │ +210private: │ │ │ │ │ +211 // No private members │ │ │ │ │ +212}; │ │ │ │ │ +213 │ │ │ │ │ +214// │ │ │ │ │ +215// Inline defaults for optional methods: │ │ │ │ │ +216// │ │ │ │ │ +217inline bool │ │ │ │ │ +_2_1_8_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +219 _I_n_d_e_x, _I_n_d_e_x[]) const { │ │ │ │ │ +220 return false; │ │ │ │ │ +221} │ │ │ │ │ +222 │ │ │ │ │ +223inline bool │ │ │ │ │ +_2_2_4_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +225 _I_n_d_e_x, _F_V_a_r_I_D, _I_n_d_e_x[]) const { │ │ │ │ │ +226 return false; │ │ │ │ │ +227} │ │ │ │ │ +228 │ │ │ │ │ +229} // end namespace Bfr │ │ │ │ │ +230 │ │ │ │ │ +231} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +232using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +233 │ │ │ │ │ +234} // end namespace OpenSubdiv │ │ │ │ │ +235 │ │ │ │ │ +236#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -Container used internally by SurfaceFactory to store reusable information. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -SurfaceFactoryCache() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -virtual ~SurfaceFactoryCache() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -SurfaceFactoryCache(SurfaceFactoryCache const &)=delete │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -SurfaceFactoryCache & operator=(SurfaceFactoryCache const &)=delete │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ -Template for declaring thread-safe subclasses of SurfaceFactoryCache. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_:_: │ │ │ │ │ -_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ -SurfaceFactoryCacheThreaded() │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_1_2_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_:_: │ │ │ │ │ -_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ -~SurfaceFactoryCacheThreaded() override=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ +Abstract interface adapting SurfaceFactory to a connected mesh representation. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int │ │ │ │ │ +faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0 │ │ │ │ │ +Gather face-varying indices of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int │ │ │ │ │ +faceVertex, Index vertexIndices[]) const =0 │ │ │ │ │ +Gather vertex indices of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +virtual int getFaceSize(Index faceIndex) const =0 │ │ │ │ │ +Returns the size of a face (number of vertices) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +Integer type representing a mesh index. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, │ │ │ │ │ +VertexDescriptor *vertexDescriptor) const =0 │ │ │ │ │ +Describe the topology of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ +virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index │ │ │ │ │ +vertexIndices[]) const │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ +virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, │ │ │ │ │ +FVarID fvarID, Index fvarValueIndices[]) const │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_2_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index │ │ │ │ │ +fvarValueIndices[]) const =0 │ │ │ │ │ +Gather the face-varying indices of the face's vertices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const │ │ │ │ │ +=0 │ │ │ │ │ +Gather the indices of the face's vertices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_i_s_F_a_c_e_H_o_l_e │ │ │ │ │ +virtual bool isFaceHole(Index faceIndex) const =0 │ │ │ │ │ +Returns if a face is a hole. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_F_V_a_r_I_D │ │ │ │ │ +std::intptr_t FVarID │ │ │ │ │ +Type used to identify and specify face-varying primvars. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +Simple class used by subclasses of SurfaceFactory to describe a vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_1_3_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00683.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surfaceFactoryMeshAdapter.h File Reference
│ │ │ │ +
surfaceFactoryCache.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../bfr/irregularPatchType.h"
│ │ │ │ +#include <map>
│ │ │ │ #include <cstdint>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  SurfaceFactoryMeshAdapter
 Abstract interface adapting SurfaceFactory to a connected mesh representation. More...
class  SurfaceFactoryCache
 Container used internally by SurfaceFactory to store reusable information. More...
 
class  SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >
 Template for declaring thread-safe subclasses of SurfaceFactoryCache. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +123,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,32 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -surfaceFactoryMeshAdapter.h File Reference │ │ │ │ │ +surfaceFactoryCache.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "../bfr/irregularPatchType.h" │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ -  Abstract interface adapting _S_u_r_f_a_c_e_F_a_c_t_o_r_y to a connected mesh │ │ │ │ │ - representation. _M_o_r_e_._._. │ │ │ │ │ +class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +  Container used internally by _S_u_r_f_a_c_e_F_a_c_t_o_r_y to store reusable │ │ │ │ │ + information. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_<_ _M_U_T_E_X___T_Y_P_E_,_ _R_E_A_D___L_O_C_K___G_U_A_R_D___T_Y_P_E_, │ │ │ │ │ + _W_R_I_T_E___L_O_C_K___G_U_A_R_D___T_Y_P_E_ _> │ │ │ │ │ +  Template for declaring thread-safe subclasses of _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00683 = [ │ │ │ │ │ - ["SurfaceFactoryMeshAdapter", "a00957.html", "a00957"] │ │ │ │ │ + ["SurfaceFactoryCache", "a00949.html", "a00949"], │ │ │ │ │ + ["SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >", "a00953.html", "a00953"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactoryMeshAdapter.h
│ │ │ │ +
surfaceFactoryCache.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,149 +119,126 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <cstdint>
│ │ │ │ +
30#include "../bfr/irregularPatchType.h"
│ │ │ │
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
32#include <map>
│ │ │ │ +
33#include <cstdint>
│ │ │ │
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ -
36
│ │ │ │ -
37class VertexDescriptor;
│ │ │ │ -
38
│ │ │ │ -
43// SurfaceFactoryMeshAdapter is an abstract class that defines the interface
│ │ │ │ -
44// through which subclasses of SurfaceFactory adapt to a connected mesh
│ │ │ │ -
45// representation. The interface defines methods that describe the mesh
│ │ │ │ -
46// topology and control indices in the neighborhood of a mesh -- from
│ │ │ │ -
47// which the SurfaceFactory to identifies an appropriate limit surface.
│ │ │ │ -
48//
│ │ │ │ -
49// SurfaceFactoryMeshAdapter methods require a subclass to provide a complete
│ │ │ │ -
50// description of the topology around a base face, as well as indices
│ │ │ │ -
51// associated with it (both vertex and face-varying). The intent here is
│ │ │ │ -
52// to keep the number of methods required to a minimum, and also to minimize
│ │ │ │ -
53// the number of invocations required by the factory.
│ │ │ │ -
54//
│ │ │ │ -
55// With the need to support both linear and non-linear cases (for which
│ │ │ │ -
56// linear is trivial by comparison) and the limit surface for both vertex
│ │ │ │ -
57// and face-varying topologies, the result is a small set of methods
│ │ │ │ -
58// covering this matrix of functionality.
│ │ │ │ -
59//
│ │ │ │ -
60// Since face-varying data may differ in topology from the vertex data --
│ │ │ │ -
61// with each set of face-varying data potentially having its own unique
│ │ │ │ -
62// topology -- sets of face-varying data are uniquely distinguished by an
│ │ │ │ -
63// associated integer (a face-varying ID).
│ │ │ │ -
64//
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66public:
│ │ │ │ -
68 typedef int Index;
│ │ │ │ -
69
│ │ │ │ -
80 typedef std::intptr_t FVarID;
│ │ │ │ -
81
│ │ │ │ -
82protected:
│ │ │ │ - │ │ │ │ -
85 virtual ~SurfaceFactoryMeshAdapter() { }
│ │ │ │ -
87
│ │ │ │ -
88protected:
│ │ │ │ -
90
│ │ │ │ -
94
│ │ │ │ -
96 virtual bool isFaceHole(Index faceIndex) const = 0;
│ │ │ │ -
97
│ │ │ │ -
99 virtual int getFaceSize(Index faceIndex) const = 0;
│ │ │ │ -
101
│ │ │ │ -
103
│ │ │ │ -
111
│ │ │ │ -
113 virtual int getFaceVertexIndices(Index faceIndex,
│ │ │ │ -
114 Index vertexIndices[]) const = 0;
│ │ │ │ -
115
│ │ │ │ -
117 virtual int getFaceFVarValueIndices(Index faceIndex,
│ │ │ │ -
118 FVarID fvarID, Index fvarValueIndices[]) const = 0;
│ │ │ │ -
120
│ │ │ │ -
121protected:
│ │ │ │ -
123
│ │ │ │ -
159
│ │ │ │ - │ │ │ │ -
162 Index faceIndex, int faceVertex,
│ │ │ │ -
163 VertexDescriptor * vertexDescriptor) const = 0;
│ │ │ │ -
164
│ │ │ │ - │ │ │ │ -
167 Index faceIndex, int faceVertex,
│ │ │ │ -
168 Index vertexIndices[]) const = 0;
│ │ │ │ -
169
│ │ │ │ - │ │ │ │ -
173 Index faceIndex, int faceVertex,
│ │ │ │ -
174 FVarID fvarID, Index fvarValueIndices[]) const = 0;
│ │ │ │ -
176
│ │ │ │ -
177protected:
│ │ │ │ -
179
│ │ │ │ - │ │ │ │ -
204 Index faceIndex, Index vertexIndices[]) const;
│ │ │ │ -
205
│ │ │ │ - │ │ │ │ -
207 Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const;
│ │ │ │ -
209
│ │ │ │ -
210private:
│ │ │ │ -
211 // No private members
│ │ │ │ -
212};
│ │ │ │ -
│ │ │ │ -
213
│ │ │ │ -
214//
│ │ │ │ -
215// Inline defaults for optional methods:
│ │ │ │ -
216//
│ │ │ │ -
217inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
219 Index, Index[]) const {
│ │ │ │ -
220 return false;
│ │ │ │ -
221}
│ │ │ │ -
│ │ │ │ -
222
│ │ │ │ -
223inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
225 Index, FVarID, Index[]) const {
│ │ │ │ -
226 return false;
│ │ │ │ -
227}
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
229} // end namespace Bfr
│ │ │ │ -
230
│ │ │ │ -
231} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
232using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
233
│ │ │ │ -
234} // end namespace OpenSubdiv
│ │ │ │ -
235
│ │ │ │ -
236#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H */
│ │ │ │ - │ │ │ │ -
Abstract interface adapting SurfaceFactory to a connected mesh representation.
│ │ │ │ -
virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather face-varying indices of incident faces around a face-vertex.
│ │ │ │ -
virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int faceVertex, Index vertexIndices[]) const =0
Gather vertex indices of incident faces around a face-vertex.
│ │ │ │ -
virtual int getFaceSize(Index faceIndex) const =0
Returns the size of a face (number of vertices)
│ │ │ │ - │ │ │ │ -
virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0
Describe the topology of incident faces around a face-vertex.
│ │ │ │ -
virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index vertexIndices[]) const
│ │ │ │ -
virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const
│ │ │ │ -
virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather the face-varying indices of the face's vertices.
│ │ │ │ -
virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const =0
Gather the indices of the face's vertices.
│ │ │ │ -
virtual bool isFaceHole(Index faceIndex) const =0
Returns if a face is a hole.
│ │ │ │ -
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ -
Simple class used by subclasses of SurfaceFactory to describe a vertex.
│ │ │ │ +
35namespace OpenSubdiv {
│ │ │ │ +
36namespace OPENSUBDIV_VERSION {
│ │ │ │ +
37
│ │ │ │ +
38namespace Bfr {
│ │ │ │ +
39
│ │ │ │ +
52//
│ │ │ │ +
53// Initial/expected use requires simple searches of and additions to the
│ │ │ │ +
54// cache by the SurfaceFactory or its Builders. Longer term, with the
│ │ │ │ +
55// possibility of instances of caches being shared between meshes and
│ │ │ │ +
56// factories, additional options and/or public methods may be warranted
│ │ │ │ +
57// to limit what is cached or to prune the cache if it gets too large.
│ │ │ │ +
58//
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63
│ │ │ │ + │ │ │ │ + │ │ │ │ +
66
│ │ │ │ +
67protected:
│ │ │ │ +
69 // Access restricted to the Factory, its Builders, etc.
│ │ │ │ +
70 friend class SurfaceFactory;
│ │ │ │ +
71
│ │ │ │ +
72 typedef std::uint64_t KeyType;
│ │ │ │ +
73 typedef internal::IrregularPatchSharedPtr DataType;
│ │ │ │ +
75
│ │ │ │ +
76protected:
│ │ │ │ +
78 size_t Size() const { return _map.size(); }
│ │ │ │ +
79
│ │ │ │ +
80 //
│ │ │ │ +
81 // Potential overrides by subclasses for thread-safety:
│ │ │ │ +
82 //
│ │ │ │ +
83 virtual DataType Find(KeyType const & key) const;
│ │ │ │ +
84 virtual DataType Add(KeyType const & key, DataType const & data);
│ │ │ │ +
85
│ │ │ │ +
86 //
│ │ │ │ +
87 // Common implementation used by all subclasses:
│ │ │ │ +
88 //
│ │ │ │ +
89 DataType find(KeyType const & key) const;
│ │ │ │ +
90 DataType add(KeyType const & key, DataType const & data);
│ │ │ │ +
92
│ │ │ │ +
93private:
│ │ │ │ +
94 typedef std::map<KeyType, DataType> MapType;
│ │ │ │ +
95
│ │ │ │ +
96 MapType _map;
│ │ │ │ +
97};
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
113// Separate read and write locks are provided to support mutex types
│ │ │ │ +
114// allowing shared (read) or exclusive (write) access.
│ │ │ │ +
115//
│ │ │ │ +
116template <class MUTEX_TYPE, class READ_LOCK_GUARD_TYPE,
│ │ │ │ +
117 class WRITE_LOCK_GUARD_TYPE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
119public:
│ │ │ │ + │ │ │ │ +
121 ~SurfaceFactoryCacheThreaded() override = default;
│ │ │ │ +
122
│ │ │ │ +
123protected:
│ │ │ │ +
125 //
│ │ │ │ +
126 // Virtual overrides from base:
│ │ │ │ +
127 //
│ │ │ │ +
128 DataType Find(KeyType const & key) const override {
│ │ │ │ +
129 READ_LOCK_GUARD_TYPE lockGuard(_mutex);
│ │ │ │ +
130 return find(key);
│ │ │ │ +
131 }
│ │ │ │ +
132
│ │ │ │ +
133 DataType Add(KeyType const & key, DataType const & data) override {
│ │ │ │ +
134 WRITE_LOCK_GUARD_TYPE lockGuard(_mutex);
│ │ │ │ +
135 return add(key, data);
│ │ │ │ +
136 }
│ │ │ │ +
138
│ │ │ │ +
139private:
│ │ │ │ +
140 MUTEX_TYPE mutable _mutex;
│ │ │ │ +
141};
│ │ │ │ +
│ │ │ │ +
142
│ │ │ │ +
143} // end namespace Bfr
│ │ │ │ +
144
│ │ │ │ +
145} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
146using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
147
│ │ │ │ +
148} // end namespace OpenSubdiv
│ │ │ │ +
149
│ │ │ │ +
150#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H */
│ │ │ │ + │ │ │ │ +
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ +
Container used internally by SurfaceFactory to store reusable information.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
SurfaceFactoryCache(SurfaceFactoryCache const &)=delete
│ │ │ │ +
SurfaceFactoryCache & operator=(SurfaceFactoryCache const &)=delete
│ │ │ │ +
Template for declaring thread-safe subclasses of SurfaceFactoryCache.
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surfaceFactoryMeshAdapter.h │ │ │ │ │ +surfaceFactoryCache.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,179 +24,131 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ +30#include "../bfr/irregularPatchType.h" │ │ │ │ │ 31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ 34 │ │ │ │ │ -35namespace Bfr { │ │ │ │ │ -36 │ │ │ │ │ -37class VertexDescriptor; │ │ │ │ │ -38 │ │ │ │ │ -43// SurfaceFactoryMeshAdapter is an abstract class that defines the interface │ │ │ │ │ -44// through which subclasses of SurfaceFactory adapt to a connected mesh │ │ │ │ │ -45// representation. The interface defines methods that describe the mesh │ │ │ │ │ -46// topology and control indices in the neighborhood of a mesh -- from │ │ │ │ │ -47// which the SurfaceFactory to identifies an appropriate limit surface. │ │ │ │ │ -48// │ │ │ │ │ -49// SurfaceFactoryMeshAdapter methods require a subclass to provide a complete │ │ │ │ │ -50// description of the topology around a base face, as well as indices │ │ │ │ │ -51// associated with it (both vertex and face-varying). The intent here is │ │ │ │ │ -52// to keep the number of methods required to a minimum, and also to minimize │ │ │ │ │ -53// the number of invocations required by the factory. │ │ │ │ │ -54// │ │ │ │ │ -55// With the need to support both linear and non-linear cases (for which │ │ │ │ │ -56// linear is trivial by comparison) and the limit surface for both vertex │ │ │ │ │ -57// and face-varying topologies, the result is a small set of methods │ │ │ │ │ -58// covering this matrix of functionality. │ │ │ │ │ -59// │ │ │ │ │ -60// Since face-varying data may differ in topology from the vertex data -- │ │ │ │ │ -61// with each set of face-varying data potentially having its own unique │ │ │ │ │ -62// topology -- sets of face-varying data are uniquely distinguished by an │ │ │ │ │ -63// associated integer (a face-varying ID). │ │ │ │ │ -64// │ │ │ │ │ -_6_5class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r { │ │ │ │ │ -66public: │ │ │ │ │ -_6_8 typedef int _I_n_d_e_x; │ │ │ │ │ -69 │ │ │ │ │ -_8_0 typedef std::intptr_t _F_V_a_r_I_D; │ │ │ │ │ -81 │ │ │ │ │ -82protected: │ │ │ │ │ -84 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r() { } │ │ │ │ │ -85 virtual _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r() { } │ │ │ │ │ -87 │ │ │ │ │ -88protected: │ │ │ │ │ -90 │ │ │ │ │ -94 │ │ │ │ │ -_9_6 virtual bool _i_s_F_a_c_e_H_o_l_e(_I_n_d_e_x faceIndex) const = 0; │ │ │ │ │ -97 │ │ │ │ │ -_9_9 virtual int _g_e_t_F_a_c_e_S_i_z_e(_I_n_d_e_x faceIndex) const = 0; │ │ │ │ │ -101 │ │ │ │ │ -103 │ │ │ │ │ -111 │ │ │ │ │ -_1_1_3 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ -114 _I_n_d_e_x vertexIndices[]) const = 0; │ │ │ │ │ -115 │ │ │ │ │ -_1_1_7 virtual int _g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ -118 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const = 0; │ │ │ │ │ -120 │ │ │ │ │ -121protected: │ │ │ │ │ -123 │ │ │ │ │ -159 │ │ │ │ │ -_1_6_1 virtual int _p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ -162 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -163 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r * vertexDescriptor) const = 0; │ │ │ │ │ -164 │ │ │ │ │ -_1_6_6 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s( │ │ │ │ │ -167 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -168 _I_n_d_e_x vertexIndices[]) const = 0; │ │ │ │ │ -169 │ │ │ │ │ -_1_7_2 virtual int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s( │ │ │ │ │ -173 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -174 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const = 0; │ │ │ │ │ -176 │ │ │ │ │ -177protected: │ │ │ │ │ -179 │ │ │ │ │ -203 virtual bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -204 _I_n_d_e_x faceIndex, _I_n_d_e_x vertexIndices[]) const; │ │ │ │ │ -205 │ │ │ │ │ -206 virtual bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -207 _I_n_d_e_x faceIndex, _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const; │ │ │ │ │ -209 │ │ │ │ │ -210private: │ │ │ │ │ -211 // No private members │ │ │ │ │ -212}; │ │ │ │ │ -213 │ │ │ │ │ -214// │ │ │ │ │ -215// Inline defaults for optional methods: │ │ │ │ │ -216// │ │ │ │ │ -217inline bool │ │ │ │ │ -_2_1_8_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -219 _I_n_d_e_x, _I_n_d_e_x[]) const { │ │ │ │ │ -220 return false; │ │ │ │ │ -221} │ │ │ │ │ -222 │ │ │ │ │ -223inline bool │ │ │ │ │ -_2_2_4_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -225 _I_n_d_e_x, _F_V_a_r_I_D, _I_n_d_e_x[]) const { │ │ │ │ │ -226 return false; │ │ │ │ │ -227} │ │ │ │ │ -228 │ │ │ │ │ -229} // end namespace Bfr │ │ │ │ │ -230 │ │ │ │ │ -231} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -232using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -233 │ │ │ │ │ -234} // end namespace OpenSubdiv │ │ │ │ │ -235 │ │ │ │ │ -236#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H */ │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Bfr { │ │ │ │ │ +39 │ │ │ │ │ +52// │ │ │ │ │ +53// Initial/expected use requires simple searches of and additions to the │ │ │ │ │ +54// cache by the SurfaceFactory or its Builders. Longer term, with the │ │ │ │ │ +55// possibility of instances of caches being shared between meshes and │ │ │ │ │ +56// factories, additional options and/or public methods may be warranted │ │ │ │ │ +57// to limit what is cached or to prune the cache if it gets too large. │ │ │ │ │ +58// │ │ │ │ │ +_5_9class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e { │ │ │ │ │ +60public: │ │ │ │ │ +_6_1 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(); │ │ │ │ │ +_6_2 virtual _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(); │ │ │ │ │ +63 │ │ │ │ │ +_6_4 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e const &) = delete; │ │ │ │ │ +_6_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e & _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e const &) = delete; │ │ │ │ │ +66 │ │ │ │ │ +67protected: │ │ │ │ │ +69 // Access restricted to the Factory, its Builders, etc. │ │ │ │ │ +70 friend class _S_u_r_f_a_c_e_F_a_c_t_o_r_y; │ │ │ │ │ +71 │ │ │ │ │ +72 typedef std::uint64_t KeyType; │ │ │ │ │ +73 typedef internal::IrregularPatchSharedPtr DataType; │ │ │ │ │ +75 │ │ │ │ │ +76protected: │ │ │ │ │ +78 size_t Size() const { return _map.size(); } │ │ │ │ │ +79 │ │ │ │ │ +80 // │ │ │ │ │ +81 // Potential overrides by subclasses for thread-safety: │ │ │ │ │ +82 // │ │ │ │ │ +83 virtual DataType Find(KeyType const & key) const; │ │ │ │ │ +84 virtual DataType Add(KeyType const & key, DataType const & data); │ │ │ │ │ +85 │ │ │ │ │ +86 // │ │ │ │ │ +87 // Common implementation used by all subclasses: │ │ │ │ │ +88 // │ │ │ │ │ +89 DataType find(KeyType const & key) const; │ │ │ │ │ +90 DataType add(KeyType const & key, DataType const & data); │ │ │ │ │ +92 │ │ │ │ │ +93private: │ │ │ │ │ +94 typedef std::map MapType; │ │ │ │ │ +95 │ │ │ │ │ +96 MapType _map; │ │ │ │ │ +97}; │ │ │ │ │ +98 │ │ │ │ │ +113// Separate read and write locks are provided to support mutex types │ │ │ │ │ +114// allowing shared (read) or exclusive (write) access. │ │ │ │ │ +115// │ │ │ │ │ +116template │ │ │ │ │ +_1_1_8class _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e { │ │ │ │ │ +119public: │ │ │ │ │ +_1_2_0 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d() : _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e() { } │ │ │ │ │ +_1_2_1 _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d() override = default; │ │ │ │ │ +122 │ │ │ │ │ +123protected: │ │ │ │ │ +125 // │ │ │ │ │ +126 // Virtual overrides from base: │ │ │ │ │ +127 // │ │ │ │ │ +128 DataType Find(KeyType const & key) const override { │ │ │ │ │ +129 READ_LOCK_GUARD_TYPE lockGuard(_mutex); │ │ │ │ │ +130 return find(key); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +133 DataType Add(KeyType const & key, DataType const & data) override { │ │ │ │ │ +134 WRITE_LOCK_GUARD_TYPE lockGuard(_mutex); │ │ │ │ │ +135 return add(key, data); │ │ │ │ │ +136 } │ │ │ │ │ +138 │ │ │ │ │ +139private: │ │ │ │ │ +140 MUTEX_TYPE mutable _mutex; │ │ │ │ │ +141}; │ │ │ │ │ +142 │ │ │ │ │ +143} // end namespace Bfr │ │ │ │ │ +144 │ │ │ │ │ +145} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +146using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +147 │ │ │ │ │ +148} // end namespace OpenSubdiv │ │ │ │ │ +149 │ │ │ │ │ +150#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ -Abstract interface adapting SurfaceFactory to a connected mesh representation. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int │ │ │ │ │ -faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0 │ │ │ │ │ -Gather face-varying indices of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int │ │ │ │ │ -faceVertex, Index vertexIndices[]) const =0 │ │ │ │ │ -Gather vertex indices of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -virtual int getFaceSize(Index faceIndex) const =0 │ │ │ │ │ -Returns the size of a face (number of vertices) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -Integer type representing a mesh index. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, │ │ │ │ │ -VertexDescriptor *vertexDescriptor) const =0 │ │ │ │ │ -Describe the topology of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ -virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index │ │ │ │ │ -vertexIndices[]) const │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ -virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, │ │ │ │ │ -FVarID fvarID, Index fvarValueIndices[]) const │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_2_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index │ │ │ │ │ -fvarValueIndices[]) const =0 │ │ │ │ │ -Gather the face-varying indices of the face's vertices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const │ │ │ │ │ -=0 │ │ │ │ │ -Gather the indices of the face's vertices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_i_s_F_a_c_e_H_o_l_e │ │ │ │ │ -virtual bool isFaceHole(Index faceIndex) const =0 │ │ │ │ │ -Returns if a face is a hole. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_F_V_a_r_I_D │ │ │ │ │ -std::intptr_t FVarID │ │ │ │ │ -Type used to identify and specify face-varying primvars. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -Simple class used by subclasses of SurfaceFactory to describe a vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_1_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_0_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +Container used internally by SurfaceFactory to store reusable information. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +SurfaceFactoryCache() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +virtual ~SurfaceFactoryCache() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +SurfaceFactoryCache(SurfaceFactoryCache const &)=delete │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +SurfaceFactoryCache & operator=(SurfaceFactoryCache const &)=delete │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ +Template for declaring thread-safe subclasses of SurfaceFactoryCache. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_:_: │ │ │ │ │ +_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ +SurfaceFactoryCacheThreaded() │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_1_2_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d_:_: │ │ │ │ │ +_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_T_h_r_e_a_d_e_d │ │ │ │ │ +~SurfaceFactoryCacheThreaded() override=default │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00686.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,47 +90,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinerSurfaceFactory.h File Reference
│ │ │ │ +
surfaceFactory.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/surfaceFactory.h"
│ │ │ │ -#include "../bfr/surfaceFactoryCache.h"
│ │ │ │ +#include "../bfr/surface.h"
│ │ │ │ +#include "../bfr/surfaceFactoryMeshAdapter.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/types.h"
│ │ │ │ +#include <cstdint>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  RefinerSurfaceFactoryBase
 Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. More...
class  SurfaceFactory
 Base class providing initialization of a Surface for each face of a mesh. More...
 
class  RefinerSurfaceFactory< CACHE_TYPE >
 Template for concrete subclasses of RefinerSurfaceFactoryBase. More...
class  SurfaceFactory::Options
 Simple set of options assigned to instances of SurfaceFactory. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +1,32 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinerSurfaceFactory.h File Reference │ │ │ │ │ +surfaceFactory.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ -#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h" │ │ │ │ │ +#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_._h" │ │ │ │ │ +#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -  Intermediate subclass of _S_u_r_f_a_c_e_F_a_c_t_o_r_y with _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r as │ │ │ │ │ - the mesh. _M_o_r_e_._._. │ │ │ │ │ +class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +  Base class providing initialization of a _S_u_r_f_a_c_e for each face of a │ │ │ │ │ + mesh. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_<_ _C_A_C_H_E___T_Y_P_E_ _> │ │ │ │ │ -  Template for concrete subclasses of _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e. _M_o_r_e_._._. │ │ │ │ │ +class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ +  Simple set of options assigned to instances of _S_u_r_f_a_c_e_F_a_c_t_o_r_y. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00686 = [ │ │ │ │ │ - ["RefinerSurfaceFactoryBase", "a00925.html", "a00925"], │ │ │ │ │ - ["RefinerSurfaceFactory< CACHE_TYPE >", "a00929.html", "a00929"] │ │ │ │ │ + ["SurfaceFactory", "a00941.html", "a00941"], │ │ │ │ │ + ["Options", "a00945.html", "a00945"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinerSurfaceFactory.h
│ │ │ │ +
surfaceFactory.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,163 +119,412 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../bfr/surfaceFactory.h"
│ │ │ │ -
31#include "../bfr/surfaceFactoryCache.h"
│ │ │ │ -
32
│ │ │ │ -
33namespace OpenSubdiv {
│ │ │ │ -
34namespace OPENSUBDIV_VERSION {
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
36namespace Far {
│ │ │ │ -
37 class TopologyRefiner;
│ │ │ │ -
38}
│ │ │ │ -
│ │ │ │ +
30#include "../bfr/surface.h"
│ │ │ │ +
31#include "../bfr/surfaceFactoryMeshAdapter.h"
│ │ │ │ +
32#include "../sdc/options.h"
│ │ │ │ +
33#include "../sdc/types.h"
│ │ │ │ +
34
│ │ │ │ +
35#include <cstdint>
│ │ │ │ +
36
│ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │
39
│ │ │ │
40namespace Bfr {
│ │ │ │
41
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
59public:
│ │ │ │ -
61
│ │ │ │ -
65
│ │ │ │ - │ │ │ │ -
67 Options const & options);
│ │ │ │ -
68
│ │ │ │ -
69 ~RefinerSurfaceFactoryBase() override = default;
│ │ │ │ -
71
│ │ │ │ -
73
│ │ │ │ -
77
│ │ │ │ -
79 Far::TopologyRefiner const & GetMesh() const { return _mesh; }
│ │ │ │ -
80
│ │ │ │ -
82 int GetNumFaces() const { return _numFaces; }
│ │ │ │ -
83
│ │ │ │ -
85 int GetNumFVarChannels() const { return _numFVarChannels; }
│ │ │ │ -
87
│ │ │ │ -
88protected:
│ │ │ │ -
90 //
│ │ │ │ -
91 // Virtual overrides to satisfy the SurfaceFactoryMeshAdapter interface:
│ │ │ │ -
92 //
│ │ │ │ -
93 bool isFaceHole( Index faceIndex) const override;
│ │ │ │ -
94 int getFaceSize(Index faceIndex) const override;
│ │ │ │ -
95
│ │ │ │ -
96 int getFaceVertexIndices(Index faceIndex,
│ │ │ │ -
97 Index vertexIndices[]) const override;
│ │ │ │ -
98 int getFaceFVarValueIndices(Index faceIndex,
│ │ │ │ -
99 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │ -
100
│ │ │ │ -
101 int populateFaceVertexDescriptor(Index faceIndex, int faceVertex,
│ │ │ │ -
102 VertexDescriptor * vertexDescriptor) const override;
│ │ │ │ -
103
│ │ │ │ - │ │ │ │ -
105 Index faceIndex, int faceVertex,
│ │ │ │ -
106 Index vertexIndices[]) const override;
│ │ │ │ - │ │ │ │ -
108 Index faceIndex, int faceVertex,
│ │ │ │ -
109 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │ -
110
│ │ │ │ -
111 // Optional SurfaceFactoryMeshAdapter overrides for regular patches:
│ │ │ │ - │ │ │ │ -
113 Index faceIndex,
│ │ │ │ -
114 Index vertexIndices[]) const override;
│ │ │ │ -
115
│ │ │ │ - │ │ │ │ -
117 Index faceIndex,
│ │ │ │ -
118 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │ +
42//
│ │ │ │ +
43// Forward declarations of public and internal classes used by factories:
│ │ │ │ +
44//
│ │ │ │ +
45class SurfaceFactoryCache;
│ │ │ │ +
46class FaceTopology;
│ │ │ │ +
47class FaceSurface;
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
104public:
│ │ │ │ +
│ │ │ │ +
116 class Options {
│ │ │ │ +
117 public:
│ │ │ │ +
│ │ │ │ +
118 Options() : _dfltFVarID(-1), _externCache(0), _enableCache(true),
│ │ │ │ +
119 _approxLevelSmooth(2), _approxLevelSharp(6) { }
│ │ │ │ +
│ │ │ │
120
│ │ │ │ -
121private:
│ │ │ │ -
122 //
│ │ │ │ -
123 // Internal supporting methods:
│ │ │ │ -
124 //
│ │ │ │ -
125 int getFaceVaryingChannel(FVarID fvarID) const;
│ │ │ │ + │ │ │ │ +
125 FVarID GetDefaultFVarID() const { return _dfltFVarID; }
│ │ │ │
126
│ │ │ │ -
127 int getFaceVertexPointIndices(Index faceIndex, int faceVertex,
│ │ │ │ -
128 Index indices[], int vtxOrFVarChannel) const;
│ │ │ │ -
129
│ │ │ │ -
130 int getFacePatchPointIndices(Index faceIndex,
│ │ │ │ -
131 Index indices[], int vtxOrFVarChannel) const;
│ │ │ │ -
132
│ │ │ │ -
133private:
│ │ │ │ -
134 // Additional members for the subclass:
│ │ │ │ -
135 Far::TopologyRefiner const & _mesh;
│ │ │ │ +
128 Options & EnableCaching(bool on);
│ │ │ │ +
130 bool IsCachingEnabled() const { return _enableCache; }
│ │ │ │ +
131
│ │ │ │ + │ │ │ │ +
135 SurfaceFactoryCache * GetExternalCache() const { return _externCache; }
│ │ │ │
136
│ │ │ │ -
137 int _numFaces;
│ │ │ │ -
138 int _numFVarChannels;
│ │ │ │ -
139};
│ │ │ │ -
│ │ │ │ -
140
│ │ │ │ -
141
│ │ │ │ -
142//
│ │ │ │ -
156template <class CACHE_TYPE = SurfaceFactoryCache>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
158public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
160 Options const & options = Options()) :
│ │ │ │ -
161 RefinerSurfaceFactoryBase(mesh, options),
│ │ │ │ -
162 _localCache() {
│ │ │ │ -
163
│ │ │ │ - │ │ │ │ -
165 }
│ │ │ │ -
│ │ │ │ -
166 ~RefinerSurfaceFactory() override = default;
│ │ │ │ -
167
│ │ │ │ -
168private:
│ │ │ │ -
169 CACHE_TYPE _localCache;
│ │ │ │ -
170};
│ │ │ │ -
│ │ │ │ +
137 // Set refinement levels used to approximate the limit surface
│ │ │ │ +
138 // for smooth and sharp features (reasonable defaults assigned):
│ │ │ │ +
140 Options & SetApproxLevelSmooth(int level);
│ │ │ │ +
142 int GetApproxLevelSmooth() const { return _approxLevelSmooth; }
│ │ │ │ +
143
│ │ │ │ +
145 Options & SetApproxLevelSharp(int level);
│ │ │ │ +
147 int GetApproxLevelSharp() const { return _approxLevelSharp; }
│ │ │ │ +
148
│ │ │ │ +
149 private:
│ │ │ │ +
150 // Member variables:
│ │ │ │ +
151 FVarID _dfltFVarID;
│ │ │ │ +
152
│ │ │ │ +
153 SurfaceFactoryCache * _externCache;
│ │ │ │ +
154
│ │ │ │ +
155 unsigned char _enableCache : 1;
│ │ │ │ +
156 unsigned char _approxLevelSmooth;
│ │ │ │ +
157 unsigned char _approxLevelSharp;
│ │ │ │ +
158 };
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
160public:
│ │ │ │ +
161 ~SurfaceFactory() override;
│ │ │ │ +
162
│ │ │ │ +
164
│ │ │ │ +
168
│ │ │ │ +
170 Sdc::SchemeType GetSchemeType() const { return _subdivScheme; }
│ │ │ │
171
│ │ │ │ -
172} // end namespace Bfr
│ │ │ │ -
173
│ │ │ │ -
174} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
175using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
176
│ │ │ │ -
177} // end namespace OpenSubdiv
│ │ │ │ +
173 Sdc::Options GetSchemeOptions() const { return _subdivOptions; }
│ │ │ │ +
175
│ │ │ │ +
176public:
│ │ │ │
178
│ │ │ │ -
179#endif /* OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H */
│ │ │ │ - │ │ │ │ -
Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh.
│ │ │ │ - │ │ │ │ -
int GetNumFVarChannels() const
Return the number of face-varying channels.
│ │ │ │ -
Far::TopologyRefiner const & GetMesh() const
Return the instance of the mesh.
│ │ │ │ - │ │ │ │ -
RefinerSurfaceFactoryBase(Far::TopologyRefiner const &mesh, Options const &options)
│ │ │ │ -
Template for concrete subclasses of RefinerSurfaceFactoryBase.
│ │ │ │ - │ │ │ │ -
RefinerSurfaceFactory(Far::TopologyRefiner const &mesh, Options const &options=Options())
│ │ │ │ -
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ +
190
│ │ │ │ +
200 bool FaceHasLimitSurface(Index faceIndex) const;
│ │ │ │ +
201
│ │ │ │ + │ │ │ │ +
210
│ │ │ │ +
211public:
│ │ │ │ +
213
│ │ │ │ +
233
│ │ │ │ +
241 template <typename REAL>
│ │ │ │ +
242 bool InitVertexSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ +
243
│ │ │ │ +
251 template <typename REAL>
│ │ │ │ +
252 bool InitVaryingSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ +
253
│ │ │ │ +
266 template <typename REAL>
│ │ │ │ +
267 bool InitFaceVaryingSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ +
268
│ │ │ │ +
278 template <typename REAL>
│ │ │ │ +
279 bool InitFaceVaryingSurface(Index faceIndex, Surface<REAL> * surface,
│ │ │ │ +
280 FVarID fvarID) const;
│ │ │ │ +
281
│ │ │ │ +
307 template <typename REAL>
│ │ │ │ +
308 bool InitSurfaces(Index faceIndex, Surface<REAL> * vtxSurface,
│ │ │ │ +
309 Surface<REAL> * fvarSurfaces,
│ │ │ │ +
310 FVarID const fvarIDs[] = 0,
│ │ │ │ +
311 int fvarCount = 0,
│ │ │ │ +
312 Surface<REAL> * varSurface = 0) const;
│ │ │ │ +
314
│ │ │ │ +
316
│ │ │ │ +
319 //
│ │ │ │ +
320 // WIP - considering removing these since non-essential
│ │ │ │ +
321 //
│ │ │ │ +
322
│ │ │ │ +
324 template <typename REAL=float>
│ │ │ │ +
325 Surface<REAL> * CreateVertexSurface(Index faceIndex) const;
│ │ │ │ +
326
│ │ │ │ +
328 template <typename REAL=float>
│ │ │ │ +
329 Surface<REAL> * CreateVaryingSurface(Index faceIndex) const;
│ │ │ │ +
330
│ │ │ │ +
332 template <typename REAL=float>
│ │ │ │ + │ │ │ │ +
334
│ │ │ │ +
336 template <typename REAL=float>
│ │ │ │ +
337 Surface<REAL> * CreateFaceVaryingSurface(Index faceIndex, FVarID id) const;
│ │ │ │ +
339
│ │ │ │ +
340protected:
│ │ │ │ +
342
│ │ │ │ +
346
│ │ │ │ + │ │ │ │ +
359 Sdc::Options const & schemeOptions,
│ │ │ │ +
360 Options const & limitOptions);
│ │ │ │ +
361
│ │ │ │ + │ │ │ │ +
364
│ │ │ │ + │ │ │ │ + │ │ │ │ +
368
│ │ │ │ +
369private:
│ │ │ │ +
370 // Supporting internal methods:
│ │ │ │ +
371 void setSubdivisionOptions(Sdc::SchemeType, Sdc::Options const & options);
│ │ │ │ +
372 void setFactoryOptions(Options const & factoryOptions);
│ │ │ │ +
373
│ │ │ │ +
374 bool faceHasLimitSimple(Index faceIndex, int faceSize) const;
│ │ │ │ +
375
│ │ │ │ +
376 bool faceHasLimitNeighborhood(Index faceIndex) const;
│ │ │ │ +
377 bool faceHasLimitNeighborhood(FaceTopology const & faceTopology) const;
│ │ │ │ +
378
│ │ │ │ +
379 class SurfaceSet;
│ │ │ │ +
380
│ │ │ │ +
381 bool populateAllSurfaces( Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ +
382 bool populateLinearSurfaces( Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ +
383 bool populateNonLinearSurfaces(Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ +
384
│ │ │ │ +
385 bool initSurfaces(Index faceIndex, internal::SurfaceData * vtxSurface,
│ │ │ │ +
386 internal::SurfaceData * varSurface,
│ │ │ │ +
387 internal::SurfaceData * fvarSurfaces,
│ │ │ │ +
388 int fvarCount,
│ │ │ │ +
389 FVarID const fvarIDs[]) const;
│ │ │ │ +
390
│ │ │ │ +
391 // Methods to assemble topology and corresponding indices for entire face:
│ │ │ │ +
392 bool isFaceNeighborhoodRegular(Index faceIndex,
│ │ │ │ +
393 FVarID const * fvarPtrOrVtx,
│ │ │ │ +
394 Index indices[]) const;
│ │ │ │ +
395
│ │ │ │ +
396 bool initFaceNeighborhoodTopology(Index faceIndex,
│ │ │ │ +
397 FaceTopology * topology) const;
│ │ │ │ +
398
│ │ │ │ +
399 bool gatherFaceNeighborhoodTopology(Index faceIndex,
│ │ │ │ +
400 FaceTopology * topology) const;
│ │ │ │ +
401
│ │ │ │ +
402 int gatherFaceNeighborhoodIndices(Index faceIndex,
│ │ │ │ +
403 FaceTopology const & topology,
│ │ │ │ +
404 FVarID const * fvarPtrOrVtx,
│ │ │ │ +
405 Index indices[]) const;
│ │ │ │ +
406
│ │ │ │ +
407 // Methods to assemble Surfaces for the different categories of patch:
│ │ │ │ +
408 typedef internal::SurfaceData SurfaceType;
│ │ │ │ +
409
│ │ │ │ +
410 void assignLinearSurface(SurfaceType * surfacePtr,
│ │ │ │ +
411 Index faceIndex,
│ │ │ │ +
412 FVarID const * fvarPtrOrVtx) const;
│ │ │ │ +
413
│ │ │ │ +
414 void assignRegularSurface(SurfaceType * surfacePtr,
│ │ │ │ +
415 Index const surfacePatchPoints[]) const;
│ │ │ │ +
416
│ │ │ │ +
417 void assignRegularSurface(SurfaceType * surfacePtr,
│ │ │ │ +
418 FaceSurface const & surfaceDescription) const;
│ │ │ │ +
419
│ │ │ │ +
420 void assignIrregularSurface(SurfaceType * surfacePtr,
│ │ │ │ +
421 FaceSurface const & surfaceDescription) const;
│ │ │ │ +
422
│ │ │ │ +
423 void copyNonLinearSurface(SurfaceType * surfacePtr,
│ │ │ │ +
424 SurfaceType const & surfaceSource,
│ │ │ │ +
425 FaceSurface const & surfaceDescription) const;
│ │ │ │ +
426
│ │ │ │ +
427private:
│ │ │ │ +
428 // Members describing options and subdivision properties (very little
│ │ │ │ +
429 // memory and low initialization cost)
│ │ │ │ +
430 Sdc::SchemeType _subdivScheme;
│ │ │ │ +
431 Sdc::Options _subdivOptions;
│ │ │ │ +
432 Options _factoryOptions;
│ │ │ │ +
433
│ │ │ │ +
434 // Members related to subdivision topology, options and limit tests:
│ │ │ │ +
435 unsigned int _linearScheme : 1;
│ │ │ │ +
436 unsigned int _linearFVarInterp : 1;
│ │ │ │ +
437
│ │ │ │ +
438 unsigned int _testNeighborhoodForLimit : 1;
│ │ │ │ +
439 unsigned int _rejectSmoothBoundariesForLimit : 1;
│ │ │ │ +
440 unsigned int _rejectIrregularFacesForLimit : 1;
│ │ │ │ +
441
│ │ │ │ +
442 int _regFaceSize;
│ │ │ │ +
443
│ │ │ │ +
444 // Members related to caching:
│ │ │ │ +
445 SurfaceFactoryCache mutable * _topologyCache;
│ │ │ │ +
446};
│ │ │ │ +
│ │ │ │ +
447
│ │ │ │ +
448//
│ │ │ │ +
449// Inline methods for Options:
│ │ │ │ +
450//
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
453 _dfltFVarID = id;
│ │ │ │ +
454 return *this;
│ │ │ │ +
455}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
458 _enableCache = on;
│ │ │ │ +
459 return *this;
│ │ │ │ +
460}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
463 _externCache = c;
│ │ │ │ +
464 return *this;
│ │ │ │ +
465}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
468 _approxLevelSmooth = (unsigned char) level;
│ │ │ │ +
469 return *this;
│ │ │ │ +
470}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
473 _approxLevelSharp = (unsigned char) level;
│ │ │ │ +
474 return *this;
│ │ │ │ +
475}
│ │ │ │ +
│ │ │ │ +
476
│ │ │ │ +
477//
│ │ │ │ +
478// Inline methods to initializes Surfaces:
│ │ │ │ +
479//
│ │ │ │ +
480template <typename REAL>
│ │ │ │ +
481inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
483
│ │ │ │ +
484 return initSurfaces(face, &s->getSurfaceData(), 0, 0, 0, 0);
│ │ │ │ +
485}
│ │ │ │ +
│ │ │ │ +
486template <typename REAL>
│ │ │ │ +
487inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
489
│ │ │ │ +
490 return initSurfaces(face, 0, &s->getSurfaceData(), 0, 0, 0);
│ │ │ │ +
491}
│ │ │ │ +
│ │ │ │ +
492template <typename REAL>
│ │ │ │ +
493inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
495 FVarID fvarID) const {
│ │ │ │ +
496 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &fvarID);
│ │ │ │ +
497}
│ │ │ │ +
│ │ │ │ +
498template <typename REAL>
│ │ │ │ +
499inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
501 FVarID dfltID = _factoryOptions.GetDefaultFVarID();
│ │ │ │ +
502 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &dfltID);
│ │ │ │ +
503}
│ │ │ │ +
│ │ │ │ +
504
│ │ │ │ +
505template <typename REAL>
│ │ │ │ +
506inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
508 Surface<REAL> * fvarSurfaces, FVarID const fvarIDs[], int fvarCount,
│ │ │ │ +
509 Surface<REAL> * varSurface) const {
│ │ │ │ +
510
│ │ │ │ +
511 bool useDfltFVarID = fvarSurfaces && (fvarIDs == 0) && (fvarCount == 0);
│ │ │ │ +
512 FVarID dfltFVarID = useDfltFVarID ? _factoryOptions.GetDefaultFVarID() : 0;
│ │ │ │ +
513
│ │ │ │ +
514 return initSurfaces(faceIndex,
│ │ │ │ +
515 vtxSurface ? &vtxSurface->getSurfaceData() : 0,
│ │ │ │ +
516 varSurface ? &varSurface->getSurfaceData() : 0,
│ │ │ │ +
517 fvarSurfaces ? &fvarSurfaces->getSurfaceData() : 0,
│ │ │ │ +
518 fvarCount ? fvarCount : (fvarSurfaces != 0),
│ │ │ │ +
519 useDfltFVarID ? &dfltFVarID : fvarIDs);
│ │ │ │ +
520}
│ │ │ │ +
│ │ │ │ +
521
│ │ │ │ +
522//
│ │ │ │ +
523// Inline methods to allocate and initialize Surfaces:
│ │ │ │ +
524//
│ │ │ │ +
525template <typename REAL>
│ │ │ │ +
526inline Surface<REAL> *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
528 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ +
529 if (InitVertexSurface<REAL>(faceIndex, s)) return s;
│ │ │ │ +
530 delete s;
│ │ │ │ +
531 return 0;
│ │ │ │ +
532}
│ │ │ │ +
│ │ │ │ +
533template <typename REAL>
│ │ │ │ +
534inline Surface<REAL> *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
536 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ +
537 if (InitVaryingSurface<REAL>(faceIndex, s)) return s;
│ │ │ │ +
538 delete s;
│ │ │ │ +
539 return 0;
│ │ │ │ +
540}
│ │ │ │ +
│ │ │ │ +
541template <typename REAL>
│ │ │ │ +
542inline Surface<REAL> *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
544 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ +
545 if (InitFaceVaryingSurface<REAL>(faceIndex, s, fvarID)) return s;
│ │ │ │ +
546 delete s;
│ │ │ │ +
547 return 0;
│ │ │ │ +
548}
│ │ │ │ +
│ │ │ │ +
549template <typename REAL>
│ │ │ │ +
550inline Surface<REAL> *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
552 FVarID dfltID = _factoryOptions.GetDefaultFVarID();
│ │ │ │ +
553 return CreateFaceVaryingSurface<REAL>(face, dfltID);
│ │ │ │ +
554}
│ │ │ │ +
│ │ │ │ +
555
│ │ │ │ +
556} // end namespace Bfr
│ │ │ │ +
557
│ │ │ │ +
558} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
559using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
560
│ │ │ │ +
561} // end namespace OpenSubdiv
│ │ │ │ +
562
│ │ │ │ +
563#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_H */
│ │ │ │ + │ │ │ │ +
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ +
Simple class defining the 2D parameterization of a face.
│ │ │ │ +
Encapsulates the limit surface for a face of a mesh.
Definition surface.h:59
│ │ │ │ +
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │
void setInternalCache(SurfaceFactoryCache *cache)
Subclass to identify an internal cache for use by base class.
│ │ │ │ -
Simple set of options assigned to instances of SurfaceFactory.
│ │ │ │ -
virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather face-varying indices of incident faces around a face-vertex.
│ │ │ │ -
virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int faceVertex, Index vertexIndices[]) const =0
Gather vertex indices of incident faces around a face-vertex.
│ │ │ │ -
virtual int getFaceSize(Index faceIndex) const =0
Returns the size of a face (number of vertices)
│ │ │ │ - │ │ │ │ -
virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0
Describe the topology of incident faces around a face-vertex.
│ │ │ │ -
virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index vertexIndices[]) const
│ │ │ │ -
virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const
│ │ │ │ -
virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather the face-varying indices of the face's vertices.
│ │ │ │ -
virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const =0
Gather the indices of the face's vertices.
│ │ │ │ -
virtual bool isFaceHole(Index faceIndex) const =0
Returns if a face is a hole.
│ │ │ │ -
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ -
Simple class used by subclasses of SurfaceFactory to describe a vertex.
│ │ │ │ -
Stores topology data for a specified set of refinement options.
│ │ │ │ + │ │ │ │ +
bool InitFaceVaryingSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for the default face-varying data.
│ │ │ │ +
Sdc::Options GetSchemeOptions() const
Return the set of subdivision options.
│ │ │ │ +
Parameterization GetFaceParameterization(Index faceIndex) const
Return the Parameterization of a face with a limit surface.
│ │ │ │ +
SurfaceFactory(SurfaceFactory const &)=delete
│ │ │ │ +
bool FaceHasLimitSurface(Index faceIndex) const
Return if a specified face has a limit surface.
│ │ │ │ +
SurfaceFactory & operator=(SurfaceFactory const &)=delete
│ │ │ │ +
Surface< REAL > * CreateVertexSurface(Index faceIndex) const
Construct a Surface for vertex data.
│ │ │ │ +
Surface< REAL > * CreateFaceVaryingSurface(Index faceIndex) const
Construct a Surface for the default face-varying data.
│ │ │ │ +
bool InitSurfaces(Index faceIndex, Surface< REAL > *vtxSurface, Surface< REAL > *fvarSurfaces, FVarID const fvarIDs[]=0, int fvarCount=0, Surface< REAL > *varSurface=0) const
Initialize multiple Surfaces at once.
│ │ │ │ +
Sdc::SchemeType GetSchemeType() const
Return the subdivision scheme.
│ │ │ │ +
Surface< REAL > * CreateVaryingSurface(Index faceIndex) const
Construct a Surface for varying data.
│ │ │ │ +
bool InitVertexSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for vertex data.
│ │ │ │ +
bool InitVaryingSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for varying data.
│ │ │ │ +
SurfaceFactory(Sdc::SchemeType schemeType, Sdc::Options const &schemeOptions, Options const &limitOptions)
Constructor to be used by subclasses.
│ │ │ │ +
Simple set of options assigned to instances of SurfaceFactory.
│ │ │ │ +
Options & SetExternalCache(SurfaceFactoryCache *c)
Assign an external cache to override the internal.
│ │ │ │ +
Options & EnableCaching(bool on)
Enable or disable caching (default is true):
│ │ │ │ +
Options & SetApproxLevelSmooth(int level)
Assign maximum refinement level for smooth features.
│ │ │ │ +
int GetApproxLevelSmooth() const
Return maximum refinement level for smooth features.
│ │ │ │ + │ │ │ │ +
bool IsCachingEnabled() const
Return if caching is enable.
│ │ │ │ +
Options & SetDefaultFVarID(FVarID id)
Assign the default face-varying ID (none assigned by default)
│ │ │ │ +
Options & SetApproxLevelSharp(int level)
Assign maximum refinement level for sharp features.
│ │ │ │ +
FVarID GetDefaultFVarID() const
Return the default face-varying ID.
│ │ │ │ +
int GetApproxLevelSharp() const
Return maximum refinement level for sharp features.
│ │ │ │ +
SurfaceFactoryCache * GetExternalCache() const
Return any assigned external cache.
│ │ │ │ +
Container used internally by SurfaceFactory to store reusable information.
│ │ │ │ +
Abstract interface adapting SurfaceFactory to a connected mesh representation.
│ │ │ │ + │ │ │ │ +
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ +
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -refinerSurfaceFactory.h │ │ │ │ │ +surfaceFactory.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,222 +24,476 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../bfr/surfaceFactory.h" │ │ │ │ │ -31#include "../bfr/surfaceFactoryCache.h" │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ -35 │ │ │ │ │ -_3_6namespace Far { │ │ │ │ │ -37 class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r; │ │ │ │ │ -38} │ │ │ │ │ +30#include "../bfr/surface.h" │ │ │ │ │ +31#include "../bfr/surfaceFactoryMeshAdapter.h" │ │ │ │ │ +32#include "../sdc/options.h" │ │ │ │ │ +33#include "../sdc/types.h" │ │ │ │ │ +34 │ │ │ │ │ +35#include │ │ │ │ │ +36 │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ 39 │ │ │ │ │ 40namespace Bfr { │ │ │ │ │ 41 │ │ │ │ │ -_5_8class _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y { │ │ │ │ │ -59public: │ │ │ │ │ -61 │ │ │ │ │ -65 │ │ │ │ │ -_6_6 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & mesh, │ │ │ │ │ -67 _O_p_t_i_o_n_s const & options); │ │ │ │ │ -68 │ │ │ │ │ -_6_9 _~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e() override = default; │ │ │ │ │ -71 │ │ │ │ │ -73 │ │ │ │ │ -77 │ │ │ │ │ -_7_9 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _G_e_t_M_e_s_h() const { return _mesh; } │ │ │ │ │ -80 │ │ │ │ │ -_8_2 int _G_e_t_N_u_m_F_a_c_e_s() const { return _numFaces; } │ │ │ │ │ -83 │ │ │ │ │ -_8_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return _numFVarChannels; } │ │ │ │ │ -87 │ │ │ │ │ -88protected: │ │ │ │ │ -90 // │ │ │ │ │ -91 // Virtual overrides to satisfy the SurfaceFactoryMeshAdapter interface: │ │ │ │ │ -92 // │ │ │ │ │ -93 bool _i_s_F_a_c_e_H_o_l_e( _I_n_d_e_x faceIndex) const override; │ │ │ │ │ -94 int _g_e_t_F_a_c_e_S_i_z_e(_I_n_d_e_x faceIndex) const override; │ │ │ │ │ -95 │ │ │ │ │ -96 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ -97 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ -98 int _g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ -99 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ -100 │ │ │ │ │ -101 int _p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r(_I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -102 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r * vertexDescriptor) const override; │ │ │ │ │ -103 │ │ │ │ │ -104 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s( │ │ │ │ │ -105 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -106 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ -107 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s( │ │ │ │ │ -108 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -109 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ -110 │ │ │ │ │ -111 // Optional SurfaceFactoryMeshAdapter overrides for regular patches: │ │ │ │ │ -112 bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -113 _I_n_d_e_x faceIndex, │ │ │ │ │ -114 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ -115 │ │ │ │ │ -116 bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ -117 _I_n_d_e_x faceIndex, │ │ │ │ │ -118 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ +42// │ │ │ │ │ +43// Forward declarations of public and internal classes used by factories: │ │ │ │ │ +44// │ │ │ │ │ +45class SurfaceFactoryCache; │ │ │ │ │ +46class FaceTopology; │ │ │ │ │ +47class FaceSurface; │ │ │ │ │ +48 │ │ │ │ │ +_1_0_3class _S_u_r_f_a_c_e_F_a_c_t_o_r_y : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r { │ │ │ │ │ +104public: │ │ │ │ │ +_1_1_6 class _O_p_t_i_o_n_s { │ │ │ │ │ +117 public: │ │ │ │ │ +_1_1_8 _O_p_t_i_o_n_s() : _dfltFVarID(-1), _externCache(0), _enableCache(true), │ │ │ │ │ +119 _approxLevelSmooth(2), _approxLevelSharp(6) { } │ │ │ │ │ 120 │ │ │ │ │ -121private: │ │ │ │ │ -122 // │ │ │ │ │ -123 // Internal supporting methods: │ │ │ │ │ -124 // │ │ │ │ │ -125 int getFaceVaryingChannel(_F_V_a_r_I_D fvarID) const; │ │ │ │ │ +123 _O_p_t_i_o_n_s & _S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(_F_V_a_r_I_D id); │ │ │ │ │ +_1_2_5 _F_V_a_r_I_D _G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D() const { return _dfltFVarID; } │ │ │ │ │ 126 │ │ │ │ │ -127 int getFaceVertexPointIndices(_I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ -128 _I_n_d_e_x indices[], int vtxOrFVarChannel) const; │ │ │ │ │ -129 │ │ │ │ │ -130 int getFacePatchPointIndices(_I_n_d_e_x faceIndex, │ │ │ │ │ -131 _I_n_d_e_x indices[], int vtxOrFVarChannel) const; │ │ │ │ │ -132 │ │ │ │ │ -133private: │ │ │ │ │ -134 // Additional members for the subclass: │ │ │ │ │ -135 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _mesh; │ │ │ │ │ +128 _O_p_t_i_o_n_s & _E_n_a_b_l_e_C_a_c_h_i_n_g(bool on); │ │ │ │ │ +_1_3_0 bool _I_s_C_a_c_h_i_n_g_E_n_a_b_l_e_d() const { return _enableCache; } │ │ │ │ │ +131 │ │ │ │ │ +133 _O_p_t_i_o_n_s & _S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * c); │ │ │ │ │ +_1_3_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * _G_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e() const { return _externCache; } │ │ │ │ │ 136 │ │ │ │ │ -137 int _numFaces; │ │ │ │ │ -138 int _numFVarChannels; │ │ │ │ │ -139}; │ │ │ │ │ -140 │ │ │ │ │ -141 │ │ │ │ │ -142// │ │ │ │ │ -156template │ │ │ │ │ -_1_5_7class _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y : public _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ -158public: │ │ │ │ │ -_1_5_9 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & mesh, │ │ │ │ │ -160 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()) : │ │ │ │ │ -161 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e(mesh, options), │ │ │ │ │ -162 _localCache() { │ │ │ │ │ -163 │ │ │ │ │ -164 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e(&_localCache); │ │ │ │ │ -165 } │ │ │ │ │ -_1_6_6 _~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y() override = default; │ │ │ │ │ -167 │ │ │ │ │ -168private: │ │ │ │ │ -169 CACHE_TYPE _localCache; │ │ │ │ │ -170}; │ │ │ │ │ +137 // Set refinement levels used to approximate the limit surface │ │ │ │ │ +138 // for smooth and sharp features (reasonable defaults assigned): │ │ │ │ │ +140 _O_p_t_i_o_n_s & _S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h(int level); │ │ │ │ │ +_1_4_2 int _G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h() const { return _approxLevelSmooth; } │ │ │ │ │ +143 │ │ │ │ │ +145 _O_p_t_i_o_n_s & _S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p(int level); │ │ │ │ │ +_1_4_7 int _G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p() const { return _approxLevelSharp; } │ │ │ │ │ +148 │ │ │ │ │ +149 private: │ │ │ │ │ +150 // Member variables: │ │ │ │ │ +151 _F_V_a_r_I_D _dfltFVarID; │ │ │ │ │ +152 │ │ │ │ │ +153 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * _externCache; │ │ │ │ │ +154 │ │ │ │ │ +155 unsigned char _enableCache : 1; │ │ │ │ │ +156 unsigned char _approxLevelSmooth; │ │ │ │ │ +157 unsigned char _approxLevelSharp; │ │ │ │ │ +158 }; │ │ │ │ │ +159 │ │ │ │ │ +160public: │ │ │ │ │ +_1_6_1 _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y() override; │ │ │ │ │ +162 │ │ │ │ │ +164 │ │ │ │ │ +168 │ │ │ │ │ +_1_7_0 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _G_e_t_S_c_h_e_m_e_T_y_p_e() const { return _subdivScheme; } │ │ │ │ │ 171 │ │ │ │ │ -172} // end namespace Bfr │ │ │ │ │ -173 │ │ │ │ │ -174} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -175using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -176 │ │ │ │ │ -177} // end namespace OpenSubdiv │ │ │ │ │ +_1_7_3 _S_d_c_:_:_O_p_t_i_o_n_s _G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s() const { return _subdivOptions; } │ │ │ │ │ +175 │ │ │ │ │ +176public: │ │ │ │ │ 178 │ │ │ │ │ -179#endif /* OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H */ │ │ │ │ │ +190 │ │ │ │ │ +_2_0_0 bool _F_a_c_e_H_a_s_L_i_m_i_t_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +201 │ │ │ │ │ +_2_0_8 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _G_e_t_F_a_c_e_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +210 │ │ │ │ │ +211public: │ │ │ │ │ +213 │ │ │ │ │ +233 │ │ │ │ │ +241 template │ │ │ │ │ +242 bool _I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) const; │ │ │ │ │ +243 │ │ │ │ │ +251 template │ │ │ │ │ +252 bool _I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) const; │ │ │ │ │ +253 │ │ │ │ │ +266 template │ │ │ │ │ +267 bool _I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) │ │ │ │ │ +const; │ │ │ │ │ +268 │ │ │ │ │ +278 template │ │ │ │ │ +279 bool _I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface, │ │ │ │ │ +280 _F_V_a_r_I_D fvarID) const; │ │ │ │ │ +281 │ │ │ │ │ +307 template │ │ │ │ │ +308 bool _I_n_i_t_S_u_r_f_a_c_e_s(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * vtxSurface, │ │ │ │ │ +309 _S_u_r_f_a_c_e_<_R_E_A_L_> * fvarSurfaces, │ │ │ │ │ +310 _F_V_a_r_I_D const fvarIDs[] = 0, │ │ │ │ │ +311 int fvarCount = 0, │ │ │ │ │ +312 _S_u_r_f_a_c_e_<_R_E_A_L_> * varSurface = 0) const; │ │ │ │ │ +314 │ │ │ │ │ +316 │ │ │ │ │ +319 // │ │ │ │ │ +320 // WIP - considering removing these since non-essential │ │ │ │ │ +321 // │ │ │ │ │ +322 │ │ │ │ │ +324 template │ │ │ │ │ +325 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +326 │ │ │ │ │ +328 template │ │ │ │ │ +329 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +330 │ │ │ │ │ +332 template │ │ │ │ │ +333 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +334 │ │ │ │ │ +336 template │ │ │ │ │ +337 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _F_V_a_r_I_D id) const; │ │ │ │ │ +339 │ │ │ │ │ +340protected: │ │ │ │ │ +342 │ │ │ │ │ +346 │ │ │ │ │ +_3_5_8 _S_u_r_f_a_c_e_F_a_c_t_o_r_y(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e schemeType, │ │ │ │ │ +359 _S_d_c_:_:_O_p_t_i_o_n_s const & schemeOptions, │ │ │ │ │ +360 _O_p_t_i_o_n_s const & limitOptions); │ │ │ │ │ +361 │ │ │ │ │ +_3_6_3 void _s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * cache); │ │ │ │ │ +364 │ │ │ │ │ +_3_6_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y(_S_u_r_f_a_c_e_F_a_c_t_o_r_y const &) = delete; │ │ │ │ │ +_3_6_6 _S_u_r_f_a_c_e_F_a_c_t_o_r_y & _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e_F_a_c_t_o_r_y const &) = delete; │ │ │ │ │ +368 │ │ │ │ │ +369private: │ │ │ │ │ +370 // Supporting internal methods: │ │ │ │ │ +371 void setSubdivisionOptions(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e, _S_d_c_:_:_O_p_t_i_o_n_s const & options); │ │ │ │ │ +372 void setFactoryOptions(_O_p_t_i_o_n_s const & factoryOptions); │ │ │ │ │ +373 │ │ │ │ │ +374 bool faceHasLimitSimple(_I_n_d_e_x faceIndex, int faceSize) const; │ │ │ │ │ +375 │ │ │ │ │ +376 bool faceHasLimitNeighborhood(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +377 bool faceHasLimitNeighborhood(FaceTopology const & faceTopology) const; │ │ │ │ │ +378 │ │ │ │ │ +379 class SurfaceSet; │ │ │ │ │ +380 │ │ │ │ │ +381 bool populateAllSurfaces( _I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) const; │ │ │ │ │ +382 bool populateLinearSurfaces( _I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) const; │ │ │ │ │ +383 bool populateNonLinearSurfaces(_I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) │ │ │ │ │ +const; │ │ │ │ │ +384 │ │ │ │ │ +385 bool initSurfaces(_I_n_d_e_x faceIndex, internal::SurfaceData * vtxSurface, │ │ │ │ │ +386 internal::SurfaceData * varSurface, │ │ │ │ │ +387 internal::SurfaceData * fvarSurfaces, │ │ │ │ │ +388 int fvarCount, │ │ │ │ │ +389 _F_V_a_r_I_D const fvarIDs[]) const; │ │ │ │ │ +390 │ │ │ │ │ +391 // Methods to assemble topology and corresponding indices for entire face: │ │ │ │ │ +392 bool isFaceNeighborhoodRegular(_I_n_d_e_x faceIndex, │ │ │ │ │ +393 _F_V_a_r_I_D const * fvarPtrOrVtx, │ │ │ │ │ +394 _I_n_d_e_x indices[]) const; │ │ │ │ │ +395 │ │ │ │ │ +396 bool initFaceNeighborhoodTopology(_I_n_d_e_x faceIndex, │ │ │ │ │ +397 FaceTopology * topology) const; │ │ │ │ │ +398 │ │ │ │ │ +399 bool gatherFaceNeighborhoodTopology(_I_n_d_e_x faceIndex, │ │ │ │ │ +400 FaceTopology * topology) const; │ │ │ │ │ +401 │ │ │ │ │ +402 int gatherFaceNeighborhoodIndices(_I_n_d_e_x faceIndex, │ │ │ │ │ +403 FaceTopology const & topology, │ │ │ │ │ +404 _F_V_a_r_I_D const * fvarPtrOrVtx, │ │ │ │ │ +405 _I_n_d_e_x indices[]) const; │ │ │ │ │ +406 │ │ │ │ │ +407 // Methods to assemble Surfaces for the different categories of patch: │ │ │ │ │ +408 typedef internal::SurfaceData SurfaceType; │ │ │ │ │ +409 │ │ │ │ │ +410 void assignLinearSurface(SurfaceType * surfacePtr, │ │ │ │ │ +411 _I_n_d_e_x faceIndex, │ │ │ │ │ +412 _F_V_a_r_I_D const * fvarPtrOrVtx) const; │ │ │ │ │ +413 │ │ │ │ │ +414 void assignRegularSurface(SurfaceType * surfacePtr, │ │ │ │ │ +415 _I_n_d_e_x const surfacePatchPoints[]) const; │ │ │ │ │ +416 │ │ │ │ │ +417 void assignRegularSurface(SurfaceType * surfacePtr, │ │ │ │ │ +418 FaceSurface const & surfaceDescription) const; │ │ │ │ │ +419 │ │ │ │ │ +420 void assignIrregularSurface(SurfaceType * surfacePtr, │ │ │ │ │ +421 FaceSurface const & surfaceDescription) const; │ │ │ │ │ +422 │ │ │ │ │ +423 void copyNonLinearSurface(SurfaceType * surfacePtr, │ │ │ │ │ +424 SurfaceType const & surfaceSource, │ │ │ │ │ +425 FaceSurface const & surfaceDescription) const; │ │ │ │ │ +426 │ │ │ │ │ +427private: │ │ │ │ │ +428 // Members describing options and subdivision properties (very little │ │ │ │ │ +429 // memory and low initialization cost) │ │ │ │ │ +430 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _subdivScheme; │ │ │ │ │ +431 _S_d_c_:_:_O_p_t_i_o_n_s _subdivOptions; │ │ │ │ │ +432 _O_p_t_i_o_n_s _factoryOptions; │ │ │ │ │ +433 │ │ │ │ │ +434 // Members related to subdivision topology, options and limit tests: │ │ │ │ │ +435 unsigned int _linearScheme : 1; │ │ │ │ │ +436 unsigned int _linearFVarInterp : 1; │ │ │ │ │ +437 │ │ │ │ │ +438 unsigned int _testNeighborhoodForLimit : 1; │ │ │ │ │ +439 unsigned int _rejectSmoothBoundariesForLimit : 1; │ │ │ │ │ +440 unsigned int _rejectIrregularFacesForLimit : 1; │ │ │ │ │ +441 │ │ │ │ │ +442 int _regFaceSize; │ │ │ │ │ +443 │ │ │ │ │ +444 // Members related to caching: │ │ │ │ │ +445 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e mutable * _topologyCache; │ │ │ │ │ +446}; │ │ │ │ │ +447 │ │ │ │ │ +448// │ │ │ │ │ +449// Inline methods for Options: │ │ │ │ │ +450// │ │ │ │ │ +451inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_4_5_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(_F_V_a_r_I_D id) { │ │ │ │ │ +453 _dfltFVarID = id; │ │ │ │ │ +454 return *this; │ │ │ │ │ +455} │ │ │ │ │ +456inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_4_5_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_n_a_b_l_e_C_a_c_h_i_n_g(bool on) { │ │ │ │ │ +458 _enableCache = on; │ │ │ │ │ +459 return *this; │ │ │ │ │ +460} │ │ │ │ │ +461inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_4_6_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * c) { │ │ │ │ │ +463 _externCache = c; │ │ │ │ │ +464 return *this; │ │ │ │ │ +465} │ │ │ │ │ +466inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_4_6_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h(int level) { │ │ │ │ │ +468 _approxLevelSmooth = (unsigned char) level; │ │ │ │ │ +469 return *this; │ │ │ │ │ +470} │ │ │ │ │ +471inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_4_7_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p(int level) { │ │ │ │ │ +473 _approxLevelSharp = (unsigned char) level; │ │ │ │ │ +474 return *this; │ │ │ │ │ +475} │ │ │ │ │ +476 │ │ │ │ │ +477// │ │ │ │ │ +478// Inline methods to initializes Surfaces: │ │ │ │ │ +479// │ │ │ │ │ +480template │ │ │ │ │ +481inline bool │ │ │ │ │ +_4_8_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const { │ │ │ │ │ +483 │ │ │ │ │ +484 return initSurfaces(face, &s->getSurfaceData(), 0, 0, 0, 0); │ │ │ │ │ +485} │ │ │ │ │ +486template │ │ │ │ │ +487inline bool │ │ │ │ │ +_4_8_8_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const { │ │ │ │ │ +489 │ │ │ │ │ +490 return initSurfaces(face, 0, &s->getSurfaceData(), 0, 0, 0); │ │ │ │ │ +491} │ │ │ │ │ +492template │ │ │ │ │ +493inline bool │ │ │ │ │ +_4_9_4_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s, │ │ │ │ │ +495 _F_V_a_r_I_D fvarID) const { │ │ │ │ │ +496 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &fvarID); │ │ │ │ │ +497} │ │ │ │ │ +498template │ │ │ │ │ +499inline bool │ │ │ │ │ +_5_0_0_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const │ │ │ │ │ +{ │ │ │ │ │ +501 _F_V_a_r_I_D dfltID = _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(); │ │ │ │ │ +502 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &dfltID); │ │ │ │ │ +503} │ │ │ │ │ +504 │ │ │ │ │ +505template │ │ │ │ │ +506inline bool │ │ │ │ │ +_5_0_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_S_u_r_f_a_c_e_s(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * vtxSurface, │ │ │ │ │ +508 _S_u_r_f_a_c_e_<_R_E_A_L_> * fvarSurfaces, _F_V_a_r_I_D const fvarIDs[], int fvarCount, │ │ │ │ │ +509 _S_u_r_f_a_c_e_<_R_E_A_L_> * varSurface) const { │ │ │ │ │ +510 │ │ │ │ │ +511 bool useDfltFVarID = fvarSurfaces && (fvarIDs == 0) && (fvarCount == 0); │ │ │ │ │ +512 _F_V_a_r_I_D dfltFVarID = useDfltFVarID ? _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D() : 0; │ │ │ │ │ +513 │ │ │ │ │ +514 return initSurfaces(faceIndex, │ │ │ │ │ +515 vtxSurface ? &vtxSurface->getSurfaceData() : 0, │ │ │ │ │ +516 varSurface ? &varSurface->getSurfaceData() : 0, │ │ │ │ │ +517 fvarSurfaces ? &fvarSurfaces->getSurfaceData() : 0, │ │ │ │ │ +518 fvarCount ? fvarCount : (fvarSurfaces != 0), │ │ │ │ │ +519 useDfltFVarID ? &dfltFVarID : fvarIDs); │ │ │ │ │ +520} │ │ │ │ │ +521 │ │ │ │ │ +522// │ │ │ │ │ +523// Inline methods to allocate and initialize Surfaces: │ │ │ │ │ +524// │ │ │ │ │ +525template │ │ │ │ │ +526inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ +_5_2_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const { │ │ │ │ │ +528 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ +529 if (InitVertexSurface(faceIndex, s)) return s; │ │ │ │ │ +530 delete s; │ │ │ │ │ +531 return 0; │ │ │ │ │ +532} │ │ │ │ │ +533template │ │ │ │ │ +534inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ +_5_3_5_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const { │ │ │ │ │ +536 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ +537 if (InitVaryingSurface(faceIndex, s)) return s; │ │ │ │ │ +538 delete s; │ │ │ │ │ +539 return 0; │ │ │ │ │ +540} │ │ │ │ │ +541template │ │ │ │ │ +542inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ +_5_4_3_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _F_V_a_r_I_D fvarID) │ │ │ │ │ +const { │ │ │ │ │ +544 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ +545 if (InitFaceVaryingSurface(faceIndex, s, fvarID)) return s; │ │ │ │ │ +546 delete s; │ │ │ │ │ +547 return 0; │ │ │ │ │ +548} │ │ │ │ │ +549template │ │ │ │ │ +550inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ +_5_5_1_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face) const { │ │ │ │ │ +552 _F_V_a_r_I_D dfltID = _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(); │ │ │ │ │ +553 return CreateFaceVaryingSurface(face, dfltID); │ │ │ │ │ +554} │ │ │ │ │ +555 │ │ │ │ │ +556} // end namespace Bfr │ │ │ │ │ +557 │ │ │ │ │ +558} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +559using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +560 │ │ │ │ │ +561} // end namespace OpenSubdiv │ │ │ │ │ +562 │ │ │ │ │ +563#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ -int GetNumFaces() const │ │ │ │ │ -Return the number of faces. │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int GetNumFVarChannels() const │ │ │ │ │ -Return the number of face-varying channels. │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_8_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_:_G_e_t_M_e_s_h │ │ │ │ │ -Far::TopologyRefiner const & GetMesh() const │ │ │ │ │ -Return the instance of the mesh. │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -~RefinerSurfaceFactoryBase() override=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -RefinerSurfaceFactoryBase(Far::TopologyRefiner const &mesh, Options const │ │ │ │ │ -&options) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -Template for concrete subclasses of RefinerSurfaceFactoryBase. │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -~RefinerSurfaceFactory() override=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -RefinerSurfaceFactory(Far::TopologyRefiner const &mesh, Options const │ │ │ │ │ -&options=Options()) │ │ │ │ │ -DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ +SchemeType │ │ │ │ │ +Enumerated type for all subdivision schemes supported by OpenSubdiv. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Simple class defining the 2D parameterization of a face. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e │ │ │ │ │ +Encapsulates the limit surface for a face of a mesh. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_5_9 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_0_3 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ void setInternalCache(SurfaceFactoryCache *cache) │ │ │ │ │ Subclass to identify an internal cache for use by base class. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +~SurfaceFactory() override │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ +bool InitFaceVaryingSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ +Initialize a Surface for the default face-varying data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ +Sdc::Options GetSchemeOptions() const │ │ │ │ │ +Return the set of subdivision options. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_F_a_c_e_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Parameterization GetFaceParameterization(Index faceIndex) const │ │ │ │ │ +Return the Parameterization of a face with a limit surface. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +SurfaceFactory(SurfaceFactory const &)=delete │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_F_a_c_e_H_a_s_L_i_m_i_t_S_u_r_f_a_c_e │ │ │ │ │ +bool FaceHasLimitSurface(Index faceIndex) const │ │ │ │ │ +Return if a specified face has a limit surface. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +SurfaceFactory & operator=(SurfaceFactory const &)=delete │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e │ │ │ │ │ +Surface< REAL > * CreateVertexSurface(Index faceIndex) const │ │ │ │ │ +Construct a Surface for vertex data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ +Surface< REAL > * CreateFaceVaryingSurface(Index faceIndex) const │ │ │ │ │ +Construct a Surface for the default face-varying data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_S_u_r_f_a_c_e_s │ │ │ │ │ +bool InitSurfaces(Index faceIndex, Surface< REAL > *vtxSurface, Surface< REAL > │ │ │ │ │ +*fvarSurfaces, FVarID const fvarIDs[]=0, int fvarCount=0, Surface< REAL > │ │ │ │ │ +*varSurface=0) const │ │ │ │ │ +Initialize multiple Surfaces at once. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ +Sdc::SchemeType GetSchemeType() const │ │ │ │ │ +Return the subdivision scheme. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ +Surface< REAL > * CreateVaryingSurface(Index faceIndex) const │ │ │ │ │ +Construct a Surface for varying data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_3_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e │ │ │ │ │ +bool InitVertexSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ +Initialize a Surface for vertex data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ +bool InitVaryingSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ +Initialize a Surface for varying data. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +SurfaceFactory(Sdc::SchemeType schemeType, Sdc::Options const &schemeOptions, │ │ │ │ │ +Options const &limitOptions) │ │ │ │ │ +Constructor to be used by subclasses. │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ Simple set of options assigned to instances of SurfaceFactory. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int │ │ │ │ │ -faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0 │ │ │ │ │ -Gather face-varying indices of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int │ │ │ │ │ -faceVertex, Index vertexIndices[]) const =0 │ │ │ │ │ -Gather vertex indices of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -virtual int getFaceSize(Index faceIndex) const =0 │ │ │ │ │ -Returns the size of a face (number of vertices) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ +Options & SetExternalCache(SurfaceFactoryCache *c) │ │ │ │ │ +Assign an external cache to override the internal. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_n_a_b_l_e_C_a_c_h_i_n_g │ │ │ │ │ +Options & EnableCaching(bool on) │ │ │ │ │ +Enable or disable caching (default is true): │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h │ │ │ │ │ +Options & SetApproxLevelSmooth(int level) │ │ │ │ │ +Assign maximum refinement level for smooth features. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h │ │ │ │ │ +int GetApproxLevelSmooth() const │ │ │ │ │ +Return maximum refinement level for smooth features. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options() │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_I_s_C_a_c_h_i_n_g_E_n_a_b_l_e_d │ │ │ │ │ +bool IsCachingEnabled() const │ │ │ │ │ +Return if caching is enable. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_3_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D │ │ │ │ │ +Options & SetDefaultFVarID(FVarID id) │ │ │ │ │ +Assign the default face-varying ID (none assigned by default) │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p │ │ │ │ │ +Options & SetApproxLevelSharp(int level) │ │ │ │ │ +Assign maximum refinement level for sharp features. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D │ │ │ │ │ +FVarID GetDefaultFVarID() const │ │ │ │ │ +Return the default face-varying ID. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_2_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p │ │ │ │ │ +int GetApproxLevelSharp() const │ │ │ │ │ +Return maximum refinement level for sharp features. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_4_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_G_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ +SurfaceFactoryCache * GetExternalCache() const │ │ │ │ │ +Return any assigned external cache. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_3_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ +Container used internally by SurfaceFactory to store reusable information. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ +Abstract interface adapting SurfaceFactory to a connected mesh representation. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_5 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_I_n_d_e_x │ │ │ │ │ int Index │ │ │ │ │ Integer type representing a mesh index. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, │ │ │ │ │ -VertexDescriptor *vertexDescriptor) const =0 │ │ │ │ │ -Describe the topology of incident faces around a face-vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ -virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index │ │ │ │ │ -vertexIndices[]) const │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ -virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, │ │ │ │ │ -FVarID fvarID, Index fvarValueIndices[]) const │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_2_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index │ │ │ │ │ -fvarValueIndices[]) const =0 │ │ │ │ │ -Gather the face-varying indices of the face's vertices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ -_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const │ │ │ │ │ -=0 │ │ │ │ │ -Gather the indices of the face's vertices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_i_s_F_a_c_e_H_o_l_e │ │ │ │ │ -virtual bool isFaceHole(Index faceIndex) const =0 │ │ │ │ │ -Returns if a face is a hole. │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_F_V_a_r_I_D │ │ │ │ │ std::intptr_t FVarID │ │ │ │ │ Type used to identify and specify face-varying primvars. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -Simple class used by subclasses of SurfaceFactory to describe a vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_1_3_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -Stores topology data for a specified set of refinement options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ +All supported options applying to subdivision scheme. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00689.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surface.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,33 +90,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surfaceFactory.h File Reference
│ │ │ │ +
surface.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/surface.h"
│ │ │ │ -#include "../bfr/surfaceFactoryMeshAdapter.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include <cstdint>
│ │ │ │ +#include "../bfr/surfaceData.h"
│ │ │ │ +#include "../bfr/parameterization.h"
│ │ │ │ +#include "../vtr/array.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  SurfaceFactory
 Base class providing initialization of a Surface for each face of a mesh. More...
class  Surface< REAL >
 Encapsulates the limit surface for a face of a mesh. More...
 
class  SurfaceFactory::Options
 Simple set of options assigned to instances of SurfaceFactory. More...
struct  Surface< REAL >::PointDescriptor
 Simple struct defining the size and stride of points in arrays. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -125,13 +123,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,30 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -surfaceFactory.h File Reference │ │ │ │ │ +surface.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_._h" │ │ │ │ │ -#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "../bfr/surfaceData.h" │ │ │ │ │ +#include "_._._/_b_f_r_/_p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_a_r_r_a_y_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -  Base class providing initialization of a _S_u_r_f_a_c_e for each face of a │ │ │ │ │ - mesh. _M_o_r_e_._._. │ │ │ │ │ + class   _S_u_r_f_a_c_e_<_ _R_E_A_L_ _> │ │ │ │ │ +  Encapsulates the limit surface for a face of a mesh. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ -  Simple set of options assigned to instances of _S_u_r_f_a_c_e_F_a_c_t_o_r_y. _M_o_r_e_._._. │ │ │ │ │ +struct   _S_u_r_f_a_c_e_<_ _R_E_A_L_ _>_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +  Simple struct defining the size and stride of points in arrays. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00689 = [ │ │ │ │ │ - ["SurfaceFactory", "a00941.html", "a00941"], │ │ │ │ │ - ["Options", "a00945.html", "a00945"] │ │ │ │ │ + ["Surface< REAL >", "a00933.html", "a00933"], │ │ │ │ │ + ["PointDescriptor", "a00937.html", "a00937"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surface.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactory.h
│ │ │ │ +
surface.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,412 +119,358 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_SURFACE_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_SURFACE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../bfr/surface.h"
│ │ │ │ -
31#include "../bfr/surfaceFactoryMeshAdapter.h"
│ │ │ │ -
32#include "../sdc/options.h"
│ │ │ │ -
33#include "../sdc/types.h"
│ │ │ │ -
34
│ │ │ │ -
35#include <cstdint>
│ │ │ │ +
30#include "../bfr/surfaceData.h"
│ │ │ │ +
31#include "../bfr/parameterization.h"
│ │ │ │ +
32#include "../vtr/array.h"
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ -
39
│ │ │ │ -
40namespace Bfr {
│ │ │ │ -
41
│ │ │ │ -
42//
│ │ │ │ -
43// Forward declarations of public and internal classes used by factories:
│ │ │ │ -
44//
│ │ │ │ -
45class SurfaceFactoryCache;
│ │ │ │ -
46class FaceTopology;
│ │ │ │ -
47class FaceSurface;
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
104public:
│ │ │ │ -
│ │ │ │ -
116 class Options {
│ │ │ │ -
117 public:
│ │ │ │ -
│ │ │ │ -
118 Options() : _dfltFVarID(-1), _externCache(0), _enableCache(true),
│ │ │ │ -
119 _approxLevelSmooth(2), _approxLevelSharp(6) { }
│ │ │ │ -
│ │ │ │ -
120
│ │ │ │ - │ │ │ │ -
125 FVarID GetDefaultFVarID() const { return _dfltFVarID; }
│ │ │ │ -
126
│ │ │ │ -
128 Options & EnableCaching(bool on);
│ │ │ │ -
130 bool IsCachingEnabled() const { return _enableCache; }
│ │ │ │ -
131
│ │ │ │ - │ │ │ │ -
135 SurfaceFactoryCache * GetExternalCache() const { return _externCache; }
│ │ │ │ -
136
│ │ │ │ -
137 // Set refinement levels used to approximate the limit surface
│ │ │ │ -
138 // for smooth and sharp features (reasonable defaults assigned):
│ │ │ │ -
140 Options & SetApproxLevelSmooth(int level);
│ │ │ │ -
142 int GetApproxLevelSmooth() const { return _approxLevelSmooth; }
│ │ │ │ -
143
│ │ │ │ -
145 Options & SetApproxLevelSharp(int level);
│ │ │ │ -
147 int GetApproxLevelSharp() const { return _approxLevelSharp; }
│ │ │ │ -
148
│ │ │ │ -
149 private:
│ │ │ │ -
150 // Member variables:
│ │ │ │ -
151 FVarID _dfltFVarID;
│ │ │ │ -
152
│ │ │ │ -
153 SurfaceFactoryCache * _externCache;
│ │ │ │ -
154
│ │ │ │ -
155 unsigned char _enableCache : 1;
│ │ │ │ -
156 unsigned char _approxLevelSmooth;
│ │ │ │ -
157 unsigned char _approxLevelSharp;
│ │ │ │ -
158 };
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ -
160public:
│ │ │ │ -
161 ~SurfaceFactory() override;
│ │ │ │ +
37namespace Bfr {
│ │ │ │ +
38
│ │ │ │ +
58template <typename REAL>
│ │ │ │ +
│ │ │ │ +
59class Surface {
│ │ │ │ +
60public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
65 PointDescriptor(int n) : size(n), stride(n) { }
│ │ │ │ +
66 PointDescriptor(int n, int m) : size(n), stride(m) { }
│ │ │ │ +
67
│ │ │ │ + │ │ │ │ +
69 };
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
72 typedef int Index;
│ │ │ │ +
73
│ │ │ │ +
74public:
│ │ │ │ +
76
│ │ │ │ +
84
│ │ │ │ +
86 bool IsValid() const { return _data.isValid(); }
│ │ │ │ +
87
│ │ │ │ +
89 void Clear() { _data.reinitialize(); }
│ │ │ │ +
90
│ │ │ │ + │ │ │ │ +
93
│ │ │ │ +
94 Surface(Surface const & src) = default;
│ │ │ │ +
95 Surface& operator=(Surface const & src) = default;
│ │ │ │ +
96 ~Surface() = default;
│ │ │ │ +
98
│ │ │ │ +
100
│ │ │ │ +
104
│ │ │ │ +
106 Parameterization GetParameterization() const { return _data.getParam(); }
│ │ │ │ +
107
│ │ │ │ +
109 int GetFaceSize() const { return GetParameterization().GetFaceSize(); }
│ │ │ │ +
110
│ │ │ │ +
112 bool IsRegular() const { return _data.isRegular(); }
│ │ │ │ +
113
│ │ │ │ +
115 bool IsLinear() const { return _data.isLinear(); }
│ │ │ │ +
117
│ │ │ │ +
119
│ │ │ │ +
135
│ │ │ │ +
137 int GetNumControlPoints() const { return _data.getNumCVs(); }
│ │ │ │ +
138
│ │ │ │ +
140 int GetControlPointIndices(Index meshPointIndices[]) const;
│ │ │ │ +
141
│ │ │ │ +
151 template <typename REAL_MESH>
│ │ │ │ +
152 void GatherControlPoints(REAL_MESH const meshPoints[],
│ │ │ │ +
153 PointDescriptor const & meshPointDesc,
│ │ │ │ +
154 REAL controlPoints[],
│ │ │ │ +
155 PointDescriptor const & controlPointDesc) const;
│ │ │ │ +
156
│ │ │ │ +
158 void BoundControlPoints(REAL const controlPoints[],
│ │ │ │ +
159 PointDescriptor const & controlPointDesc,
│ │ │ │ +
160 REAL minExtent[],
│ │ │ │ +
161 REAL maxExtent[]) const;
│ │ │ │
162
│ │ │ │ -
164
│ │ │ │ -
168
│ │ │ │ -
170 Sdc::SchemeType GetSchemeType() const { return _subdivScheme; }
│ │ │ │ +
164 void BoundControlPointsFromMesh(REAL const meshPoints[],
│ │ │ │ +
165 PointDescriptor const & meshPointDesc,
│ │ │ │ +
166 REAL minExtent[],
│ │ │ │ +
167 REAL maxExtent[]) const;
│ │ │ │ +
169
│ │ │ │
171
│ │ │ │ -
173 Sdc::Options GetSchemeOptions() const { return _subdivOptions; }
│ │ │ │ -
175
│ │ │ │ -
176public:
│ │ │ │ -
178
│ │ │ │ -
190
│ │ │ │ -
200 bool FaceHasLimitSurface(Index faceIndex) const;
│ │ │ │ -
201
│ │ │ │ - │ │ │ │ -
210
│ │ │ │ -
211public:
│ │ │ │ -
213
│ │ │ │ -
233
│ │ │ │ -
241 template <typename REAL>
│ │ │ │ -
242 bool InitVertexSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ -
243
│ │ │ │ -
251 template <typename REAL>
│ │ │ │ -
252 bool InitVaryingSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ -
253
│ │ │ │ -
266 template <typename REAL>
│ │ │ │ -
267 bool InitFaceVaryingSurface(Index faceIndex, Surface<REAL> * surface) const;
│ │ │ │ +
177
│ │ │ │ +
179 int GetNumPatchPoints() const;
│ │ │ │ +
180
│ │ │ │ +
199 void PreparePatchPoints(REAL const meshPoints[],
│ │ │ │ +
200 PointDescriptor const & meshPointDesc,
│ │ │ │ +
201 REAL patchPoints[],
│ │ │ │ +
202 PointDescriptor const & patchPointDesc) const;
│ │ │ │ +
203
│ │ │ │ +
213 void ComputePatchPoints(REAL patchPoints[],
│ │ │ │ +
214 PointDescriptor const & patchPointDesc) const;
│ │ │ │ +
216
│ │ │ │ +
218
│ │ │ │ +
225
│ │ │ │ +
227 void Evaluate(REAL const uv[2],
│ │ │ │ +
228 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ +
229 REAL P[]) const;
│ │ │ │ +
230
│ │ │ │ +
232 void Evaluate(REAL const uv[2],
│ │ │ │ +
233 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ +
234 REAL P[], REAL Du[], REAL Dv[]) const;
│ │ │ │ +
235
│ │ │ │ +
237 void Evaluate(REAL const uv[2],
│ │ │ │ +
238 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ +
239 REAL P[], REAL Du[], REAL Dv[],
│ │ │ │ +
240 REAL Duu[], REAL Duv[], REAL Dvv[]) const;
│ │ │ │ +
242
│ │ │ │ +
244
│ │ │ │ +
256
│ │ │ │ +
258 int EvaluateStencil(REAL const uv[2], REAL sP[]) const;
│ │ │ │ +
259
│ │ │ │ +
261 int EvaluateStencil(REAL const uv[2], REAL sP[],
│ │ │ │ +
262 REAL sDu[], REAL sDv[]) const;
│ │ │ │ +
263
│ │ │ │ +
265 int EvaluateStencil(REAL const uv[2], REAL sP[],
│ │ │ │ +
266 REAL sDu[], REAL sDv[],
│ │ │ │ +
267 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const;
│ │ │ │
268
│ │ │ │ -
278 template <typename REAL>
│ │ │ │ -
279 bool InitFaceVaryingSurface(Index faceIndex, Surface<REAL> * surface,
│ │ │ │ -
280 FVarID fvarID) const;
│ │ │ │ -
281
│ │ │ │ -
307 template <typename REAL>
│ │ │ │ -
308 bool InitSurfaces(Index faceIndex, Surface<REAL> * vtxSurface,
│ │ │ │ -
309 Surface<REAL> * fvarSurfaces,
│ │ │ │ -
310 FVarID const fvarIDs[] = 0,
│ │ │ │ -
311 int fvarCount = 0,
│ │ │ │ -
312 Surface<REAL> * varSurface = 0) const;
│ │ │ │ -
314
│ │ │ │ +
270 void ApplyStencil(REAL const stencil[],
│ │ │ │ +
271 REAL const controlPoints[], PointDescriptor const &,
│ │ │ │ +
272 REAL result[]) const;
│ │ │ │ +
273
│ │ │ │ +
275 void ApplyStencilFromMesh(REAL const stencil[],
│ │ │ │ +
276 REAL const meshPoints[], PointDescriptor const &,
│ │ │ │ +
277 REAL result[]) const;
│ │ │ │ +
279
│ │ │ │ +
280private:
│ │ │ │ +
281 // Internal methods for evaluating derivatives, basis weights and
│ │ │ │ +
282 // stencils for regular, irregular and irregular linear patches:
│ │ │ │ + │ │ │ │ +
284
│ │ │ │ +
285 void evaluateDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ +
286 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ +
287 void evalRegularDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ +
288 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ +
289 void evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ +
290 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ +
291 void evalMultiLinearDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ +
292 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ +
293
│ │ │ │ +
294 void evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ +
295 IndexArray evalIrregularBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ +
296 int evalMultiLinearBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ +
297
│ │ │ │ +
298 int evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ +
299 int evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ +
300 int evalIrregularStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ +
301 int evalMultiLinearStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ +
302
│ │ │ │ +
303 // Internal methods to compute patch points:
│ │ │ │ +
304 void computeLinearPatchPoints(REAL p[], PointDescriptor const &) const;
│ │ │ │ +
305 void computeIrregularPatchPoints(REAL p[], PointDescriptor const &) const;
│ │ │ │ +
306
│ │ │ │ +
307 // Internal methods specific to regular or irregular patches:
│ │ │ │ +
308 unsigned char getRegPatchType() const { return _data.getRegPatchType(); }
│ │ │ │ +
309 unsigned char getRegPatchMask() const { return _data.getRegPatchMask(); }
│ │ │ │ +
310
│ │ │ │ +
311 internal::IrregularPatchType const & getIrregPatch() const;
│ │ │ │ +
312
│ │ │ │ +
313private:
│ │ │ │ +
314 // Access to the set of member variables - provided to the Factory:
│ │ │ │ +
315 friend class SurfaceFactory;
│ │ │ │
316
│ │ │ │ -
319 //
│ │ │ │ -
320 // WIP - considering removing these since non-essential
│ │ │ │ -
321 //
│ │ │ │ -
322
│ │ │ │ -
324 template <typename REAL=float>
│ │ │ │ -
325 Surface<REAL> * CreateVertexSurface(Index faceIndex) const;
│ │ │ │ -
326
│ │ │ │ -
328 template <typename REAL=float>
│ │ │ │ -
329 Surface<REAL> * CreateVaryingSurface(Index faceIndex) const;
│ │ │ │ -
330
│ │ │ │ -
332 template <typename REAL=float>
│ │ │ │ - │ │ │ │ -
334
│ │ │ │ -
336 template <typename REAL=float>
│ │ │ │ -
337 Surface<REAL> * CreateFaceVaryingSurface(Index faceIndex, FVarID id) const;
│ │ │ │ -
339
│ │ │ │ -
340protected:
│ │ │ │ +
317 internal::SurfaceData & getSurfaceData() { return _data; }
│ │ │ │ +
318 internal::SurfaceData const & getSurfaceData() const { return _data; }
│ │ │ │ +
319
│ │ │ │ +
320private:
│ │ │ │ +
321 // All member variables encapsulated in a single class:
│ │ │ │ +
322 internal::SurfaceData _data;
│ │ │ │ +
323};
│ │ │ │ +
│ │ │ │ +
324
│ │ │ │ +
325
│ │ │ │ +
326//
│ │ │ │ +
327// Simple inline methods composed of other methods:
│ │ │ │ +
328//
│ │ │ │ +
329template <typename REAL>
│ │ │ │ +
330inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
332 PointDescriptor const & pointDesc) const {
│ │ │ │ +
333
│ │ │ │ +
334 if (!IsRegular()) {
│ │ │ │ +
335 if (IsLinear()) {
│ │ │ │ +
336 computeLinearPatchPoints(points, pointDesc);
│ │ │ │ +
337 } else {
│ │ │ │ +
338 computeIrregularPatchPoints(points, pointDesc);
│ │ │ │ +
339 }
│ │ │ │ +
340 }
│ │ │ │ +
341}
│ │ │ │ +
│ │ │ │
342
│ │ │ │ -
346
│ │ │ │ - │ │ │ │ -
359 Sdc::Options const & schemeOptions,
│ │ │ │ -
360 Options const & limitOptions);
│ │ │ │ -
361
│ │ │ │ - │ │ │ │ -
364
│ │ │ │ - │ │ │ │ - │ │ │ │ -
368
│ │ │ │ -
369private:
│ │ │ │ -
370 // Supporting internal methods:
│ │ │ │ -
371 void setSubdivisionOptions(Sdc::SchemeType, Sdc::Options const & options);
│ │ │ │ -
372 void setFactoryOptions(Options const & factoryOptions);
│ │ │ │ -
373
│ │ │ │ -
374 bool faceHasLimitSimple(Index faceIndex, int faceSize) const;
│ │ │ │ -
375
│ │ │ │ -
376 bool faceHasLimitNeighborhood(Index faceIndex) const;
│ │ │ │ -
377 bool faceHasLimitNeighborhood(FaceTopology const & faceTopology) const;
│ │ │ │ -
378
│ │ │ │ -
379 class SurfaceSet;
│ │ │ │ -
380
│ │ │ │ -
381 bool populateAllSurfaces( Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ -
382 bool populateLinearSurfaces( Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ -
383 bool populateNonLinearSurfaces(Index faceIndex, SurfaceSet * sSetPtr) const;
│ │ │ │ -
384
│ │ │ │ -
385 bool initSurfaces(Index faceIndex, internal::SurfaceData * vtxSurface,
│ │ │ │ -
386 internal::SurfaceData * varSurface,
│ │ │ │ -
387 internal::SurfaceData * fvarSurfaces,
│ │ │ │ -
388 int fvarCount,
│ │ │ │ -
389 FVarID const fvarIDs[]) const;
│ │ │ │ -
390
│ │ │ │ -
391 // Methods to assemble topology and corresponding indices for entire face:
│ │ │ │ -
392 bool isFaceNeighborhoodRegular(Index faceIndex,
│ │ │ │ -
393 FVarID const * fvarPtrOrVtx,
│ │ │ │ -
394 Index indices[]) const;
│ │ │ │ -
395
│ │ │ │ -
396 bool initFaceNeighborhoodTopology(Index faceIndex,
│ │ │ │ -
397 FaceTopology * topology) const;
│ │ │ │ -
398
│ │ │ │ -
399 bool gatherFaceNeighborhoodTopology(Index faceIndex,
│ │ │ │ -
400 FaceTopology * topology) const;
│ │ │ │ +
343template <typename REAL>
│ │ │ │ +
344inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
346 REAL const meshPoints[], PointDescriptor const & meshPointDesc,
│ │ │ │ +
347 REAL patchPoints[], PointDescriptor const & patchPointDesc) const {
│ │ │ │ +
348
│ │ │ │ +
349 GatherControlPoints(meshPoints, meshPointDesc, patchPoints, patchPointDesc);
│ │ │ │ +
350 ComputePatchPoints(patchPoints, patchPointDesc);
│ │ │ │ +
351}
│ │ │ │ +
│ │ │ │ +
352
│ │ │ │ +
353//
│ │ │ │ +
354// Inline invocations of more general methods for derivative overloads:
│ │ │ │ +
355//
│ │ │ │ +
356template <typename REAL>
│ │ │ │ +
357inline void
│ │ │ │ +
358Surface<REAL>::evaluateDerivs(REAL const uv[2],
│ │ │ │ +
359 REAL const patchPoints[],
│ │ │ │ +
360 PointDescriptor const & pointDesc,
│ │ │ │ +
361 REAL * derivatives[]) const {
│ │ │ │ +
362 if (IsRegular()) {
│ │ │ │ +
363 evalRegularDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
364 } else if (IsLinear()) {
│ │ │ │ +
365 evalMultiLinearDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
366 } else {
│ │ │ │ +
367 evalIrregularDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
368 }
│ │ │ │ +
369}
│ │ │ │ +
370template <typename REAL>
│ │ │ │ +
371inline void
│ │ │ │ +
│ │ │ │ +
372Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ +
373 REAL const patchPoints[],
│ │ │ │ +
374 PointDescriptor const & pointDesc,
│ │ │ │ +
375 REAL P[]) const {
│ │ │ │ +
376
│ │ │ │ +
377 REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 };
│ │ │ │ +
378 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
379}
│ │ │ │ +
│ │ │ │ +
380template <typename REAL>
│ │ │ │ +
381inline void
│ │ │ │ +
│ │ │ │ +
382Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ +
383 REAL const patchPoints[],
│ │ │ │ +
384 PointDescriptor const & pointDesc,
│ │ │ │ +
385 REAL P[], REAL Du[], REAL Dv[]) const {
│ │ │ │ +
386
│ │ │ │ +
387 REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 };
│ │ │ │ +
388 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
389}
│ │ │ │ +
│ │ │ │ +
390template <typename REAL>
│ │ │ │ +
391inline void
│ │ │ │ +
│ │ │ │ +
392Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ +
393 REAL const patchPoints[],
│ │ │ │ +
394 PointDescriptor const & pointDesc,
│ │ │ │ +
395 REAL P[], REAL Du[], REAL Dv[],
│ │ │ │ +
396 REAL Duu[], REAL Duv[], REAL Dvv[]) const {
│ │ │ │ +
397
│ │ │ │ +
398 REAL * derivatives[6] = { P, Du, Dv, Duu, Duv, Dvv };
│ │ │ │ +
399 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ +
400}
│ │ │ │ +
│ │ │ │
401
│ │ │ │ -
402 int gatherFaceNeighborhoodIndices(Index faceIndex,
│ │ │ │ -
403 FaceTopology const & topology,
│ │ │ │ -
404 FVarID const * fvarPtrOrVtx,
│ │ │ │ -
405 Index indices[]) const;
│ │ │ │ -
406
│ │ │ │ -
407 // Methods to assemble Surfaces for the different categories of patch:
│ │ │ │ -
408 typedef internal::SurfaceData SurfaceType;
│ │ │ │ -
409
│ │ │ │ -
410 void assignLinearSurface(SurfaceType * surfacePtr,
│ │ │ │ -
411 Index faceIndex,
│ │ │ │ -
412 FVarID const * fvarPtrOrVtx) const;
│ │ │ │ -
413
│ │ │ │ -
414 void assignRegularSurface(SurfaceType * surfacePtr,
│ │ │ │ -
415 Index const surfacePatchPoints[]) const;
│ │ │ │ -
416
│ │ │ │ -
417 void assignRegularSurface(SurfaceType * surfacePtr,
│ │ │ │ -
418 FaceSurface const & surfaceDescription) const;
│ │ │ │ -
419
│ │ │ │ -
420 void assignIrregularSurface(SurfaceType * surfacePtr,
│ │ │ │ -
421 FaceSurface const & surfaceDescription) const;
│ │ │ │ -
422
│ │ │ │ -
423 void copyNonLinearSurface(SurfaceType * surfacePtr,
│ │ │ │ -
424 SurfaceType const & surfaceSource,
│ │ │ │ -
425 FaceSurface const & surfaceDescription) const;
│ │ │ │ -
426
│ │ │ │ -
427private:
│ │ │ │ -
428 // Members describing options and subdivision properties (very little
│ │ │ │ -
429 // memory and low initialization cost)
│ │ │ │ -
430 Sdc::SchemeType _subdivScheme;
│ │ │ │ -
431 Sdc::Options _subdivOptions;
│ │ │ │ -
432 Options _factoryOptions;
│ │ │ │ -
433
│ │ │ │ -
434 // Members related to subdivision topology, options and limit tests:
│ │ │ │ -
435 unsigned int _linearScheme : 1;
│ │ │ │ -
436 unsigned int _linearFVarInterp : 1;
│ │ │ │ -
437
│ │ │ │ -
438 unsigned int _testNeighborhoodForLimit : 1;
│ │ │ │ -
439 unsigned int _rejectSmoothBoundariesForLimit : 1;
│ │ │ │ -
440 unsigned int _rejectIrregularFacesForLimit : 1;
│ │ │ │ -
441
│ │ │ │ -
442 int _regFaceSize;
│ │ │ │ +
402template <typename REAL>
│ │ │ │ +
403inline int
│ │ │ │ +
404Surface<REAL>::evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const {
│ │ │ │ +
405
│ │ │ │ +
406 if (IsRegular()) {
│ │ │ │ +
407 return evalRegularStencils(uv, sDeriv);
│ │ │ │ +
408 } else if (IsLinear()) {
│ │ │ │ +
409 return evalMultiLinearStencils(uv, sDeriv);
│ │ │ │ +
410 } else {
│ │ │ │ +
411 return evalIrregularStencils(uv, sDeriv);
│ │ │ │ +
412 }
│ │ │ │ +
413}
│ │ │ │ +
414template <typename REAL>
│ │ │ │ +
415inline int
│ │ │ │ +
│ │ │ │ +
416Surface<REAL>::EvaluateStencil(REAL const uv[2], REAL sP[]) const {
│ │ │ │ +
417
│ │ │ │ +
418 REAL * derivativeStencils[6] = { sP, 0, 0, 0, 0, 0 };
│ │ │ │ +
419 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ +
420}
│ │ │ │ +
│ │ │ │ +
421template <typename REAL>
│ │ │ │ +
422inline int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
424 REAL sP[], REAL sDu[], REAL sDv[]) const {
│ │ │ │ +
425
│ │ │ │ +
426 REAL * derivativeStencils[6] = { sP, sDu, sDv, 0, 0, 0 };
│ │ │ │ +
427 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ +
428}
│ │ │ │ +
│ │ │ │ +
429template <typename REAL>
│ │ │ │ +
430inline int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
432 REAL sP[], REAL sDu[], REAL sDv[],
│ │ │ │ +
433 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const {
│ │ │ │ +
434
│ │ │ │ +
435 REAL * derivativeStencils[6] = { sP, sDu, sDv, sDuu, sDuv, sDvv };
│ │ │ │ +
436 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ +
437}
│ │ │ │ +
│ │ │ │ +
438
│ │ │ │ +
439} // end namespace Bfr
│ │ │ │ +
440
│ │ │ │ +
441} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
442using namespace OPENSUBDIV_VERSION;
│ │ │ │
443
│ │ │ │ -
444 // Members related to caching:
│ │ │ │ -
445 SurfaceFactoryCache mutable * _topologyCache;
│ │ │ │ -
446};
│ │ │ │ -
│ │ │ │ -
447
│ │ │ │ -
448//
│ │ │ │ -
449// Inline methods for Options:
│ │ │ │ -
450//
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
453 _dfltFVarID = id;
│ │ │ │ -
454 return *this;
│ │ │ │ -
455}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
458 _enableCache = on;
│ │ │ │ -
459 return *this;
│ │ │ │ -
460}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
463 _externCache = c;
│ │ │ │ -
464 return *this;
│ │ │ │ -
465}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
468 _approxLevelSmooth = (unsigned char) level;
│ │ │ │ -
469 return *this;
│ │ │ │ -
470}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
473 _approxLevelSharp = (unsigned char) level;
│ │ │ │ -
474 return *this;
│ │ │ │ -
475}
│ │ │ │ -
│ │ │ │ -
476
│ │ │ │ -
477//
│ │ │ │ -
478// Inline methods to initializes Surfaces:
│ │ │ │ -
479//
│ │ │ │ -
480template <typename REAL>
│ │ │ │ -
481inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
483
│ │ │ │ -
484 return initSurfaces(face, &s->getSurfaceData(), 0, 0, 0, 0);
│ │ │ │ -
485}
│ │ │ │ -
│ │ │ │ -
486template <typename REAL>
│ │ │ │ -
487inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
489
│ │ │ │ -
490 return initSurfaces(face, 0, &s->getSurfaceData(), 0, 0, 0);
│ │ │ │ -
491}
│ │ │ │ -
│ │ │ │ -
492template <typename REAL>
│ │ │ │ -
493inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
495 FVarID fvarID) const {
│ │ │ │ -
496 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &fvarID);
│ │ │ │ -
497}
│ │ │ │ -
│ │ │ │ -
498template <typename REAL>
│ │ │ │ -
499inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
501 FVarID dfltID = _factoryOptions.GetDefaultFVarID();
│ │ │ │ -
502 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &dfltID);
│ │ │ │ -
503}
│ │ │ │ -
│ │ │ │ -
504
│ │ │ │ -
505template <typename REAL>
│ │ │ │ -
506inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
508 Surface<REAL> * fvarSurfaces, FVarID const fvarIDs[], int fvarCount,
│ │ │ │ -
509 Surface<REAL> * varSurface) const {
│ │ │ │ -
510
│ │ │ │ -
511 bool useDfltFVarID = fvarSurfaces && (fvarIDs == 0) && (fvarCount == 0);
│ │ │ │ -
512 FVarID dfltFVarID = useDfltFVarID ? _factoryOptions.GetDefaultFVarID() : 0;
│ │ │ │ -
513
│ │ │ │ -
514 return initSurfaces(faceIndex,
│ │ │ │ -
515 vtxSurface ? &vtxSurface->getSurfaceData() : 0,
│ │ │ │ -
516 varSurface ? &varSurface->getSurfaceData() : 0,
│ │ │ │ -
517 fvarSurfaces ? &fvarSurfaces->getSurfaceData() : 0,
│ │ │ │ -
518 fvarCount ? fvarCount : (fvarSurfaces != 0),
│ │ │ │ -
519 useDfltFVarID ? &dfltFVarID : fvarIDs);
│ │ │ │ -
520}
│ │ │ │ -
│ │ │ │ -
521
│ │ │ │ -
522//
│ │ │ │ -
523// Inline methods to allocate and initialize Surfaces:
│ │ │ │ -
524//
│ │ │ │ -
525template <typename REAL>
│ │ │ │ -
526inline Surface<REAL> *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
528 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ -
529 if (InitVertexSurface<REAL>(faceIndex, s)) return s;
│ │ │ │ -
530 delete s;
│ │ │ │ -
531 return 0;
│ │ │ │ -
532}
│ │ │ │ -
│ │ │ │ -
533template <typename REAL>
│ │ │ │ -
534inline Surface<REAL> *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
536 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ -
537 if (InitVaryingSurface<REAL>(faceIndex, s)) return s;
│ │ │ │ -
538 delete s;
│ │ │ │ -
539 return 0;
│ │ │ │ -
540}
│ │ │ │ -
│ │ │ │ -
541template <typename REAL>
│ │ │ │ -
542inline Surface<REAL> *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
544 Surface<REAL> * s = new Surface<REAL>();
│ │ │ │ -
545 if (InitFaceVaryingSurface<REAL>(faceIndex, s, fvarID)) return s;
│ │ │ │ -
546 delete s;
│ │ │ │ -
547 return 0;
│ │ │ │ -
548}
│ │ │ │ -
│ │ │ │ -
549template <typename REAL>
│ │ │ │ -
550inline Surface<REAL> *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
552 FVarID dfltID = _factoryOptions.GetDefaultFVarID();
│ │ │ │ -
553 return CreateFaceVaryingSurface<REAL>(face, dfltID);
│ │ │ │ -
554}
│ │ │ │ -
│ │ │ │ -
555
│ │ │ │ -
556} // end namespace Bfr
│ │ │ │ -
557
│ │ │ │ -
558} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
559using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
560
│ │ │ │ -
561} // end namespace OpenSubdiv
│ │ │ │ -
562
│ │ │ │ -
563#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_H */
│ │ │ │ - │ │ │ │ -
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ -
Simple class defining the 2D parameterization of a face.
│ │ │ │ -
Encapsulates the limit surface for a face of a mesh.
Definition surface.h:59
│ │ │ │ -
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ -
void setInternalCache(SurfaceFactoryCache *cache)
Subclass to identify an internal cache for use by base class.
│ │ │ │ - │ │ │ │ -
bool InitFaceVaryingSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for the default face-varying data.
│ │ │ │ -
Sdc::Options GetSchemeOptions() const
Return the set of subdivision options.
│ │ │ │ -
Parameterization GetFaceParameterization(Index faceIndex) const
Return the Parameterization of a face with a limit surface.
│ │ │ │ -
SurfaceFactory(SurfaceFactory const &)=delete
│ │ │ │ -
bool FaceHasLimitSurface(Index faceIndex) const
Return if a specified face has a limit surface.
│ │ │ │ -
SurfaceFactory & operator=(SurfaceFactory const &)=delete
│ │ │ │ -
Surface< REAL > * CreateVertexSurface(Index faceIndex) const
Construct a Surface for vertex data.
│ │ │ │ -
Surface< REAL > * CreateFaceVaryingSurface(Index faceIndex) const
Construct a Surface for the default face-varying data.
│ │ │ │ -
bool InitSurfaces(Index faceIndex, Surface< REAL > *vtxSurface, Surface< REAL > *fvarSurfaces, FVarID const fvarIDs[]=0, int fvarCount=0, Surface< REAL > *varSurface=0) const
Initialize multiple Surfaces at once.
│ │ │ │ -
Sdc::SchemeType GetSchemeType() const
Return the subdivision scheme.
│ │ │ │ -
Surface< REAL > * CreateVaryingSurface(Index faceIndex) const
Construct a Surface for varying data.
│ │ │ │ -
bool InitVertexSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for vertex data.
│ │ │ │ -
bool InitVaryingSurface(Index faceIndex, Surface< REAL > *surface) const
Initialize a Surface for varying data.
│ │ │ │ -
SurfaceFactory(Sdc::SchemeType schemeType, Sdc::Options const &schemeOptions, Options const &limitOptions)
Constructor to be used by subclasses.
│ │ │ │ -
Simple set of options assigned to instances of SurfaceFactory.
│ │ │ │ -
Options & SetExternalCache(SurfaceFactoryCache *c)
Assign an external cache to override the internal.
│ │ │ │ -
Options & EnableCaching(bool on)
Enable or disable caching (default is true):
│ │ │ │ -
Options & SetApproxLevelSmooth(int level)
Assign maximum refinement level for smooth features.
│ │ │ │ -
int GetApproxLevelSmooth() const
Return maximum refinement level for smooth features.
│ │ │ │ - │ │ │ │ -
bool IsCachingEnabled() const
Return if caching is enable.
│ │ │ │ -
Options & SetDefaultFVarID(FVarID id)
Assign the default face-varying ID (none assigned by default)
│ │ │ │ -
Options & SetApproxLevelSharp(int level)
Assign maximum refinement level for sharp features.
│ │ │ │ -
FVarID GetDefaultFVarID() const
Return the default face-varying ID.
│ │ │ │ -
int GetApproxLevelSharp() const
Return maximum refinement level for sharp features.
│ │ │ │ -
SurfaceFactoryCache * GetExternalCache() const
Return any assigned external cache.
│ │ │ │ -
Container used internally by SurfaceFactory to store reusable information.
│ │ │ │ -
Abstract interface adapting SurfaceFactory to a connected mesh representation.
│ │ │ │ - │ │ │ │ -
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ -
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ +
444} // end namespace OpenSubdiv
│ │ │ │ +
445
│ │ │ │ +
446#endif /* OPENSUBDIV3_BFR_SURFACE */
│ │ │ │ + │ │ │ │ +
Simple class defining the 2D parameterization of a face.
│ │ │ │ +
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │ +
Encapsulates the limit surface for a face of a mesh.
Definition surface.h:59
│ │ │ │ +
int GetNumControlPoints() const
Return the number of control points affecting the Surface.
Definition surface.h:137
│ │ │ │ +
void Evaluate(REAL const uv[2], REAL const patchPoints[], PointDescriptor const &pointDesc, REAL P[]) const
Evaluation of position.
Definition surface.h:372
│ │ │ │ +
int GetFaceSize() const
Return the size of the face.
Definition surface.h:109
│ │ │ │ +
bool IsRegular() const
Return if the Surface is a single regular patch.
Definition surface.h:112
│ │ │ │ +
void BoundControlPoints(REAL const controlPoints[], PointDescriptor const &controlPointDesc, REAL minExtent[], REAL maxExtent[]) const
Compute bounds of control points from a local array.
│ │ │ │ +
int GetControlPointIndices(Index meshPointIndices[]) const
Identify indices of control points in the mesh.
│ │ │ │ +
int Index
Integer type representing a mesh index.
Definition surface.h:72
│ │ │ │ +
void ApplyStencil(REAL const stencil[], REAL const controlPoints[], PointDescriptor const &, REAL result[]) const
Apply a single stencil to control points from a local array.
│ │ │ │ +
Parameterization GetParameterization() const
Return the Parameterization.
Definition surface.h:106
│ │ │ │ +
Surface()
Default construction produces an invalid instance.
│ │ │ │ +
void ApplyStencilFromMesh(REAL const stencil[], REAL const meshPoints[], PointDescriptor const &, REAL result[]) const
Apply a single stencil to control points from the mesh data.
│ │ │ │ +
Surface & operator=(Surface const &src)=default
│ │ │ │ +
void BoundControlPointsFromMesh(REAL const meshPoints[], PointDescriptor const &meshPointDesc, REAL minExtent[], REAL maxExtent[]) const
Compute bounds of control points from the mesh data.
│ │ │ │ + │ │ │ │ +
void Clear()
Clear a previously initialized Surface.
Definition surface.h:89
│ │ │ │ + │ │ │ │ +
void PreparePatchPoints(REAL const meshPoints[], PointDescriptor const &meshPointDesc, REAL patchPoints[], PointDescriptor const &patchPointDesc) const
Prepare patch points in a local array for evaluation.
Definition surface.h:345
│ │ │ │ +
bool IsValid() const
Return true if successfully initialized.
Definition surface.h:86
│ │ │ │ +
void GatherControlPoints(REAL_MESH const meshPoints[], PointDescriptor const &meshPointDesc, REAL controlPoints[], PointDescriptor const &controlPointDesc) const
Gather control points in a local array.
│ │ │ │ +
void ComputePatchPoints(REAL patchPoints[], PointDescriptor const &patchPointDesc) const
Compute all patch points following the control points.
Definition surface.h:331
│ │ │ │ +
bool IsLinear() const
Return if the Surface is linear.
Definition surface.h:115
│ │ │ │ +
int GetNumPatchPoints() const
Return the number of patch points representing the Surface.
│ │ │ │ +
int EvaluateStencil(REAL const uv[2], REAL sP[]) const
Evaluation of the limit stencil for position.
Definition surface.h:416
│ │ │ │ +
Simple struct defining the size and stride of points in arrays.
Definition surface.h:63
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surfaceFactory.h │ │ │ │ │ +surface.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,476 +24,420 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../bfr/surface.h" │ │ │ │ │ -31#include "../bfr/surfaceFactoryMeshAdapter.h" │ │ │ │ │ -32#include "../sdc/options.h" │ │ │ │ │ -33#include "../sdc/types.h" │ │ │ │ │ -34 │ │ │ │ │ -35#include │ │ │ │ │ +30#include "../bfr/surfaceData.h" │ │ │ │ │ +31#include "../bfr/parameterization.h" │ │ │ │ │ +32#include "../vtr/array.h" │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ 36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ -39 │ │ │ │ │ -40namespace Bfr { │ │ │ │ │ -41 │ │ │ │ │ -42// │ │ │ │ │ -43// Forward declarations of public and internal classes used by factories: │ │ │ │ │ -44// │ │ │ │ │ -45class SurfaceFactoryCache; │ │ │ │ │ -46class FaceTopology; │ │ │ │ │ -47class FaceSurface; │ │ │ │ │ -48 │ │ │ │ │ -_1_0_3class _S_u_r_f_a_c_e_F_a_c_t_o_r_y : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r { │ │ │ │ │ -104public: │ │ │ │ │ -_1_1_6 class _O_p_t_i_o_n_s { │ │ │ │ │ -117 public: │ │ │ │ │ -_1_1_8 _O_p_t_i_o_n_s() : _dfltFVarID(-1), _externCache(0), _enableCache(true), │ │ │ │ │ -119 _approxLevelSmooth(2), _approxLevelSharp(6) { } │ │ │ │ │ -120 │ │ │ │ │ -123 _O_p_t_i_o_n_s & _S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(_F_V_a_r_I_D id); │ │ │ │ │ -_1_2_5 _F_V_a_r_I_D _G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D() const { return _dfltFVarID; } │ │ │ │ │ -126 │ │ │ │ │ -128 _O_p_t_i_o_n_s & _E_n_a_b_l_e_C_a_c_h_i_n_g(bool on); │ │ │ │ │ -_1_3_0 bool _I_s_C_a_c_h_i_n_g_E_n_a_b_l_e_d() const { return _enableCache; } │ │ │ │ │ -131 │ │ │ │ │ -133 _O_p_t_i_o_n_s & _S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * c); │ │ │ │ │ -_1_3_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * _G_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e() const { return _externCache; } │ │ │ │ │ -136 │ │ │ │ │ -137 // Set refinement levels used to approximate the limit surface │ │ │ │ │ -138 // for smooth and sharp features (reasonable defaults assigned): │ │ │ │ │ -140 _O_p_t_i_o_n_s & _S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h(int level); │ │ │ │ │ -_1_4_2 int _G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h() const { return _approxLevelSmooth; } │ │ │ │ │ -143 │ │ │ │ │ -145 _O_p_t_i_o_n_s & _S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p(int level); │ │ │ │ │ -_1_4_7 int _G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p() const { return _approxLevelSharp; } │ │ │ │ │ -148 │ │ │ │ │ -149 private: │ │ │ │ │ -150 // Member variables: │ │ │ │ │ -151 _F_V_a_r_I_D _dfltFVarID; │ │ │ │ │ -152 │ │ │ │ │ -153 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * _externCache; │ │ │ │ │ -154 │ │ │ │ │ -155 unsigned char _enableCache : 1; │ │ │ │ │ -156 unsigned char _approxLevelSmooth; │ │ │ │ │ -157 unsigned char _approxLevelSharp; │ │ │ │ │ -158 }; │ │ │ │ │ -159 │ │ │ │ │ -160public: │ │ │ │ │ -_1_6_1 _~_S_u_r_f_a_c_e_F_a_c_t_o_r_y() override; │ │ │ │ │ +37namespace Bfr { │ │ │ │ │ +38 │ │ │ │ │ +58template │ │ │ │ │ +_5_9class _S_u_r_f_a_c_e { │ │ │ │ │ +60public: │ │ │ │ │ +_6_3 struct _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ +_6_4 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r() : _s_i_z_e(0), _s_t_r_i_d_e(0) { } │ │ │ │ │ +_6_5 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r(int n) : _s_i_z_e(n), _s_t_r_i_d_e(n) { } │ │ │ │ │ +_6_6 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r(int n, int m) : _s_i_z_e(n), _s_t_r_i_d_e(m) { } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 int _s_i_z_e, _s_t_r_i_d_e; │ │ │ │ │ +69 }; │ │ │ │ │ +70 │ │ │ │ │ +_7_2 typedef int _I_n_d_e_x; │ │ │ │ │ +73 │ │ │ │ │ +74public: │ │ │ │ │ +76 │ │ │ │ │ +84 │ │ │ │ │ +_8_6 bool _I_s_V_a_l_i_d() const { return _data.isValid(); } │ │ │ │ │ +87 │ │ │ │ │ +_8_9 void _C_l_e_a_r() { _data.reinitialize(); } │ │ │ │ │ +90 │ │ │ │ │ +_9_2 _S_u_r_f_a_c_e(); │ │ │ │ │ +93 │ │ │ │ │ +_9_4 _S_u_r_f_a_c_e(_S_u_r_f_a_c_e const & src) = default; │ │ │ │ │ +_9_5 _S_u_r_f_a_c_e& _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e const & src) = default; │ │ │ │ │ +_9_6 _~_S_u_r_f_a_c_e() = default; │ │ │ │ │ +98 │ │ │ │ │ +100 │ │ │ │ │ +104 │ │ │ │ │ +_1_0_6 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() const { return _data.getParam(); } │ │ │ │ │ +107 │ │ │ │ │ +_1_0_9 int _G_e_t_F_a_c_e_S_i_z_e() const { return _G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n()._G_e_t_F_a_c_e_S_i_z_e(); } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_2 bool _I_s_R_e_g_u_l_a_r() const { return _data.isRegular(); } │ │ │ │ │ +113 │ │ │ │ │ +_1_1_5 bool _I_s_L_i_n_e_a_r() const { return _data.isLinear(); } │ │ │ │ │ +117 │ │ │ │ │ +119 │ │ │ │ │ +135 │ │ │ │ │ +_1_3_7 int _G_e_t_N_u_m_C_o_n_t_r_o_l_P_o_i_n_t_s() const { return _data.getNumCVs(); } │ │ │ │ │ +138 │ │ │ │ │ +_1_4_0 int _G_e_t_C_o_n_t_r_o_l_P_o_i_n_t_I_n_d_i_c_e_s(_I_n_d_e_x meshPointIndices[]) const; │ │ │ │ │ +141 │ │ │ │ │ +151 template │ │ │ │ │ +_1_5_2 void _G_a_t_h_e_r_C_o_n_t_r_o_l_P_o_i_n_t_s(REAL_MESH const meshPoints[], │ │ │ │ │ +153 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ +154 REAL controlPoints[], │ │ │ │ │ +155 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & controlPointDesc) const; │ │ │ │ │ +156 │ │ │ │ │ +_1_5_8 void _B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s(REAL const controlPoints[], │ │ │ │ │ +159 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & controlPointDesc, │ │ │ │ │ +160 REAL minExtent[], │ │ │ │ │ +161 REAL maxExtent[]) const; │ │ │ │ │ 162 │ │ │ │ │ -164 │ │ │ │ │ -168 │ │ │ │ │ -_1_7_0 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _G_e_t_S_c_h_e_m_e_T_y_p_e() const { return _subdivScheme; } │ │ │ │ │ +_1_6_4 void _B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s_F_r_o_m_M_e_s_h(REAL const meshPoints[], │ │ │ │ │ +165 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ +166 REAL minExtent[], │ │ │ │ │ +167 REAL maxExtent[]) const; │ │ │ │ │ +169 │ │ │ │ │ 171 │ │ │ │ │ -_1_7_3 _S_d_c_:_:_O_p_t_i_o_n_s _G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s() const { return _subdivOptions; } │ │ │ │ │ -175 │ │ │ │ │ -176public: │ │ │ │ │ -178 │ │ │ │ │ -190 │ │ │ │ │ -_2_0_0 bool _F_a_c_e_H_a_s_L_i_m_i_t_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -201 │ │ │ │ │ -_2_0_8 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _G_e_t_F_a_c_e_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -210 │ │ │ │ │ -211public: │ │ │ │ │ -213 │ │ │ │ │ -233 │ │ │ │ │ -241 template │ │ │ │ │ -242 bool _I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) const; │ │ │ │ │ -243 │ │ │ │ │ -251 template │ │ │ │ │ -252 bool _I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) const; │ │ │ │ │ -253 │ │ │ │ │ -266 template │ │ │ │ │ -267 bool _I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface) │ │ │ │ │ -const; │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 int _G_e_t_N_u_m_P_a_t_c_h_P_o_i_n_t_s() const; │ │ │ │ │ +180 │ │ │ │ │ +199 void _P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s(REAL const meshPoints[], │ │ │ │ │ +200 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ +201 REAL patchPoints[], │ │ │ │ │ +202 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const; │ │ │ │ │ +203 │ │ │ │ │ +213 void _C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s(REAL patchPoints[], │ │ │ │ │ +214 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const; │ │ │ │ │ +216 │ │ │ │ │ +218 │ │ │ │ │ +225 │ │ │ │ │ +227 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +228 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +229 REAL P[]) const; │ │ │ │ │ +230 │ │ │ │ │ +232 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +233 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +234 REAL P[], REAL Du[], REAL Dv[]) const; │ │ │ │ │ +235 │ │ │ │ │ +237 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +238 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +239 REAL P[], REAL Du[], REAL Dv[], │ │ │ │ │ +240 REAL Duu[], REAL Duv[], REAL Dvv[]) const; │ │ │ │ │ +242 │ │ │ │ │ +244 │ │ │ │ │ +256 │ │ │ │ │ +258 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[]) const; │ │ │ │ │ +259 │ │ │ │ │ +261 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[], │ │ │ │ │ +262 REAL sDu[], REAL sDv[]) const; │ │ │ │ │ +263 │ │ │ │ │ +265 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[], │ │ │ │ │ +266 REAL sDu[], REAL sDv[], │ │ │ │ │ +267 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const; │ │ │ │ │ 268 │ │ │ │ │ -278 template │ │ │ │ │ -279 bool _I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * surface, │ │ │ │ │ -280 _F_V_a_r_I_D fvarID) const; │ │ │ │ │ -281 │ │ │ │ │ -307 template │ │ │ │ │ -308 bool _I_n_i_t_S_u_r_f_a_c_e_s(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * vtxSurface, │ │ │ │ │ -309 _S_u_r_f_a_c_e_<_R_E_A_L_> * fvarSurfaces, │ │ │ │ │ -310 _F_V_a_r_I_D const fvarIDs[] = 0, │ │ │ │ │ -311 int fvarCount = 0, │ │ │ │ │ -312 _S_u_r_f_a_c_e_<_R_E_A_L_> * varSurface = 0) const; │ │ │ │ │ -314 │ │ │ │ │ +_2_7_0 void _A_p_p_l_y_S_t_e_n_c_i_l(REAL const stencil[], │ │ │ │ │ +271 REAL const controlPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, │ │ │ │ │ +272 REAL result[]) const; │ │ │ │ │ +273 │ │ │ │ │ +_2_7_5 void _A_p_p_l_y_S_t_e_n_c_i_l_F_r_o_m_M_e_s_h(REAL const stencil[], │ │ │ │ │ +276 REAL const meshPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, │ │ │ │ │ +277 REAL result[]) const; │ │ │ │ │ +279 │ │ │ │ │ +280private: │ │ │ │ │ +281 // Internal methods for evaluating derivatives, basis weights and │ │ │ │ │ +282 // stencils for regular, irregular and irregular linear patches: │ │ │ │ │ +283 typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_i_n_t_> _I_n_d_e_x_A_r_r_a_y; │ │ │ │ │ +284 │ │ │ │ │ +285 void evaluateDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ +286 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ +287 void evalRegularDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ +288 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ +289 void evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ +290 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ +291 void evalMultiLinearDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ +292 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ +293 │ │ │ │ │ +294 void evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ +295 _I_n_d_e_x_A_r_r_a_y evalIrregularBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ +296 int evalMultiLinearBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ +297 │ │ │ │ │ +298 int evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ +299 int evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ +300 int evalIrregularStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ +301 int evalMultiLinearStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ +302 │ │ │ │ │ +303 // Internal methods to compute patch points: │ │ │ │ │ +304 void computeLinearPatchPoints(REAL p[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &) const; │ │ │ │ │ +305 void computeIrregularPatchPoints(REAL p[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &) const; │ │ │ │ │ +306 │ │ │ │ │ +307 // Internal methods specific to regular or irregular patches: │ │ │ │ │ +308 unsigned char getRegPatchType() const { return _data.getRegPatchType(); } │ │ │ │ │ +309 unsigned char getRegPatchMask() const { return _data.getRegPatchMask(); } │ │ │ │ │ +310 │ │ │ │ │ +311 internal::IrregularPatchType const & getIrregPatch() const; │ │ │ │ │ +312 │ │ │ │ │ +313private: │ │ │ │ │ +314 // Access to the set of member variables - provided to the Factory: │ │ │ │ │ +_3_1_5 friend class _S_u_r_f_a_c_e_F_a_c_t_o_r_y; │ │ │ │ │ 316 │ │ │ │ │ -319 // │ │ │ │ │ -320 // WIP - considering removing these since non-essential │ │ │ │ │ -321 // │ │ │ │ │ -322 │ │ │ │ │ -324 template │ │ │ │ │ -325 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -326 │ │ │ │ │ -328 template │ │ │ │ │ -329 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -330 │ │ │ │ │ -332 template │ │ │ │ │ -333 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -334 │ │ │ │ │ -336 template │ │ │ │ │ -337 _S_u_r_f_a_c_e_<_R_E_A_L_> * _C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _F_V_a_r_I_D id) const; │ │ │ │ │ -339 │ │ │ │ │ -340protected: │ │ │ │ │ +317 internal::SurfaceData & getSurfaceData() { return _data; } │ │ │ │ │ +318 internal::SurfaceData const & getSurfaceData() const { return _data; } │ │ │ │ │ +319 │ │ │ │ │ +320private: │ │ │ │ │ +321 // All member variables encapsulated in a single class: │ │ │ │ │ +322 internal::SurfaceData _data; │ │ │ │ │ +323}; │ │ │ │ │ +324 │ │ │ │ │ +325 │ │ │ │ │ +326// │ │ │ │ │ +327// Simple inline methods composed of other methods: │ │ │ │ │ +328// │ │ │ │ │ +329template │ │ │ │ │ +330inline void │ │ │ │ │ +_3_3_1_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s(REAL points[], │ │ │ │ │ +332 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc) const { │ │ │ │ │ +333 │ │ │ │ │ +334 if (!IsRegular()) { │ │ │ │ │ +335 if (IsLinear()) { │ │ │ │ │ +336 computeLinearPatchPoints(points, pointDesc); │ │ │ │ │ +337 } else { │ │ │ │ │ +338 computeIrregularPatchPoints(points, pointDesc); │ │ │ │ │ +339 } │ │ │ │ │ +340 } │ │ │ │ │ +341} │ │ │ │ │ 342 │ │ │ │ │ -346 │ │ │ │ │ -_3_5_8 _S_u_r_f_a_c_e_F_a_c_t_o_r_y(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e schemeType, │ │ │ │ │ -359 _S_d_c_:_:_O_p_t_i_o_n_s const & schemeOptions, │ │ │ │ │ -360 _O_p_t_i_o_n_s const & limitOptions); │ │ │ │ │ -361 │ │ │ │ │ -_3_6_3 void _s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * cache); │ │ │ │ │ -364 │ │ │ │ │ -_3_6_5 _S_u_r_f_a_c_e_F_a_c_t_o_r_y(_S_u_r_f_a_c_e_F_a_c_t_o_r_y const &) = delete; │ │ │ │ │ -_3_6_6 _S_u_r_f_a_c_e_F_a_c_t_o_r_y & _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e_F_a_c_t_o_r_y const &) = delete; │ │ │ │ │ -368 │ │ │ │ │ -369private: │ │ │ │ │ -370 // Supporting internal methods: │ │ │ │ │ -371 void setSubdivisionOptions(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e, _S_d_c_:_:_O_p_t_i_o_n_s const & options); │ │ │ │ │ -372 void setFactoryOptions(_O_p_t_i_o_n_s const & factoryOptions); │ │ │ │ │ -373 │ │ │ │ │ -374 bool faceHasLimitSimple(_I_n_d_e_x faceIndex, int faceSize) const; │ │ │ │ │ -375 │ │ │ │ │ -376 bool faceHasLimitNeighborhood(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -377 bool faceHasLimitNeighborhood(FaceTopology const & faceTopology) const; │ │ │ │ │ -378 │ │ │ │ │ -379 class SurfaceSet; │ │ │ │ │ -380 │ │ │ │ │ -381 bool populateAllSurfaces( _I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) const; │ │ │ │ │ -382 bool populateLinearSurfaces( _I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) const; │ │ │ │ │ -383 bool populateNonLinearSurfaces(_I_n_d_e_x faceIndex, SurfaceSet * sSetPtr) │ │ │ │ │ -const; │ │ │ │ │ -384 │ │ │ │ │ -385 bool initSurfaces(_I_n_d_e_x faceIndex, internal::SurfaceData * vtxSurface, │ │ │ │ │ -386 internal::SurfaceData * varSurface, │ │ │ │ │ -387 internal::SurfaceData * fvarSurfaces, │ │ │ │ │ -388 int fvarCount, │ │ │ │ │ -389 _F_V_a_r_I_D const fvarIDs[]) const; │ │ │ │ │ -390 │ │ │ │ │ -391 // Methods to assemble topology and corresponding indices for entire face: │ │ │ │ │ -392 bool isFaceNeighborhoodRegular(_I_n_d_e_x faceIndex, │ │ │ │ │ -393 _F_V_a_r_I_D const * fvarPtrOrVtx, │ │ │ │ │ -394 _I_n_d_e_x indices[]) const; │ │ │ │ │ -395 │ │ │ │ │ -396 bool initFaceNeighborhoodTopology(_I_n_d_e_x faceIndex, │ │ │ │ │ -397 FaceTopology * topology) const; │ │ │ │ │ -398 │ │ │ │ │ -399 bool gatherFaceNeighborhoodTopology(_I_n_d_e_x faceIndex, │ │ │ │ │ -400 FaceTopology * topology) const; │ │ │ │ │ +343template │ │ │ │ │ +344inline void │ │ │ │ │ +_3_4_5_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s( │ │ │ │ │ +346 REAL const meshPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ +347 REAL patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const { │ │ │ │ │ +348 │ │ │ │ │ +349 GatherControlPoints(meshPoints, meshPointDesc, patchPoints, │ │ │ │ │ +patchPointDesc); │ │ │ │ │ +350 ComputePatchPoints(patchPoints, patchPointDesc); │ │ │ │ │ +351} │ │ │ │ │ +352 │ │ │ │ │ +353// │ │ │ │ │ +354// Inline invocations of more general methods for derivative overloads: │ │ │ │ │ +355// │ │ │ │ │ +356template │ │ │ │ │ +357inline void │ │ │ │ │ +358_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_e_v_a_l_u_a_t_e_D_e_r_i_v_s(REAL const uv[2], │ │ │ │ │ +359 REAL const patchPoints[], │ │ │ │ │ +360 PointDescriptor const & pointDesc, │ │ │ │ │ +361 REAL * derivatives[]) const { │ │ │ │ │ +362 if (IsRegular()) { │ │ │ │ │ +363 evalRegularDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +364 } else if (IsLinear()) { │ │ │ │ │ +365 evalMultiLinearDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +366 } else { │ │ │ │ │ +367 evalIrregularDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +368 } │ │ │ │ │ +369} │ │ │ │ │ +370template │ │ │ │ │ +371inline void │ │ │ │ │ +_3_7_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +373 REAL const patchPoints[], │ │ │ │ │ +374 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +375 REAL P[]) const { │ │ │ │ │ +376 │ │ │ │ │ +377 REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 }; │ │ │ │ │ +378 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +379} │ │ │ │ │ +380template │ │ │ │ │ +381inline void │ │ │ │ │ +_3_8_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +383 REAL const patchPoints[], │ │ │ │ │ +384 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +385 REAL P[], REAL Du[], REAL Dv[]) const { │ │ │ │ │ +386 │ │ │ │ │ +387 REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 }; │ │ │ │ │ +388 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +389} │ │ │ │ │ +390template │ │ │ │ │ +391inline void │ │ │ │ │ +_3_9_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ +393 REAL const patchPoints[], │ │ │ │ │ +394 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ +395 REAL P[], REAL Du[], REAL Dv[], │ │ │ │ │ +396 REAL Duu[], REAL Duv[], REAL Dvv[]) const { │ │ │ │ │ +397 │ │ │ │ │ +398 REAL * derivatives[6] = { P, Du, Dv, Duu, Duv, Dvv }; │ │ │ │ │ +399 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ +400} │ │ │ │ │ 401 │ │ │ │ │ -402 int gatherFaceNeighborhoodIndices(_I_n_d_e_x faceIndex, │ │ │ │ │ -403 FaceTopology const & topology, │ │ │ │ │ -404 _F_V_a_r_I_D const * fvarPtrOrVtx, │ │ │ │ │ -405 _I_n_d_e_x indices[]) const; │ │ │ │ │ -406 │ │ │ │ │ -407 // Methods to assemble Surfaces for the different categories of patch: │ │ │ │ │ -408 typedef internal::SurfaceData SurfaceType; │ │ │ │ │ -409 │ │ │ │ │ -410 void assignLinearSurface(SurfaceType * surfacePtr, │ │ │ │ │ -411 _I_n_d_e_x faceIndex, │ │ │ │ │ -412 _F_V_a_r_I_D const * fvarPtrOrVtx) const; │ │ │ │ │ -413 │ │ │ │ │ -414 void assignRegularSurface(SurfaceType * surfacePtr, │ │ │ │ │ -415 _I_n_d_e_x const surfacePatchPoints[]) const; │ │ │ │ │ -416 │ │ │ │ │ -417 void assignRegularSurface(SurfaceType * surfacePtr, │ │ │ │ │ -418 FaceSurface const & surfaceDescription) const; │ │ │ │ │ -419 │ │ │ │ │ -420 void assignIrregularSurface(SurfaceType * surfacePtr, │ │ │ │ │ -421 FaceSurface const & surfaceDescription) const; │ │ │ │ │ -422 │ │ │ │ │ -423 void copyNonLinearSurface(SurfaceType * surfacePtr, │ │ │ │ │ -424 SurfaceType const & surfaceSource, │ │ │ │ │ -425 FaceSurface const & surfaceDescription) const; │ │ │ │ │ -426 │ │ │ │ │ -427private: │ │ │ │ │ -428 // Members describing options and subdivision properties (very little │ │ │ │ │ -429 // memory and low initialization cost) │ │ │ │ │ -430 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _subdivScheme; │ │ │ │ │ -431 _S_d_c_:_:_O_p_t_i_o_n_s _subdivOptions; │ │ │ │ │ -432 _O_p_t_i_o_n_s _factoryOptions; │ │ │ │ │ -433 │ │ │ │ │ -434 // Members related to subdivision topology, options and limit tests: │ │ │ │ │ -435 unsigned int _linearScheme : 1; │ │ │ │ │ -436 unsigned int _linearFVarInterp : 1; │ │ │ │ │ -437 │ │ │ │ │ -438 unsigned int _testNeighborhoodForLimit : 1; │ │ │ │ │ -439 unsigned int _rejectSmoothBoundariesForLimit : 1; │ │ │ │ │ -440 unsigned int _rejectIrregularFacesForLimit : 1; │ │ │ │ │ -441 │ │ │ │ │ -442 int _regFaceSize; │ │ │ │ │ +402template │ │ │ │ │ +403inline int │ │ │ │ │ +404_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_e_v_a_l_u_a_t_e_S_t_e_n_c_i_l_s(REAL const uv[2], REAL * sDeriv[]) const { │ │ │ │ │ +405 │ │ │ │ │ +406 if (IsRegular()) { │ │ │ │ │ +407 return evalRegularStencils(uv, sDeriv); │ │ │ │ │ +408 } else if (IsLinear()) { │ │ │ │ │ +409 return evalMultiLinearStencils(uv, sDeriv); │ │ │ │ │ +410 } else { │ │ │ │ │ +411 return evalIrregularStencils(uv, sDeriv); │ │ │ │ │ +412 } │ │ │ │ │ +413} │ │ │ │ │ +414template │ │ │ │ │ +415inline int │ │ │ │ │ +_4_1_6_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[]) const { │ │ │ │ │ +417 │ │ │ │ │ +418 REAL * derivativeStencils[6] = { sP, 0, 0, 0, 0, 0 }; │ │ │ │ │ +419 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ +420} │ │ │ │ │ +421template │ │ │ │ │ +422inline int │ │ │ │ │ +_4_2_3_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], │ │ │ │ │ +424 REAL sP[], REAL sDu[], REAL sDv[]) const { │ │ │ │ │ +425 │ │ │ │ │ +426 REAL * derivativeStencils[6] = { sP, sDu, sDv, 0, 0, 0 }; │ │ │ │ │ +427 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ +428} │ │ │ │ │ +429template │ │ │ │ │ +430inline int │ │ │ │ │ +_4_3_1_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], │ │ │ │ │ +432 REAL sP[], REAL sDu[], REAL sDv[], │ │ │ │ │ +433 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const { │ │ │ │ │ +434 │ │ │ │ │ +435 REAL * derivativeStencils[6] = { sP, sDu, sDv, sDuu, sDuv, sDvv }; │ │ │ │ │ +436 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ +437} │ │ │ │ │ +438 │ │ │ │ │ +439} // end namespace Bfr │ │ │ │ │ +440 │ │ │ │ │ +441} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +442using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 443 │ │ │ │ │ -444 // Members related to caching: │ │ │ │ │ -445 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e mutable * _topologyCache; │ │ │ │ │ -446}; │ │ │ │ │ -447 │ │ │ │ │ -448// │ │ │ │ │ -449// Inline methods for Options: │ │ │ │ │ -450// │ │ │ │ │ -451inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_4_5_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(_F_V_a_r_I_D id) { │ │ │ │ │ -453 _dfltFVarID = id; │ │ │ │ │ -454 return *this; │ │ │ │ │ -455} │ │ │ │ │ -456inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_4_5_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_n_a_b_l_e_C_a_c_h_i_n_g(bool on) { │ │ │ │ │ -458 _enableCache = on; │ │ │ │ │ -459 return *this; │ │ │ │ │ -460} │ │ │ │ │ -461inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_4_6_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e(_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e * c) { │ │ │ │ │ -463 _externCache = c; │ │ │ │ │ -464 return *this; │ │ │ │ │ -465} │ │ │ │ │ -466inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_4_6_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h(int level) { │ │ │ │ │ -468 _approxLevelSmooth = (unsigned char) level; │ │ │ │ │ -469 return *this; │ │ │ │ │ -470} │ │ │ │ │ -471inline _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_4_7_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p(int level) { │ │ │ │ │ -473 _approxLevelSharp = (unsigned char) level; │ │ │ │ │ -474 return *this; │ │ │ │ │ -475} │ │ │ │ │ -476 │ │ │ │ │ -477// │ │ │ │ │ -478// Inline methods to initializes Surfaces: │ │ │ │ │ -479// │ │ │ │ │ -480template │ │ │ │ │ -481inline bool │ │ │ │ │ -_4_8_2_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const { │ │ │ │ │ -483 │ │ │ │ │ -484 return initSurfaces(face, &s->getSurfaceData(), 0, 0, 0, 0); │ │ │ │ │ -485} │ │ │ │ │ -486template │ │ │ │ │ -487inline bool │ │ │ │ │ -_4_8_8_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const { │ │ │ │ │ -489 │ │ │ │ │ -490 return initSurfaces(face, 0, &s->getSurfaceData(), 0, 0, 0); │ │ │ │ │ -491} │ │ │ │ │ -492template │ │ │ │ │ -493inline bool │ │ │ │ │ -_4_9_4_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s, │ │ │ │ │ -495 _F_V_a_r_I_D fvarID) const { │ │ │ │ │ -496 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &fvarID); │ │ │ │ │ -497} │ │ │ │ │ -498template │ │ │ │ │ -499inline bool │ │ │ │ │ -_5_0_0_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face, _S_u_r_f_a_c_e_<_R_E_A_L_> * s) const │ │ │ │ │ -{ │ │ │ │ │ -501 _F_V_a_r_I_D dfltID = _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(); │ │ │ │ │ -502 return initSurfaces(face, 0, 0, &s->getSurfaceData(), 1, &dfltID); │ │ │ │ │ -503} │ │ │ │ │ -504 │ │ │ │ │ -505template │ │ │ │ │ -506inline bool │ │ │ │ │ -_5_0_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_S_u_r_f_a_c_e_s(_I_n_d_e_x faceIndex, _S_u_r_f_a_c_e_<_R_E_A_L_> * vtxSurface, │ │ │ │ │ -508 _S_u_r_f_a_c_e_<_R_E_A_L_> * fvarSurfaces, _F_V_a_r_I_D const fvarIDs[], int fvarCount, │ │ │ │ │ -509 _S_u_r_f_a_c_e_<_R_E_A_L_> * varSurface) const { │ │ │ │ │ -510 │ │ │ │ │ -511 bool useDfltFVarID = fvarSurfaces && (fvarIDs == 0) && (fvarCount == 0); │ │ │ │ │ -512 _F_V_a_r_I_D dfltFVarID = useDfltFVarID ? _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D() : 0; │ │ │ │ │ -513 │ │ │ │ │ -514 return initSurfaces(faceIndex, │ │ │ │ │ -515 vtxSurface ? &vtxSurface->getSurfaceData() : 0, │ │ │ │ │ -516 varSurface ? &varSurface->getSurfaceData() : 0, │ │ │ │ │ -517 fvarSurfaces ? &fvarSurfaces->getSurfaceData() : 0, │ │ │ │ │ -518 fvarCount ? fvarCount : (fvarSurfaces != 0), │ │ │ │ │ -519 useDfltFVarID ? &dfltFVarID : fvarIDs); │ │ │ │ │ -520} │ │ │ │ │ -521 │ │ │ │ │ -522// │ │ │ │ │ -523// Inline methods to allocate and initialize Surfaces: │ │ │ │ │ -524// │ │ │ │ │ -525template │ │ │ │ │ -526inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ -_5_2_7_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const { │ │ │ │ │ -528 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ -529 if (InitVertexSurface(faceIndex, s)) return s; │ │ │ │ │ -530 delete s; │ │ │ │ │ -531 return 0; │ │ │ │ │ -532} │ │ │ │ │ -533template │ │ │ │ │ -534inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ -_5_3_5_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex) const { │ │ │ │ │ -536 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ -537 if (InitVaryingSurface(faceIndex, s)) return s; │ │ │ │ │ -538 delete s; │ │ │ │ │ -539 return 0; │ │ │ │ │ -540} │ │ │ │ │ -541template │ │ │ │ │ -542inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ -_5_4_3_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x faceIndex, _F_V_a_r_I_D fvarID) │ │ │ │ │ -const { │ │ │ │ │ -544 _S_u_r_f_a_c_e_<_R_E_A_L_> * s = new _S_u_r_f_a_c_e_<_R_E_A_L_>(); │ │ │ │ │ -545 if (InitFaceVaryingSurface(faceIndex, s, fvarID)) return s; │ │ │ │ │ -546 delete s; │ │ │ │ │ -547 return 0; │ │ │ │ │ -548} │ │ │ │ │ -549template │ │ │ │ │ -550inline _S_u_r_f_a_c_e_<_R_E_A_L_> * │ │ │ │ │ -_5_5_1_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e(_I_n_d_e_x face) const { │ │ │ │ │ -552 _F_V_a_r_I_D dfltID = _factoryOptions._G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D(); │ │ │ │ │ -553 return CreateFaceVaryingSurface(face, dfltID); │ │ │ │ │ -554} │ │ │ │ │ -555 │ │ │ │ │ -556} // end namespace Bfr │ │ │ │ │ -557 │ │ │ │ │ -558} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -559using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -560 │ │ │ │ │ -561} // end namespace OpenSubdiv │ │ │ │ │ -562 │ │ │ │ │ -563#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_H */ │ │ │ │ │ +444} // end namespace OpenSubdiv │ │ │ │ │ +445 │ │ │ │ │ +446#endif /* OPENSUBDIV3_BFR_SURFACE */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ -SchemeType │ │ │ │ │ -Enumerated type for all subdivision schemes supported by OpenSubdiv. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_7 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ Simple class defining the 2D parameterization of a face. │ │ │ │ │ DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +int GetFaceSize() const │ │ │ │ │ +Returns the size (number of vertices) of the corresponding face. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_0_1 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e │ │ │ │ │ Encapsulates the limit surface for a face of a mesh. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ +int GetNumControlPoints() const │ │ │ │ │ +Return the number of control points affecting the Surface. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_3_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_E_v_a_l_u_a_t_e │ │ │ │ │ +void Evaluate(REAL const uv[2], REAL const patchPoints[], PointDescriptor const │ │ │ │ │ +&pointDesc, REAL P[]) const │ │ │ │ │ +Evaluation of position. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +int GetFaceSize() const │ │ │ │ │ +Return the size of the face. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_R_e_g_u_l_a_r │ │ │ │ │ +bool IsRegular() const │ │ │ │ │ +Return if the Surface is a single regular patch. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_1_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ +void BoundControlPoints(REAL const controlPoints[], PointDescriptor const │ │ │ │ │ +&controlPointDesc, REAL minExtent[], REAL maxExtent[]) const │ │ │ │ │ +Compute bounds of control points from a local array. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_C_o_n_t_r_o_l_P_o_i_n_t_I_n_d_i_c_e_s │ │ │ │ │ +int GetControlPointIndices(Index meshPointIndices[]) const │ │ │ │ │ +Identify indices of control points in the mesh. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +Integer type representing a mesh index. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_A_p_p_l_y_S_t_e_n_c_i_l │ │ │ │ │ +void ApplyStencil(REAL const stencil[], REAL const controlPoints[], │ │ │ │ │ +PointDescriptor const &, REAL result[]) const │ │ │ │ │ +Apply a single stencil to control points from a local array. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Parameterization GetParameterization() const │ │ │ │ │ +Return the Parameterization. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_S_u_r_f_a_c_e │ │ │ │ │ +Surface() │ │ │ │ │ +Default construction produces an invalid instance. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_A_p_p_l_y_S_t_e_n_c_i_l_F_r_o_m_M_e_s_h │ │ │ │ │ +void ApplyStencilFromMesh(REAL const stencil[], REAL const meshPoints[], │ │ │ │ │ +PointDescriptor const &, REAL result[]) const │ │ │ │ │ +Apply a single stencil to control points from the mesh data. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +Surface & operator=(Surface const &src)=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s_F_r_o_m_M_e_s_h │ │ │ │ │ +void BoundControlPointsFromMesh(REAL const meshPoints[], PointDescriptor const │ │ │ │ │ +&meshPointDesc, REAL minExtent[], REAL maxExtent[]) const │ │ │ │ │ +Compute bounds of control points from the mesh data. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_~_S_u_r_f_a_c_e │ │ │ │ │ +~Surface()=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_C_l_e_a_r │ │ │ │ │ +void Clear() │ │ │ │ │ +Clear a previously initialized Surface. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_8_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_S_u_r_f_a_c_e │ │ │ │ │ +Surface(Surface const &src)=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ +void PreparePatchPoints(REAL const meshPoints[], PointDescriptor const │ │ │ │ │ +&meshPointDesc, REAL patchPoints[], PointDescriptor const &patchPointDesc) │ │ │ │ │ +const │ │ │ │ │ +Prepare patch points in a local array for evaluation. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_4_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_V_a_l_i_d │ │ │ │ │ +bool IsValid() const │ │ │ │ │ +Return true if successfully initialized. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_a_t_h_e_r_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ +void GatherControlPoints(REAL_MESH const meshPoints[], PointDescriptor const │ │ │ │ │ +&meshPointDesc, REAL controlPoints[], PointDescriptor const &controlPointDesc) │ │ │ │ │ +const │ │ │ │ │ +Gather control points in a local array. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ +void ComputePatchPoints(REAL patchPoints[], PointDescriptor const │ │ │ │ │ +&patchPointDesc) const │ │ │ │ │ +Compute all patch points following the control points. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_L_i_n_e_a_r │ │ │ │ │ +bool IsLinear() const │ │ │ │ │ +Return if the Surface is linear. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_1_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_N_u_m_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ +int GetNumPatchPoints() const │ │ │ │ │ +Return the number of patch points representing the Surface. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l │ │ │ │ │ +int EvaluateStencil(REAL const uv[2], REAL sP[]) const │ │ │ │ │ +Evaluation of the limit stencil for position. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_4_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +Simple struct defining the size and stride of points in arrays. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ +int stride │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_s_i_z_e │ │ │ │ │ +int size │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PointDescriptor(int n) │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PointDescriptor(int n, int m) │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PointDescriptor() │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_4 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ -void setInternalCache(SurfaceFactoryCache *cache) │ │ │ │ │ -Subclass to identify an internal cache for use by base class. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_~_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -~SurfaceFactory() override │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ -bool InitFaceVaryingSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ -Initialize a Surface for the default face-varying data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ -Sdc::Options GetSchemeOptions() const │ │ │ │ │ -Return the set of subdivision options. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_F_a_c_e_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Parameterization GetFaceParameterization(Index faceIndex) const │ │ │ │ │ -Return the Parameterization of a face with a limit surface. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -SurfaceFactory(SurfaceFactory const &)=delete │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_F_a_c_e_H_a_s_L_i_m_i_t_S_u_r_f_a_c_e │ │ │ │ │ -bool FaceHasLimitSurface(Index faceIndex) const │ │ │ │ │ -Return if a specified face has a limit surface. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -SurfaceFactory & operator=(SurfaceFactory const &)=delete │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_e_r_t_e_x_S_u_r_f_a_c_e │ │ │ │ │ -Surface< REAL > * CreateVertexSurface(Index faceIndex) const │ │ │ │ │ -Construct a Surface for vertex data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_2_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_F_a_c_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ -Surface< REAL > * CreateFaceVaryingSurface(Index faceIndex) const │ │ │ │ │ -Construct a Surface for the default face-varying data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_S_u_r_f_a_c_e_s │ │ │ │ │ -bool InitSurfaces(Index faceIndex, Surface< REAL > *vtxSurface, Surface< REAL > │ │ │ │ │ -*fvarSurfaces, FVarID const fvarIDs[]=0, int fvarCount=0, Surface< REAL > │ │ │ │ │ -*varSurface=0) const │ │ │ │ │ -Initialize multiple Surfaces at once. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_G_e_t_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ -Sdc::SchemeType GetSchemeType() const │ │ │ │ │ -Return the subdivision scheme. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ -Surface< REAL > * CreateVaryingSurface(Index faceIndex) const │ │ │ │ │ -Construct a Surface for varying data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_3_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_e_r_t_e_x_S_u_r_f_a_c_e │ │ │ │ │ -bool InitVertexSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ -Initialize a Surface for vertex data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_I_n_i_t_V_a_r_y_i_n_g_S_u_r_f_a_c_e │ │ │ │ │ -bool InitVaryingSurface(Index faceIndex, Surface< REAL > *surface) const │ │ │ │ │ -Initialize a Surface for varying data. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ -SurfaceFactory(Sdc::SchemeType schemeType, Sdc::Options const &schemeOptions, │ │ │ │ │ -Options const &limitOptions) │ │ │ │ │ -Constructor to be used by subclasses. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Simple set of options assigned to instances of SurfaceFactory. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ -Options & SetExternalCache(SurfaceFactoryCache *c) │ │ │ │ │ -Assign an external cache to override the internal. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_n_a_b_l_e_C_a_c_h_i_n_g │ │ │ │ │ -Options & EnableCaching(bool on) │ │ │ │ │ -Enable or disable caching (default is true): │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h │ │ │ │ │ -Options & SetApproxLevelSmooth(int level) │ │ │ │ │ -Assign maximum refinement level for smooth features. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_m_o_o_t_h │ │ │ │ │ -int GetApproxLevelSmooth() const │ │ │ │ │ -Return maximum refinement level for smooth features. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options() │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_I_s_C_a_c_h_i_n_g_E_n_a_b_l_e_d │ │ │ │ │ -bool IsCachingEnabled() const │ │ │ │ │ -Return if caching is enable. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_3_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_S_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D │ │ │ │ │ -Options & SetDefaultFVarID(FVarID id) │ │ │ │ │ -Assign the default face-varying ID (none assigned by default) │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_S_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p │ │ │ │ │ -Options & SetApproxLevelSharp(int level) │ │ │ │ │ -Assign maximum refinement level for sharp features. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_4_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_G_e_t_D_e_f_a_u_l_t_F_V_a_r_I_D │ │ │ │ │ -FVarID GetDefaultFVarID() const │ │ │ │ │ -Return the default face-varying ID. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_2_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_G_e_t_A_p_p_r_o_x_L_e_v_e_l_S_h_a_r_p │ │ │ │ │ -int GetApproxLevelSharp() const │ │ │ │ │ -Return maximum refinement level for sharp features. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_4_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_G_e_t_E_x_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ -SurfaceFactoryCache * GetExternalCache() const │ │ │ │ │ -Return any assigned external cache. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_3_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e │ │ │ │ │ -Container used internally by SurfaceFactory to store reusable information. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r │ │ │ │ │ -Abstract interface adapting SurfaceFactory to a connected mesh representation. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -Integer type representing a mesh index. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_F_V_a_r_I_D │ │ │ │ │ -std::intptr_t FVarID │ │ │ │ │ -Type used to identify and specify face-varying primvars. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ -All supported options applying to subdivision scheme. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_5_3 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_u_r_f_a_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00692.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surface.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,46 +90,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surface.h File Reference
│ │ │ │ +
refinerSurfaceFactory.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/surfaceData.h"
│ │ │ │ -#include "../bfr/parameterization.h"
│ │ │ │ -#include "../vtr/array.h"
│ │ │ │ +#include "../bfr/surfaceFactory.h"
│ │ │ │ +#include "../bfr/surfaceFactoryCache.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Surface< REAL >
 Encapsulates the limit surface for a face of a mesh. More...
class  RefinerSurfaceFactoryBase
 Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. More...
 
struct  Surface< REAL >::PointDescriptor
 Simple struct defining the size and stride of points in arrays. More...
class  RefinerSurfaceFactory< CACHE_TYPE >
 Template for concrete subclasses of RefinerSurfaceFactoryBase. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,31 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -surface.h File Reference │ │ │ │ │ +refinerSurfaceFactory.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../bfr/surfaceData.h" │ │ │ │ │ -#include "_._._/_b_f_r_/_p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_a_r_r_a_y_._h" │ │ │ │ │ +#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ +#include "_._._/_b_f_r_/_s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _S_u_r_f_a_c_e_<_ _R_E_A_L_ _> │ │ │ │ │ -  Encapsulates the limit surface for a face of a mesh. _M_o_r_e_._._. │ │ │ │ │ +class   _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +  Intermediate subclass of _S_u_r_f_a_c_e_F_a_c_t_o_r_y with _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r as │ │ │ │ │ + the mesh. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _S_u_r_f_a_c_e_<_ _R_E_A_L_ _>_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -  Simple struct defining the size and stride of points in arrays. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_<_ _C_A_C_H_E___T_Y_P_E_ _> │ │ │ │ │ +  Template for concrete subclasses of _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ +  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_._h │ │ │ │ │ + * _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00692.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00692 = [ │ │ │ │ │ - ["Surface< REAL >", "a00933.html", "a00933"], │ │ │ │ │ - ["PointDescriptor", "a00937.html", "a00937"] │ │ │ │ │ + ["RefinerSurfaceFactoryBase", "a00925.html", "a00925"], │ │ │ │ │ + ["RefinerSurfaceFactory< CACHE_TYPE >", "a00929.html", "a00929"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surface.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surface.h
│ │ │ │ +
refinerSurfaceFactory.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,358 +119,163 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_SURFACE_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_SURFACE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../bfr/surfaceData.h"
│ │ │ │ -
31#include "../bfr/parameterization.h"
│ │ │ │ -
32#include "../vtr/array.h"
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Bfr {
│ │ │ │ -
38
│ │ │ │ -
58template <typename REAL>
│ │ │ │ -
│ │ │ │ -
59class Surface {
│ │ │ │ -
60public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
65 PointDescriptor(int n) : size(n), stride(n) { }
│ │ │ │ -
66 PointDescriptor(int n, int m) : size(n), stride(m) { }
│ │ │ │ -
67
│ │ │ │ - │ │ │ │ -
69 };
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
72 typedef int Index;
│ │ │ │ +
30#include "../bfr/surfaceFactory.h"
│ │ │ │ +
31#include "../bfr/surfaceFactoryCache.h"
│ │ │ │ +
32
│ │ │ │ +
33namespace OpenSubdiv {
│ │ │ │ +
34namespace OPENSUBDIV_VERSION {
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ +
36namespace Far {
│ │ │ │ +
37 class TopologyRefiner;
│ │ │ │ +
38}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
40namespace Bfr {
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59public:
│ │ │ │ +
61
│ │ │ │ +
65
│ │ │ │ + │ │ │ │ +
67 Options const & options);
│ │ │ │ +
68
│ │ │ │ +
69 ~RefinerSurfaceFactoryBase() override = default;
│ │ │ │ +
71
│ │ │ │
73
│ │ │ │ -
74public:
│ │ │ │ -
76
│ │ │ │ -
84
│ │ │ │ -
86 bool IsValid() const { return _data.isValid(); }
│ │ │ │ +
77
│ │ │ │ +
79 Far::TopologyRefiner const & GetMesh() const { return _mesh; }
│ │ │ │ +
80
│ │ │ │ +
82 int GetNumFaces() const { return _numFaces; }
│ │ │ │ +
83
│ │ │ │ +
85 int GetNumFVarChannels() const { return _numFVarChannels; }
│ │ │ │
87
│ │ │ │ -
89 void Clear() { _data.reinitialize(); }
│ │ │ │ -
90
│ │ │ │ - │ │ │ │ -
93
│ │ │ │ -
94 Surface(Surface const & src) = default;
│ │ │ │ -
95 Surface& operator=(Surface const & src) = default;
│ │ │ │ -
96 ~Surface() = default;
│ │ │ │ -
98
│ │ │ │ +
88protected:
│ │ │ │ +
90 //
│ │ │ │ +
91 // Virtual overrides to satisfy the SurfaceFactoryMeshAdapter interface:
│ │ │ │ +
92 //
│ │ │ │ +
93 bool isFaceHole( Index faceIndex) const override;
│ │ │ │ +
94 int getFaceSize(Index faceIndex) const override;
│ │ │ │ +
95
│ │ │ │ +
96 int getFaceVertexIndices(Index faceIndex,
│ │ │ │ +
97 Index vertexIndices[]) const override;
│ │ │ │ +
98 int getFaceFVarValueIndices(Index faceIndex,
│ │ │ │ +
99 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │
100
│ │ │ │ -
104
│ │ │ │ -
106 Parameterization GetParameterization() const { return _data.getParam(); }
│ │ │ │ -
107
│ │ │ │ -
109 int GetFaceSize() const { return GetParameterization().GetFaceSize(); }
│ │ │ │ +
101 int populateFaceVertexDescriptor(Index faceIndex, int faceVertex,
│ │ │ │ +
102 VertexDescriptor * vertexDescriptor) const override;
│ │ │ │ +
103
│ │ │ │ + │ │ │ │ +
105 Index faceIndex, int faceVertex,
│ │ │ │ +
106 Index vertexIndices[]) const override;
│ │ │ │ + │ │ │ │ +
108 Index faceIndex, int faceVertex,
│ │ │ │ +
109 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │
110
│ │ │ │ -
112 bool IsRegular() const { return _data.isRegular(); }
│ │ │ │ -
113
│ │ │ │ -
115 bool IsLinear() const { return _data.isLinear(); }
│ │ │ │ -
117
│ │ │ │ -
119
│ │ │ │ -
135
│ │ │ │ -
137 int GetNumControlPoints() const { return _data.getNumCVs(); }
│ │ │ │ -
138
│ │ │ │ -
140 int GetControlPointIndices(Index meshPointIndices[]) const;
│ │ │ │ +
111 // Optional SurfaceFactoryMeshAdapter overrides for regular patches:
│ │ │ │ + │ │ │ │ +
113 Index faceIndex,
│ │ │ │ +
114 Index vertexIndices[]) const override;
│ │ │ │ +
115
│ │ │ │ + │ │ │ │ +
117 Index faceIndex,
│ │ │ │ +
118 FVarID fvarID, Index fvarValueIndices[]) const override;
│ │ │ │ +
120
│ │ │ │ +
121private:
│ │ │ │ +
122 //
│ │ │ │ +
123 // Internal supporting methods:
│ │ │ │ +
124 //
│ │ │ │ +
125 int getFaceVaryingChannel(FVarID fvarID) const;
│ │ │ │ +
126
│ │ │ │ +
127 int getFaceVertexPointIndices(Index faceIndex, int faceVertex,
│ │ │ │ +
128 Index indices[], int vtxOrFVarChannel) const;
│ │ │ │ +
129
│ │ │ │ +
130 int getFacePatchPointIndices(Index faceIndex,
│ │ │ │ +
131 Index indices[], int vtxOrFVarChannel) const;
│ │ │ │ +
132
│ │ │ │ +
133private:
│ │ │ │ +
134 // Additional members for the subclass:
│ │ │ │ +
135 Far::TopologyRefiner const & _mesh;
│ │ │ │ +
136
│ │ │ │ +
137 int _numFaces;
│ │ │ │ +
138 int _numFVarChannels;
│ │ │ │ +
139};
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │
141
│ │ │ │ -
151 template <typename REAL_MESH>
│ │ │ │ -
152 void GatherControlPoints(REAL_MESH const meshPoints[],
│ │ │ │ -
153 PointDescriptor const & meshPointDesc,
│ │ │ │ -
154 REAL controlPoints[],
│ │ │ │ -
155 PointDescriptor const & controlPointDesc) const;
│ │ │ │ -
156
│ │ │ │ -
158 void BoundControlPoints(REAL const controlPoints[],
│ │ │ │ -
159 PointDescriptor const & controlPointDesc,
│ │ │ │ -
160 REAL minExtent[],
│ │ │ │ -
161 REAL maxExtent[]) const;
│ │ │ │ -
162
│ │ │ │ -
164 void BoundControlPointsFromMesh(REAL const meshPoints[],
│ │ │ │ -
165 PointDescriptor const & meshPointDesc,
│ │ │ │ -
166 REAL minExtent[],
│ │ │ │ -
167 REAL maxExtent[]) const;
│ │ │ │ -
169
│ │ │ │ +
142//
│ │ │ │ +
156template <class CACHE_TYPE = SurfaceFactoryCache>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
158public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
160 Options const & options = Options()) :
│ │ │ │ +
161 RefinerSurfaceFactoryBase(mesh, options),
│ │ │ │ +
162 _localCache() {
│ │ │ │ +
163
│ │ │ │ + │ │ │ │ +
165 }
│ │ │ │ +
│ │ │ │ +
166 ~RefinerSurfaceFactory() override = default;
│ │ │ │ +
167
│ │ │ │ +
168private:
│ │ │ │ +
169 CACHE_TYPE _localCache;
│ │ │ │ +
170};
│ │ │ │ +
│ │ │ │
171
│ │ │ │ -
177
│ │ │ │ -
179 int GetNumPatchPoints() const;
│ │ │ │ -
180
│ │ │ │ -
199 void PreparePatchPoints(REAL const meshPoints[],
│ │ │ │ -
200 PointDescriptor const & meshPointDesc,
│ │ │ │ -
201 REAL patchPoints[],
│ │ │ │ -
202 PointDescriptor const & patchPointDesc) const;
│ │ │ │ -
203
│ │ │ │ -
213 void ComputePatchPoints(REAL patchPoints[],
│ │ │ │ -
214 PointDescriptor const & patchPointDesc) const;
│ │ │ │ -
216
│ │ │ │ -
218
│ │ │ │ -
225
│ │ │ │ -
227 void Evaluate(REAL const uv[2],
│ │ │ │ -
228 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ -
229 REAL P[]) const;
│ │ │ │ -
230
│ │ │ │ -
232 void Evaluate(REAL const uv[2],
│ │ │ │ -
233 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ -
234 REAL P[], REAL Du[], REAL Dv[]) const;
│ │ │ │ -
235
│ │ │ │ -
237 void Evaluate(REAL const uv[2],
│ │ │ │ -
238 REAL const patchPoints[], PointDescriptor const & pointDesc,
│ │ │ │ -
239 REAL P[], REAL Du[], REAL Dv[],
│ │ │ │ -
240 REAL Duu[], REAL Duv[], REAL Dvv[]) const;
│ │ │ │ -
242
│ │ │ │ -
244
│ │ │ │ -
256
│ │ │ │ -
258 int EvaluateStencil(REAL const uv[2], REAL sP[]) const;
│ │ │ │ -
259
│ │ │ │ -
261 int EvaluateStencil(REAL const uv[2], REAL sP[],
│ │ │ │ -
262 REAL sDu[], REAL sDv[]) const;
│ │ │ │ -
263
│ │ │ │ -
265 int EvaluateStencil(REAL const uv[2], REAL sP[],
│ │ │ │ -
266 REAL sDu[], REAL sDv[],
│ │ │ │ -
267 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const;
│ │ │ │ -
268
│ │ │ │ -
270 void ApplyStencil(REAL const stencil[],
│ │ │ │ -
271 REAL const controlPoints[], PointDescriptor const &,
│ │ │ │ -
272 REAL result[]) const;
│ │ │ │ -
273
│ │ │ │ -
275 void ApplyStencilFromMesh(REAL const stencil[],
│ │ │ │ -
276 REAL const meshPoints[], PointDescriptor const &,
│ │ │ │ -
277 REAL result[]) const;
│ │ │ │ -
279
│ │ │ │ -
280private:
│ │ │ │ -
281 // Internal methods for evaluating derivatives, basis weights and
│ │ │ │ -
282 // stencils for regular, irregular and irregular linear patches:
│ │ │ │ - │ │ │ │ -
284
│ │ │ │ -
285 void evaluateDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ -
286 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ -
287 void evalRegularDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ -
288 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ -
289 void evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ -
290 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ -
291 void evalMultiLinearDerivs(REAL const uv[2], REAL const patchPoints[],
│ │ │ │ -
292 PointDescriptor const &, REAL * derivs[]) const;
│ │ │ │ -
293
│ │ │ │ -
294 void evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ -
295 IndexArray evalIrregularBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ -
296 int evalMultiLinearBasis(REAL const uv[2], REAL * wDeriv[]) const;
│ │ │ │ -
297
│ │ │ │ -
298 int evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ -
299 int evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ -
300 int evalIrregularStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ -
301 int evalMultiLinearStencils(REAL const uv[2], REAL * sDeriv[]) const;
│ │ │ │ -
302
│ │ │ │ -
303 // Internal methods to compute patch points:
│ │ │ │ -
304 void computeLinearPatchPoints(REAL p[], PointDescriptor const &) const;
│ │ │ │ -
305 void computeIrregularPatchPoints(REAL p[], PointDescriptor const &) const;
│ │ │ │ -
306
│ │ │ │ -
307 // Internal methods specific to regular or irregular patches:
│ │ │ │ -
308 unsigned char getRegPatchType() const { return _data.getRegPatchType(); }
│ │ │ │ -
309 unsigned char getRegPatchMask() const { return _data.getRegPatchMask(); }
│ │ │ │ -
310
│ │ │ │ -
311 internal::IrregularPatchType const & getIrregPatch() const;
│ │ │ │ -
312
│ │ │ │ -
313private:
│ │ │ │ -
314 // Access to the set of member variables - provided to the Factory:
│ │ │ │ -
315 friend class SurfaceFactory;
│ │ │ │ -
316
│ │ │ │ -
317 internal::SurfaceData & getSurfaceData() { return _data; }
│ │ │ │ -
318 internal::SurfaceData const & getSurfaceData() const { return _data; }
│ │ │ │ -
319
│ │ │ │ -
320private:
│ │ │ │ -
321 // All member variables encapsulated in a single class:
│ │ │ │ -
322 internal::SurfaceData _data;
│ │ │ │ -
323};
│ │ │ │ -
│ │ │ │ -
324
│ │ │ │ -
325
│ │ │ │ -
326//
│ │ │ │ -
327// Simple inline methods composed of other methods:
│ │ │ │ -
328//
│ │ │ │ -
329template <typename REAL>
│ │ │ │ -
330inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
332 PointDescriptor const & pointDesc) const {
│ │ │ │ -
333
│ │ │ │ -
334 if (!IsRegular()) {
│ │ │ │ -
335 if (IsLinear()) {
│ │ │ │ -
336 computeLinearPatchPoints(points, pointDesc);
│ │ │ │ -
337 } else {
│ │ │ │ -
338 computeIrregularPatchPoints(points, pointDesc);
│ │ │ │ -
339 }
│ │ │ │ -
340 }
│ │ │ │ -
341}
│ │ │ │ -
│ │ │ │ -
342
│ │ │ │ -
343template <typename REAL>
│ │ │ │ -
344inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
346 REAL const meshPoints[], PointDescriptor const & meshPointDesc,
│ │ │ │ -
347 REAL patchPoints[], PointDescriptor const & patchPointDesc) const {
│ │ │ │ -
348
│ │ │ │ -
349 GatherControlPoints(meshPoints, meshPointDesc, patchPoints, patchPointDesc);
│ │ │ │ -
350 ComputePatchPoints(patchPoints, patchPointDesc);
│ │ │ │ -
351}
│ │ │ │ -
│ │ │ │ -
352
│ │ │ │ -
353//
│ │ │ │ -
354// Inline invocations of more general methods for derivative overloads:
│ │ │ │ -
355//
│ │ │ │ -
356template <typename REAL>
│ │ │ │ -
357inline void
│ │ │ │ -
358Surface<REAL>::evaluateDerivs(REAL const uv[2],
│ │ │ │ -
359 REAL const patchPoints[],
│ │ │ │ -
360 PointDescriptor const & pointDesc,
│ │ │ │ -
361 REAL * derivatives[]) const {
│ │ │ │ -
362 if (IsRegular()) {
│ │ │ │ -
363 evalRegularDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
364 } else if (IsLinear()) {
│ │ │ │ -
365 evalMultiLinearDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
366 } else {
│ │ │ │ -
367 evalIrregularDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
368 }
│ │ │ │ -
369}
│ │ │ │ -
370template <typename REAL>
│ │ │ │ -
371inline void
│ │ │ │ -
│ │ │ │ -
372Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ -
373 REAL const patchPoints[],
│ │ │ │ -
374 PointDescriptor const & pointDesc,
│ │ │ │ -
375 REAL P[]) const {
│ │ │ │ -
376
│ │ │ │ -
377 REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 };
│ │ │ │ -
378 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
379}
│ │ │ │ -
│ │ │ │ -
380template <typename REAL>
│ │ │ │ -
381inline void
│ │ │ │ -
│ │ │ │ -
382Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ -
383 REAL const patchPoints[],
│ │ │ │ -
384 PointDescriptor const & pointDesc,
│ │ │ │ -
385 REAL P[], REAL Du[], REAL Dv[]) const {
│ │ │ │ -
386
│ │ │ │ -
387 REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 };
│ │ │ │ -
388 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
389}
│ │ │ │ -
│ │ │ │ -
390template <typename REAL>
│ │ │ │ -
391inline void
│ │ │ │ -
│ │ │ │ -
392Surface<REAL>::Evaluate(REAL const uv[2],
│ │ │ │ -
393 REAL const patchPoints[],
│ │ │ │ -
394 PointDescriptor const & pointDesc,
│ │ │ │ -
395 REAL P[], REAL Du[], REAL Dv[],
│ │ │ │ -
396 REAL Duu[], REAL Duv[], REAL Dvv[]) const {
│ │ │ │ -
397
│ │ │ │ -
398 REAL * derivatives[6] = { P, Du, Dv, Duu, Duv, Dvv };
│ │ │ │ -
399 evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
│ │ │ │ -
400}
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
402template <typename REAL>
│ │ │ │ -
403inline int
│ │ │ │ -
404Surface<REAL>::evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const {
│ │ │ │ -
405
│ │ │ │ -
406 if (IsRegular()) {
│ │ │ │ -
407 return evalRegularStencils(uv, sDeriv);
│ │ │ │ -
408 } else if (IsLinear()) {
│ │ │ │ -
409 return evalMultiLinearStencils(uv, sDeriv);
│ │ │ │ -
410 } else {
│ │ │ │ -
411 return evalIrregularStencils(uv, sDeriv);
│ │ │ │ -
412 }
│ │ │ │ -
413}
│ │ │ │ -
414template <typename REAL>
│ │ │ │ -
415inline int
│ │ │ │ -
│ │ │ │ -
416Surface<REAL>::EvaluateStencil(REAL const uv[2], REAL sP[]) const {
│ │ │ │ -
417
│ │ │ │ -
418 REAL * derivativeStencils[6] = { sP, 0, 0, 0, 0, 0 };
│ │ │ │ -
419 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ -
420}
│ │ │ │ -
│ │ │ │ -
421template <typename REAL>
│ │ │ │ -
422inline int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
424 REAL sP[], REAL sDu[], REAL sDv[]) const {
│ │ │ │ -
425
│ │ │ │ -
426 REAL * derivativeStencils[6] = { sP, sDu, sDv, 0, 0, 0 };
│ │ │ │ -
427 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ -
428}
│ │ │ │ -
│ │ │ │ -
429template <typename REAL>
│ │ │ │ -
430inline int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
432 REAL sP[], REAL sDu[], REAL sDv[],
│ │ │ │ -
433 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const {
│ │ │ │ -
434
│ │ │ │ -
435 REAL * derivativeStencils[6] = { sP, sDu, sDv, sDuu, sDuv, sDvv };
│ │ │ │ -
436 return evaluateStencils(uv, derivativeStencils);
│ │ │ │ -
437}
│ │ │ │ -
│ │ │ │ -
438
│ │ │ │ -
439} // end namespace Bfr
│ │ │ │ -
440
│ │ │ │ -
441} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
442using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
443
│ │ │ │ -
444} // end namespace OpenSubdiv
│ │ │ │ -
445
│ │ │ │ -
446#endif /* OPENSUBDIV3_BFR_SURFACE */
│ │ │ │ - │ │ │ │ -
Simple class defining the 2D parameterization of a face.
│ │ │ │ -
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │ -
Encapsulates the limit surface for a face of a mesh.
Definition surface.h:59
│ │ │ │ -
int GetNumControlPoints() const
Return the number of control points affecting the Surface.
Definition surface.h:137
│ │ │ │ -
void Evaluate(REAL const uv[2], REAL const patchPoints[], PointDescriptor const &pointDesc, REAL P[]) const
Evaluation of position.
Definition surface.h:372
│ │ │ │ -
int GetFaceSize() const
Return the size of the face.
Definition surface.h:109
│ │ │ │ -
bool IsRegular() const
Return if the Surface is a single regular patch.
Definition surface.h:112
│ │ │ │ -
void BoundControlPoints(REAL const controlPoints[], PointDescriptor const &controlPointDesc, REAL minExtent[], REAL maxExtent[]) const
Compute bounds of control points from a local array.
│ │ │ │ -
int GetControlPointIndices(Index meshPointIndices[]) const
Identify indices of control points in the mesh.
│ │ │ │ -
int Index
Integer type representing a mesh index.
Definition surface.h:72
│ │ │ │ -
void ApplyStencil(REAL const stencil[], REAL const controlPoints[], PointDescriptor const &, REAL result[]) const
Apply a single stencil to control points from a local array.
│ │ │ │ -
Parameterization GetParameterization() const
Return the Parameterization.
Definition surface.h:106
│ │ │ │ -
Surface()
Default construction produces an invalid instance.
│ │ │ │ -
void ApplyStencilFromMesh(REAL const stencil[], REAL const meshPoints[], PointDescriptor const &, REAL result[]) const
Apply a single stencil to control points from the mesh data.
│ │ │ │ -
Surface & operator=(Surface const &src)=default
│ │ │ │ -
void BoundControlPointsFromMesh(REAL const meshPoints[], PointDescriptor const &meshPointDesc, REAL minExtent[], REAL maxExtent[]) const
Compute bounds of control points from the mesh data.
│ │ │ │ - │ │ │ │ -
void Clear()
Clear a previously initialized Surface.
Definition surface.h:89
│ │ │ │ - │ │ │ │ -
void PreparePatchPoints(REAL const meshPoints[], PointDescriptor const &meshPointDesc, REAL patchPoints[], PointDescriptor const &patchPointDesc) const
Prepare patch points in a local array for evaluation.
Definition surface.h:345
│ │ │ │ -
bool IsValid() const
Return true if successfully initialized.
Definition surface.h:86
│ │ │ │ -
void GatherControlPoints(REAL_MESH const meshPoints[], PointDescriptor const &meshPointDesc, REAL controlPoints[], PointDescriptor const &controlPointDesc) const
Gather control points in a local array.
│ │ │ │ -
void ComputePatchPoints(REAL patchPoints[], PointDescriptor const &patchPointDesc) const
Compute all patch points following the control points.
Definition surface.h:331
│ │ │ │ -
bool IsLinear() const
Return if the Surface is linear.
Definition surface.h:115
│ │ │ │ -
int GetNumPatchPoints() const
Return the number of patch points representing the Surface.
│ │ │ │ -
int EvaluateStencil(REAL const uv[2], REAL sP[]) const
Evaluation of the limit stencil for position.
Definition surface.h:416
│ │ │ │ -
Simple struct defining the size and stride of points in arrays.
Definition surface.h:63
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ - │ │ │ │ +
172} // end namespace Bfr
│ │ │ │ +
173
│ │ │ │ +
174} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
175using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
176
│ │ │ │ +
177} // end namespace OpenSubdiv
│ │ │ │ +
178
│ │ │ │ +
179#endif /* OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H */
│ │ │ │ + │ │ │ │ +
Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh.
│ │ │ │ + │ │ │ │ +
int GetNumFVarChannels() const
Return the number of face-varying channels.
│ │ │ │ +
Far::TopologyRefiner const & GetMesh() const
Return the instance of the mesh.
│ │ │ │ + │ │ │ │ +
RefinerSurfaceFactoryBase(Far::TopologyRefiner const &mesh, Options const &options)
│ │ │ │ +
Template for concrete subclasses of RefinerSurfaceFactoryBase.
│ │ │ │ + │ │ │ │ +
RefinerSurfaceFactory(Far::TopologyRefiner const &mesh, Options const &options=Options())
│ │ │ │ +
Base class providing initialization of a Surface for each face of a mesh.
│ │ │ │ +
void setInternalCache(SurfaceFactoryCache *cache)
Subclass to identify an internal cache for use by base class.
│ │ │ │ +
Simple set of options assigned to instances of SurfaceFactory.
│ │ │ │ +
virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather face-varying indices of incident faces around a face-vertex.
│ │ │ │ +
virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int faceVertex, Index vertexIndices[]) const =0
Gather vertex indices of incident faces around a face-vertex.
│ │ │ │ +
virtual int getFaceSize(Index faceIndex) const =0
Returns the size of a face (number of vertices)
│ │ │ │ + │ │ │ │ +
virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0
Describe the topology of incident faces around a face-vertex.
│ │ │ │ +
virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index vertexIndices[]) const
│ │ │ │ +
virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const
│ │ │ │ +
virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather the face-varying indices of the face's vertices.
│ │ │ │ +
virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const =0
Gather the indices of the face's vertices.
│ │ │ │ +
virtual bool isFaceHole(Index faceIndex) const =0
Returns if a face is a hole.
│ │ │ │ +
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
│ │ │ │ +
Simple class used by subclasses of SurfaceFactory to describe a vertex.
│ │ │ │ +
Stores topology data for a specified set of refinement options.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surface.h │ │ │ │ │ +refinerSurfaceFactory.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,420 +24,222 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_SURFACE_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_SURFACE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../bfr/surfaceData.h" │ │ │ │ │ -31#include "../bfr/parameterization.h" │ │ │ │ │ -32#include "../vtr/array.h" │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Bfr { │ │ │ │ │ -38 │ │ │ │ │ -58template │ │ │ │ │ -_5_9class _S_u_r_f_a_c_e { │ │ │ │ │ -60public: │ │ │ │ │ -_6_3 struct _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ -_6_4 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r() : _s_i_z_e(0), _s_t_r_i_d_e(0) { } │ │ │ │ │ -_6_5 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r(int n) : _s_i_z_e(n), _s_t_r_i_d_e(n) { } │ │ │ │ │ -_6_6 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r(int n, int m) : _s_i_z_e(n), _s_t_r_i_d_e(m) { } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 int _s_i_z_e, _s_t_r_i_d_e; │ │ │ │ │ -69 }; │ │ │ │ │ -70 │ │ │ │ │ -_7_2 typedef int _I_n_d_e_x; │ │ │ │ │ +30#include "../bfr/surfaceFactory.h" │ │ │ │ │ +31#include "../bfr/surfaceFactoryCache.h" │ │ │ │ │ +32 │ │ │ │ │ +33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +35 │ │ │ │ │ +_3_6namespace Far { │ │ │ │ │ +37 class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r; │ │ │ │ │ +38} │ │ │ │ │ +39 │ │ │ │ │ +40namespace Bfr { │ │ │ │ │ +41 │ │ │ │ │ +_5_8class _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e : public _S_u_r_f_a_c_e_F_a_c_t_o_r_y { │ │ │ │ │ +59public: │ │ │ │ │ +61 │ │ │ │ │ +65 │ │ │ │ │ +_6_6 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & mesh, │ │ │ │ │ +67 _O_p_t_i_o_n_s const & options); │ │ │ │ │ +68 │ │ │ │ │ +_6_9 _~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e() override = default; │ │ │ │ │ +71 │ │ │ │ │ 73 │ │ │ │ │ -74public: │ │ │ │ │ -76 │ │ │ │ │ -84 │ │ │ │ │ -_8_6 bool _I_s_V_a_l_i_d() const { return _data.isValid(); } │ │ │ │ │ +77 │ │ │ │ │ +_7_9 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _G_e_t_M_e_s_h() const { return _mesh; } │ │ │ │ │ +80 │ │ │ │ │ +_8_2 int _G_e_t_N_u_m_F_a_c_e_s() const { return _numFaces; } │ │ │ │ │ +83 │ │ │ │ │ +_8_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return _numFVarChannels; } │ │ │ │ │ 87 │ │ │ │ │ -_8_9 void _C_l_e_a_r() { _data.reinitialize(); } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 _S_u_r_f_a_c_e(); │ │ │ │ │ -93 │ │ │ │ │ -_9_4 _S_u_r_f_a_c_e(_S_u_r_f_a_c_e const & src) = default; │ │ │ │ │ -_9_5 _S_u_r_f_a_c_e& _o_p_e_r_a_t_o_r_=(_S_u_r_f_a_c_e const & src) = default; │ │ │ │ │ -_9_6 _~_S_u_r_f_a_c_e() = default; │ │ │ │ │ -98 │ │ │ │ │ +88protected: │ │ │ │ │ +90 // │ │ │ │ │ +91 // Virtual overrides to satisfy the SurfaceFactoryMeshAdapter interface: │ │ │ │ │ +92 // │ │ │ │ │ +93 bool _i_s_F_a_c_e_H_o_l_e( _I_n_d_e_x faceIndex) const override; │ │ │ │ │ +94 int _g_e_t_F_a_c_e_S_i_z_e(_I_n_d_e_x faceIndex) const override; │ │ │ │ │ +95 │ │ │ │ │ +96 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ +97 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ +98 int _g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s(_I_n_d_e_x faceIndex, │ │ │ │ │ +99 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ 100 │ │ │ │ │ -104 │ │ │ │ │ -_1_0_6 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() const { return _data.getParam(); } │ │ │ │ │ -107 │ │ │ │ │ -_1_0_9 int _G_e_t_F_a_c_e_S_i_z_e() const { return _G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n()._G_e_t_F_a_c_e_S_i_z_e(); } │ │ │ │ │ +101 int _p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r(_I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +102 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r * vertexDescriptor) const override; │ │ │ │ │ +103 │ │ │ │ │ +104 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s( │ │ │ │ │ +105 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +106 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ +107 int _g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s( │ │ │ │ │ +108 _I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +109 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ 110 │ │ │ │ │ -_1_1_2 bool _I_s_R_e_g_u_l_a_r() const { return _data.isRegular(); } │ │ │ │ │ -113 │ │ │ │ │ -_1_1_5 bool _I_s_L_i_n_e_a_r() const { return _data.isLinear(); } │ │ │ │ │ -117 │ │ │ │ │ -119 │ │ │ │ │ -135 │ │ │ │ │ -_1_3_7 int _G_e_t_N_u_m_C_o_n_t_r_o_l_P_o_i_n_t_s() const { return _data.getNumCVs(); } │ │ │ │ │ -138 │ │ │ │ │ -_1_4_0 int _G_e_t_C_o_n_t_r_o_l_P_o_i_n_t_I_n_d_i_c_e_s(_I_n_d_e_x meshPointIndices[]) const; │ │ │ │ │ +111 // Optional SurfaceFactoryMeshAdapter overrides for regular patches: │ │ │ │ │ +112 bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +113 _I_n_d_e_x faceIndex, │ │ │ │ │ +114 _I_n_d_e_x vertexIndices[]) const override; │ │ │ │ │ +115 │ │ │ │ │ +116 bool _g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r( │ │ │ │ │ +117 _I_n_d_e_x faceIndex, │ │ │ │ │ +118 _F_V_a_r_I_D fvarID, _I_n_d_e_x fvarValueIndices[]) const override; │ │ │ │ │ +120 │ │ │ │ │ +121private: │ │ │ │ │ +122 // │ │ │ │ │ +123 // Internal supporting methods: │ │ │ │ │ +124 // │ │ │ │ │ +125 int getFaceVaryingChannel(_F_V_a_r_I_D fvarID) const; │ │ │ │ │ +126 │ │ │ │ │ +127 int getFaceVertexPointIndices(_I_n_d_e_x faceIndex, int faceVertex, │ │ │ │ │ +128 _I_n_d_e_x indices[], int vtxOrFVarChannel) const; │ │ │ │ │ +129 │ │ │ │ │ +130 int getFacePatchPointIndices(_I_n_d_e_x faceIndex, │ │ │ │ │ +131 _I_n_d_e_x indices[], int vtxOrFVarChannel) const; │ │ │ │ │ +132 │ │ │ │ │ +133private: │ │ │ │ │ +134 // Additional members for the subclass: │ │ │ │ │ +135 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _mesh; │ │ │ │ │ +136 │ │ │ │ │ +137 int _numFaces; │ │ │ │ │ +138 int _numFVarChannels; │ │ │ │ │ +139}; │ │ │ │ │ +140 │ │ │ │ │ 141 │ │ │ │ │ -151 template │ │ │ │ │ -_1_5_2 void _G_a_t_h_e_r_C_o_n_t_r_o_l_P_o_i_n_t_s(REAL_MESH const meshPoints[], │ │ │ │ │ -153 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ -154 REAL controlPoints[], │ │ │ │ │ -155 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & controlPointDesc) const; │ │ │ │ │ -156 │ │ │ │ │ -_1_5_8 void _B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s(REAL const controlPoints[], │ │ │ │ │ -159 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & controlPointDesc, │ │ │ │ │ -160 REAL minExtent[], │ │ │ │ │ -161 REAL maxExtent[]) const; │ │ │ │ │ -162 │ │ │ │ │ -_1_6_4 void _B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s_F_r_o_m_M_e_s_h(REAL const meshPoints[], │ │ │ │ │ -165 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ -166 REAL minExtent[], │ │ │ │ │ -167 REAL maxExtent[]) const; │ │ │ │ │ -169 │ │ │ │ │ +142// │ │ │ │ │ +156template │ │ │ │ │ +_1_5_7class _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y : public _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ +158public: │ │ │ │ │ +_1_5_9 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & mesh, │ │ │ │ │ +160 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()) : │ │ │ │ │ +161 _R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e(mesh, options), │ │ │ │ │ +162 _localCache() { │ │ │ │ │ +163 │ │ │ │ │ +164 _S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e(&_localCache); │ │ │ │ │ +165 } │ │ │ │ │ +_1_6_6 _~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y() override = default; │ │ │ │ │ +167 │ │ │ │ │ +168private: │ │ │ │ │ +169 CACHE_TYPE _localCache; │ │ │ │ │ +170}; │ │ │ │ │ 171 │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 int _G_e_t_N_u_m_P_a_t_c_h_P_o_i_n_t_s() const; │ │ │ │ │ -180 │ │ │ │ │ -199 void _P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s(REAL const meshPoints[], │ │ │ │ │ -200 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ -201 REAL patchPoints[], │ │ │ │ │ -202 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const; │ │ │ │ │ -203 │ │ │ │ │ -213 void _C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s(REAL patchPoints[], │ │ │ │ │ -214 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const; │ │ │ │ │ -216 │ │ │ │ │ -218 │ │ │ │ │ -225 │ │ │ │ │ -227 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -228 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -229 REAL P[]) const; │ │ │ │ │ -230 │ │ │ │ │ -232 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -233 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -234 REAL P[], REAL Du[], REAL Dv[]) const; │ │ │ │ │ -235 │ │ │ │ │ -237 void _E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -238 REAL const patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -239 REAL P[], REAL Du[], REAL Dv[], │ │ │ │ │ -240 REAL Duu[], REAL Duv[], REAL Dvv[]) const; │ │ │ │ │ -242 │ │ │ │ │ -244 │ │ │ │ │ -256 │ │ │ │ │ -258 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[]) const; │ │ │ │ │ -259 │ │ │ │ │ -261 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[], │ │ │ │ │ -262 REAL sDu[], REAL sDv[]) const; │ │ │ │ │ -263 │ │ │ │ │ -265 int _E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[], │ │ │ │ │ -266 REAL sDu[], REAL sDv[], │ │ │ │ │ -267 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const; │ │ │ │ │ -268 │ │ │ │ │ -_2_7_0 void _A_p_p_l_y_S_t_e_n_c_i_l(REAL const stencil[], │ │ │ │ │ -271 REAL const controlPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, │ │ │ │ │ -272 REAL result[]) const; │ │ │ │ │ -273 │ │ │ │ │ -_2_7_5 void _A_p_p_l_y_S_t_e_n_c_i_l_F_r_o_m_M_e_s_h(REAL const stencil[], │ │ │ │ │ -276 REAL const meshPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, │ │ │ │ │ -277 REAL result[]) const; │ │ │ │ │ -279 │ │ │ │ │ -280private: │ │ │ │ │ -281 // Internal methods for evaluating derivatives, basis weights and │ │ │ │ │ -282 // stencils for regular, irregular and irregular linear patches: │ │ │ │ │ -283 typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_i_n_t_> _I_n_d_e_x_A_r_r_a_y; │ │ │ │ │ -284 │ │ │ │ │ -285 void evaluateDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ -286 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ -287 void evalRegularDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ -288 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ -289 void evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ -290 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ -291 void evalMultiLinearDerivs(REAL const uv[2], REAL const patchPoints[], │ │ │ │ │ -292 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &, REAL * derivs[]) const; │ │ │ │ │ -293 │ │ │ │ │ -294 void evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ -295 _I_n_d_e_x_A_r_r_a_y evalIrregularBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ -296 int evalMultiLinearBasis(REAL const uv[2], REAL * wDeriv[]) const; │ │ │ │ │ -297 │ │ │ │ │ -298 int evaluateStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ -299 int evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ -300 int evalIrregularStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ -301 int evalMultiLinearStencils(REAL const uv[2], REAL * sDeriv[]) const; │ │ │ │ │ -302 │ │ │ │ │ -303 // Internal methods to compute patch points: │ │ │ │ │ -304 void computeLinearPatchPoints(REAL p[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &) const; │ │ │ │ │ -305 void computeIrregularPatchPoints(REAL p[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const &) const; │ │ │ │ │ -306 │ │ │ │ │ -307 // Internal methods specific to regular or irregular patches: │ │ │ │ │ -308 unsigned char getRegPatchType() const { return _data.getRegPatchType(); } │ │ │ │ │ -309 unsigned char getRegPatchMask() const { return _data.getRegPatchMask(); } │ │ │ │ │ -310 │ │ │ │ │ -311 internal::IrregularPatchType const & getIrregPatch() const; │ │ │ │ │ -312 │ │ │ │ │ -313private: │ │ │ │ │ -314 // Access to the set of member variables - provided to the Factory: │ │ │ │ │ -_3_1_5 friend class _S_u_r_f_a_c_e_F_a_c_t_o_r_y; │ │ │ │ │ -316 │ │ │ │ │ -317 internal::SurfaceData & getSurfaceData() { return _data; } │ │ │ │ │ -318 internal::SurfaceData const & getSurfaceData() const { return _data; } │ │ │ │ │ -319 │ │ │ │ │ -320private: │ │ │ │ │ -321 // All member variables encapsulated in a single class: │ │ │ │ │ -322 internal::SurfaceData _data; │ │ │ │ │ -323}; │ │ │ │ │ -324 │ │ │ │ │ -325 │ │ │ │ │ -326// │ │ │ │ │ -327// Simple inline methods composed of other methods: │ │ │ │ │ -328// │ │ │ │ │ -329template │ │ │ │ │ -330inline void │ │ │ │ │ -_3_3_1_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s(REAL points[], │ │ │ │ │ -332 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc) const { │ │ │ │ │ -333 │ │ │ │ │ -334 if (!IsRegular()) { │ │ │ │ │ -335 if (IsLinear()) { │ │ │ │ │ -336 computeLinearPatchPoints(points, pointDesc); │ │ │ │ │ -337 } else { │ │ │ │ │ -338 computeIrregularPatchPoints(points, pointDesc); │ │ │ │ │ -339 } │ │ │ │ │ -340 } │ │ │ │ │ -341} │ │ │ │ │ -342 │ │ │ │ │ -343template │ │ │ │ │ -344inline void │ │ │ │ │ -_3_4_5_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s( │ │ │ │ │ -346 REAL const meshPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & meshPointDesc, │ │ │ │ │ -347 REAL patchPoints[], _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & patchPointDesc) const { │ │ │ │ │ -348 │ │ │ │ │ -349 GatherControlPoints(meshPoints, meshPointDesc, patchPoints, │ │ │ │ │ -patchPointDesc); │ │ │ │ │ -350 ComputePatchPoints(patchPoints, patchPointDesc); │ │ │ │ │ -351} │ │ │ │ │ -352 │ │ │ │ │ -353// │ │ │ │ │ -354// Inline invocations of more general methods for derivative overloads: │ │ │ │ │ -355// │ │ │ │ │ -356template │ │ │ │ │ -357inline void │ │ │ │ │ -358_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_e_v_a_l_u_a_t_e_D_e_r_i_v_s(REAL const uv[2], │ │ │ │ │ -359 REAL const patchPoints[], │ │ │ │ │ -360 PointDescriptor const & pointDesc, │ │ │ │ │ -361 REAL * derivatives[]) const { │ │ │ │ │ -362 if (IsRegular()) { │ │ │ │ │ -363 evalRegularDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -364 } else if (IsLinear()) { │ │ │ │ │ -365 evalMultiLinearDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -366 } else { │ │ │ │ │ -367 evalIrregularDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -368 } │ │ │ │ │ -369} │ │ │ │ │ -370template │ │ │ │ │ -371inline void │ │ │ │ │ -_3_7_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -373 REAL const patchPoints[], │ │ │ │ │ -374 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -375 REAL P[]) const { │ │ │ │ │ -376 │ │ │ │ │ -377 REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 }; │ │ │ │ │ -378 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -379} │ │ │ │ │ -380template │ │ │ │ │ -381inline void │ │ │ │ │ -_3_8_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -383 REAL const patchPoints[], │ │ │ │ │ -384 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -385 REAL P[], REAL Du[], REAL Dv[]) const { │ │ │ │ │ -386 │ │ │ │ │ -387 REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 }; │ │ │ │ │ -388 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -389} │ │ │ │ │ -390template │ │ │ │ │ -391inline void │ │ │ │ │ -_3_9_2_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e(REAL const uv[2], │ │ │ │ │ -393 REAL const patchPoints[], │ │ │ │ │ -394 _P_o_i_n_t_D_e_s_c_r_i_p_t_o_r const & pointDesc, │ │ │ │ │ -395 REAL P[], REAL Du[], REAL Dv[], │ │ │ │ │ -396 REAL Duu[], REAL Duv[], REAL Dvv[]) const { │ │ │ │ │ -397 │ │ │ │ │ -398 REAL * derivatives[6] = { P, Du, Dv, Duu, Duv, Dvv }; │ │ │ │ │ -399 evaluateDerivs(uv, patchPoints, pointDesc, derivatives); │ │ │ │ │ -400} │ │ │ │ │ -401 │ │ │ │ │ -402template │ │ │ │ │ -403inline int │ │ │ │ │ -404_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_e_v_a_l_u_a_t_e_S_t_e_n_c_i_l_s(REAL const uv[2], REAL * sDeriv[]) const { │ │ │ │ │ -405 │ │ │ │ │ -406 if (IsRegular()) { │ │ │ │ │ -407 return evalRegularStencils(uv, sDeriv); │ │ │ │ │ -408 } else if (IsLinear()) { │ │ │ │ │ -409 return evalMultiLinearStencils(uv, sDeriv); │ │ │ │ │ -410 } else { │ │ │ │ │ -411 return evalIrregularStencils(uv, sDeriv); │ │ │ │ │ -412 } │ │ │ │ │ -413} │ │ │ │ │ -414template │ │ │ │ │ -415inline int │ │ │ │ │ -_4_1_6_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], REAL sP[]) const { │ │ │ │ │ -417 │ │ │ │ │ -418 REAL * derivativeStencils[6] = { sP, 0, 0, 0, 0, 0 }; │ │ │ │ │ -419 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ -420} │ │ │ │ │ -421template │ │ │ │ │ -422inline int │ │ │ │ │ -_4_2_3_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], │ │ │ │ │ -424 REAL sP[], REAL sDu[], REAL sDv[]) const { │ │ │ │ │ -425 │ │ │ │ │ -426 REAL * derivativeStencils[6] = { sP, sDu, sDv, 0, 0, 0 }; │ │ │ │ │ -427 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ -428} │ │ │ │ │ -429template │ │ │ │ │ -430inline int │ │ │ │ │ -_4_3_1_S_u_r_f_a_c_e_<_R_E_A_L_>_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l(REAL const uv[2], │ │ │ │ │ -432 REAL sP[], REAL sDu[], REAL sDv[], │ │ │ │ │ -433 REAL sDuu[], REAL sDuv[], REAL sDvv[]) const { │ │ │ │ │ -434 │ │ │ │ │ -435 REAL * derivativeStencils[6] = { sP, sDu, sDv, sDuu, sDuv, sDvv }; │ │ │ │ │ -436 return evaluateStencils(uv, derivativeStencils); │ │ │ │ │ -437} │ │ │ │ │ -438 │ │ │ │ │ -439} // end namespace Bfr │ │ │ │ │ -440 │ │ │ │ │ -441} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -442using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -443 │ │ │ │ │ -444} // end namespace OpenSubdiv │ │ │ │ │ -445 │ │ │ │ │ -446#endif /* OPENSUBDIV3_BFR_SURFACE */ │ │ │ │ │ +172} // end namespace Bfr │ │ │ │ │ +173 │ │ │ │ │ +174} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +175using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +176 │ │ │ │ │ +177} // end namespace OpenSubdiv │ │ │ │ │ +178 │ │ │ │ │ +179#endif /* OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Simple class defining the 2D parameterization of a face. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -int GetFaceSize() const │ │ │ │ │ -Returns the size (number of vertices) of the corresponding face. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_0_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e │ │ │ │ │ -Encapsulates the limit surface for a face of a mesh. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ -int GetNumControlPoints() const │ │ │ │ │ -Return the number of control points affecting the Surface. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_3_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_E_v_a_l_u_a_t_e │ │ │ │ │ -void Evaluate(REAL const uv[2], REAL const patchPoints[], PointDescriptor const │ │ │ │ │ -&pointDesc, REAL P[]) const │ │ │ │ │ -Evaluation of position. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -int GetFaceSize() const │ │ │ │ │ -Return the size of the face. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_R_e_g_u_l_a_r │ │ │ │ │ -bool IsRegular() const │ │ │ │ │ -Return if the Surface is a single regular patch. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_1_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ -void BoundControlPoints(REAL const controlPoints[], PointDescriptor const │ │ │ │ │ -&controlPointDesc, REAL minExtent[], REAL maxExtent[]) const │ │ │ │ │ -Compute bounds of control points from a local array. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_C_o_n_t_r_o_l_P_o_i_n_t_I_n_d_i_c_e_s │ │ │ │ │ -int GetControlPointIndices(Index meshPointIndices[]) const │ │ │ │ │ -Identify indices of control points in the mesh. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -Integer type representing a mesh index. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_A_p_p_l_y_S_t_e_n_c_i_l │ │ │ │ │ -void ApplyStencil(REAL const stencil[], REAL const controlPoints[], │ │ │ │ │ -PointDescriptor const &, REAL result[]) const │ │ │ │ │ -Apply a single stencil to control points from a local array. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Parameterization GetParameterization() const │ │ │ │ │ -Return the Parameterization. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_S_u_r_f_a_c_e │ │ │ │ │ -Surface() │ │ │ │ │ -Default construction produces an invalid instance. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_A_p_p_l_y_S_t_e_n_c_i_l_F_r_o_m_M_e_s_h │ │ │ │ │ -void ApplyStencilFromMesh(REAL const stencil[], REAL const meshPoints[], │ │ │ │ │ -PointDescriptor const &, REAL result[]) const │ │ │ │ │ -Apply a single stencil to control points from the mesh data. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -Surface & operator=(Surface const &src)=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_B_o_u_n_d_C_o_n_t_r_o_l_P_o_i_n_t_s_F_r_o_m_M_e_s_h │ │ │ │ │ -void BoundControlPointsFromMesh(REAL const meshPoints[], PointDescriptor const │ │ │ │ │ -&meshPointDesc, REAL minExtent[], REAL maxExtent[]) const │ │ │ │ │ -Compute bounds of control points from the mesh data. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_~_S_u_r_f_a_c_e │ │ │ │ │ -~Surface()=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_C_l_e_a_r │ │ │ │ │ -void Clear() │ │ │ │ │ -Clear a previously initialized Surface. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_8_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_S_u_r_f_a_c_e │ │ │ │ │ -Surface(Surface const &src)=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_r_e_p_a_r_e_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ -void PreparePatchPoints(REAL const meshPoints[], PointDescriptor const │ │ │ │ │ -&meshPointDesc, REAL patchPoints[], PointDescriptor const &patchPointDesc) │ │ │ │ │ -const │ │ │ │ │ -Prepare patch points in a local array for evaluation. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_4_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_V_a_l_i_d │ │ │ │ │ -bool IsValid() const │ │ │ │ │ -Return true if successfully initialized. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_a_t_h_e_r_C_o_n_t_r_o_l_P_o_i_n_t_s │ │ │ │ │ -void GatherControlPoints(REAL_MESH const meshPoints[], PointDescriptor const │ │ │ │ │ -&meshPointDesc, REAL controlPoints[], PointDescriptor const &controlPointDesc) │ │ │ │ │ -const │ │ │ │ │ -Gather control points in a local array. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_C_o_m_p_u_t_e_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ -void ComputePatchPoints(REAL patchPoints[], PointDescriptor const │ │ │ │ │ -&patchPointDesc) const │ │ │ │ │ -Compute all patch points following the control points. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_3_3_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_I_s_L_i_n_e_a_r │ │ │ │ │ -bool IsLinear() const │ │ │ │ │ -Return if the Surface is linear. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_1_1_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_G_e_t_N_u_m_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ -int GetNumPatchPoints() const │ │ │ │ │ -Return the number of patch points representing the Surface. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_E_v_a_l_u_a_t_e_S_t_e_n_c_i_l │ │ │ │ │ -int EvaluateStencil(REAL const uv[2], REAL sP[]) const │ │ │ │ │ -Evaluation of the limit stencil for position. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_4_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -Simple struct defining the size and stride of points in arrays. │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ -int stride │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_s_i_z_e │ │ │ │ │ -int size │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PointDescriptor(int n) │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PointDescriptor(int n, int m) │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r_:_:_P_o_i_n_t_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PointDescriptor() │ │ │ │ │ -DDeeffiinniittiioonn _s_u_r_f_a_c_e_._h_:_6_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ +int GetNumFaces() const │ │ │ │ │ +Return the number of faces. │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int GetNumFVarChannels() const │ │ │ │ │ +Return the number of face-varying channels. │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_8_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_:_G_e_t_M_e_s_h │ │ │ │ │ +Far::TopologyRefiner const & GetMesh() const │ │ │ │ │ +Return the instance of the mesh. │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +~RefinerSurfaceFactoryBase() override=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +RefinerSurfaceFactoryBase(Far::TopologyRefiner const &mesh, Options const │ │ │ │ │ +&options) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +Template for concrete subclasses of RefinerSurfaceFactoryBase. │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_~_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +~RefinerSurfaceFactory() override=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_R_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ +RefinerSurfaceFactory(Far::TopologyRefiner const &mesh, Options const │ │ │ │ │ +&options=Options()) │ │ │ │ │ +DDeeffiinniittiioonn _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_5_9 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y │ │ │ │ │ Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ │ DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_s_e_t_I_n_t_e_r_n_a_l_C_a_c_h_e │ │ │ │ │ +void setInternalCache(SurfaceFactoryCache *cache) │ │ │ │ │ +Subclass to identify an internal cache for use by base class. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Simple set of options assigned to instances of SurfaceFactory. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h_:_1_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int │ │ │ │ │ +faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0 │ │ │ │ │ +Gather face-varying indices of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_c_i_d_e_n_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int │ │ │ │ │ +faceVertex, Index vertexIndices[]) const =0 │ │ │ │ │ +Gather vertex indices of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_g_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +virtual int getFaceSize(Index faceIndex) const =0 │ │ │ │ │ +Returns the size of a face (number of vertices) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +Integer type representing a mesh index. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_p_o_p_u_l_a_t_e_F_a_c_e_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, │ │ │ │ │ +VertexDescriptor *vertexDescriptor) const =0 │ │ │ │ │ +Describe the topology of incident faces around a face-vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_V_e_r_t_e_x_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ +virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index │ │ │ │ │ +vertexIndices[]) const │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_N_e_i_g_h_b_o_r_h_o_o_d_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s_I_f_R_e_g_u_l_a_r │ │ │ │ │ +virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, │ │ │ │ │ +FVarID fvarID, Index fvarValueIndices[]) const │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_2_2_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index │ │ │ │ │ +fvarValueIndices[]) const =0 │ │ │ │ │ +Gather the face-varying indices of the face's vertices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_: │ │ │ │ │ +_g_e_t_F_a_c_e_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const │ │ │ │ │ +=0 │ │ │ │ │ +Gather the indices of the face's vertices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_i_s_F_a_c_e_H_o_l_e │ │ │ │ │ +virtual bool isFaceHole(Index faceIndex) const =0 │ │ │ │ │ +Returns if a face is a hole. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_S_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_:_:_F_V_a_r_I_D │ │ │ │ │ +std::intptr_t FVarID │ │ │ │ │ +Type used to identify and specify face-varying primvars. │ │ │ │ │ +DDeeffiinniittiioonn _s_u_r_f_a_c_e_F_a_c_t_o_r_y_M_e_s_h_A_d_a_p_t_e_r_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +Simple class used by subclasses of SurfaceFactory to describe a vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_1_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +Stores topology data for a specified set of refinement options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_._h │ │ │ │ │ + * _r_e_f_i_n_e_r_S_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/parameterization.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/limits.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
parameterization.h File Reference
│ │ │ │ +
limits.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ +#include "../far/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Parameterization
 Simple class defining the 2D parameterization of a face. More...
struct  Limits
 Simple struct with limits related to topology. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -parameterization.h File Reference │ │ │ │ │ +limits.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -  Simple class defining the 2D parameterization of a face. _M_o_r_e_._._. │ │ │ │ │ +struct   _L_i_m_i_t_s │ │ │ │ │ +  Simple struct with limits related to topology. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ + * _l_i_m_i_t_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00695 = [ │ │ │ │ │ - ["Parameterization", "a00921.html", "a00921"] │ │ │ │ │ + ["Limits", "a00917.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/parameterization.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/limits.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
parameterization.h
│ │ │ │ +
limits.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,200 +119,55 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_LIMITS_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_LIMITS_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../sdc/types.h"
│ │ │ │ +
30#include "../far/types.h"
│ │ │ │
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
│ │ │ │ +
35namespace Bfr {
│ │ │ │
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53public:
│ │ │ │ -
62 enum Type { QUAD,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
65 };
│ │ │ │ -
66
│ │ │ │ -
67public:
│ │ │ │ -
69
│ │ │ │ -
76
│ │ │ │ -
78 Parameterization(Sdc::SchemeType scheme, int faceSize);
│ │ │ │ -
79
│ │ │ │ -
81 bool IsValid() const { return (_faceSize > 0); }
│ │ │ │ -
82
│ │ │ │ -
84 Parameterization() : _type(0), _uDim(0), _faceSize(0) { }
│ │ │ │ -
85
│ │ │ │ - │ │ │ │ - │ │ │ │ -
88 ~Parameterization() = default;
│ │ │ │ -
90
│ │ │ │ -
92
│ │ │ │ -
96
│ │ │ │ -
98 Type GetType() const { return (Type) _type; }
│ │ │ │ -
99
│ │ │ │ -
101 int GetFaceSize() const { return _faceSize; }
│ │ │ │ -
103
│ │ │ │ -
104public:
│ │ │ │ -
106
│ │ │ │ -
116
│ │ │ │ -
118 template <typename REAL>
│ │ │ │ -
119 void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const;
│ │ │ │ -
120
│ │ │ │ -
122 template <typename REAL>
│ │ │ │ -
123 void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const;
│ │ │ │ -
124
│ │ │ │ -
126 template <typename REAL>
│ │ │ │ -
127 void GetCenterCoord(REAL uvCoord[2]) const;
│ │ │ │ -
129
│ │ │ │ -
130public:
│ │ │ │ -
132
│ │ │ │ -
147
│ │ │ │ -
149 bool HasSubFaces() const;
│ │ │ │ -
150
│ │ │ │ -
152 template <typename REAL>
│ │ │ │ -
153 int GetSubFace(REAL const uvCoord[2]) const;
│ │ │ │ -
154
│ │ │ │ -
157 template <typename REAL>
│ │ │ │ - │ │ │ │ -
159 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ -
160
│ │ │ │ -
162 template <typename REAL>
│ │ │ │ -
163 void ConvertSubFaceToCoord(int subFace,
│ │ │ │ -
164 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ -
165
│ │ │ │ -
168 template <typename REAL>
│ │ │ │ - │ │ │ │ -
170 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ -
171
│ │ │ │ -
173 template <typename REAL>
│ │ │ │ -
174 void ConvertNormalizedSubFaceToCoord(int subFace,
│ │ │ │ -
175 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ -
177
│ │ │ │ -
178private:
│ │ │ │ -
179 template <typename REAL>
│ │ │ │ -
180 int convertCoordToSubFace(bool normalized,
│ │ │ │ -
181 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ -
182 template <typename REAL>
│ │ │ │ -
183 void convertSubFaceToCoord(bool normalized, int subFace,
│ │ │ │ -
184 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ -
185
│ │ │ │ -
186private:
│ │ │ │ -
187 unsigned char _type;
│ │ │ │ -
188 unsigned char _uDim;
│ │ │ │ -
189 unsigned short _faceSize;
│ │ │ │ -
190};
│ │ │ │ -
│ │ │ │ -
191
│ │ │ │ -
192//
│ │ │ │ -
193// Inline sub-face coordinate conversion methods:
│ │ │ │ -
194//
│ │ │ │ -
195inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
197 return (_type == QUAD_SUBFACES);
│ │ │ │ -
198}
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200template <typename REAL>
│ │ │ │ -
201inline int
│ │ │ │ -
│ │ │ │ -
202Parameterization::GetSubFace(REAL const uvCoord[2]) const {
│ │ │ │ -
203
│ │ │ │ -
204 if (!HasSubFaces()) return 0;
│ │ │ │ -
205
│ │ │ │ -
206 int uTile = (int) uvCoord[0];
│ │ │ │ -
207 int vTile = (int) uvCoord[1];
│ │ │ │ -
208 return (vTile + ((uvCoord[1] - (REAL) vTile) > 0.75f)) * _uDim +
│ │ │ │ -
209 (uTile + ((uvCoord[0] - (REAL) uTile) > 0.75f));
│ │ │ │ -
210}
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
212// Conversions to unnormalized sub-face coordinates:
│ │ │ │ -
213template <typename REAL>
│ │ │ │ -
214inline int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
216 REAL const uvCoord[2], REAL subCoord[2]) const {
│ │ │ │ -
217 return convertCoordToSubFace<REAL>(false, uvCoord, subCoord);
│ │ │ │ -
218}
│ │ │ │ -
│ │ │ │ -
219template <typename REAL>
│ │ │ │ -
220inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
222 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const {
│ │ │ │ -
223 convertSubFaceToCoord<REAL>(false, subFace, subCoord, uvCoord);
│ │ │ │ -
224}
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226// Conversions to normalized sub-face coordinates:
│ │ │ │ -
227template <typename REAL>
│ │ │ │ -
228inline int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
230 REAL const uvCoord[2], REAL subCoord[2]) const {
│ │ │ │ -
231 return convertCoordToSubFace<REAL>(true, uvCoord, subCoord);
│ │ │ │ -
232}
│ │ │ │ -
│ │ │ │ -
233template <typename REAL>
│ │ │ │ -
234inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
236 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const {
│ │ │ │ -
237 convertSubFaceToCoord<REAL>(true, subFace, subCoord, uvCoord);
│ │ │ │ -
238}
│ │ │ │ -
│ │ │ │ -
239
│ │ │ │ -
240} // end namespace Bfr
│ │ │ │ -
241
│ │ │ │ -
242} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
243using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
244
│ │ │ │ -
245} // end namespace OpenSubdiv
│ │ │ │ -
246
│ │ │ │ -
247#endif /* OPENSUBDIV3_BFR_PARAMETERIZATION */
│ │ │ │ - │ │ │ │ -
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ -
Simple class defining the 2D parameterization of a face.
│ │ │ │ -
int GetSubFace(REAL const uvCoord[2]) const
Returns the integer sub-face containing the given (u,v)
│ │ │ │ -
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │ -
Type
Enumerated type for the different kinds of Parameterizations.
│ │ │ │ -
@ QUAD_SUBFACES
Partitioned into quadrilateral sub-faces.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Parameterization(Sdc::SchemeType scheme, int faceSize)
Primary constructor with subdivision scheme and face size.
│ │ │ │ -
int ConvertCoordToSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const
Convert (u,v) to a sub-face (return value) and its local (u,v) coordinate.
│ │ │ │ -
void GetCenterCoord(REAL uvCoord[2]) const
Returns the (u,v) coordinate for the center of the face.
│ │ │ │ -
Type GetType() const
Returns the type of parameterization assigned.
│ │ │ │ - │ │ │ │ -
Parameterization(Parameterization const &)=default
│ │ │ │ -
void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const
Returns the (u,v) coordinate at any point on a given edge.
│ │ │ │ -
void ConvertNormalizedSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL uvCoord[2]) const
Convert a sub-face and its normalized (u,v) coordinate to (u,v)
│ │ │ │ -
void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const
Returns the (u,v) coordinate of a given vertex.
│ │ │ │ -
Parameterization()
Default construction produces an invalid instance.
│ │ │ │ -
bool IsValid() const
Returns true if correctly initialized.
│ │ │ │ -
bool HasSubFaces() const
Returns if Parameterization has been partitioned into sub-faces.
│ │ │ │ -
int ConvertCoordToNormalizedSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const
Convert (u,v) to a sub-face (return value) and its normalized (u,v) coordinate.
│ │ │ │ -
void ConvertSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL uvCoord[2]) const
Convert a sub-face and its local (u,v) coordinate to (u,v)
│ │ │ │ -
Parameterization & operator=(Parameterization const &)=default
│ │ │ │ +
│ │ │ │ +
40struct Limits {
│ │ │ │ +
42 static int MaxValence() { return Far::VALENCE_LIMIT; }
│ │ │ │ +
43
│ │ │ │ +
46 static int MaxFaceSize() { return Far::VALENCE_LIMIT; }
│ │ │ │ +
47};
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49} // end namespace Bfr
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
│ │ │ │ +
52using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
53} // end namespace OpenSubdiv
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55#endif /* OPENSUBDIV3_BFR_LIMITS_H */
│ │ │ │ + │ │ │ │ +
Simple struct with limits related to topology.
Definition limits.h:40
│ │ │ │ +
static int MaxFaceSize()
Returns the maximum allowable size for a face (number of vertices)
Definition limits.h:46
│ │ │ │ +
static int MaxValence()
Returns the maximum allowable valence for a vertex.
Definition limits.h:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -parameterization.h │ │ │ │ │ +limits.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,243 +24,49 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../sdc/types.h" │ │ │ │ │ +30#include "../far/types.h" │ │ │ │ │ 31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +_3_2namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +_3_3namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -35namespace Bfr { │ │ │ │ │ +_3_5namespace Bfr { │ │ │ │ │ 36 │ │ │ │ │ -_5_2class _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n { │ │ │ │ │ -53public: │ │ │ │ │ -_6_2 enum _T_y_p_e { _Q_U_A_D, │ │ │ │ │ -_6_3 _T_R_I, │ │ │ │ │ -64 _Q_U_A_D___S_U_B_F_A_C_E_S │ │ │ │ │ -_6_5 }; │ │ │ │ │ -66 │ │ │ │ │ -67public: │ │ │ │ │ -69 │ │ │ │ │ -76 │ │ │ │ │ -_7_8 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e scheme, int faceSize); │ │ │ │ │ -79 │ │ │ │ │ -_8_1 bool _I_s_V_a_l_i_d() const { return (_faceSize > 0); } │ │ │ │ │ -82 │ │ │ │ │ -_8_4 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() : _type(0), _uDim(0), _faceSize(0) { } │ │ │ │ │ -85 │ │ │ │ │ -_8_6 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const &) = default; │ │ │ │ │ -_8_7 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n & _o_p_e_r_a_t_o_r_=(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const &) = default; │ │ │ │ │ -_8_8 _~_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() = default; │ │ │ │ │ -90 │ │ │ │ │ -92 │ │ │ │ │ -96 │ │ │ │ │ -_9_8 _T_y_p_e _G_e_t_T_y_p_e() const { return (_T_y_p_e) _type; } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_1 int _G_e_t_F_a_c_e_S_i_z_e() const { return _faceSize; } │ │ │ │ │ -103 │ │ │ │ │ -104public: │ │ │ │ │ -106 │ │ │ │ │ -116 │ │ │ │ │ -118 template │ │ │ │ │ -_1_1_9 void _G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertexIndex, REAL uvCoord[2]) const; │ │ │ │ │ -120 │ │ │ │ │ -122 template │ │ │ │ │ -_1_2_3 void _G_e_t_E_d_g_e_C_o_o_r_d(int edgeIndex, REAL t, REAL uvCoord[2]) const; │ │ │ │ │ -124 │ │ │ │ │ -126 template │ │ │ │ │ -_1_2_7 void _G_e_t_C_e_n_t_e_r_C_o_o_r_d(REAL uvCoord[2]) const; │ │ │ │ │ -129 │ │ │ │ │ -130public: │ │ │ │ │ -132 │ │ │ │ │ -147 │ │ │ │ │ -149 bool _H_a_s_S_u_b_F_a_c_e_s() const; │ │ │ │ │ -150 │ │ │ │ │ -152 template │ │ │ │ │ -153 int _G_e_t_S_u_b_F_a_c_e(REAL const uvCoord[2]) const; │ │ │ │ │ -154 │ │ │ │ │ -157 template │ │ │ │ │ -158 int _C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e( │ │ │ │ │ -159 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ -160 │ │ │ │ │ -162 template │ │ │ │ │ -163 void _C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d(int subFace, │ │ │ │ │ -164 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ -165 │ │ │ │ │ -168 template │ │ │ │ │ -169 int _C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e( │ │ │ │ │ -170 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ -171 │ │ │ │ │ -173 template │ │ │ │ │ -174 void _C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d(int subFace, │ │ │ │ │ -175 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ -177 │ │ │ │ │ -178private: │ │ │ │ │ -179 template │ │ │ │ │ -180 int convertCoordToSubFace(bool normalized, │ │ │ │ │ -181 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ -182 template │ │ │ │ │ -183 void convertSubFaceToCoord(bool normalized, int subFace, │ │ │ │ │ -184 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ -185 │ │ │ │ │ -186private: │ │ │ │ │ -187 unsigned char _type; │ │ │ │ │ -188 unsigned char _uDim; │ │ │ │ │ -189 unsigned short _faceSize; │ │ │ │ │ -190}; │ │ │ │ │ -191 │ │ │ │ │ -192// │ │ │ │ │ -193// Inline sub-face coordinate conversion methods: │ │ │ │ │ -194// │ │ │ │ │ -195inline bool │ │ │ │ │ -_1_9_6_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_H_a_s_S_u_b_F_a_c_e_s() const { │ │ │ │ │ -197 return (_type == _Q_U_A_D___S_U_B_F_A_C_E_S); │ │ │ │ │ -198} │ │ │ │ │ -199 │ │ │ │ │ -200template │ │ │ │ │ -201inline int │ │ │ │ │ -_2_0_2_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_S_u_b_F_a_c_e(REAL const uvCoord[2]) const { │ │ │ │ │ -203 │ │ │ │ │ -204 if (!_H_a_s_S_u_b_F_a_c_e_s()) return 0; │ │ │ │ │ -205 │ │ │ │ │ -206 int uTile = (int) uvCoord[0]; │ │ │ │ │ -207 int vTile = (int) uvCoord[1]; │ │ │ │ │ -208 return (vTile + ((uvCoord[1] - (REAL) vTile) > 0.75f)) * _uDim + │ │ │ │ │ -209 (uTile + ((uvCoord[0] - (REAL) uTile) > 0.75f)); │ │ │ │ │ -210} │ │ │ │ │ -211 │ │ │ │ │ -212// Conversions to unnormalized sub-face coordinates: │ │ │ │ │ -213template │ │ │ │ │ -214inline int │ │ │ │ │ -_2_1_5_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e( │ │ │ │ │ -216 REAL const uvCoord[2], REAL subCoord[2]) const { │ │ │ │ │ -217 return convertCoordToSubFace(false, uvCoord, subCoord); │ │ │ │ │ -218} │ │ │ │ │ -219template │ │ │ │ │ -220inline void │ │ │ │ │ -_2_2_1_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d( │ │ │ │ │ -222 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const { │ │ │ │ │ -223 convertSubFaceToCoord(false, subFace, subCoord, uvCoord); │ │ │ │ │ -224} │ │ │ │ │ -225 │ │ │ │ │ -226// Conversions to normalized sub-face coordinates: │ │ │ │ │ -227template │ │ │ │ │ -228inline int │ │ │ │ │ -_2_2_9_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e( │ │ │ │ │ -230 REAL const uvCoord[2], REAL subCoord[2]) const { │ │ │ │ │ -231 return convertCoordToSubFace(true, uvCoord, subCoord); │ │ │ │ │ -232} │ │ │ │ │ -233template │ │ │ │ │ -234inline void │ │ │ │ │ -_2_3_5_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d( │ │ │ │ │ -236 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const { │ │ │ │ │ -237 convertSubFaceToCoord(true, subFace, subCoord, uvCoord); │ │ │ │ │ -238} │ │ │ │ │ -239 │ │ │ │ │ -240} // end namespace Bfr │ │ │ │ │ -241 │ │ │ │ │ -242} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -243using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -244 │ │ │ │ │ -245} // end namespace OpenSubdiv │ │ │ │ │ -246 │ │ │ │ │ -247#endif /* OPENSUBDIV3_BFR_PARAMETERIZATION */ │ │ │ │ │ +_4_0struct _L_i_m_i_t_s { │ │ │ │ │ +_4_2 static int _M_a_x_V_a_l_e_n_c_e() { return Far::VALENCE_LIMIT; } │ │ │ │ │ +43 │ │ │ │ │ +_4_6 static int _M_a_x_F_a_c_e_S_i_z_e() { return Far::VALENCE_LIMIT; } │ │ │ │ │ +47}; │ │ │ │ │ +48 │ │ │ │ │ +49} // end namespace Bfr │ │ │ │ │ +50 │ │ │ │ │ +51} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +52using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +53} // end namespace OpenSubdiv │ │ │ │ │ +54 │ │ │ │ │ +55#endif /* OPENSUBDIV3_BFR_LIMITS_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ -SchemeType │ │ │ │ │ -Enumerated type for all subdivision schemes supported by OpenSubdiv. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Simple class defining the 2D parameterization of a face. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_S_u_b_F_a_c_e │ │ │ │ │ -int GetSubFace(REAL const uvCoord[2]) const │ │ │ │ │ -Returns the integer sub-face containing the given (u,v) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -int GetFaceSize() const │ │ │ │ │ -Returns the size (number of vertices) of the corresponding face. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_0_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -Enumerated type for the different kinds of Parameterizations. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_Q_U_A_D___S_U_B_F_A_C_E_S │ │ │ │ │ -@ QUAD_SUBFACES │ │ │ │ │ -Partitioned into quadrilateral sub-faces. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_T_R_I │ │ │ │ │ -@ TRI │ │ │ │ │ -Triangle. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_Q_U_A_D │ │ │ │ │ -@ QUAD │ │ │ │ │ -Quadrilateral. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Parameterization(Sdc::SchemeType scheme, int faceSize) │ │ │ │ │ -Primary constructor with subdivision scheme and face size. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e │ │ │ │ │ -int ConvertCoordToSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const │ │ │ │ │ -Convert (u,v) to a sub-face (return value) and its local (u,v) coordinate. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_1_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_C_e_n_t_e_r_C_o_o_r_d │ │ │ │ │ -void GetCenterCoord(REAL uvCoord[2]) const │ │ │ │ │ -Returns the (u,v) coordinate for the center of the face. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_T_y_p_e │ │ │ │ │ -Type GetType() const │ │ │ │ │ -Returns the type of parameterization assigned. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_~_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -~Parameterization()=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Parameterization(Parameterization const &)=default │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_E_d_g_e_C_o_o_r_d │ │ │ │ │ -void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const │ │ │ │ │ -Returns the (u,v) coordinate at any point on a given edge. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_: │ │ │ │ │ -_C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d │ │ │ │ │ -void ConvertNormalizedSubFaceToCoord(int subFace, REAL const subFaceCoord[2], │ │ │ │ │ -REAL uvCoord[2]) const │ │ │ │ │ -Convert a sub-face and its normalized (u,v) coordinate to (u,v) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_3_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d │ │ │ │ │ -void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const │ │ │ │ │ -Returns the (u,v) coordinate of a given vertex. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ -Parameterization() │ │ │ │ │ -Default construction produces an invalid instance. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_8_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_I_s_V_a_l_i_d │ │ │ │ │ -bool IsValid() const │ │ │ │ │ -Returns true if correctly initialized. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_H_a_s_S_u_b_F_a_c_e_s │ │ │ │ │ -bool HasSubFaces() const │ │ │ │ │ -Returns if Parameterization has been partitioned into sub-faces. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_: │ │ │ │ │ -_C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e │ │ │ │ │ -int ConvertCoordToNormalizedSubFace(REAL const uvCoord[2], REAL subFaceCoord │ │ │ │ │ -[2]) const │ │ │ │ │ -Convert (u,v) to a sub-face (return value) and its normalized (u,v) coordinate. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_2_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d │ │ │ │ │ -void ConvertSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL │ │ │ │ │ -uvCoord[2]) const │ │ │ │ │ -Convert a sub-face and its local (u,v) coordinate to (u,v) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -Parameterization & operator=(Parameterization const &)=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s │ │ │ │ │ +Simple struct with limits related to topology. │ │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s_:_:_M_a_x_F_a_c_e_S_i_z_e │ │ │ │ │ +static int MaxFaceSize() │ │ │ │ │ +Returns the maximum allowable size for a face (number of vertices) │ │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s_:_:_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ +static int MaxValence() │ │ │ │ │ +Returns the maximum allowable valence for a vertex. │ │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ + * _l_i_m_i_t_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/limits.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/parameterization.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
limits.h File Reference
│ │ │ │ +
parameterization.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/types.h"
│ │ │ │ +#include "../sdc/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Limits
 Simple struct with limits related to topology. More...
class  Parameterization
 Simple class defining the 2D parameterization of a face. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -limits.h File Reference │ │ │ │ │ +parameterization.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _L_i_m_i_t_s │ │ │ │ │ -  Simple struct with limits related to topology. _M_o_r_e_._._. │ │ │ │ │ +class   _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +  Simple class defining the 2D parameterization of a face. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _l_i_m_i_t_s_._h │ │ │ │ │ + * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00698 = [ │ │ │ │ │ - ["Limits", "a00917.html", null] │ │ │ │ │ + ["Parameterization", "a00921.html", "a00921"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/limits.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/parameterization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
limits.h
│ │ │ │ +
parameterization.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2021 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,55 +119,200 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_BFR_LIMITS_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_LIMITS_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H
│ │ │ │ +
26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../far/types.h"
│ │ │ │ +
30#include "../sdc/types.h"
│ │ │ │
31
│ │ │ │ -
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │
34
│ │ │ │ -
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
35namespace Bfr {
│ │ │ │
36
│ │ │ │ -
│ │ │ │ -
40struct Limits {
│ │ │ │ -
42 static int MaxValence() { return Far::VALENCE_LIMIT; }
│ │ │ │ -
43
│ │ │ │ -
46 static int MaxFaceSize() { return Far::VALENCE_LIMIT; }
│ │ │ │ -
47};
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49} // end namespace Bfr
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
51} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
│ │ │ │ -
52using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
53} // end namespace OpenSubdiv
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55#endif /* OPENSUBDIV3_BFR_LIMITS_H */
│ │ │ │ - │ │ │ │ -
Simple struct with limits related to topology.
Definition limits.h:40
│ │ │ │ -
static int MaxFaceSize()
Returns the maximum allowable size for a face (number of vertices)
Definition limits.h:46
│ │ │ │ -
static int MaxValence()
Returns the maximum allowable valence for a vertex.
Definition limits.h:42
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53public:
│ │ │ │ +
62 enum Type { QUAD,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
65 };
│ │ │ │ +
66
│ │ │ │ +
67public:
│ │ │ │ +
69
│ │ │ │ +
76
│ │ │ │ +
78 Parameterization(Sdc::SchemeType scheme, int faceSize);
│ │ │ │ +
79
│ │ │ │ +
81 bool IsValid() const { return (_faceSize > 0); }
│ │ │ │ +
82
│ │ │ │ +
84 Parameterization() : _type(0), _uDim(0), _faceSize(0) { }
│ │ │ │ +
85
│ │ │ │ + │ │ │ │ + │ │ │ │ +
88 ~Parameterization() = default;
│ │ │ │ +
90
│ │ │ │ +
92
│ │ │ │ +
96
│ │ │ │ +
98 Type GetType() const { return (Type) _type; }
│ │ │ │ +
99
│ │ │ │ +
101 int GetFaceSize() const { return _faceSize; }
│ │ │ │ +
103
│ │ │ │ +
104public:
│ │ │ │ +
106
│ │ │ │ +
116
│ │ │ │ +
118 template <typename REAL>
│ │ │ │ +
119 void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const;
│ │ │ │ +
120
│ │ │ │ +
122 template <typename REAL>
│ │ │ │ +
123 void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const;
│ │ │ │ +
124
│ │ │ │ +
126 template <typename REAL>
│ │ │ │ +
127 void GetCenterCoord(REAL uvCoord[2]) const;
│ │ │ │ +
129
│ │ │ │ +
130public:
│ │ │ │ +
132
│ │ │ │ +
147
│ │ │ │ +
149 bool HasSubFaces() const;
│ │ │ │ +
150
│ │ │ │ +
152 template <typename REAL>
│ │ │ │ +
153 int GetSubFace(REAL const uvCoord[2]) const;
│ │ │ │ +
154
│ │ │ │ +
157 template <typename REAL>
│ │ │ │ + │ │ │ │ +
159 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ +
160
│ │ │ │ +
162 template <typename REAL>
│ │ │ │ +
163 void ConvertSubFaceToCoord(int subFace,
│ │ │ │ +
164 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ +
165
│ │ │ │ +
168 template <typename REAL>
│ │ │ │ + │ │ │ │ +
170 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ +
171
│ │ │ │ +
173 template <typename REAL>
│ │ │ │ +
174 void ConvertNormalizedSubFaceToCoord(int subFace,
│ │ │ │ +
175 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ +
177
│ │ │ │ +
178private:
│ │ │ │ +
179 template <typename REAL>
│ │ │ │ +
180 int convertCoordToSubFace(bool normalized,
│ │ │ │ +
181 REAL const uvCoord[2], REAL subFaceCoord[2]) const;
│ │ │ │ +
182 template <typename REAL>
│ │ │ │ +
183 void convertSubFaceToCoord(bool normalized, int subFace,
│ │ │ │ +
184 REAL const subFaceCoord[2], REAL uvCoord[2]) const;
│ │ │ │ +
185
│ │ │ │ +
186private:
│ │ │ │ +
187 unsigned char _type;
│ │ │ │ +
188 unsigned char _uDim;
│ │ │ │ +
189 unsigned short _faceSize;
│ │ │ │ +
190};
│ │ │ │ +
│ │ │ │ +
191
│ │ │ │ +
192//
│ │ │ │ +
193// Inline sub-face coordinate conversion methods:
│ │ │ │ +
194//
│ │ │ │ +
195inline bool
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
197 return (_type == QUAD_SUBFACES);
│ │ │ │ +
198}
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
200template <typename REAL>
│ │ │ │ +
201inline int
│ │ │ │ +
│ │ │ │ +
202Parameterization::GetSubFace(REAL const uvCoord[2]) const {
│ │ │ │ +
203
│ │ │ │ +
204 if (!HasSubFaces()) return 0;
│ │ │ │ +
205
│ │ │ │ +
206 int uTile = (int) uvCoord[0];
│ │ │ │ +
207 int vTile = (int) uvCoord[1];
│ │ │ │ +
208 return (vTile + ((uvCoord[1] - (REAL) vTile) > 0.75f)) * _uDim +
│ │ │ │ +
209 (uTile + ((uvCoord[0] - (REAL) uTile) > 0.75f));
│ │ │ │ +
210}
│ │ │ │ +
│ │ │ │ +
211
│ │ │ │ +
212// Conversions to unnormalized sub-face coordinates:
│ │ │ │ +
213template <typename REAL>
│ │ │ │ +
214inline int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
216 REAL const uvCoord[2], REAL subCoord[2]) const {
│ │ │ │ +
217 return convertCoordToSubFace<REAL>(false, uvCoord, subCoord);
│ │ │ │ +
218}
│ │ │ │ +
│ │ │ │ +
219template <typename REAL>
│ │ │ │ +
220inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
222 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const {
│ │ │ │ +
223 convertSubFaceToCoord<REAL>(false, subFace, subCoord, uvCoord);
│ │ │ │ +
224}
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226// Conversions to normalized sub-face coordinates:
│ │ │ │ +
227template <typename REAL>
│ │ │ │ +
228inline int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
230 REAL const uvCoord[2], REAL subCoord[2]) const {
│ │ │ │ +
231 return convertCoordToSubFace<REAL>(true, uvCoord, subCoord);
│ │ │ │ +
232}
│ │ │ │ +
│ │ │ │ +
233template <typename REAL>
│ │ │ │ +
234inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
236 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const {
│ │ │ │ +
237 convertSubFaceToCoord<REAL>(true, subFace, subCoord, uvCoord);
│ │ │ │ +
238}
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
240} // end namespace Bfr
│ │ │ │ +
241
│ │ │ │ +
242} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
243using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
244
│ │ │ │ +
245} // end namespace OpenSubdiv
│ │ │ │ +
246
│ │ │ │ +
247#endif /* OPENSUBDIV3_BFR_PARAMETERIZATION */
│ │ │ │ + │ │ │ │ +
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ +
Simple class defining the 2D parameterization of a face.
│ │ │ │ +
int GetSubFace(REAL const uvCoord[2]) const
Returns the integer sub-face containing the given (u,v)
│ │ │ │ +
int GetFaceSize() const
Returns the size (number of vertices) of the corresponding face.
│ │ │ │ +
Type
Enumerated type for the different kinds of Parameterizations.
│ │ │ │ +
@ QUAD_SUBFACES
Partitioned into quadrilateral sub-faces.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Parameterization(Sdc::SchemeType scheme, int faceSize)
Primary constructor with subdivision scheme and face size.
│ │ │ │ +
int ConvertCoordToSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const
Convert (u,v) to a sub-face (return value) and its local (u,v) coordinate.
│ │ │ │ +
void GetCenterCoord(REAL uvCoord[2]) const
Returns the (u,v) coordinate for the center of the face.
│ │ │ │ +
Type GetType() const
Returns the type of parameterization assigned.
│ │ │ │ + │ │ │ │ +
Parameterization(Parameterization const &)=default
│ │ │ │ +
void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const
Returns the (u,v) coordinate at any point on a given edge.
│ │ │ │ +
void ConvertNormalizedSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL uvCoord[2]) const
Convert a sub-face and its normalized (u,v) coordinate to (u,v)
│ │ │ │ +
void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const
Returns the (u,v) coordinate of a given vertex.
│ │ │ │ +
Parameterization()
Default construction produces an invalid instance.
│ │ │ │ +
bool IsValid() const
Returns true if correctly initialized.
│ │ │ │ +
bool HasSubFaces() const
Returns if Parameterization has been partitioned into sub-faces.
│ │ │ │ +
int ConvertCoordToNormalizedSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const
Convert (u,v) to a sub-face (return value) and its normalized (u,v) coordinate.
│ │ │ │ +
void ConvertSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL uvCoord[2]) const
Convert a sub-face and its local (u,v) coordinate to (u,v)
│ │ │ │ +
Parameterization & operator=(Parameterization const &)=default
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -limits.h │ │ │ │ │ +parameterization.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2021 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,49 +24,243 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/types.h" │ │ │ │ │ +30#include "../sdc/types.h" │ │ │ │ │ 31 │ │ │ │ │ -_3_2namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -_3_3namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -_3_5namespace Bfr { │ │ │ │ │ +35namespace Bfr { │ │ │ │ │ 36 │ │ │ │ │ -_4_0struct _L_i_m_i_t_s { │ │ │ │ │ -_4_2 static int _M_a_x_V_a_l_e_n_c_e() { return Far::VALENCE_LIMIT; } │ │ │ │ │ -43 │ │ │ │ │ -_4_6 static int _M_a_x_F_a_c_e_S_i_z_e() { return Far::VALENCE_LIMIT; } │ │ │ │ │ -47}; │ │ │ │ │ -48 │ │ │ │ │ -49} // end namespace Bfr │ │ │ │ │ -50 │ │ │ │ │ -51} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -52using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -53} // end namespace OpenSubdiv │ │ │ │ │ -54 │ │ │ │ │ -55#endif /* OPENSUBDIV3_BFR_LIMITS_H */ │ │ │ │ │ +_5_2class _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n { │ │ │ │ │ +53public: │ │ │ │ │ +_6_2 enum _T_y_p_e { _Q_U_A_D, │ │ │ │ │ +_6_3 _T_R_I, │ │ │ │ │ +64 _Q_U_A_D___S_U_B_F_A_C_E_S │ │ │ │ │ +_6_5 }; │ │ │ │ │ +66 │ │ │ │ │ +67public: │ │ │ │ │ +69 │ │ │ │ │ +76 │ │ │ │ │ +_7_8 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e scheme, int faceSize); │ │ │ │ │ +79 │ │ │ │ │ +_8_1 bool _I_s_V_a_l_i_d() const { return (_faceSize > 0); } │ │ │ │ │ +82 │ │ │ │ │ +_8_4 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() : _type(0), _uDim(0), _faceSize(0) { } │ │ │ │ │ +85 │ │ │ │ │ +_8_6 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const &) = default; │ │ │ │ │ +_8_7 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n & _o_p_e_r_a_t_o_r_=(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const &) = default; │ │ │ │ │ +_8_8 _~_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n() = default; │ │ │ │ │ +90 │ │ │ │ │ +92 │ │ │ │ │ +96 │ │ │ │ │ +_9_8 _T_y_p_e _G_e_t_T_y_p_e() const { return (_T_y_p_e) _type; } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_1 int _G_e_t_F_a_c_e_S_i_z_e() const { return _faceSize; } │ │ │ │ │ +103 │ │ │ │ │ +104public: │ │ │ │ │ +106 │ │ │ │ │ +116 │ │ │ │ │ +118 template │ │ │ │ │ +_1_1_9 void _G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertexIndex, REAL uvCoord[2]) const; │ │ │ │ │ +120 │ │ │ │ │ +122 template │ │ │ │ │ +_1_2_3 void _G_e_t_E_d_g_e_C_o_o_r_d(int edgeIndex, REAL t, REAL uvCoord[2]) const; │ │ │ │ │ +124 │ │ │ │ │ +126 template │ │ │ │ │ +_1_2_7 void _G_e_t_C_e_n_t_e_r_C_o_o_r_d(REAL uvCoord[2]) const; │ │ │ │ │ +129 │ │ │ │ │ +130public: │ │ │ │ │ +132 │ │ │ │ │ +147 │ │ │ │ │ +149 bool _H_a_s_S_u_b_F_a_c_e_s() const; │ │ │ │ │ +150 │ │ │ │ │ +152 template │ │ │ │ │ +153 int _G_e_t_S_u_b_F_a_c_e(REAL const uvCoord[2]) const; │ │ │ │ │ +154 │ │ │ │ │ +157 template │ │ │ │ │ +158 int _C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e( │ │ │ │ │ +159 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ +160 │ │ │ │ │ +162 template │ │ │ │ │ +163 void _C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d(int subFace, │ │ │ │ │ +164 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ +165 │ │ │ │ │ +168 template │ │ │ │ │ +169 int _C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e( │ │ │ │ │ +170 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ +171 │ │ │ │ │ +173 template │ │ │ │ │ +174 void _C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d(int subFace, │ │ │ │ │ +175 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ +177 │ │ │ │ │ +178private: │ │ │ │ │ +179 template │ │ │ │ │ +180 int convertCoordToSubFace(bool normalized, │ │ │ │ │ +181 REAL const uvCoord[2], REAL subFaceCoord[2]) const; │ │ │ │ │ +182 template │ │ │ │ │ +183 void convertSubFaceToCoord(bool normalized, int subFace, │ │ │ │ │ +184 REAL const subFaceCoord[2], REAL uvCoord[2]) const; │ │ │ │ │ +185 │ │ │ │ │ +186private: │ │ │ │ │ +187 unsigned char _type; │ │ │ │ │ +188 unsigned char _uDim; │ │ │ │ │ +189 unsigned short _faceSize; │ │ │ │ │ +190}; │ │ │ │ │ +191 │ │ │ │ │ +192// │ │ │ │ │ +193// Inline sub-face coordinate conversion methods: │ │ │ │ │ +194// │ │ │ │ │ +195inline bool │ │ │ │ │ +_1_9_6_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_H_a_s_S_u_b_F_a_c_e_s() const { │ │ │ │ │ +197 return (_type == _Q_U_A_D___S_U_B_F_A_C_E_S); │ │ │ │ │ +198} │ │ │ │ │ +199 │ │ │ │ │ +200template │ │ │ │ │ +201inline int │ │ │ │ │ +_2_0_2_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_S_u_b_F_a_c_e(REAL const uvCoord[2]) const { │ │ │ │ │ +203 │ │ │ │ │ +204 if (!_H_a_s_S_u_b_F_a_c_e_s()) return 0; │ │ │ │ │ +205 │ │ │ │ │ +206 int uTile = (int) uvCoord[0]; │ │ │ │ │ +207 int vTile = (int) uvCoord[1]; │ │ │ │ │ +208 return (vTile + ((uvCoord[1] - (REAL) vTile) > 0.75f)) * _uDim + │ │ │ │ │ +209 (uTile + ((uvCoord[0] - (REAL) uTile) > 0.75f)); │ │ │ │ │ +210} │ │ │ │ │ +211 │ │ │ │ │ +212// Conversions to unnormalized sub-face coordinates: │ │ │ │ │ +213template │ │ │ │ │ +214inline int │ │ │ │ │ +_2_1_5_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e( │ │ │ │ │ +216 REAL const uvCoord[2], REAL subCoord[2]) const { │ │ │ │ │ +217 return convertCoordToSubFace(false, uvCoord, subCoord); │ │ │ │ │ +218} │ │ │ │ │ +219template │ │ │ │ │ +220inline void │ │ │ │ │ +_2_2_1_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d( │ │ │ │ │ +222 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const { │ │ │ │ │ +223 convertSubFaceToCoord(false, subFace, subCoord, uvCoord); │ │ │ │ │ +224} │ │ │ │ │ +225 │ │ │ │ │ +226// Conversions to normalized sub-face coordinates: │ │ │ │ │ +227template │ │ │ │ │ +228inline int │ │ │ │ │ +_2_2_9_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e( │ │ │ │ │ +230 REAL const uvCoord[2], REAL subCoord[2]) const { │ │ │ │ │ +231 return convertCoordToSubFace(true, uvCoord, subCoord); │ │ │ │ │ +232} │ │ │ │ │ +233template │ │ │ │ │ +234inline void │ │ │ │ │ +_2_3_5_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d( │ │ │ │ │ +236 int subFace, REAL const subCoord[2], REAL uvCoord[2]) const { │ │ │ │ │ +237 convertSubFaceToCoord(true, subFace, subCoord, uvCoord); │ │ │ │ │ +238} │ │ │ │ │ +239 │ │ │ │ │ +240} // end namespace Bfr │ │ │ │ │ +241 │ │ │ │ │ +242} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +243using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +244 │ │ │ │ │ +245} // end namespace OpenSubdiv │ │ │ │ │ +246 │ │ │ │ │ +247#endif /* OPENSUBDIV3_BFR_PARAMETERIZATION */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s │ │ │ │ │ -Simple struct with limits related to topology. │ │ │ │ │ -DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s_:_:_M_a_x_F_a_c_e_S_i_z_e │ │ │ │ │ -static int MaxFaceSize() │ │ │ │ │ -Returns the maximum allowable size for a face (number of vertices) │ │ │ │ │ -DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_L_i_m_i_t_s_:_:_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ -static int MaxValence() │ │ │ │ │ -Returns the maximum allowable valence for a vertex. │ │ │ │ │ -DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ +SchemeType │ │ │ │ │ +Enumerated type for all subdivision schemes supported by OpenSubdiv. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Simple class defining the 2D parameterization of a face. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_S_u_b_F_a_c_e │ │ │ │ │ +int GetSubFace(REAL const uvCoord[2]) const │ │ │ │ │ +Returns the integer sub-face containing the given (u,v) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +int GetFaceSize() const │ │ │ │ │ +Returns the size (number of vertices) of the corresponding face. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_0_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +Enumerated type for the different kinds of Parameterizations. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_Q_U_A_D___S_U_B_F_A_C_E_S │ │ │ │ │ +@ QUAD_SUBFACES │ │ │ │ │ +Partitioned into quadrilateral sub-faces. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_T_R_I │ │ │ │ │ +@ TRI │ │ │ │ │ +Triangle. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_Q_U_A_D │ │ │ │ │ +@ QUAD │ │ │ │ │ +Quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Parameterization(Sdc::SchemeType scheme, int faceSize) │ │ │ │ │ +Primary constructor with subdivision scheme and face size. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_C_o_o_r_d_T_o_S_u_b_F_a_c_e │ │ │ │ │ +int ConvertCoordToSubFace(REAL const uvCoord[2], REAL subFaceCoord[2]) const │ │ │ │ │ +Convert (u,v) to a sub-face (return value) and its local (u,v) coordinate. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_1_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_C_e_n_t_e_r_C_o_o_r_d │ │ │ │ │ +void GetCenterCoord(REAL uvCoord[2]) const │ │ │ │ │ +Returns the (u,v) coordinate for the center of the face. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_T_y_p_e │ │ │ │ │ +Type GetType() const │ │ │ │ │ +Returns the type of parameterization assigned. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_~_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +~Parameterization()=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Parameterization(Parameterization const &)=default │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_E_d_g_e_C_o_o_r_d │ │ │ │ │ +void GetEdgeCoord(int edgeIndex, REAL t, REAL uvCoord[2]) const │ │ │ │ │ +Returns the (u,v) coordinate at any point on a given edge. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_: │ │ │ │ │ +_C_o_n_v_e_r_t_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e_T_o_C_o_o_r_d │ │ │ │ │ +void ConvertNormalizedSubFaceToCoord(int subFace, REAL const subFaceCoord[2], │ │ │ │ │ +REAL uvCoord[2]) const │ │ │ │ │ +Convert a sub-face and its normalized (u,v) coordinate to (u,v) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_3_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d │ │ │ │ │ +void GetVertexCoord(int vertexIndex, REAL uvCoord[2]) const │ │ │ │ │ +Returns the (u,v) coordinate of a given vertex. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n │ │ │ │ │ +Parameterization() │ │ │ │ │ +Default construction produces an invalid instance. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_8_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_I_s_V_a_l_i_d │ │ │ │ │ +bool IsValid() const │ │ │ │ │ +Returns true if correctly initialized. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_H_a_s_S_u_b_F_a_c_e_s │ │ │ │ │ +bool HasSubFaces() const │ │ │ │ │ +Returns if Parameterization has been partitioned into sub-faces. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_1_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_: │ │ │ │ │ +_C_o_n_v_e_r_t_C_o_o_r_d_T_o_N_o_r_m_a_l_i_z_e_d_S_u_b_F_a_c_e │ │ │ │ │ +int ConvertCoordToNormalizedSubFace(REAL const uvCoord[2], REAL subFaceCoord │ │ │ │ │ +[2]) const │ │ │ │ │ +Convert (u,v) to a sub-face (return value) and its normalized (u,v) coordinate. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_2_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_C_o_n_v_e_r_t_S_u_b_F_a_c_e_T_o_C_o_o_r_d │ │ │ │ │ +void ConvertSubFaceToCoord(int subFace, REAL const subFaceCoord[2], REAL │ │ │ │ │ +uvCoord[2]) const │ │ │ │ │ +Convert a sub-face and its local (u,v) coordinate to (u,v) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h_:_2_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +Parameterization & operator=(Parameterization const &)=default │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _b_f_r │ │ │ │ │ - * _l_i_m_i_t_s_._h │ │ │ │ │ + * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ @@ -95,17 +95,17 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
topologyRefiner.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ #include "../far/types.h"
│ │ │ │ -#include "../far/topologyLevel.h"
│ │ │ │ +#include "../far/topologyLevel.h"
│ │ │ │ #include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ @@ -348,20 +348,20 @@ │ │ │ │
303} // end namespace Far
│ │ │ │
304
│ │ │ │
305} // end namespace OPENSUBDIV_VERSION
│ │ │ │
306using namespace OPENSUBDIV_VERSION;
│ │ │ │
307} // end namespace OpenSubdiv
│ │ │ │
308
│ │ │ │
309#endif /* OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ -
Applies refinement operations to generic primvar data.
│ │ │ │ -
Object used to compute and query ptex face indices.
Definition ptexIndices.h:46
│ │ │ │ -
An interface for accessing data in a specific level of a refined topology hierarchy.
│ │ │ │ +
Applies refinement operations to generic primvar data.
│ │ │ │ +
Object used to compute and query ptex face indices.
Definition ptexIndices.h:46
│ │ │ │ +
An interface for accessing data in a specific level of a refined topology hierarchy.
│ │ │ │
Factory for constructing TopologyRefiners from specific mesh classes.
│ │ │ │
Stores topology data for a specified set of refinement options.
│ │ │ │
TopologyRefiner(TopologyRefiner const &source)
│ │ │ │
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
│ │ │ │
Vtr::internal::Level const & getLevel(int l) const
│ │ │ │
bool HasHoles() const
Returns true if faces have been tagged as holes.
│ │ │ │
int GetNumLevels() const
Returns the number of refinement levels.
│ │ │ │ @@ -402,16 +402,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
void SetSecondaryLevel(int level)
Set secondary isolation level.
│ │ │ │
Private base class of Factories for constructing TopologyRefiners.
│ │ │ │ -
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ - │ │ │ │ +
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
stencilTableFactory.h File Reference
│ │ │ │ +
topologyDescriptor.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchTable.h"
│ │ │ │ -#include <vector>
│ │ │ │ +#include "../far/topologyRefiner.h"
│ │ │ │ +#include "../far/topologyRefinerFactory.h"
│ │ │ │ +#include "../far/error.h"
│ │ │ │ +#include <cassert>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  TopologyRefiner
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  StencilTableFactoryReal< REAL >
 A specialized factory for StencilTable. More...
struct  TopologyDescriptor
 A simple reference to raw topology data for use with TopologyRefinerFactory. More...
 
struct  StencilTableFactoryReal< REAL >::Options
 
class  LimitStencilTableFactoryReal< REAL >
 A specialized factory for LimitStencilTable. More...
 
struct  LimitStencilTableFactoryReal< REAL >::Options
 
struct  LimitStencilTableFactoryReal< REAL >::LocationArray
 Descriptor for limit surface locations. More...
 
class  StencilTableFactory
 Stencil table factory class wrapping the template for compatibility. More...
 
class  LimitStencilTableFactory
 Stencil table factory class wrapping the template for compatibility. More...
struct  TopologyDescriptor::FVarChannel
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -135,13 +123,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,43 +1,30 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -stencilTableFactory.h File Reference │ │ │ │ │ +topologyDescriptor.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_e_r_r_o_r_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  A specialized factory for _S_t_e_n_c_i_l_T_a_b_l_e. _M_o_r_e_._._. │ │ │ │ │ +struct   _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +  A simple reference to raw topology data for use with │ │ │ │ │ + _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ -  │ │ │ │ │ - class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  A specialized factory for _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ -  │ │ │ │ │ -struct   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ -  Descriptor for limit surface locations. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ -  _S_t_e_n_c_i_l table factory class wrapping the template for compatibility. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ -  _S_t_e_n_c_i_l table factory class wrapping the template for compatibility. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +struct   _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00713.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,4 @@ │ │ │ │ │ var a00713 = [ │ │ │ │ │ - ["StencilTableFactoryReal< REAL >", "a01045.html", "a01045"], │ │ │ │ │ - ["Options", "a01085.html", "a01085"], │ │ │ │ │ - ["LimitStencilTableFactoryReal< REAL >", "a01049.html", "a01049"], │ │ │ │ │ - ["Options", "a01089.html", "a01089"], │ │ │ │ │ - ["LocationArray", "a01093.html", "a01093"], │ │ │ │ │ - ["StencilTableFactory", "a01097.html", null], │ │ │ │ │ - ["LimitStencilTableFactory", "a01101.html", null] │ │ │ │ │ + ["TopologyDescriptor", "a01105.html", "a01105"], │ │ │ │ │ + ["FVarChannel", "a01109.html", "a01109"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/stencilTableFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
stencilTableFactory.h
│ │ │ │ +
topologyDescriptor.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,358 +118,146 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ -
26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ -
27
│ │ │ │ -
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../far/patchTable.h"
│ │ │ │ -
31
│ │ │ │ -
32#include <vector>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Far {
│ │ │ │ -
38
│ │ │ │ -
39class TopologyRefiner;
│ │ │ │ -
40
│ │ │ │ -
41template <typename REAL> class StencilReal;
│ │ │ │ -
42template <typename REAL> class StencilTableReal;
│ │ │ │ -
43
│ │ │ │ -
44template <typename REAL> class LimitStencilReal;
│ │ │ │ -
45template <typename REAL> class LimitStencilTableReal;
│ │ │ │ -
46
│ │ │ │ -
47
│ │ │ │ -
50template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
53public:
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
55 enum Mode {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ +
24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
│ │ │ │ +
25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
│ │ │ │ +
26
│ │ │ │ +
27#include "../version.h"
│ │ │ │ +
28
│ │ │ │ +
29#include "../far/topologyRefiner.h"
│ │ │ │ +
30#include "../far/topologyRefinerFactory.h"
│ │ │ │ +
31#include "../far/error.h"
│ │ │ │ +
32
│ │ │ │ +
33#include <cassert>
│ │ │ │ +
34
│ │ │ │ +
35namespace OpenSubdiv {
│ │ │ │ +
36namespace OPENSUBDIV_VERSION {
│ │ │ │ +
37
│ │ │ │ +
38namespace Far {
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50
│ │ │ │ + │ │ │ │ + │ │ │ │ +
53
│ │ │ │ +
54 int const * numVertsPerFace;
│ │ │ │ + │ │ │ │ +
56
│ │ │ │ + │ │ │ │ + │ │ │ │ +
59 float const * creaseWeights;
│ │ │ │
60
│ │ │ │ -
│ │ │ │ -
61 struct Options {
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 generateOffsets(false),
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
68 maxLevel(10),
│ │ │ │ -
69 fvarChannel(0) { }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
71 unsigned int interpolationMode : 2,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
79 unsigned int fvarChannel;
│ │ │ │ -
81 };
│ │ │ │ -
│ │ │ │ -
82
│ │ │ │ - │ │ │ │ -
95 TopologyRefiner const & refiner, Options options = Options());
│ │ │ │ -
96
│ │ │ │ -
97
│ │ │ │ - │ │ │ │ -
111 int numTables, StencilTableReal<REAL> const ** tables);
│ │ │ │ -
112
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63 float const * cornerWeights;
│ │ │ │ +
64
│ │ │ │ + │ │ │ │ + │ │ │ │ +
67
│ │ │ │ + │ │ │ │ +
69
│ │ │ │ +
70 // Face-varying data channel -- value indices correspond to vertex indices,
│ │ │ │ +
71 // i.e. one for every vertex of every face:
│ │ │ │ +
72 //
│ │ │ │ +
│ │ │ │ +
73 struct FVarChannel {
│ │ │ │ +
74
│ │ │ │ + │ │ │ │ + │ │ │ │ +
77
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ + │ │ │ │ + │ │ │ │ +
83
│ │ │ │ + │ │ │ │ +
85};
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
87
│ │ │ │ +
88//
│ │ │ │ +
89// Forward declarations of required TopologyRefinerFactory<TopologyDescriptor>
│ │ │ │ +
90// specializations (defined internally):
│ │ │ │ +
91//
│ │ │ │ +
92// @cond EXCLUDE_DOXYGEN
│ │ │ │ +
93
│ │ │ │ +
94template <>
│ │ │ │ +
95bool
│ │ │ │ + │ │ │ │ +
97 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ +
98
│ │ │ │ +
99template <>
│ │ │ │ +
100bool
│ │ │ │ + │ │ │ │ +
102 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ +
103
│ │ │ │ +
104template <>
│ │ │ │ +
105bool
│ │ │ │ + │ │ │ │ +
107 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ +
108
│ │ │ │ +
109template <>
│ │ │ │ +
110bool
│ │ │ │ + │ │ │ │ +
112 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │
113
│ │ │ │ - │ │ │ │ -
129 TopologyRefiner const &refiner,
│ │ │ │ -
130 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ -
131 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ -
132 bool factorize = true);
│ │ │ │ -
133
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
149 TopologyRefiner const &refiner,
│ │ │ │ -
150 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ -
151 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ -
152 bool factorize = true) {
│ │ │ │ - │ │ │ │ -
154 refiner, baseStencilTable, localPointStencilTable, factorize);
│ │ │ │ -
155 }
│ │ │ │ -
│ │ │ │ -
156
│ │ │ │ - │ │ │ │ -
175 TopologyRefiner const &refiner,
│ │ │ │ -
176 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ -
177 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ -
178 int channel = 0,
│ │ │ │ -
179 bool factorize = true);
│ │ │ │ -
180
│ │ │ │ -
181private:
│ │ │ │ -
182
│ │ │ │ -
183 // Generate stencils for the coarse control-vertices (single weight = 1.0f)
│ │ │ │ -
184 static void generateControlVertStencils(
│ │ │ │ -
185 int numControlVerts,
│ │ │ │ -
186 StencilReal<REAL> & dst);
│ │ │ │ -
187
│ │ │ │ -
188 // Internal method to splice local point stencils
│ │ │ │ -
189 static StencilTableReal<REAL> const * appendLocalPointStencilTable(
│ │ │ │ -
190 TopologyRefiner const &refiner,
│ │ │ │ -
191 StencilTableReal<REAL> const * baseStencilTable,
│ │ │ │ -
192 StencilTableReal<REAL> const * localPointStencilTable,
│ │ │ │ -
193 int channel,
│ │ │ │ -
194 bool factorize);
│ │ │ │ -
195};
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
208template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
210
│ │ │ │ -
211public:
│ │ │ │ -
212
│ │ │ │ -
│ │ │ │ -
213 enum Mode {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
217 };
│ │ │ │ -
│ │ │ │ -
218
│ │ │ │ -
│ │ │ │ -
219 struct Options {
│ │ │ │ -
220
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
224 fvarChannel(0) { }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226 unsigned int interpolationMode : 2,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
229 unsigned int fvarChannel;
│ │ │ │ -
230 };
│ │ │ │ -
│ │ │ │ -
231
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
234
│ │ │ │ -
235 LocationArray() : ptexIdx(-1), numLocations(0), s(0), t(0) { }
│ │ │ │ -
236
│ │ │ │ - │ │ │ │ - │ │ │ │ -
239
│ │ │ │ -
240 REAL const * s,
│ │ │ │ -
241 * t;
│ │ │ │ -
242 };
│ │ │ │ -
│ │ │ │ -
243
│ │ │ │ -
244 typedef std::vector<LocationArray> LocationArrayVec;
│ │ │ │ -
245
│ │ │ │ - │ │ │ │ -
270 TopologyRefiner const & refiner,
│ │ │ │ -
271 LocationArrayVec const & locationArrays,
│ │ │ │ -
272 StencilTableReal<REAL> const * cvStencils = 0,
│ │ │ │ -
273 PatchTable const * patchTable = 0,
│ │ │ │ -
274 Options options = Options());
│ │ │ │ -
275
│ │ │ │ -
276};
│ │ │ │ -
│ │ │ │ -
277
│ │ │ │ -
278
│ │ │ │ -
279//
│ │ │ │ -
280// Public wrapper classes for the templates
│ │ │ │ -
281//
│ │ │ │ -
282class Stencil;
│ │ │ │ -
283class StencilTable;
│ │ │ │ -
284
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
288private:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
291
│ │ │ │ -
292public:
│ │ │ │ -
│ │ │ │ -
293 static StencilTable const * Create(
│ │ │ │ -
294 TopologyRefiner const & refiner, Options options = Options()) {
│ │ │ │ -
295
│ │ │ │ -
296 return static_cast<StencilTable const *>(
│ │ │ │ -
297 BaseFactory::Create(refiner, options));
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299
│ │ │ │ -
│ │ │ │ -
300 static StencilTable const * Create(
│ │ │ │ -
301 int numTables, StencilTable const ** tables) {
│ │ │ │ -
302
│ │ │ │ -
303 return static_cast<StencilTable const *>(
│ │ │ │ -
304 BaseFactory::Create(numTables,
│ │ │ │ -
305 reinterpret_cast<BaseTable const **>(tables)));
│ │ │ │ -
306 }
│ │ │ │ -
│ │ │ │ -
307
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
309 TopologyRefiner const &refiner,
│ │ │ │ -
310 StencilTable const *baseStencilTable,
│ │ │ │ -
311 StencilTable const *localPointStencilTable,
│ │ │ │ -
312 bool factorize = true) {
│ │ │ │ -
313
│ │ │ │ -
314 return static_cast<StencilTable const *>(
│ │ │ │ - │ │ │ │ -
316 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ -
317 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ -
318 factorize));
│ │ │ │ -
319 }
│ │ │ │ -
│ │ │ │ -
320
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
322 TopologyRefiner const &refiner,
│ │ │ │ -
323 StencilTable const *baseStencilTable,
│ │ │ │ -
324 StencilTable const *localPointStencilTable,
│ │ │ │ -
325 bool factorize = true) {
│ │ │ │ -
326
│ │ │ │ -
327 return static_cast<StencilTable const *>(
│ │ │ │ - │ │ │ │ -
329 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ -
330 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ -
331 factorize));
│ │ │ │ -
332 }
│ │ │ │ -
│ │ │ │ -
333
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
335 TopologyRefiner const &refiner,
│ │ │ │ -
336 StencilTable const *baseStencilTable,
│ │ │ │ -
337 StencilTable const *localPointStencilTable,
│ │ │ │ -
338 int channel = 0,
│ │ │ │ -
339 bool factorize = true) {
│ │ │ │ -
340
│ │ │ │ -
341 return static_cast<StencilTable const *>(
│ │ │ │ - │ │ │ │ -
343 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ -
344 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ -
345 channel, factorize));
│ │ │ │ -
346 }
│ │ │ │ -
│ │ │ │ -
347};
│ │ │ │ -
│ │ │ │ -
348
│ │ │ │ -
349class LimitStencil;
│ │ │ │ -
350class LimitStencilTable;
│ │ │ │ -
351
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
355private:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
358
│ │ │ │ -
359public:
│ │ │ │ -
│ │ │ │ -
360 static LimitStencilTable const * Create(
│ │ │ │ -
361 TopologyRefiner const & refiner,
│ │ │ │ -
362 LocationArrayVec const & locationArrays,
│ │ │ │ -
363 StencilTable const * cvStencils = 0,
│ │ │ │ -
364 PatchTable const * patchTable = 0,
│ │ │ │ -
365 Options options = Options()) {
│ │ │ │ -
366
│ │ │ │ -
367 return static_cast<LimitStencilTable const *>(
│ │ │ │ - │ │ │ │ -
369 refiner,
│ │ │ │ -
370 locationArrays,
│ │ │ │ -
371 static_cast<BaseTable const *>(cvStencils),
│ │ │ │ -
372 patchTable,
│ │ │ │ -
373 options));
│ │ │ │ -
374 }
│ │ │ │ -
│ │ │ │ -
375};
│ │ │ │ -
│ │ │ │ -
376
│ │ │ │ -
377} // end namespace Far
│ │ │ │ -
378
│ │ │ │ -
379} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
380using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
381
│ │ │ │ -
382} // end namespace OpenSubdiv
│ │ │ │ -
383
│ │ │ │ -
384#endif // OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ - │ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ -
static StencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, Options options=Options())
Instantiates StencilTable from TopologyRefiner that have been refined uniformly or adaptively.
│ │ │ │ -
static StencilTableReal< REAL > const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, int channel=0, bool factorize=true)
Utility function for stencil splicing for local point face-varying stencils.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static StencilTableReal< REAL > const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point varying stencils.
│ │ │ │ -
static StencilTableReal< REAL > const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point stencils.
│ │ │ │ -
static StencilTableReal< REAL > const * Create(int numTables, StencilTableReal< REAL > const **tables)
Instantiates StencilTable by concatenating an array of existing stencil tables.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static LimitStencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, LocationArrayVec const &locationArrays, StencilTableReal< REAL > const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options())
Instantiates LimitStencilTable from a TopologyRefiner that has been refined either uniformly or adapt...
│ │ │ │ - │ │ │ │ -
Vertex stencil class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
unsigned int generateIntermediateLevels
vertices at all levels or highest only
│ │ │ │ -
unsigned int generateControlVerts
generate stencils for control-vertices
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
unsigned int generate2ndDerivatives
Generate weights for 2nd derivatives.
│ │ │ │ -
unsigned int generate1stDerivatives
Generate weights for 1st derivatives.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Stencil table factory class wrapping the template for compatibility.
│ │ │ │ -
static StencilTable const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ -
static StencilTable const * Create(TopologyRefiner const &refiner, Options options=Options())
│ │ │ │ -
static StencilTable const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, int channel=0, bool factorize=true)
│ │ │ │ -
static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ -
static StencilTable const * Create(int numTables, StencilTable const **tables)
│ │ │ │ -
Stencil table factory class wrapping the template for compatibility.
│ │ │ │ -
static LimitStencilTable const * Create(TopologyRefiner const &refiner, LocationArrayVec const &locationArrays, StencilTable const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options())
│ │ │ │ +
114template <>
│ │ │ │ +
115void
│ │ │ │ + │ │ │ │ +
117 TopologyError errCode, char const * msg, TopologyDescriptor const & desc);
│ │ │ │ +
118
│ │ │ │ +
119// @endcond
│ │ │ │ +
120
│ │ │ │ +
121} // end namespace Far
│ │ │ │ +
122
│ │ │ │ +
123} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
124using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
125} // end namespace OpenSubdiv
│ │ │ │ +
126
│ │ │ │ +
127#endif /* OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H */
│ │ │ │ + │ │ │ │ + │ │ │ │ +
A simple reference to raw topology data for use with TopologyRefinerFactory.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static bool assignComponentTopology(TopologyRefiner &newRefiner, MESH const &mesh)
Specify the relationships between vertices, faces, etc. ie the face-vertices, vertex-faces,...
│ │ │ │ +
static void reportInvalidTopology(TopologyError errCode, char const *msg, MESH const &mesh)
(Optional) Control run-time topology validation and error reporting
│ │ │ │ +
static bool assignComponentTags(TopologyRefiner &newRefiner, MESH const &mesh)
(Optional) Specify edge or vertex sharpness or face holes
│ │ │ │ +
static bool resizeComponentTopology(TopologyRefiner &newRefiner, MESH const &mesh)
Specify the number of vertices, faces, face-vertices, etc.
│ │ │ │ +
static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const &mesh)
(Optional) Specify face-varying data per face
│ │ │ │
Stores topology data for a specified set of refinement options.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -stencilTableFactory.h │ │ │ │ │ +topologyDescriptor.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,498 +23,208 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../far/patchTable.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 │ │ │ │ │ -39class TopologyRefiner; │ │ │ │ │ -40 │ │ │ │ │ -41template class StencilReal; │ │ │ │ │ -42template class StencilTableReal; │ │ │ │ │ -43 │ │ │ │ │ -44template class LimitStencilReal; │ │ │ │ │ -45template class LimitStencilTableReal; │ │ │ │ │ -46 │ │ │ │ │ -47 │ │ │ │ │ -50template │ │ │ │ │ -_5_1class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ -52 │ │ │ │ │ -53public: │ │ │ │ │ -54 │ │ │ │ │ -_5_5 enum _M_o_d_e { │ │ │ │ │ -_5_6 _I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X=0, │ │ │ │ │ -_5_7 _I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G, │ │ │ │ │ -58 _I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ -_5_9 }; │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../far/topologyRefiner.h" │ │ │ │ │ +30#include "../far/topologyRefinerFactory.h" │ │ │ │ │ +31#include "../far/error.h" │ │ │ │ │ +32 │ │ │ │ │ +33#include │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Far { │ │ │ │ │ +39 │ │ │ │ │ +_4_9struct _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ +50 │ │ │ │ │ +_5_1 int _n_u_m_V_e_r_t_i_c_e_s, │ │ │ │ │ +_5_2 _n_u_m_F_a_c_e_s; │ │ │ │ │ +53 │ │ │ │ │ +_5_4 int const * _n_u_m_V_e_r_t_s_P_e_r_F_a_c_e; │ │ │ │ │ +_5_5 _I_n_d_e_x const * _v_e_r_t_I_n_d_i_c_e_s_P_e_r_F_a_c_e; │ │ │ │ │ +56 │ │ │ │ │ +_5_7 int _n_u_m_C_r_e_a_s_e_s; │ │ │ │ │ +_5_8 _I_n_d_e_x const * _c_r_e_a_s_e_V_e_r_t_e_x_I_n_d_e_x_P_a_i_r_s; │ │ │ │ │ +_5_9 float const * _c_r_e_a_s_e_W_e_i_g_h_t_s; │ │ │ │ │ 60 │ │ │ │ │ -_6_1 struct _O_p_t_i_o_n_s { │ │ │ │ │ -62 │ │ │ │ │ -_6_3 _O_p_t_i_o_n_s() : _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e(_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X), │ │ │ │ │ -64 _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s(false), │ │ │ │ │ -65 _g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s(false), │ │ │ │ │ -66 _g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s(true), │ │ │ │ │ -67 _f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s(true), │ │ │ │ │ -68 _m_a_x_L_e_v_e_l(10), │ │ │ │ │ -69 _f_v_a_r_C_h_a_n_n_e_l(0) { } │ │ │ │ │ -70 │ │ │ │ │ -_7_1 unsigned int _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e : 2, │ │ │ │ │ -_7_2 _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s : 1, │ │ │ │ │ -_7_3 _g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s : 1, │ │ │ │ │ -_7_4 _g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s : 1, │ │ │ │ │ -_7_5 _f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s : 1, │ │ │ │ │ -_7_8 _m_a_x_L_e_v_e_l : 4; │ │ │ │ │ -_7_9 unsigned int _f_v_a_r_C_h_a_n_n_e_l; │ │ │ │ │ -81 }; │ │ │ │ │ -82 │ │ │ │ │ -_9_4 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ -95 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s()); │ │ │ │ │ -96 │ │ │ │ │ -97 │ │ │ │ │ -_1_1_0 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ -111 int numTables, _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const ** tables); │ │ │ │ │ -112 │ │ │ │ │ +_6_1 int _n_u_m_C_o_r_n_e_r_s; │ │ │ │ │ +_6_2 _I_n_d_e_x const * _c_o_r_n_e_r_V_e_r_t_e_x_I_n_d_i_c_e_s; │ │ │ │ │ +_6_3 float const * _c_o_r_n_e_r_W_e_i_g_h_t_s; │ │ │ │ │ +64 │ │ │ │ │ +_6_5 int _n_u_m_H_o_l_e_s; │ │ │ │ │ +_6_6 _I_n_d_e_x const * _h_o_l_e_I_n_d_i_c_e_s; │ │ │ │ │ +67 │ │ │ │ │ +_6_8 bool _i_s_L_e_f_t_H_a_n_d_e_d; │ │ │ │ │ +69 │ │ │ │ │ +70 // Face-varying data channel -- value indices correspond to vertex indices, │ │ │ │ │ +71 // i.e. one for every vertex of every face: │ │ │ │ │ +72 // │ │ │ │ │ +_7_3 struct _F_V_a_r_C_h_a_n_n_e_l { │ │ │ │ │ +74 │ │ │ │ │ +_7_5 int _n_u_m_V_a_l_u_e_s; │ │ │ │ │ +_7_6 _I_n_d_e_x const * _v_a_l_u_e_I_n_d_i_c_e_s; │ │ │ │ │ +77 │ │ │ │ │ +_7_8 _F_V_a_r_C_h_a_n_n_e_l() : _n_u_m_V_a_l_u_e_s(0), _v_a_l_u_e_I_n_d_i_c_e_s(0) { } │ │ │ │ │ +79 }; │ │ │ │ │ +80 │ │ │ │ │ +_8_1 int _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ +_8_2 _F_V_a_r_C_h_a_n_n_e_l const * _f_v_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ +83 │ │ │ │ │ +_8_4 _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r(); │ │ │ │ │ +85}; │ │ │ │ │ +86 │ │ │ │ │ +87 │ │ │ │ │ +88// │ │ │ │ │ +89// Forward declarations of required │ │ │ │ │ +TopologyRefinerFactory │ │ │ │ │ +90// specializations (defined internally): │ │ │ │ │ +91// │ │ │ │ │ +92// @cond EXCLUDE_DOXYGEN │ │ │ │ │ +93 │ │ │ │ │ +94template <> │ │ │ │ │ +95bool │ │ │ │ │ +96_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y( │ │ │ │ │ +97 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ +98 │ │ │ │ │ +99template <> │ │ │ │ │ +100bool │ │ │ │ │ +101_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y( │ │ │ │ │ +102 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ +103 │ │ │ │ │ +104template <> │ │ │ │ │ +105bool │ │ │ │ │ +106_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s( │ │ │ │ │ +107 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ +108 │ │ │ │ │ +109template <> │ │ │ │ │ +110bool │ │ │ │ │ +111_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_F_a_c_e_V_a_r_y_i_n_g_T_o_p_o_l_o_g_y( │ │ │ │ │ +112 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ 113 │ │ │ │ │ -_1_2_8 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -129 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -130 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ -131 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ -132 bool factorize = true); │ │ │ │ │ -133 │ │ │ │ │ -_1_4_8 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g( │ │ │ │ │ -149 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -150 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ -151 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ -152 bool factorize = true) { │ │ │ │ │ -153 return _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -154 refiner, baseStencilTable, localPointStencilTable, factorize); │ │ │ │ │ -155 } │ │ │ │ │ -156 │ │ │ │ │ -_1_7_4 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -175 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -176 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ -177 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ -178 int channel = 0, │ │ │ │ │ -179 bool factorize = true); │ │ │ │ │ -180 │ │ │ │ │ -181private: │ │ │ │ │ -182 │ │ │ │ │ -183 // Generate stencils for the coarse control-vertices (single weight = 1.0f) │ │ │ │ │ -184 static void generateControlVertStencils( │ │ │ │ │ -185 int numControlVerts, │ │ │ │ │ -186 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> & dst); │ │ │ │ │ -187 │ │ │ │ │ -188 // Internal method to splice local point stencils │ │ │ │ │ -189 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * appendLocalPointStencilTable( │ │ │ │ │ -190 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -191 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * baseStencilTable, │ │ │ │ │ -192 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * localPointStencilTable, │ │ │ │ │ -193 int channel, │ │ │ │ │ -194 bool factorize); │ │ │ │ │ -195}; │ │ │ │ │ -196 │ │ │ │ │ -208template │ │ │ │ │ -_2_0_9class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ -210 │ │ │ │ │ -211public: │ │ │ │ │ -212 │ │ │ │ │ -_2_1_3 enum _M_o_d_e { │ │ │ │ │ -_2_1_4 _I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X=0, │ │ │ │ │ -_2_1_5 _I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G, │ │ │ │ │ -216 _I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ -_2_1_7 }; │ │ │ │ │ -218 │ │ │ │ │ -_2_1_9 struct _O_p_t_i_o_n_s { │ │ │ │ │ -220 │ │ │ │ │ -_2_2_1 _O_p_t_i_o_n_s() : _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e(_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X), │ │ │ │ │ -222 _g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s(true), │ │ │ │ │ -223 _g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s(false), │ │ │ │ │ -224 _f_v_a_r_C_h_a_n_n_e_l(0) { } │ │ │ │ │ -225 │ │ │ │ │ -_2_2_6 unsigned int _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e : 2, │ │ │ │ │ -_2_2_7 _g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s : 1, │ │ │ │ │ -_2_2_8 _g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s : 1; │ │ │ │ │ -_2_2_9 unsigned int _f_v_a_r_C_h_a_n_n_e_l; │ │ │ │ │ -230 }; │ │ │ │ │ -231 │ │ │ │ │ -_2_3_3 struct _L_o_c_a_t_i_o_n_A_r_r_a_y { │ │ │ │ │ -234 │ │ │ │ │ -_2_3_5 _L_o_c_a_t_i_o_n_A_r_r_a_y() : _p_t_e_x_I_d_x(-1), _n_u_m_L_o_c_a_t_i_o_n_s(0), _s(0), _t(0) { } │ │ │ │ │ -236 │ │ │ │ │ -_2_3_7 int _p_t_e_x_I_d_x, │ │ │ │ │ -_2_3_8 _n_u_m_L_o_c_a_t_i_o_n_s; │ │ │ │ │ -239 │ │ │ │ │ -_2_4_0 REAL const * _s, │ │ │ │ │ -_2_4_1 * _t; │ │ │ │ │ -242 }; │ │ │ │ │ -243 │ │ │ │ │ -_2_4_4 typedef std::vector _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c; │ │ │ │ │ -245 │ │ │ │ │ -_2_6_9 static _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ -270 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ -271 _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c const & locationArrays, │ │ │ │ │ -272 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * cvStencils = 0, │ │ │ │ │ -273 _P_a_t_c_h_T_a_b_l_e const * patchTable = 0, │ │ │ │ │ -274 _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s()); │ │ │ │ │ -275 │ │ │ │ │ -276}; │ │ │ │ │ -277 │ │ │ │ │ -278 │ │ │ │ │ -279// │ │ │ │ │ -280// Public wrapper classes for the templates │ │ │ │ │ -281// │ │ │ │ │ -282class _S_t_e_n_c_i_l; │ │ │ │ │ -283class _S_t_e_n_c_i_l_T_a_b_l_e; │ │ │ │ │ -284 │ │ │ │ │ -_2_8_7class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y : public _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ -288private: │ │ │ │ │ -289 typedef _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ -290 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ -291 │ │ │ │ │ -292public: │ │ │ │ │ -_2_9_3 static _S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ -294 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, Options options = Options()) { │ │ │ │ │ -295 │ │ │ │ │ -296 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -297 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(refiner, options)); │ │ │ │ │ -298 } │ │ │ │ │ -299 │ │ │ │ │ -_3_0_0 static _S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ -301 int numTables, _S_t_e_n_c_i_l_T_a_b_l_e const ** tables) { │ │ │ │ │ -302 │ │ │ │ │ -303 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -304 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(numTables, │ │ │ │ │ -305 reinterpret_cast<_B_a_s_e_T_a_b_l_e const **>(tables))); │ │ │ │ │ -306 } │ │ │ │ │ -307 │ │ │ │ │ -_3_0_8 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -309 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -310 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ -311 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ -312 bool factorize = true) { │ │ │ │ │ -313 │ │ │ │ │ -314 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -315 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e(refiner, │ │ │ │ │ -316 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ -317 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ -318 factorize)); │ │ │ │ │ -319 } │ │ │ │ │ -320 │ │ │ │ │ -_3_2_1 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g( │ │ │ │ │ -322 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -323 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ -324 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ -325 bool factorize = true) { │ │ │ │ │ -326 │ │ │ │ │ -327 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -328 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g(refiner, │ │ │ │ │ -329 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ -330 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ -331 factorize)); │ │ │ │ │ -332 } │ │ │ │ │ -333 │ │ │ │ │ -_3_3_4 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -335 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -336 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ -337 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ -338 int channel = 0, │ │ │ │ │ -339 bool factorize = true) { │ │ │ │ │ -340 │ │ │ │ │ -341 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -342 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g(refiner, │ │ │ │ │ -343 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ -344 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ -345 channel, factorize)); │ │ │ │ │ -346 } │ │ │ │ │ -347}; │ │ │ │ │ -348 │ │ │ │ │ -349class LimitStencil; │ │ │ │ │ -350class LimitStencilTable; │ │ │ │ │ -351 │ │ │ │ │ -_3_5_4class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y : public _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ -{ │ │ │ │ │ -355private: │ │ │ │ │ -356 typedef _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ -357 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ -358 │ │ │ │ │ -359public: │ │ │ │ │ -_3_6_0 static _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ -361 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ -362 _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c const & locationArrays, │ │ │ │ │ -363 _S_t_e_n_c_i_l_T_a_b_l_e const * cvStencils = 0, │ │ │ │ │ -364 _P_a_t_c_h_T_a_b_l_e const * patchTable = 0, │ │ │ │ │ -365 Options options = Options()) { │ │ │ │ │ -366 │ │ │ │ │ -367 return static_cast<_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -368 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e( │ │ │ │ │ -369 refiner, │ │ │ │ │ -370 locationArrays, │ │ │ │ │ -371 static_cast<_B_a_s_e_T_a_b_l_e const *>(cvStencils), │ │ │ │ │ -372 patchTable, │ │ │ │ │ -373 options)); │ │ │ │ │ -374 } │ │ │ │ │ -375}; │ │ │ │ │ -376 │ │ │ │ │ -377} // end namespace Far │ │ │ │ │ -378 │ │ │ │ │ -379} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -380using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -381 │ │ │ │ │ -382} // end namespace OpenSubdiv │ │ │ │ │ -383 │ │ │ │ │ -384#endif // OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ +114template <> │ │ │ │ │ +115void │ │ │ │ │ +116_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y( │ │ │ │ │ +117 TopologyError errCode, char const * msg, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ +118 │ │ │ │ │ +119// @endcond │ │ │ │ │ +120 │ │ │ │ │ +121} // end namespace Far │ │ │ │ │ +122 │ │ │ │ │ +123} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +124using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +125} // end namespace OpenSubdiv │ │ │ │ │ +126 │ │ │ │ │ +127#endif /* OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ -A specialized factory for StencilTable. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ -static StencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, │ │ │ │ │ -Options options=Options()) │ │ │ │ │ -Instantiates StencilTable from TopologyRefiner that have been refined uniformly │ │ │ │ │ -or adaptively. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static StencilTableReal< REAL > const * AppendLocalPointStencilTableFaceVarying │ │ │ │ │ -(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ -*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, int │ │ │ │ │ -channel=0, bool factorize=true) │ │ │ │ │ -Utility function for stencil splicing for local point face-varying stencils. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_M_o_d_e │ │ │ │ │ -Mode │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ -@ INTERPOLATE_FACE_VARYING │ │ │ │ │ -face-varying primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ -@ INTERPOLATE_VARYING │ │ │ │ │ -varying primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X │ │ │ │ │ -@ INTERPOLATE_VERTEX │ │ │ │ │ -vertex primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g │ │ │ │ │ -static StencilTableReal< REAL > const * AppendLocalPointStencilTableVarying │ │ │ │ │ -(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ -*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool │ │ │ │ │ -factorize=true) │ │ │ │ │ -Utility function for stencil splicing for local point varying stencils. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -static StencilTableReal< REAL > const * AppendLocalPointStencilTable │ │ │ │ │ -(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ -*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool │ │ │ │ │ -factorize=true) │ │ │ │ │ -Utility function for stencil splicing for local point stencils. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ -static StencilTableReal< REAL > const * Create(int numTables, StencilTableReal< │ │ │ │ │ -REAL > const **tables) │ │ │ │ │ -Instantiates StencilTable by concatenating an array of existing stencil tables. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ -A specialized factory for LimitStencilTable. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_M_o_d_e │ │ │ │ │ -Mode │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ -@ INTERPOLATE_FACE_VARYING │ │ │ │ │ -face-varying primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ -@ INTERPOLATE_VARYING │ │ │ │ │ -varying primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X │ │ │ │ │ -@ INTERPOLATE_VERTEX │ │ │ │ │ -vertex primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c │ │ │ │ │ -std::vector< LocationArray > LocationArrayVec │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ -static LimitStencilTableReal< REAL > const * Create(TopologyRefiner const │ │ │ │ │ -&refiner, LocationArrayVec const &locationArrays, StencilTableReal< REAL > │ │ │ │ │ -const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options()) │ │ │ │ │ -Instantiates LimitStencilTable from a TopologyRefiner that has been refined │ │ │ │ │ -either uniformly or adapt... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -Vertex stencil descriptor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l │ │ │ │ │ -Vertex stencil class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -Table of subdivision stencils. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -Table of limit subdivision stencils. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s │ │ │ │ │ -unsigned int factorizeIntermediateLevels │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ -unsigned int maxLevel │ │ │ │ │ -generate stencils up to 'maxLevel' │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s │ │ │ │ │ -unsigned int generateIntermediateLevels │ │ │ │ │ -vertices at all levels or highest only │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s │ │ │ │ │ -unsigned int generateControlVerts │ │ │ │ │ -generate stencils for control-vertices │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s │ │ │ │ │ -unsigned int generateOffsets │ │ │ │ │ -populate optional "_offsets" field │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_f_v_a_r_C_h_a_n_n_e_l │ │ │ │ │ -unsigned int fvarChannel │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e │ │ │ │ │ -unsigned int interpolationMode │ │ │ │ │ -interpolation mode │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_O_p_t_i_o_n_s │ │ │ │ │ -Options() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_f_v_a_r_C_h_a_n_n_e_l │ │ │ │ │ -unsigned int fvarChannel │ │ │ │ │ -face-varying channel to use │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e │ │ │ │ │ -unsigned int interpolationMode │ │ │ │ │ -interpolation mode │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -unsigned int generate2ndDerivatives │ │ │ │ │ -Generate weights for 2nd derivatives. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -unsigned int generate1stDerivatives │ │ │ │ │ -Generate weights for 1st derivatives. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ -Descriptor for limit surface locations. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_t │ │ │ │ │ -REAL const * t │ │ │ │ │ -array of v coordinates │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_s │ │ │ │ │ -REAL const * s │ │ │ │ │ -array of u coordinates │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ -LocationArray() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_n_u_m_L_o_c_a_t_i_o_n_s │ │ │ │ │ -int numLocations │ │ │ │ │ -number of (u,v) coordinates in the array │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ -_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_p_t_e_x_I_d_x │ │ │ │ │ -int ptexIdx │ │ │ │ │ -ptex face index │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ -Stencil table factory class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_8_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g │ │ │ │ │ -static StencilTable const * AppendLocalPointStencilTableVarying(TopologyRefiner │ │ │ │ │ -const &refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ -*localPointStencilTable, bool factorize=true) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ -static StencilTable const * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ -options=Options()) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static StencilTable const * AppendLocalPointStencilTableFaceVarying │ │ │ │ │ -(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, │ │ │ │ │ -StencilTable const *localPointStencilTable, int channel=0, bool factorize=true) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const │ │ │ │ │ -&refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ -*localPointStencilTable, bool factorize=true) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ -static StencilTable const * Create(int numTables, StencilTable const **tables) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ -Stencil table factory class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ -static LimitStencilTable const * Create(TopologyRefiner const &refiner, │ │ │ │ │ -LocationArrayVec const &locationArrays, StencilTable const *cvStencils=0, │ │ │ │ │ -PatchTable const *patchTable=0, Options options=Options()) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_I_n_d_e_x │ │ │ │ │ +Vtr::Index Index │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +A simple reference to raw topology data for use with TopologyRefinerFactory. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_f_v_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +FVarChannel const * fvarChannels │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int numVertices │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_o_r_n_e_r_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +Index const * cornerVertexIndices │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_v_e_r_t_I_n_d_i_c_e_s_P_e_r_F_a_c_e │ │ │ │ │ +Index const * vertIndicesPerFace │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_r_e_a_s_e_V_e_r_t_e_x_I_n_d_e_x_P_a_i_r_s │ │ │ │ │ +Index const * creaseVertexIndexPairs │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_h_o_l_e_I_n_d_i_c_e_s │ │ │ │ │ +Index const * holeIndices │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_F_a_c_e_s │ │ │ │ │ +int numFaces │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_C_o_r_n_e_r_s │ │ │ │ │ +int numCorners │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_o_r_n_e_r_W_e_i_g_h_t_s │ │ │ │ │ +float const * cornerWeights │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_i_s_L_e_f_t_H_a_n_d_e_d │ │ │ │ │ +bool isLeftHanded │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_V_e_r_t_s_P_e_r_F_a_c_e │ │ │ │ │ +int const * numVertsPerFace │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +TopologyDescriptor() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_r_e_a_s_e_W_e_i_g_h_t_s │ │ │ │ │ +float const * creaseWeights │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_C_r_e_a_s_e_s │ │ │ │ │ +int numCreases │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_H_o_l_e_s │ │ │ │ │ +int numHoles │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int numFVarChannels │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_: │ │ │ │ │ +_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ +FVarChannel() │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_: │ │ │ │ │ +_v_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ +Index const * valueIndices │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_:_n_u_m_V_a_l_u_e_s │ │ │ │ │ +int numValues │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ +static bool assignComponentTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ +&mesh) │ │ │ │ │ +Specify the relationships between vertices, faces, etc. ie the face-vertices, │ │ │ │ │ +vertex-faces,... │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y │ │ │ │ │ +static void reportInvalidTopology(TopologyError errCode, char const *msg, MESH │ │ │ │ │ +const &mesh) │ │ │ │ │ +(Optional) Control run-time topology validation and error reporting │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_7_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s │ │ │ │ │ +static bool assignComponentTags(TopologyRefiner &newRefiner, MESH const &mesh) │ │ │ │ │ +(Optional) Specify edge or vertex sharpness or face holes │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_9_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ +static bool resizeComponentTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ +&mesh) │ │ │ │ │ +Specify the number of vertices, faces, face-vertices, etc. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_5_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_a_s_s_i_g_n_F_a_c_e_V_a_r_y_i_n_g_T_o_p_o_l_o_g_y │ │ │ │ │ +static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ +&mesh) │ │ │ │ │ +(Optional) Specify face-varying data per face │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_7_4 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ Stores topology data for a specified set of refinement options. │ │ │ │ │ DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTableFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,31 +90,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
topologyDescriptor.h File Reference
│ │ │ │ +
stencilTableFactory.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/topologyRefiner.h"
│ │ │ │ -#include "../far/topologyRefinerFactory.h"
│ │ │ │ -#include "../far/error.h"
│ │ │ │ -#include <cassert>
│ │ │ │ +#include "../far/patchTable.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  TopologyDescriptor
 A simple reference to raw topology data for use with TopologyRefinerFactory. More...
class  StencilTableFactoryReal< REAL >
 A specialized factory for StencilTable. More...
 
struct  TopologyDescriptor::FVarChannel
struct  StencilTableFactoryReal< REAL >::Options
 
class  LimitStencilTableFactoryReal< REAL >
 A specialized factory for LimitStencilTable. More...
 
struct  LimitStencilTableFactoryReal< REAL >::Options
 
struct  LimitStencilTableFactoryReal< REAL >::LocationArray
 Descriptor for limit surface locations. More...
 
class  StencilTableFactory
 Stencil table factory class wrapping the template for compatibility. More...
 
class  LimitStencilTableFactory
 Stencil table factory class wrapping the template for compatibility. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,13 +135,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,43 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -topologyDescriptor.h File Reference │ │ │ │ │ +stencilTableFactory.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_e_r_r_o_r_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -  A simple reference to raw topology data for use with │ │ │ │ │ - _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y. _M_o_r_e_._._. │ │ │ │ │ + class   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  A specialized factory for _S_t_e_n_c_i_l_T_a_b_l_e. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ +struct   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ +  │ │ │ │ │ + class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  A specialized factory for _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ +  │ │ │ │ │ +struct   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _R_E_A_L_ _>_:_:_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ +  Descriptor for limit surface locations. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ +  _S_t_e_n_c_i_l table factory class wrapping the template for compatibility. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ +  _S_t_e_n_c_i_l table factory class wrapping the template for compatibility. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00716.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,9 @@ │ │ │ │ │ var a00716 = [ │ │ │ │ │ - ["TopologyDescriptor", "a01105.html", "a01105"], │ │ │ │ │ - ["FVarChannel", "a01109.html", "a01109"] │ │ │ │ │ + ["StencilTableFactoryReal< REAL >", "a01045.html", "a01045"], │ │ │ │ │ + ["Options", "a01085.html", "a01085"], │ │ │ │ │ + ["LimitStencilTableFactoryReal< REAL >", "a01049.html", "a01049"], │ │ │ │ │ + ["Options", "a01089.html", "a01089"], │ │ │ │ │ + ["LocationArray", "a01093.html", "a01093"], │ │ │ │ │ + ["StencilTableFactory", "a01097.html", null], │ │ │ │ │ + ["LimitStencilTableFactory", "a01101.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTableFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
topologyDescriptor.h
│ │ │ │ +
stencilTableFactory.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,146 +118,358 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
│ │ │ │ -
25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
│ │ │ │ -
26
│ │ │ │ -
27#include "../version.h"
│ │ │ │ -
28
│ │ │ │ -
29#include "../far/topologyRefiner.h"
│ │ │ │ -
30#include "../far/topologyRefinerFactory.h"
│ │ │ │ -
31#include "../far/error.h"
│ │ │ │ -
32
│ │ │ │ -
33#include <cassert>
│ │ │ │ -
34
│ │ │ │ -
35namespace OpenSubdiv {
│ │ │ │ -
36namespace OPENSUBDIV_VERSION {
│ │ │ │ -
37
│ │ │ │ -
38namespace Far {
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50
│ │ │ │ - │ │ │ │ - │ │ │ │ -
53
│ │ │ │ -
54 int const * numVertsPerFace;
│ │ │ │ - │ │ │ │ -
56
│ │ │ │ - │ │ │ │ - │ │ │ │ -
59 float const * creaseWeights;
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ +
26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29
│ │ │ │ +
30#include "../far/patchTable.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <vector>
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Far {
│ │ │ │ +
38
│ │ │ │ +
39class TopologyRefiner;
│ │ │ │ +
40
│ │ │ │ +
41template <typename REAL> class StencilReal;
│ │ │ │ +
42template <typename REAL> class StencilTableReal;
│ │ │ │ +
43
│ │ │ │ +
44template <typename REAL> class LimitStencilReal;
│ │ │ │ +
45template <typename REAL> class LimitStencilTableReal;
│ │ │ │ +
46
│ │ │ │ +
47
│ │ │ │ +
50template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
53public:
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
55 enum Mode {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
59 };
│ │ │ │ +
│ │ │ │
60
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63 float const * cornerWeights;
│ │ │ │ -
64
│ │ │ │ - │ │ │ │ - │ │ │ │ -
67
│ │ │ │ - │ │ │ │ -
69
│ │ │ │ -
70 // Face-varying data channel -- value indices correspond to vertex indices,
│ │ │ │ -
71 // i.e. one for every vertex of every face:
│ │ │ │ -
72 //
│ │ │ │ -
│ │ │ │ -
73 struct FVarChannel {
│ │ │ │ -
74
│ │ │ │ - │ │ │ │ - │ │ │ │ -
77
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ - │ │ │ │ - │ │ │ │ -
83
│ │ │ │ - │ │ │ │ -
85};
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
87
│ │ │ │ -
88//
│ │ │ │ -
89// Forward declarations of required TopologyRefinerFactory<TopologyDescriptor>
│ │ │ │ -
90// specializations (defined internally):
│ │ │ │ -
91//
│ │ │ │ -
92// @cond EXCLUDE_DOXYGEN
│ │ │ │ -
93
│ │ │ │ -
94template <>
│ │ │ │ -
95bool
│ │ │ │ - │ │ │ │ -
97 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ -
98
│ │ │ │ -
99template <>
│ │ │ │ -
100bool
│ │ │ │ - │ │ │ │ -
102 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ -
103
│ │ │ │ -
104template <>
│ │ │ │ -
105bool
│ │ │ │ - │ │ │ │ -
107 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ -
108
│ │ │ │ -
109template <>
│ │ │ │ -
110bool
│ │ │ │ - │ │ │ │ -
112 TopologyRefiner & refiner, TopologyDescriptor const & desc);
│ │ │ │ +
│ │ │ │ +
61 struct Options {
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 generateOffsets(false),
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
68 maxLevel(10),
│ │ │ │ +
69 fvarChannel(0) { }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
71 unsigned int interpolationMode : 2,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
79 unsigned int fvarChannel;
│ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
82
│ │ │ │ + │ │ │ │ +
95 TopologyRefiner const & refiner, Options options = Options());
│ │ │ │ +
96
│ │ │ │ +
97
│ │ │ │ + │ │ │ │ +
111 int numTables, StencilTableReal<REAL> const ** tables);
│ │ │ │ +
112
│ │ │ │
113
│ │ │ │ -
114template <>
│ │ │ │ -
115void
│ │ │ │ - │ │ │ │ -
117 TopologyError errCode, char const * msg, TopologyDescriptor const & desc);
│ │ │ │ -
118
│ │ │ │ -
119// @endcond
│ │ │ │ -
120
│ │ │ │ -
121} // end namespace Far
│ │ │ │ -
122
│ │ │ │ -
123} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
124using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
125} // end namespace OpenSubdiv
│ │ │ │ -
126
│ │ │ │ -
127#endif /* OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H */
│ │ │ │ - │ │ │ │ - │ │ │ │ -
A simple reference to raw topology data for use with TopologyRefinerFactory.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static bool assignComponentTopology(TopologyRefiner &newRefiner, MESH const &mesh)
Specify the relationships between vertices, faces, etc. ie the face-vertices, vertex-faces,...
│ │ │ │ -
static void reportInvalidTopology(TopologyError errCode, char const *msg, MESH const &mesh)
(Optional) Control run-time topology validation and error reporting
│ │ │ │ -
static bool assignComponentTags(TopologyRefiner &newRefiner, MESH const &mesh)
(Optional) Specify edge or vertex sharpness or face holes
│ │ │ │ -
static bool resizeComponentTopology(TopologyRefiner &newRefiner, MESH const &mesh)
Specify the number of vertices, faces, face-vertices, etc.
│ │ │ │ -
static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const &mesh)
(Optional) Specify face-varying data per face
│ │ │ │ + │ │ │ │ +
129 TopologyRefiner const &refiner,
│ │ │ │ +
130 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ +
131 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ +
132 bool factorize = true);
│ │ │ │ +
133
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
149 TopologyRefiner const &refiner,
│ │ │ │ +
150 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ +
151 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ +
152 bool factorize = true) {
│ │ │ │ + │ │ │ │ +
154 refiner, baseStencilTable, localPointStencilTable, factorize);
│ │ │ │ +
155 }
│ │ │ │ +
│ │ │ │ +
156
│ │ │ │ + │ │ │ │ +
175 TopologyRefiner const &refiner,
│ │ │ │ +
176 StencilTableReal<REAL> const *baseStencilTable,
│ │ │ │ +
177 StencilTableReal<REAL> const *localPointStencilTable,
│ │ │ │ +
178 int channel = 0,
│ │ │ │ +
179 bool factorize = true);
│ │ │ │ +
180
│ │ │ │ +
181private:
│ │ │ │ +
182
│ │ │ │ +
183 // Generate stencils for the coarse control-vertices (single weight = 1.0f)
│ │ │ │ +
184 static void generateControlVertStencils(
│ │ │ │ +
185 int numControlVerts,
│ │ │ │ +
186 StencilReal<REAL> & dst);
│ │ │ │ +
187
│ │ │ │ +
188 // Internal method to splice local point stencils
│ │ │ │ +
189 static StencilTableReal<REAL> const * appendLocalPointStencilTable(
│ │ │ │ +
190 TopologyRefiner const &refiner,
│ │ │ │ +
191 StencilTableReal<REAL> const * baseStencilTable,
│ │ │ │ +
192 StencilTableReal<REAL> const * localPointStencilTable,
│ │ │ │ +
193 int channel,
│ │ │ │ +
194 bool factorize);
│ │ │ │ +
195};
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
208template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
210
│ │ │ │ +
211public:
│ │ │ │ +
212
│ │ │ │ +
│ │ │ │ +
213 enum Mode {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
217 };
│ │ │ │ +
│ │ │ │ +
218
│ │ │ │ +
│ │ │ │ +
219 struct Options {
│ │ │ │ +
220
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
224 fvarChannel(0) { }
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
226 unsigned int interpolationMode : 2,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
229 unsigned int fvarChannel;
│ │ │ │ +
230 };
│ │ │ │ +
│ │ │ │ +
231
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
234
│ │ │ │ +
235 LocationArray() : ptexIdx(-1), numLocations(0), s(0), t(0) { }
│ │ │ │ +
236
│ │ │ │ + │ │ │ │ + │ │ │ │ +
239
│ │ │ │ +
240 REAL const * s,
│ │ │ │ +
241 * t;
│ │ │ │ +
242 };
│ │ │ │ +
│ │ │ │ +
243
│ │ │ │ +
244 typedef std::vector<LocationArray> LocationArrayVec;
│ │ │ │ +
245
│ │ │ │ + │ │ │ │ +
270 TopologyRefiner const & refiner,
│ │ │ │ +
271 LocationArrayVec const & locationArrays,
│ │ │ │ +
272 StencilTableReal<REAL> const * cvStencils = 0,
│ │ │ │ +
273 PatchTable const * patchTable = 0,
│ │ │ │ +
274 Options options = Options());
│ │ │ │ +
275
│ │ │ │ +
276};
│ │ │ │ +
│ │ │ │ +
277
│ │ │ │ +
278
│ │ │ │ +
279//
│ │ │ │ +
280// Public wrapper classes for the templates
│ │ │ │ +
281//
│ │ │ │ +
282class Stencil;
│ │ │ │ +
283class StencilTable;
│ │ │ │ +
284
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
288private:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
291
│ │ │ │ +
292public:
│ │ │ │ +
│ │ │ │ +
293 static StencilTable const * Create(
│ │ │ │ +
294 TopologyRefiner const & refiner, Options options = Options()) {
│ │ │ │ +
295
│ │ │ │ +
296 return static_cast<StencilTable const *>(
│ │ │ │ +
297 BaseFactory::Create(refiner, options));
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299
│ │ │ │ +
│ │ │ │ +
300 static StencilTable const * Create(
│ │ │ │ +
301 int numTables, StencilTable const ** tables) {
│ │ │ │ +
302
│ │ │ │ +
303 return static_cast<StencilTable const *>(
│ │ │ │ +
304 BaseFactory::Create(numTables,
│ │ │ │ +
305 reinterpret_cast<BaseTable const **>(tables)));
│ │ │ │ +
306 }
│ │ │ │ +
│ │ │ │ +
307
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
309 TopologyRefiner const &refiner,
│ │ │ │ +
310 StencilTable const *baseStencilTable,
│ │ │ │ +
311 StencilTable const *localPointStencilTable,
│ │ │ │ +
312 bool factorize = true) {
│ │ │ │ +
313
│ │ │ │ +
314 return static_cast<StencilTable const *>(
│ │ │ │ + │ │ │ │ +
316 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ +
317 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ +
318 factorize));
│ │ │ │ +
319 }
│ │ │ │ +
│ │ │ │ +
320
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
322 TopologyRefiner const &refiner,
│ │ │ │ +
323 StencilTable const *baseStencilTable,
│ │ │ │ +
324 StencilTable const *localPointStencilTable,
│ │ │ │ +
325 bool factorize = true) {
│ │ │ │ +
326
│ │ │ │ +
327 return static_cast<StencilTable const *>(
│ │ │ │ + │ │ │ │ +
329 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ +
330 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ +
331 factorize));
│ │ │ │ +
332 }
│ │ │ │ +
│ │ │ │ +
333
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
335 TopologyRefiner const &refiner,
│ │ │ │ +
336 StencilTable const *baseStencilTable,
│ │ │ │ +
337 StencilTable const *localPointStencilTable,
│ │ │ │ +
338 int channel = 0,
│ │ │ │ +
339 bool factorize = true) {
│ │ │ │ +
340
│ │ │ │ +
341 return static_cast<StencilTable const *>(
│ │ │ │ + │ │ │ │ +
343 static_cast<BaseTable const *>(baseStencilTable),
│ │ │ │ +
344 static_cast<BaseTable const *>(localPointStencilTable),
│ │ │ │ +
345 channel, factorize));
│ │ │ │ +
346 }
│ │ │ │ +
│ │ │ │ +
347};
│ │ │ │ +
│ │ │ │ +
348
│ │ │ │ +
349class LimitStencil;
│ │ │ │ +
350class LimitStencilTable;
│ │ │ │ +
351
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
355private:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
358
│ │ │ │ +
359public:
│ │ │ │ +
│ │ │ │ +
360 static LimitStencilTable const * Create(
│ │ │ │ +
361 TopologyRefiner const & refiner,
│ │ │ │ +
362 LocationArrayVec const & locationArrays,
│ │ │ │ +
363 StencilTable const * cvStencils = 0,
│ │ │ │ +
364 PatchTable const * patchTable = 0,
│ │ │ │ +
365 Options options = Options()) {
│ │ │ │ +
366
│ │ │ │ +
367 return static_cast<LimitStencilTable const *>(
│ │ │ │ + │ │ │ │ +
369 refiner,
│ │ │ │ +
370 locationArrays,
│ │ │ │ +
371 static_cast<BaseTable const *>(cvStencils),
│ │ │ │ +
372 patchTable,
│ │ │ │ +
373 options));
│ │ │ │ +
374 }
│ │ │ │ +
│ │ │ │ +
375};
│ │ │ │ +
│ │ │ │ +
376
│ │ │ │ +
377} // end namespace Far
│ │ │ │ +
378
│ │ │ │ +
379} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
380using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
381
│ │ │ │ +
382} // end namespace OpenSubdiv
│ │ │ │ +
383
│ │ │ │ +
384#endif // OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
│ │ │ │ + │ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ +
static StencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, Options options=Options())
Instantiates StencilTable from TopologyRefiner that have been refined uniformly or adaptively.
│ │ │ │ +
static StencilTableReal< REAL > const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, int channel=0, bool factorize=true)
Utility function for stencil splicing for local point face-varying stencils.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static StencilTableReal< REAL > const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point varying stencils.
│ │ │ │ +
static StencilTableReal< REAL > const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point stencils.
│ │ │ │ +
static StencilTableReal< REAL > const * Create(int numTables, StencilTableReal< REAL > const **tables)
Instantiates StencilTable by concatenating an array of existing stencil tables.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static LimitStencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, LocationArrayVec const &locationArrays, StencilTableReal< REAL > const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options())
Instantiates LimitStencilTable from a TopologyRefiner that has been refined either uniformly or adapt...
│ │ │ │ + │ │ │ │ +
Vertex stencil class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
unsigned int generateIntermediateLevels
vertices at all levels or highest only
│ │ │ │ +
unsigned int generateControlVerts
generate stencils for control-vertices
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
unsigned int generate2ndDerivatives
Generate weights for 2nd derivatives.
│ │ │ │ +
unsigned int generate1stDerivatives
Generate weights for 1st derivatives.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Stencil table factory class wrapping the template for compatibility.
│ │ │ │ +
static StencilTable const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ +
static StencilTable const * Create(TopologyRefiner const &refiner, Options options=Options())
│ │ │ │ +
static StencilTable const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, int channel=0, bool factorize=true)
│ │ │ │ +
static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ +
static StencilTable const * Create(int numTables, StencilTable const **tables)
│ │ │ │ +
Stencil table factory class wrapping the template for compatibility.
│ │ │ │ +
static LimitStencilTable const * Create(TopologyRefiner const &refiner, LocationArrayVec const &locationArrays, StencilTable const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options())
│ │ │ │
Stores topology data for a specified set of refinement options.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -topologyDescriptor.h │ │ │ │ │ +stencilTableFactory.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,208 +23,498 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../far/topologyRefiner.h" │ │ │ │ │ -30#include "../far/topologyRefinerFactory.h" │ │ │ │ │ -31#include "../far/error.h" │ │ │ │ │ -32 │ │ │ │ │ -33#include │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Far { │ │ │ │ │ -39 │ │ │ │ │ -_4_9struct _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ -50 │ │ │ │ │ -_5_1 int _n_u_m_V_e_r_t_i_c_e_s, │ │ │ │ │ -_5_2 _n_u_m_F_a_c_e_s; │ │ │ │ │ -53 │ │ │ │ │ -_5_4 int const * _n_u_m_V_e_r_t_s_P_e_r_F_a_c_e; │ │ │ │ │ -_5_5 _I_n_d_e_x const * _v_e_r_t_I_n_d_i_c_e_s_P_e_r_F_a_c_e; │ │ │ │ │ -56 │ │ │ │ │ -_5_7 int _n_u_m_C_r_e_a_s_e_s; │ │ │ │ │ -_5_8 _I_n_d_e_x const * _c_r_e_a_s_e_V_e_r_t_e_x_I_n_d_e_x_P_a_i_r_s; │ │ │ │ │ -_5_9 float const * _c_r_e_a_s_e_W_e_i_g_h_t_s; │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29 │ │ │ │ │ +30#include "../far/patchTable.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Far { │ │ │ │ │ +38 │ │ │ │ │ +39class TopologyRefiner; │ │ │ │ │ +40 │ │ │ │ │ +41template class StencilReal; │ │ │ │ │ +42template class StencilTableReal; │ │ │ │ │ +43 │ │ │ │ │ +44template class LimitStencilReal; │ │ │ │ │ +45template class LimitStencilTableReal; │ │ │ │ │ +46 │ │ │ │ │ +47 │ │ │ │ │ +50template │ │ │ │ │ +_5_1class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ +52 │ │ │ │ │ +53public: │ │ │ │ │ +54 │ │ │ │ │ +_5_5 enum _M_o_d_e { │ │ │ │ │ +_5_6 _I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X=0, │ │ │ │ │ +_5_7 _I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G, │ │ │ │ │ +58 _I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ +_5_9 }; │ │ │ │ │ 60 │ │ │ │ │ -_6_1 int _n_u_m_C_o_r_n_e_r_s; │ │ │ │ │ -_6_2 _I_n_d_e_x const * _c_o_r_n_e_r_V_e_r_t_e_x_I_n_d_i_c_e_s; │ │ │ │ │ -_6_3 float const * _c_o_r_n_e_r_W_e_i_g_h_t_s; │ │ │ │ │ -64 │ │ │ │ │ -_6_5 int _n_u_m_H_o_l_e_s; │ │ │ │ │ -_6_6 _I_n_d_e_x const * _h_o_l_e_I_n_d_i_c_e_s; │ │ │ │ │ -67 │ │ │ │ │ -_6_8 bool _i_s_L_e_f_t_H_a_n_d_e_d; │ │ │ │ │ -69 │ │ │ │ │ -70 // Face-varying data channel -- value indices correspond to vertex indices, │ │ │ │ │ -71 // i.e. one for every vertex of every face: │ │ │ │ │ -72 // │ │ │ │ │ -_7_3 struct _F_V_a_r_C_h_a_n_n_e_l { │ │ │ │ │ -74 │ │ │ │ │ -_7_5 int _n_u_m_V_a_l_u_e_s; │ │ │ │ │ -_7_6 _I_n_d_e_x const * _v_a_l_u_e_I_n_d_i_c_e_s; │ │ │ │ │ -77 │ │ │ │ │ -_7_8 _F_V_a_r_C_h_a_n_n_e_l() : _n_u_m_V_a_l_u_e_s(0), _v_a_l_u_e_I_n_d_i_c_e_s(0) { } │ │ │ │ │ -79 }; │ │ │ │ │ -80 │ │ │ │ │ -_8_1 int _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ -_8_2 _F_V_a_r_C_h_a_n_n_e_l const * _f_v_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ -83 │ │ │ │ │ -_8_4 _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r(); │ │ │ │ │ -85}; │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -88// │ │ │ │ │ -89// Forward declarations of required │ │ │ │ │ -TopologyRefinerFactory │ │ │ │ │ -90// specializations (defined internally): │ │ │ │ │ -91// │ │ │ │ │ -92// @cond EXCLUDE_DOXYGEN │ │ │ │ │ -93 │ │ │ │ │ -94template <> │ │ │ │ │ -95bool │ │ │ │ │ -96_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y( │ │ │ │ │ -97 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ -98 │ │ │ │ │ -99template <> │ │ │ │ │ -100bool │ │ │ │ │ -101_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y( │ │ │ │ │ -102 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ -103 │ │ │ │ │ -104template <> │ │ │ │ │ -105bool │ │ │ │ │ -106_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s( │ │ │ │ │ -107 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ -108 │ │ │ │ │ -109template <> │ │ │ │ │ -110bool │ │ │ │ │ -111_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_a_s_s_i_g_n_F_a_c_e_V_a_r_y_i_n_g_T_o_p_o_l_o_g_y( │ │ │ │ │ -112 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ +_6_1 struct _O_p_t_i_o_n_s { │ │ │ │ │ +62 │ │ │ │ │ +_6_3 _O_p_t_i_o_n_s() : _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e(_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X), │ │ │ │ │ +64 _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s(false), │ │ │ │ │ +65 _g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s(false), │ │ │ │ │ +66 _g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s(true), │ │ │ │ │ +67 _f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s(true), │ │ │ │ │ +68 _m_a_x_L_e_v_e_l(10), │ │ │ │ │ +69 _f_v_a_r_C_h_a_n_n_e_l(0) { } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 unsigned int _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e : 2, │ │ │ │ │ +_7_2 _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s : 1, │ │ │ │ │ +_7_3 _g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s : 1, │ │ │ │ │ +_7_4 _g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s : 1, │ │ │ │ │ +_7_5 _f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s : 1, │ │ │ │ │ +_7_8 _m_a_x_L_e_v_e_l : 4; │ │ │ │ │ +_7_9 unsigned int _f_v_a_r_C_h_a_n_n_e_l; │ │ │ │ │ +81 }; │ │ │ │ │ +82 │ │ │ │ │ +_9_4 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ +95 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s()); │ │ │ │ │ +96 │ │ │ │ │ +97 │ │ │ │ │ +_1_1_0 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ +111 int numTables, _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const ** tables); │ │ │ │ │ +112 │ │ │ │ │ 113 │ │ │ │ │ -114template <> │ │ │ │ │ -115void │ │ │ │ │ -116_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_>_:_:_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y( │ │ │ │ │ -117 TopologyError errCode, char const * msg, _T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r const & desc); │ │ │ │ │ -118 │ │ │ │ │ -119// @endcond │ │ │ │ │ -120 │ │ │ │ │ -121} // end namespace Far │ │ │ │ │ -122 │ │ │ │ │ -123} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -124using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -125} // end namespace OpenSubdiv │ │ │ │ │ -126 │ │ │ │ │ -127#endif /* OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H */ │ │ │ │ │ +_1_2_8 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +129 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +130 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ +131 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ +132 bool factorize = true); │ │ │ │ │ +133 │ │ │ │ │ +_1_4_8 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g( │ │ │ │ │ +149 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +150 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ +151 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ +152 bool factorize = true) { │ │ │ │ │ +153 return _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +154 refiner, baseStencilTable, localPointStencilTable, factorize); │ │ │ │ │ +155 } │ │ │ │ │ +156 │ │ │ │ │ +_1_7_4 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +175 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +176 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *baseStencilTable, │ │ │ │ │ +177 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *localPointStencilTable, │ │ │ │ │ +178 int channel = 0, │ │ │ │ │ +179 bool factorize = true); │ │ │ │ │ +180 │ │ │ │ │ +181private: │ │ │ │ │ +182 │ │ │ │ │ +183 // Generate stencils for the coarse control-vertices (single weight = 1.0f) │ │ │ │ │ +184 static void generateControlVertStencils( │ │ │ │ │ +185 int numControlVerts, │ │ │ │ │ +186 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> & dst); │ │ │ │ │ +187 │ │ │ │ │ +188 // Internal method to splice local point stencils │ │ │ │ │ +189 static _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * appendLocalPointStencilTable( │ │ │ │ │ +190 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +191 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * baseStencilTable, │ │ │ │ │ +192 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * localPointStencilTable, │ │ │ │ │ +193 int channel, │ │ │ │ │ +194 bool factorize); │ │ │ │ │ +195}; │ │ │ │ │ +196 │ │ │ │ │ +208template │ │ │ │ │ +_2_0_9class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ +210 │ │ │ │ │ +211public: │ │ │ │ │ +212 │ │ │ │ │ +_2_1_3 enum _M_o_d_e { │ │ │ │ │ +_2_1_4 _I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X=0, │ │ │ │ │ +_2_1_5 _I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G, │ │ │ │ │ +216 _I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ +_2_1_7 }; │ │ │ │ │ +218 │ │ │ │ │ +_2_1_9 struct _O_p_t_i_o_n_s { │ │ │ │ │ +220 │ │ │ │ │ +_2_2_1 _O_p_t_i_o_n_s() : _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e(_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X), │ │ │ │ │ +222 _g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s(true), │ │ │ │ │ +223 _g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s(false), │ │ │ │ │ +224 _f_v_a_r_C_h_a_n_n_e_l(0) { } │ │ │ │ │ +225 │ │ │ │ │ +_2_2_6 unsigned int _i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e : 2, │ │ │ │ │ +_2_2_7 _g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s : 1, │ │ │ │ │ +_2_2_8 _g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s : 1; │ │ │ │ │ +_2_2_9 unsigned int _f_v_a_r_C_h_a_n_n_e_l; │ │ │ │ │ +230 }; │ │ │ │ │ +231 │ │ │ │ │ +_2_3_3 struct _L_o_c_a_t_i_o_n_A_r_r_a_y { │ │ │ │ │ +234 │ │ │ │ │ +_2_3_5 _L_o_c_a_t_i_o_n_A_r_r_a_y() : _p_t_e_x_I_d_x(-1), _n_u_m_L_o_c_a_t_i_o_n_s(0), _s(0), _t(0) { } │ │ │ │ │ +236 │ │ │ │ │ +_2_3_7 int _p_t_e_x_I_d_x, │ │ │ │ │ +_2_3_8 _n_u_m_L_o_c_a_t_i_o_n_s; │ │ │ │ │ +239 │ │ │ │ │ +_2_4_0 REAL const * _s, │ │ │ │ │ +_2_4_1 * _t; │ │ │ │ │ +242 }; │ │ │ │ │ +243 │ │ │ │ │ +_2_4_4 typedef std::vector _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c; │ │ │ │ │ +245 │ │ │ │ │ +_2_6_9 static _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _C_r_e_a_t_e( │ │ │ │ │ +270 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ +271 _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c const & locationArrays, │ │ │ │ │ +272 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * cvStencils = 0, │ │ │ │ │ +273 _P_a_t_c_h_T_a_b_l_e const * patchTable = 0, │ │ │ │ │ +274 _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s()); │ │ │ │ │ +275 │ │ │ │ │ +276}; │ │ │ │ │ +277 │ │ │ │ │ +278 │ │ │ │ │ +279// │ │ │ │ │ +280// Public wrapper classes for the templates │ │ │ │ │ +281// │ │ │ │ │ +282class _S_t_e_n_c_i_l; │ │ │ │ │ +283class _S_t_e_n_c_i_l_T_a_b_l_e; │ │ │ │ │ +284 │ │ │ │ │ +_2_8_7class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y : public _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l { │ │ │ │ │ +288private: │ │ │ │ │ +289 typedef _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ +290 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ +291 │ │ │ │ │ +292public: │ │ │ │ │ +_2_9_3 static _S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ +294 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, Options options = Options()) { │ │ │ │ │ +295 │ │ │ │ │ +296 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +297 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(refiner, options)); │ │ │ │ │ +298 } │ │ │ │ │ +299 │ │ │ │ │ +_3_0_0 static _S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ +301 int numTables, _S_t_e_n_c_i_l_T_a_b_l_e const ** tables) { │ │ │ │ │ +302 │ │ │ │ │ +303 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +304 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(numTables, │ │ │ │ │ +305 reinterpret_cast<_B_a_s_e_T_a_b_l_e const **>(tables))); │ │ │ │ │ +306 } │ │ │ │ │ +307 │ │ │ │ │ +_3_0_8 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +309 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +310 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ +311 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ +312 bool factorize = true) { │ │ │ │ │ +313 │ │ │ │ │ +314 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +315 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e(refiner, │ │ │ │ │ +316 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ +317 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ +318 factorize)); │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +_3_2_1 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g( │ │ │ │ │ +322 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +323 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ +324 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ +325 bool factorize = true) { │ │ │ │ │ +326 │ │ │ │ │ +327 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +328 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g(refiner, │ │ │ │ │ +329 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ +330 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ +331 factorize)); │ │ │ │ │ +332 } │ │ │ │ │ +333 │ │ │ │ │ +_3_3_4 static _S_t_e_n_c_i_l_T_a_b_l_e const * _A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +335 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +336 _S_t_e_n_c_i_l_T_a_b_l_e const *baseStencilTable, │ │ │ │ │ +337 _S_t_e_n_c_i_l_T_a_b_l_e const *localPointStencilTable, │ │ │ │ │ +338 int channel = 0, │ │ │ │ │ +339 bool factorize = true) { │ │ │ │ │ +340 │ │ │ │ │ +341 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +342 _B_a_s_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g(refiner, │ │ │ │ │ +343 static_cast<_B_a_s_e_T_a_b_l_e const *>(baseStencilTable), │ │ │ │ │ +344 static_cast<_B_a_s_e_T_a_b_l_e const *>(localPointStencilTable), │ │ │ │ │ +345 channel, factorize)); │ │ │ │ │ +346 } │ │ │ │ │ +347}; │ │ │ │ │ +348 │ │ │ │ │ +349class LimitStencil; │ │ │ │ │ +350class LimitStencilTable; │ │ │ │ │ +351 │ │ │ │ │ +_3_5_4class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y : public _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ +{ │ │ │ │ │ +355private: │ │ │ │ │ +356 typedef _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_F_a_c_t_o_r_y; │ │ │ │ │ +357 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ +358 │ │ │ │ │ +359public: │ │ │ │ │ +_3_6_0 static _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const * _C_r_e_a_t_e( │ │ │ │ │ +361 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ +362 _L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c const & locationArrays, │ │ │ │ │ +363 _S_t_e_n_c_i_l_T_a_b_l_e const * cvStencils = 0, │ │ │ │ │ +364 _P_a_t_c_h_T_a_b_l_e const * patchTable = 0, │ │ │ │ │ +365 Options options = Options()) { │ │ │ │ │ +366 │ │ │ │ │ +367 return static_cast<_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +368 _B_a_s_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e( │ │ │ │ │ +369 refiner, │ │ │ │ │ +370 locationArrays, │ │ │ │ │ +371 static_cast<_B_a_s_e_T_a_b_l_e const *>(cvStencils), │ │ │ │ │ +372 patchTable, │ │ │ │ │ +373 options)); │ │ │ │ │ +374 } │ │ │ │ │ +375}; │ │ │ │ │ +376 │ │ │ │ │ +377} // end namespace Far │ │ │ │ │ +378 │ │ │ │ │ +379} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +380using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +381 │ │ │ │ │ +382} // end namespace OpenSubdiv │ │ │ │ │ +383 │ │ │ │ │ +384#endif // OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_I_n_d_e_x │ │ │ │ │ -Vtr::Index Index │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -A simple reference to raw topology data for use with TopologyRefinerFactory. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_f_v_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -FVarChannel const * fvarChannels │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int numVertices │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_o_r_n_e_r_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -Index const * cornerVertexIndices │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_v_e_r_t_I_n_d_i_c_e_s_P_e_r_F_a_c_e │ │ │ │ │ -Index const * vertIndicesPerFace │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_r_e_a_s_e_V_e_r_t_e_x_I_n_d_e_x_P_a_i_r_s │ │ │ │ │ -Index const * creaseVertexIndexPairs │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_h_o_l_e_I_n_d_i_c_e_s │ │ │ │ │ -Index const * holeIndices │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_F_a_c_e_s │ │ │ │ │ -int numFaces │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_C_o_r_n_e_r_s │ │ │ │ │ -int numCorners │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_o_r_n_e_r_W_e_i_g_h_t_s │ │ │ │ │ -float const * cornerWeights │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_i_s_L_e_f_t_H_a_n_d_e_d │ │ │ │ │ -bool isLeftHanded │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_V_e_r_t_s_P_e_r_F_a_c_e │ │ │ │ │ -int const * numVertsPerFace │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -TopologyDescriptor() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_c_r_e_a_s_e_W_e_i_g_h_t_s │ │ │ │ │ -float const * creaseWeights │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_C_r_e_a_s_e_s │ │ │ │ │ -int numCreases │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_H_o_l_e_s │ │ │ │ │ -int numHoles │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_n_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int numFVarChannels │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_: │ │ │ │ │ -_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ -FVarChannel() │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_: │ │ │ │ │ -_v_a_l_u_e_I_n_d_i_c_e_s │ │ │ │ │ -Index const * valueIndices │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_:_:_F_V_a_r_C_h_a_n_n_e_l_:_:_n_u_m_V_a_l_u_e_s │ │ │ │ │ -int numValues │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ -static bool assignComponentTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ -&mesh) │ │ │ │ │ -Specify the relationships between vertices, faces, etc. ie the face-vertices, │ │ │ │ │ -vertex-faces,... │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y │ │ │ │ │ -static void reportInvalidTopology(TopologyError errCode, char const *msg, MESH │ │ │ │ │ -const &mesh) │ │ │ │ │ -(Optional) Control run-time topology validation and error reporting │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_7_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s │ │ │ │ │ -static bool assignComponentTags(TopologyRefiner &newRefiner, MESH const &mesh) │ │ │ │ │ -(Optional) Specify edge or vertex sharpness or face holes │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_9_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ -static bool resizeComponentTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ -&mesh) │ │ │ │ │ -Specify the number of vertices, faces, face-vertices, etc. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_5_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_a_s_s_i_g_n_F_a_c_e_V_a_r_y_i_n_g_T_o_p_o_l_o_g_y │ │ │ │ │ -static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const │ │ │ │ │ -&mesh) │ │ │ │ │ -(Optional) Specify face-varying data per face │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_6_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ +A specialized factory for StencilTable. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ +static StencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, │ │ │ │ │ +Options options=Options()) │ │ │ │ │ +Instantiates StencilTable from TopologyRefiner that have been refined uniformly │ │ │ │ │ +or adaptively. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static StencilTableReal< REAL > const * AppendLocalPointStencilTableFaceVarying │ │ │ │ │ +(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ +*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, int │ │ │ │ │ +channel=0, bool factorize=true) │ │ │ │ │ +Utility function for stencil splicing for local point face-varying stencils. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_M_o_d_e │ │ │ │ │ +Mode │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ +@ INTERPOLATE_FACE_VARYING │ │ │ │ │ +face-varying primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ +@ INTERPOLATE_VARYING │ │ │ │ │ +varying primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X │ │ │ │ │ +@ INTERPOLATE_VERTEX │ │ │ │ │ +vertex primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g │ │ │ │ │ +static StencilTableReal< REAL > const * AppendLocalPointStencilTableVarying │ │ │ │ │ +(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ +*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool │ │ │ │ │ +factorize=true) │ │ │ │ │ +Utility function for stencil splicing for local point varying stencils. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +static StencilTableReal< REAL > const * AppendLocalPointStencilTable │ │ │ │ │ +(TopologyRefiner const &refiner, StencilTableReal< REAL > const │ │ │ │ │ +*baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool │ │ │ │ │ +factorize=true) │ │ │ │ │ +Utility function for stencil splicing for local point stencils. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ +static StencilTableReal< REAL > const * Create(int numTables, StencilTableReal< │ │ │ │ │ +REAL > const **tables) │ │ │ │ │ +Instantiates StencilTable by concatenating an array of existing stencil tables. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ +A specialized factory for LimitStencilTable. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_M_o_d_e │ │ │ │ │ +Mode │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___F_A_C_E___V_A_R_Y_I_N_G │ │ │ │ │ +@ INTERPOLATE_FACE_VARYING │ │ │ │ │ +face-varying primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ +@ INTERPOLATE_VARYING │ │ │ │ │ +varying primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___V_E_R_T_E_X │ │ │ │ │ +@ INTERPOLATE_VERTEX │ │ │ │ │ +vertex primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_V_e_c │ │ │ │ │ +std::vector< LocationArray > LocationArrayVec │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_C_r_e_a_t_e │ │ │ │ │ +static LimitStencilTableReal< REAL > const * Create(TopologyRefiner const │ │ │ │ │ +&refiner, LocationArrayVec const &locationArrays, StencilTableReal< REAL > │ │ │ │ │ +const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options()) │ │ │ │ │ +Instantiates LimitStencilTable from a TopologyRefiner that has been refined │ │ │ │ │ +either uniformly or adapt... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +Vertex stencil descriptor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l │ │ │ │ │ +Vertex stencil class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +Table of subdivision stencils. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +Table of limit subdivision stencils. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_f_a_c_t_o_r_i_z_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s │ │ │ │ │ +unsigned int factorizeIntermediateLevels │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_:_m_a_x_L_e_v_e_l │ │ │ │ │ +unsigned int maxLevel │ │ │ │ │ +generate stencils up to 'maxLevel' │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_I_n_t_e_r_m_e_d_i_a_t_e_L_e_v_e_l_s │ │ │ │ │ +unsigned int generateIntermediateLevels │ │ │ │ │ +vertices at all levels or highest only │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_C_o_n_t_r_o_l_V_e_r_t_s │ │ │ │ │ +unsigned int generateControlVerts │ │ │ │ │ +generate stencils for control-vertices │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s │ │ │ │ │ +unsigned int generateOffsets │ │ │ │ │ +populate optional "_offsets" field │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_f_v_a_r_C_h_a_n_n_e_l │ │ │ │ │ +unsigned int fvarChannel │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e │ │ │ │ │ +unsigned int interpolationMode │ │ │ │ │ +interpolation mode │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_1_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_O_p_t_i_o_n_s │ │ │ │ │ +Options() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_f_v_a_r_C_h_a_n_n_e_l │ │ │ │ │ +unsigned int fvarChannel │ │ │ │ │ +face-varying channel to use │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_i_n_t_e_r_p_o_l_a_t_i_o_n_M_o_d_e │ │ │ │ │ +unsigned int interpolationMode │ │ │ │ │ +interpolation mode │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_2_n_d_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +unsigned int generate2ndDerivatives │ │ │ │ │ +Generate weights for 2nd derivatives. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_1_s_t_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +unsigned int generate1stDerivatives │ │ │ │ │ +Generate weights for 1st derivatives. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ +Descriptor for limit surface locations. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_t │ │ │ │ │ +REAL const * t │ │ │ │ │ +array of v coordinates │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_s │ │ │ │ │ +REAL const * s │ │ │ │ │ +array of u coordinates │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_L_o_c_a_t_i_o_n_A_r_r_a_y │ │ │ │ │ +LocationArray() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_n_u_m_L_o_c_a_t_i_o_n_s │ │ │ │ │ +int numLocations │ │ │ │ │ +number of (u,v) coordinates in the array │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_:_: │ │ │ │ │ +_L_o_c_a_t_i_o_n_A_r_r_a_y_:_:_p_t_e_x_I_d_x │ │ │ │ │ +int ptexIdx │ │ │ │ │ +ptex face index │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_3_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ +Stencil table factory class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_8_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_V_a_r_y_i_n_g │ │ │ │ │ +static StencilTable const * AppendLocalPointStencilTableVarying(TopologyRefiner │ │ │ │ │ +const &refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ +*localPointStencilTable, bool factorize=true) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ +static StencilTable const * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ +options=Options()) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static StencilTable const * AppendLocalPointStencilTableFaceVarying │ │ │ │ │ +(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, │ │ │ │ │ +StencilTable const *localPointStencilTable, int channel=0, bool factorize=true) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const │ │ │ │ │ +&refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ +*localPointStencilTable, bool factorize=true) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ +static StencilTable const * Create(int numTables, StencilTable const **tables) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ +Stencil table factory class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ +static LimitStencilTable const * Create(TopologyRefiner const &refiner, │ │ │ │ │ +LocationArrayVec const &locationArrays, StencilTable const *cvStencils=0, │ │ │ │ │ +PatchTable const *patchTable=0, Options options=Options()) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_6_0 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ Stores topology data for a specified set of refinement options. │ │ │ │ │ DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/ptexIndices.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,28 +90,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
ptexIndices.h File Reference
│ │ │ │ +
stencilTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/topologyRefiner.h"
│ │ │ │ #include "../far/types.h"
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstring>
│ │ │ │ #include <vector>
│ │ │ │ +#include <iostream>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  PtexIndices
 Object used to compute and query ptex face indices. More...
class  StencilReal< REAL >
 Vertex stencil descriptor. More...
 
class  Stencil
 Vertex stencil class wrapping the template for compatibility. More...
 
class  StencilTableReal< REAL >
 Table of subdivision stencils. More...
 
class  StencilTable
 Stencil table class wrapping the template for compatibility. More...
 
class  LimitStencilReal< REAL >
 Limit point stencil descriptor. More...
 
class  LimitStencil
 Limit point stencil class wrapping the template for compatibility. More...
 
class  LimitStencilTableReal< REAL >
 Table of limit subdivision stencils. More...
 
class  LimitStencilTable
 Limit stencil table class wrapping the template for compatibility. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,13 +143,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,51 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -ptexIndices.h File Reference │ │ │ │ │ +stencilTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ #include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -  Object used to compute and query ptex face indices. _M_o_r_e_._._. │ │ │ │ │ +class   _S_t_e_n_c_i_l_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  Vertex stencil descriptor. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _S_t_e_n_c_i_l │ │ │ │ │ +  Vertex stencil class wrapping the template for compatibility. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  Table of subdivision stencils. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  _S_t_e_n_c_i_l table class wrapping the template for compatibility. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  Limit point stencil descriptor. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +  Limit point stencil class wrapping the template for compatibility. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  Table of limit subdivision stencils. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00719.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,10 @@ │ │ │ │ │ var a00719 = [ │ │ │ │ │ - ["PtexIndices", "a01041.html", "a01041"] │ │ │ │ │ + ["StencilReal< REAL >", "a01053.html", "a01053"], │ │ │ │ │ + ["Stencil", "a01057.html", "a01057"], │ │ │ │ │ + ["StencilTableReal< REAL >", "a01061.html", "a01061"], │ │ │ │ │ + ["StencilTable", "a01065.html", "a01065"], │ │ │ │ │ + ["LimitStencilReal< REAL >", "a01069.html", "a01069"], │ │ │ │ │ + ["LimitStencil", "a01073.html", "a01073"], │ │ │ │ │ + ["LimitStencilTableReal< REAL >", "a01077.html", "a01077"], │ │ │ │ │ + ["LimitStencilTable", "a01081.html", "a01081"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/ptexIndices.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
ptexIndices.h
│ │ │ │ +
stencilTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,81 +118,893 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_FAR_PTEX_INDICES_H
│ │ │ │ -
25#define OPENSUBDIV3_FAR_PTEX_INDICES_H
│ │ │ │ -
26
│ │ │ │ -
27#include "../version.h"
│ │ │ │ -
28
│ │ │ │ -
29#include "../far/topologyRefiner.h"
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29
│ │ │ │
30#include "../far/types.h"
│ │ │ │
31
│ │ │ │ -
32#include <vector>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
32#include <cassert>
│ │ │ │ +
33#include <cstring>
│ │ │ │ +
34#include <vector>
│ │ │ │ +
35#include <iostream>
│ │ │ │
36
│ │ │ │ -
37namespace Far {
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │ +
39
│ │ │ │ +
40namespace Far {
│ │ │ │ +
41
│ │ │ │ +
42// Forward declarations for friends:
│ │ │ │ +
43class PatchTableBuilder;
│ │ │ │ +
44
│ │ │ │ +
45template <typename REAL> class StencilTableFactoryReal;
│ │ │ │ +
46template <typename REAL> class LimitStencilTableFactoryReal;
│ │ │ │
47
│ │ │ │ -
48public:
│ │ │ │ -
49
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ - │ │ │ │ +
52template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54public:
│ │ │ │
55
│ │ │ │ -
57
│ │ │ │ -
60
│ │ │ │ -
63 int GetNumFaces() const;
│ │ │ │ -
64
│ │ │ │ -
67 int GetFaceId(Index f) const;
│ │ │ │ -
68
│ │ │ │ - │ │ │ │ -
84 TopologyRefiner const &refiner,
│ │ │ │ -
85 int face, int quadrant,
│ │ │ │ -
86 int adjFaces[4], int adjEdges[4]) const;
│ │ │ │ -
87
│ │ │ │ -
89
│ │ │ │ -
90private:
│ │ │ │ + │ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
67 StencilReal(int * size, Index * indices, REAL * weights)
│ │ │ │ +
68 : _size(size), _indices(indices), _weights(weights) { }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
71 StencilReal(StencilReal const & other) {
│ │ │ │ +
72 _size = other._size;
│ │ │ │ +
73 _indices = other._indices;
│ │ │ │ +
74 _weights = other._weights;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
│ │ │ │ +
78 int GetSize() const {
│ │ │ │ +
79 return *_size;
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
83 int * GetSizePtr() const {
│ │ │ │ +
84 return _size;
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
86
│ │ │ │ +
│ │ │ │ +
88 Index const * GetVertexIndices() const {
│ │ │ │ +
89 return _indices;
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │
91
│ │ │ │ -
92 void initializePtexIndices(TopologyRefiner const &refiner);
│ │ │ │ -
93
│ │ │ │ -
94private:
│ │ │ │ -
95
│ │ │ │ -
96 std::vector<Index> _ptexIndices;
│ │ │ │ -
97};
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99
│ │ │ │ -
100} // end namespace Far
│ │ │ │ -
101
│ │ │ │ -
102} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
103using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
104} // end namespace OpenSubdiv
│ │ │ │ -
105
│ │ │ │ -
106#endif /* OPENSUBDIV3_FAR_PTEX_INDICES_H */
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
93 REAL const * GetWeights() const {
│ │ │ │ +
94 return _weights;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
98 void Next() {
│ │ │ │ +
99 int stride = *_size;
│ │ │ │ +
100 ++_size;
│ │ │ │ +
101 _indices += stride;
│ │ │ │ +
102 _weights += stride;
│ │ │ │ +
103 }
│ │ │ │ +
104
│ │ │ │ +
105protected:
│ │ │ │ +
106 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ +
107 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ +
108
│ │ │ │ +
109 int * _size;
│ │ │ │ + │ │ │ │ +
111 REAL * _weights;
│ │ │ │ +
112};
│ │ │ │ +
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
116class Stencil : public StencilReal<float> {
│ │ │ │ +
117protected:
│ │ │ │ + │ │ │ │ +
119
│ │ │ │ +
120public:
│ │ │ │ + │ │ │ │ +
122 Stencil(BaseStencil const & other) : BaseStencil(other) { }
│ │ │ │ +
│ │ │ │ +
123 Stencil(int * size, Index * indices, float * weights)
│ │ │ │ +
124 : BaseStencil(size, indices, weights) { }
│ │ │ │ +
│ │ │ │ +
125};
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
127
│ │ │ │ +
140template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
142protected:
│ │ │ │ +
143 StencilTableReal(int numControlVerts,
│ │ │ │ +
144 std::vector<int> const& offsets,
│ │ │ │ +
145 std::vector<int> const& sizes,
│ │ │ │ +
146 std::vector<int> const& sources,
│ │ │ │ +
147 std::vector<REAL> const& weights,
│ │ │ │ +
148 bool includeCoarseVerts,
│ │ │ │ +
149 size_t firstOffset);
│ │ │ │ +
150
│ │ │ │ +
151public:
│ │ │ │ +
152
│ │ │ │ +
153 virtual ~StencilTableReal() {};
│ │ │ │ +
154
│ │ │ │ +
│ │ │ │ +
156 int GetNumStencils() const {
│ │ │ │ +
157 return (int)_sizes.size();
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
162 return _numControlVertices;
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │ +
164
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
167
│ │ │ │ +
│ │ │ │ +
169 std::vector<int> const & GetSizes() const {
│ │ │ │ +
170 return _sizes;
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
│ │ │ │ +
174 std::vector<Index> const & GetOffsets() const {
│ │ │ │ +
175 return _offsets;
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ +
179 std::vector<Index> const & GetControlIndices() const {
│ │ │ │ +
180 return _indices;
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182
│ │ │ │ +
│ │ │ │ +
184 std::vector<REAL> const & GetWeights() const {
│ │ │ │ +
185 return _weights;
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
190
│ │ │ │ +
204 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
205 void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=-1) const {
│ │ │ │ +
206 this->update(srcValues, dstValues, _weights, start, end);
│ │ │ │ +
207 }
│ │ │ │ +
│ │ │ │ +
208
│ │ │ │ +
209 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
210 void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef,
│ │ │ │ +
211 U &dstValues, Index start=-1, Index end=-1) const {
│ │ │ │ +
212 this->update(srcBase, numBase, srcRef, dstValues, _weights, start, end);
│ │ │ │ +
213 }
│ │ │ │ +
│ │ │ │ +
214
│ │ │ │ +
215 // Pointer interface for backward compatibility
│ │ │ │ +
216 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
217 void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const {
│ │ │ │ +
218 this->update(src, dst, _weights, start, end);
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
221 void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ +
222 U *dst, Index start=-1, Index end=-1) const {
│ │ │ │ +
223 this->update(srcBase, numBase, srcRef, dst, _weights, start, end);
│ │ │ │ +
224 }
│ │ │ │ +
│ │ │ │ +
225
│ │ │ │ +
227 void Clear();
│ │ │ │ +
228
│ │ │ │ +
229protected:
│ │ │ │ +
230
│ │ │ │ +
231 // Update values by applying cached stencil weights to new control values
│ │ │ │ +
232 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
233 void update( T const &srcValues, U &dstValues,
│ │ │ │ +
234 std::vector<REAL> const & valueWeights, Index start, Index end) const;
│ │ │ │ +
235 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
236 void update( T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues,
│ │ │ │ +
237 std::vector<REAL> const & valueWeights, Index start, Index end) const;
│ │ │ │ +
238
│ │ │ │ +
239 // Populate the offsets table from the stencil sizes in _sizes (factory helper)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
241
│ │ │ │ +
242 // Resize the table arrays (factory helper)
│ │ │ │ +
│ │ │ │ +
243 void resize(int nstencils, int nelems);
│ │ │ │ +
244
│ │ │ │ +
245 // Reserves the table arrays (factory helper)
│ │ │ │ +
│ │ │ │ +
246 void reserve(int nstencils, int nelems);
│ │ │ │ +
247
│ │ │ │ +
248 // Reallocates the table arrays to remove excess capacity (factory helper)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
250
│ │ │ │ +
251 // Performs any final operations on internal tables (factory helper)
│ │ │ │ +
│ │ │ │ +
252 void finalize();
│ │ │ │ +
253
│ │ │ │ +
254protected:
│ │ │ │ + │ │ │ │ +
256 StencilTableReal(int numControlVerts)
│ │ │ │ +
257 : _numControlVertices(numControlVerts)
│ │ │ │ +
258 { }
│ │ │ │ +
259
│ │ │ │ +
260 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ + │ │ │ │ +
262
│ │ │ │ +
263 int _numControlVertices; // number of control vertices
│ │ │ │ +
264
│ │ │ │ +
265 std::vector<int> _sizes; // number of coefficients for each stencil
│ │ │ │ +
266 std::vector<Index> _offsets, // offset to the start of each stencil
│ │ │ │ +
267 _indices; // indices of contributing coarse vertices
│ │ │ │ +
268 std::vector<REAL> _weights; // stencil weight coefficients
│ │ │ │ +
269};
│ │ │ │ +
270
│ │ │ │ +
│ │ │ │ +
273class StencilTable : public StencilTableReal<float> {
│ │ │ │ +
274protected:
│ │ │ │ + │ │ │ │ +
276
│ │ │ │ +
277public:
│ │ │ │ +
│ │ │ │ +
278 Stencil GetStencil(Index index) const {
│ │ │ │ +
279 return Stencil(BaseTable::GetStencil(index));
│ │ │ │ +
280 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
281 Stencil operator[] (Index index) const {
│ │ │ │ +
282 return Stencil(BaseTable::GetStencil(index));
│ │ │ │ +
283 }
│ │ │ │ +
│ │ │ │ +
284
│ │ │ │ +
285protected:
│ │ │ │ + │ │ │ │ +
287 StencilTable(int numControlVerts) : BaseTable(numControlVerts) { }
│ │ │ │ +
│ │ │ │ +
288 StencilTable(int numControlVerts,
│ │ │ │ +
289 std::vector<int> const& offsets,
│ │ │ │ +
290 std::vector<int> const& sizes,
│ │ │ │ +
291 std::vector<int> const& sources,
│ │ │ │ +
292 std::vector<float> const& weights,
│ │ │ │ +
293 bool includeCoarseVerts,
│ │ │ │ +
294 size_t firstOffset)
│ │ │ │ +
295 : BaseTable(numControlVerts, offsets,
│ │ │ │ +
296 sizes, sources, weights, includeCoarseVerts, firstOffset) { }
│ │ │ │ +
│ │ │ │ +
297};
│ │ │ │ +
│ │ │ │ +
298
│ │ │ │ +
299
│ │ │ │ +
302template <typename REAL>
│ │ │ │ +
│ │ │ │ +
303class LimitStencilReal : public StencilReal<REAL> {
│ │ │ │ +
304public:
│ │ │ │ +
305
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
325 Index * indices,
│ │ │ │ +
326 REAL * weights,
│ │ │ │ +
327 REAL * duWeights=0,
│ │ │ │ +
328 REAL * dvWeights=0,
│ │ │ │ +
329 REAL * duuWeights=0,
│ │ │ │ +
330 REAL * duvWeights=0,
│ │ │ │ +
331 REAL * dvvWeights=0)
│ │ │ │ +
332 : StencilReal<REAL>(size, indices, weights),
│ │ │ │ +
333 _duWeights(duWeights),
│ │ │ │ +
334 _dvWeights(dvWeights),
│ │ │ │ +
335 _duuWeights(duuWeights),
│ │ │ │ +
336 _duvWeights(duvWeights),
│ │ │ │ +
337 _dvvWeights(dvvWeights) {
│ │ │ │ +
338 }
│ │ │ │ +
│ │ │ │ +
339
│ │ │ │ +
│ │ │ │ +
341 REAL const * GetDuWeights() const {
│ │ │ │ +
342 return _duWeights;
│ │ │ │ +
343 }
│ │ │ │ +
│ │ │ │ +
344
│ │ │ │ +
│ │ │ │ +
346 REAL const * GetDvWeights() const {
│ │ │ │ +
347 return _dvWeights;
│ │ │ │ +
348 }
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
│ │ │ │ +
351 REAL const * GetDuuWeights() const {
│ │ │ │ +
352 return _duuWeights;
│ │ │ │ +
353 }
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
│ │ │ │ +
356 REAL const * GetDuvWeights() const {
│ │ │ │ +
357 return _duvWeights;
│ │ │ │ +
358 }
│ │ │ │ +
│ │ │ │ +
359
│ │ │ │ +
│ │ │ │ +
361 REAL const * GetDvvWeights() const {
│ │ │ │ +
362 return _dvvWeights;
│ │ │ │ +
363 }
│ │ │ │ +
│ │ │ │ +
364
│ │ │ │ +
366 void Next() {
│ │ │ │ +
367 int stride = *this->_size;
│ │ │ │ +
368 ++this->_size;
│ │ │ │ +
369 this->_indices += stride;
│ │ │ │ +
370 this->_weights += stride;
│ │ │ │ +
371 if (_duWeights) _duWeights += stride;
│ │ │ │ +
372 if (_dvWeights) _dvWeights += stride;
│ │ │ │ +
373 if (_duuWeights) _duuWeights += stride;
│ │ │ │ +
374 if (_duvWeights) _duvWeights += stride;
│ │ │ │ +
375 if (_dvvWeights) _dvvWeights += stride;
│ │ │ │ +
376 }
│ │ │ │ +
377
│ │ │ │ +
378private:
│ │ │ │ +
379
│ │ │ │ +
380 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ +
381 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ +
382
│ │ │ │ +
383 REAL * _duWeights, // pointer to stencil u derivative limit weights
│ │ │ │ +
384 * _dvWeights, // pointer to stencil v derivative limit weights
│ │ │ │ +
385 * _duuWeights, // pointer to stencil uu derivative limit weights
│ │ │ │ +
386 * _duvWeights, // pointer to stencil uv derivative limit weights
│ │ │ │ +
387 * _dvvWeights; // pointer to stencil vv derivative limit weights
│ │ │ │ +
388};
│ │ │ │ +
│ │ │ │ +
389
│ │ │ │ +
│ │ │ │ +
392class LimitStencil : public LimitStencilReal<float> {
│ │ │ │ +
393protected:
│ │ │ │ + │ │ │ │ +
395
│ │ │ │ +
396public:
│ │ │ │ +
397 LimitStencil(BaseStencil const & other) : BaseStencil(other) { }
│ │ │ │ +
│ │ │ │ +
398 LimitStencil(int* size, Index * indices, float * weights,
│ │ │ │ +
399 float * duWeights=0, float * dvWeights=0,
│ │ │ │ +
400 float * duuWeights=0, float * duvWeights=0, float * dvvWeights=0)
│ │ │ │ +
401 : BaseStencil(size, indices, weights,
│ │ │ │ +
402 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights) { }
│ │ │ │ +
│ │ │ │ +
403};
│ │ │ │ +
│ │ │ │ +
404
│ │ │ │ +
405
│ │ │ │ +
408template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
410protected:
│ │ │ │ + │ │ │ │ +
412 int numControlVerts,
│ │ │ │ +
413 std::vector<int> const& offsets,
│ │ │ │ +
414 std::vector<int> const& sizes,
│ │ │ │ +
415 std::vector<int> const& sources,
│ │ │ │ +
416 std::vector<REAL> const& weights,
│ │ │ │ +
417 std::vector<REAL> const& duWeights,
│ │ │ │ +
418 std::vector<REAL> const& dvWeights,
│ │ │ │ +
419 std::vector<REAL> const& duuWeights,
│ │ │ │ +
420 std::vector<REAL> const& duvWeights,
│ │ │ │ +
421 std::vector<REAL> const& dvvWeights,
│ │ │ │ +
422 bool includeCoarseVerts,
│ │ │ │ +
423 size_t firstOffset);
│ │ │ │ +
424
│ │ │ │ +
425public:
│ │ │ │ +
426
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
429
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
432
│ │ │ │ +
│ │ │ │ +
434 std::vector<REAL> const & GetDuWeights() const {
│ │ │ │ +
435 return _duWeights;
│ │ │ │ +
436 }
│ │ │ │ +
│ │ │ │ +
437
│ │ │ │ +
│ │ │ │ +
439 std::vector<REAL> const & GetDvWeights() const {
│ │ │ │ +
440 return _dvWeights;
│ │ │ │ +
441 }
│ │ │ │ +
│ │ │ │ +
442
│ │ │ │ +
│ │ │ │ +
444 std::vector<REAL> const & GetDuuWeights() const {
│ │ │ │ +
445 return _duuWeights;
│ │ │ │ +
446 }
│ │ │ │ +
│ │ │ │ +
447
│ │ │ │ +
│ │ │ │ +
449 std::vector<REAL> const & GetDuvWeights() const {
│ │ │ │ +
450 return _duvWeights;
│ │ │ │ +
451 }
│ │ │ │ +
│ │ │ │ +
452
│ │ │ │ +
│ │ │ │ +
454 std::vector<REAL> const & GetDvvWeights() const {
│ │ │ │ +
455 return _dvvWeights;
│ │ │ │ +
456 }
│ │ │ │ +
│ │ │ │ +
457
│ │ │ │ +
475 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
476 void UpdateDerivs(T const & srcValues, U & uderivs, U & vderivs,
│ │ │ │ +
477 int start=-1, int end=-1) const {
│ │ │ │ +
478
│ │ │ │ +
479 this->update(srcValues, uderivs, _duWeights, start, end);
│ │ │ │ +
480 this->update(srcValues, vderivs, _dvWeights, start, end);
│ │ │ │ +
481 }
│ │ │ │ +
│ │ │ │ +
482
│ │ │ │ +
483 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
484 void UpdateDerivs(T1 const & srcBase, int numBase, T2 const & srcRef,
│ │ │ │ +
485 U & uderivs, U & vderivs, int start=-1, int end=-1) const {
│ │ │ │ +
486
│ │ │ │ +
487 this->update(srcBase, numBase, srcRef, uderivs, _duWeights, start, end);
│ │ │ │ +
488 this->update(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end);
│ │ │ │ +
489 }
│ │ │ │ +
│ │ │ │ +
490
│ │ │ │ +
491 // Pointer interface for backward compatibility
│ │ │ │ +
492 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
493 void UpdateDerivs(T const *src, U *uderivs, U *vderivs,
│ │ │ │ +
494 int start=-1, int end=-1) const {
│ │ │ │ +
495
│ │ │ │ +
496 this->update(src, uderivs, _duWeights, start, end);
│ │ │ │ +
497 this->update(src, vderivs, _dvWeights, start, end);
│ │ │ │ +
498 }
│ │ │ │ +
│ │ │ │ +
499 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
500 void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ +
501 U *uderivs, U *vderivs, int start=-1, int end=-1) const {
│ │ │ │ +
502
│ │ │ │ +
503 this->update(srcBase, numBase, srcRef, uderivs, _duWeights, start, end);
│ │ │ │ +
504 this->update(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end);
│ │ │ │ +
505 }
│ │ │ │ +
│ │ │ │ +
506
│ │ │ │ +
527 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
528 void Update2ndDerivs(T const & srcValues,
│ │ │ │ +
529 U & uuderivs, U & uvderivs, U & vvderivs,
│ │ │ │ +
530 int start=-1, int end=-1) const {
│ │ │ │ +
531
│ │ │ │ +
532 this->update(srcValues, uuderivs, _duuWeights, start, end);
│ │ │ │ +
533 this->update(srcValues, uvderivs, _duvWeights, start, end);
│ │ │ │ +
534 this->update(srcValues, vvderivs, _dvvWeights, start, end);
│ │ │ │ +
535 }
│ │ │ │ +
│ │ │ │ +
536
│ │ │ │ +
537 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
538 void Update2ndDerivs(T1 const & srcBase, int numBase, T2 const & srcRef,
│ │ │ │ +
539 U & uuderivs, U & uvderivs, U & vvderivs, int start=-1, int end=-1) const {
│ │ │ │ +
540
│ │ │ │ +
541 this->update(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end);
│ │ │ │ +
542 this->update(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end);
│ │ │ │ +
543 this->update(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end);
│ │ │ │ +
544 }
│ │ │ │ +
│ │ │ │ +
545
│ │ │ │ +
546 // Pointer interface for backward compatibility
│ │ │ │ +
547 template <class T, class U>
│ │ │ │ +
│ │ │ │ +
548 void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs,
│ │ │ │ +
549 int start=-1, int end=-1) const {
│ │ │ │ +
550
│ │ │ │ +
551 this->update(src, uuderivs, _duuWeights, start, end);
│ │ │ │ +
552 this->update(src, uvderivs, _duvWeights, start, end);
│ │ │ │ +
553 this->update(src, vvderivs, _dvvWeights, start, end);
│ │ │ │ +
554 }
│ │ │ │ +
│ │ │ │ +
555 template <class T1, class T2, class U>
│ │ │ │ +
│ │ │ │ +
556 void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ +
557 U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const {
│ │ │ │ +
558
│ │ │ │ +
559 this->update(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end);
│ │ │ │ +
560 this->update(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end);
│ │ │ │ +
561 this->update(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end);
│ │ │ │ +
562 }
│ │ │ │ +
│ │ │ │ +
563
│ │ │ │ +
565 void Clear();
│ │ │ │ +
566
│ │ │ │ +
567private:
│ │ │ │ +
568 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ +
569
│ │ │ │ +
570 // Resize the table arrays (factory helper)
│ │ │ │ +
571 void resize(int nstencils, int nelems);
│ │ │ │ +
572
│ │ │ │ +
573private:
│ │ │ │ +
574 std::vector<REAL> _duWeights, // u derivative limit stencil weights
│ │ │ │ +
575 _dvWeights, // v derivative limit stencil weights
│ │ │ │ +
576 _duuWeights, // uu derivative limit stencil weights
│ │ │ │ +
577 _duvWeights, // uv derivative limit stencil weights
│ │ │ │ +
578 _dvvWeights; // vv derivative limit stencil weights
│ │ │ │ +
579};
│ │ │ │ +
580
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
584protected:
│ │ │ │ + │ │ │ │ +
586
│ │ │ │ +
587public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
590 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
593 }
│ │ │ │ +
│ │ │ │ +
594
│ │ │ │ +
595protected:
│ │ │ │ +
│ │ │ │ +
596 LimitStencilTable(int numControlVerts,
│ │ │ │ +
597 std::vector<int> const& offsets,
│ │ │ │ +
598 std::vector<int> const& sizes,
│ │ │ │ +
599 std::vector<int> const& sources,
│ │ │ │ +
600 std::vector<float> const& weights,
│ │ │ │ +
601 std::vector<float> const& duWeights,
│ │ │ │ +
602 std::vector<float> const& dvWeights,
│ │ │ │ +
603 std::vector<float> const& duuWeights,
│ │ │ │ +
604 std::vector<float> const& duvWeights,
│ │ │ │ +
605 std::vector<float> const& dvvWeights,
│ │ │ │ +
606 bool includeCoarseVerts,
│ │ │ │ +
607 size_t firstOffset)
│ │ │ │ +
608 : BaseTable(numControlVerts,
│ │ │ │ +
609 offsets, sizes, sources, weights,
│ │ │ │ +
610 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights,
│ │ │ │ +
611 includeCoarseVerts, firstOffset) { }
│ │ │ │ +
│ │ │ │ +
612};
│ │ │ │ +
│ │ │ │ +
613
│ │ │ │ +
614
│ │ │ │ +
615// Update values by applying cached stencil weights to new control values
│ │ │ │ +
616template <typename REAL>
│ │ │ │ +
617template <class T1, class T2, class U> void
│ │ │ │ +
│ │ │ │ +
618StencilTableReal<REAL>::update(T1 const &srcBase, int numBase,
│ │ │ │ +
619 T2 const &srcRef, U &dstValues,
│ │ │ │ +
620 std::vector<REAL> const &valueWeights, Index start, Index end) const {
│ │ │ │ +
621
│ │ │ │ +
622 int const * sizes = &_sizes.at(0);
│ │ │ │ +
623 Index const * indices = &_indices.at(0);
│ │ │ │ +
624 REAL const * weights = &valueWeights.at(0);
│ │ │ │ +
625
│ │ │ │ +
626 if (start > 0) {
│ │ │ │ +
627 assert(start < (Index)_offsets.size());
│ │ │ │ +
628 sizes += start;
│ │ │ │ +
629 indices += _offsets[start];
│ │ │ │ +
630 weights += _offsets[start];
│ │ │ │ +
631 } else {
│ │ │ │ +
632 start = 0;
│ │ │ │ +
633 }
│ │ │ │ +
634
│ │ │ │ +
635 int nstencils = ((end < start) ? GetNumStencils() : end) - start;
│ │ │ │ +
636
│ │ │ │ +
637 for (int i = 0; i < nstencils; ++i, ++sizes) {
│ │ │ │ +
638 dstValues[start + i].Clear();
│ │ │ │ +
639 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) {
│ │ │ │ +
640 if (*indices < numBase) {
│ │ │ │ +
641 dstValues[start + i].AddWithWeight(srcBase[*indices], *weights);
│ │ │ │ +
642 } else {
│ │ │ │ +
643 dstValues[start + i].AddWithWeight(srcRef[*indices - numBase], *weights);
│ │ │ │ +
644 }
│ │ │ │ +
645 }
│ │ │ │ +
646 }
│ │ │ │ +
647}
│ │ │ │ +
│ │ │ │ +
648template <typename REAL>
│ │ │ │ +
649template <class T, class U> void
│ │ │ │ +
│ │ │ │ +
650StencilTableReal<REAL>::update(T const &srcValues, U &dstValues,
│ │ │ │ +
651 std::vector<REAL> const &valueWeights, Index start, Index end) const {
│ │ │ │ +
652
│ │ │ │ +
653 int const * sizes = &_sizes.at(0);
│ │ │ │ +
654 Index const * indices = &_indices.at(0);
│ │ │ │ +
655 REAL const * weights = &valueWeights.at(0);
│ │ │ │ +
656
│ │ │ │ +
657 if (start > 0) {
│ │ │ │ +
658 assert(start < (Index)_offsets.size());
│ │ │ │ +
659 sizes += start;
│ │ │ │ +
660 indices += _offsets[start];
│ │ │ │ +
661 weights += _offsets[start];
│ │ │ │ +
662 } else {
│ │ │ │ +
663 start = 0;
│ │ │ │ +
664 }
│ │ │ │ +
665
│ │ │ │ +
666 int nstencils = ((end < start) ? GetNumStencils() : end) - start;
│ │ │ │ +
667
│ │ │ │ +
668 for (int i = 0; i < nstencils; ++i, ++sizes) {
│ │ │ │ +
669 dstValues[start + i].Clear();
│ │ │ │ +
670 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) {
│ │ │ │ +
671 dstValues[start + i].AddWithWeight(srcValues[*indices], *weights);
│ │ │ │ +
672 }
│ │ │ │ +
673 }
│ │ │ │ +
674}
│ │ │ │ +
│ │ │ │ +
675
│ │ │ │ +
676template <typename REAL>
│ │ │ │ +
677inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
679 Index offset=0;
│ │ │ │ +
680 int noffsets = (int)_sizes.size();
│ │ │ │ +
681 _offsets.resize(noffsets);
│ │ │ │ +
682 for (int i=0; i<(int)_sizes.size(); ++i ) {
│ │ │ │ +
683 _offsets[i]=offset;
│ │ │ │ +
684 offset+=_sizes[i];
│ │ │ │ +
685 }
│ │ │ │ +
686}
│ │ │ │ +
│ │ │ │ +
687
│ │ │ │ +
688template <typename REAL>
│ │ │ │ +
689inline void
│ │ │ │ +
│ │ │ │ +
690StencilTableReal<REAL>::resize(int nstencils, int nelems) {
│ │ │ │ +
691 _sizes.resize(nstencils);
│ │ │ │ +
692 _indices.resize(nelems);
│ │ │ │ +
693 _weights.resize(nelems);
│ │ │ │ +
694}
│ │ │ │ +
│ │ │ │ +
695
│ │ │ │ +
696template <typename REAL>
│ │ │ │ +
697inline void
│ │ │ │ +
│ │ │ │ +
698StencilTableReal<REAL>::reserve(int nstencils, int nelems) {
│ │ │ │ +
699 _sizes.reserve(nstencils);
│ │ │ │ +
700 _indices.reserve(nelems);
│ │ │ │ +
701 _weights.reserve(nelems);
│ │ │ │ +
702}
│ │ │ │ +
│ │ │ │ +
703
│ │ │ │ +
704template <typename REAL>
│ │ │ │ +
705inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
707 std::vector<int>(_sizes).swap(_sizes);
│ │ │ │ +
708 std::vector<Index>(_indices).swap(_indices);
│ │ │ │ +
709 std::vector<REAL>(_weights).swap(_weights);
│ │ │ │ +
710}
│ │ │ │ +
│ │ │ │ +
711
│ │ │ │ +
712template <typename REAL>
│ │ │ │ +
713inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
715 shrinkToFit();
│ │ │ │ +
716 generateOffsets();
│ │ │ │ +
717}
│ │ │ │ +
│ │ │ │ +
718
│ │ │ │ +
719// Returns a Stencil at index i in the table
│ │ │ │ +
720template <typename REAL>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
723 assert((! _offsets.empty()) && i<(int)_offsets.size());
│ │ │ │ +
724
│ │ │ │ +
725 Index ofs = _offsets[i];
│ │ │ │ +
726
│ │ │ │ +
727 return StencilReal<REAL>(const_cast<int*>(&_sizes[i]),
│ │ │ │ +
728 const_cast<Index*>(&_indices[ofs]),
│ │ │ │ +
729 const_cast<REAL*>(&_weights[ofs]));
│ │ │ │ +
730}
│ │ │ │ +
│ │ │ │ +
731
│ │ │ │ +
732template <typename REAL>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
735 return GetStencil(index);
│ │ │ │ +
736}
│ │ │ │ +
│ │ │ │ +
737
│ │ │ │ +
738template <typename REAL>
│ │ │ │ +
739inline void
│ │ │ │ +
740LimitStencilTableReal<REAL>::resize(int nstencils, int nelems) {
│ │ │ │ +
741 StencilTableReal<REAL>::resize(nstencils, nelems);
│ │ │ │ +
742 _duWeights.resize(nelems);
│ │ │ │ +
743 _dvWeights.resize(nelems);
│ │ │ │ +
744}
│ │ │ │ +
745
│ │ │ │ +
746// Returns a LimitStencil at index i in the table
│ │ │ │ +
747template <typename REAL>
│ │ │ │ +
748inline LimitStencilReal<REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
750 assert((! this->GetOffsets().empty()) && i<(int)this->GetOffsets().size());
│ │ │ │ +
751
│ │ │ │ +
752 Index ofs = this->GetOffsets()[i];
│ │ │ │ +
753
│ │ │ │ +
754 if (!_duWeights.empty() && !_dvWeights.empty() &&
│ │ │ │ +
755 !_duuWeights.empty() && !_duvWeights.empty() && !_dvvWeights.empty()) {
│ │ │ │ + │ │ │ │ +
757 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ +
758 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ +
759 const_cast<REAL *>(&this->GetWeights()[ofs]),
│ │ │ │ +
760 const_cast<REAL *>(&GetDuWeights()[ofs]),
│ │ │ │ +
761 const_cast<REAL *>(&GetDvWeights()[ofs]),
│ │ │ │ +
762 const_cast<REAL *>(&GetDuuWeights()[ofs]),
│ │ │ │ +
763 const_cast<REAL *>(&GetDuvWeights()[ofs]),
│ │ │ │ +
764 const_cast<REAL *>(&GetDvvWeights()[ofs]) );
│ │ │ │ +
765 } else if (!_duWeights.empty() && !_dvWeights.empty()) {
│ │ │ │ + │ │ │ │ +
767 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ +
768 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ +
769 const_cast<REAL *>(&this->GetWeights()[ofs]),
│ │ │ │ +
770 const_cast<REAL *>(&GetDuWeights()[ofs]),
│ │ │ │ +
771 const_cast<REAL *>(&GetDvWeights()[ofs]) );
│ │ │ │ +
772 } else {
│ │ │ │ + │ │ │ │ +
774 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ +
775 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ +
776 const_cast<REAL *>(&this->GetWeights()[ofs]) );
│ │ │ │ +
777 }
│ │ │ │ +
778}
│ │ │ │ +
│ │ │ │ +
779
│ │ │ │ +
780template <typename REAL>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
783 return GetLimitStencil(index);
│ │ │ │ +
784}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
785
│ │ │ │ +
786} // end namespace Far
│ │ │ │ +
787
│ │ │ │ +
788} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
789using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
790
│ │ │ │ +
791} // end namespace OpenSubdiv
│ │ │ │ +
792
│ │ │ │ +
793#endif // OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ │ │ │ │ -
Object used to compute and query ptex face indices.
Definition ptexIndices.h:46
│ │ │ │ -
int GetFaceId(Index f) const
Returns the ptex face index given a coarse face 'f' or -1.
│ │ │ │ -
PtexIndices(TopologyRefiner const &refiner)
Constructor.
│ │ │ │ -
void GetAdjacency(TopologyRefiner const &refiner, int face, int quadrant, int adjFaces[4], int adjEdges[4]) const
Returns ptex face adjacency information for a given coarse face.
│ │ │ │ -
int GetNumFaces() const
Returns the number of ptex faces in the mesh.
│ │ │ │ - │ │ │ │ -
Stores topology data for a specified set of refinement options.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
StencilReal(int *size, Index *indices, REAL *weights)
Constructor.
│ │ │ │ +
void Next()
Advance to the next stencil in the table.
│ │ │ │ +
StencilReal(StencilReal const &other)
Copy constructor.
│ │ │ │ + │ │ │ │ +
Index const * GetVertexIndices() const
Returns the control vertices' indices.
│ │ │ │ +
int GetSize() const
Returns the size of the stencil.
│ │ │ │ + │ │ │ │ +
int * GetSizePtr() const
Returns the size of the stencil as a pointer.
│ │ │ │ +
REAL const * GetWeights() const
Returns the interpolation weights.
│ │ │ │ +
Vertex stencil class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ +
Stencil(int *size, Index *indices, float *weights)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int GetNumControlVertices() const
Returns the number of control vertices indexed in the table.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void update(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, std::vector< REAL > const &valueWeights, Index start, Index end) const
│ │ │ │ +
void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, Index start=-1, Index end=-1) const
│ │ │ │ +
std::vector< Index > const & GetControlIndices() const
Returns the indices of the control vertices.
│ │ │ │ + │ │ │ │ +
StencilReal< REAL > operator[](Index index) const
Returns the stencil at index i in the table.
│ │ │ │ + │ │ │ │ +
void update(T const &srcValues, U &dstValues, std::vector< REAL > const &valueWeights, Index start, Index end) const
│ │ │ │ +
std::vector< int > const & GetSizes() const
Returns the number of control vertices of each stencil in the table.
│ │ │ │ +
int GetNumStencils() const
Returns the number of stencils in the table.
│ │ │ │ + │ │ │ │ +
std::vector< Index > const & GetOffsets() const
Returns the offset to a given stencil (factory may leave empty)
│ │ │ │ +
StencilReal< REAL > GetStencil(Index i) const
Returns a Stencil at index i in the table.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void Clear()
Clears the stencils from the table.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
std::vector< REAL > const & GetWeights() const
Returns the stencil interpolation weights.
│ │ │ │ +
void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef, U *dst, Index start=-1, Index end=-1) const
│ │ │ │ +
StencilTableReal(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< REAL > const &weights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const
│ │ │ │ +
void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=-1) const
Updates point values based on the control values.
│ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
StencilTable(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< float > const &weights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
REAL const * GetDuvWeights() const
Returns the uv derivative weights.
│ │ │ │ +
REAL const * GetDvWeights() const
Returns the v derivative weights.
│ │ │ │ +
void Next()
Advance to the next stencil in the table.
│ │ │ │ +
REAL const * GetDvvWeights() const
Returns the vv derivative weights.
│ │ │ │ +
LimitStencilReal(int *size, Index *indices, REAL *weights, REAL *duWeights=0, REAL *dvWeights=0, REAL *duuWeights=0, REAL *duvWeights=0, REAL *dvvWeights=0)
Constructor.
│ │ │ │ +
REAL const * GetDuWeights() const
Returns the u derivative weights.
│ │ │ │ +
REAL const * GetDuuWeights() const
Returns the uu derivative weights.
│ │ │ │ +
Limit point stencil class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
LimitStencil(int *size, Index *indices, float *weights, float *duWeights=0, float *dvWeights=0, float *duuWeights=0, float *duvWeights=0, float *dvvWeights=0)
│ │ │ │ + │ │ │ │ +
std::vector< REAL > const & GetDuuWeights() const
Returns the 'uu' derivative stencil interpolation weights.
│ │ │ │ +
LimitStencilReal< REAL > operator[](Index index) const
Returns the limit stencil at index i in the table.
│ │ │ │ +
std::vector< REAL > const & GetDvvWeights() const
Returns the 'vv' derivative stencil interpolation weights.
│ │ │ │ +
void UpdateDerivs(T const *src, U *uderivs, U *vderivs, int start=-1, int end=-1) const
│ │ │ │ +
void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const
│ │ │ │ +
std::vector< REAL > const & GetDvWeights() const
Returns the 'v' derivative stencil interpolation weights.
│ │ │ │ +
void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const
│ │ │ │ +
void UpdateDerivs(T const &srcValues, U &uderivs, U &vderivs, int start=-1, int end=-1) const
Updates derivative values based on the control values.
│ │ │ │ +
LimitStencilReal< REAL > GetLimitStencil(Index i) const
Returns a LimitStencil at index i in the table.
│ │ │ │ +
LimitStencilTableReal(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< REAL > const &weights, std::vector< REAL > const &duWeights, std::vector< REAL > const &dvWeights, std::vector< REAL > const &duuWeights, std::vector< REAL > const &duvWeights, std::vector< REAL > const &dvvWeights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ +
void Update2ndDerivs(T const &srcValues, U &uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const
Updates 2nd derivative values based on the control values.
│ │ │ │ +
std::vector< REAL > const & GetDuWeights() const
Returns the 'u' derivative stencil interpolation weights.
│ │ │ │ +
void Clear()
Clears the stencils from the table.
│ │ │ │ +
void Update2ndDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const
│ │ │ │ +
std::vector< REAL > const & GetDuvWeights() const
Returns the 'uv' derivative stencil interpolation weights.
│ │ │ │ +
void UpdateDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uderivs, U &vderivs, int start=-1, int end=-1) const
│ │ │ │ +
void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uderivs, U *vderivs, int start=-1, int end=-1) const
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
LimitStencilTable(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< float > const &weights, std::vector< float > const &duWeights, std::vector< float > const &dvWeights, std::vector< float > const &duuWeights, std::vector< float > const &duvWeights, std::vector< float > const &dvvWeights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -ptexIndices.h │ │ │ │ │ +stencilTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,90 +23,991 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_FAR_PTEX_INDICES_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_PTEX_INDICES_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../far/topologyRefiner.h" │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29 │ │ │ │ │ 30#include "../far/types.h" │ │ │ │ │ 31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ +34#include │ │ │ │ │ +35#include │ │ │ │ │ 36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 │ │ │ │ │ -_4_6class _P_t_e_x_I_n_d_i_c_e_s { │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +39 │ │ │ │ │ +40namespace Far { │ │ │ │ │ +41 │ │ │ │ │ +42// Forward declarations for friends: │ │ │ │ │ +43class PatchTableBuilder; │ │ │ │ │ +44 │ │ │ │ │ +45template class StencilTableFactoryReal; │ │ │ │ │ +46template class LimitStencilTableFactoryReal; │ │ │ │ │ 47 │ │ │ │ │ -48public: │ │ │ │ │ -49 │ │ │ │ │ -_5_1 _P_t_e_x_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner); │ │ │ │ │ -52 │ │ │ │ │ -_5_4 _~_P_t_e_x_I_n_d_i_c_e_s(); │ │ │ │ │ +52template │ │ │ │ │ +_5_3class _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ +54public: │ │ │ │ │ 55 │ │ │ │ │ -57 │ │ │ │ │ -60 │ │ │ │ │ -_6_3 int _G_e_t_N_u_m_F_a_c_e_s() const; │ │ │ │ │ -64 │ │ │ │ │ -_6_7 int _G_e_t_F_a_c_e_I_d(_I_n_d_e_x f) const; │ │ │ │ │ -68 │ │ │ │ │ -_8_3 void _G_e_t_A_d_j_a_c_e_n_c_y( │ │ │ │ │ -84 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ -85 int face, int quadrant, │ │ │ │ │ -86 int adjFaces[4], int adjEdges[4]) const; │ │ │ │ │ -87 │ │ │ │ │ -89 │ │ │ │ │ -90private: │ │ │ │ │ +_5_7 _S_t_e_n_c_i_l_R_e_a_l() {} │ │ │ │ │ +58 │ │ │ │ │ +_6_7 _S_t_e_n_c_i_l_R_e_a_l(int * size, _I_n_d_e_x * indices, REAL * weights) │ │ │ │ │ +68 : ___s_i_z_e(size), ___i_n_d_i_c_e_s(indices), ___w_e_i_g_h_t_s(weights) { } │ │ │ │ │ +69 │ │ │ │ │ +_7_1 _S_t_e_n_c_i_l_R_e_a_l(_S_t_e_n_c_i_l_R_e_a_l const & other) { │ │ │ │ │ +72 ___s_i_z_e = other.___s_i_z_e; │ │ │ │ │ +73 ___i_n_d_i_c_e_s = other.___i_n_d_i_c_e_s; │ │ │ │ │ +74 ___w_e_i_g_h_t_s = other.___w_e_i_g_h_t_s; │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +_7_8 int _G_e_t_S_i_z_e() const { │ │ │ │ │ +79 return *___s_i_z_e; │ │ │ │ │ +80 } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 int * _G_e_t_S_i_z_e_P_t_r() const { │ │ │ │ │ +84 return ___s_i_z_e; │ │ │ │ │ +85 } │ │ │ │ │ +86 │ │ │ │ │ +_8_8 _I_n_d_e_x const * _G_e_t_V_e_r_t_e_x_I_n_d_i_c_e_s() const { │ │ │ │ │ +89 return ___i_n_d_i_c_e_s; │ │ │ │ │ +90 } │ │ │ │ │ 91 │ │ │ │ │ -92 void initializePtexIndices(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner); │ │ │ │ │ -93 │ │ │ │ │ -94private: │ │ │ │ │ -95 │ │ │ │ │ -96 std::vector _ptexIndices; │ │ │ │ │ -97}; │ │ │ │ │ -98 │ │ │ │ │ -99 │ │ │ │ │ -100} // end namespace Far │ │ │ │ │ -101 │ │ │ │ │ -102} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -103using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -104} // end namespace OpenSubdiv │ │ │ │ │ -105 │ │ │ │ │ -106#endif /* OPENSUBDIV3_FAR_PTEX_INDICES_H */ │ │ │ │ │ +_9_3 REAL const * _G_e_t_W_e_i_g_h_t_s() const { │ │ │ │ │ +94 return ___w_e_i_g_h_t_s; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 void _N_e_x_t() { │ │ │ │ │ +99 int stride = *___s_i_z_e; │ │ │ │ │ +100 ++___s_i_z_e; │ │ │ │ │ +101 ___i_n_d_i_c_e_s += stride; │ │ │ │ │ +102 ___w_e_i_g_h_t_s += stride; │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +105protected: │ │ │ │ │ +106 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +107 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +108 │ │ │ │ │ +_1_0_9 int * ___s_i_z_e; │ │ │ │ │ +_1_1_0 _I_n_d_e_x * ___i_n_d_i_c_e_s; │ │ │ │ │ +_1_1_1 REAL * ___w_e_i_g_h_t_s; │ │ │ │ │ +112}; │ │ │ │ │ +113 │ │ │ │ │ +_1_1_6class _S_t_e_n_c_i_l : public _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ +117protected: │ │ │ │ │ +_1_1_8 typedef _S_t_e_n_c_i_l_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_S_t_e_n_c_i_l; │ │ │ │ │ +119 │ │ │ │ │ +120public: │ │ │ │ │ +_1_2_1 _S_t_e_n_c_i_l() : _B_a_s_e_S_t_e_n_c_i_l() { } │ │ │ │ │ +_1_2_2 _S_t_e_n_c_i_l(_B_a_s_e_S_t_e_n_c_i_l const & other) : _B_a_s_e_S_t_e_n_c_i_l(other) { } │ │ │ │ │ +_1_2_3 _S_t_e_n_c_i_l(int * size, _I_n_d_e_x * indices, float * weights) │ │ │ │ │ +124 : _B_a_s_e_S_t_e_n_c_i_l(size, indices, weights) { } │ │ │ │ │ +125}; │ │ │ │ │ +126 │ │ │ │ │ +127 │ │ │ │ │ +140template │ │ │ │ │ +_1_4_1class _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ +142protected: │ │ │ │ │ +_1_4_3 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l(int numControlVerts, │ │ │ │ │ +144 std::vector const& offsets, │ │ │ │ │ +145 std::vector const& sizes, │ │ │ │ │ +146 std::vector const& sources, │ │ │ │ │ +147 std::vector const& weights, │ │ │ │ │ +148 bool includeCoarseVerts, │ │ │ │ │ +149 size_t firstOffset); │ │ │ │ │ +150 │ │ │ │ │ +151public: │ │ │ │ │ +152 │ │ │ │ │ +_1_5_3 virtual _~_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l() {}; │ │ │ │ │ +154 │ │ │ │ │ +_1_5_6 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { │ │ │ │ │ +157 return (int)___s_i_z_e_s.size(); │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ +162 return ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s; │ │ │ │ │ +163 } │ │ │ │ │ +164 │ │ │ │ │ +_1_6_6 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const; │ │ │ │ │ +167 │ │ │ │ │ +_1_6_9 std::vector const & _G_e_t_S_i_z_e_s() const { │ │ │ │ │ +170 return ___s_i_z_e_s; │ │ │ │ │ +171 } │ │ │ │ │ +172 │ │ │ │ │ +_1_7_4 std::vector const & _G_e_t_O_f_f_s_e_t_s() const { │ │ │ │ │ +175 return ___o_f_f_s_e_t_s; │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 std::vector const & _G_e_t_C_o_n_t_r_o_l_I_n_d_i_c_e_s() const { │ │ │ │ │ +180 return ___i_n_d_i_c_e_s; │ │ │ │ │ +181 } │ │ │ │ │ +182 │ │ │ │ │ +_1_8_4 std::vector const & _G_e_t_W_e_i_g_h_t_s() const { │ │ │ │ │ +185 return ___w_e_i_g_h_t_s; │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +_1_8_9 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const; │ │ │ │ │ +190 │ │ │ │ │ +204 template │ │ │ │ │ +_2_0_5 void _U_p_d_a_t_e_V_a_l_u_e_s(T const &srcValues, U &dstValues, _I_n_d_e_x start=-1, _I_n_d_e_x │ │ │ │ │ +end=-1) const { │ │ │ │ │ +206 this->_u_p_d_a_t_e(srcValues, dstValues, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ +207 } │ │ │ │ │ +208 │ │ │ │ │ +209 template │ │ │ │ │ +_2_1_0 void _U_p_d_a_t_e_V_a_l_u_e_s(T1 const &srcBase, int numBase, T2 const &srcRef, │ │ │ │ │ +211 U &dstValues, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const { │ │ │ │ │ +212 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, dstValues, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ +213 } │ │ │ │ │ +214 │ │ │ │ │ +215 // Pointer interface for backward compatibility │ │ │ │ │ +216 template │ │ │ │ │ +_2_1_7 void _U_p_d_a_t_e_V_a_l_u_e_s(T const *src, U *dst, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const │ │ │ │ │ +{ │ │ │ │ │ +218 this->_u_p_d_a_t_e(src, dst, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ +219 } │ │ │ │ │ +220 template │ │ │ │ │ +_2_2_1 void _U_p_d_a_t_e_V_a_l_u_e_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ +222 U *dst, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const { │ │ │ │ │ +223 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, dst, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ +224 } │ │ │ │ │ +225 │ │ │ │ │ +_2_2_7 void _C_l_e_a_r(); │ │ │ │ │ +228 │ │ │ │ │ +229protected: │ │ │ │ │ +230 │ │ │ │ │ +231 // Update values by applying cached stencil weights to new control values │ │ │ │ │ +232 template │ │ │ │ │ +_2_3_3 void _u_p_d_a_t_e( T const &srcValues, U &dstValues, │ │ │ │ │ +234 std::vector const & valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const; │ │ │ │ │ +235 template │ │ │ │ │ +_2_3_6 void _u_p_d_a_t_e( T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ +&dstValues, │ │ │ │ │ +237 std::vector const & valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const; │ │ │ │ │ +238 │ │ │ │ │ +239 // Populate the offsets table from the stencil sizes in _sizes (factory │ │ │ │ │ +helper) │ │ │ │ │ +_2_4_0 void _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s(); │ │ │ │ │ +241 │ │ │ │ │ +242 // Resize the table arrays (factory helper) │ │ │ │ │ +_2_4_3 void _r_e_s_i_z_e(int nstencils, int nelems); │ │ │ │ │ +244 │ │ │ │ │ +245 // Reserves the table arrays (factory helper) │ │ │ │ │ +_2_4_6 void _r_e_s_e_r_v_e(int nstencils, int nelems); │ │ │ │ │ +247 │ │ │ │ │ +248 // Reallocates the table arrays to remove excess capacity (factory helper) │ │ │ │ │ +_2_4_9 void _s_h_r_i_n_k_T_o_F_i_t(); │ │ │ │ │ +250 │ │ │ │ │ +251 // Performs any final operations on internal tables (factory helper) │ │ │ │ │ +_2_5_2 void _f_i_n_a_l_i_z_e(); │ │ │ │ │ +253 │ │ │ │ │ +254protected: │ │ │ │ │ +_2_5_5 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l() : ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(0) {} │ │ │ │ │ +_2_5_6 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l(int numControlVerts) │ │ │ │ │ +257 : ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(numControlVerts) │ │ │ │ │ +258 { } │ │ │ │ │ +259 │ │ │ │ │ +260 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +_2_6_1 friend class _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ +262 │ │ │ │ │ +_2_6_3 int ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s; // number of control vertices │ │ │ │ │ +264 │ │ │ │ │ +_2_6_5 std::vector ___s_i_z_e_s; // number of coefficients for each stencil │ │ │ │ │ +_2_6_6 std::vector ___o_f_f_s_e_t_s, // offset to the start of each stencil │ │ │ │ │ +_2_6_7 ___i_n_d_i_c_e_s; // indices of contributing coarse vertices │ │ │ │ │ +_2_6_8 std::vector ___w_e_i_g_h_t_s; // stencil weight coefficients │ │ │ │ │ +269}; │ │ │ │ │ +270 │ │ │ │ │ +_2_7_3class _S_t_e_n_c_i_l_T_a_b_l_e : public _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ +274protected: │ │ │ │ │ +_2_7_5 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ +276 │ │ │ │ │ +277public: │ │ │ │ │ +_2_7_8 _S_t_e_n_c_i_l _G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x index) const { │ │ │ │ │ +279 return _S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ +280 } │ │ │ │ │ +_2_8_1 _S_t_e_n_c_i_l _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ +282 return _S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ +283 } │ │ │ │ │ +284 │ │ │ │ │ +285protected: │ │ │ │ │ +_2_8_6 _S_t_e_n_c_i_l_T_a_b_l_e() : _B_a_s_e_T_a_b_l_e() { } │ │ │ │ │ +_2_8_7 _S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts) : _B_a_s_e_T_a_b_l_e(numControlVerts) { } │ │ │ │ │ +_2_8_8 _S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts, │ │ │ │ │ +289 std::vector const& offsets, │ │ │ │ │ +290 std::vector const& sizes, │ │ │ │ │ +291 std::vector const& sources, │ │ │ │ │ +292 std::vector const& weights, │ │ │ │ │ +293 bool includeCoarseVerts, │ │ │ │ │ +294 size_t firstOffset) │ │ │ │ │ +295 : _B_a_s_e_T_a_b_l_e(numControlVerts, offsets, │ │ │ │ │ +296 sizes, sources, weights, includeCoarseVerts, firstOffset) { } │ │ │ │ │ +297}; │ │ │ │ │ +298 │ │ │ │ │ +299 │ │ │ │ │ +302template │ │ │ │ │ +_3_0_3class _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l : public _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ +304public: │ │ │ │ │ +305 │ │ │ │ │ +_3_2_4 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l( int* size, │ │ │ │ │ +325 _I_n_d_e_x * indices, │ │ │ │ │ +326 REAL * weights, │ │ │ │ │ +327 REAL * duWeights=0, │ │ │ │ │ +328 REAL * dvWeights=0, │ │ │ │ │ +329 REAL * duuWeights=0, │ │ │ │ │ +330 REAL * duvWeights=0, │ │ │ │ │ +331 REAL * dvvWeights=0) │ │ │ │ │ +332 : _S_t_e_n_c_i_l_R_e_a_l(size, indices, weights), │ │ │ │ │ +333 _duWeights(duWeights), │ │ │ │ │ +334 _dvWeights(dvWeights), │ │ │ │ │ +335 _duuWeights(duuWeights), │ │ │ │ │ +336 _duvWeights(duvWeights), │ │ │ │ │ +337 _dvvWeights(dvvWeights) { │ │ │ │ │ +338 } │ │ │ │ │ +339 │ │ │ │ │ +_3_4_1 REAL const * _G_e_t_D_u_W_e_i_g_h_t_s() const { │ │ │ │ │ +342 return _duWeights; │ │ │ │ │ +343 } │ │ │ │ │ +344 │ │ │ │ │ +_3_4_6 REAL const * _G_e_t_D_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +347 return _dvWeights; │ │ │ │ │ +348 } │ │ │ │ │ +349 │ │ │ │ │ +_3_5_1 REAL const * _G_e_t_D_u_u_W_e_i_g_h_t_s() const { │ │ │ │ │ +352 return _duuWeights; │ │ │ │ │ +353 } │ │ │ │ │ +354 │ │ │ │ │ +_3_5_6 REAL const * _G_e_t_D_u_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +357 return _duvWeights; │ │ │ │ │ +358 } │ │ │ │ │ +359 │ │ │ │ │ +_3_6_1 REAL const * _G_e_t_D_v_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +362 return _dvvWeights; │ │ │ │ │ +363 } │ │ │ │ │ +364 │ │ │ │ │ +_3_6_6 void _N_e_x_t() { │ │ │ │ │ +367 int stride = *this->___s_i_z_e; │ │ │ │ │ +368 ++this->___s_i_z_e; │ │ │ │ │ +369 this->___i_n_d_i_c_e_s += stride; │ │ │ │ │ +370 this->___w_e_i_g_h_t_s += stride; │ │ │ │ │ +371 if (_duWeights) _duWeights += stride; │ │ │ │ │ +372 if (_dvWeights) _dvWeights += stride; │ │ │ │ │ +373 if (_duuWeights) _duuWeights += stride; │ │ │ │ │ +374 if (_duvWeights) _duvWeights += stride; │ │ │ │ │ +375 if (_dvvWeights) _dvvWeights += stride; │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +378private: │ │ │ │ │ +379 │ │ │ │ │ +380 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +381 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +382 │ │ │ │ │ +383 REAL * _duWeights, // pointer to stencil u derivative limit weights │ │ │ │ │ +384 * _dvWeights, // pointer to stencil v derivative limit weights │ │ │ │ │ +385 * _duuWeights, // pointer to stencil uu derivative limit weights │ │ │ │ │ +386 * _duvWeights, // pointer to stencil uv derivative limit weights │ │ │ │ │ +387 * _dvvWeights; // pointer to stencil vv derivative limit weights │ │ │ │ │ +388}; │ │ │ │ │ +389 │ │ │ │ │ +_3_9_2class _L_i_m_i_t_S_t_e_n_c_i_l : public _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ +393protected: │ │ │ │ │ +_3_9_4 typedef _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_S_t_e_n_c_i_l; │ │ │ │ │ +395 │ │ │ │ │ +396public: │ │ │ │ │ +_3_9_7 _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_S_t_e_n_c_i_l const & other) : _B_a_s_e_S_t_e_n_c_i_l(other) { } │ │ │ │ │ +_3_9_8 _L_i_m_i_t_S_t_e_n_c_i_l(int* size, _I_n_d_e_x * indices, float * weights, │ │ │ │ │ +399 float * duWeights=0, float * dvWeights=0, │ │ │ │ │ +400 float * duuWeights=0, float * duvWeights=0, float * dvvWeights=0) │ │ │ │ │ +401 : _B_a_s_e_S_t_e_n_c_i_l(size, indices, weights, │ │ │ │ │ +402 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights) { } │ │ │ │ │ +403}; │ │ │ │ │ +404 │ │ │ │ │ +405 │ │ │ │ │ +408template │ │ │ │ │ +_4_0_9class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l : public _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ +410protected: │ │ │ │ │ +_4_1_1 _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l( │ │ │ │ │ +412 int numControlVerts, │ │ │ │ │ +413 std::vector const& offsets, │ │ │ │ │ +414 std::vector const& sizes, │ │ │ │ │ +415 std::vector const& sources, │ │ │ │ │ +416 std::vector const& weights, │ │ │ │ │ +417 std::vector const& duWeights, │ │ │ │ │ +418 std::vector const& dvWeights, │ │ │ │ │ +419 std::vector const& duuWeights, │ │ │ │ │ +420 std::vector const& duvWeights, │ │ │ │ │ +421 std::vector const& dvvWeights, │ │ │ │ │ +422 bool includeCoarseVerts, │ │ │ │ │ +423 size_t firstOffset); │ │ │ │ │ +424 │ │ │ │ │ +425public: │ │ │ │ │ +426 │ │ │ │ │ +_4_2_8 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const; │ │ │ │ │ +429 │ │ │ │ │ +_4_3_1 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const; │ │ │ │ │ +432 │ │ │ │ │ +_4_3_4 std::vector const & _G_e_t_D_u_W_e_i_g_h_t_s() const { │ │ │ │ │ +435 return _duWeights; │ │ │ │ │ +436 } │ │ │ │ │ +437 │ │ │ │ │ +_4_3_9 std::vector const & _G_e_t_D_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +440 return _dvWeights; │ │ │ │ │ +441 } │ │ │ │ │ +442 │ │ │ │ │ +_4_4_4 std::vector const & _G_e_t_D_u_u_W_e_i_g_h_t_s() const { │ │ │ │ │ +445 return _duuWeights; │ │ │ │ │ +446 } │ │ │ │ │ +447 │ │ │ │ │ +_4_4_9 std::vector const & _G_e_t_D_u_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +450 return _duvWeights; │ │ │ │ │ +451 } │ │ │ │ │ +452 │ │ │ │ │ +_4_5_4 std::vector const & _G_e_t_D_v_v_W_e_i_g_h_t_s() const { │ │ │ │ │ +455 return _dvvWeights; │ │ │ │ │ +456 } │ │ │ │ │ +457 │ │ │ │ │ +475 template │ │ │ │ │ +_4_7_6 void _U_p_d_a_t_e_D_e_r_i_v_s(T const & srcValues, U & uderivs, U & vderivs, │ │ │ │ │ +477 int start=-1, int end=-1) const { │ │ │ │ │ +478 │ │ │ │ │ +479 this->_u_p_d_a_t_e(srcValues, uderivs, _duWeights, start, end); │ │ │ │ │ +480 this->_u_p_d_a_t_e(srcValues, vderivs, _dvWeights, start, end); │ │ │ │ │ +481 } │ │ │ │ │ +482 │ │ │ │ │ +483 template │ │ │ │ │ +_4_8_4 void _U_p_d_a_t_e_D_e_r_i_v_s(T1 const & srcBase, int numBase, T2 const & srcRef, │ │ │ │ │ +485 U & uderivs, U & vderivs, int start=-1, int end=-1) const { │ │ │ │ │ +486 │ │ │ │ │ +487 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uderivs, _duWeights, start, end); │ │ │ │ │ +488 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end); │ │ │ │ │ +489 } │ │ │ │ │ +490 │ │ │ │ │ +491 // Pointer interface for backward compatibility │ │ │ │ │ +492 template │ │ │ │ │ +_4_9_3 void _U_p_d_a_t_e_D_e_r_i_v_s(T const *src, U *uderivs, U *vderivs, │ │ │ │ │ +494 int start=-1, int end=-1) const { │ │ │ │ │ +495 │ │ │ │ │ +496 this->_u_p_d_a_t_e(src, uderivs, _duWeights, start, end); │ │ │ │ │ +497 this->_u_p_d_a_t_e(src, vderivs, _dvWeights, start, end); │ │ │ │ │ +498 } │ │ │ │ │ +499 template │ │ │ │ │ +_5_0_0 void _U_p_d_a_t_e_D_e_r_i_v_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ +501 U *uderivs, U *vderivs, int start=-1, int end=-1) const { │ │ │ │ │ +502 │ │ │ │ │ +503 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uderivs, _duWeights, start, end); │ │ │ │ │ +504 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end); │ │ │ │ │ +505 } │ │ │ │ │ +506 │ │ │ │ │ +527 template │ │ │ │ │ +_5_2_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T const & srcValues, │ │ │ │ │ +529 U & uuderivs, U & uvderivs, U & vvderivs, │ │ │ │ │ +530 int start=-1, int end=-1) const { │ │ │ │ │ +531 │ │ │ │ │ +532 this->_u_p_d_a_t_e(srcValues, uuderivs, _duuWeights, start, end); │ │ │ │ │ +533 this->_u_p_d_a_t_e(srcValues, uvderivs, _duvWeights, start, end); │ │ │ │ │ +534 this->_u_p_d_a_t_e(srcValues, vvderivs, _dvvWeights, start, end); │ │ │ │ │ +535 } │ │ │ │ │ +536 │ │ │ │ │ +537 template │ │ │ │ │ +_5_3_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T1 const & srcBase, int numBase, T2 const & srcRef, │ │ │ │ │ +539 U & uuderivs, U & uvderivs, U & vvderivs, int start=-1, int end=-1) const { │ │ │ │ │ +540 │ │ │ │ │ +541 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end); │ │ │ │ │ +542 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end); │ │ │ │ │ +543 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end); │ │ │ │ │ +544 } │ │ │ │ │ +545 │ │ │ │ │ +546 // Pointer interface for backward compatibility │ │ │ │ │ +547 template │ │ │ │ │ +_5_4_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, │ │ │ │ │ +549 int start=-1, int end=-1) const { │ │ │ │ │ +550 │ │ │ │ │ +551 this->_u_p_d_a_t_e(src, uuderivs, _duuWeights, start, end); │ │ │ │ │ +552 this->_u_p_d_a_t_e(src, uvderivs, _duvWeights, start, end); │ │ │ │ │ +553 this->_u_p_d_a_t_e(src, vvderivs, _dvvWeights, start, end); │ │ │ │ │ +554 } │ │ │ │ │ +555 template │ │ │ │ │ +_5_5_6 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ +557 U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const { │ │ │ │ │ +558 │ │ │ │ │ +559 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end); │ │ │ │ │ +560 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end); │ │ │ │ │ +561 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end); │ │ │ │ │ +562 } │ │ │ │ │ +563 │ │ │ │ │ +_5_6_5 void _C_l_e_a_r(); │ │ │ │ │ +566 │ │ │ │ │ +567private: │ │ │ │ │ +568 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ +569 │ │ │ │ │ +570 // Resize the table arrays (factory helper) │ │ │ │ │ +571 void resize(int nstencils, int nelems); │ │ │ │ │ +572 │ │ │ │ │ +573private: │ │ │ │ │ +574 std::vector _duWeights, // u derivative limit stencil weights │ │ │ │ │ +575 _dvWeights, // v derivative limit stencil weights │ │ │ │ │ +576 _duuWeights, // uu derivative limit stencil weights │ │ │ │ │ +577 _duvWeights, // uv derivative limit stencil weights │ │ │ │ │ +578 _dvvWeights; // vv derivative limit stencil weights │ │ │ │ │ +579}; │ │ │ │ │ +580 │ │ │ │ │ +_5_8_3class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e : public _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ +584protected: │ │ │ │ │ +_5_8_5 typedef _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ +586 │ │ │ │ │ +587public: │ │ │ │ │ +_5_8_8 _L_i_m_i_t_S_t_e_n_c_i_l _G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x index) const { │ │ │ │ │ +589 return _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ +590 } │ │ │ │ │ +_5_9_1 _L_i_m_i_t_S_t_e_n_c_i_l _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ +592 return _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ +593 } │ │ │ │ │ +594 │ │ │ │ │ +595protected: │ │ │ │ │ +_5_9_6 _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts, │ │ │ │ │ +597 std::vector const& offsets, │ │ │ │ │ +598 std::vector const& sizes, │ │ │ │ │ +599 std::vector const& sources, │ │ │ │ │ +600 std::vector const& weights, │ │ │ │ │ +601 std::vector const& duWeights, │ │ │ │ │ +602 std::vector const& dvWeights, │ │ │ │ │ +603 std::vector const& duuWeights, │ │ │ │ │ +604 std::vector const& duvWeights, │ │ │ │ │ +605 std::vector const& dvvWeights, │ │ │ │ │ +606 bool includeCoarseVerts, │ │ │ │ │ +607 size_t firstOffset) │ │ │ │ │ +608 : _B_a_s_e_T_a_b_l_e(numControlVerts, │ │ │ │ │ +609 offsets, sizes, sources, weights, │ │ │ │ │ +610 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights, │ │ │ │ │ +611 includeCoarseVerts, firstOffset) { } │ │ │ │ │ +612}; │ │ │ │ │ +613 │ │ │ │ │ +614 │ │ │ │ │ +615// Update values by applying cached stencil weights to new control values │ │ │ │ │ +616template │ │ │ │ │ +617template void │ │ │ │ │ +_6_1_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_u_p_d_a_t_e(T1 const &srcBase, int numBase, │ │ │ │ │ +619 T2 const &srcRef, U &dstValues, │ │ │ │ │ +620 std::vector const &valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const { │ │ │ │ │ +621 │ │ │ │ │ +622 int const * sizes = &_sizes.at(0); │ │ │ │ │ +623 _I_n_d_e_x const * indices = &_indices.at(0); │ │ │ │ │ +624 REAL const * weights = &valueWeights.at(0); │ │ │ │ │ +625 │ │ │ │ │ +626 if (start > 0) { │ │ │ │ │ +627 assert(start < (_I_n_d_e_x)_offsets.size()); │ │ │ │ │ +628 sizes += start; │ │ │ │ │ +629 indices += _offsets[start]; │ │ │ │ │ +630 weights += _offsets[start]; │ │ │ │ │ +631 } else { │ │ │ │ │ +632 start = 0; │ │ │ │ │ +633 } │ │ │ │ │ +634 │ │ │ │ │ +635 int nstencils = ((end < start) ? GetNumStencils() : end) - start; │ │ │ │ │ +636 │ │ │ │ │ +637 for (int i = 0; i < nstencils; ++i, ++sizes) { │ │ │ │ │ +638 dstValues[start + i].Clear(); │ │ │ │ │ +639 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) { │ │ │ │ │ +640 if (*indices < numBase) { │ │ │ │ │ +641 dstValues[start + i].AddWithWeight(srcBase[*indices], *weights); │ │ │ │ │ +642 } else { │ │ │ │ │ +643 dstValues[start + i].AddWithWeight(srcRef[*indices - numBase], *weights); │ │ │ │ │ +644 } │ │ │ │ │ +645 } │ │ │ │ │ +646 } │ │ │ │ │ +647} │ │ │ │ │ +648template │ │ │ │ │ +649template void │ │ │ │ │ +_6_5_0_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_u_p_d_a_t_e(T const &srcValues, U &dstValues, │ │ │ │ │ +651 std::vector const &valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const { │ │ │ │ │ +652 │ │ │ │ │ +653 int const * sizes = &_sizes.at(0); │ │ │ │ │ +654 _I_n_d_e_x const * indices = &_indices.at(0); │ │ │ │ │ +655 REAL const * weights = &valueWeights.at(0); │ │ │ │ │ +656 │ │ │ │ │ +657 if (start > 0) { │ │ │ │ │ +658 assert(start < (_I_n_d_e_x)_offsets.size()); │ │ │ │ │ +659 sizes += start; │ │ │ │ │ +660 indices += _offsets[start]; │ │ │ │ │ +661 weights += _offsets[start]; │ │ │ │ │ +662 } else { │ │ │ │ │ +663 start = 0; │ │ │ │ │ +664 } │ │ │ │ │ +665 │ │ │ │ │ +666 int nstencils = ((end < start) ? GetNumStencils() : end) - start; │ │ │ │ │ +667 │ │ │ │ │ +668 for (int i = 0; i < nstencils; ++i, ++sizes) { │ │ │ │ │ +669 dstValues[start + i].Clear(); │ │ │ │ │ +670 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) { │ │ │ │ │ +671 dstValues[start + i].AddWithWeight(srcValues[*indices], *weights); │ │ │ │ │ +672 } │ │ │ │ │ +673 } │ │ │ │ │ +674} │ │ │ │ │ +675 │ │ │ │ │ +676template │ │ │ │ │ +677inline void │ │ │ │ │ +_6_7_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s() { │ │ │ │ │ +679 _I_n_d_e_x offset=0; │ │ │ │ │ +680 int noffsets = (int)_sizes.size(); │ │ │ │ │ +681 _offsets.resize(noffsets); │ │ │ │ │ +682 for (int i=0; i<(int)_sizes.size(); ++i ) { │ │ │ │ │ +683 _offsets[i]=offset; │ │ │ │ │ +684 offset+=_sizes[i]; │ │ │ │ │ +685 } │ │ │ │ │ +686} │ │ │ │ │ +687 │ │ │ │ │ +688template │ │ │ │ │ +689inline void │ │ │ │ │ +_6_9_0_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(int nstencils, int nelems) { │ │ │ │ │ +691 _sizes.resize(nstencils); │ │ │ │ │ +692 _indices.resize(nelems); │ │ │ │ │ +693 _weights.resize(nelems); │ │ │ │ │ +694} │ │ │ │ │ +695 │ │ │ │ │ +696template │ │ │ │ │ +697inline void │ │ │ │ │ +_6_9_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_e_r_v_e(int nstencils, int nelems) { │ │ │ │ │ +699 _sizes.reserve(nstencils); │ │ │ │ │ +700 _indices.reserve(nelems); │ │ │ │ │ +701 _weights.reserve(nelems); │ │ │ │ │ +702} │ │ │ │ │ +703 │ │ │ │ │ +704template │ │ │ │ │ +705inline void │ │ │ │ │ +_7_0_6_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_s_h_r_i_n_k_T_o_F_i_t() { │ │ │ │ │ +707 std::vector(_sizes).swap(_sizes); │ │ │ │ │ +708 std::vector(_indices).swap(_indices); │ │ │ │ │ +709 std::vector(_weights).swap(_weights); │ │ │ │ │ +710} │ │ │ │ │ +711 │ │ │ │ │ +712template │ │ │ │ │ +713inline void │ │ │ │ │ +_7_1_4_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_f_i_n_a_l_i_z_e() { │ │ │ │ │ +715 shrinkToFit(); │ │ │ │ │ +716 generateOffsets(); │ │ │ │ │ +717} │ │ │ │ │ +718 │ │ │ │ │ +719// Returns a Stencil at index i in the table │ │ │ │ │ +720template │ │ │ │ │ +721inline _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ +_7_2_2_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const { │ │ │ │ │ +723 assert((! _offsets.empty()) && i<(int)_offsets.size()); │ │ │ │ │ +724 │ │ │ │ │ +725 _I_n_d_e_x ofs = _offsets[i]; │ │ │ │ │ +726 │ │ │ │ │ +727 return _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>(const_cast(&_sizes[i]), │ │ │ │ │ +728 const_cast<_I_n_d_e_x*>(&_indices[ofs]), │ │ │ │ │ +729 const_cast(&_weights[ofs])); │ │ │ │ │ +730} │ │ │ │ │ +731 │ │ │ │ │ +732template │ │ │ │ │ +733inline _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ +_7_3_4_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ +735 return GetStencil(index); │ │ │ │ │ +736} │ │ │ │ │ +737 │ │ │ │ │ +738template │ │ │ │ │ +739inline void │ │ │ │ │ +740_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(int nstencils, int nelems) { │ │ │ │ │ +741 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(nstencils, nelems); │ │ │ │ │ +742 _duWeights.resize(nelems); │ │ │ │ │ +743 _dvWeights.resize(nelems); │ │ │ │ │ +744} │ │ │ │ │ +745 │ │ │ │ │ +746// Returns a LimitStencil at index i in the table │ │ │ │ │ +747template │ │ │ │ │ +748inline LimitStencilReal │ │ │ │ │ +_7_4_9_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const { │ │ │ │ │ +750 assert((! this->GetOffsets().empty()) && i<(int)this->GetOffsets().size()); │ │ │ │ │ +751 │ │ │ │ │ +752 _I_n_d_e_x ofs = this->GetOffsets()[i]; │ │ │ │ │ +753 │ │ │ │ │ +754 if (!_duWeights.empty() && !_dvWeights.empty() && │ │ │ │ │ +755 !_duuWeights.empty() && !_duvWeights.empty() && !_dvvWeights.empty()) { │ │ │ │ │ +756 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ +757 const_cast(&this->GetSizes()[i]), │ │ │ │ │ +758 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ +759 const_cast(&this->GetWeights()[ofs]), │ │ │ │ │ +760 const_cast(&GetDuWeights()[ofs]), │ │ │ │ │ +761 const_cast(&GetDvWeights()[ofs]), │ │ │ │ │ +762 const_cast(&GetDuuWeights()[ofs]), │ │ │ │ │ +763 const_cast(&GetDuvWeights()[ofs]), │ │ │ │ │ +764 const_cast(&GetDvvWeights()[ofs]) ); │ │ │ │ │ +765 } else if (!_duWeights.empty() && !_dvWeights.empty()) { │ │ │ │ │ +766 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ +767 const_cast(&this->GetSizes()[i]), │ │ │ │ │ +768 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ +769 const_cast(&this->GetWeights()[ofs]), │ │ │ │ │ +770 const_cast(&GetDuWeights()[ofs]), │ │ │ │ │ +771 const_cast(&GetDvWeights()[ofs]) ); │ │ │ │ │ +772 } else { │ │ │ │ │ +773 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ +774 const_cast(&this->GetSizes()[i]), │ │ │ │ │ +775 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ +776 const_cast(&this->GetWeights()[ofs]) ); │ │ │ │ │ +777 } │ │ │ │ │ +778} │ │ │ │ │ +779 │ │ │ │ │ +780template │ │ │ │ │ +781inline _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ +_7_8_2_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ +783 return GetLimitStencil(index); │ │ │ │ │ +784} │ │ │ │ │ +785 │ │ │ │ │ +786} // end namespace Far │ │ │ │ │ +787 │ │ │ │ │ +788} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +789using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +790 │ │ │ │ │ +791} // end namespace OpenSubdiv │ │ │ │ │ +792 │ │ │ │ │ +793#endif // OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_I_n_d_e_x │ │ │ │ │ Vtr::Index Index │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -Object used to compute and query ptex face indices. │ │ │ │ │ -DDeeffiinniittiioonn _p_t_e_x_I_n_d_i_c_e_s_._h_:_4_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_F_a_c_e_I_d │ │ │ │ │ -int GetFaceId(Index f) const │ │ │ │ │ -Returns the ptex face index given a coarse face 'f' or -1. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -PtexIndices(TopologyRefiner const &refiner) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ +A specialized factory for StencilTable. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ +A specialized factory for LimitStencilTable. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +Vertex stencil descriptor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +StencilReal() │ │ │ │ │ +Default constructor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___s_i_z_e │ │ │ │ │ +int * _size │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +StencilReal(int *size, Index *indices, REAL *weights) │ │ │ │ │ Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_A_d_j_a_c_e_n_c_y │ │ │ │ │ -void GetAdjacency(TopologyRefiner const &refiner, int face, int quadrant, int │ │ │ │ │ -adjFaces[4], int adjEdges[4]) const │ │ │ │ │ -Returns ptex face adjacency information for a given coarse face. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ -int GetNumFaces() const │ │ │ │ │ -Returns the number of ptex faces in the mesh. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_~_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -~PtexIndices() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -Stores topology data for a specified set of refinement options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_N_e_x_t │ │ │ │ │ +void Next() │ │ │ │ │ +Advance to the next stencil in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +StencilReal(StencilReal const &other) │ │ │ │ │ +Copy constructor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___i_n_d_i_c_e_s │ │ │ │ │ +Index * _indices │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +Index const * GetVertexIndices() const │ │ │ │ │ +Returns the control vertices' indices. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_S_i_z_e │ │ │ │ │ +int GetSize() const │ │ │ │ │ +Returns the size of the stencil. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___w_e_i_g_h_t_s │ │ │ │ │ +REAL * _weights │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_S_i_z_e_P_t_r │ │ │ │ │ +int * GetSizePtr() const │ │ │ │ │ +Returns the size of the stencil as a pointer. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetWeights() const │ │ │ │ │ +Returns the interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l │ │ │ │ │ +Vertex stencil class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ +Stencil(BaseStencil const &other) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ +Stencil(int *size, Index *indices, float *weights) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_B_a_s_e_S_t_e_n_c_i_l │ │ │ │ │ +StencilReal< float > BaseStencil │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ +Stencil() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +Table of subdivision stencils. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumControlVertices() const │ │ │ │ │ +Returns the number of control vertices indexed in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___s_i_z_e_s │ │ │ │ │ +std::vector< int > _sizes │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ +friend class Far::PatchTableBuilder │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, │ │ │ │ │ +std::vector< REAL > const &valueWeights, Index start, Index end) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ +void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ +&dstValues, Index start=-1, Index end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_1_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_C_o_n_t_r_o_l_I_n_d_i_c_e_s │ │ │ │ │ +std::vector< Index > const & GetControlIndices() const │ │ │ │ │ +Returns the indices of the control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ +void finalize() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_1_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +StencilReal< REAL > operator[](Index index) const │ │ │ │ │ +Returns the stencil at index i in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +int _numControlVertices │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(T const &srcValues, U &dstValues, std::vector< REAL > const │ │ │ │ │ +&valueWeights, Index start, Index end) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_5_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_S_i_z_e_s │ │ │ │ │ +std::vector< int > const & GetSizes() const │ │ │ │ │ +Returns the number of control vertices of each stencil in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +Returns the number of stencils in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_~_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +virtual ~StencilTableReal() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_O_f_f_s_e_t_s │ │ │ │ │ +std::vector< Index > const & GetOffsets() const │ │ │ │ │ +Returns the offset to a given stencil (factory may leave empty) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_S_t_e_n_c_i_l │ │ │ │ │ +StencilReal< REAL > GetStencil(Index i) const │ │ │ │ │ +Returns a Stencil at index i in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s │ │ │ │ │ +void generateOffsets() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_C_l_e_a_r │ │ │ │ │ +void Clear() │ │ │ │ │ +Clears the stencils from the table. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___o_f_f_s_e_t_s │ │ │ │ │ +std::vector< Index > _offsets │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___w_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > _weights │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(int nstencils, int nelems) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_9_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetWeights() const │ │ │ │ │ +Returns the stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_8_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ +void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef, U *dst, │ │ │ │ │ +Index start=-1, Index end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +StencilTableReal(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ +vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ +REAL > const &weights, bool includeCoarseVerts, size_t firstOffset) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___i_n_d_i_c_e_s │ │ │ │ │ +std::vector< Index > _indices │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +StencilTableReal() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_r_e_s_e_r_v_e │ │ │ │ │ +void reserve(int nstencils, int nelems) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ +void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_1_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ +void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=- │ │ │ │ │ +1) const │ │ │ │ │ +Updates point values based on the control values. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_0_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ +vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ +float > const &weights, bool includeCoarseVerts, size_t firstOffset) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable(int numControlVerts) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_B_a_s_e_T_a_b_l_e │ │ │ │ │ +StencilTableReal< float > BaseTable │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l │ │ │ │ │ +Stencil GetStencil(Index index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +Stencil operator[](Index index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable() │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +Limit point stencil descriptor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_0_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetDuvWeights() const │ │ │ │ │ +Returns the uv derivative weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_v_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetDvWeights() const │ │ │ │ │ +Returns the v derivative weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_4_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_N_e_x_t │ │ │ │ │ +void Next() │ │ │ │ │ +Advance to the next stencil in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetDvvWeights() const │ │ │ │ │ +Returns the vv derivative weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ +LimitStencilReal(int *size, Index *indices, REAL *weights, REAL *duWeights=0, │ │ │ │ │ +REAL *dvWeights=0, REAL *duuWeights=0, REAL *duvWeights=0, REAL *dvvWeights=0) │ │ │ │ │ +Constructor. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_2_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetDuWeights() const │ │ │ │ │ +Returns the u derivative weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s │ │ │ │ │ +REAL const * GetDuuWeights() const │ │ │ │ │ +Returns the uu derivative weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +Limit point stencil class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +LimitStencil(BaseStencil const &other) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_B_a_s_e_S_t_e_n_c_i_l │ │ │ │ │ +LimitStencilReal< float > BaseStencil │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +LimitStencil(int *size, Index *indices, float *weights, float *duWeights=0, │ │ │ │ │ +float *dvWeights=0, float *duuWeights=0, float *duvWeights=0, float │ │ │ │ │ +*dvvWeights=0) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +Table of limit subdivision stencils. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetDuuWeights() const │ │ │ │ │ +Returns the 'uu' derivative stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +LimitStencilReal< REAL > operator[](Index index) const │ │ │ │ │ +Returns the limit stencil at index i in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetDvvWeights() const │ │ │ │ │ +Returns the 'vv' derivative stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ +void UpdateDerivs(T const *src, U *uderivs, U *vderivs, int start=-1, int end=- │ │ │ │ │ +1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ +void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, int │ │ │ │ │ +start=-1, int end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_v_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetDvWeights() const │ │ │ │ │ +Returns the 'v' derivative stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_3_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ +void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U │ │ │ │ │ +*uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ +void UpdateDerivs(T const &srcValues, U &uderivs, U &vderivs, int start=-1, int │ │ │ │ │ +end=-1) const │ │ │ │ │ +Updates derivative values based on the control values. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +LimitStencilReal< REAL > GetLimitStencil(Index i) const │ │ │ │ │ +Returns a LimitStencil at index i in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_: │ │ │ │ │ +_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ +LimitStencilTableReal(int numControlVerts, std::vector< int > const &offsets, │ │ │ │ │ +std::vector< int > const &sizes, std::vector< int > const &sources, std:: │ │ │ │ │ +vector< REAL > const &weights, std::vector< REAL > const &duWeights, std:: │ │ │ │ │ +vector< REAL > const &dvWeights, std::vector< REAL > const &duuWeights, std:: │ │ │ │ │ +vector< REAL > const &duvWeights, std::vector< REAL > const &dvvWeights, bool │ │ │ │ │ +includeCoarseVerts, size_t firstOffset) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ +void Update2ndDerivs(T const &srcValues, U &uuderivs, U &uvderivs, U &vvderivs, │ │ │ │ │ +int start=-1, int end=-1) const │ │ │ │ │ +Updates 2nd derivative values based on the control values. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetDuWeights() const │ │ │ │ │ +Returns the 'u' derivative stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_C_l_e_a_r │ │ │ │ │ +void Clear() │ │ │ │ │ +Clears the stencils from the table. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ +void Update2ndDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ +&uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s │ │ │ │ │ +std::vector< REAL > const & GetDuvWeights() const │ │ │ │ │ +Returns the 'uv' derivative stencil interpolation weights. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ +void UpdateDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uderivs, │ │ │ │ │ +U &vderivs, int start=-1, int end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_8_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ +void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uderivs, │ │ │ │ │ +U *vderivs, int start=-1, int end=-1) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_B_a_s_e_T_a_b_l_e │ │ │ │ │ +LimitStencilTableReal< float > BaseTable │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ +LimitStencil GetLimitStencil(Index index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +LimitStencilTable(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ +vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ +float > const &weights, std::vector< float > const &duWeights, std::vector< │ │ │ │ │ +float > const &dvWeights, std::vector< float > const &duuWeights, std::vector< │ │ │ │ │ +float > const &duvWeights, std::vector< float > const &dvvWeights, bool │ │ │ │ │ +includeCoarseVerts, size_t firstOffset) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +LimitStencil operator[](Index index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_9_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00722.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/primvarRefiner.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/ptexIndices.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,43 +90,28 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
primvarRefiner.h File Reference
│ │ │ │ +
ptexIndices.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../sdc/bilinearScheme.h"
│ │ │ │ -#include "../sdc/catmarkScheme.h"
│ │ │ │ -#include "../sdc/loopScheme.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ -#include "../vtr/fvarLevel.h"
│ │ │ │ -#include "../vtr/refinement.h"
│ │ │ │ -#include "../vtr/fvarRefinement.h"
│ │ │ │ -#include "../vtr/stackBuffer.h"
│ │ │ │ -#include "../vtr/componentInterfaces.h"
│ │ │ │ -#include "../far/types.h"
│ │ │ │ -#include "../far/error.h"
│ │ │ │ -#include "../far/topologyLevel.h"
│ │ │ │ #include "../far/topologyRefiner.h"
│ │ │ │ -#include <cassert>
│ │ │ │ +#include "../far/types.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  PrimvarRefinerReal< REAL >
 Applies refinement operations to generic primvar data. More...
 
class  PrimvarRefiner
class  PtexIndices
 Object used to compute and query ptex face indices. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -135,13 +120,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -primvarRefiner.h File Reference │ │ │ │ │ +ptexIndices.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_c_a_t_m_a_r_k_S_c_h_e_m_e_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_l_o_o_p_S_c_h_e_m_e_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_f_v_a_r_L_e_v_e_l_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_e_r_r_o_r_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_L_e_v_e_l_._h" │ │ │ │ │ #include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  Applies refinement operations to generic primvar data. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ +class   _P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +  Object used to compute and query ptex face indices. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ + * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00722.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00722 = [ │ │ │ │ │ - ["PrimvarRefinerReal< REAL >", "a01029.html", "a01029"], │ │ │ │ │ - ["PrimvarRefiner", "a01037.html", "a01037"] │ │ │ │ │ + ["PtexIndices", "a01041.html", "a01041"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00722_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/primvarRefiner.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/ptexIndices.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
primvarRefiner.h
│ │ │ │ +
ptexIndices.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 DreamWorks Animation LLC.
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,1233 +118,81 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H
│ │ │ │ -
25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_FAR_PTEX_INDICES_H
│ │ │ │ +
25#define OPENSUBDIV3_FAR_PTEX_INDICES_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29#include "../sdc/types.h"
│ │ │ │ -
30#include "../sdc/options.h"
│ │ │ │ -
31#include "../sdc/bilinearScheme.h"
│ │ │ │ -
32#include "../sdc/catmarkScheme.h"
│ │ │ │ -
33#include "../sdc/loopScheme.h"
│ │ │ │ -
34#include "../vtr/level.h"
│ │ │ │ -
35#include "../vtr/fvarLevel.h"
│ │ │ │ -
36#include "../vtr/refinement.h"
│ │ │ │ -
37#include "../vtr/fvarRefinement.h"
│ │ │ │ -
38#include "../vtr/stackBuffer.h"
│ │ │ │ -
39#include "../vtr/componentInterfaces.h"
│ │ │ │ -
40#include "../far/types.h"
│ │ │ │ -
41#include "../far/error.h"
│ │ │ │ -
42#include "../far/topologyLevel.h"
│ │ │ │ -
43#include "../far/topologyRefiner.h"
│ │ │ │ -
44
│ │ │ │ -
45#include <cassert>
│ │ │ │ -
46
│ │ │ │ -
47namespace OpenSubdiv {
│ │ │ │ -
48namespace OPENSUBDIV_VERSION {
│ │ │ │ +
29#include "../far/topologyRefiner.h"
│ │ │ │ +
30#include "../far/types.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <vector>
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Far {
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47
│ │ │ │ +
48public:
│ │ │ │
49
│ │ │ │ -
50namespace Far {
│ │ │ │ -
51
│ │ │ │ -
55template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ + │ │ │ │ +
52
│ │ │ │ + │ │ │ │ +
55
│ │ │ │
57
│ │ │ │ -
58public:
│ │ │ │ -
59 PrimvarRefinerReal(TopologyRefiner const & refiner) : _refiner(refiner) { }
│ │ │ │ - │ │ │ │ -
61
│ │ │ │ -
62 TopologyRefiner const & GetTopologyRefiner() const { return _refiner; }
│ │ │ │ -
63
│ │ │ │ -
65
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
113 template <class T, class U> void Interpolate(int level, T const & src, U & dst) const;
│ │ │ │ -
114
│ │ │ │ -
│ │ │ │ -
130 template <class T, class U> void InterpolateVarying(int level, T const & src, U & dst) const;
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ -
148 template <class T, class U> void InterpolateFaceUniform(int level, T const & src, U & dst) const;
│ │ │ │ -
149
│ │ │ │ -
│ │ │ │ -
161 template <class T, class U> void InterpolateFaceVarying(int level, T const & src, U & dst, int channel = 0) const;
│ │ │ │ -
162
│ │ │ │ -
163
│ │ │ │ -
│ │ │ │ -
175 template <class T, class U> void Limit(T const & src, U & dstPos) const;
│ │ │ │ -
176
│ │ │ │ -
177 template <class T, class U, class U1, class U2>
│ │ │ │ -
│ │ │ │ -
178 void Limit(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const;
│ │ │ │ -
179
│ │ │ │ -
│ │ │ │ -
180 template <class T, class U> void LimitFaceVarying(T const & src, U & dst, int channel = 0) const;
│ │ │ │ -
181
│ │ │ │ -
183
│ │ │ │ -
184private:
│ │ │ │ -
185 typedef REAL Weight;
│ │ │ │ -
186
│ │ │ │ -
187 // Non-copyable:
│ │ │ │ -
188 PrimvarRefinerReal(PrimvarRefinerReal const & src) : _refiner(src._refiner) { }
│ │ │ │ -
189 PrimvarRefinerReal & operator=(PrimvarRefinerReal const &) { return *this; }
│ │ │ │ -
190
│ │ │ │ -
191 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromFaces(int, T const &, U &) const;
│ │ │ │ -
192 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromEdges(int, T const &, U &) const;
│ │ │ │ -
193 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromVerts(int, T const &, U &) const;
│ │ │ │ -
194
│ │ │ │ -
195 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromFaces(int, T const &, U &, int) const;
│ │ │ │ -
196 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromEdges(int, T const &, U &, int) const;
│ │ │ │ -
197 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromVerts(int, T const &, U &, int) const;
│ │ │ │ -
198
│ │ │ │ -
199 template <Sdc::SchemeType SCHEME, class T, class U, class U1, class U2>
│ │ │ │ -
200 void limit(T const & src, U & pos, U1 * tan1, U2 * tan2) const;
│ │ │ │ -
201
│ │ │ │ -
202 template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
203 void limitFVar(T const & src, U & dst, int channel) const;
│ │ │ │ -
204
│ │ │ │ -
205private:
│ │ │ │ -
206 TopologyRefiner const & _refiner;
│ │ │ │ -
207
│ │ │ │ -
208private:
│ │ │ │ -
209 //
│ │ │ │ -
210 // Local class to fulfill interface for <typename MASK> in the Scheme mask queries:
│ │ │ │ -
211 //
│ │ │ │ -
212 class Mask {
│ │ │ │ -
213 public:
│ │ │ │ -
214 typedef REAL Weight; // Also part of the expected interface
│ │ │ │ -
215
│ │ │ │ -
216 public:
│ │ │ │ -
217 Mask(Weight* v, Weight* e, Weight* f) :
│ │ │ │ -
218 _vertWeights(v), _edgeWeights(e), _faceWeights(f),
│ │ │ │ -
219 _vertCount(0), _edgeCount(0), _faceCount(0),
│ │ │ │ -
220 _faceWeightsForFaceCenters(false)
│ │ │ │ -
221 { }
│ │ │ │ -
222
│ │ │ │ -
223 ~Mask() { }
│ │ │ │ -
224
│ │ │ │ -
225 public: // Generic interface expected of <typename MASK>:
│ │ │ │ -
226 int GetNumVertexWeights() const { return _vertCount; }
│ │ │ │ -
227 int GetNumEdgeWeights() const { return _edgeCount; }
│ │ │ │ -
228 int GetNumFaceWeights() const { return _faceCount; }
│ │ │ │ -
229
│ │ │ │ -
230 void SetNumVertexWeights(int count) { _vertCount = count; }
│ │ │ │ -
231 void SetNumEdgeWeights( int count) { _edgeCount = count; }
│ │ │ │ -
232 void SetNumFaceWeights( int count) { _faceCount = count; }
│ │ │ │ -
233
│ │ │ │ -
234 Weight const& VertexWeight(int index) const { return _vertWeights[index]; }
│ │ │ │ -
235 Weight const& EdgeWeight( int index) const { return _edgeWeights[index]; }
│ │ │ │ -
236 Weight const& FaceWeight( int index) const { return _faceWeights[index]; }
│ │ │ │ -
237
│ │ │ │ -
238 Weight& VertexWeight(int index) { return _vertWeights[index]; }
│ │ │ │ -
239 Weight& EdgeWeight( int index) { return _edgeWeights[index]; }
│ │ │ │ -
240 Weight& FaceWeight( int index) { return _faceWeights[index]; }
│ │ │ │ -
241
│ │ │ │ -
242 bool AreFaceWeightsForFaceCenters() const { return _faceWeightsForFaceCenters; }
│ │ │ │ -
243 void SetFaceWeightsForFaceCenters(bool on) { _faceWeightsForFaceCenters = on; }
│ │ │ │ -
244
│ │ │ │ -
245 private:
│ │ │ │ -
246 Weight* _vertWeights;
│ │ │ │ -
247 Weight* _edgeWeights;
│ │ │ │ -
248 Weight* _faceWeights;
│ │ │ │ -
249
│ │ │ │ -
250 int _vertCount;
│ │ │ │ -
251 int _edgeCount;
│ │ │ │ -
252 int _faceCount;
│ │ │ │ -
253
│ │ │ │ -
254 bool _faceWeightsForFaceCenters;
│ │ │ │ -
255 };
│ │ │ │ -
256};
│ │ │ │ -
257
│ │ │ │ -
258
│ │ │ │ -
259//
│ │ │ │ -
260// Public entry points to the methods. Queries of the scheme type and its
│ │ │ │ -
261// use as a template parameter in subsequent implementation will be factored
│ │ │ │ -
262// out of a later release:
│ │ │ │ -
263//
│ │ │ │ -
264template <typename REAL>
│ │ │ │ -
265template <class T, class U>
│ │ │ │ -
266inline void
│ │ │ │ -
│ │ │ │ -
267PrimvarRefinerReal<REAL>::Interpolate(int level, T const & src, U & dst) const {
│ │ │ │ -
268
│ │ │ │ -
269 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ -
270
│ │ │ │ -
271 switch (_refiner._subdivType) {
│ │ │ │ - │ │ │ │ -
273 interpFromFaces<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ -
274 interpFromEdges<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ -
275 interpFromVerts<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ -
276 break;
│ │ │ │ -
277 case Sdc::SCHEME_LOOP:
│ │ │ │ -
278 interpFromFaces<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ -
279 interpFromEdges<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ -
280 interpFromVerts<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ -
281 break;
│ │ │ │ - │ │ │ │ -
283 interpFromFaces<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ -
284 interpFromEdges<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ -
285 interpFromVerts<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ -
286 break;
│ │ │ │ -
287 }
│ │ │ │ -
288}
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
290template <typename REAL>
│ │ │ │ -
291template <class T, class U>
│ │ │ │ -
292inline void
│ │ │ │ -
│ │ │ │ -
293PrimvarRefinerReal<REAL>::InterpolateFaceVarying(int level, T const & src, U & dst, int channel) const {
│ │ │ │ -
294
│ │ │ │ -
295 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ -
296
│ │ │ │ -
297 switch (_refiner._subdivType) {
│ │ │ │ - │ │ │ │ -
299 interpFVarFromFaces<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ -
300 interpFVarFromEdges<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ -
301 interpFVarFromVerts<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ -
302 break;
│ │ │ │ -
303 case Sdc::SCHEME_LOOP:
│ │ │ │ -
304 interpFVarFromFaces<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ -
305 interpFVarFromEdges<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ -
306 interpFVarFromVerts<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ -
307 break;
│ │ │ │ - │ │ │ │ -
309 interpFVarFromFaces<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ -
310 interpFVarFromEdges<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ -
311 interpFVarFromVerts<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ -
312 break;
│ │ │ │ -
313 }
│ │ │ │ -
314}
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316template <typename REAL>
│ │ │ │ -
317template <class T, class U>
│ │ │ │ -
318inline void
│ │ │ │ -
│ │ │ │ -
319PrimvarRefinerReal<REAL>::Limit(T const & src, U & dst) const {
│ │ │ │ -
320
│ │ │ │ -
321 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ - │ │ │ │ -
323 "Failure in PrimvarRefiner::Limit() -- "
│ │ │ │ -
324 "last level of refinement does not include full topology.");
│ │ │ │ -
325 return;
│ │ │ │ -
326 }
│ │ │ │ -
327
│ │ │ │ -
328 switch (_refiner._subdivType) {
│ │ │ │ - │ │ │ │ -
330 limit<Sdc::SCHEME_CATMARK>(src, dst, (U*)0, (U*)0);
│ │ │ │ -
331 break;
│ │ │ │ -
332 case Sdc::SCHEME_LOOP:
│ │ │ │ -
333 limit<Sdc::SCHEME_LOOP>(src, dst, (U*)0, (U*)0);
│ │ │ │ -
334 break;
│ │ │ │ - │ │ │ │ -
336 limit<Sdc::SCHEME_BILINEAR>(src, dst, (U*)0, (U*)0);
│ │ │ │ -
337 break;
│ │ │ │ -
338 }
│ │ │ │ -
339}
│ │ │ │ -
│ │ │ │ -
340
│ │ │ │ -
341template <typename REAL>
│ │ │ │ -
342template <class T, class U, class U1, class U2>
│ │ │ │ -
343inline void
│ │ │ │ -
│ │ │ │ -
344PrimvarRefinerReal<REAL>::Limit(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const {
│ │ │ │ -
345
│ │ │ │ -
346 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ - │ │ │ │ -
348 "Failure in PrimvarRefiner::Limit() -- "
│ │ │ │ -
349 "last level of refinement does not include full topology.");
│ │ │ │ -
350 return;
│ │ │ │ -
351 }
│ │ │ │ -
352
│ │ │ │ -
353 switch (_refiner._subdivType) {
│ │ │ │ - │ │ │ │ -
355 limit<Sdc::SCHEME_CATMARK>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ -
356 break;
│ │ │ │ -
357 case Sdc::SCHEME_LOOP:
│ │ │ │ -
358 limit<Sdc::SCHEME_LOOP>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ -
359 break;
│ │ │ │ - │ │ │ │ -
361 limit<Sdc::SCHEME_BILINEAR>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ -
362 break;
│ │ │ │ -
363 }
│ │ │ │ -
364}
│ │ │ │ -
│ │ │ │ -
365
│ │ │ │ -
366template <typename REAL>
│ │ │ │ -
367template <class T, class U>
│ │ │ │ -
368inline void
│ │ │ │ -
│ │ │ │ -
369PrimvarRefinerReal<REAL>::LimitFaceVarying(T const & src, U & dst, int channel) const {
│ │ │ │ -
370
│ │ │ │ -
371 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ - │ │ │ │ -
373 "Failure in PrimvarRefiner::LimitFaceVarying() -- "
│ │ │ │ -
374 "last level of refinement does not include full topology.");
│ │ │ │ -
375 return;
│ │ │ │ -
376 }
│ │ │ │ -
377
│ │ │ │ -
378 switch (_refiner._subdivType) {
│ │ │ │ - │ │ │ │ -
380 limitFVar<Sdc::SCHEME_CATMARK>(src, dst, channel);
│ │ │ │ -
381 break;
│ │ │ │ -
382 case Sdc::SCHEME_LOOP:
│ │ │ │ -
383 limitFVar<Sdc::SCHEME_LOOP>(src, dst, channel);
│ │ │ │ -
384 break;
│ │ │ │ - │ │ │ │ -
386 limitFVar<Sdc::SCHEME_BILINEAR>(src, dst, channel);
│ │ │ │ -
387 break;
│ │ │ │ -
388 }
│ │ │ │ -
389}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
390
│ │ │ │ -
391template <typename REAL>
│ │ │ │ -
392template <class T, class U>
│ │ │ │ -
393inline void
│ │ │ │ -
│ │ │ │ -
394PrimvarRefinerReal<REAL>::InterpolateFaceUniform(int level, T const & src, U & dst) const {
│ │ │ │ -
395
│ │ │ │ -
396 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ -
397
│ │ │ │ -
398 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
399 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ -
400
│ │ │ │ -
401 for (int cFace = 0; cFace < child.getNumFaces(); ++cFace) {
│ │ │ │ -
402
│ │ │ │ -
403 Vtr::Index pFace = refinement.getChildFaceParentFace(cFace);
│ │ │ │ -
404
│ │ │ │ -
405 dst[cFace] = src[pFace];
│ │ │ │ -
406 }
│ │ │ │ -
407}
│ │ │ │ -
│ │ │ │ -
408
│ │ │ │ -
409template <typename REAL>
│ │ │ │ -
410template <class T, class U>
│ │ │ │ -
411inline void
│ │ │ │ -
│ │ │ │ -
412PrimvarRefinerReal<REAL>::InterpolateVarying(int level, T const & src, U & dst) const {
│ │ │ │ -
413
│ │ │ │ -
414 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ -
415
│ │ │ │ -
416 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
417 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ -
418
│ │ │ │ -
419 //
│ │ │ │ -
420 // Group values to interpolate based on origin -- note that there may
│ │ │ │ -
421 // be none originating from faces:
│ │ │ │ -
422 //
│ │ │ │ -
423 if (refinement.getNumChildVerticesFromFaces() > 0) {
│ │ │ │ -
424
│ │ │ │ -
425 for (int face = 0; face < parent.getNumFaces(); ++face) {
│ │ │ │ -
426
│ │ │ │ -
427 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ -
428 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │ -
429
│ │ │ │ -
430 // Apply the weights to the parent face's vertices:
│ │ │ │ -
431 ConstIndexArray fVerts = parent.getFaceVertices(face);
│ │ │ │ -
432
│ │ │ │ -
433 Weight fVaryingWeight = 1.0f / (Weight) fVerts.size();
│ │ │ │ -
434
│ │ │ │ -
435 dst[cVert].Clear();
│ │ │ │ -
436 for (int i = 0; i < fVerts.size(); ++i) {
│ │ │ │ -
437 dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight);
│ │ │ │ -
438 }
│ │ │ │ -
439 }
│ │ │ │ -
440 }
│ │ │ │ -
441 }
│ │ │ │ -
442 for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
│ │ │ │ -
443
│ │ │ │ -
444 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ -
445 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │ -
446
│ │ │ │ -
447 // Apply the weights to the parent edges's vertices
│ │ │ │ -
448 ConstIndexArray eVerts = parent.getEdgeVertices(edge);
│ │ │ │ -
449
│ │ │ │ -
450 dst[cVert].Clear();
│ │ │ │ -
451 dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f);
│ │ │ │ -
452 dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f);
│ │ │ │ -
453 }
│ │ │ │ -
454 }
│ │ │ │ -
455 for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
│ │ │ │ -
456
│ │ │ │ -
457 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ -
458 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │ -
459
│ │ │ │ -
460 // Essentially copy the parent vertex:
│ │ │ │ -
461 dst[cVert].Clear();
│ │ │ │ -
462 dst[cVert].AddWithWeight(src[vert], 1.0f);
│ │ │ │ -
463 }
│ │ │ │ -
464 }
│ │ │ │ -
465}
│ │ │ │ -
│ │ │ │ -
466
│ │ │ │ -
467
│ │ │ │ -
468//
│ │ │ │ -
469// Internal implementation methods -- grouping vertices to be interpolated
│ │ │ │ -
470// based on the type of parent component from which they originated:
│ │ │ │ -
471//
│ │ │ │ -
472template <typename REAL>
│ │ │ │ -
473template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
474inline void
│ │ │ │ -
475PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const {
│ │ │ │ -
476
│ │ │ │ -
477 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
478 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ -
479
│ │ │ │ -
480 if (refinement.getNumChildVerticesFromFaces() == 0) return;
│ │ │ │ -
481
│ │ │ │ -
482 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
483
│ │ │ │ -
484 Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence());
│ │ │ │ -
485
│ │ │ │ -
486 for (int face = 0; face < parent.getNumFaces(); ++face) {
│ │ │ │ -
487
│ │ │ │ -
488 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ -
489 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
490 continue;
│ │ │ │ -
491
│ │ │ │ -
492 // Declare and compute mask weights for this vertex relative to its parent face:
│ │ │ │ -
493 ConstIndexArray fVerts = parent.getFaceVertices(face);
│ │ │ │ -
494
│ │ │ │ -
495 Mask fMask(fVertWeights, 0, 0);
│ │ │ │ -
496 Vtr::internal::FaceInterface fHood(fVerts.size());
│ │ │ │ -
497
│ │ │ │ -
498 scheme.ComputeFaceVertexMask(fHood, fMask);
│ │ │ │ -
499
│ │ │ │ -
500 // Apply the weights to the parent face's vertices:
│ │ │ │ -
501 dst[cVert].Clear();
│ │ │ │ -
502
│ │ │ │ -
503 for (int i = 0; i < fVerts.size(); ++i) {
│ │ │ │ -
504
│ │ │ │ -
505 dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]);
│ │ │ │ -
506 }
│ │ │ │ -
507 }
│ │ │ │ -
508}
│ │ │ │ -
509
│ │ │ │ -
510template <typename REAL>
│ │ │ │ -
511template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
512inline void
│ │ │ │ -
513PrimvarRefinerReal<REAL>::interpFromEdges(int level, T const & src, U & dst) const {
│ │ │ │ -
514
│ │ │ │ -
515 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
516 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ -
517 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ -
518
│ │ │ │ -
519 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
520
│ │ │ │ -
521 Vtr::internal::EdgeInterface eHood(parent);
│ │ │ │ -
522
│ │ │ │ -
523 Weight eVertWeights[2];
│ │ │ │ -
524 Vtr::internal::StackBuffer<Weight,8> eFaceWeights(parent.getMaxEdgeFaces());
│ │ │ │ -
525
│ │ │ │ -
526 for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
│ │ │ │ -
527
│ │ │ │ -
528 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ -
529 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
530 continue;
│ │ │ │ -
531
│ │ │ │ -
532 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ -
533 ConstIndexArray eVerts = parent.getEdgeVertices(edge),
│ │ │ │ -
534 eFaces = parent.getEdgeFaces(edge);
│ │ │ │ -
535
│ │ │ │ -
536 Mask eMask(eVertWeights, 0, eFaceWeights);
│ │ │ │ -
537
│ │ │ │ -
538 eHood.SetIndex(edge);
│ │ │ │ -
539
│ │ │ │ -
540 Sdc::Crease::Rule pRule = (parent.getEdgeSharpness(edge) > 0.0f) ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH;
│ │ │ │ -
541 Sdc::Crease::Rule cRule = child.getVertexRule(cVert);
│ │ │ │ -
542
│ │ │ │ -
543 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule);
│ │ │ │ -
544
│ │ │ │ -
545 // Apply the weights to the parent edges's vertices and (if applicable) to
│ │ │ │ -
546 // the child vertices of its incident faces:
│ │ │ │ -
547 dst[cVert].Clear();
│ │ │ │ -
548 dst[cVert].AddWithWeight(src[eVerts[0]], eVertWeights[0]);
│ │ │ │ -
549 dst[cVert].AddWithWeight(src[eVerts[1]], eVertWeights[1]);
│ │ │ │ -
550
│ │ │ │ -
551 if (eMask.GetNumFaceWeights() > 0) {
│ │ │ │ -
552
│ │ │ │ -
553 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ -
554
│ │ │ │ -
555 if (eMask.AreFaceWeightsForFaceCenters()) {
│ │ │ │ -
556 assert(refinement.getNumChildVerticesFromFaces() > 0);
│ │ │ │ -
557 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(eFaces[i]);
│ │ │ │ -
558
│ │ │ │ -
559 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ -
560 dst[cVert].AddWithWeight(dst[cVertOfFace], eFaceWeights[i]);
│ │ │ │ -
561 } else {
│ │ │ │ -
562 Vtr::Index pFace = eFaces[i];
│ │ │ │ -
563 ConstIndexArray pFaceEdges = parent.getFaceEdges(pFace),
│ │ │ │ -
564 pFaceVerts = parent.getFaceVertices(pFace);
│ │ │ │ -
565
│ │ │ │ -
566 int eInFace = 0;
│ │ │ │ -
567 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ;
│ │ │ │ -
568
│ │ │ │ -
569 int vInFace = eInFace + 2;
│ │ │ │ -
570 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts.size();
│ │ │ │ -
571
│ │ │ │ -
572 Vtr::Index pVertNext = pFaceVerts[vInFace];
│ │ │ │ -
573 dst[cVert].AddWithWeight(src[pVertNext], eFaceWeights[i]);
│ │ │ │ -
574 }
│ │ │ │ -
575 }
│ │ │ │ -
576 }
│ │ │ │ -
577 }
│ │ │ │ -
578}
│ │ │ │ -
579
│ │ │ │ -
580template <typename REAL>
│ │ │ │ -
581template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
582inline void
│ │ │ │ -
583PrimvarRefinerReal<REAL>::interpFromVerts(int level, T const & src, U & dst) const {
│ │ │ │ -
584
│ │ │ │ -
585 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
586 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ -
587 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ -
588
│ │ │ │ -
589 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
590
│ │ │ │ -
591 Vtr::internal::VertexInterface vHood(parent, child);
│ │ │ │ -
592
│ │ │ │ -
593 Vtr::internal::StackBuffer<Weight,32> weightBuffer(2*parent.getMaxValence());
│ │ │ │ -
594
│ │ │ │ -
595 for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
│ │ │ │ -
596
│ │ │ │ -
597 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ -
598 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
599 continue;
│ │ │ │ -
600
│ │ │ │ -
601 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ -
602 ConstIndexArray vEdges = parent.getVertexEdges(vert),
│ │ │ │ -
603 vFaces = parent.getVertexFaces(vert);
│ │ │ │ -
604
│ │ │ │ -
605 Weight vVertWeight,
│ │ │ │ -
606 * vEdgeWeights = weightBuffer,
│ │ │ │ -
607 * vFaceWeights = vEdgeWeights + vEdges.size();
│ │ │ │ -
608
│ │ │ │ -
609 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights);
│ │ │ │ -
610
│ │ │ │ -
611 vHood.SetIndex(vert, cVert);
│ │ │ │ -
612
│ │ │ │ -
613 Sdc::Crease::Rule pRule = parent.getVertexRule(vert);
│ │ │ │ -
614 Sdc::Crease::Rule cRule = child.getVertexRule(cVert);
│ │ │ │ -
615
│ │ │ │ -
616 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule);
│ │ │ │ -
617
│ │ │ │ -
618 // Apply the weights to the parent vertex, the vertices opposite its incident
│ │ │ │ -
619 // edges, and the child vertices of its incident faces:
│ │ │ │ -
620 //
│ │ │ │ -
621 // In order to improve numerical precision, it's better to apply smaller weights
│ │ │ │ -
622 // first, so begin with the face-weights followed by the edge-weights and the
│ │ │ │ -
623 // vertex weight last.
│ │ │ │ -
624 dst[cVert].Clear();
│ │ │ │ -
625
│ │ │ │ -
626 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ -
627 assert(vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ -
628
│ │ │ │ -
629 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ -
630
│ │ │ │ -
631 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(vFaces[i]);
│ │ │ │ -
632 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ -
633 dst[cVert].AddWithWeight(dst[cVertOfFace], vFaceWeights[i]);
│ │ │ │ -
634 }
│ │ │ │ -
635 }
│ │ │ │ -
636 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ -
637
│ │ │ │ -
638 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ -
639
│ │ │ │ -
640 ConstIndexArray eVerts = parent.getEdgeVertices(vEdges[i]);
│ │ │ │ -
641 Vtr::Index pVertOppositeEdge = (eVerts[0] == vert) ? eVerts[1] : eVerts[0];
│ │ │ │ -
642
│ │ │ │ -
643 dst[cVert].AddWithWeight(src[pVertOppositeEdge], vEdgeWeights[i]);
│ │ │ │ -
644 }
│ │ │ │ -
645 }
│ │ │ │ -
646 dst[cVert].AddWithWeight(src[vert], vVertWeight);
│ │ │ │ -
647 }
│ │ │ │ -
648}
│ │ │ │ -
649
│ │ │ │ -
650
│ │ │ │ -
651//
│ │ │ │ -
652// Internal face-varying implementation details:
│ │ │ │ -
653//
│ │ │ │ -
654template <typename REAL>
│ │ │ │ -
655template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
656inline void
│ │ │ │ -
657PrimvarRefinerReal<REAL>::interpFVarFromFaces(int level, T const & src, U & dst, int channel) const {
│ │ │ │ -
658
│ │ │ │ -
659 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
660
│ │ │ │ -
661 if (refinement.getNumChildVerticesFromFaces() == 0) return;
│ │ │ │ -
662
│ │ │ │ -
663 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
664
│ │ │ │ -
665 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ -
666 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │ -
667
│ │ │ │ -
668 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ -
669 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │ -
670
│ │ │ │ -
671 Vtr::internal::StackBuffer<Weight,16> fValueWeights(parentLevel.getMaxValence());
│ │ │ │ -
672
│ │ │ │ -
673 for (int face = 0; face < parentLevel.getNumFaces(); ++face) {
│ │ │ │ -
674
│ │ │ │ -
675 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ -
676 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
677 continue;
│ │ │ │ -
678
│ │ │ │ -
679 Vtr::Index cVertValue = childFVar.getVertexValueOffset(cVert);
│ │ │ │ -
680
│ │ │ │ -
681 // The only difference for face-varying here is that we get the values associated
│ │ │ │ -
682 // with each face-vertex directly from the FVarLevel, rather than using the parent
│ │ │ │ -
683 // face-vertices directly. If any face-vertex has any sibling values, then we may
│ │ │ │ -
684 // get the wrong one using the face-vertex index directly.
│ │ │ │ -
685
│ │ │ │ -
686 // Declare and compute mask weights for this vertex relative to its parent face:
│ │ │ │ -
687 ConstIndexArray fValues = parentFVar.getFaceValues(face);
│ │ │ │ -
688
│ │ │ │ -
689 Mask fMask(fValueWeights, 0, 0);
│ │ │ │ -
690 Vtr::internal::FaceInterface fHood(fValues.size());
│ │ │ │ -
691
│ │ │ │ -
692 scheme.ComputeFaceVertexMask(fHood, fMask);
│ │ │ │ -
693
│ │ │ │ -
694 // Apply the weights to the parent face's vertices:
│ │ │ │ -
695 dst[cVertValue].Clear();
│ │ │ │ -
696
│ │ │ │ -
697 for (int i = 0; i < fValues.size(); ++i) {
│ │ │ │ -
698 dst[cVertValue].AddWithWeight(src[fValues[i]], fValueWeights[i]);
│ │ │ │ -
699 }
│ │ │ │ -
700 }
│ │ │ │ -
701}
│ │ │ │ -
702
│ │ │ │ -
703template <typename REAL>
│ │ │ │ -
704template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
705inline void
│ │ │ │ -
706PrimvarRefinerReal<REAL>::interpFVarFromEdges(int level, T const & src, U & dst, int channel) const {
│ │ │ │ -
707
│ │ │ │ -
708 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
709
│ │ │ │ -
710 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
711
│ │ │ │ -
712 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ -
713 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │ -
714
│ │ │ │ -
715 Vtr::internal::FVarRefinement const & refineFVar = refinement.getFVarRefinement(channel);
│ │ │ │ -
716 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ -
717 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │ -
718
│ │ │ │ -
719 //
│ │ │ │ -
720 // Allocate and initialize (if linearly interpolated) interpolation weights for
│ │ │ │ -
721 // the edge mask:
│ │ │ │ -
722 //
│ │ │ │ -
723 Weight eVertWeights[2];
│ │ │ │ -
724 Vtr::internal::StackBuffer<Weight,8> eFaceWeights(parentLevel.getMaxEdgeFaces());
│ │ │ │ -
725
│ │ │ │ -
726 Mask eMask(eVertWeights, 0, eFaceWeights);
│ │ │ │ -
727
│ │ │ │ -
728 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == Sdc::SCHEME_BILINEAR);
│ │ │ │ -
729 if (isLinearFVar) {
│ │ │ │ -
730 eMask.SetNumVertexWeights(2);
│ │ │ │ -
731 eMask.SetNumEdgeWeights(0);
│ │ │ │ -
732 eMask.SetNumFaceWeights(0);
│ │ │ │ -
733
│ │ │ │ -
734 eVertWeights[0] = 0.5f;
│ │ │ │ -
735 eVertWeights[1] = 0.5f;
│ │ │ │ -
736 }
│ │ │ │ -
737
│ │ │ │ -
738 Vtr::internal::EdgeInterface eHood(parentLevel);
│ │ │ │ -
739
│ │ │ │ -
740 for (int edge = 0; edge < parentLevel.getNumEdges(); ++edge) {
│ │ │ │ -
741
│ │ │ │ -
742 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ -
743 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
744 continue;
│ │ │ │ -
745
│ │ │ │ -
746 ConstIndexArray cVertValues = childFVar.getVertexValues(cVert);
│ │ │ │ -
747
│ │ │ │ -
748 bool fvarEdgeVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues[0]);
│ │ │ │ -
749 if (fvarEdgeVertMatchesVertex) {
│ │ │ │ -
750 //
│ │ │ │ -
751 // If smoothly interpolated, compute new weights for the edge mask:
│ │ │ │ -
752 //
│ │ │ │ -
753 if (!isLinearFVar) {
│ │ │ │ -
754 eHood.SetIndex(edge);
│ │ │ │ -
755
│ │ │ │ -
756 Sdc::Crease::Rule pRule = (parentLevel.getEdgeSharpness(edge) > 0.0f)
│ │ │ │ -
757 ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH;
│ │ │ │ -
758 Sdc::Crease::Rule cRule = childLevel.getVertexRule(cVert);
│ │ │ │ -
759
│ │ │ │ -
760 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule);
│ │ │ │ -
761 }
│ │ │ │ -
762
│ │ │ │ -
763 // Apply the weights to the parent edge's vertices and (if applicable) to
│ │ │ │ -
764 // the child vertices of its incident faces:
│ │ │ │ -
765 //
│ │ │ │ -
766 // Even though the face-varying topology matches the vertex topology, we need
│ │ │ │ -
767 // to be careful here when getting values corresponding to the two end-vertices.
│ │ │ │ -
768 // While the edge may be continuous, the vertices at their ends may have
│ │ │ │ -
769 // discontinuities elsewhere in their neighborhood (i.e. on the "other side"
│ │ │ │ -
770 // of the end-vertex) and so have sibling values associated with them. In most
│ │ │ │ -
771 // cases the topology for an end-vertex will match and we can use it directly,
│ │ │ │ -
772 // but we must still check and retrieve as needed.
│ │ │ │ -
773 //
│ │ │ │ -
774 // Indices for values corresponding to face-vertices are guaranteed to match,
│ │ │ │ -
775 // so we can use the child-vertex indices directly.
│ │ │ │ -
776 //
│ │ │ │ -
777 // And by "directly", we always use getVertexValue(vertexIndex) to reference
│ │ │ │ -
778 // values in the "src" to account for the possible indirection that may exist at
│ │ │ │ -
779 // level 0 -- where there may be fewer values than vertices and an additional
│ │ │ │ -
780 // indirection is necessary. We can use a vertex index directly for "dst" when
│ │ │ │ -
781 // it matches.
│ │ │ │ -
782 //
│ │ │ │ -
783 Vtr::Index eVertValues[2];
│ │ │ │ -
784
│ │ │ │ -
785 parentFVar.getEdgeFaceValues(edge, 0, eVertValues);
│ │ │ │ -
786
│ │ │ │ -
787 Index cVertValue = cVertValues[0];
│ │ │ │ -
788
│ │ │ │ -
789 dst[cVertValue].Clear();
│ │ │ │ -
790 dst[cVertValue].AddWithWeight(src[eVertValues[0]], eVertWeights[0]);
│ │ │ │ -
791 dst[cVertValue].AddWithWeight(src[eVertValues[1]], eVertWeights[1]);
│ │ │ │ -
792
│ │ │ │ -
793 if (eMask.GetNumFaceWeights() > 0) {
│ │ │ │ -
794
│ │ │ │ -
795 ConstIndexArray eFaces = parentLevel.getEdgeFaces(edge);
│ │ │ │ -
796
│ │ │ │ -
797 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ -
798 if (eMask.AreFaceWeightsForFaceCenters()) {
│ │ │ │ -
799
│ │ │ │ -
800 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(eFaces[i]);
│ │ │ │ -
801 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ -
802
│ │ │ │ -
803 Vtr::Index cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace);
│ │ │ │ -
804 dst[cVertValue].AddWithWeight(dst[cValueOfFace], eFaceWeights[i]);
│ │ │ │ -
805 } else {
│ │ │ │ -
806 Vtr::Index pFace = eFaces[i];
│ │ │ │ -
807 ConstIndexArray pFaceEdges = parentLevel.getFaceEdges(pFace),
│ │ │ │ -
808 pFaceVerts = parentLevel.getFaceVertices(pFace);
│ │ │ │ -
809
│ │ │ │ -
810 int eInFace = 0;
│ │ │ │ -
811 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ;
│ │ │ │ -
812
│ │ │ │ -
813 // Edge "i" spans vertices [i,i+1] so we want i+2...
│ │ │ │ -
814 int vInFace = eInFace + 2;
│ │ │ │ -
815 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts.size();
│ │ │ │ -
816
│ │ │ │ -
817 Vtr::Index pValueNext = parentFVar.getFaceValues(pFace)[vInFace];
│ │ │ │ -
818 dst[cVertValue].AddWithWeight(src[pValueNext], eFaceWeights[i]);
│ │ │ │ -
819 }
│ │ │ │ -
820 }
│ │ │ │ -
821 }
│ │ │ │ -
822 } else {
│ │ │ │ -
823 //
│ │ │ │ -
824 // Mismatched edge-verts should just be linearly interpolated between the pairs of
│ │ │ │ -
825 // values for each sibling of the child edge-vertex -- the question is: which face
│ │ │ │ -
826 // holds that pair of values for a given sibling?
│ │ │ │ -
827 //
│ │ │ │ -
828 // In the manifold case, the sibling and edge-face indices will correspond. We
│ │ │ │ -
829 // will eventually need to update this to account for > 3 incident faces.
│ │ │ │ -
830 //
│ │ │ │ -
831 for (int i = 0; i < cVertValues.size(); ++i) {
│ │ │ │ -
832 Vtr::Index eVertValues[2];
│ │ │ │ -
833 int eFaceIndex = refineFVar.getChildValueParentSource(cVert, i);
│ │ │ │ -
834 assert(eFaceIndex == i);
│ │ │ │ -
835
│ │ │ │ -
836 parentFVar.getEdgeFaceValues(edge, eFaceIndex, eVertValues);
│ │ │ │ -
837
│ │ │ │ -
838 Index cVertValue = cVertValues[i];
│ │ │ │ -
839
│ │ │ │ -
840 dst[cVertValue].Clear();
│ │ │ │ -
841 dst[cVertValue].AddWithWeight(src[eVertValues[0]], 0.5);
│ │ │ │ -
842 dst[cVertValue].AddWithWeight(src[eVertValues[1]], 0.5);
│ │ │ │ -
843 }
│ │ │ │ -
844 }
│ │ │ │ -
845 }
│ │ │ │ -
846}
│ │ │ │ -
847
│ │ │ │ -
848template <typename REAL>
│ │ │ │ -
849template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
850inline void
│ │ │ │ -
851PrimvarRefinerReal<REAL>::interpFVarFromVerts(int level, T const & src, U & dst, int channel) const {
│ │ │ │ -
852
│ │ │ │ -
853 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ -
854
│ │ │ │ -
855 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
856
│ │ │ │ -
857 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ -
858 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │ -
859
│ │ │ │ -
860 Vtr::internal::FVarRefinement const & refineFVar = refinement.getFVarRefinement(channel);
│ │ │ │ -
861 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ -
862 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │ -
863
│ │ │ │ -
864 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == Sdc::SCHEME_BILINEAR);
│ │ │ │ -
865
│ │ │ │ -
866 Vtr::internal::StackBuffer<Weight,32> weightBuffer(2*parentLevel.getMaxValence());
│ │ │ │ -
867
│ │ │ │ -
868 Vtr::internal::StackBuffer<Vtr::Index,16> vEdgeValues(parentLevel.getMaxValence());
│ │ │ │ -
869
│ │ │ │ -
870 Vtr::internal::VertexInterface vHood(parentLevel, childLevel);
│ │ │ │ -
871
│ │ │ │ -
872 for (int vert = 0; vert < parentLevel.getNumVertices(); ++vert) {
│ │ │ │ -
873
│ │ │ │ -
874 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ -
875 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ -
876 continue;
│ │ │ │ -
877
│ │ │ │ -
878 ConstIndexArray pVertValues = parentFVar.getVertexValues(vert),
│ │ │ │ -
879 cVertValues = childFVar.getVertexValues(cVert);
│ │ │ │ -
880
│ │ │ │ -
881 bool fvarVertVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues[0]);
│ │ │ │ -
882 if (isLinearFVar && fvarVertVertMatchesVertex) {
│ │ │ │ -
883 dst[cVertValues[0]].Clear();
│ │ │ │ -
884 dst[cVertValues[0]].AddWithWeight(src[pVertValues[0]], 1.0f);
│ │ │ │ -
885 continue;
│ │ │ │ -
886 }
│ │ │ │ -
887
│ │ │ │ -
888 if (fvarVertVertMatchesVertex) {
│ │ │ │ -
889 //
│ │ │ │ -
890 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ -
891 //
│ │ │ │ -
892 // (We really need to encapsulate this somewhere else for use here and in the
│ │ │ │ -
893 // general case)
│ │ │ │ -
894 //
│ │ │ │ -
895 ConstIndexArray vEdges = parentLevel.getVertexEdges(vert);
│ │ │ │ -
896
│ │ │ │ -
897 Weight vVertWeight;
│ │ │ │ -
898 Weight * vEdgeWeights = weightBuffer;
│ │ │ │ -
899 Weight * vFaceWeights = vEdgeWeights + vEdges.size();
│ │ │ │ -
900
│ │ │ │ -
901 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights);
│ │ │ │ -
902
│ │ │ │ -
903 vHood.SetIndex(vert, cVert);
│ │ │ │ -
904
│ │ │ │ -
905 Sdc::Crease::Rule pRule = parentLevel.getVertexRule(vert);
│ │ │ │ -
906 Sdc::Crease::Rule cRule = childLevel.getVertexRule(cVert);
│ │ │ │ -
907
│ │ │ │ -
908 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule);
│ │ │ │ -
909
│ │ │ │ -
910 // Apply the weights to the parent vertex, the vertices opposite its incident
│ │ │ │ -
911 // edges, and the child vertices of its incident faces:
│ │ │ │ -
912 //
│ │ │ │ -
913 // Even though the face-varying topology matches the vertex topology, we need
│ │ │ │ -
914 // to be careful here when getting values corresponding to vertices at the
│ │ │ │ -
915 // ends of edges. While the edge may be continuous, the end vertex may have
│ │ │ │ -
916 // discontinuities elsewhere in their neighborhood (i.e. on the "other side"
│ │ │ │ -
917 // of the end-vertex) and so have sibling values associated with them. In most
│ │ │ │ -
918 // cases the topology for an end-vertex will match and we can use it directly,
│ │ │ │ -
919 // but we must still check and retrieve as needed.
│ │ │ │ -
920 //
│ │ │ │ -
921 // Indices for values corresponding to face-vertices are guaranteed to match,
│ │ │ │ -
922 // so we can use the child-vertex indices directly.
│ │ │ │ -
923 //
│ │ │ │ -
924 // And by "directly", we always use getVertexValue(vertexIndex) to reference
│ │ │ │ -
925 // values in the "src" to account for the possible indirection that may exist at
│ │ │ │ -
926 // level 0 -- where there may be fewer values than vertices and an additional
│ │ │ │ -
927 // indirection is necessary. We can use a vertex index directly for "dst" when
│ │ │ │ -
928 // it matches.
│ │ │ │ -
929 //
│ │ │ │ -
930 // As with applying the mask to vertex data, in order to improve numerical
│ │ │ │ -
931 // precision, it's better to apply smaller weights first, so begin with the
│ │ │ │ -
932 // face-weights followed by the edge-weights and the vertex weight last.
│ │ │ │ -
933 //
│ │ │ │ -
934 Vtr::Index pVertValue = pVertValues[0];
│ │ │ │ -
935 Vtr::Index cVertValue = cVertValues[0];
│ │ │ │ -
936
│ │ │ │ -
937 dst[cVertValue].Clear();
│ │ │ │ -
938 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ -
939 assert(vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ -
940
│ │ │ │ -
941 ConstIndexArray vFaces = parentLevel.getVertexFaces(vert);
│ │ │ │ -
942
│ │ │ │ -
943 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ -
944
│ │ │ │ -
945 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(vFaces[i]);
│ │ │ │ -
946 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ -
947
│ │ │ │ -
948 Vtr::Index cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace);
│ │ │ │ -
949 dst[cVertValue].AddWithWeight(dst[cValueOfFace], vFaceWeights[i]);
│ │ │ │ -
950 }
│ │ │ │ -
951 }
│ │ │ │ -
952 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ -
953
│ │ │ │ -
954 parentFVar.getVertexEdgeValues(vert, vEdgeValues);
│ │ │ │ -
955
│ │ │ │ -
956 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ -
957 dst[cVertValue].AddWithWeight(src[vEdgeValues[i]], vEdgeWeights[i]);
│ │ │ │ -
958 }
│ │ │ │ -
959 }
│ │ │ │ -
960 dst[cVertValue].AddWithWeight(src[pVertValue], vVertWeight);
│ │ │ │ -
961 } else {
│ │ │ │ -
962 //
│ │ │ │ -
963 // Each FVar value associated with a vertex will be either a corner or a crease,
│ │ │ │ -
964 // or potentially in transition from corner to crease:
│ │ │ │ -
965 // - if the CHILD is a corner, there can be no transition so we have a corner
│ │ │ │ -
966 // - otherwise if the PARENT is a crease, both will be creases (no transition)
│ │ │ │ -
967 // - otherwise the parent must be a corner and the child a crease (transition)
│ │ │ │ -
968 //
│ │ │ │ -
969 Vtr::internal::FVarLevel::ConstValueTagArray pValueTags = parentFVar.getVertexValueTags(vert);
│ │ │ │ -
970 Vtr::internal::FVarLevel::ConstValueTagArray cValueTags = childFVar.getVertexValueTags(cVert);
│ │ │ │ -
971
│ │ │ │ -
972 for (int cSiblingIndex = 0; cSiblingIndex < cVertValues.size(); ++cSiblingIndex) {
│ │ │ │ -
973 int pSiblingIndex = refineFVar.getChildValueParentSource(cVert, cSiblingIndex);
│ │ │ │ -
974 assert(pSiblingIndex == cSiblingIndex);
│ │ │ │ -
975
│ │ │ │ -
976 typedef Vtr::internal::FVarLevel::Sibling SiblingIntType;
│ │ │ │ -
977
│ │ │ │ -
978 SiblingIntType cSibling = (SiblingIntType) cSiblingIndex;
│ │ │ │ -
979 SiblingIntType pSibling = (SiblingIntType) pSiblingIndex;
│ │ │ │ -
980
│ │ │ │ -
981 Vtr::Index pVertValue = pVertValues[pSibling];
│ │ │ │ -
982 Vtr::Index cVertValue = cVertValues[cSibling];
│ │ │ │ -
983
│ │ │ │ -
984 dst[cVertValue].Clear();
│ │ │ │ -
985 if (isLinearFVar || cValueTags[cSibling].isCorner()) {
│ │ │ │ -
986 dst[cVertValue].AddWithWeight(src[pVertValue], 1.0f);
│ │ │ │ -
987 } else {
│ │ │ │ -
988 //
│ │ │ │ -
989 // We have either a crease or a transition from corner to crease -- in
│ │ │ │ -
990 // either case, we need the end values for the full/fractional crease:
│ │ │ │ -
991 //
│ │ │ │ -
992 Index pEndValues[2];
│ │ │ │ -
993 parentFVar.getVertexCreaseEndValues(vert, pSibling, pEndValues);
│ │ │ │ -
994
│ │ │ │ -
995 Weight vWeight = 0.75f;
│ │ │ │ -
996 Weight eWeight = 0.125f;
│ │ │ │ -
997
│ │ │ │ -
998 //
│ │ │ │ -
999 // If semi-sharp we need to apply fractional weighting -- if made sharp because
│ │ │ │ -
1000 // of the other sibling (dependent-sharp) use the fractional weight from that
│ │ │ │ -
1001 // other sibling (should only occur when there are 2):
│ │ │ │ -
1002 //
│ │ │ │ -
1003 if (pValueTags[pSibling].isSemiSharp()) {
│ │ │ │ -
1004 Weight wCorner = pValueTags[pSibling].isDepSharp()
│ │ │ │ -
1005 ? refineFVar.getFractionalWeight(vert, !pSibling, cVert, !cSibling)
│ │ │ │ -
1006 : refineFVar.getFractionalWeight(vert, pSibling, cVert, cSibling);
│ │ │ │ -
1007 Weight wCrease = 1.0f - wCorner;
│ │ │ │ -
1008
│ │ │ │ -
1009 vWeight = wCrease * 0.75f + wCorner;
│ │ │ │ -
1010 eWeight = wCrease * 0.125f;
│ │ │ │ -
1011 }
│ │ │ │ -
1012 dst[cVertValue].AddWithWeight(src[pEndValues[0]], eWeight);
│ │ │ │ -
1013 dst[cVertValue].AddWithWeight(src[pEndValues[1]], eWeight);
│ │ │ │ -
1014 dst[cVertValue].AddWithWeight(src[pVertValue], vWeight);
│ │ │ │ -
1015 }
│ │ │ │ -
1016 }
│ │ │ │ -
1017 }
│ │ │ │ -
1018 }
│ │ │ │ -
1019}
│ │ │ │ -
1020
│ │ │ │ -
1021template <typename REAL>
│ │ │ │ -
1022template <Sdc::SchemeType SCHEME, class T, class U, class U1, class U2>
│ │ │ │ -
1023inline void
│ │ │ │ -
1024PrimvarRefinerReal<REAL>::limit(T const & src, U & dstPos, U1 * dstTan1Ptr, U2 * dstTan2Ptr) const {
│ │ │ │ -
1025
│ │ │ │ -
1026 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
1027
│ │ │ │ -
1028 Vtr::internal::Level const & level = _refiner.getLevel(_refiner.GetMaxLevel());
│ │ │ │ -
1029
│ │ │ │ -
1030 int maxWeightsPerMask = 1 + 2 * level.getMaxValence();
│ │ │ │ -
1031 bool hasTangents = (dstTan1Ptr && dstTan2Ptr);
│ │ │ │ -
1032 int numMasks = 1 + (hasTangents ? 2 : 0);
│ │ │ │ -
1033
│ │ │ │ -
1034 Vtr::internal::StackBuffer<Index,33> indexBuffer(maxWeightsPerMask);
│ │ │ │ -
1035 Vtr::internal::StackBuffer<Weight,99> weightBuffer(numMasks * maxWeightsPerMask);
│ │ │ │ -
1036
│ │ │ │ -
1037 Weight * vPosWeights = weightBuffer,
│ │ │ │ -
1038 * ePosWeights = vPosWeights + 1,
│ │ │ │ -
1039 * fPosWeights = ePosWeights + level.getMaxValence();
│ │ │ │ -
1040 Weight * vTan1Weights = vPosWeights + maxWeightsPerMask,
│ │ │ │ -
1041 * eTan1Weights = ePosWeights + maxWeightsPerMask,
│ │ │ │ -
1042 * fTan1Weights = fPosWeights + maxWeightsPerMask;
│ │ │ │ -
1043 Weight * vTan2Weights = vTan1Weights + maxWeightsPerMask,
│ │ │ │ -
1044 * eTan2Weights = eTan1Weights + maxWeightsPerMask,
│ │ │ │ -
1045 * fTan2Weights = fTan1Weights + maxWeightsPerMask;
│ │ │ │ -
1046
│ │ │ │ -
1047 Mask posMask( vPosWeights, ePosWeights, fPosWeights);
│ │ │ │ -
1048 Mask tan1Mask(vTan1Weights, eTan1Weights, fTan1Weights);
│ │ │ │ -
1049 Mask tan2Mask(vTan2Weights, eTan2Weights, fTan2Weights);
│ │ │ │ -
1050
│ │ │ │ -
1051 // This is a bit obscure -- assigning both parent and child as last level -- but
│ │ │ │ -
1052 // this mask type was intended for another purpose. Consider one for the limit:
│ │ │ │ -
1053 Vtr::internal::VertexInterface vHood(level, level);
│ │ │ │ -
1054
│ │ │ │ -
1055 for (int vert = 0; vert < level.getNumVertices(); ++vert) {
│ │ │ │ -
1056 ConstIndexArray vEdges = level.getVertexEdges(vert);
│ │ │ │ -
1057
│ │ │ │ -
1058 // Incomplete vertices (present in sparse refinement) do not have their full
│ │ │ │ -
1059 // topological neighborhood to determine a proper limit -- just leave the
│ │ │ │ -
1060 // vertex at the refined location and continue to the next:
│ │ │ │ -
1061 if (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0)) {
│ │ │ │ -
1062 dstPos[vert].Clear();
│ │ │ │ -
1063 dstPos[vert].AddWithWeight(src[vert], 1.0);
│ │ │ │ -
1064 if (hasTangents) {
│ │ │ │ -
1065 (*dstTan1Ptr)[vert].Clear();
│ │ │ │ -
1066 (*dstTan2Ptr)[vert].Clear();
│ │ │ │ -
1067 }
│ │ │ │ -
1068 continue;
│ │ │ │ -
1069 }
│ │ │ │ -
1070
│ │ │ │ -
1071 //
│ │ │ │ -
1072 // Limit masks require the subdivision Rule for the vertex in order to deal
│ │ │ │ -
1073 // with infinitely sharp features correctly -- including boundaries and corners.
│ │ │ │ -
1074 // The vertex neighborhood is minimally defined with vertex and edge counts.
│ │ │ │ -
1075 //
│ │ │ │ -
1076 Sdc::Crease::Rule vRule = level.getVertexRule(vert);
│ │ │ │ -
1077
│ │ │ │ -
1078 // This is a bit obscure -- child vertex index will be ignored here
│ │ │ │ -
1079 vHood.SetIndex(vert, vert);
│ │ │ │ -
1080
│ │ │ │ -
1081 if (hasTangents) {
│ │ │ │ -
1082 scheme.ComputeVertexLimitMask(vHood, posMask, tan1Mask, tan2Mask, vRule);
│ │ │ │ -
1083 } else {
│ │ │ │ -
1084 scheme.ComputeVertexLimitMask(vHood, posMask, vRule);
│ │ │ │ -
1085 }
│ │ │ │ -
1086
│ │ │ │ -
1087 //
│ │ │ │ -
1088 // Gather the neighboring vertices of this vertex -- the vertices opposite its
│ │ │ │ -
1089 // incident edges, and the opposite vertices of its incident faces:
│ │ │ │ -
1090 //
│ │ │ │ -
1091 Index * eIndices = indexBuffer;
│ │ │ │ -
1092 Index * fIndices = indexBuffer + vEdges.size();
│ │ │ │ -
1093
│ │ │ │ -
1094 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ -
1095 ConstIndexArray eVerts = level.getEdgeVertices(vEdges[i]);
│ │ │ │ -
1096
│ │ │ │ -
1097 eIndices[i] = (eVerts[0] == vert) ? eVerts[1] : eVerts[0];
│ │ │ │ -
1098 }
│ │ │ │ -
1099 if (posMask.GetNumFaceWeights() || (hasTangents && tan1Mask.GetNumFaceWeights())) {
│ │ │ │ -
1100 ConstIndexArray vFaces = level.getVertexFaces(vert);
│ │ │ │ -
1101 ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vert);
│ │ │ │ -
1102
│ │ │ │ -
1103 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ -
1104 ConstIndexArray fVerts = level.getFaceVertices(vFaces[i]);
│ │ │ │ -
1105
│ │ │ │ -
1106 LocalIndex vOppInFace = (vInFace[i] + 2);
│ │ │ │ -
1107 if (vOppInFace >= fVerts.size()) vOppInFace -= (LocalIndex)fVerts.size();
│ │ │ │ -
1108
│ │ │ │ -
1109 fIndices[i] = level.getFaceVertices(vFaces[i])[vOppInFace];
│ │ │ │ -
1110 }
│ │ │ │ -
1111 }
│ │ │ │ -
1112
│ │ │ │ -
1113 //
│ │ │ │ -
1114 // Combine the weights and indices for position and tangents. As with applying
│ │ │ │ -
1115 // refinement masks to vertex data, in order to improve numerical precision, it's
│ │ │ │ -
1116 // better to apply smaller weights first, so begin with the face-weights followed
│ │ │ │ -
1117 // by the edge-weights and the vertex weight last.
│ │ │ │ -
1118 //
│ │ │ │ -
1119 dstPos[vert].Clear();
│ │ │ │ -
1120 for (int i = 0; i < posMask.GetNumFaceWeights(); ++i) {
│ │ │ │ -
1121 dstPos[vert].AddWithWeight(src[fIndices[i]], fPosWeights[i]);
│ │ │ │ -
1122 }
│ │ │ │ -
1123 for (int i = 0; i < posMask.GetNumEdgeWeights(); ++i) {
│ │ │ │ -
1124 dstPos[vert].AddWithWeight(src[eIndices[i]], ePosWeights[i]);
│ │ │ │ -
1125 }
│ │ │ │ -
1126 dstPos[vert].AddWithWeight(src[vert], vPosWeights[0]);
│ │ │ │ -
1127
│ │ │ │ -
1128 //
│ │ │ │ -
1129 // Apply the tangent masks -- both will have the same number of weights and
│ │ │ │ -
1130 // indices (one tangent may be "padded" to accommodate the other), but these
│ │ │ │ -
1131 // may differ from those of the position:
│ │ │ │ -
1132 //
│ │ │ │ -
1133 if (hasTangents) {
│ │ │ │ -
1134 assert(tan1Mask.GetNumFaceWeights() == tan2Mask.GetNumFaceWeights());
│ │ │ │ -
1135 assert(tan1Mask.GetNumEdgeWeights() == tan2Mask.GetNumEdgeWeights());
│ │ │ │ -
1136
│ │ │ │ -
1137 U1 & dstTan1 = *dstTan1Ptr;
│ │ │ │ -
1138 U2 & dstTan2 = *dstTan2Ptr;
│ │ │ │ -
1139
│ │ │ │ -
1140 dstTan1[vert].Clear();
│ │ │ │ -
1141 dstTan2[vert].Clear();
│ │ │ │ -
1142 for (int i = 0; i < tan1Mask.GetNumFaceWeights(); ++i) {
│ │ │ │ -
1143 dstTan1[vert].AddWithWeight(src[fIndices[i]], fTan1Weights[i]);
│ │ │ │ -
1144 dstTan2[vert].AddWithWeight(src[fIndices[i]], fTan2Weights[i]);
│ │ │ │ -
1145 }
│ │ │ │ -
1146 for (int i = 0; i < tan1Mask.GetNumEdgeWeights(); ++i) {
│ │ │ │ -
1147 dstTan1[vert].AddWithWeight(src[eIndices[i]], eTan1Weights[i]);
│ │ │ │ -
1148 dstTan2[vert].AddWithWeight(src[eIndices[i]], eTan2Weights[i]);
│ │ │ │ -
1149 }
│ │ │ │ -
1150 dstTan1[vert].AddWithWeight(src[vert], vTan1Weights[0]);
│ │ │ │ -
1151 dstTan2[vert].AddWithWeight(src[vert], vTan2Weights[0]);
│ │ │ │ -
1152 }
│ │ │ │ -
1153 }
│ │ │ │ -
1154}
│ │ │ │ -
1155
│ │ │ │ -
1156template <typename REAL>
│ │ │ │ -
1157template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ -
1158inline void
│ │ │ │ -
1159PrimvarRefinerReal<REAL>::limitFVar(T const & src, U & dst, int channel) const {
│ │ │ │ -
1160
│ │ │ │ -
1161 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ -
1162
│ │ │ │ -
1163 Vtr::internal::Level const & level = _refiner.getLevel(_refiner.GetMaxLevel());
│ │ │ │ -
1164 Vtr::internal::FVarLevel const & fvarChannel = level.getFVarLevel(channel);
│ │ │ │ -
1165
│ │ │ │ -
1166 int maxWeightsPerMask = 1 + 2 * level.getMaxValence();
│ │ │ │ -
1167
│ │ │ │ -
1168 Vtr::internal::StackBuffer<Weight,33> weightBuffer(maxWeightsPerMask);
│ │ │ │ -
1169 Vtr::internal::StackBuffer<Index,16> vEdgeBuffer(level.getMaxValence());
│ │ │ │ -
1170
│ │ │ │ -
1171 // This is a bit obscure -- assign both parent and child as last level
│ │ │ │ -
1172 Vtr::internal::VertexInterface vHood(level, level);
│ │ │ │ -
1173
│ │ │ │ -
1174 for (int vert = 0; vert < level.getNumVertices(); ++vert) {
│ │ │ │ -
1175
│ │ │ │ -
1176 ConstIndexArray vEdges = level.getVertexEdges(vert);
│ │ │ │ -
1177 ConstIndexArray vValues = fvarChannel.getVertexValues(vert);
│ │ │ │ -
1178
│ │ │ │ -
1179 // Incomplete vertices (present in sparse refinement) do not have their full
│ │ │ │ -
1180 // topological neighborhood to determine a proper limit -- just leave the
│ │ │ │ -
1181 // values (perhaps more than one per vertex) at the refined location.
│ │ │ │ -
1182 //
│ │ │ │ -
1183 // The same can be done if the face-varying channel is purely linear.
│ │ │ │ -
1184 //
│ │ │ │ -
1185 bool isIncomplete = (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0));
│ │ │ │ -
1186 if (isIncomplete || fvarChannel.isLinear()) {
│ │ │ │ -
1187 for (int i = 0; i < vValues.size(); ++i) {
│ │ │ │ -
1188 Vtr::Index vValue = vValues[i];
│ │ │ │ -
1189
│ │ │ │ -
1190 dst[vValue].Clear();
│ │ │ │ -
1191 dst[vValue].AddWithWeight(src[vValue], 1.0f);
│ │ │ │ -
1192 }
│ │ │ │ -
1193 continue;
│ │ │ │ -
1194 }
│ │ │ │ -
1195
│ │ │ │ -
1196 bool fvarVertMatchesVertex = fvarChannel.valueTopologyMatches(vValues[0]);
│ │ │ │ -
1197 if (fvarVertMatchesVertex) {
│ │ │ │ -
1198
│ │ │ │ -
1199 // Assign the mask weights to the common buffer and compute the mask:
│ │ │ │ -
1200 //
│ │ │ │ -
1201 Weight * vWeights = weightBuffer,
│ │ │ │ -
1202 * eWeights = vWeights + 1,
│ │ │ │ -
1203 * fWeights = eWeights + vEdges.size();
│ │ │ │ -
1204
│ │ │ │ -
1205 Mask vMask(vWeights, eWeights, fWeights);
│ │ │ │ -
1206
│ │ │ │ -
1207 vHood.SetIndex(vert, vert);
│ │ │ │ -
1208
│ │ │ │ -
1209 scheme.ComputeVertexLimitMask(vHood, vMask, level.getVertexRule(vert));
│ │ │ │ -
1210
│ │ │ │ -
1211 //
│ │ │ │ -
1212 // Apply mask to corresponding FVar values for neighboring vertices:
│ │ │ │ -
1213 //
│ │ │ │ -
1214 Vtr::Index vValue = vValues[0];
│ │ │ │ -
1215
│ │ │ │ -
1216 dst[vValue].Clear();
│ │ │ │ -
1217 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ -
1218 assert(!vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ -
1219
│ │ │ │ -
1220 ConstIndexArray vFaces = level.getVertexFaces(vert);
│ │ │ │ -
1221 ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vert);
│ │ │ │ -
1222
│ │ │ │ -
1223 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ -
1224 ConstIndexArray faceValues = fvarChannel.getFaceValues(vFaces[i]);
│ │ │ │ -
1225 LocalIndex vOppInFace = vInFace[i] + 2;
│ │ │ │ -
1226 if (vOppInFace >= faceValues.size()) vOppInFace -= faceValues.size();
│ │ │ │ -
1227
│ │ │ │ -
1228 Index vValueOppositeFace = faceValues[vOppInFace];
│ │ │ │ -
1229
│ │ │ │ -
1230 dst[vValue].AddWithWeight(src[vValueOppositeFace], fWeights[i]);
│ │ │ │ -
1231 }
│ │ │ │ -
1232 }
│ │ │ │ -
1233 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ -
1234 Index * vEdgeValues = vEdgeBuffer;
│ │ │ │ -
1235 fvarChannel.getVertexEdgeValues(vert, vEdgeValues);
│ │ │ │ -
1236
│ │ │ │ -
1237 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ -
1238 dst[vValue].AddWithWeight(src[vEdgeValues[i]], eWeights[i]);
│ │ │ │ -
1239 }
│ │ │ │ -
1240 }
│ │ │ │ -
1241 dst[vValue].AddWithWeight(src[vValue], vWeights[0]);
│ │ │ │ -
1242 } else {
│ │ │ │ -
1243 //
│ │ │ │ -
1244 // Sibling FVar values associated with a vertex will be either a corner or a crease:
│ │ │ │ -
1245 //
│ │ │ │ -
1246 for (int i = 0; i < vValues.size(); ++i) {
│ │ │ │ -
1247 Vtr::Index vValue = vValues[i];
│ │ │ │ -
1248
│ │ │ │ -
1249 dst[vValue].Clear();
│ │ │ │ -
1250 if (fvarChannel.getValueTag(vValue).isCorner()) {
│ │ │ │ -
1251 dst[vValue].AddWithWeight(src[vValue], 1.0f);
│ │ │ │ -
1252 } else {
│ │ │ │ -
1253 Index vEndValues[2];
│ │ │ │ -
1254 fvarChannel.getVertexCreaseEndValues(vert, i, vEndValues);
│ │ │ │ -
1255
│ │ │ │ -
1256 dst[vValue].AddWithWeight(src[vEndValues[0]], 1.0f/6.0f);
│ │ │ │ -
1257 dst[vValue].AddWithWeight(src[vEndValues[1]], 1.0f/6.0f);
│ │ │ │ -
1258 dst[vValue].AddWithWeight(src[vValue], 2.0f/3.0f);
│ │ │ │ -
1259 }
│ │ │ │ -
1260 }
│ │ │ │ -
1261 }
│ │ │ │ -
1262 }
│ │ │ │ -
1263}
│ │ │ │ -
1264
│ │ │ │ -
│ │ │ │ -
1265class PrimvarRefiner : public PrimvarRefinerReal<float> {
│ │ │ │ -
1266public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1268 : PrimvarRefinerReal<float>(refiner) { }
│ │ │ │ -
│ │ │ │ -
1269};
│ │ │ │ -
│ │ │ │ -
1270
│ │ │ │ -
1271} // end namespace Far
│ │ │ │ -
1272
│ │ │ │ -
1273} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
1274using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
1275} // end namespace OpenSubdiv
│ │ │ │ -
1276
│ │ │ │ -
1277#endif /* OPENSUBDIV3_FAR_PRIMVAR_REFINER_H */
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
void Error(ErrorType err, const char *format,...)
Sends an OSD error with a message (internal use only)
│ │ │ │ -
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │ -
Vtr::ConstLocalIndexArray ConstLocalIndexArray
Definition types.h:48
│ │ │ │ -
@ FAR_RUNTIME_ERROR
Issue a generic runtime error, but continue execution.
Definition error.h:40
│ │ │ │ +
60
│ │ │ │ +
63 int GetNumFaces() const;
│ │ │ │ +
64
│ │ │ │ +
67 int GetFaceId(Index f) const;
│ │ │ │ +
68
│ │ │ │ + │ │ │ │ +
84 TopologyRefiner const &refiner,
│ │ │ │ +
85 int face, int quadrant,
│ │ │ │ +
86 int adjFaces[4], int adjEdges[4]) const;
│ │ │ │ +
87
│ │ │ │ +
89
│ │ │ │ +
90private:
│ │ │ │ +
91
│ │ │ │ +
92 void initializePtexIndices(TopologyRefiner const &refiner);
│ │ │ │ +
93
│ │ │ │ +
94private:
│ │ │ │ +
95
│ │ │ │ +
96 std::vector<Index> _ptexIndices;
│ │ │ │ +
97};
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
99
│ │ │ │ +
100} // end namespace Far
│ │ │ │ +
101
│ │ │ │ +
102} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
103using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
104} // end namespace OpenSubdiv
│ │ │ │ +
105
│ │ │ │ +
106#endif /* OPENSUBDIV3_FAR_PTEX_INDICES_H */
│ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -
bool IndexIsValid(Index index)
Definition types.h:58
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Applies refinement operations to generic primvar data.
│ │ │ │ -
void Limit(T const &src, U &dstPos) const
Apply limit weights to a primvar buffer.
│ │ │ │ - │ │ │ │ -
void Limit(T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const
│ │ │ │ -
void InterpolateFaceUniform(int level, T const &src, U &dst) const
Refine uniform (per-face) primvar data between levels.
│ │ │ │ - │ │ │ │ -
void InterpolateVarying(int level, T const &src, U &dst) const
Apply only varying interpolation weights to a primvar buffer for a single level of refinement.
│ │ │ │ -
void Interpolate(int level, T const &src, U &dst) const
Apply vertex interpolation weights to a primvar buffer for a single level of refinement.
│ │ │ │ -
void InterpolateFaceVarying(int level, T const &src, U &dst, int channel=0) const
Apply face-varying interpolation weights to a primvar buffer associated with a particular face-varyin...
│ │ │ │ - │ │ │ │ -
void LimitFaceVarying(T const &src, U &dst, int channel=0) const
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Object used to compute and query ptex face indices.
Definition ptexIndices.h:46
│ │ │ │ +
int GetFaceId(Index f) const
Returns the ptex face index given a coarse face 'f' or -1.
│ │ │ │ +
PtexIndices(TopologyRefiner const &refiner)
Constructor.
│ │ │ │ +
void GetAdjacency(TopologyRefiner const &refiner, int face, int quadrant, int adjFaces[4], int adjEdges[4]) const
Returns ptex face adjacency information for a given coarse face.
│ │ │ │ +
int GetNumFaces() const
Returns the number of ptex faces in the mesh.
│ │ │ │ + │ │ │ │
Stores topology data for a specified set of refinement options.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Scheme is a class template which provides all implementation for the subdivision schemes supported by...
Definition scheme.h:66
│ │ │ │ - │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -primvarRefiner.h │ │ │ │ │ +ptexIndices.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 DreamWorks Animation LLC. │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,1388 +23,90 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_PTEX_INDICES_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_PTEX_INDICES_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../sdc/types.h" │ │ │ │ │ -30#include "../sdc/options.h" │ │ │ │ │ -31#include "../sdc/bilinearScheme.h" │ │ │ │ │ -32#include "../sdc/catmarkScheme.h" │ │ │ │ │ -33#include "../sdc/loopScheme.h" │ │ │ │ │ -34#include "../vtr/level.h" │ │ │ │ │ -35#include "../vtr/fvarLevel.h" │ │ │ │ │ -36#include "../vtr/refinement.h" │ │ │ │ │ -37#include "../vtr/fvarRefinement.h" │ │ │ │ │ -38#include "../vtr/stackBuffer.h" │ │ │ │ │ -39#include "../vtr/componentInterfaces.h" │ │ │ │ │ -40#include "../far/types.h" │ │ │ │ │ -41#include "../far/error.h" │ │ │ │ │ -42#include "../far/topologyLevel.h" │ │ │ │ │ -43#include "../far/topologyRefiner.h" │ │ │ │ │ -44 │ │ │ │ │ -45#include │ │ │ │ │ -46 │ │ │ │ │ -47namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -48namespace OPENSUBDIV_VERSION { │ │ │ │ │ +29#include "../far/topologyRefiner.h" │ │ │ │ │ +30#include "../far/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Far { │ │ │ │ │ +38 │ │ │ │ │ +_4_6class _P_t_e_x_I_n_d_i_c_e_s { │ │ │ │ │ +47 │ │ │ │ │ +48public: │ │ │ │ │ 49 │ │ │ │ │ -50namespace Far { │ │ │ │ │ -51 │ │ │ │ │ -55template │ │ │ │ │ -_5_6class _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l { │ │ │ │ │ +_5_1 _P_t_e_x_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner); │ │ │ │ │ +52 │ │ │ │ │ +_5_4 _~_P_t_e_x_I_n_d_i_c_e_s(); │ │ │ │ │ +55 │ │ │ │ │ 57 │ │ │ │ │ -58public: │ │ │ │ │ -_5_9 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner) : _refiner(refiner) { } │ │ │ │ │ -_6_0 _~_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l() { } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() const { return _refiner; } │ │ │ │ │ -63 │ │ │ │ │ -65 │ │ │ │ │ -100 │ │ │ │ │ -_1_1_3 template void _I_n_t_e_r_p_o_l_a_t_e(int level, T const & src, U & │ │ │ │ │ -dst) const; │ │ │ │ │ -114 │ │ │ │ │ -_1_3_0 template void _I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g(int level, T const & │ │ │ │ │ -src, U & dst) const; │ │ │ │ │ -131 │ │ │ │ │ -_1_4_8 template void _I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m(int level, T const │ │ │ │ │ -& src, U & dst) const; │ │ │ │ │ -149 │ │ │ │ │ -_1_6_1 template void _I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g(int level, T const │ │ │ │ │ -& src, U & dst, int channel = 0) const; │ │ │ │ │ -162 │ │ │ │ │ -163 │ │ │ │ │ -_1_7_5 template void _L_i_m_i_t(T const & src, U & dstPos) const; │ │ │ │ │ -176 │ │ │ │ │ -177 template │ │ │ │ │ -_1_7_8 void _L_i_m_i_t(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const; │ │ │ │ │ -179 │ │ │ │ │ -_1_8_0 template void _L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g(T const & src, U & dst, │ │ │ │ │ -int channel = 0) const; │ │ │ │ │ -181 │ │ │ │ │ -183 │ │ │ │ │ -184private: │ │ │ │ │ -185 typedef REAL Weight; │ │ │ │ │ -186 │ │ │ │ │ -187 // Non-copyable: │ │ │ │ │ -188 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l const & src) : _refiner(src._refiner) │ │ │ │ │ -{ } │ │ │ │ │ -189 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l & operator=(_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l const &) { return *this; │ │ │ │ │ -} │ │ │ │ │ -190 │ │ │ │ │ -191 template void interpFromFaces │ │ │ │ │ -(int, T const &, U &) const; │ │ │ │ │ -192 template void interpFromEdges │ │ │ │ │ -(int, T const &, U &) const; │ │ │ │ │ -193 template void interpFromVerts │ │ │ │ │ -(int, T const &, U &) const; │ │ │ │ │ -194 │ │ │ │ │ -195 template void │ │ │ │ │ -interpFVarFromFaces(int, T const &, U &, int) const; │ │ │ │ │ -196 template void │ │ │ │ │ -interpFVarFromEdges(int, T const &, U &, int) const; │ │ │ │ │ -197 template void │ │ │ │ │ -interpFVarFromVerts(int, T const &, U &, int) const; │ │ │ │ │ -198 │ │ │ │ │ -199 template │ │ │ │ │ -200 void limit(T const & src, U & pos, U1 * tan1, U2 * tan2) const; │ │ │ │ │ -201 │ │ │ │ │ -202 template │ │ │ │ │ -203 void limitFVar(T const & src, U & dst, int channel) const; │ │ │ │ │ -204 │ │ │ │ │ -205private: │ │ │ │ │ -206 TopologyRefiner const & _refiner; │ │ │ │ │ -207 │ │ │ │ │ -208private: │ │ │ │ │ -209 // │ │ │ │ │ -210 // Local class to fulfill interface for in the Scheme mask │ │ │ │ │ -queries: │ │ │ │ │ -211 // │ │ │ │ │ -212 class Mask { │ │ │ │ │ -213 public: │ │ │ │ │ -214 typedef REAL Weight; // Also part of the expected interface │ │ │ │ │ -215 │ │ │ │ │ -216 public: │ │ │ │ │ -217 Mask(Weight* v, Weight* e, Weight* f) : │ │ │ │ │ -218 _vertWeights(v), _edgeWeights(e), _faceWeights(f), │ │ │ │ │ -219 _vertCount(0), _edgeCount(0), _faceCount(0), │ │ │ │ │ -220 _faceWeightsForFaceCenters(false) │ │ │ │ │ -221 { } │ │ │ │ │ -222 │ │ │ │ │ -223 ~Mask() { } │ │ │ │ │ -224 │ │ │ │ │ -225 public: // Generic interface expected of : │ │ │ │ │ -226 int GetNumVertexWeights() const { return _vertCount; } │ │ │ │ │ -227 int GetNumEdgeWeights() const { return _edgeCount; } │ │ │ │ │ -228 int GetNumFaceWeights() const { return _faceCount; } │ │ │ │ │ -229 │ │ │ │ │ -230 void SetNumVertexWeights(int count) { _vertCount = count; } │ │ │ │ │ -231 void SetNumEdgeWeights( int count) { _edgeCount = count; } │ │ │ │ │ -232 void SetNumFaceWeights( int count) { _faceCount = count; } │ │ │ │ │ -233 │ │ │ │ │ -234 Weight const& VertexWeight(int index) const { return _vertWeights[index]; } │ │ │ │ │ -235 Weight const& EdgeWeight( int index) const { return _edgeWeights[index]; } │ │ │ │ │ -236 Weight const& FaceWeight( int index) const { return _faceWeights[index]; } │ │ │ │ │ -237 │ │ │ │ │ -238 Weight& VertexWeight(int index) { return _vertWeights[index]; } │ │ │ │ │ -239 Weight& EdgeWeight( int index) { return _edgeWeights[index]; } │ │ │ │ │ -240 Weight& FaceWeight( int index) { return _faceWeights[index]; } │ │ │ │ │ -241 │ │ │ │ │ -242 bool AreFaceWeightsForFaceCenters() const { return │ │ │ │ │ -_faceWeightsForFaceCenters; } │ │ │ │ │ -243 void SetFaceWeightsForFaceCenters(bool on) { _faceWeightsForFaceCenters = │ │ │ │ │ -on; } │ │ │ │ │ -244 │ │ │ │ │ -245 private: │ │ │ │ │ -246 Weight* _vertWeights; │ │ │ │ │ -247 Weight* _edgeWeights; │ │ │ │ │ -248 Weight* _faceWeights; │ │ │ │ │ -249 │ │ │ │ │ -250 int _vertCount; │ │ │ │ │ -251 int _edgeCount; │ │ │ │ │ -252 int _faceCount; │ │ │ │ │ -253 │ │ │ │ │ -254 bool _faceWeightsForFaceCenters; │ │ │ │ │ -255 }; │ │ │ │ │ -256}; │ │ │ │ │ -257 │ │ │ │ │ -258 │ │ │ │ │ -259// │ │ │ │ │ -260// Public entry points to the methods. Queries of the scheme type and its │ │ │ │ │ -261// use as a template parameter in subsequent implementation will be factored │ │ │ │ │ -262// out of a later release: │ │ │ │ │ -263// │ │ │ │ │ -264template │ │ │ │ │ -265template │ │ │ │ │ -266inline void │ │ │ │ │ -_2_6_7_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e(int level, T const & src, U & dst) │ │ │ │ │ -const { │ │ │ │ │ -268 │ │ │ │ │ -269 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ -270 │ │ │ │ │ -271 switch (_refiner._subdivType) { │ │ │ │ │ -272 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ -273 interpFromFaces(level, src, dst); │ │ │ │ │ -274 interpFromEdges(level, src, dst); │ │ │ │ │ -275 interpFromVerts(level, src, dst); │ │ │ │ │ -276 break; │ │ │ │ │ -277 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ -278 interpFromFaces(level, src, dst); │ │ │ │ │ -279 interpFromEdges(level, src, dst); │ │ │ │ │ -280 interpFromVerts(level, src, dst); │ │ │ │ │ -281 break; │ │ │ │ │ -282 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ -283 interpFromFaces(level, src, dst); │ │ │ │ │ -284 interpFromEdges(level, src, dst); │ │ │ │ │ -285 interpFromVerts(level, src, dst); │ │ │ │ │ -286 break; │ │ │ │ │ -287 } │ │ │ │ │ -288} │ │ │ │ │ -289 │ │ │ │ │ -290template │ │ │ │ │ -291template │ │ │ │ │ -292inline void │ │ │ │ │ -_2_9_3_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g(int level, T const & src, U │ │ │ │ │ -& dst, int channel) const { │ │ │ │ │ -294 │ │ │ │ │ -295 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ -296 │ │ │ │ │ -297 switch (_refiner._subdivType) { │ │ │ │ │ -298 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ -299 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ -300 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ -301 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ -302 break; │ │ │ │ │ -303 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ -304 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ -305 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ -306 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ -307 break; │ │ │ │ │ -308 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ -309 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ -310 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ -311 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ -312 break; │ │ │ │ │ -313 } │ │ │ │ │ -314} │ │ │ │ │ -315 │ │ │ │ │ -316template │ │ │ │ │ -317template │ │ │ │ │ -318inline void │ │ │ │ │ -_3_1_9_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t(T const & src, U & dst) const { │ │ │ │ │ -320 │ │ │ │ │ -321 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ -0) { │ │ │ │ │ -322 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ -323 "Failure in PrimvarRefiner::Limit() -- " │ │ │ │ │ -324 "last level of refinement does not include full topology."); │ │ │ │ │ -325 return; │ │ │ │ │ -326 } │ │ │ │ │ -327 │ │ │ │ │ -328 switch (_refiner._subdivType) { │ │ │ │ │ -329 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ -330 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ -331 break; │ │ │ │ │ -332 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ -333 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ -334 break; │ │ │ │ │ -335 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ -336 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ -337 break; │ │ │ │ │ -338 } │ │ │ │ │ -339} │ │ │ │ │ -340 │ │ │ │ │ -341template │ │ │ │ │ -342template │ │ │ │ │ -343inline void │ │ │ │ │ -_3_4_4_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t(T const & src, U & dstPos, U1 & dstTan1, U2 │ │ │ │ │ -& dstTan2) const { │ │ │ │ │ -345 │ │ │ │ │ -346 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ -0) { │ │ │ │ │ -347 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ -348 "Failure in PrimvarRefiner::Limit() -- " │ │ │ │ │ -349 "last level of refinement does not include full topology."); │ │ │ │ │ -350 return; │ │ │ │ │ -351 } │ │ │ │ │ -352 │ │ │ │ │ -353 switch (_refiner._subdivType) { │ │ │ │ │ -354 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ -355 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ -356 break; │ │ │ │ │ -357 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ -358 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ -359 break; │ │ │ │ │ -360 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ -361 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ -362 break; │ │ │ │ │ -363 } │ │ │ │ │ -364} │ │ │ │ │ -365 │ │ │ │ │ -366template │ │ │ │ │ -367template │ │ │ │ │ -368inline void │ │ │ │ │ -_3_6_9_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g(T const & src, U & dst, int │ │ │ │ │ -channel) const { │ │ │ │ │ -370 │ │ │ │ │ -371 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ -0) { │ │ │ │ │ -372 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ -373 "Failure in PrimvarRefiner::LimitFaceVarying() -- " │ │ │ │ │ -374 "last level of refinement does not include full topology."); │ │ │ │ │ -375 return; │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -378 switch (_refiner._subdivType) { │ │ │ │ │ -379 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ -380 limitFVar(src, dst, channel); │ │ │ │ │ -381 break; │ │ │ │ │ -382 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ -383 limitFVar(src, dst, channel); │ │ │ │ │ -384 break; │ │ │ │ │ -385 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ -386 limitFVar(src, dst, channel); │ │ │ │ │ -387 break; │ │ │ │ │ -388 } │ │ │ │ │ -389} │ │ │ │ │ -390 │ │ │ │ │ -391template │ │ │ │ │ -392template │ │ │ │ │ -393inline void │ │ │ │ │ -_3_9_4_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m(int level, T const & src, U │ │ │ │ │ -& dst) const { │ │ │ │ │ -395 │ │ │ │ │ -396 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ -397 │ │ │ │ │ -398 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -399 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ -400 │ │ │ │ │ -401 for (int cFace = 0; cFace < child.getNumFaces(); ++cFace) { │ │ │ │ │ -402 │ │ │ │ │ -403 _V_t_r_:_:_I_n_d_e_x pFace = refinement.getChildFaceParentFace(cFace); │ │ │ │ │ -404 │ │ │ │ │ -405 dst[cFace] = src[pFace]; │ │ │ │ │ -406 } │ │ │ │ │ -407} │ │ │ │ │ -408 │ │ │ │ │ -409template │ │ │ │ │ -410template │ │ │ │ │ -411inline void │ │ │ │ │ -_4_1_2_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g(int level, T const & src, U & │ │ │ │ │ -dst) const { │ │ │ │ │ -413 │ │ │ │ │ -414 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ -415 │ │ │ │ │ -416 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -417 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ -418 │ │ │ │ │ -419 // │ │ │ │ │ -420 // Group values to interpolate based on origin -- note that there may │ │ │ │ │ -421 // be none originating from faces: │ │ │ │ │ -422 // │ │ │ │ │ -423 if (refinement.getNumChildVerticesFromFaces() > 0) { │ │ │ │ │ -424 │ │ │ │ │ -425 for (int face = 0; face < parent.getNumFaces(); ++face) { │ │ │ │ │ -426 │ │ │ │ │ -427 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ -428 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ -429 │ │ │ │ │ -430 // Apply the weights to the parent face's vertices: │ │ │ │ │ -431 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = parent.getFaceVertices(face); │ │ │ │ │ -432 │ │ │ │ │ -433 Weight fVaryingWeight = 1.0f / (Weight) fVerts._s_i_z_e(); │ │ │ │ │ -434 │ │ │ │ │ -435 dst[cVert].Clear(); │ │ │ │ │ -436 for (int i = 0; i < fVerts._s_i_z_e(); ++i) { │ │ │ │ │ -437 dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight); │ │ │ │ │ -438 } │ │ │ │ │ -439 } │ │ │ │ │ -440 } │ │ │ │ │ -441 } │ │ │ │ │ -442 for (int edge = 0; edge < parent.getNumEdges(); ++edge) { │ │ │ │ │ -443 │ │ │ │ │ -444 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ -445 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ -446 │ │ │ │ │ -447 // Apply the weights to the parent edges's vertices │ │ │ │ │ -448 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(edge); │ │ │ │ │ -449 │ │ │ │ │ -450 dst[cVert].Clear(); │ │ │ │ │ -451 dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f); │ │ │ │ │ -452 dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f); │ │ │ │ │ -453 } │ │ │ │ │ -454 } │ │ │ │ │ -455 for (int vert = 0; vert < parent.getNumVertices(); ++vert) { │ │ │ │ │ -456 │ │ │ │ │ -457 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ -458 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ -459 │ │ │ │ │ -460 // Essentially copy the parent vertex: │ │ │ │ │ -461 dst[cVert].Clear(); │ │ │ │ │ -462 dst[cVert].AddWithWeight(src[vert], 1.0f); │ │ │ │ │ -463 } │ │ │ │ │ -464 } │ │ │ │ │ -465} │ │ │ │ │ -466 │ │ │ │ │ -467 │ │ │ │ │ -468// │ │ │ │ │ -469// Internal implementation methods -- grouping vertices to be interpolated │ │ │ │ │ -470// based on the type of parent component from which they originated: │ │ │ │ │ -471// │ │ │ │ │ -472template │ │ │ │ │ -473template │ │ │ │ │ -474inline void │ │ │ │ │ -475_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_i_n_t_e_r_p_F_r_o_m_F_a_c_e_s(int level, T const & src, U & dst) │ │ │ │ │ -const { │ │ │ │ │ -476 │ │ │ │ │ -477 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -478 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ -479 │ │ │ │ │ -480 if (refinement.getNumChildVerticesFromFaces() == 0) return; │ │ │ │ │ -481 │ │ │ │ │ -482 _S_d_c_:_:_S_c_h_e_m_e_<_S_C_H_E_M_E_> scheme(_refiner._subdivOptions); │ │ │ │ │ -483 │ │ │ │ │ -484 Vtr::internal::StackBuffer fVertWeights(parent.getMaxValence()); │ │ │ │ │ -485 │ │ │ │ │ -486 for (int face = 0; face < parent.getNumFaces(); ++face) { │ │ │ │ │ -487 │ │ │ │ │ -488 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ -489 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -490 continue; │ │ │ │ │ -491 │ │ │ │ │ -492 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ -face: │ │ │ │ │ -493 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = parent.getFaceVertices(face); │ │ │ │ │ -494 │ │ │ │ │ -495 Mask fMask(fVertWeights, 0, 0); │ │ │ │ │ -496 Vtr::internal::FaceInterface fHood(fVerts._s_i_z_e()); │ │ │ │ │ -497 │ │ │ │ │ -498 scheme.ComputeFaceVertexMask(fHood, fMask); │ │ │ │ │ -499 │ │ │ │ │ -500 // Apply the weights to the parent face's vertices: │ │ │ │ │ -501 dst[cVert].Clear(); │ │ │ │ │ -502 │ │ │ │ │ -503 for (int i = 0; i < fVerts._s_i_z_e(); ++i) { │ │ │ │ │ -504 │ │ │ │ │ -505 dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); │ │ │ │ │ -506 } │ │ │ │ │ -507 } │ │ │ │ │ -508} │ │ │ │ │ -509 │ │ │ │ │ -510template │ │ │ │ │ -511template │ │ │ │ │ -512inline void │ │ │ │ │ -513PrimvarRefinerReal::interpFromEdges(int level, T const & src, U & dst) │ │ │ │ │ -const { │ │ │ │ │ -514 │ │ │ │ │ -515 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -516 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ -517 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ -518 │ │ │ │ │ -519 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -520 │ │ │ │ │ -521 Vtr::internal::EdgeInterface eHood(parent); │ │ │ │ │ -522 │ │ │ │ │ -523 Weight eVertWeights[2]; │ │ │ │ │ -524 Vtr::internal::StackBuffer eFaceWeights(parent.getMaxEdgeFaces │ │ │ │ │ -()); │ │ │ │ │ -525 │ │ │ │ │ -526 for (int edge = 0; edge < parent.getNumEdges(); ++edge) { │ │ │ │ │ -527 │ │ │ │ │ -528 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ -529 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -530 continue; │ │ │ │ │ -531 │ │ │ │ │ -532 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ -edge: │ │ │ │ │ -533 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(edge), │ │ │ │ │ -534 eFaces = parent.getEdgeFaces(edge); │ │ │ │ │ -535 │ │ │ │ │ -536 Mask eMask(eVertWeights, 0, eFaceWeights); │ │ │ │ │ -537 │ │ │ │ │ -538 eHood.SetIndex(edge); │ │ │ │ │ -539 │ │ │ │ │ -540 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = (parent.getEdgeSharpness(edge) > 0.0f) ? _S_d_c_:_: │ │ │ │ │ -_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E : Sdc::Crease::RULE_SMOOTH; │ │ │ │ │ -541 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = child.getVertexRule(cVert); │ │ │ │ │ -542 │ │ │ │ │ -543 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule); │ │ │ │ │ -544 │ │ │ │ │ -545 // Apply the weights to the parent edges's vertices and (if applicable) to │ │ │ │ │ -546 // the child vertices of its incident faces: │ │ │ │ │ -547 dst[cVert].Clear(); │ │ │ │ │ -548 dst[cVert].AddWithWeight(src[eVerts[0]], eVertWeights[0]); │ │ │ │ │ -549 dst[cVert].AddWithWeight(src[eVerts[1]], eVertWeights[1]); │ │ │ │ │ -550 │ │ │ │ │ -551 if (eMask.GetNumFaceWeights() > 0) { │ │ │ │ │ -552 │ │ │ │ │ -553 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ -554 │ │ │ │ │ -555 if (eMask.AreFaceWeightsForFaceCenters()) { │ │ │ │ │ -556 assert(refinement.getNumChildVerticesFromFaces() > 0); │ │ │ │ │ -557 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(eFaces[i]); │ │ │ │ │ -558 │ │ │ │ │ -559 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ -560 dst[cVert].AddWithWeight(dst[cVertOfFace], eFaceWeights[i]); │ │ │ │ │ -561 } else { │ │ │ │ │ -562 _V_t_r_:_:_I_n_d_e_x pFace = eFaces[i]; │ │ │ │ │ -563 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pFaceEdges = parent.getFaceEdges(pFace), │ │ │ │ │ -564 pFaceVerts = parent.getFaceVertices(pFace); │ │ │ │ │ -565 │ │ │ │ │ -566 int eInFace = 0; │ │ │ │ │ -567 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ; │ │ │ │ │ -568 │ │ │ │ │ -569 int vInFace = eInFace + 2; │ │ │ │ │ -570 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts._s_i_z_e(); │ │ │ │ │ -571 │ │ │ │ │ -572 _V_t_r_:_:_I_n_d_e_x pVertNext = pFaceVerts[vInFace]; │ │ │ │ │ -573 dst[cVert].AddWithWeight(src[pVertNext], eFaceWeights[i]); │ │ │ │ │ -574 } │ │ │ │ │ -575 } │ │ │ │ │ -576 } │ │ │ │ │ -577 } │ │ │ │ │ -578} │ │ │ │ │ -579 │ │ │ │ │ -580template │ │ │ │ │ -581template │ │ │ │ │ -582inline void │ │ │ │ │ -583PrimvarRefinerReal::interpFromVerts(int level, T const & src, U & dst) │ │ │ │ │ -const { │ │ │ │ │ -584 │ │ │ │ │ -585 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -586 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ -587 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ -588 │ │ │ │ │ -589 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -590 │ │ │ │ │ -591 Vtr::internal::VertexInterface vHood(parent, child); │ │ │ │ │ -592 │ │ │ │ │ -593 Vtr::internal::StackBuffer weightBuffer(2*parent.getMaxValence │ │ │ │ │ -()); │ │ │ │ │ -594 │ │ │ │ │ -595 for (int vert = 0; vert < parent.getNumVertices(); ++vert) { │ │ │ │ │ -596 │ │ │ │ │ -597 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ -598 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -599 continue; │ │ │ │ │ -600 │ │ │ │ │ -601 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ -edge: │ │ │ │ │ -602 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = parent.getVertexEdges(vert), │ │ │ │ │ -603 vFaces = parent.getVertexFaces(vert); │ │ │ │ │ -604 │ │ │ │ │ -605 Weight vVertWeight, │ │ │ │ │ -606 * vEdgeWeights = weightBuffer, │ │ │ │ │ -607 * vFaceWeights = vEdgeWeights + vEdges._s_i_z_e(); │ │ │ │ │ -608 │ │ │ │ │ -609 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights); │ │ │ │ │ -610 │ │ │ │ │ -611 vHood.SetIndex(vert, cVert); │ │ │ │ │ -612 │ │ │ │ │ -613 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = parent.getVertexRule(vert); │ │ │ │ │ -614 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = child.getVertexRule(cVert); │ │ │ │ │ -615 │ │ │ │ │ -616 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule); │ │ │ │ │ -617 │ │ │ │ │ -618 // Apply the weights to the parent vertex, the vertices opposite its │ │ │ │ │ -incident │ │ │ │ │ -619 // edges, and the child vertices of its incident faces: │ │ │ │ │ -620 // │ │ │ │ │ -621 // In order to improve numerical precision, it's better to apply smaller │ │ │ │ │ -weights │ │ │ │ │ -622 // first, so begin with the face-weights followed by the edge-weights and │ │ │ │ │ -the │ │ │ │ │ -623 // vertex weight last. │ │ │ │ │ -624 dst[cVert].Clear(); │ │ │ │ │ -625 │ │ │ │ │ -626 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ -627 assert(vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ -628 │ │ │ │ │ -629 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ -630 │ │ │ │ │ -631 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(vFaces[i]); │ │ │ │ │ -632 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ -633 dst[cVert].AddWithWeight(dst[cVertOfFace], vFaceWeights[i]); │ │ │ │ │ -634 } │ │ │ │ │ -635 } │ │ │ │ │ -636 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ -637 │ │ │ │ │ -638 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ -639 │ │ │ │ │ -640 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(vEdges[i]); │ │ │ │ │ -641 _V_t_r_:_:_I_n_d_e_x pVertOppositeEdge = (eVerts[0] == vert) ? eVerts[1] : eVerts[0]; │ │ │ │ │ -642 │ │ │ │ │ -643 dst[cVert].AddWithWeight(src[pVertOppositeEdge], vEdgeWeights[i]); │ │ │ │ │ -644 } │ │ │ │ │ -645 } │ │ │ │ │ -646 dst[cVert].AddWithWeight(src[vert], vVertWeight); │ │ │ │ │ -647 } │ │ │ │ │ -648} │ │ │ │ │ -649 │ │ │ │ │ -650 │ │ │ │ │ -651// │ │ │ │ │ -652// Internal face-varying implementation details: │ │ │ │ │ -653// │ │ │ │ │ -654template │ │ │ │ │ -655template │ │ │ │ │ -656inline void │ │ │ │ │ -657PrimvarRefinerReal::interpFVarFromFaces(int level, T const & src, U & │ │ │ │ │ -dst, int channel) const { │ │ │ │ │ -658 │ │ │ │ │ -659 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -660 │ │ │ │ │ -661 if (refinement.getNumChildVerticesFromFaces() == 0) return; │ │ │ │ │ -662 │ │ │ │ │ -663 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -664 │ │ │ │ │ -665 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ -666 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ -667 │ │ │ │ │ -668 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -669 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -670 │ │ │ │ │ -671 Vtr::internal::StackBuffer fValueWeights │ │ │ │ │ -(parentLevel.getMaxValence()); │ │ │ │ │ -672 │ │ │ │ │ -673 for (int face = 0; face < parentLevel.getNumFaces(); ++face) { │ │ │ │ │ -674 │ │ │ │ │ -675 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ -676 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -677 continue; │ │ │ │ │ -678 │ │ │ │ │ -679 _V_t_r_:_:_I_n_d_e_x cVertValue = childFVar.getVertexValueOffset(cVert); │ │ │ │ │ -680 │ │ │ │ │ -681 // The only difference for face-varying here is that we get the values │ │ │ │ │ -associated │ │ │ │ │ -682 // with each face-vertex directly from the FVarLevel, rather than using the │ │ │ │ │ -parent │ │ │ │ │ -683 // face-vertices directly. If any face-vertex has any sibling values, then │ │ │ │ │ -we may │ │ │ │ │ -684 // get the wrong one using the face-vertex index directly. │ │ │ │ │ -685 │ │ │ │ │ -686 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ -face: │ │ │ │ │ -687 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fValues = parentFVar.getFaceValues(face); │ │ │ │ │ -688 │ │ │ │ │ -689 Mask fMask(fValueWeights, 0, 0); │ │ │ │ │ -690 Vtr::internal::FaceInterface fHood(fValues.size()); │ │ │ │ │ -691 │ │ │ │ │ -692 scheme.ComputeFaceVertexMask(fHood, fMask); │ │ │ │ │ -693 │ │ │ │ │ -694 // Apply the weights to the parent face's vertices: │ │ │ │ │ -695 dst[cVertValue].Clear(); │ │ │ │ │ -696 │ │ │ │ │ -697 for (int i = 0; i < fValues.size(); ++i) { │ │ │ │ │ -698 dst[cVertValue].AddWithWeight(src[fValues[i]], fValueWeights[i]); │ │ │ │ │ -699 } │ │ │ │ │ -700 } │ │ │ │ │ -701} │ │ │ │ │ -702 │ │ │ │ │ -703template │ │ │ │ │ -704template │ │ │ │ │ -705inline void │ │ │ │ │ -706PrimvarRefinerReal::interpFVarFromEdges(int level, T const & src, U & │ │ │ │ │ -dst, int channel) const { │ │ │ │ │ -707 │ │ │ │ │ -708 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -709 │ │ │ │ │ -710 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -711 │ │ │ │ │ -712 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ -713 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ -714 │ │ │ │ │ -715 Vtr::internal::FVarRefinement const & refineFVar = │ │ │ │ │ -refinement.getFVarRefinement(channel); │ │ │ │ │ -716 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -717 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -718 │ │ │ │ │ -719 // │ │ │ │ │ -720 // Allocate and initialize (if linearly interpolated) interpolation weights │ │ │ │ │ -for │ │ │ │ │ -721 // the edge mask: │ │ │ │ │ -722 // │ │ │ │ │ -723 Weight eVertWeights[2]; │ │ │ │ │ -724 Vtr::internal::StackBuffer eFaceWeights │ │ │ │ │ -(parentLevel.getMaxEdgeFaces()); │ │ │ │ │ -725 │ │ │ │ │ -726 Mask eMask(eVertWeights, 0, eFaceWeights); │ │ │ │ │ -727 │ │ │ │ │ -728 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == _S_d_c_:_: │ │ │ │ │ -_S_C_H_E_M_E___B_I_L_I_N_E_A_R); │ │ │ │ │ -729 if (isLinearFVar) { │ │ │ │ │ -730 eMask.SetNumVertexWeights(2); │ │ │ │ │ -731 eMask.SetNumEdgeWeights(0); │ │ │ │ │ -732 eMask.SetNumFaceWeights(0); │ │ │ │ │ -733 │ │ │ │ │ -734 eVertWeights[0] = 0.5f; │ │ │ │ │ -735 eVertWeights[1] = 0.5f; │ │ │ │ │ -736 } │ │ │ │ │ -737 │ │ │ │ │ -738 Vtr::internal::EdgeInterface eHood(parentLevel); │ │ │ │ │ -739 │ │ │ │ │ -740 for (int edge = 0; edge < parentLevel.getNumEdges(); ++edge) { │ │ │ │ │ -741 │ │ │ │ │ -742 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ -743 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -744 continue; │ │ │ │ │ -745 │ │ │ │ │ -746 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y cVertValues = childFVar.getVertexValues(cVert); │ │ │ │ │ -747 │ │ │ │ │ -748 bool fvarEdgeVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues │ │ │ │ │ -[0]); │ │ │ │ │ -749 if (fvarEdgeVertMatchesVertex) { │ │ │ │ │ -750 // │ │ │ │ │ -751 // If smoothly interpolated, compute new weights for the edge mask: │ │ │ │ │ -752 // │ │ │ │ │ -753 if (!isLinearFVar) { │ │ │ │ │ -754 eHood.SetIndex(edge); │ │ │ │ │ -755 │ │ │ │ │ -756 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = (parentLevel.getEdgeSharpness(edge) > 0.0f) │ │ │ │ │ -757 ? _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E : Sdc::Crease::RULE_SMOOTH; │ │ │ │ │ -758 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = childLevel.getVertexRule(cVert); │ │ │ │ │ -759 │ │ │ │ │ -760 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule); │ │ │ │ │ -761 } │ │ │ │ │ -762 │ │ │ │ │ -763 // Apply the weights to the parent edge's vertices and (if applicable) to │ │ │ │ │ -764 // the child vertices of its incident faces: │ │ │ │ │ -765 // │ │ │ │ │ -766 // Even though the face-varying topology matches the vertex topology, we │ │ │ │ │ -need │ │ │ │ │ -767 // to be careful here when getting values corresponding to the two end- │ │ │ │ │ -vertices. │ │ │ │ │ -768 // While the edge may be continuous, the vertices at their ends may have │ │ │ │ │ -769 // discontinuities elsewhere in their neighborhood (i.e. on the "other │ │ │ │ │ -side" │ │ │ │ │ -770 // of the end-vertex) and so have sibling values associated with them. In │ │ │ │ │ -most │ │ │ │ │ -771 // cases the topology for an end-vertex will match and we can use it │ │ │ │ │ -directly, │ │ │ │ │ -772 // but we must still check and retrieve as needed. │ │ │ │ │ -773 // │ │ │ │ │ -774 // Indices for values corresponding to face-vertices are guaranteed to │ │ │ │ │ -match, │ │ │ │ │ -775 // so we can use the child-vertex indices directly. │ │ │ │ │ -776 // │ │ │ │ │ -777 // And by "directly", we always use getVertexValue(vertexIndex) to │ │ │ │ │ -reference │ │ │ │ │ -778 // values in the "src" to account for the possible indirection that may │ │ │ │ │ -exist at │ │ │ │ │ -779 // level 0 -- where there may be fewer values than vertices and an │ │ │ │ │ -additional │ │ │ │ │ -780 // indirection is necessary. We can use a vertex index directly for "dst" │ │ │ │ │ -when │ │ │ │ │ -781 // it matches. │ │ │ │ │ -782 // │ │ │ │ │ -783 _V_t_r_:_:_I_n_d_e_x eVertValues[2]; │ │ │ │ │ -784 │ │ │ │ │ -785 parentFVar.getEdgeFaceValues(edge, 0, eVertValues); │ │ │ │ │ -786 │ │ │ │ │ -787 _I_n_d_e_x cVertValue = cVertValues[0]; │ │ │ │ │ -788 │ │ │ │ │ -789 dst[cVertValue].Clear(); │ │ │ │ │ -790 dst[cVertValue].AddWithWeight(src[eVertValues[0]], eVertWeights[0]); │ │ │ │ │ -791 dst[cVertValue].AddWithWeight(src[eVertValues[1]], eVertWeights[1]); │ │ │ │ │ -792 │ │ │ │ │ -793 if (eMask.GetNumFaceWeights() > 0) { │ │ │ │ │ -794 │ │ │ │ │ -795 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eFaces = parentLevel.getEdgeFaces(edge); │ │ │ │ │ -796 │ │ │ │ │ -797 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ -798 if (eMask.AreFaceWeightsForFaceCenters()) { │ │ │ │ │ -799 │ │ │ │ │ -800 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(eFaces[i]); │ │ │ │ │ -801 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ -802 │ │ │ │ │ -803 _V_t_r_:_:_I_n_d_e_x cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace); │ │ │ │ │ -804 dst[cVertValue].AddWithWeight(dst[cValueOfFace], eFaceWeights[i]); │ │ │ │ │ -805 } else { │ │ │ │ │ -806 _V_t_r_:_:_I_n_d_e_x pFace = eFaces[i]; │ │ │ │ │ -807 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pFaceEdges = parentLevel.getFaceEdges(pFace), │ │ │ │ │ -808 pFaceVerts = parentLevel.getFaceVertices(pFace); │ │ │ │ │ -809 │ │ │ │ │ -810 int eInFace = 0; │ │ │ │ │ -811 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ; │ │ │ │ │ -812 │ │ │ │ │ -813 // Edge "i" spans vertices [i,i+1] so we want i+2... │ │ │ │ │ -814 int vInFace = eInFace + 2; │ │ │ │ │ -815 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts._s_i_z_e(); │ │ │ │ │ -816 │ │ │ │ │ -817 _V_t_r_:_:_I_n_d_e_x pValueNext = parentFVar.getFaceValues(pFace)[vInFace]; │ │ │ │ │ -818 dst[cVertValue].AddWithWeight(src[pValueNext], eFaceWeights[i]); │ │ │ │ │ -819 } │ │ │ │ │ -820 } │ │ │ │ │ -821 } │ │ │ │ │ -822 } else { │ │ │ │ │ -823 // │ │ │ │ │ -824 // Mismatched edge-verts should just be linearly interpolated between the │ │ │ │ │ -pairs of │ │ │ │ │ -825 // values for each sibling of the child edge-vertex -- the question is: │ │ │ │ │ -which face │ │ │ │ │ -826 // holds that pair of values for a given sibling? │ │ │ │ │ -827 // │ │ │ │ │ -828 // In the manifold case, the sibling and edge-face indices will correspond. │ │ │ │ │ -We │ │ │ │ │ -829 // will eventually need to update this to account for > 3 incident faces. │ │ │ │ │ -830 // │ │ │ │ │ -831 for (int i = 0; i < cVertValues.size(); ++i) { │ │ │ │ │ -832 _V_t_r_:_:_I_n_d_e_x eVertValues[2]; │ │ │ │ │ -833 int eFaceIndex = refineFVar.getChildValueParentSource(cVert, i); │ │ │ │ │ -834 assert(eFaceIndex == i); │ │ │ │ │ -835 │ │ │ │ │ -836 parentFVar.getEdgeFaceValues(edge, eFaceIndex, eVertValues); │ │ │ │ │ -837 │ │ │ │ │ -838 _I_n_d_e_x cVertValue = cVertValues[i]; │ │ │ │ │ -839 │ │ │ │ │ -840 dst[cVertValue].Clear(); │ │ │ │ │ -841 dst[cVertValue].AddWithWeight(src[eVertValues[0]], 0.5); │ │ │ │ │ -842 dst[cVertValue].AddWithWeight(src[eVertValues[1]], 0.5); │ │ │ │ │ -843 } │ │ │ │ │ -844 } │ │ │ │ │ -845 } │ │ │ │ │ -846} │ │ │ │ │ -847 │ │ │ │ │ -848template │ │ │ │ │ -849template │ │ │ │ │ -850inline void │ │ │ │ │ -851PrimvarRefinerReal::interpFVarFromVerts(int level, T const & src, U & │ │ │ │ │ -dst, int channel) const { │ │ │ │ │ -852 │ │ │ │ │ -853 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ -(level-1); │ │ │ │ │ -854 │ │ │ │ │ -855 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -856 │ │ │ │ │ -857 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ -858 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ -859 │ │ │ │ │ -860 Vtr::internal::FVarRefinement const & refineFVar = │ │ │ │ │ -refinement.getFVarRefinement(channel); │ │ │ │ │ -861 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -862 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -863 │ │ │ │ │ -864 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == _S_d_c_:_: │ │ │ │ │ -_S_C_H_E_M_E___B_I_L_I_N_E_A_R); │ │ │ │ │ -865 │ │ │ │ │ -866 Vtr::internal::StackBuffer weightBuffer │ │ │ │ │ -(2*parentLevel.getMaxValence()); │ │ │ │ │ -867 │ │ │ │ │ -868 Vtr::internal::StackBuffer vEdgeValues │ │ │ │ │ -(parentLevel.getMaxValence()); │ │ │ │ │ -869 │ │ │ │ │ -870 Vtr::internal::VertexInterface vHood(parentLevel, childLevel); │ │ │ │ │ -871 │ │ │ │ │ -872 for (int vert = 0; vert < parentLevel.getNumVertices(); ++vert) { │ │ │ │ │ -873 │ │ │ │ │ -874 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ -875 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ -876 continue; │ │ │ │ │ -877 │ │ │ │ │ -878 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pVertValues = parentFVar.getVertexValues(vert), │ │ │ │ │ -879 cVertValues = childFVar.getVertexValues(cVert); │ │ │ │ │ -880 │ │ │ │ │ -881 bool fvarVertVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues │ │ │ │ │ -[0]); │ │ │ │ │ -882 if (isLinearFVar && fvarVertVertMatchesVertex) { │ │ │ │ │ -883 dst[cVertValues[0]].Clear(); │ │ │ │ │ -884 dst[cVertValues[0]].AddWithWeight(src[pVertValues[0]], 1.0f); │ │ │ │ │ -885 continue; │ │ │ │ │ -886 } │ │ │ │ │ -887 │ │ │ │ │ -888 if (fvarVertVertMatchesVertex) { │ │ │ │ │ -889 // │ │ │ │ │ -890 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ -edge: │ │ │ │ │ -891 // │ │ │ │ │ -892 // (We really need to encapsulate this somewhere else for use here and in │ │ │ │ │ -the │ │ │ │ │ -893 // general case) │ │ │ │ │ -894 // │ │ │ │ │ -895 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = parentLevel.getVertexEdges(vert); │ │ │ │ │ -896 │ │ │ │ │ -897 Weight vVertWeight; │ │ │ │ │ -898 Weight * vEdgeWeights = weightBuffer; │ │ │ │ │ -899 Weight * vFaceWeights = vEdgeWeights + vEdges._s_i_z_e(); │ │ │ │ │ -900 │ │ │ │ │ -901 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights); │ │ │ │ │ -902 │ │ │ │ │ -903 vHood.SetIndex(vert, cVert); │ │ │ │ │ -904 │ │ │ │ │ -905 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = parentLevel.getVertexRule(vert); │ │ │ │ │ -906 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = childLevel.getVertexRule(cVert); │ │ │ │ │ -907 │ │ │ │ │ -908 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule); │ │ │ │ │ -909 │ │ │ │ │ -910 // Apply the weights to the parent vertex, the vertices opposite its │ │ │ │ │ -incident │ │ │ │ │ -911 // edges, and the child vertices of its incident faces: │ │ │ │ │ -912 // │ │ │ │ │ -913 // Even though the face-varying topology matches the vertex topology, we │ │ │ │ │ -need │ │ │ │ │ -914 // to be careful here when getting values corresponding to vertices at the │ │ │ │ │ -915 // ends of edges. While the edge may be continuous, the end vertex may have │ │ │ │ │ -916 // discontinuities elsewhere in their neighborhood (i.e. on the "other │ │ │ │ │ -side" │ │ │ │ │ -917 // of the end-vertex) and so have sibling values associated with them. In │ │ │ │ │ -most │ │ │ │ │ -918 // cases the topology for an end-vertex will match and we can use it │ │ │ │ │ -directly, │ │ │ │ │ -919 // but we must still check and retrieve as needed. │ │ │ │ │ -920 // │ │ │ │ │ -921 // Indices for values corresponding to face-vertices are guaranteed to │ │ │ │ │ -match, │ │ │ │ │ -922 // so we can use the child-vertex indices directly. │ │ │ │ │ -923 // │ │ │ │ │ -924 // And by "directly", we always use getVertexValue(vertexIndex) to │ │ │ │ │ -reference │ │ │ │ │ -925 // values in the "src" to account for the possible indirection that may │ │ │ │ │ -exist at │ │ │ │ │ -926 // level 0 -- where there may be fewer values than vertices and an │ │ │ │ │ -additional │ │ │ │ │ -927 // indirection is necessary. We can use a vertex index directly for "dst" │ │ │ │ │ -when │ │ │ │ │ -928 // it matches. │ │ │ │ │ -929 // │ │ │ │ │ -930 // As with applying the mask to vertex data, in order to improve numerical │ │ │ │ │ -931 // precision, it's better to apply smaller weights first, so begin with the │ │ │ │ │ -932 // face-weights followed by the edge-weights and the vertex weight last. │ │ │ │ │ -933 // │ │ │ │ │ -934 _V_t_r_:_:_I_n_d_e_x pVertValue = pVertValues[0]; │ │ │ │ │ -935 _V_t_r_:_:_I_n_d_e_x cVertValue = cVertValues[0]; │ │ │ │ │ -936 │ │ │ │ │ -937 dst[cVertValue].Clear(); │ │ │ │ │ -938 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ -939 assert(vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ -940 │ │ │ │ │ -941 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = parentLevel.getVertexFaces(vert); │ │ │ │ │ -942 │ │ │ │ │ -943 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ -944 │ │ │ │ │ -945 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(vFaces[i]); │ │ │ │ │ -946 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ -947 │ │ │ │ │ -948 _V_t_r_:_:_I_n_d_e_x cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace); │ │ │ │ │ -949 dst[cVertValue].AddWithWeight(dst[cValueOfFace], vFaceWeights[i]); │ │ │ │ │ -950 } │ │ │ │ │ -951 } │ │ │ │ │ -952 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ -953 │ │ │ │ │ -954 parentFVar.getVertexEdgeValues(vert, vEdgeValues); │ │ │ │ │ -955 │ │ │ │ │ -956 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ -957 dst[cVertValue].AddWithWeight(src[vEdgeValues[i]], vEdgeWeights[i]); │ │ │ │ │ -958 } │ │ │ │ │ -959 } │ │ │ │ │ -960 dst[cVertValue].AddWithWeight(src[pVertValue], vVertWeight); │ │ │ │ │ -961 } else { │ │ │ │ │ -962 // │ │ │ │ │ -963 // Each FVar value associated with a vertex will be either a corner or a │ │ │ │ │ -crease, │ │ │ │ │ -964 // or potentially in transition from corner to crease: │ │ │ │ │ -965 // - if the CHILD is a corner, there can be no transition so we have a │ │ │ │ │ -corner │ │ │ │ │ -966 // - otherwise if the PARENT is a crease, both will be creases (no │ │ │ │ │ -transition) │ │ │ │ │ -967 // - otherwise the parent must be a corner and the child a crease │ │ │ │ │ -(transition) │ │ │ │ │ -968 // │ │ │ │ │ -969 Vtr::internal::FVarLevel::ConstValueTagArray pValueTags = │ │ │ │ │ -parentFVar.getVertexValueTags(vert); │ │ │ │ │ -970 Vtr::internal::FVarLevel::ConstValueTagArray cValueTags = │ │ │ │ │ -childFVar.getVertexValueTags(cVert); │ │ │ │ │ -971 │ │ │ │ │ -972 for (int cSiblingIndex = 0; cSiblingIndex < cVertValues.size(); │ │ │ │ │ -++cSiblingIndex) { │ │ │ │ │ -973 int pSiblingIndex = refineFVar.getChildValueParentSource(cVert, │ │ │ │ │ -cSiblingIndex); │ │ │ │ │ -974 assert(pSiblingIndex == cSiblingIndex); │ │ │ │ │ -975 │ │ │ │ │ -976 typedef Vtr::internal::FVarLevel::Sibling SiblingIntType; │ │ │ │ │ -977 │ │ │ │ │ -978 SiblingIntType cSibling = (SiblingIntType) cSiblingIndex; │ │ │ │ │ -979 SiblingIntType pSibling = (SiblingIntType) pSiblingIndex; │ │ │ │ │ -980 │ │ │ │ │ -981 _V_t_r_:_:_I_n_d_e_x pVertValue = pVertValues[pSibling]; │ │ │ │ │ -982 _V_t_r_:_:_I_n_d_e_x cVertValue = cVertValues[cSibling]; │ │ │ │ │ -983 │ │ │ │ │ -984 dst[cVertValue].Clear(); │ │ │ │ │ -985 if (isLinearFVar || cValueTags[cSibling].isCorner()) { │ │ │ │ │ -986 dst[cVertValue].AddWithWeight(src[pVertValue], 1.0f); │ │ │ │ │ -987 } else { │ │ │ │ │ -988 // │ │ │ │ │ -989 // We have either a crease or a transition from corner to crease -- in │ │ │ │ │ -990 // either case, we need the end values for the full/fractional crease: │ │ │ │ │ -991 // │ │ │ │ │ -992 _I_n_d_e_x pEndValues[2]; │ │ │ │ │ -993 parentFVar.getVertexCreaseEndValues(vert, pSibling, pEndValues); │ │ │ │ │ -994 │ │ │ │ │ -995 Weight vWeight = 0.75f; │ │ │ │ │ -996 Weight eWeight = 0.125f; │ │ │ │ │ -997 │ │ │ │ │ -998 // │ │ │ │ │ -999 // If semi-sharp we need to apply fractional weighting -- if made sharp │ │ │ │ │ -because │ │ │ │ │ -1000 // of the other sibling (dependent-sharp) use the fractional weight from │ │ │ │ │ -that │ │ │ │ │ -1001 // other sibling (should only occur when there are 2): │ │ │ │ │ -1002 // │ │ │ │ │ -1003 if (pValueTags[pSibling].isSemiSharp()) { │ │ │ │ │ -1004 Weight wCorner = pValueTags[pSibling].isDepSharp() │ │ │ │ │ -1005 ? refineFVar.getFractionalWeight(vert, !pSibling, cVert, !cSibling) │ │ │ │ │ -1006 : refineFVar.getFractionalWeight(vert, pSibling, cVert, cSibling); │ │ │ │ │ -1007 Weight wCrease = 1.0f - wCorner; │ │ │ │ │ -1008 │ │ │ │ │ -1009 vWeight = wCrease * 0.75f + wCorner; │ │ │ │ │ -1010 eWeight = wCrease * 0.125f; │ │ │ │ │ -1011 } │ │ │ │ │ -1012 dst[cVertValue].AddWithWeight(src[pEndValues[0]], eWeight); │ │ │ │ │ -1013 dst[cVertValue].AddWithWeight(src[pEndValues[1]], eWeight); │ │ │ │ │ -1014 dst[cVertValue].AddWithWeight(src[pVertValue], vWeight); │ │ │ │ │ -1015 } │ │ │ │ │ -1016 } │ │ │ │ │ -1017 } │ │ │ │ │ -1018 } │ │ │ │ │ -1019} │ │ │ │ │ -1020 │ │ │ │ │ -1021template │ │ │ │ │ -1022template │ │ │ │ │ -1023inline void │ │ │ │ │ -1024PrimvarRefinerReal::limit(T const & src, U & dstPos, U1 * dstTan1Ptr, │ │ │ │ │ -U2 * dstTan2Ptr) const { │ │ │ │ │ -1025 │ │ │ │ │ -1026 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -1027 │ │ │ │ │ -1028 Vtr::internal::Level const & level = _refiner.getLevel │ │ │ │ │ -(_refiner.GetMaxLevel()); │ │ │ │ │ -1029 │ │ │ │ │ -1030 int maxWeightsPerMask = 1 + 2 * level.getMaxValence(); │ │ │ │ │ -1031 bool hasTangents = (dstTan1Ptr && dstTan2Ptr); │ │ │ │ │ -1032 int numMasks = 1 + (hasTangents ? 2 : 0); │ │ │ │ │ -1033 │ │ │ │ │ -1034 Vtr::internal::StackBuffer indexBuffer(maxWeightsPerMask); │ │ │ │ │ -1035 Vtr::internal::StackBuffer weightBuffer(numMasks * │ │ │ │ │ -maxWeightsPerMask); │ │ │ │ │ -1036 │ │ │ │ │ -1037 Weight * vPosWeights = weightBuffer, │ │ │ │ │ -1038 * ePosWeights = vPosWeights + 1, │ │ │ │ │ -1039 * fPosWeights = ePosWeights + level.getMaxValence(); │ │ │ │ │ -1040 Weight * vTan1Weights = vPosWeights + maxWeightsPerMask, │ │ │ │ │ -1041 * eTan1Weights = ePosWeights + maxWeightsPerMask, │ │ │ │ │ -1042 * fTan1Weights = fPosWeights + maxWeightsPerMask; │ │ │ │ │ -1043 Weight * vTan2Weights = vTan1Weights + maxWeightsPerMask, │ │ │ │ │ -1044 * eTan2Weights = eTan1Weights + maxWeightsPerMask, │ │ │ │ │ -1045 * fTan2Weights = fTan1Weights + maxWeightsPerMask; │ │ │ │ │ -1046 │ │ │ │ │ -1047 Mask posMask( vPosWeights, ePosWeights, fPosWeights); │ │ │ │ │ -1048 Mask tan1Mask(vTan1Weights, eTan1Weights, fTan1Weights); │ │ │ │ │ -1049 Mask tan2Mask(vTan2Weights, eTan2Weights, fTan2Weights); │ │ │ │ │ -1050 │ │ │ │ │ -1051 // This is a bit obscure -- assigning both parent and child as last level │ │ │ │ │ --- but │ │ │ │ │ -1052 // this mask type was intended for another purpose. Consider one for the │ │ │ │ │ -limit: │ │ │ │ │ -1053 Vtr::internal::VertexInterface vHood(level, level); │ │ │ │ │ -1054 │ │ │ │ │ -1055 for (int vert = 0; vert < level.getNumVertices(); ++vert) { │ │ │ │ │ -1056 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = level.getVertexEdges(vert); │ │ │ │ │ -1057 │ │ │ │ │ -1058 // Incomplete vertices (present in sparse refinement) do not have their │ │ │ │ │ -full │ │ │ │ │ -1059 // topological neighborhood to determine a proper limit -- just leave the │ │ │ │ │ -1060 // vertex at the refined location and continue to the next: │ │ │ │ │ -1061 if (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0)) { │ │ │ │ │ -1062 dstPos[vert].Clear(); │ │ │ │ │ -1063 dstPos[vert].AddWithWeight(src[vert], 1.0); │ │ │ │ │ -1064 if (hasTangents) { │ │ │ │ │ -1065 (*dstTan1Ptr)[vert].Clear(); │ │ │ │ │ -1066 (*dstTan2Ptr)[vert].Clear(); │ │ │ │ │ -1067 } │ │ │ │ │ -1068 continue; │ │ │ │ │ -1069 } │ │ │ │ │ -1070 │ │ │ │ │ -1071 // │ │ │ │ │ -1072 // Limit masks require the subdivision Rule for the vertex in order to │ │ │ │ │ -deal │ │ │ │ │ -1073 // with infinitely sharp features correctly -- including boundaries and │ │ │ │ │ -corners. │ │ │ │ │ -1074 // The vertex neighborhood is minimally defined with vertex and edge │ │ │ │ │ -counts. │ │ │ │ │ -1075 // │ │ │ │ │ -1076 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e vRule = level.getVertexRule(vert); │ │ │ │ │ -1077 │ │ │ │ │ -1078 // This is a bit obscure -- child vertex index will be ignored here │ │ │ │ │ -1079 vHood.SetIndex(vert, vert); │ │ │ │ │ -1080 │ │ │ │ │ -1081 if (hasTangents) { │ │ │ │ │ -1082 scheme.ComputeVertexLimitMask(vHood, posMask, tan1Mask, tan2Mask, vRule); │ │ │ │ │ -1083 } else { │ │ │ │ │ -1084 scheme.ComputeVertexLimitMask(vHood, posMask, vRule); │ │ │ │ │ -1085 } │ │ │ │ │ -1086 │ │ │ │ │ -1087 // │ │ │ │ │ -1088 // Gather the neighboring vertices of this vertex -- the vertices opposite │ │ │ │ │ -its │ │ │ │ │ -1089 // incident edges, and the opposite vertices of its incident faces: │ │ │ │ │ -1090 // │ │ │ │ │ -1091 _I_n_d_e_x * eIndices = indexBuffer; │ │ │ │ │ -1092 _I_n_d_e_x * fIndices = indexBuffer + vEdges._s_i_z_e(); │ │ │ │ │ -1093 │ │ │ │ │ -1094 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ -1095 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = level.getEdgeVertices(vEdges[i]); │ │ │ │ │ -1096 │ │ │ │ │ -1097 eIndices[i] = (eVerts[0] == vert) ? eVerts[1] : eVerts[0]; │ │ │ │ │ -1098 } │ │ │ │ │ -1099 if (posMask.GetNumFaceWeights() || (hasTangents && │ │ │ │ │ -tan1Mask.GetNumFaceWeights())) { │ │ │ │ │ -1100 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = level.getVertexFaces(vert); │ │ │ │ │ -1101 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y vInFace = level.getVertexFaceLocalIndices(vert); │ │ │ │ │ -1102 │ │ │ │ │ -1103 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ -1104 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = level.getFaceVertices(vFaces[i]); │ │ │ │ │ -1105 │ │ │ │ │ -1106 _L_o_c_a_l_I_n_d_e_x vOppInFace = (vInFace[i] + 2); │ │ │ │ │ -1107 if (vOppInFace >= fVerts.size()) vOppInFace -= (_L_o_c_a_l_I_n_d_e_x)fVerts._s_i_z_e(); │ │ │ │ │ -1108 │ │ │ │ │ -1109 fIndices[i] = level.getFaceVertices(vFaces[i])[vOppInFace]; │ │ │ │ │ -1110 } │ │ │ │ │ -1111 } │ │ │ │ │ -1112 │ │ │ │ │ -1113 // │ │ │ │ │ -1114 // Combine the weights and indices for position and tangents. As with │ │ │ │ │ -applying │ │ │ │ │ -1115 // refinement masks to vertex data, in order to improve numerical │ │ │ │ │ -precision, it's │ │ │ │ │ -1116 // better to apply smaller weights first, so begin with the face-weights │ │ │ │ │ -followed │ │ │ │ │ -1117 // by the edge-weights and the vertex weight last. │ │ │ │ │ -1118 // │ │ │ │ │ -1119 dstPos[vert].Clear(); │ │ │ │ │ -1120 for (int i = 0; i < posMask.GetNumFaceWeights(); ++i) { │ │ │ │ │ -1121 dstPos[vert].AddWithWeight(src[fIndices[i]], fPosWeights[i]); │ │ │ │ │ -1122 } │ │ │ │ │ -1123 for (int i = 0; i < posMask.GetNumEdgeWeights(); ++i) { │ │ │ │ │ -1124 dstPos[vert].AddWithWeight(src[eIndices[i]], ePosWeights[i]); │ │ │ │ │ -1125 } │ │ │ │ │ -1126 dstPos[vert].AddWithWeight(src[vert], vPosWeights[0]); │ │ │ │ │ -1127 │ │ │ │ │ -1128 // │ │ │ │ │ -1129 // Apply the tangent masks -- both will have the same number of weights │ │ │ │ │ -and │ │ │ │ │ -1130 // indices (one tangent may be "padded" to accommodate the other), but │ │ │ │ │ -these │ │ │ │ │ -1131 // may differ from those of the position: │ │ │ │ │ -1132 // │ │ │ │ │ -1133 if (hasTangents) { │ │ │ │ │ -1134 assert(tan1Mask.GetNumFaceWeights() == tan2Mask.GetNumFaceWeights()); │ │ │ │ │ -1135 assert(tan1Mask.GetNumEdgeWeights() == tan2Mask.GetNumEdgeWeights()); │ │ │ │ │ -1136 │ │ │ │ │ -1137 U1 & dstTan1 = *dstTan1Ptr; │ │ │ │ │ -1138 U2 & dstTan2 = *dstTan2Ptr; │ │ │ │ │ -1139 │ │ │ │ │ -1140 dstTan1[vert].Clear(); │ │ │ │ │ -1141 dstTan2[vert].Clear(); │ │ │ │ │ -1142 for (int i = 0; i < tan1Mask.GetNumFaceWeights(); ++i) { │ │ │ │ │ -1143 dstTan1[vert].AddWithWeight(src[fIndices[i]], fTan1Weights[i]); │ │ │ │ │ -1144 dstTan2[vert].AddWithWeight(src[fIndices[i]], fTan2Weights[i]); │ │ │ │ │ -1145 } │ │ │ │ │ -1146 for (int i = 0; i < tan1Mask.GetNumEdgeWeights(); ++i) { │ │ │ │ │ -1147 dstTan1[vert].AddWithWeight(src[eIndices[i]], eTan1Weights[i]); │ │ │ │ │ -1148 dstTan2[vert].AddWithWeight(src[eIndices[i]], eTan2Weights[i]); │ │ │ │ │ -1149 } │ │ │ │ │ -1150 dstTan1[vert].AddWithWeight(src[vert], vTan1Weights[0]); │ │ │ │ │ -1151 dstTan2[vert].AddWithWeight(src[vert], vTan2Weights[0]); │ │ │ │ │ -1152 } │ │ │ │ │ -1153 } │ │ │ │ │ -1154} │ │ │ │ │ -1155 │ │ │ │ │ -1156template │ │ │ │ │ -1157template │ │ │ │ │ -1158inline void │ │ │ │ │ -1159PrimvarRefinerReal::limitFVar(T const & src, U & dst, int channel) │ │ │ │ │ -const { │ │ │ │ │ -1160 │ │ │ │ │ -1161 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ -1162 │ │ │ │ │ -1163 Vtr::internal::Level const & level = _refiner.getLevel │ │ │ │ │ -(_refiner.GetMaxLevel()); │ │ │ │ │ -1164 Vtr::internal::FVarLevel const & fvarChannel = level.getFVarLevel │ │ │ │ │ -(channel); │ │ │ │ │ -1165 │ │ │ │ │ -1166 int maxWeightsPerMask = 1 + 2 * level.getMaxValence(); │ │ │ │ │ -1167 │ │ │ │ │ -1168 Vtr::internal::StackBuffer weightBuffer(maxWeightsPerMask); │ │ │ │ │ -1169 Vtr::internal::StackBuffer vEdgeBuffer(level.getMaxValence()); │ │ │ │ │ -1170 │ │ │ │ │ -1171 // This is a bit obscure -- assign both parent and child as last level │ │ │ │ │ -1172 Vtr::internal::VertexInterface vHood(level, level); │ │ │ │ │ -1173 │ │ │ │ │ -1174 for (int vert = 0; vert < level.getNumVertices(); ++vert) { │ │ │ │ │ -1175 │ │ │ │ │ -1176 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = level.getVertexEdges(vert); │ │ │ │ │ -1177 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vValues = fvarChannel.getVertexValues(vert); │ │ │ │ │ -1178 │ │ │ │ │ -1179 // Incomplete vertices (present in sparse refinement) do not have their │ │ │ │ │ -full │ │ │ │ │ -1180 // topological neighborhood to determine a proper limit -- just leave the │ │ │ │ │ -1181 // values (perhaps more than one per vertex) at the refined location. │ │ │ │ │ -1182 // │ │ │ │ │ -1183 // The same can be done if the face-varying channel is purely linear. │ │ │ │ │ -1184 // │ │ │ │ │ -1185 bool isIncomplete = (level.getVertexTag(vert)._incomplete || (vEdges.size │ │ │ │ │ -() == 0)); │ │ │ │ │ -1186 if (isIncomplete || fvarChannel.isLinear()) { │ │ │ │ │ -1187 for (int i = 0; i < vValues.size(); ++i) { │ │ │ │ │ -1188 _V_t_r_:_:_I_n_d_e_x vValue = vValues[i]; │ │ │ │ │ -1189 │ │ │ │ │ -1190 dst[vValue].Clear(); │ │ │ │ │ -1191 dst[vValue].AddWithWeight(src[vValue], 1.0f); │ │ │ │ │ -1192 } │ │ │ │ │ -1193 continue; │ │ │ │ │ -1194 } │ │ │ │ │ -1195 │ │ │ │ │ -1196 bool fvarVertMatchesVertex = fvarChannel.valueTopologyMatches(vValues[0]); │ │ │ │ │ -1197 if (fvarVertMatchesVertex) { │ │ │ │ │ -1198 │ │ │ │ │ -1199 // Assign the mask weights to the common buffer and compute the mask: │ │ │ │ │ -1200 // │ │ │ │ │ -1201 Weight * vWeights = weightBuffer, │ │ │ │ │ -1202 * eWeights = vWeights + 1, │ │ │ │ │ -1203 * fWeights = eWeights + vEdges._s_i_z_e(); │ │ │ │ │ -1204 │ │ │ │ │ -1205 Mask vMask(vWeights, eWeights, fWeights); │ │ │ │ │ -1206 │ │ │ │ │ -1207 vHood.SetIndex(vert, vert); │ │ │ │ │ -1208 │ │ │ │ │ -1209 scheme.ComputeVertexLimitMask(vHood, vMask, level.getVertexRule(vert)); │ │ │ │ │ -1210 │ │ │ │ │ -1211 // │ │ │ │ │ -1212 // Apply mask to corresponding FVar values for neighboring vertices: │ │ │ │ │ -1213 // │ │ │ │ │ -1214 _V_t_r_:_:_I_n_d_e_x vValue = vValues[0]; │ │ │ │ │ -1215 │ │ │ │ │ -1216 dst[vValue].Clear(); │ │ │ │ │ -1217 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ -1218 assert(!vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ -1219 │ │ │ │ │ -1220 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = level.getVertexFaces(vert); │ │ │ │ │ -1221 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y vInFace = level.getVertexFaceLocalIndices(vert); │ │ │ │ │ -1222 │ │ │ │ │ -1223 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ -1224 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y faceValues = fvarChannel.getFaceValues(vFaces[i]); │ │ │ │ │ -1225 _L_o_c_a_l_I_n_d_e_x vOppInFace = vInFace[i] + 2; │ │ │ │ │ -1226 if (vOppInFace >= faceValues.size()) vOppInFace -= faceValues._s_i_z_e(); │ │ │ │ │ -1227 │ │ │ │ │ -1228 _I_n_d_e_x vValueOppositeFace = faceValues[vOppInFace]; │ │ │ │ │ -1229 │ │ │ │ │ -1230 dst[vValue].AddWithWeight(src[vValueOppositeFace], fWeights[i]); │ │ │ │ │ -1231 } │ │ │ │ │ -1232 } │ │ │ │ │ -1233 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ -1234 _I_n_d_e_x * vEdgeValues = vEdgeBuffer; │ │ │ │ │ -1235 fvarChannel.getVertexEdgeValues(vert, vEdgeValues); │ │ │ │ │ -1236 │ │ │ │ │ -1237 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ -1238 dst[vValue].AddWithWeight(src[vEdgeValues[i]], eWeights[i]); │ │ │ │ │ -1239 } │ │ │ │ │ -1240 } │ │ │ │ │ -1241 dst[vValue].AddWithWeight(src[vValue], vWeights[0]); │ │ │ │ │ -1242 } else { │ │ │ │ │ -1243 // │ │ │ │ │ -1244 // Sibling FVar values associated with a vertex will be either a corner or │ │ │ │ │ -a crease: │ │ │ │ │ -1245 // │ │ │ │ │ -1246 for (int i = 0; i < vValues.size(); ++i) { │ │ │ │ │ -1247 _V_t_r_:_:_I_n_d_e_x vValue = vValues[i]; │ │ │ │ │ -1248 │ │ │ │ │ -1249 dst[vValue].Clear(); │ │ │ │ │ -1250 if (fvarChannel.getValueTag(vValue).isCorner()) { │ │ │ │ │ -1251 dst[vValue].AddWithWeight(src[vValue], 1.0f); │ │ │ │ │ -1252 } else { │ │ │ │ │ -1253 _I_n_d_e_x vEndValues[2]; │ │ │ │ │ -1254 fvarChannel.getVertexCreaseEndValues(vert, i, vEndValues); │ │ │ │ │ -1255 │ │ │ │ │ -1256 dst[vValue].AddWithWeight(src[vEndValues[0]], 1.0f/6.0f); │ │ │ │ │ -1257 dst[vValue].AddWithWeight(src[vEndValues[1]], 1.0f/6.0f); │ │ │ │ │ -1258 dst[vValue].AddWithWeight(src[vValue], 2.0f/3.0f); │ │ │ │ │ -1259 } │ │ │ │ │ -1260 } │ │ │ │ │ -1261 } │ │ │ │ │ -1262 } │ │ │ │ │ -1263} │ │ │ │ │ -1264 │ │ │ │ │ -_1_2_6_5class _P_r_i_m_v_a_r_R_e_f_i_n_e_r : public _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l { │ │ │ │ │ -1266public: │ │ │ │ │ -_1_2_6_7 _P_r_i_m_v_a_r_R_e_f_i_n_e_r(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner) │ │ │ │ │ -1268 : _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(refiner) { } │ │ │ │ │ -1269}; │ │ │ │ │ -1270 │ │ │ │ │ -1271} // end namespace Far │ │ │ │ │ -1272 │ │ │ │ │ -1273} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -1274using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -1275} // end namespace OpenSubdiv │ │ │ │ │ -1276 │ │ │ │ │ -1277#endif /* OPENSUBDIV3_FAR_PRIMVAR_REFINER_H */ │ │ │ │ │ +60 │ │ │ │ │ +_6_3 int _G_e_t_N_u_m_F_a_c_e_s() const; │ │ │ │ │ +64 │ │ │ │ │ +_6_7 int _G_e_t_F_a_c_e_I_d(_I_n_d_e_x f) const; │ │ │ │ │ +68 │ │ │ │ │ +_8_3 void _G_e_t_A_d_j_a_c_e_n_c_y( │ │ │ │ │ +84 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner, │ │ │ │ │ +85 int face, int quadrant, │ │ │ │ │ +86 int adjFaces[4], int adjEdges[4]) const; │ │ │ │ │ +87 │ │ │ │ │ +89 │ │ │ │ │ +90private: │ │ │ │ │ +91 │ │ │ │ │ +92 void initializePtexIndices(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner); │ │ │ │ │ +93 │ │ │ │ │ +94private: │ │ │ │ │ +95 │ │ │ │ │ +96 std::vector _ptexIndices; │ │ │ │ │ +97}; │ │ │ │ │ +98 │ │ │ │ │ +99 │ │ │ │ │ +100} // end namespace Far │ │ │ │ │ +101 │ │ │ │ │ +102} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +103using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +104} // end namespace OpenSubdiv │ │ │ │ │ +105 │ │ │ │ │ +106#endif /* OPENSUBDIV3_FAR_PTEX_INDICES_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ -Vtr::LocalIndex LocalIndex │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_E_r_r_o_r │ │ │ │ │ -void Error(ErrorType err, const char *format,...) │ │ │ │ │ -Sends an OSD error with a message (internal use only) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -Vtr::ConstIndexArray ConstIndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -Vtr::ConstLocalIndexArray ConstLocalIndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ -@ FAR_RUNTIME_ERROR │ │ │ │ │ -Issue a generic runtime error, but continue execution. │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._h_:_4_0 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_I_n_d_e_x │ │ │ │ │ Vtr::Index Index │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d │ │ │ │ │ -bool IndexIsValid(Index index) │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R │ │ │ │ │ -@ SCHEME_BILINEAR │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K │ │ │ │ │ -@ SCHEME_CATMARK │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___L_O_O_P │ │ │ │ │ -@ SCHEME_LOOP │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ -Applies refinement operations to generic primvar data. │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t │ │ │ │ │ -void Limit(T const &src, U &dstPos) const │ │ │ │ │ -Apply limit weights to a primvar buffer. │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_1_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ -PrimvarRefinerReal(TopologyRefiner const &refiner) │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t │ │ │ │ │ -void Limit(T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m │ │ │ │ │ -void InterpolateFaceUniform(int level, T const &src, U &dst) const │ │ │ │ │ -Refine uniform (per-face) primvar data between levels. │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_9_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -TopologyRefiner const & GetTopologyRefiner() const │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g │ │ │ │ │ -void InterpolateVarying(int level, T const &src, U &dst) const │ │ │ │ │ -Apply only varying interpolation weights to a primvar buffer for a single level │ │ │ │ │ -of refinement. │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_4_1_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void Interpolate(int level, T const &src, U &dst) const │ │ │ │ │ -Apply vertex interpolation weights to a primvar buffer for a single level of │ │ │ │ │ -refinement. │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_2_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -void InterpolateFaceVarying(int level, T const &src, U &dst, int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Apply face-varying interpolation weights to a primvar buffer associated with a │ │ │ │ │ -particular face-varyin... │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_2_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_~_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ -~PrimvarRefinerReal() │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -void LimitFaceVarying(T const &src, U &dst, int channel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_1_2_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ -PrimvarRefiner(TopologyRefiner const &refiner) │ │ │ │ │ -DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_1_2_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +Object used to compute and query ptex face indices. │ │ │ │ │ +DDeeffiinniittiioonn _p_t_e_x_I_n_d_i_c_e_s_._h_:_4_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_F_a_c_e_I_d │ │ │ │ │ +int GetFaceId(Index f) const │ │ │ │ │ +Returns the ptex face index given a coarse face 'f' or -1. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +PtexIndices(TopologyRefiner const &refiner) │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_A_d_j_a_c_e_n_c_y │ │ │ │ │ +void GetAdjacency(TopologyRefiner const &refiner, int face, int quadrant, int │ │ │ │ │ +adjFaces[4], int adjEdges[4]) const │ │ │ │ │ +Returns ptex face adjacency information for a given coarse face. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ +int GetNumFaces() const │ │ │ │ │ +Returns the number of ptex faces in the mesh. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_t_e_x_I_n_d_i_c_e_s_:_:_~_P_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ +~PtexIndices() │ │ │ │ │ +Destructor. │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ Stores topology data for a specified set of refinement options. │ │ │ │ │ DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ -Rule │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E │ │ │ │ │ -@ RULE_CREASE │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e │ │ │ │ │ -Scheme is a class template which provides all implementation for the │ │ │ │ │ -subdivision schemes supported by... │ │ │ │ │ -DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_s_i_z_e │ │ │ │ │ -size_type size() const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_7_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ + * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/stencilTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/primvarRefiner.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,51 +90,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
stencilTable.h File Reference
│ │ │ │ +
primvarRefiner.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../sdc/types.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/bilinearScheme.h"
│ │ │ │ +#include "../sdc/catmarkScheme.h"
│ │ │ │ +#include "../sdc/loopScheme.h"
│ │ │ │ +#include "../vtr/level.h"
│ │ │ │ +#include "../vtr/fvarLevel.h"
│ │ │ │ +#include "../vtr/refinement.h"
│ │ │ │ +#include "../vtr/fvarRefinement.h"
│ │ │ │ +#include "../vtr/stackBuffer.h"
│ │ │ │ +#include "../vtr/componentInterfaces.h"
│ │ │ │ #include "../far/types.h"
│ │ │ │ +#include "../far/error.h"
│ │ │ │ +#include "../far/topologyLevel.h"
│ │ │ │ +#include "../far/topologyRefiner.h"
│ │ │ │ #include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <iostream>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  StencilReal< REAL >
 Vertex stencil descriptor. More...
class  PrimvarRefinerReal< REAL >
 Applies refinement operations to generic primvar data. More...
 
class  Stencil
 Vertex stencil class wrapping the template for compatibility. More...
 
class  StencilTableReal< REAL >
 Table of subdivision stencils. More...
 
class  StencilTable
 Stencil table class wrapping the template for compatibility. More...
 
class  LimitStencilReal< REAL >
 Limit point stencil descriptor. More...
 
class  LimitStencil
 Limit point stencil class wrapping the template for compatibility. More...
 
class  LimitStencilTableReal< REAL >
 Table of limit subdivision stencils. More...
 
class  LimitStencilTable
 Limit stencil table class wrapping the template for compatibility. More...
class  PrimvarRefiner
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -143,13 +135,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,51 +1,41 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -stencilTable.h File Reference │ │ │ │ │ +primvarRefiner.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_c_a_t_m_a_r_k_S_c_h_e_m_e_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_l_o_o_p_S_c_h_e_m_e_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_f_v_a_r_L_e_v_e_l_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h" │ │ │ │ │ #include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_e_r_r_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_L_e_v_e_l_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _S_t_e_n_c_i_l_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  Vertex stencil descriptor. _M_o_r_e_._._. │ │ │ │ │ +class   _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ +  Applies refinement operations to generic primvar data. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _S_t_e_n_c_i_l │ │ │ │ │ -  Vertex stencil class wrapping the template for compatibility. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  Table of subdivision stencils. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  _S_t_e_n_c_i_l table class wrapping the template for compatibility. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  Limit point stencil descriptor. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -  Limit point stencil class wrapping the template for compatibility. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_ _R_E_A_L_ _> │ │ │ │ │ -  Table of limit subdivision stencils. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ + * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,10 +1,4 @@ │ │ │ │ │ var a00725 = [ │ │ │ │ │ - ["StencilReal< REAL >", "a01053.html", "a01053"], │ │ │ │ │ - ["Stencil", "a01057.html", "a01057"], │ │ │ │ │ - ["StencilTableReal< REAL >", "a01061.html", "a01061"], │ │ │ │ │ - ["StencilTable", "a01065.html", "a01065"], │ │ │ │ │ - ["LimitStencilReal< REAL >", "a01069.html", "a01069"], │ │ │ │ │ - ["LimitStencil", "a01073.html", "a01073"], │ │ │ │ │ - ["LimitStencilTableReal< REAL >", "a01077.html", "a01077"], │ │ │ │ │ - ["LimitStencilTable", "a01081.html", "a01081"] │ │ │ │ │ + ["PrimvarRefinerReal< REAL >", "a01029.html", "a01029"], │ │ │ │ │ + ["PrimvarRefiner", "a01037.html", "a01037"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/stencilTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/primvarRefiner.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
stencilTable.h
│ │ │ │ +
primvarRefiner.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,893 +118,1233 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ -
27
│ │ │ │ -
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../far/types.h"
│ │ │ │ -
31
│ │ │ │ -
32#include <cassert>
│ │ │ │ -
33#include <cstring>
│ │ │ │ -
34#include <vector>
│ │ │ │ -
35#include <iostream>
│ │ │ │ -
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ -
39
│ │ │ │ -
40namespace Far {
│ │ │ │ -
41
│ │ │ │ -
42// Forward declarations for friends:
│ │ │ │ -
43class PatchTableBuilder;
│ │ │ │ +
24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H
│ │ │ │ +
25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_H
│ │ │ │ +
26
│ │ │ │ +
27#include "../version.h"
│ │ │ │ +
28
│ │ │ │ +
29#include "../sdc/types.h"
│ │ │ │ +
30#include "../sdc/options.h"
│ │ │ │ +
31#include "../sdc/bilinearScheme.h"
│ │ │ │ +
32#include "../sdc/catmarkScheme.h"
│ │ │ │ +
33#include "../sdc/loopScheme.h"
│ │ │ │ +
34#include "../vtr/level.h"
│ │ │ │ +
35#include "../vtr/fvarLevel.h"
│ │ │ │ +
36#include "../vtr/refinement.h"
│ │ │ │ +
37#include "../vtr/fvarRefinement.h"
│ │ │ │ +
38#include "../vtr/stackBuffer.h"
│ │ │ │ +
39#include "../vtr/componentInterfaces.h"
│ │ │ │ +
40#include "../far/types.h"
│ │ │ │ +
41#include "../far/error.h"
│ │ │ │ +
42#include "../far/topologyLevel.h"
│ │ │ │ +
43#include "../far/topologyRefiner.h"
│ │ │ │
44
│ │ │ │ -
45template <typename REAL> class StencilTableFactoryReal;
│ │ │ │ -
46template <typename REAL> class LimitStencilTableFactoryReal;
│ │ │ │ -
47
│ │ │ │ -
52template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54public:
│ │ │ │ -
55
│ │ │ │ - │ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
67 StencilReal(int * size, Index * indices, REAL * weights)
│ │ │ │ -
68 : _size(size), _indices(indices), _weights(weights) { }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
71 StencilReal(StencilReal const & other) {
│ │ │ │ -
72 _size = other._size;
│ │ │ │ -
73 _indices = other._indices;
│ │ │ │ -
74 _weights = other._weights;
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
│ │ │ │ -
78 int GetSize() const {
│ │ │ │ -
79 return *_size;
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
83 int * GetSizePtr() const {
│ │ │ │ -
84 return _size;
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
88 Index const * GetVertexIndices() const {
│ │ │ │ -
89 return _indices;
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
│ │ │ │ -
93 REAL const * GetWeights() const {
│ │ │ │ -
94 return _weights;
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
98 void Next() {
│ │ │ │ -
99 int stride = *_size;
│ │ │ │ -
100 ++_size;
│ │ │ │ -
101 _indices += stride;
│ │ │ │ -
102 _weights += stride;
│ │ │ │ -
103 }
│ │ │ │ -
104
│ │ │ │ -
105protected:
│ │ │ │ -
106 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ -
107 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ -
108
│ │ │ │ -
109 int * _size;
│ │ │ │ - │ │ │ │ -
111 REAL * _weights;
│ │ │ │ -
112};
│ │ │ │ -
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
116class Stencil : public StencilReal<float> {
│ │ │ │ -
117protected:
│ │ │ │ - │ │ │ │ -
119
│ │ │ │ -
120public:
│ │ │ │ - │ │ │ │ -
122 Stencil(BaseStencil const & other) : BaseStencil(other) { }
│ │ │ │ -
│ │ │ │ -
123 Stencil(int * size, Index * indices, float * weights)
│ │ │ │ -
124 : BaseStencil(size, indices, weights) { }
│ │ │ │ -
│ │ │ │ -
125};
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
127
│ │ │ │ -
140template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
142protected:
│ │ │ │ -
143 StencilTableReal(int numControlVerts,
│ │ │ │ -
144 std::vector<int> const& offsets,
│ │ │ │ -
145 std::vector<int> const& sizes,
│ │ │ │ -
146 std::vector<int> const& sources,
│ │ │ │ -
147 std::vector<REAL> const& weights,
│ │ │ │ -
148 bool includeCoarseVerts,
│ │ │ │ -
149 size_t firstOffset);
│ │ │ │ -
150
│ │ │ │ -
151public:
│ │ │ │ -
152
│ │ │ │ -
153 virtual ~StencilTableReal() {};
│ │ │ │ -
154
│ │ │ │ -
│ │ │ │ -
156 int GetNumStencils() const {
│ │ │ │ -
157 return (int)_sizes.size();
│ │ │ │ -
158 }
│ │ │ │ -
│ │ │ │ -
159
│ │ │ │ +
45#include <cassert>
│ │ │ │ +
46
│ │ │ │ +
47namespace OpenSubdiv {
│ │ │ │ +
48namespace OPENSUBDIV_VERSION {
│ │ │ │ +
49
│ │ │ │ +
50namespace Far {
│ │ │ │ +
51
│ │ │ │ +
55template <typename REAL>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57
│ │ │ │ +
58public:
│ │ │ │ +
59 PrimvarRefinerReal(TopologyRefiner const & refiner) : _refiner(refiner) { }
│ │ │ │ + │ │ │ │ +
61
│ │ │ │ +
62 TopologyRefiner const & GetTopologyRefiner() const { return _refiner; }
│ │ │ │ +
63
│ │ │ │ +
65
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
113 template <class T, class U> void Interpolate(int level, T const & src, U & dst) const;
│ │ │ │ +
114
│ │ │ │ +
│ │ │ │ +
130 template <class T, class U> void InterpolateVarying(int level, T const & src, U & dst) const;
│ │ │ │ +
131
│ │ │ │ +
│ │ │ │ +
148 template <class T, class U> void InterpolateFaceUniform(int level, T const & src, U & dst) const;
│ │ │ │ +
149
│ │ │ │
│ │ │ │ - │ │ │ │ -
162 return _numControlVertices;
│ │ │ │ -
163 }
│ │ │ │ -
│ │ │ │ -
164
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
167
│ │ │ │ -
│ │ │ │ -
169 std::vector<int> const & GetSizes() const {
│ │ │ │ -
170 return _sizes;
│ │ │ │ -
171 }
│ │ │ │ -
│ │ │ │ -
172
│ │ │ │ -
│ │ │ │ -
174 std::vector<Index> const & GetOffsets() const {
│ │ │ │ -
175 return _offsets;
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
│ │ │ │ -
179 std::vector<Index> const & GetControlIndices() const {
│ │ │ │ -
180 return _indices;
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182
│ │ │ │ -
│ │ │ │ -
184 std::vector<REAL> const & GetWeights() const {
│ │ │ │ -
185 return _weights;
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
161 template <class T, class U> void InterpolateFaceVarying(int level, T const & src, U & dst, int channel = 0) const;
│ │ │ │ +
162
│ │ │ │ +
163
│ │ │ │ +
│ │ │ │ +
175 template <class T, class U> void Limit(T const & src, U & dstPos) const;
│ │ │ │ +
176
│ │ │ │ +
177 template <class T, class U, class U1, class U2>
│ │ │ │ +
│ │ │ │ +
178 void Limit(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const;
│ │ │ │ +
179
│ │ │ │ +
│ │ │ │ +
180 template <class T, class U> void LimitFaceVarying(T const & src, U & dst, int channel = 0) const;
│ │ │ │ +
181
│ │ │ │ +
183
│ │ │ │ +
184private:
│ │ │ │ +
185 typedef REAL Weight;
│ │ │ │ +
186
│ │ │ │ +
187 // Non-copyable:
│ │ │ │ +
188 PrimvarRefinerReal(PrimvarRefinerReal const & src) : _refiner(src._refiner) { }
│ │ │ │ +
189 PrimvarRefinerReal & operator=(PrimvarRefinerReal const &) { return *this; }
│ │ │ │
190
│ │ │ │ -
204 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
205 void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=-1) const {
│ │ │ │ -
206 this->update(srcValues, dstValues, _weights, start, end);
│ │ │ │ -
207 }
│ │ │ │ -
│ │ │ │ -
208
│ │ │ │ -
209 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
210 void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef,
│ │ │ │ -
211 U &dstValues, Index start=-1, Index end=-1) const {
│ │ │ │ -
212 this->update(srcBase, numBase, srcRef, dstValues, _weights, start, end);
│ │ │ │ -
213 }
│ │ │ │ -
│ │ │ │ -
214
│ │ │ │ -
215 // Pointer interface for backward compatibility
│ │ │ │ -
216 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
217 void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const {
│ │ │ │ -
218 this->update(src, dst, _weights, start, end);
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
221 void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ -
222 U *dst, Index start=-1, Index end=-1) const {
│ │ │ │ -
223 this->update(srcBase, numBase, srcRef, dst, _weights, start, end);
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
227 void Clear();
│ │ │ │ -
228
│ │ │ │ -
229protected:
│ │ │ │ -
230
│ │ │ │ -
231 // Update values by applying cached stencil weights to new control values
│ │ │ │ -
232 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
233 void update( T const &srcValues, U &dstValues,
│ │ │ │ -
234 std::vector<REAL> const & valueWeights, Index start, Index end) const;
│ │ │ │ -
235 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
236 void update( T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues,
│ │ │ │ -
237 std::vector<REAL> const & valueWeights, Index start, Index end) const;
│ │ │ │ -
238
│ │ │ │ -
239 // Populate the offsets table from the stencil sizes in _sizes (factory helper)
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
191 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromFaces(int, T const &, U &) const;
│ │ │ │ +
192 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromEdges(int, T const &, U &) const;
│ │ │ │ +
193 template <Sdc::SchemeType SCHEME, class T, class U> void interpFromVerts(int, T const &, U &) const;
│ │ │ │ +
194
│ │ │ │ +
195 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromFaces(int, T const &, U &, int) const;
│ │ │ │ +
196 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromEdges(int, T const &, U &, int) const;
│ │ │ │ +
197 template <Sdc::SchemeType SCHEME, class T, class U> void interpFVarFromVerts(int, T const &, U &, int) const;
│ │ │ │ +
198
│ │ │ │ +
199 template <Sdc::SchemeType SCHEME, class T, class U, class U1, class U2>
│ │ │ │ +
200 void limit(T const & src, U & pos, U1 * tan1, U2 * tan2) const;
│ │ │ │ +
201
│ │ │ │ +
202 template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
203 void limitFVar(T const & src, U & dst, int channel) const;
│ │ │ │ +
204
│ │ │ │ +
205private:
│ │ │ │ +
206 TopologyRefiner const & _refiner;
│ │ │ │ +
207
│ │ │ │ +
208private:
│ │ │ │ +
209 //
│ │ │ │ +
210 // Local class to fulfill interface for <typename MASK> in the Scheme mask queries:
│ │ │ │ +
211 //
│ │ │ │ +
212 class Mask {
│ │ │ │ +
213 public:
│ │ │ │ +
214 typedef REAL Weight; // Also part of the expected interface
│ │ │ │ +
215
│ │ │ │ +
216 public:
│ │ │ │ +
217 Mask(Weight* v, Weight* e, Weight* f) :
│ │ │ │ +
218 _vertWeights(v), _edgeWeights(e), _faceWeights(f),
│ │ │ │ +
219 _vertCount(0), _edgeCount(0), _faceCount(0),
│ │ │ │ +
220 _faceWeightsForFaceCenters(false)
│ │ │ │ +
221 { }
│ │ │ │ +
222
│ │ │ │ +
223 ~Mask() { }
│ │ │ │ +
224
│ │ │ │ +
225 public: // Generic interface expected of <typename MASK>:
│ │ │ │ +
226 int GetNumVertexWeights() const { return _vertCount; }
│ │ │ │ +
227 int GetNumEdgeWeights() const { return _edgeCount; }
│ │ │ │ +
228 int GetNumFaceWeights() const { return _faceCount; }
│ │ │ │ +
229
│ │ │ │ +
230 void SetNumVertexWeights(int count) { _vertCount = count; }
│ │ │ │ +
231 void SetNumEdgeWeights( int count) { _edgeCount = count; }
│ │ │ │ +
232 void SetNumFaceWeights( int count) { _faceCount = count; }
│ │ │ │ +
233
│ │ │ │ +
234 Weight const& VertexWeight(int index) const { return _vertWeights[index]; }
│ │ │ │ +
235 Weight const& EdgeWeight( int index) const { return _edgeWeights[index]; }
│ │ │ │ +
236 Weight const& FaceWeight( int index) const { return _faceWeights[index]; }
│ │ │ │ +
237
│ │ │ │ +
238 Weight& VertexWeight(int index) { return _vertWeights[index]; }
│ │ │ │ +
239 Weight& EdgeWeight( int index) { return _edgeWeights[index]; }
│ │ │ │ +
240 Weight& FaceWeight( int index) { return _faceWeights[index]; }
│ │ │ │
241
│ │ │ │ -
242 // Resize the table arrays (factory helper)
│ │ │ │ -
│ │ │ │ -
243 void resize(int nstencils, int nelems);
│ │ │ │ +
242 bool AreFaceWeightsForFaceCenters() const { return _faceWeightsForFaceCenters; }
│ │ │ │ +
243 void SetFaceWeightsForFaceCenters(bool on) { _faceWeightsForFaceCenters = on; }
│ │ │ │
244
│ │ │ │ -
245 // Reserves the table arrays (factory helper)
│ │ │ │ -
│ │ │ │ -
246 void reserve(int nstencils, int nelems);
│ │ │ │ -
247
│ │ │ │ -
248 // Reallocates the table arrays to remove excess capacity (factory helper)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
250
│ │ │ │ -
251 // Performs any final operations on internal tables (factory helper)
│ │ │ │ -
│ │ │ │ -
252 void finalize();
│ │ │ │ +
245 private:
│ │ │ │ +
246 Weight* _vertWeights;
│ │ │ │ +
247 Weight* _edgeWeights;
│ │ │ │ +
248 Weight* _faceWeights;
│ │ │ │ +
249
│ │ │ │ +
250 int _vertCount;
│ │ │ │ +
251 int _edgeCount;
│ │ │ │ +
252 int _faceCount;
│ │ │ │
253
│ │ │ │ -
254protected:
│ │ │ │ - │ │ │ │ -
256 StencilTableReal(int numControlVerts)
│ │ │ │ -
257 : _numControlVertices(numControlVerts)
│ │ │ │ -
258 { }
│ │ │ │ -
259
│ │ │ │ -
260 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ - │ │ │ │ -
262
│ │ │ │ -
263 int _numControlVertices; // number of control vertices
│ │ │ │ -
264
│ │ │ │ -
265 std::vector<int> _sizes; // number of coefficients for each stencil
│ │ │ │ -
266 std::vector<Index> _offsets, // offset to the start of each stencil
│ │ │ │ -
267 _indices; // indices of contributing coarse vertices
│ │ │ │ -
268 std::vector<REAL> _weights; // stencil weight coefficients
│ │ │ │ -
269};
│ │ │ │ +
254 bool _faceWeightsForFaceCenters;
│ │ │ │ +
255 };
│ │ │ │ +
256};
│ │ │ │ +
257
│ │ │ │ +
258
│ │ │ │ +
259//
│ │ │ │ +
260// Public entry points to the methods. Queries of the scheme type and its
│ │ │ │ +
261// use as a template parameter in subsequent implementation will be factored
│ │ │ │ +
262// out of a later release:
│ │ │ │ +
263//
│ │ │ │ +
264template <typename REAL>
│ │ │ │ +
265template <class T, class U>
│ │ │ │ +
266inline void
│ │ │ │ +
│ │ │ │ +
267PrimvarRefinerReal<REAL>::Interpolate(int level, T const & src, U & dst) const {
│ │ │ │ +
268
│ │ │ │ +
269 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │
270
│ │ │ │ -
│ │ │ │ -
273class StencilTable : public StencilTableReal<float> {
│ │ │ │ -
274protected:
│ │ │ │ - │ │ │ │ -
276
│ │ │ │ -
277public:
│ │ │ │ -
│ │ │ │ -
278 Stencil GetStencil(Index index) const {
│ │ │ │ -
279 return Stencil(BaseTable::GetStencil(index));
│ │ │ │ -
280 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
281 Stencil operator[] (Index index) const {
│ │ │ │ -
282 return Stencil(BaseTable::GetStencil(index));
│ │ │ │ -
283 }
│ │ │ │ -
│ │ │ │ -
284
│ │ │ │ -
285protected:
│ │ │ │ - │ │ │ │ -
287 StencilTable(int numControlVerts) : BaseTable(numControlVerts) { }
│ │ │ │ -
│ │ │ │ -
288 StencilTable(int numControlVerts,
│ │ │ │ -
289 std::vector<int> const& offsets,
│ │ │ │ -
290 std::vector<int> const& sizes,
│ │ │ │ -
291 std::vector<int> const& sources,
│ │ │ │ -
292 std::vector<float> const& weights,
│ │ │ │ -
293 bool includeCoarseVerts,
│ │ │ │ -
294 size_t firstOffset)
│ │ │ │ -
295 : BaseTable(numControlVerts, offsets,
│ │ │ │ -
296 sizes, sources, weights, includeCoarseVerts, firstOffset) { }
│ │ │ │ -
│ │ │ │ -
297};
│ │ │ │ -
│ │ │ │ -
298
│ │ │ │ -
299
│ │ │ │ -
302template <typename REAL>
│ │ │ │ -
│ │ │ │ -
303class LimitStencilReal : public StencilReal<REAL> {
│ │ │ │ -
304public:
│ │ │ │ -
305
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
325 Index * indices,
│ │ │ │ -
326 REAL * weights,
│ │ │ │ -
327 REAL * duWeights=0,
│ │ │ │ -
328 REAL * dvWeights=0,
│ │ │ │ -
329 REAL * duuWeights=0,
│ │ │ │ -
330 REAL * duvWeights=0,
│ │ │ │ -
331 REAL * dvvWeights=0)
│ │ │ │ -
332 : StencilReal<REAL>(size, indices, weights),
│ │ │ │ -
333 _duWeights(duWeights),
│ │ │ │ -
334 _dvWeights(dvWeights),
│ │ │ │ -
335 _duuWeights(duuWeights),
│ │ │ │ -
336 _duvWeights(duvWeights),
│ │ │ │ -
337 _dvvWeights(dvvWeights) {
│ │ │ │ +
271 switch (_refiner._subdivType) {
│ │ │ │ + │ │ │ │ +
273 interpFromFaces<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ +
274 interpFromEdges<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ +
275 interpFromVerts<Sdc::SCHEME_CATMARK>(level, src, dst);
│ │ │ │ +
276 break;
│ │ │ │ +
277 case Sdc::SCHEME_LOOP:
│ │ │ │ +
278 interpFromFaces<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ +
279 interpFromEdges<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ +
280 interpFromVerts<Sdc::SCHEME_LOOP>(level, src, dst);
│ │ │ │ +
281 break;
│ │ │ │ + │ │ │ │ +
283 interpFromFaces<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ +
284 interpFromEdges<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ +
285 interpFromVerts<Sdc::SCHEME_BILINEAR>(level, src, dst);
│ │ │ │ +
286 break;
│ │ │ │ +
287 }
│ │ │ │ +
288}
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
290template <typename REAL>
│ │ │ │ +
291template <class T, class U>
│ │ │ │ +
292inline void
│ │ │ │ +
│ │ │ │ +
293PrimvarRefinerReal<REAL>::InterpolateFaceVarying(int level, T const & src, U & dst, int channel) const {
│ │ │ │ +
294
│ │ │ │ +
295 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ +
296
│ │ │ │ +
297 switch (_refiner._subdivType) {
│ │ │ │ + │ │ │ │ +
299 interpFVarFromFaces<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ +
300 interpFVarFromEdges<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ +
301 interpFVarFromVerts<Sdc::SCHEME_CATMARK>(level, src, dst, channel);
│ │ │ │ +
302 break;
│ │ │ │ +
303 case Sdc::SCHEME_LOOP:
│ │ │ │ +
304 interpFVarFromFaces<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ +
305 interpFVarFromEdges<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ +
306 interpFVarFromVerts<Sdc::SCHEME_LOOP>(level, src, dst, channel);
│ │ │ │ +
307 break;
│ │ │ │ + │ │ │ │ +
309 interpFVarFromFaces<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ +
310 interpFVarFromEdges<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ +
311 interpFVarFromVerts<Sdc::SCHEME_BILINEAR>(level, src, dst, channel);
│ │ │ │ +
312 break;
│ │ │ │ +
313 }
│ │ │ │ +
314}
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
316template <typename REAL>
│ │ │ │ +
317template <class T, class U>
│ │ │ │ +
318inline void
│ │ │ │ +
│ │ │ │ +
319PrimvarRefinerReal<REAL>::Limit(T const & src, U & dst) const {
│ │ │ │ +
320
│ │ │ │ +
321 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ + │ │ │ │ +
323 "Failure in PrimvarRefiner::Limit() -- "
│ │ │ │ +
324 "last level of refinement does not include full topology.");
│ │ │ │ +
325 return;
│ │ │ │ +
326 }
│ │ │ │ +
327
│ │ │ │ +
328 switch (_refiner._subdivType) {
│ │ │ │ + │ │ │ │ +
330 limit<Sdc::SCHEME_CATMARK>(src, dst, (U*)0, (U*)0);
│ │ │ │ +
331 break;
│ │ │ │ +
332 case Sdc::SCHEME_LOOP:
│ │ │ │ +
333 limit<Sdc::SCHEME_LOOP>(src, dst, (U*)0, (U*)0);
│ │ │ │ +
334 break;
│ │ │ │ + │ │ │ │ +
336 limit<Sdc::SCHEME_BILINEAR>(src, dst, (U*)0, (U*)0);
│ │ │ │ +
337 break;
│ │ │ │
338 }
│ │ │ │ +
339}
│ │ │ │
│ │ │ │ -
339
│ │ │ │ -
│ │ │ │ -
341 REAL const * GetDuWeights() const {
│ │ │ │ -
342 return _duWeights;
│ │ │ │ -
343 }
│ │ │ │ -
│ │ │ │ -
344
│ │ │ │ -
│ │ │ │ -
346 REAL const * GetDvWeights() const {
│ │ │ │ -
347 return _dvWeights;
│ │ │ │ -
348 }
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
│ │ │ │ -
351 REAL const * GetDuuWeights() const {
│ │ │ │ -
352 return _duuWeights;
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
│ │ │ │ -
356 REAL const * GetDuvWeights() const {
│ │ │ │ -
357 return _duvWeights;
│ │ │ │ -
358 }
│ │ │ │ -
│ │ │ │ -
359
│ │ │ │ -
│ │ │ │ -
361 REAL const * GetDvvWeights() const {
│ │ │ │ -
362 return _dvvWeights;
│ │ │ │ +
340
│ │ │ │ +
341template <typename REAL>
│ │ │ │ +
342template <class T, class U, class U1, class U2>
│ │ │ │ +
343inline void
│ │ │ │ +
│ │ │ │ +
344PrimvarRefinerReal<REAL>::Limit(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const {
│ │ │ │ +
345
│ │ │ │ +
346 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ + │ │ │ │ +
348 "Failure in PrimvarRefiner::Limit() -- "
│ │ │ │ +
349 "last level of refinement does not include full topology.");
│ │ │ │ +
350 return;
│ │ │ │ +
351 }
│ │ │ │ +
352
│ │ │ │ +
353 switch (_refiner._subdivType) {
│ │ │ │ + │ │ │ │ +
355 limit<Sdc::SCHEME_CATMARK>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ +
356 break;
│ │ │ │ +
357 case Sdc::SCHEME_LOOP:
│ │ │ │ +
358 limit<Sdc::SCHEME_LOOP>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ +
359 break;
│ │ │ │ + │ │ │ │ +
361 limit<Sdc::SCHEME_BILINEAR>(src, dstPos, &dstTan1, &dstTan2);
│ │ │ │ +
362 break;
│ │ │ │
363 }
│ │ │ │ +
364}
│ │ │ │
│ │ │ │ -
364
│ │ │ │ -
366 void Next() {
│ │ │ │ -
367 int stride = *this->_size;
│ │ │ │ -
368 ++this->_size;
│ │ │ │ -
369 this->_indices += stride;
│ │ │ │ -
370 this->_weights += stride;
│ │ │ │ -
371 if (_duWeights) _duWeights += stride;
│ │ │ │ -
372 if (_dvWeights) _dvWeights += stride;
│ │ │ │ -
373 if (_duuWeights) _duuWeights += stride;
│ │ │ │ -
374 if (_duvWeights) _duvWeights += stride;
│ │ │ │ -
375 if (_dvvWeights) _dvvWeights += stride;
│ │ │ │ +
365
│ │ │ │ +
366template <typename REAL>
│ │ │ │ +
367template <class T, class U>
│ │ │ │ +
368inline void
│ │ │ │ +
│ │ │ │ +
369PrimvarRefinerReal<REAL>::LimitFaceVarying(T const & src, U & dst, int channel) const {
│ │ │ │ +
370
│ │ │ │ +
371 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == 0) {
│ │ │ │ + │ │ │ │ +
373 "Failure in PrimvarRefiner::LimitFaceVarying() -- "
│ │ │ │ +
374 "last level of refinement does not include full topology.");
│ │ │ │ +
375 return;
│ │ │ │
376 }
│ │ │ │
377
│ │ │ │ -
378private:
│ │ │ │ -
379
│ │ │ │ -
380 friend class StencilTableFactoryReal<REAL>;
│ │ │ │ -
381 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ -
382
│ │ │ │ -
383 REAL * _duWeights, // pointer to stencil u derivative limit weights
│ │ │ │ -
384 * _dvWeights, // pointer to stencil v derivative limit weights
│ │ │ │ -
385 * _duuWeights, // pointer to stencil uu derivative limit weights
│ │ │ │ -
386 * _duvWeights, // pointer to stencil uv derivative limit weights
│ │ │ │ -
387 * _dvvWeights; // pointer to stencil vv derivative limit weights
│ │ │ │ -
388};
│ │ │ │ -
│ │ │ │ -
389
│ │ │ │ -
│ │ │ │ -
392class LimitStencil : public LimitStencilReal<float> {
│ │ │ │ -
393protected:
│ │ │ │ - │ │ │ │ +
378 switch (_refiner._subdivType) {
│ │ │ │ + │ │ │ │ +
380 limitFVar<Sdc::SCHEME_CATMARK>(src, dst, channel);
│ │ │ │ +
381 break;
│ │ │ │ +
382 case Sdc::SCHEME_LOOP:
│ │ │ │ +
383 limitFVar<Sdc::SCHEME_LOOP>(src, dst, channel);
│ │ │ │ +
384 break;
│ │ │ │ + │ │ │ │ +
386 limitFVar<Sdc::SCHEME_BILINEAR>(src, dst, channel);
│ │ │ │ +
387 break;
│ │ │ │ +
388 }
│ │ │ │ +
389}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
390
│ │ │ │ +
391template <typename REAL>
│ │ │ │ +
392template <class T, class U>
│ │ │ │ +
393inline void
│ │ │ │ +
│ │ │ │ +
394PrimvarRefinerReal<REAL>::InterpolateFaceUniform(int level, T const & src, U & dst) const {
│ │ │ │
395
│ │ │ │ -
396public:
│ │ │ │ -
397 LimitStencil(BaseStencil const & other) : BaseStencil(other) { }
│ │ │ │ -
│ │ │ │ -
398 LimitStencil(int* size, Index * indices, float * weights,
│ │ │ │ -
399 float * duWeights=0, float * dvWeights=0,
│ │ │ │ -
400 float * duuWeights=0, float * duvWeights=0, float * dvvWeights=0)
│ │ │ │ -
401 : BaseStencil(size, indices, weights,
│ │ │ │ -
402 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights) { }
│ │ │ │ -
│ │ │ │ -
403};
│ │ │ │ -
│ │ │ │ +
396 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ +
397
│ │ │ │ +
398 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
399 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ +
400
│ │ │ │ +
401 for (int cFace = 0; cFace < child.getNumFaces(); ++cFace) {
│ │ │ │ +
402
│ │ │ │ +
403 Vtr::Index pFace = refinement.getChildFaceParentFace(cFace);
│ │ │ │
404
│ │ │ │ -
405
│ │ │ │ -
408template <typename REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
410protected:
│ │ │ │ - │ │ │ │ -
412 int numControlVerts,
│ │ │ │ -
413 std::vector<int> const& offsets,
│ │ │ │ -
414 std::vector<int> const& sizes,
│ │ │ │ -
415 std::vector<int> const& sources,
│ │ │ │ -
416 std::vector<REAL> const& weights,
│ │ │ │ -
417 std::vector<REAL> const& duWeights,
│ │ │ │ -
418 std::vector<REAL> const& dvWeights,
│ │ │ │ -
419 std::vector<REAL> const& duuWeights,
│ │ │ │ -
420 std::vector<REAL> const& duvWeights,
│ │ │ │ -
421 std::vector<REAL> const& dvvWeights,
│ │ │ │ -
422 bool includeCoarseVerts,
│ │ │ │ -
423 size_t firstOffset);
│ │ │ │ +
405 dst[cFace] = src[pFace];
│ │ │ │ +
406 }
│ │ │ │ +
407}
│ │ │ │ +
│ │ │ │ +
408
│ │ │ │ +
409template <typename REAL>
│ │ │ │ +
410template <class T, class U>
│ │ │ │ +
411inline void
│ │ │ │ +
│ │ │ │ +
412PrimvarRefinerReal<REAL>::InterpolateVarying(int level, T const & src, U & dst) const {
│ │ │ │ +
413
│ │ │ │ +
414 assert(level>0 && level<=(int)_refiner._refinements.size());
│ │ │ │ +
415
│ │ │ │ +
416 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
417 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ +
418
│ │ │ │ +
419 //
│ │ │ │ +
420 // Group values to interpolate based on origin -- note that there may
│ │ │ │ +
421 // be none originating from faces:
│ │ │ │ +
422 //
│ │ │ │ +
423 if (refinement.getNumChildVerticesFromFaces() > 0) {
│ │ │ │
424
│ │ │ │ -
425public:
│ │ │ │ +
425 for (int face = 0; face < parent.getNumFaces(); ++face) {
│ │ │ │
426
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
427 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ +
428 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │
429
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
430 // Apply the weights to the parent face's vertices:
│ │ │ │ +
431 ConstIndexArray fVerts = parent.getFaceVertices(face);
│ │ │ │
432
│ │ │ │ -
│ │ │ │ -
434 std::vector<REAL> const & GetDuWeights() const {
│ │ │ │ -
435 return _duWeights;
│ │ │ │ -
436 }
│ │ │ │ -
│ │ │ │ -
437
│ │ │ │ -
│ │ │ │ -
439 std::vector<REAL> const & GetDvWeights() const {
│ │ │ │ -
440 return _dvWeights;
│ │ │ │ +
433 Weight fVaryingWeight = 1.0f / (Weight) fVerts.size();
│ │ │ │ +
434
│ │ │ │ +
435 dst[cVert].Clear();
│ │ │ │ +
436 for (int i = 0; i < fVerts.size(); ++i) {
│ │ │ │ +
437 dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight);
│ │ │ │ +
438 }
│ │ │ │ +
439 }
│ │ │ │ +
440 }
│ │ │ │
441 }
│ │ │ │ -
│ │ │ │ -
442
│ │ │ │ -
│ │ │ │ -
444 std::vector<REAL> const & GetDuuWeights() const {
│ │ │ │ -
445 return _duuWeights;
│ │ │ │ -
446 }
│ │ │ │ -
│ │ │ │ -
447
│ │ │ │ -
│ │ │ │ -
449 std::vector<REAL> const & GetDuvWeights() const {
│ │ │ │ -
450 return _duvWeights;
│ │ │ │ -
451 }
│ │ │ │ -
│ │ │ │ -
452
│ │ │ │ -
│ │ │ │ -
454 std::vector<REAL> const & GetDvvWeights() const {
│ │ │ │ -
455 return _dvvWeights;
│ │ │ │ -
456 }
│ │ │ │ -
│ │ │ │ -
457
│ │ │ │ -
475 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
476 void UpdateDerivs(T const & srcValues, U & uderivs, U & vderivs,
│ │ │ │ -
477 int start=-1, int end=-1) const {
│ │ │ │ -
478
│ │ │ │ -
479 this->update(srcValues, uderivs, _duWeights, start, end);
│ │ │ │ -
480 this->update(srcValues, vderivs, _dvWeights, start, end);
│ │ │ │ -
481 }
│ │ │ │ -
│ │ │ │ -
482
│ │ │ │ -
483 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
484 void UpdateDerivs(T1 const & srcBase, int numBase, T2 const & srcRef,
│ │ │ │ -
485 U & uderivs, U & vderivs, int start=-1, int end=-1) const {
│ │ │ │ -
486
│ │ │ │ -
487 this->update(srcBase, numBase, srcRef, uderivs, _duWeights, start, end);
│ │ │ │ -
488 this->update(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end);
│ │ │ │ -
489 }
│ │ │ │ -
│ │ │ │ -
490
│ │ │ │ -
491 // Pointer interface for backward compatibility
│ │ │ │ -
492 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
493 void UpdateDerivs(T const *src, U *uderivs, U *vderivs,
│ │ │ │ -
494 int start=-1, int end=-1) const {
│ │ │ │ -
495
│ │ │ │ -
496 this->update(src, uderivs, _duWeights, start, end);
│ │ │ │ -
497 this->update(src, vderivs, _dvWeights, start, end);
│ │ │ │ -
498 }
│ │ │ │ -
│ │ │ │ -
499 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
500 void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ -
501 U *uderivs, U *vderivs, int start=-1, int end=-1) const {
│ │ │ │ +
442 for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
│ │ │ │ +
443
│ │ │ │ +
444 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ +
445 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │ +
446
│ │ │ │ +
447 // Apply the weights to the parent edges's vertices
│ │ │ │ +
448 ConstIndexArray eVerts = parent.getEdgeVertices(edge);
│ │ │ │ +
449
│ │ │ │ +
450 dst[cVert].Clear();
│ │ │ │ +
451 dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f);
│ │ │ │ +
452 dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f);
│ │ │ │ +
453 }
│ │ │ │ +
454 }
│ │ │ │ +
455 for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
│ │ │ │ +
456
│ │ │ │ +
457 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ +
458 if (Vtr::IndexIsValid(cVert)) {
│ │ │ │ +
459
│ │ │ │ +
460 // Essentially copy the parent vertex:
│ │ │ │ +
461 dst[cVert].Clear();
│ │ │ │ +
462 dst[cVert].AddWithWeight(src[vert], 1.0f);
│ │ │ │ +
463 }
│ │ │ │ +
464 }
│ │ │ │ +
465}
│ │ │ │ +
│ │ │ │ +
466
│ │ │ │ +
467
│ │ │ │ +
468//
│ │ │ │ +
469// Internal implementation methods -- grouping vertices to be interpolated
│ │ │ │ +
470// based on the type of parent component from which they originated:
│ │ │ │ +
471//
│ │ │ │ +
472template <typename REAL>
│ │ │ │ +
473template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
474inline void
│ │ │ │ +
475PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const {
│ │ │ │ +
476
│ │ │ │ +
477 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
478 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ +
479
│ │ │ │ +
480 if (refinement.getNumChildVerticesFromFaces() == 0) return;
│ │ │ │ +
481
│ │ │ │ +
482 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
483
│ │ │ │ +
484 Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence());
│ │ │ │ +
485
│ │ │ │ +
486 for (int face = 0; face < parent.getNumFaces(); ++face) {
│ │ │ │ +
487
│ │ │ │ +
488 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ +
489 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
490 continue;
│ │ │ │ +
491
│ │ │ │ +
492 // Declare and compute mask weights for this vertex relative to its parent face:
│ │ │ │ +
493 ConstIndexArray fVerts = parent.getFaceVertices(face);
│ │ │ │ +
494
│ │ │ │ +
495 Mask fMask(fVertWeights, 0, 0);
│ │ │ │ +
496 Vtr::internal::FaceInterface fHood(fVerts.size());
│ │ │ │ +
497
│ │ │ │ +
498 scheme.ComputeFaceVertexMask(fHood, fMask);
│ │ │ │ +
499
│ │ │ │ +
500 // Apply the weights to the parent face's vertices:
│ │ │ │ +
501 dst[cVert].Clear();
│ │ │ │
502
│ │ │ │ -
503 this->update(srcBase, numBase, srcRef, uderivs, _duWeights, start, end);
│ │ │ │ -
504 this->update(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end);
│ │ │ │ -
505 }
│ │ │ │ -
│ │ │ │ -
506
│ │ │ │ -
527 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
528 void Update2ndDerivs(T const & srcValues,
│ │ │ │ -
529 U & uuderivs, U & uvderivs, U & vvderivs,
│ │ │ │ -
530 int start=-1, int end=-1) const {
│ │ │ │ +
503 for (int i = 0; i < fVerts.size(); ++i) {
│ │ │ │ +
504
│ │ │ │ +
505 dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]);
│ │ │ │ +
506 }
│ │ │ │ +
507 }
│ │ │ │ +
508}
│ │ │ │ +
509
│ │ │ │ +
510template <typename REAL>
│ │ │ │ +
511template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
512inline void
│ │ │ │ +
513PrimvarRefinerReal<REAL>::interpFromEdges(int level, T const & src, U & dst) const {
│ │ │ │ +
514
│ │ │ │ +
515 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
516 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ +
517 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ +
518
│ │ │ │ +
519 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
520
│ │ │ │ +
521 Vtr::internal::EdgeInterface eHood(parent);
│ │ │ │ +
522
│ │ │ │ +
523 Weight eVertWeights[2];
│ │ │ │ +
524 Vtr::internal::StackBuffer<Weight,8> eFaceWeights(parent.getMaxEdgeFaces());
│ │ │ │ +
525
│ │ │ │ +
526 for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
│ │ │ │ +
527
│ │ │ │ +
528 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ +
529 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
530 continue;
│ │ │ │
531
│ │ │ │ -
532 this->update(srcValues, uuderivs, _duuWeights, start, end);
│ │ │ │ -
533 this->update(srcValues, uvderivs, _duvWeights, start, end);
│ │ │ │ -
534 this->update(srcValues, vvderivs, _dvvWeights, start, end);
│ │ │ │ -
535 }
│ │ │ │ -
│ │ │ │ -
536
│ │ │ │ -
537 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
538 void Update2ndDerivs(T1 const & srcBase, int numBase, T2 const & srcRef,
│ │ │ │ -
539 U & uuderivs, U & uvderivs, U & vvderivs, int start=-1, int end=-1) const {
│ │ │ │ -
540
│ │ │ │ -
541 this->update(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end);
│ │ │ │ -
542 this->update(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end);
│ │ │ │ -
543 this->update(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end);
│ │ │ │ -
544 }
│ │ │ │ -
│ │ │ │ -
545
│ │ │ │ -
546 // Pointer interface for backward compatibility
│ │ │ │ -
547 template <class T, class U>
│ │ │ │ -
│ │ │ │ -
548 void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs,
│ │ │ │ -
549 int start=-1, int end=-1) const {
│ │ │ │ +
532 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ +
533 ConstIndexArray eVerts = parent.getEdgeVertices(edge),
│ │ │ │ +
534 eFaces = parent.getEdgeFaces(edge);
│ │ │ │ +
535
│ │ │ │ +
536 Mask eMask(eVertWeights, 0, eFaceWeights);
│ │ │ │ +
537
│ │ │ │ +
538 eHood.SetIndex(edge);
│ │ │ │ +
539
│ │ │ │ +
540 Sdc::Crease::Rule pRule = (parent.getEdgeSharpness(edge) > 0.0f) ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH;
│ │ │ │ +
541 Sdc::Crease::Rule cRule = child.getVertexRule(cVert);
│ │ │ │ +
542
│ │ │ │ +
543 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule);
│ │ │ │ +
544
│ │ │ │ +
545 // Apply the weights to the parent edges's vertices and (if applicable) to
│ │ │ │ +
546 // the child vertices of its incident faces:
│ │ │ │ +
547 dst[cVert].Clear();
│ │ │ │ +
548 dst[cVert].AddWithWeight(src[eVerts[0]], eVertWeights[0]);
│ │ │ │ +
549 dst[cVert].AddWithWeight(src[eVerts[1]], eVertWeights[1]);
│ │ │ │
550
│ │ │ │ -
551 this->update(src, uuderivs, _duuWeights, start, end);
│ │ │ │ -
552 this->update(src, uvderivs, _duvWeights, start, end);
│ │ │ │ -
553 this->update(src, vvderivs, _dvvWeights, start, end);
│ │ │ │ -
554 }
│ │ │ │ -
│ │ │ │ -
555 template <class T1, class T2, class U>
│ │ │ │ -
│ │ │ │ -
556 void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef,
│ │ │ │ -
557 U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const {
│ │ │ │ +
551 if (eMask.GetNumFaceWeights() > 0) {
│ │ │ │ +
552
│ │ │ │ +
553 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ +
554
│ │ │ │ +
555 if (eMask.AreFaceWeightsForFaceCenters()) {
│ │ │ │ +
556 assert(refinement.getNumChildVerticesFromFaces() > 0);
│ │ │ │ +
557 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(eFaces[i]);
│ │ │ │
558
│ │ │ │ -
559 this->update(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end);
│ │ │ │ -
560 this->update(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end);
│ │ │ │ -
561 this->update(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end);
│ │ │ │ -
562 }
│ │ │ │ -
│ │ │ │ -
563
│ │ │ │ -
565 void Clear();
│ │ │ │ -
566
│ │ │ │ -
567private:
│ │ │ │ -
568 friend class LimitStencilTableFactoryReal<REAL>;
│ │ │ │ -
569
│ │ │ │ -
570 // Resize the table arrays (factory helper)
│ │ │ │ -
571 void resize(int nstencils, int nelems);
│ │ │ │ -
572
│ │ │ │ -
573private:
│ │ │ │ -
574 std::vector<REAL> _duWeights, // u derivative limit stencil weights
│ │ │ │ -
575 _dvWeights, // v derivative limit stencil weights
│ │ │ │ -
576 _duuWeights, // uu derivative limit stencil weights
│ │ │ │ -
577 _duvWeights, // uv derivative limit stencil weights
│ │ │ │ -
578 _dvvWeights; // vv derivative limit stencil weights
│ │ │ │ -
579};
│ │ │ │ -
580
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
584protected:
│ │ │ │ - │ │ │ │ -
586
│ │ │ │ -
587public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
590 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
593 }
│ │ │ │ -
│ │ │ │ +
559 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ +
560 dst[cVert].AddWithWeight(dst[cVertOfFace], eFaceWeights[i]);
│ │ │ │ +
561 } else {
│ │ │ │ +
562 Vtr::Index pFace = eFaces[i];
│ │ │ │ +
563 ConstIndexArray pFaceEdges = parent.getFaceEdges(pFace),
│ │ │ │ +
564 pFaceVerts = parent.getFaceVertices(pFace);
│ │ │ │ +
565
│ │ │ │ +
566 int eInFace = 0;
│ │ │ │ +
567 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ;
│ │ │ │ +
568
│ │ │ │ +
569 int vInFace = eInFace + 2;
│ │ │ │ +
570 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts.size();
│ │ │ │ +
571
│ │ │ │ +
572 Vtr::Index pVertNext = pFaceVerts[vInFace];
│ │ │ │ +
573 dst[cVert].AddWithWeight(src[pVertNext], eFaceWeights[i]);
│ │ │ │ +
574 }
│ │ │ │ +
575 }
│ │ │ │ +
576 }
│ │ │ │ +
577 }
│ │ │ │ +
578}
│ │ │ │ +
579
│ │ │ │ +
580template <typename REAL>
│ │ │ │ +
581template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
582inline void
│ │ │ │ +
583PrimvarRefinerReal<REAL>::interpFromVerts(int level, T const & src, U & dst) const {
│ │ │ │ +
584
│ │ │ │ +
585 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
586 Vtr::internal::Level const & parent = refinement.parent();
│ │ │ │ +
587 Vtr::internal::Level const & child = refinement.child();
│ │ │ │ +
588
│ │ │ │ +
589 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
590
│ │ │ │ +
591 Vtr::internal::VertexInterface vHood(parent, child);
│ │ │ │ +
592
│ │ │ │ +
593 Vtr::internal::StackBuffer<Weight,32> weightBuffer(2*parent.getMaxValence());
│ │ │ │
594
│ │ │ │ -
595protected:
│ │ │ │ -
│ │ │ │ -
596 LimitStencilTable(int numControlVerts,
│ │ │ │ -
597 std::vector<int> const& offsets,
│ │ │ │ -
598 std::vector<int> const& sizes,
│ │ │ │ -
599 std::vector<int> const& sources,
│ │ │ │ -
600 std::vector<float> const& weights,
│ │ │ │ -
601 std::vector<float> const& duWeights,
│ │ │ │ -
602 std::vector<float> const& dvWeights,
│ │ │ │ -
603 std::vector<float> const& duuWeights,
│ │ │ │ -
604 std::vector<float> const& duvWeights,
│ │ │ │ -
605 std::vector<float> const& dvvWeights,
│ │ │ │ -
606 bool includeCoarseVerts,
│ │ │ │ -
607 size_t firstOffset)
│ │ │ │ -
608 : BaseTable(numControlVerts,
│ │ │ │ -
609 offsets, sizes, sources, weights,
│ │ │ │ -
610 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights,
│ │ │ │ -
611 includeCoarseVerts, firstOffset) { }
│ │ │ │ -
│ │ │ │ -
612};
│ │ │ │ -
│ │ │ │ -
613
│ │ │ │ -
614
│ │ │ │ -
615// Update values by applying cached stencil weights to new control values
│ │ │ │ -
616template <typename REAL>
│ │ │ │ -
617template <class T1, class T2, class U> void
│ │ │ │ -
│ │ │ │ -
618StencilTableReal<REAL>::update(T1 const &srcBase, int numBase,
│ │ │ │ -
619 T2 const &srcRef, U &dstValues,
│ │ │ │ -
620 std::vector<REAL> const &valueWeights, Index start, Index end) const {
│ │ │ │ -
621
│ │ │ │ -
622 int const * sizes = &_sizes.at(0);
│ │ │ │ -
623 Index const * indices = &_indices.at(0);
│ │ │ │ -
624 REAL const * weights = &valueWeights.at(0);
│ │ │ │ +
595 for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
│ │ │ │ +
596
│ │ │ │ +
597 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ +
598 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
599 continue;
│ │ │ │ +
600
│ │ │ │ +
601 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ +
602 ConstIndexArray vEdges = parent.getVertexEdges(vert),
│ │ │ │ +
603 vFaces = parent.getVertexFaces(vert);
│ │ │ │ +
604
│ │ │ │ +
605 Weight vVertWeight,
│ │ │ │ +
606 * vEdgeWeights = weightBuffer,
│ │ │ │ +
607 * vFaceWeights = vEdgeWeights + vEdges.size();
│ │ │ │ +
608
│ │ │ │ +
609 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights);
│ │ │ │ +
610
│ │ │ │ +
611 vHood.SetIndex(vert, cVert);
│ │ │ │ +
612
│ │ │ │ +
613 Sdc::Crease::Rule pRule = parent.getVertexRule(vert);
│ │ │ │ +
614 Sdc::Crease::Rule cRule = child.getVertexRule(cVert);
│ │ │ │ +
615
│ │ │ │ +
616 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule);
│ │ │ │ +
617
│ │ │ │ +
618 // Apply the weights to the parent vertex, the vertices opposite its incident
│ │ │ │ +
619 // edges, and the child vertices of its incident faces:
│ │ │ │ +
620 //
│ │ │ │ +
621 // In order to improve numerical precision, it's better to apply smaller weights
│ │ │ │ +
622 // first, so begin with the face-weights followed by the edge-weights and the
│ │ │ │ +
623 // vertex weight last.
│ │ │ │ +
624 dst[cVert].Clear();
│ │ │ │
625
│ │ │ │ -
626 if (start > 0) {
│ │ │ │ -
627 assert(start < (Index)_offsets.size());
│ │ │ │ -
628 sizes += start;
│ │ │ │ -
629 indices += _offsets[start];
│ │ │ │ -
630 weights += _offsets[start];
│ │ │ │ -
631 } else {
│ │ │ │ -
632 start = 0;
│ │ │ │ -
633 }
│ │ │ │ -
634
│ │ │ │ -
635 int nstencils = ((end < start) ? GetNumStencils() : end) - start;
│ │ │ │ -
636
│ │ │ │ -
637 for (int i = 0; i < nstencils; ++i, ++sizes) {
│ │ │ │ -
638 dstValues[start + i].Clear();
│ │ │ │ -
639 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) {
│ │ │ │ -
640 if (*indices < numBase) {
│ │ │ │ -
641 dstValues[start + i].AddWithWeight(srcBase[*indices], *weights);
│ │ │ │ -
642 } else {
│ │ │ │ -
643 dstValues[start + i].AddWithWeight(srcRef[*indices - numBase], *weights);
│ │ │ │ +
626 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ +
627 assert(vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ +
628
│ │ │ │ +
629 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ +
630
│ │ │ │ +
631 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(vFaces[i]);
│ │ │ │ +
632 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ +
633 dst[cVert].AddWithWeight(dst[cVertOfFace], vFaceWeights[i]);
│ │ │ │ +
634 }
│ │ │ │ +
635 }
│ │ │ │ +
636 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ +
637
│ │ │ │ +
638 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ +
639
│ │ │ │ +
640 ConstIndexArray eVerts = parent.getEdgeVertices(vEdges[i]);
│ │ │ │ +
641 Vtr::Index pVertOppositeEdge = (eVerts[0] == vert) ? eVerts[1] : eVerts[0];
│ │ │ │ +
642
│ │ │ │ +
643 dst[cVert].AddWithWeight(src[pVertOppositeEdge], vEdgeWeights[i]);
│ │ │ │
644 }
│ │ │ │
645 }
│ │ │ │ -
646 }
│ │ │ │ -
647}
│ │ │ │ -
│ │ │ │ -
648template <typename REAL>
│ │ │ │ -
649template <class T, class U> void
│ │ │ │ -
│ │ │ │ -
650StencilTableReal<REAL>::update(T const &srcValues, U &dstValues,
│ │ │ │ -
651 std::vector<REAL> const &valueWeights, Index start, Index end) const {
│ │ │ │ -
652
│ │ │ │ -
653 int const * sizes = &_sizes.at(0);
│ │ │ │ -
654 Index const * indices = &_indices.at(0);
│ │ │ │ -
655 REAL const * weights = &valueWeights.at(0);
│ │ │ │ -
656
│ │ │ │ -
657 if (start > 0) {
│ │ │ │ -
658 assert(start < (Index)_offsets.size());
│ │ │ │ -
659 sizes += start;
│ │ │ │ -
660 indices += _offsets[start];
│ │ │ │ -
661 weights += _offsets[start];
│ │ │ │ -
662 } else {
│ │ │ │ -
663 start = 0;
│ │ │ │ -
664 }
│ │ │ │ -
665
│ │ │ │ -
666 int nstencils = ((end < start) ? GetNumStencils() : end) - start;
│ │ │ │ +
646 dst[cVert].AddWithWeight(src[vert], vVertWeight);
│ │ │ │ +
647 }
│ │ │ │ +
648}
│ │ │ │ +
649
│ │ │ │ +
650
│ │ │ │ +
651//
│ │ │ │ +
652// Internal face-varying implementation details:
│ │ │ │ +
653//
│ │ │ │ +
654template <typename REAL>
│ │ │ │ +
655template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
656inline void
│ │ │ │ +
657PrimvarRefinerReal<REAL>::interpFVarFromFaces(int level, T const & src, U & dst, int channel) const {
│ │ │ │ +
658
│ │ │ │ +
659 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
660
│ │ │ │ +
661 if (refinement.getNumChildVerticesFromFaces() == 0) return;
│ │ │ │ +
662
│ │ │ │ +
663 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
664
│ │ │ │ +
665 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ +
666 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │
667
│ │ │ │ -
668 for (int i = 0; i < nstencils; ++i, ++sizes) {
│ │ │ │ -
669 dstValues[start + i].Clear();
│ │ │ │ -
670 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) {
│ │ │ │ -
671 dstValues[start + i].AddWithWeight(srcValues[*indices], *weights);
│ │ │ │ -
672 }
│ │ │ │ -
673 }
│ │ │ │ -
674}
│ │ │ │ -
│ │ │ │ -
675
│ │ │ │ -
676template <typename REAL>
│ │ │ │ -
677inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
679 Index offset=0;
│ │ │ │ -
680 int noffsets = (int)_sizes.size();
│ │ │ │ -
681 _offsets.resize(noffsets);
│ │ │ │ -
682 for (int i=0; i<(int)_sizes.size(); ++i ) {
│ │ │ │ -
683 _offsets[i]=offset;
│ │ │ │ -
684 offset+=_sizes[i];
│ │ │ │ -
685 }
│ │ │ │ -
686}
│ │ │ │ -
│ │ │ │ -
687
│ │ │ │ -
688template <typename REAL>
│ │ │ │ -
689inline void
│ │ │ │ -
│ │ │ │ -
690StencilTableReal<REAL>::resize(int nstencils, int nelems) {
│ │ │ │ -
691 _sizes.resize(nstencils);
│ │ │ │ -
692 _indices.resize(nelems);
│ │ │ │ -
693 _weights.resize(nelems);
│ │ │ │ -
694}
│ │ │ │ -
│ │ │ │ -
695
│ │ │ │ -
696template <typename REAL>
│ │ │ │ -
697inline void
│ │ │ │ -
│ │ │ │ -
698StencilTableReal<REAL>::reserve(int nstencils, int nelems) {
│ │ │ │ -
699 _sizes.reserve(nstencils);
│ │ │ │ -
700 _indices.reserve(nelems);
│ │ │ │ -
701 _weights.reserve(nelems);
│ │ │ │ -
702}
│ │ │ │ -
│ │ │ │ -
703
│ │ │ │ -
704template <typename REAL>
│ │ │ │ +
668 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ +
669 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │ +
670
│ │ │ │ +
671 Vtr::internal::StackBuffer<Weight,16> fValueWeights(parentLevel.getMaxValence());
│ │ │ │ +
672
│ │ │ │ +
673 for (int face = 0; face < parentLevel.getNumFaces(); ++face) {
│ │ │ │ +
674
│ │ │ │ +
675 Vtr::Index cVert = refinement.getFaceChildVertex(face);
│ │ │ │ +
676 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
677 continue;
│ │ │ │ +
678
│ │ │ │ +
679 Vtr::Index cVertValue = childFVar.getVertexValueOffset(cVert);
│ │ │ │ +
680
│ │ │ │ +
681 // The only difference for face-varying here is that we get the values associated
│ │ │ │ +
682 // with each face-vertex directly from the FVarLevel, rather than using the parent
│ │ │ │ +
683 // face-vertices directly. If any face-vertex has any sibling values, then we may
│ │ │ │ +
684 // get the wrong one using the face-vertex index directly.
│ │ │ │ +
685
│ │ │ │ +
686 // Declare and compute mask weights for this vertex relative to its parent face:
│ │ │ │ +
687 ConstIndexArray fValues = parentFVar.getFaceValues(face);
│ │ │ │ +
688
│ │ │ │ +
689 Mask fMask(fValueWeights, 0, 0);
│ │ │ │ +
690 Vtr::internal::FaceInterface fHood(fValues.size());
│ │ │ │ +
691
│ │ │ │ +
692 scheme.ComputeFaceVertexMask(fHood, fMask);
│ │ │ │ +
693
│ │ │ │ +
694 // Apply the weights to the parent face's vertices:
│ │ │ │ +
695 dst[cVertValue].Clear();
│ │ │ │ +
696
│ │ │ │ +
697 for (int i = 0; i < fValues.size(); ++i) {
│ │ │ │ +
698 dst[cVertValue].AddWithWeight(src[fValues[i]], fValueWeights[i]);
│ │ │ │ +
699 }
│ │ │ │ +
700 }
│ │ │ │ +
701}
│ │ │ │ +
702
│ │ │ │ +
703template <typename REAL>
│ │ │ │ +
704template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │
705inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
707 std::vector<int>(_sizes).swap(_sizes);
│ │ │ │ -
708 std::vector<Index>(_indices).swap(_indices);
│ │ │ │ -
709 std::vector<REAL>(_weights).swap(_weights);
│ │ │ │ -
710}
│ │ │ │ -
│ │ │ │ +
706PrimvarRefinerReal<REAL>::interpFVarFromEdges(int level, T const & src, U & dst, int channel) const {
│ │ │ │ +
707
│ │ │ │ +
708 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
709
│ │ │ │ +
710 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │
711
│ │ │ │ -
712template <typename REAL>
│ │ │ │ -
713inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
715 shrinkToFit();
│ │ │ │ -
716 generateOffsets();
│ │ │ │ -
717}
│ │ │ │ -
│ │ │ │ +
712 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ +
713 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │ +
714
│ │ │ │ +
715 Vtr::internal::FVarRefinement const & refineFVar = refinement.getFVarRefinement(channel);
│ │ │ │ +
716 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ +
717 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │
718
│ │ │ │ -
719// Returns a Stencil at index i in the table
│ │ │ │ -
720template <typename REAL>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
723 assert((! _offsets.empty()) && i<(int)_offsets.size());
│ │ │ │ -
724
│ │ │ │ -
725 Index ofs = _offsets[i];
│ │ │ │ -
726
│ │ │ │ -
727 return StencilReal<REAL>(const_cast<int*>(&_sizes[i]),
│ │ │ │ -
728 const_cast<Index*>(&_indices[ofs]),
│ │ │ │ -
729 const_cast<REAL*>(&_weights[ofs]));
│ │ │ │ -
730}
│ │ │ │ -
│ │ │ │ -
731
│ │ │ │ -
732template <typename REAL>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
735 return GetStencil(index);
│ │ │ │ -
736}
│ │ │ │ -
│ │ │ │ +
719 //
│ │ │ │ +
720 // Allocate and initialize (if linearly interpolated) interpolation weights for
│ │ │ │ +
721 // the edge mask:
│ │ │ │ +
722 //
│ │ │ │ +
723 Weight eVertWeights[2];
│ │ │ │ +
724 Vtr::internal::StackBuffer<Weight,8> eFaceWeights(parentLevel.getMaxEdgeFaces());
│ │ │ │ +
725
│ │ │ │ +
726 Mask eMask(eVertWeights, 0, eFaceWeights);
│ │ │ │ +
727
│ │ │ │ +
728 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == Sdc::SCHEME_BILINEAR);
│ │ │ │ +
729 if (isLinearFVar) {
│ │ │ │ +
730 eMask.SetNumVertexWeights(2);
│ │ │ │ +
731 eMask.SetNumEdgeWeights(0);
│ │ │ │ +
732 eMask.SetNumFaceWeights(0);
│ │ │ │ +
733
│ │ │ │ +
734 eVertWeights[0] = 0.5f;
│ │ │ │ +
735 eVertWeights[1] = 0.5f;
│ │ │ │ +
736 }
│ │ │ │
737
│ │ │ │ -
738template <typename REAL>
│ │ │ │ -
739inline void
│ │ │ │ -
740LimitStencilTableReal<REAL>::resize(int nstencils, int nelems) {
│ │ │ │ -
741 StencilTableReal<REAL>::resize(nstencils, nelems);
│ │ │ │ -
742 _duWeights.resize(nelems);
│ │ │ │ -
743 _dvWeights.resize(nelems);
│ │ │ │ -
744}
│ │ │ │ +
738 Vtr::internal::EdgeInterface eHood(parentLevel);
│ │ │ │ +
739
│ │ │ │ +
740 for (int edge = 0; edge < parentLevel.getNumEdges(); ++edge) {
│ │ │ │ +
741
│ │ │ │ +
742 Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
│ │ │ │ +
743 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
744 continue;
│ │ │ │
745
│ │ │ │ -
746// Returns a LimitStencil at index i in the table
│ │ │ │ -
747template <typename REAL>
│ │ │ │ -
748inline LimitStencilReal<REAL>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
750 assert((! this->GetOffsets().empty()) && i<(int)this->GetOffsets().size());
│ │ │ │ -
751
│ │ │ │ -
752 Index ofs = this->GetOffsets()[i];
│ │ │ │ -
753
│ │ │ │ -
754 if (!_duWeights.empty() && !_dvWeights.empty() &&
│ │ │ │ -
755 !_duuWeights.empty() && !_duvWeights.empty() && !_dvvWeights.empty()) {
│ │ │ │ - │ │ │ │ -
757 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ -
758 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ -
759 const_cast<REAL *>(&this->GetWeights()[ofs]),
│ │ │ │ -
760 const_cast<REAL *>(&GetDuWeights()[ofs]),
│ │ │ │ -
761 const_cast<REAL *>(&GetDvWeights()[ofs]),
│ │ │ │ -
762 const_cast<REAL *>(&GetDuuWeights()[ofs]),
│ │ │ │ -
763 const_cast<REAL *>(&GetDuvWeights()[ofs]),
│ │ │ │ -
764 const_cast<REAL *>(&GetDvvWeights()[ofs]) );
│ │ │ │ -
765 } else if (!_duWeights.empty() && !_dvWeights.empty()) {
│ │ │ │ - │ │ │ │ -
767 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ -
768 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ -
769 const_cast<REAL *>(&this->GetWeights()[ofs]),
│ │ │ │ -
770 const_cast<REAL *>(&GetDuWeights()[ofs]),
│ │ │ │ -
771 const_cast<REAL *>(&GetDvWeights()[ofs]) );
│ │ │ │ -
772 } else {
│ │ │ │ - │ │ │ │ -
774 const_cast<int *>(&this->GetSizes()[i]),
│ │ │ │ -
775 const_cast<Index *>(&this->GetControlIndices()[ofs]),
│ │ │ │ -
776 const_cast<REAL *>(&this->GetWeights()[ofs]) );
│ │ │ │ -
777 }
│ │ │ │ -
778}
│ │ │ │ -
│ │ │ │ -
779
│ │ │ │ -
780template <typename REAL>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
783 return GetLimitStencil(index);
│ │ │ │ -
784}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
785
│ │ │ │ -
786} // end namespace Far
│ │ │ │ -
787
│ │ │ │ -
788} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
789using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
790
│ │ │ │ -
791} // end namespace OpenSubdiv
│ │ │ │ +
746 ConstIndexArray cVertValues = childFVar.getVertexValues(cVert);
│ │ │ │ +
747
│ │ │ │ +
748 bool fvarEdgeVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues[0]);
│ │ │ │ +
749 if (fvarEdgeVertMatchesVertex) {
│ │ │ │ +
750 //
│ │ │ │ +
751 // If smoothly interpolated, compute new weights for the edge mask:
│ │ │ │ +
752 //
│ │ │ │ +
753 if (!isLinearFVar) {
│ │ │ │ +
754 eHood.SetIndex(edge);
│ │ │ │ +
755
│ │ │ │ +
756 Sdc::Crease::Rule pRule = (parentLevel.getEdgeSharpness(edge) > 0.0f)
│ │ │ │ +
757 ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH;
│ │ │ │ +
758 Sdc::Crease::Rule cRule = childLevel.getVertexRule(cVert);
│ │ │ │ +
759
│ │ │ │ +
760 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule);
│ │ │ │ +
761 }
│ │ │ │ +
762
│ │ │ │ +
763 // Apply the weights to the parent edge's vertices and (if applicable) to
│ │ │ │ +
764 // the child vertices of its incident faces:
│ │ │ │ +
765 //
│ │ │ │ +
766 // Even though the face-varying topology matches the vertex topology, we need
│ │ │ │ +
767 // to be careful here when getting values corresponding to the two end-vertices.
│ │ │ │ +
768 // While the edge may be continuous, the vertices at their ends may have
│ │ │ │ +
769 // discontinuities elsewhere in their neighborhood (i.e. on the "other side"
│ │ │ │ +
770 // of the end-vertex) and so have sibling values associated with them. In most
│ │ │ │ +
771 // cases the topology for an end-vertex will match and we can use it directly,
│ │ │ │ +
772 // but we must still check and retrieve as needed.
│ │ │ │ +
773 //
│ │ │ │ +
774 // Indices for values corresponding to face-vertices are guaranteed to match,
│ │ │ │ +
775 // so we can use the child-vertex indices directly.
│ │ │ │ +
776 //
│ │ │ │ +
777 // And by "directly", we always use getVertexValue(vertexIndex) to reference
│ │ │ │ +
778 // values in the "src" to account for the possible indirection that may exist at
│ │ │ │ +
779 // level 0 -- where there may be fewer values than vertices and an additional
│ │ │ │ +
780 // indirection is necessary. We can use a vertex index directly for "dst" when
│ │ │ │ +
781 // it matches.
│ │ │ │ +
782 //
│ │ │ │ +
783 Vtr::Index eVertValues[2];
│ │ │ │ +
784
│ │ │ │ +
785 parentFVar.getEdgeFaceValues(edge, 0, eVertValues);
│ │ │ │ +
786
│ │ │ │ +
787 Index cVertValue = cVertValues[0];
│ │ │ │ +
788
│ │ │ │ +
789 dst[cVertValue].Clear();
│ │ │ │ +
790 dst[cVertValue].AddWithWeight(src[eVertValues[0]], eVertWeights[0]);
│ │ │ │ +
791 dst[cVertValue].AddWithWeight(src[eVertValues[1]], eVertWeights[1]);
│ │ │ │
792
│ │ │ │ -
793#endif // OPENSUBDIV3_FAR_STENCILTABLE_H
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
793 if (eMask.GetNumFaceWeights() > 0) {
│ │ │ │ +
794
│ │ │ │ +
795 ConstIndexArray eFaces = parentLevel.getEdgeFaces(edge);
│ │ │ │ +
796
│ │ │ │ +
797 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ +
798 if (eMask.AreFaceWeightsForFaceCenters()) {
│ │ │ │ +
799
│ │ │ │ +
800 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(eFaces[i]);
│ │ │ │ +
801 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ +
802
│ │ │ │ +
803 Vtr::Index cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace);
│ │ │ │ +
804 dst[cVertValue].AddWithWeight(dst[cValueOfFace], eFaceWeights[i]);
│ │ │ │ +
805 } else {
│ │ │ │ +
806 Vtr::Index pFace = eFaces[i];
│ │ │ │ +
807 ConstIndexArray pFaceEdges = parentLevel.getFaceEdges(pFace),
│ │ │ │ +
808 pFaceVerts = parentLevel.getFaceVertices(pFace);
│ │ │ │ +
809
│ │ │ │ +
810 int eInFace = 0;
│ │ │ │ +
811 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ;
│ │ │ │ +
812
│ │ │ │ +
813 // Edge "i" spans vertices [i,i+1] so we want i+2...
│ │ │ │ +
814 int vInFace = eInFace + 2;
│ │ │ │ +
815 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts.size();
│ │ │ │ +
816
│ │ │ │ +
817 Vtr::Index pValueNext = parentFVar.getFaceValues(pFace)[vInFace];
│ │ │ │ +
818 dst[cVertValue].AddWithWeight(src[pValueNext], eFaceWeights[i]);
│ │ │ │ +
819 }
│ │ │ │ +
820 }
│ │ │ │ +
821 }
│ │ │ │ +
822 } else {
│ │ │ │ +
823 //
│ │ │ │ +
824 // Mismatched edge-verts should just be linearly interpolated between the pairs of
│ │ │ │ +
825 // values for each sibling of the child edge-vertex -- the question is: which face
│ │ │ │ +
826 // holds that pair of values for a given sibling?
│ │ │ │ +
827 //
│ │ │ │ +
828 // In the manifold case, the sibling and edge-face indices will correspond. We
│ │ │ │ +
829 // will eventually need to update this to account for > 3 incident faces.
│ │ │ │ +
830 //
│ │ │ │ +
831 for (int i = 0; i < cVertValues.size(); ++i) {
│ │ │ │ +
832 Vtr::Index eVertValues[2];
│ │ │ │ +
833 int eFaceIndex = refineFVar.getChildValueParentSource(cVert, i);
│ │ │ │ +
834 assert(eFaceIndex == i);
│ │ │ │ +
835
│ │ │ │ +
836 parentFVar.getEdgeFaceValues(edge, eFaceIndex, eVertValues);
│ │ │ │ +
837
│ │ │ │ +
838 Index cVertValue = cVertValues[i];
│ │ │ │ +
839
│ │ │ │ +
840 dst[cVertValue].Clear();
│ │ │ │ +
841 dst[cVertValue].AddWithWeight(src[eVertValues[0]], 0.5);
│ │ │ │ +
842 dst[cVertValue].AddWithWeight(src[eVertValues[1]], 0.5);
│ │ │ │ +
843 }
│ │ │ │ +
844 }
│ │ │ │ +
845 }
│ │ │ │ +
846}
│ │ │ │ +
847
│ │ │ │ +
848template <typename REAL>
│ │ │ │ +
849template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
850inline void
│ │ │ │ +
851PrimvarRefinerReal<REAL>::interpFVarFromVerts(int level, T const & src, U & dst, int channel) const {
│ │ │ │ +
852
│ │ │ │ +
853 Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
│ │ │ │ +
854
│ │ │ │ +
855 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
856
│ │ │ │ +
857 Vtr::internal::Level const & parentLevel = refinement.parent();
│ │ │ │ +
858 Vtr::internal::Level const & childLevel = refinement.child();
│ │ │ │ +
859
│ │ │ │ +
860 Vtr::internal::FVarRefinement const & refineFVar = refinement.getFVarRefinement(channel);
│ │ │ │ +
861 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel(channel);
│ │ │ │ +
862 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel(channel);
│ │ │ │ +
863
│ │ │ │ +
864 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == Sdc::SCHEME_BILINEAR);
│ │ │ │ +
865
│ │ │ │ +
866 Vtr::internal::StackBuffer<Weight,32> weightBuffer(2*parentLevel.getMaxValence());
│ │ │ │ +
867
│ │ │ │ +
868 Vtr::internal::StackBuffer<Vtr::Index,16> vEdgeValues(parentLevel.getMaxValence());
│ │ │ │ +
869
│ │ │ │ +
870 Vtr::internal::VertexInterface vHood(parentLevel, childLevel);
│ │ │ │ +
871
│ │ │ │ +
872 for (int vert = 0; vert < parentLevel.getNumVertices(); ++vert) {
│ │ │ │ +
873
│ │ │ │ +
874 Vtr::Index cVert = refinement.getVertexChildVertex(vert);
│ │ │ │ +
875 if (!Vtr::IndexIsValid(cVert))
│ │ │ │ +
876 continue;
│ │ │ │ +
877
│ │ │ │ +
878 ConstIndexArray pVertValues = parentFVar.getVertexValues(vert),
│ │ │ │ +
879 cVertValues = childFVar.getVertexValues(cVert);
│ │ │ │ +
880
│ │ │ │ +
881 bool fvarVertVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues[0]);
│ │ │ │ +
882 if (isLinearFVar && fvarVertVertMatchesVertex) {
│ │ │ │ +
883 dst[cVertValues[0]].Clear();
│ │ │ │ +
884 dst[cVertValues[0]].AddWithWeight(src[pVertValues[0]], 1.0f);
│ │ │ │ +
885 continue;
│ │ │ │ +
886 }
│ │ │ │ +
887
│ │ │ │ +
888 if (fvarVertVertMatchesVertex) {
│ │ │ │ +
889 //
│ │ │ │ +
890 // Declare and compute mask weights for this vertex relative to its parent edge:
│ │ │ │ +
891 //
│ │ │ │ +
892 // (We really need to encapsulate this somewhere else for use here and in the
│ │ │ │ +
893 // general case)
│ │ │ │ +
894 //
│ │ │ │ +
895 ConstIndexArray vEdges = parentLevel.getVertexEdges(vert);
│ │ │ │ +
896
│ │ │ │ +
897 Weight vVertWeight;
│ │ │ │ +
898 Weight * vEdgeWeights = weightBuffer;
│ │ │ │ +
899 Weight * vFaceWeights = vEdgeWeights + vEdges.size();
│ │ │ │ +
900
│ │ │ │ +
901 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights);
│ │ │ │ +
902
│ │ │ │ +
903 vHood.SetIndex(vert, cVert);
│ │ │ │ +
904
│ │ │ │ +
905 Sdc::Crease::Rule pRule = parentLevel.getVertexRule(vert);
│ │ │ │ +
906 Sdc::Crease::Rule cRule = childLevel.getVertexRule(cVert);
│ │ │ │ +
907
│ │ │ │ +
908 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule);
│ │ │ │ +
909
│ │ │ │ +
910 // Apply the weights to the parent vertex, the vertices opposite its incident
│ │ │ │ +
911 // edges, and the child vertices of its incident faces:
│ │ │ │ +
912 //
│ │ │ │ +
913 // Even though the face-varying topology matches the vertex topology, we need
│ │ │ │ +
914 // to be careful here when getting values corresponding to vertices at the
│ │ │ │ +
915 // ends of edges. While the edge may be continuous, the end vertex may have
│ │ │ │ +
916 // discontinuities elsewhere in their neighborhood (i.e. on the "other side"
│ │ │ │ +
917 // of the end-vertex) and so have sibling values associated with them. In most
│ │ │ │ +
918 // cases the topology for an end-vertex will match and we can use it directly,
│ │ │ │ +
919 // but we must still check and retrieve as needed.
│ │ │ │ +
920 //
│ │ │ │ +
921 // Indices for values corresponding to face-vertices are guaranteed to match,
│ │ │ │ +
922 // so we can use the child-vertex indices directly.
│ │ │ │ +
923 //
│ │ │ │ +
924 // And by "directly", we always use getVertexValue(vertexIndex) to reference
│ │ │ │ +
925 // values in the "src" to account for the possible indirection that may exist at
│ │ │ │ +
926 // level 0 -- where there may be fewer values than vertices and an additional
│ │ │ │ +
927 // indirection is necessary. We can use a vertex index directly for "dst" when
│ │ │ │ +
928 // it matches.
│ │ │ │ +
929 //
│ │ │ │ +
930 // As with applying the mask to vertex data, in order to improve numerical
│ │ │ │ +
931 // precision, it's better to apply smaller weights first, so begin with the
│ │ │ │ +
932 // face-weights followed by the edge-weights and the vertex weight last.
│ │ │ │ +
933 //
│ │ │ │ +
934 Vtr::Index pVertValue = pVertValues[0];
│ │ │ │ +
935 Vtr::Index cVertValue = cVertValues[0];
│ │ │ │ +
936
│ │ │ │ +
937 dst[cVertValue].Clear();
│ │ │ │ +
938 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ +
939 assert(vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ +
940
│ │ │ │ +
941 ConstIndexArray vFaces = parentLevel.getVertexFaces(vert);
│ │ │ │ +
942
│ │ │ │ +
943 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ +
944
│ │ │ │ +
945 Vtr::Index cVertOfFace = refinement.getFaceChildVertex(vFaces[i]);
│ │ │ │ +
946 assert(Vtr::IndexIsValid(cVertOfFace));
│ │ │ │ +
947
│ │ │ │ +
948 Vtr::Index cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace);
│ │ │ │ +
949 dst[cVertValue].AddWithWeight(dst[cValueOfFace], vFaceWeights[i]);
│ │ │ │ +
950 }
│ │ │ │ +
951 }
│ │ │ │ +
952 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ +
953
│ │ │ │ +
954 parentFVar.getVertexEdgeValues(vert, vEdgeValues);
│ │ │ │ +
955
│ │ │ │ +
956 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ +
957 dst[cVertValue].AddWithWeight(src[vEdgeValues[i]], vEdgeWeights[i]);
│ │ │ │ +
958 }
│ │ │ │ +
959 }
│ │ │ │ +
960 dst[cVertValue].AddWithWeight(src[pVertValue], vVertWeight);
│ │ │ │ +
961 } else {
│ │ │ │ +
962 //
│ │ │ │ +
963 // Each FVar value associated with a vertex will be either a corner or a crease,
│ │ │ │ +
964 // or potentially in transition from corner to crease:
│ │ │ │ +
965 // - if the CHILD is a corner, there can be no transition so we have a corner
│ │ │ │ +
966 // - otherwise if the PARENT is a crease, both will be creases (no transition)
│ │ │ │ +
967 // - otherwise the parent must be a corner and the child a crease (transition)
│ │ │ │ +
968 //
│ │ │ │ +
969 Vtr::internal::FVarLevel::ConstValueTagArray pValueTags = parentFVar.getVertexValueTags(vert);
│ │ │ │ +
970 Vtr::internal::FVarLevel::ConstValueTagArray cValueTags = childFVar.getVertexValueTags(cVert);
│ │ │ │ +
971
│ │ │ │ +
972 for (int cSiblingIndex = 0; cSiblingIndex < cVertValues.size(); ++cSiblingIndex) {
│ │ │ │ +
973 int pSiblingIndex = refineFVar.getChildValueParentSource(cVert, cSiblingIndex);
│ │ │ │ +
974 assert(pSiblingIndex == cSiblingIndex);
│ │ │ │ +
975
│ │ │ │ +
976 typedef Vtr::internal::FVarLevel::Sibling SiblingIntType;
│ │ │ │ +
977
│ │ │ │ +
978 SiblingIntType cSibling = (SiblingIntType) cSiblingIndex;
│ │ │ │ +
979 SiblingIntType pSibling = (SiblingIntType) pSiblingIndex;
│ │ │ │ +
980
│ │ │ │ +
981 Vtr::Index pVertValue = pVertValues[pSibling];
│ │ │ │ +
982 Vtr::Index cVertValue = cVertValues[cSibling];
│ │ │ │ +
983
│ │ │ │ +
984 dst[cVertValue].Clear();
│ │ │ │ +
985 if (isLinearFVar || cValueTags[cSibling].isCorner()) {
│ │ │ │ +
986 dst[cVertValue].AddWithWeight(src[pVertValue], 1.0f);
│ │ │ │ +
987 } else {
│ │ │ │ +
988 //
│ │ │ │ +
989 // We have either a crease or a transition from corner to crease -- in
│ │ │ │ +
990 // either case, we need the end values for the full/fractional crease:
│ │ │ │ +
991 //
│ │ │ │ +
992 Index pEndValues[2];
│ │ │ │ +
993 parentFVar.getVertexCreaseEndValues(vert, pSibling, pEndValues);
│ │ │ │ +
994
│ │ │ │ +
995 Weight vWeight = 0.75f;
│ │ │ │ +
996 Weight eWeight = 0.125f;
│ │ │ │ +
997
│ │ │ │ +
998 //
│ │ │ │ +
999 // If semi-sharp we need to apply fractional weighting -- if made sharp because
│ │ │ │ +
1000 // of the other sibling (dependent-sharp) use the fractional weight from that
│ │ │ │ +
1001 // other sibling (should only occur when there are 2):
│ │ │ │ +
1002 //
│ │ │ │ +
1003 if (pValueTags[pSibling].isSemiSharp()) {
│ │ │ │ +
1004 Weight wCorner = pValueTags[pSibling].isDepSharp()
│ │ │ │ +
1005 ? refineFVar.getFractionalWeight(vert, !pSibling, cVert, !cSibling)
│ │ │ │ +
1006 : refineFVar.getFractionalWeight(vert, pSibling, cVert, cSibling);
│ │ │ │ +
1007 Weight wCrease = 1.0f - wCorner;
│ │ │ │ +
1008
│ │ │ │ +
1009 vWeight = wCrease * 0.75f + wCorner;
│ │ │ │ +
1010 eWeight = wCrease * 0.125f;
│ │ │ │ +
1011 }
│ │ │ │ +
1012 dst[cVertValue].AddWithWeight(src[pEndValues[0]], eWeight);
│ │ │ │ +
1013 dst[cVertValue].AddWithWeight(src[pEndValues[1]], eWeight);
│ │ │ │ +
1014 dst[cVertValue].AddWithWeight(src[pVertValue], vWeight);
│ │ │ │ +
1015 }
│ │ │ │ +
1016 }
│ │ │ │ +
1017 }
│ │ │ │ +
1018 }
│ │ │ │ +
1019}
│ │ │ │ +
1020
│ │ │ │ +
1021template <typename REAL>
│ │ │ │ +
1022template <Sdc::SchemeType SCHEME, class T, class U, class U1, class U2>
│ │ │ │ +
1023inline void
│ │ │ │ +
1024PrimvarRefinerReal<REAL>::limit(T const & src, U & dstPos, U1 * dstTan1Ptr, U2 * dstTan2Ptr) const {
│ │ │ │ +
1025
│ │ │ │ +
1026 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
1027
│ │ │ │ +
1028 Vtr::internal::Level const & level = _refiner.getLevel(_refiner.GetMaxLevel());
│ │ │ │ +
1029
│ │ │ │ +
1030 int maxWeightsPerMask = 1 + 2 * level.getMaxValence();
│ │ │ │ +
1031 bool hasTangents = (dstTan1Ptr && dstTan2Ptr);
│ │ │ │ +
1032 int numMasks = 1 + (hasTangents ? 2 : 0);
│ │ │ │ +
1033
│ │ │ │ +
1034 Vtr::internal::StackBuffer<Index,33> indexBuffer(maxWeightsPerMask);
│ │ │ │ +
1035 Vtr::internal::StackBuffer<Weight,99> weightBuffer(numMasks * maxWeightsPerMask);
│ │ │ │ +
1036
│ │ │ │ +
1037 Weight * vPosWeights = weightBuffer,
│ │ │ │ +
1038 * ePosWeights = vPosWeights + 1,
│ │ │ │ +
1039 * fPosWeights = ePosWeights + level.getMaxValence();
│ │ │ │ +
1040 Weight * vTan1Weights = vPosWeights + maxWeightsPerMask,
│ │ │ │ +
1041 * eTan1Weights = ePosWeights + maxWeightsPerMask,
│ │ │ │ +
1042 * fTan1Weights = fPosWeights + maxWeightsPerMask;
│ │ │ │ +
1043 Weight * vTan2Weights = vTan1Weights + maxWeightsPerMask,
│ │ │ │ +
1044 * eTan2Weights = eTan1Weights + maxWeightsPerMask,
│ │ │ │ +
1045 * fTan2Weights = fTan1Weights + maxWeightsPerMask;
│ │ │ │ +
1046
│ │ │ │ +
1047 Mask posMask( vPosWeights, ePosWeights, fPosWeights);
│ │ │ │ +
1048 Mask tan1Mask(vTan1Weights, eTan1Weights, fTan1Weights);
│ │ │ │ +
1049 Mask tan2Mask(vTan2Weights, eTan2Weights, fTan2Weights);
│ │ │ │ +
1050
│ │ │ │ +
1051 // This is a bit obscure -- assigning both parent and child as last level -- but
│ │ │ │ +
1052 // this mask type was intended for another purpose. Consider one for the limit:
│ │ │ │ +
1053 Vtr::internal::VertexInterface vHood(level, level);
│ │ │ │ +
1054
│ │ │ │ +
1055 for (int vert = 0; vert < level.getNumVertices(); ++vert) {
│ │ │ │ +
1056 ConstIndexArray vEdges = level.getVertexEdges(vert);
│ │ │ │ +
1057
│ │ │ │ +
1058 // Incomplete vertices (present in sparse refinement) do not have their full
│ │ │ │ +
1059 // topological neighborhood to determine a proper limit -- just leave the
│ │ │ │ +
1060 // vertex at the refined location and continue to the next:
│ │ │ │ +
1061 if (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0)) {
│ │ │ │ +
1062 dstPos[vert].Clear();
│ │ │ │ +
1063 dstPos[vert].AddWithWeight(src[vert], 1.0);
│ │ │ │ +
1064 if (hasTangents) {
│ │ │ │ +
1065 (*dstTan1Ptr)[vert].Clear();
│ │ │ │ +
1066 (*dstTan2Ptr)[vert].Clear();
│ │ │ │ +
1067 }
│ │ │ │ +
1068 continue;
│ │ │ │ +
1069 }
│ │ │ │ +
1070
│ │ │ │ +
1071 //
│ │ │ │ +
1072 // Limit masks require the subdivision Rule for the vertex in order to deal
│ │ │ │ +
1073 // with infinitely sharp features correctly -- including boundaries and corners.
│ │ │ │ +
1074 // The vertex neighborhood is minimally defined with vertex and edge counts.
│ │ │ │ +
1075 //
│ │ │ │ +
1076 Sdc::Crease::Rule vRule = level.getVertexRule(vert);
│ │ │ │ +
1077
│ │ │ │ +
1078 // This is a bit obscure -- child vertex index will be ignored here
│ │ │ │ +
1079 vHood.SetIndex(vert, vert);
│ │ │ │ +
1080
│ │ │ │ +
1081 if (hasTangents) {
│ │ │ │ +
1082 scheme.ComputeVertexLimitMask(vHood, posMask, tan1Mask, tan2Mask, vRule);
│ │ │ │ +
1083 } else {
│ │ │ │ +
1084 scheme.ComputeVertexLimitMask(vHood, posMask, vRule);
│ │ │ │ +
1085 }
│ │ │ │ +
1086
│ │ │ │ +
1087 //
│ │ │ │ +
1088 // Gather the neighboring vertices of this vertex -- the vertices opposite its
│ │ │ │ +
1089 // incident edges, and the opposite vertices of its incident faces:
│ │ │ │ +
1090 //
│ │ │ │ +
1091 Index * eIndices = indexBuffer;
│ │ │ │ +
1092 Index * fIndices = indexBuffer + vEdges.size();
│ │ │ │ +
1093
│ │ │ │ +
1094 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ +
1095 ConstIndexArray eVerts = level.getEdgeVertices(vEdges[i]);
│ │ │ │ +
1096
│ │ │ │ +
1097 eIndices[i] = (eVerts[0] == vert) ? eVerts[1] : eVerts[0];
│ │ │ │ +
1098 }
│ │ │ │ +
1099 if (posMask.GetNumFaceWeights() || (hasTangents && tan1Mask.GetNumFaceWeights())) {
│ │ │ │ +
1100 ConstIndexArray vFaces = level.getVertexFaces(vert);
│ │ │ │ +
1101 ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vert);
│ │ │ │ +
1102
│ │ │ │ +
1103 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ +
1104 ConstIndexArray fVerts = level.getFaceVertices(vFaces[i]);
│ │ │ │ +
1105
│ │ │ │ +
1106 LocalIndex vOppInFace = (vInFace[i] + 2);
│ │ │ │ +
1107 if (vOppInFace >= fVerts.size()) vOppInFace -= (LocalIndex)fVerts.size();
│ │ │ │ +
1108
│ │ │ │ +
1109 fIndices[i] = level.getFaceVertices(vFaces[i])[vOppInFace];
│ │ │ │ +
1110 }
│ │ │ │ +
1111 }
│ │ │ │ +
1112
│ │ │ │ +
1113 //
│ │ │ │ +
1114 // Combine the weights and indices for position and tangents. As with applying
│ │ │ │ +
1115 // refinement masks to vertex data, in order to improve numerical precision, it's
│ │ │ │ +
1116 // better to apply smaller weights first, so begin with the face-weights followed
│ │ │ │ +
1117 // by the edge-weights and the vertex weight last.
│ │ │ │ +
1118 //
│ │ │ │ +
1119 dstPos[vert].Clear();
│ │ │ │ +
1120 for (int i = 0; i < posMask.GetNumFaceWeights(); ++i) {
│ │ │ │ +
1121 dstPos[vert].AddWithWeight(src[fIndices[i]], fPosWeights[i]);
│ │ │ │ +
1122 }
│ │ │ │ +
1123 for (int i = 0; i < posMask.GetNumEdgeWeights(); ++i) {
│ │ │ │ +
1124 dstPos[vert].AddWithWeight(src[eIndices[i]], ePosWeights[i]);
│ │ │ │ +
1125 }
│ │ │ │ +
1126 dstPos[vert].AddWithWeight(src[vert], vPosWeights[0]);
│ │ │ │ +
1127
│ │ │ │ +
1128 //
│ │ │ │ +
1129 // Apply the tangent masks -- both will have the same number of weights and
│ │ │ │ +
1130 // indices (one tangent may be "padded" to accommodate the other), but these
│ │ │ │ +
1131 // may differ from those of the position:
│ │ │ │ +
1132 //
│ │ │ │ +
1133 if (hasTangents) {
│ │ │ │ +
1134 assert(tan1Mask.GetNumFaceWeights() == tan2Mask.GetNumFaceWeights());
│ │ │ │ +
1135 assert(tan1Mask.GetNumEdgeWeights() == tan2Mask.GetNumEdgeWeights());
│ │ │ │ +
1136
│ │ │ │ +
1137 U1 & dstTan1 = *dstTan1Ptr;
│ │ │ │ +
1138 U2 & dstTan2 = *dstTan2Ptr;
│ │ │ │ +
1139
│ │ │ │ +
1140 dstTan1[vert].Clear();
│ │ │ │ +
1141 dstTan2[vert].Clear();
│ │ │ │ +
1142 for (int i = 0; i < tan1Mask.GetNumFaceWeights(); ++i) {
│ │ │ │ +
1143 dstTan1[vert].AddWithWeight(src[fIndices[i]], fTan1Weights[i]);
│ │ │ │ +
1144 dstTan2[vert].AddWithWeight(src[fIndices[i]], fTan2Weights[i]);
│ │ │ │ +
1145 }
│ │ │ │ +
1146 for (int i = 0; i < tan1Mask.GetNumEdgeWeights(); ++i) {
│ │ │ │ +
1147 dstTan1[vert].AddWithWeight(src[eIndices[i]], eTan1Weights[i]);
│ │ │ │ +
1148 dstTan2[vert].AddWithWeight(src[eIndices[i]], eTan2Weights[i]);
│ │ │ │ +
1149 }
│ │ │ │ +
1150 dstTan1[vert].AddWithWeight(src[vert], vTan1Weights[0]);
│ │ │ │ +
1151 dstTan2[vert].AddWithWeight(src[vert], vTan2Weights[0]);
│ │ │ │ +
1152 }
│ │ │ │ +
1153 }
│ │ │ │ +
1154}
│ │ │ │ +
1155
│ │ │ │ +
1156template <typename REAL>
│ │ │ │ +
1157template <Sdc::SchemeType SCHEME, class T, class U>
│ │ │ │ +
1158inline void
│ │ │ │ +
1159PrimvarRefinerReal<REAL>::limitFVar(T const & src, U & dst, int channel) const {
│ │ │ │ +
1160
│ │ │ │ +
1161 Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions);
│ │ │ │ +
1162
│ │ │ │ +
1163 Vtr::internal::Level const & level = _refiner.getLevel(_refiner.GetMaxLevel());
│ │ │ │ +
1164 Vtr::internal::FVarLevel const & fvarChannel = level.getFVarLevel(channel);
│ │ │ │ +
1165
│ │ │ │ +
1166 int maxWeightsPerMask = 1 + 2 * level.getMaxValence();
│ │ │ │ +
1167
│ │ │ │ +
1168 Vtr::internal::StackBuffer<Weight,33> weightBuffer(maxWeightsPerMask);
│ │ │ │ +
1169 Vtr::internal::StackBuffer<Index,16> vEdgeBuffer(level.getMaxValence());
│ │ │ │ +
1170
│ │ │ │ +
1171 // This is a bit obscure -- assign both parent and child as last level
│ │ │ │ +
1172 Vtr::internal::VertexInterface vHood(level, level);
│ │ │ │ +
1173
│ │ │ │ +
1174 for (int vert = 0; vert < level.getNumVertices(); ++vert) {
│ │ │ │ +
1175
│ │ │ │ +
1176 ConstIndexArray vEdges = level.getVertexEdges(vert);
│ │ │ │ +
1177 ConstIndexArray vValues = fvarChannel.getVertexValues(vert);
│ │ │ │ +
1178
│ │ │ │ +
1179 // Incomplete vertices (present in sparse refinement) do not have their full
│ │ │ │ +
1180 // topological neighborhood to determine a proper limit -- just leave the
│ │ │ │ +
1181 // values (perhaps more than one per vertex) at the refined location.
│ │ │ │ +
1182 //
│ │ │ │ +
1183 // The same can be done if the face-varying channel is purely linear.
│ │ │ │ +
1184 //
│ │ │ │ +
1185 bool isIncomplete = (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0));
│ │ │ │ +
1186 if (isIncomplete || fvarChannel.isLinear()) {
│ │ │ │ +
1187 for (int i = 0; i < vValues.size(); ++i) {
│ │ │ │ +
1188 Vtr::Index vValue = vValues[i];
│ │ │ │ +
1189
│ │ │ │ +
1190 dst[vValue].Clear();
│ │ │ │ +
1191 dst[vValue].AddWithWeight(src[vValue], 1.0f);
│ │ │ │ +
1192 }
│ │ │ │ +
1193 continue;
│ │ │ │ +
1194 }
│ │ │ │ +
1195
│ │ │ │ +
1196 bool fvarVertMatchesVertex = fvarChannel.valueTopologyMatches(vValues[0]);
│ │ │ │ +
1197 if (fvarVertMatchesVertex) {
│ │ │ │ +
1198
│ │ │ │ +
1199 // Assign the mask weights to the common buffer and compute the mask:
│ │ │ │ +
1200 //
│ │ │ │ +
1201 Weight * vWeights = weightBuffer,
│ │ │ │ +
1202 * eWeights = vWeights + 1,
│ │ │ │ +
1203 * fWeights = eWeights + vEdges.size();
│ │ │ │ +
1204
│ │ │ │ +
1205 Mask vMask(vWeights, eWeights, fWeights);
│ │ │ │ +
1206
│ │ │ │ +
1207 vHood.SetIndex(vert, vert);
│ │ │ │ +
1208
│ │ │ │ +
1209 scheme.ComputeVertexLimitMask(vHood, vMask, level.getVertexRule(vert));
│ │ │ │ +
1210
│ │ │ │ +
1211 //
│ │ │ │ +
1212 // Apply mask to corresponding FVar values for neighboring vertices:
│ │ │ │ +
1213 //
│ │ │ │ +
1214 Vtr::Index vValue = vValues[0];
│ │ │ │ +
1215
│ │ │ │ +
1216 dst[vValue].Clear();
│ │ │ │ +
1217 if (vMask.GetNumFaceWeights() > 0) {
│ │ │ │ +
1218 assert(!vMask.AreFaceWeightsForFaceCenters());
│ │ │ │ +
1219
│ │ │ │ +
1220 ConstIndexArray vFaces = level.getVertexFaces(vert);
│ │ │ │ +
1221 ConstLocalIndexArray vInFace = level.getVertexFaceLocalIndices(vert);
│ │ │ │ +
1222
│ │ │ │ +
1223 for (int i = 0; i < vFaces.size(); ++i) {
│ │ │ │ +
1224 ConstIndexArray faceValues = fvarChannel.getFaceValues(vFaces[i]);
│ │ │ │ +
1225 LocalIndex vOppInFace = vInFace[i] + 2;
│ │ │ │ +
1226 if (vOppInFace >= faceValues.size()) vOppInFace -= faceValues.size();
│ │ │ │ +
1227
│ │ │ │ +
1228 Index vValueOppositeFace = faceValues[vOppInFace];
│ │ │ │ +
1229
│ │ │ │ +
1230 dst[vValue].AddWithWeight(src[vValueOppositeFace], fWeights[i]);
│ │ │ │ +
1231 }
│ │ │ │ +
1232 }
│ │ │ │ +
1233 if (vMask.GetNumEdgeWeights() > 0) {
│ │ │ │ +
1234 Index * vEdgeValues = vEdgeBuffer;
│ │ │ │ +
1235 fvarChannel.getVertexEdgeValues(vert, vEdgeValues);
│ │ │ │ +
1236
│ │ │ │ +
1237 for (int i = 0; i < vEdges.size(); ++i) {
│ │ │ │ +
1238 dst[vValue].AddWithWeight(src[vEdgeValues[i]], eWeights[i]);
│ │ │ │ +
1239 }
│ │ │ │ +
1240 }
│ │ │ │ +
1241 dst[vValue].AddWithWeight(src[vValue], vWeights[0]);
│ │ │ │ +
1242 } else {
│ │ │ │ +
1243 //
│ │ │ │ +
1244 // Sibling FVar values associated with a vertex will be either a corner or a crease:
│ │ │ │ +
1245 //
│ │ │ │ +
1246 for (int i = 0; i < vValues.size(); ++i) {
│ │ │ │ +
1247 Vtr::Index vValue = vValues[i];
│ │ │ │ +
1248
│ │ │ │ +
1249 dst[vValue].Clear();
│ │ │ │ +
1250 if (fvarChannel.getValueTag(vValue).isCorner()) {
│ │ │ │ +
1251 dst[vValue].AddWithWeight(src[vValue], 1.0f);
│ │ │ │ +
1252 } else {
│ │ │ │ +
1253 Index vEndValues[2];
│ │ │ │ +
1254 fvarChannel.getVertexCreaseEndValues(vert, i, vEndValues);
│ │ │ │ +
1255
│ │ │ │ +
1256 dst[vValue].AddWithWeight(src[vEndValues[0]], 1.0f/6.0f);
│ │ │ │ +
1257 dst[vValue].AddWithWeight(src[vEndValues[1]], 1.0f/6.0f);
│ │ │ │ +
1258 dst[vValue].AddWithWeight(src[vValue], 2.0f/3.0f);
│ │ │ │ +
1259 }
│ │ │ │ +
1260 }
│ │ │ │ +
1261 }
│ │ │ │ +
1262 }
│ │ │ │ +
1263}
│ │ │ │ +
1264
│ │ │ │ +
│ │ │ │ +
1265class PrimvarRefiner : public PrimvarRefinerReal<float> {
│ │ │ │ +
1266public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1268 : PrimvarRefinerReal<float>(refiner) { }
│ │ │ │ +
│ │ │ │ +
1269};
│ │ │ │ +
│ │ │ │ +
1270
│ │ │ │ +
1271} // end namespace Far
│ │ │ │ +
1272
│ │ │ │ +
1273} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
1274using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
1275} // end namespace OpenSubdiv
│ │ │ │ +
1276
│ │ │ │ +
1277#endif /* OPENSUBDIV3_FAR_PRIMVAR_REFINER_H */
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void Error(ErrorType err, const char *format,...)
Sends an OSD error with a message (internal use only)
│ │ │ │ +
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │ +
Vtr::ConstLocalIndexArray ConstLocalIndexArray
Definition types.h:48
│ │ │ │ +
@ FAR_RUNTIME_ERROR
Issue a generic runtime error, but continue execution.
Definition error.h:40
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
StencilReal(int *size, Index *indices, REAL *weights)
Constructor.
│ │ │ │ -
void Next()
Advance to the next stencil in the table.
│ │ │ │ -
StencilReal(StencilReal const &other)
Copy constructor.
│ │ │ │ - │ │ │ │ -
Index const * GetVertexIndices() const
Returns the control vertices' indices.
│ │ │ │ -
int GetSize() const
Returns the size of the stencil.
│ │ │ │ - │ │ │ │ -
int * GetSizePtr() const
Returns the size of the stencil as a pointer.
│ │ │ │ -
REAL const * GetWeights() const
Returns the interpolation weights.
│ │ │ │ -
Vertex stencil class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ -
Stencil(int *size, Index *indices, float *weights)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int GetNumControlVertices() const
Returns the number of control vertices indexed in the table.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
void update(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, std::vector< REAL > const &valueWeights, Index start, Index end) const
│ │ │ │ -
void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, Index start=-1, Index end=-1) const
│ │ │ │ -
std::vector< Index > const & GetControlIndices() const
Returns the indices of the control vertices.
│ │ │ │ - │ │ │ │ -
StencilReal< REAL > operator[](Index index) const
Returns the stencil at index i in the table.
│ │ │ │ - │ │ │ │ -
void update(T const &srcValues, U &dstValues, std::vector< REAL > const &valueWeights, Index start, Index end) const
│ │ │ │ -
std::vector< int > const & GetSizes() const
Returns the number of control vertices of each stencil in the table.
│ │ │ │ -
int GetNumStencils() const
Returns the number of stencils in the table.
│ │ │ │ - │ │ │ │ -
std::vector< Index > const & GetOffsets() const
Returns the offset to a given stencil (factory may leave empty)
│ │ │ │ -
StencilReal< REAL > GetStencil(Index i) const
Returns a Stencil at index i in the table.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
void Clear()
Clears the stencils from the table.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
std::vector< REAL > const & GetWeights() const
Returns the stencil interpolation weights.
│ │ │ │ -
void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef, U *dst, Index start=-1, Index end=-1) const
│ │ │ │ -
StencilTableReal(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< REAL > const &weights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const
│ │ │ │ -
void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=-1) const
Updates point values based on the control values.
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
StencilTable(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< float > const &weights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL const * GetDuvWeights() const
Returns the uv derivative weights.
│ │ │ │ -
REAL const * GetDvWeights() const
Returns the v derivative weights.
│ │ │ │ -
void Next()
Advance to the next stencil in the table.
│ │ │ │ -
REAL const * GetDvvWeights() const
Returns the vv derivative weights.
│ │ │ │ -
LimitStencilReal(int *size, Index *indices, REAL *weights, REAL *duWeights=0, REAL *dvWeights=0, REAL *duuWeights=0, REAL *duvWeights=0, REAL *dvvWeights=0)
Constructor.
│ │ │ │ -
REAL const * GetDuWeights() const
Returns the u derivative weights.
│ │ │ │ -
REAL const * GetDuuWeights() const
Returns the uu derivative weights.
│ │ │ │ -
Limit point stencil class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
LimitStencil(int *size, Index *indices, float *weights, float *duWeights=0, float *dvWeights=0, float *duuWeights=0, float *duvWeights=0, float *dvvWeights=0)
│ │ │ │ - │ │ │ │ -
std::vector< REAL > const & GetDuuWeights() const
Returns the 'uu' derivative stencil interpolation weights.
│ │ │ │ -
LimitStencilReal< REAL > operator[](Index index) const
Returns the limit stencil at index i in the table.
│ │ │ │ -
std::vector< REAL > const & GetDvvWeights() const
Returns the 'vv' derivative stencil interpolation weights.
│ │ │ │ -
void UpdateDerivs(T const *src, U *uderivs, U *vderivs, int start=-1, int end=-1) const
│ │ │ │ -
void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const
│ │ │ │ -
std::vector< REAL > const & GetDvWeights() const
Returns the 'v' derivative stencil interpolation weights.
│ │ │ │ -
void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const
│ │ │ │ -
void UpdateDerivs(T const &srcValues, U &uderivs, U &vderivs, int start=-1, int end=-1) const
Updates derivative values based on the control values.
│ │ │ │ -
LimitStencilReal< REAL > GetLimitStencil(Index i) const
Returns a LimitStencil at index i in the table.
│ │ │ │ -
LimitStencilTableReal(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< REAL > const &weights, std::vector< REAL > const &duWeights, std::vector< REAL > const &dvWeights, std::vector< REAL > const &duuWeights, std::vector< REAL > const &duvWeights, std::vector< REAL > const &dvvWeights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ -
void Update2ndDerivs(T const &srcValues, U &uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const
Updates 2nd derivative values based on the control values.
│ │ │ │ -
std::vector< REAL > const & GetDuWeights() const
Returns the 'u' derivative stencil interpolation weights.
│ │ │ │ -
void Clear()
Clears the stencils from the table.
│ │ │ │ -
void Update2ndDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const
│ │ │ │ -
std::vector< REAL > const & GetDuvWeights() const
Returns the 'uv' derivative stencil interpolation weights.
│ │ │ │ -
void UpdateDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uderivs, U &vderivs, int start=-1, int end=-1) const
│ │ │ │ -
void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uderivs, U *vderivs, int start=-1, int end=-1) const
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
LimitStencilTable(int numControlVerts, std::vector< int > const &offsets, std::vector< int > const &sizes, std::vector< int > const &sources, std::vector< float > const &weights, std::vector< float > const &duWeights, std::vector< float > const &dvWeights, std::vector< float > const &duuWeights, std::vector< float > const &duvWeights, std::vector< float > const &dvvWeights, bool includeCoarseVerts, size_t firstOffset)
│ │ │ │ - │ │ │ │ + │ │ │ │ +
bool IndexIsValid(Index index)
Definition types.h:58
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Applies refinement operations to generic primvar data.
│ │ │ │ +
void Limit(T const &src, U &dstPos) const
Apply limit weights to a primvar buffer.
│ │ │ │ + │ │ │ │ +
void Limit(T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const
│ │ │ │ +
void InterpolateFaceUniform(int level, T const &src, U &dst) const
Refine uniform (per-face) primvar data between levels.
│ │ │ │ + │ │ │ │ +
void InterpolateVarying(int level, T const &src, U &dst) const
Apply only varying interpolation weights to a primvar buffer for a single level of refinement.
│ │ │ │ +
void Interpolate(int level, T const &src, U &dst) const
Apply vertex interpolation weights to a primvar buffer for a single level of refinement.
│ │ │ │ +
void InterpolateFaceVarying(int level, T const &src, U &dst, int channel=0) const
Apply face-varying interpolation weights to a primvar buffer associated with a particular face-varyin...
│ │ │ │ + │ │ │ │ +
void LimitFaceVarying(T const &src, U &dst, int channel=0) const
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Stores topology data for a specified set of refinement options.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Scheme is a class template which provides all implementation for the subdivision schemes supported by...
Definition scheme.h:66
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -stencilTable.h │ │ │ │ │ +primvarRefiner.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,991 +23,1388 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../far/types.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33#include │ │ │ │ │ -34#include │ │ │ │ │ -35#include │ │ │ │ │ -36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ -39 │ │ │ │ │ -40namespace Far { │ │ │ │ │ -41 │ │ │ │ │ -42// Forward declarations for friends: │ │ │ │ │ -43class PatchTableBuilder; │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/types.h" │ │ │ │ │ +30#include "../sdc/options.h" │ │ │ │ │ +31#include "../sdc/bilinearScheme.h" │ │ │ │ │ +32#include "../sdc/catmarkScheme.h" │ │ │ │ │ +33#include "../sdc/loopScheme.h" │ │ │ │ │ +34#include "../vtr/level.h" │ │ │ │ │ +35#include "../vtr/fvarLevel.h" │ │ │ │ │ +36#include "../vtr/refinement.h" │ │ │ │ │ +37#include "../vtr/fvarRefinement.h" │ │ │ │ │ +38#include "../vtr/stackBuffer.h" │ │ │ │ │ +39#include "../vtr/componentInterfaces.h" │ │ │ │ │ +40#include "../far/types.h" │ │ │ │ │ +41#include "../far/error.h" │ │ │ │ │ +42#include "../far/topologyLevel.h" │ │ │ │ │ +43#include "../far/topologyRefiner.h" │ │ │ │ │ 44 │ │ │ │ │ -45template class StencilTableFactoryReal; │ │ │ │ │ -46template class LimitStencilTableFactoryReal; │ │ │ │ │ -47 │ │ │ │ │ -52template │ │ │ │ │ -_5_3class _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ -54public: │ │ │ │ │ -55 │ │ │ │ │ -_5_7 _S_t_e_n_c_i_l_R_e_a_l() {} │ │ │ │ │ -58 │ │ │ │ │ -_6_7 _S_t_e_n_c_i_l_R_e_a_l(int * size, _I_n_d_e_x * indices, REAL * weights) │ │ │ │ │ -68 : ___s_i_z_e(size), ___i_n_d_i_c_e_s(indices), ___w_e_i_g_h_t_s(weights) { } │ │ │ │ │ -69 │ │ │ │ │ -_7_1 _S_t_e_n_c_i_l_R_e_a_l(_S_t_e_n_c_i_l_R_e_a_l const & other) { │ │ │ │ │ -72 ___s_i_z_e = other.___s_i_z_e; │ │ │ │ │ -73 ___i_n_d_i_c_e_s = other.___i_n_d_i_c_e_s; │ │ │ │ │ -74 ___w_e_i_g_h_t_s = other.___w_e_i_g_h_t_s; │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -_7_8 int _G_e_t_S_i_z_e() const { │ │ │ │ │ -79 return *___s_i_z_e; │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 int * _G_e_t_S_i_z_e_P_t_r() const { │ │ │ │ │ -84 return ___s_i_z_e; │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -_8_8 _I_n_d_e_x const * _G_e_t_V_e_r_t_e_x_I_n_d_i_c_e_s() const { │ │ │ │ │ -89 return ___i_n_d_i_c_e_s; │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -_9_3 REAL const * _G_e_t_W_e_i_g_h_t_s() const { │ │ │ │ │ -94 return ___w_e_i_g_h_t_s; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -_9_8 void _N_e_x_t() { │ │ │ │ │ -99 int stride = *___s_i_z_e; │ │ │ │ │ -100 ++___s_i_z_e; │ │ │ │ │ -101 ___i_n_d_i_c_e_s += stride; │ │ │ │ │ -102 ___w_e_i_g_h_t_s += stride; │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -105protected: │ │ │ │ │ -106 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -107 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -108 │ │ │ │ │ -_1_0_9 int * ___s_i_z_e; │ │ │ │ │ -_1_1_0 _I_n_d_e_x * ___i_n_d_i_c_e_s; │ │ │ │ │ -_1_1_1 REAL * ___w_e_i_g_h_t_s; │ │ │ │ │ -112}; │ │ │ │ │ -113 │ │ │ │ │ -_1_1_6class _S_t_e_n_c_i_l : public _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ -117protected: │ │ │ │ │ -_1_1_8 typedef _S_t_e_n_c_i_l_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_S_t_e_n_c_i_l; │ │ │ │ │ -119 │ │ │ │ │ -120public: │ │ │ │ │ -_1_2_1 _S_t_e_n_c_i_l() : _B_a_s_e_S_t_e_n_c_i_l() { } │ │ │ │ │ -_1_2_2 _S_t_e_n_c_i_l(_B_a_s_e_S_t_e_n_c_i_l const & other) : _B_a_s_e_S_t_e_n_c_i_l(other) { } │ │ │ │ │ -_1_2_3 _S_t_e_n_c_i_l(int * size, _I_n_d_e_x * indices, float * weights) │ │ │ │ │ -124 : _B_a_s_e_S_t_e_n_c_i_l(size, indices, weights) { } │ │ │ │ │ -125}; │ │ │ │ │ -126 │ │ │ │ │ -127 │ │ │ │ │ -140template │ │ │ │ │ -_1_4_1class _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ -142protected: │ │ │ │ │ -_1_4_3 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l(int numControlVerts, │ │ │ │ │ -144 std::vector const& offsets, │ │ │ │ │ -145 std::vector const& sizes, │ │ │ │ │ -146 std::vector const& sources, │ │ │ │ │ -147 std::vector const& weights, │ │ │ │ │ -148 bool includeCoarseVerts, │ │ │ │ │ -149 size_t firstOffset); │ │ │ │ │ -150 │ │ │ │ │ -151public: │ │ │ │ │ -152 │ │ │ │ │ -_1_5_3 virtual _~_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l() {}; │ │ │ │ │ -154 │ │ │ │ │ -_1_5_6 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { │ │ │ │ │ -157 return (int)___s_i_z_e_s.size(); │ │ │ │ │ -158 } │ │ │ │ │ -159 │ │ │ │ │ -_1_6_1 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ -162 return ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s; │ │ │ │ │ -163 } │ │ │ │ │ -164 │ │ │ │ │ -_1_6_6 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const; │ │ │ │ │ -167 │ │ │ │ │ -_1_6_9 std::vector const & _G_e_t_S_i_z_e_s() const { │ │ │ │ │ -170 return ___s_i_z_e_s; │ │ │ │ │ -171 } │ │ │ │ │ -172 │ │ │ │ │ -_1_7_4 std::vector const & _G_e_t_O_f_f_s_e_t_s() const { │ │ │ │ │ -175 return ___o_f_f_s_e_t_s; │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 std::vector const & _G_e_t_C_o_n_t_r_o_l_I_n_d_i_c_e_s() const { │ │ │ │ │ -180 return ___i_n_d_i_c_e_s; │ │ │ │ │ -181 } │ │ │ │ │ -182 │ │ │ │ │ -_1_8_4 std::vector const & _G_e_t_W_e_i_g_h_t_s() const { │ │ │ │ │ -185 return ___w_e_i_g_h_t_s; │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -_1_8_9 _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const; │ │ │ │ │ +45#include │ │ │ │ │ +46 │ │ │ │ │ +47namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +48namespace OPENSUBDIV_VERSION { │ │ │ │ │ +49 │ │ │ │ │ +50namespace Far { │ │ │ │ │ +51 │ │ │ │ │ +55template │ │ │ │ │ +_5_6class _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l { │ │ │ │ │ +57 │ │ │ │ │ +58public: │ │ │ │ │ +_5_9 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner) : _refiner(refiner) { } │ │ │ │ │ +_6_0 _~_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l() { } │ │ │ │ │ +61 │ │ │ │ │ +_6_2 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & _G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() const { return _refiner; } │ │ │ │ │ +63 │ │ │ │ │ +65 │ │ │ │ │ +100 │ │ │ │ │ +_1_1_3 template void _I_n_t_e_r_p_o_l_a_t_e(int level, T const & src, U & │ │ │ │ │ +dst) const; │ │ │ │ │ +114 │ │ │ │ │ +_1_3_0 template void _I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g(int level, T const & │ │ │ │ │ +src, U & dst) const; │ │ │ │ │ +131 │ │ │ │ │ +_1_4_8 template void _I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m(int level, T const │ │ │ │ │ +& src, U & dst) const; │ │ │ │ │ +149 │ │ │ │ │ +_1_6_1 template void _I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g(int level, T const │ │ │ │ │ +& src, U & dst, int channel = 0) const; │ │ │ │ │ +162 │ │ │ │ │ +163 │ │ │ │ │ +_1_7_5 template void _L_i_m_i_t(T const & src, U & dstPos) const; │ │ │ │ │ +176 │ │ │ │ │ +177 template │ │ │ │ │ +_1_7_8 void _L_i_m_i_t(T const & src, U & dstPos, U1 & dstTan1, U2 & dstTan2) const; │ │ │ │ │ +179 │ │ │ │ │ +_1_8_0 template void _L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g(T const & src, U & dst, │ │ │ │ │ +int channel = 0) const; │ │ │ │ │ +181 │ │ │ │ │ +183 │ │ │ │ │ +184private: │ │ │ │ │ +185 typedef REAL Weight; │ │ │ │ │ +186 │ │ │ │ │ +187 // Non-copyable: │ │ │ │ │ +188 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l const & src) : _refiner(src._refiner) │ │ │ │ │ +{ } │ │ │ │ │ +189 _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l & operator=(_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l const &) { return *this; │ │ │ │ │ +} │ │ │ │ │ 190 │ │ │ │ │ -204 template │ │ │ │ │ -_2_0_5 void _U_p_d_a_t_e_V_a_l_u_e_s(T const &srcValues, U &dstValues, _I_n_d_e_x start=-1, _I_n_d_e_x │ │ │ │ │ -end=-1) const { │ │ │ │ │ -206 this->_u_p_d_a_t_e(srcValues, dstValues, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ -207 } │ │ │ │ │ -208 │ │ │ │ │ -209 template │ │ │ │ │ -_2_1_0 void _U_p_d_a_t_e_V_a_l_u_e_s(T1 const &srcBase, int numBase, T2 const &srcRef, │ │ │ │ │ -211 U &dstValues, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const { │ │ │ │ │ -212 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, dstValues, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ -213 } │ │ │ │ │ -214 │ │ │ │ │ -215 // Pointer interface for backward compatibility │ │ │ │ │ -216 template │ │ │ │ │ -_2_1_7 void _U_p_d_a_t_e_V_a_l_u_e_s(T const *src, U *dst, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const │ │ │ │ │ -{ │ │ │ │ │ -218 this->_u_p_d_a_t_e(src, dst, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ -219 } │ │ │ │ │ -220 template │ │ │ │ │ -_2_2_1 void _U_p_d_a_t_e_V_a_l_u_e_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ -222 U *dst, _I_n_d_e_x start=-1, _I_n_d_e_x end=-1) const { │ │ │ │ │ -223 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, dst, ___w_e_i_g_h_t_s, start, end); │ │ │ │ │ -224 } │ │ │ │ │ -225 │ │ │ │ │ -_2_2_7 void _C_l_e_a_r(); │ │ │ │ │ -228 │ │ │ │ │ -229protected: │ │ │ │ │ -230 │ │ │ │ │ -231 // Update values by applying cached stencil weights to new control values │ │ │ │ │ -232 template │ │ │ │ │ -_2_3_3 void _u_p_d_a_t_e( T const &srcValues, U &dstValues, │ │ │ │ │ -234 std::vector const & valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const; │ │ │ │ │ -235 template │ │ │ │ │ -_2_3_6 void _u_p_d_a_t_e( T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ -&dstValues, │ │ │ │ │ -237 std::vector const & valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const; │ │ │ │ │ -238 │ │ │ │ │ -239 // Populate the offsets table from the stencil sizes in _sizes (factory │ │ │ │ │ -helper) │ │ │ │ │ -_2_4_0 void _g_e_n_e_r_a_t_e_O_f_f_s_e_t_s(); │ │ │ │ │ +191 template void interpFromFaces │ │ │ │ │ +(int, T const &, U &) const; │ │ │ │ │ +192 template void interpFromEdges │ │ │ │ │ +(int, T const &, U &) const; │ │ │ │ │ +193 template void interpFromVerts │ │ │ │ │ +(int, T const &, U &) const; │ │ │ │ │ +194 │ │ │ │ │ +195 template void │ │ │ │ │ +interpFVarFromFaces(int, T const &, U &, int) const; │ │ │ │ │ +196 template void │ │ │ │ │ +interpFVarFromEdges(int, T const &, U &, int) const; │ │ │ │ │ +197 template void │ │ │ │ │ +interpFVarFromVerts(int, T const &, U &, int) const; │ │ │ │ │ +198 │ │ │ │ │ +199 template │ │ │ │ │ +200 void limit(T const & src, U & pos, U1 * tan1, U2 * tan2) const; │ │ │ │ │ +201 │ │ │ │ │ +202 template │ │ │ │ │ +203 void limitFVar(T const & src, U & dst, int channel) const; │ │ │ │ │ +204 │ │ │ │ │ +205private: │ │ │ │ │ +206 TopologyRefiner const & _refiner; │ │ │ │ │ +207 │ │ │ │ │ +208private: │ │ │ │ │ +209 // │ │ │ │ │ +210 // Local class to fulfill interface for in the Scheme mask │ │ │ │ │ +queries: │ │ │ │ │ +211 // │ │ │ │ │ +212 class Mask { │ │ │ │ │ +213 public: │ │ │ │ │ +214 typedef REAL Weight; // Also part of the expected interface │ │ │ │ │ +215 │ │ │ │ │ +216 public: │ │ │ │ │ +217 Mask(Weight* v, Weight* e, Weight* f) : │ │ │ │ │ +218 _vertWeights(v), _edgeWeights(e), _faceWeights(f), │ │ │ │ │ +219 _vertCount(0), _edgeCount(0), _faceCount(0), │ │ │ │ │ +220 _faceWeightsForFaceCenters(false) │ │ │ │ │ +221 { } │ │ │ │ │ +222 │ │ │ │ │ +223 ~Mask() { } │ │ │ │ │ +224 │ │ │ │ │ +225 public: // Generic interface expected of : │ │ │ │ │ +226 int GetNumVertexWeights() const { return _vertCount; } │ │ │ │ │ +227 int GetNumEdgeWeights() const { return _edgeCount; } │ │ │ │ │ +228 int GetNumFaceWeights() const { return _faceCount; } │ │ │ │ │ +229 │ │ │ │ │ +230 void SetNumVertexWeights(int count) { _vertCount = count; } │ │ │ │ │ +231 void SetNumEdgeWeights( int count) { _edgeCount = count; } │ │ │ │ │ +232 void SetNumFaceWeights( int count) { _faceCount = count; } │ │ │ │ │ +233 │ │ │ │ │ +234 Weight const& VertexWeight(int index) const { return _vertWeights[index]; } │ │ │ │ │ +235 Weight const& EdgeWeight( int index) const { return _edgeWeights[index]; } │ │ │ │ │ +236 Weight const& FaceWeight( int index) const { return _faceWeights[index]; } │ │ │ │ │ +237 │ │ │ │ │ +238 Weight& VertexWeight(int index) { return _vertWeights[index]; } │ │ │ │ │ +239 Weight& EdgeWeight( int index) { return _edgeWeights[index]; } │ │ │ │ │ +240 Weight& FaceWeight( int index) { return _faceWeights[index]; } │ │ │ │ │ 241 │ │ │ │ │ -242 // Resize the table arrays (factory helper) │ │ │ │ │ -_2_4_3 void _r_e_s_i_z_e(int nstencils, int nelems); │ │ │ │ │ +242 bool AreFaceWeightsForFaceCenters() const { return │ │ │ │ │ +_faceWeightsForFaceCenters; } │ │ │ │ │ +243 void SetFaceWeightsForFaceCenters(bool on) { _faceWeightsForFaceCenters = │ │ │ │ │ +on; } │ │ │ │ │ 244 │ │ │ │ │ -245 // Reserves the table arrays (factory helper) │ │ │ │ │ -_2_4_6 void _r_e_s_e_r_v_e(int nstencils, int nelems); │ │ │ │ │ -247 │ │ │ │ │ -248 // Reallocates the table arrays to remove excess capacity (factory helper) │ │ │ │ │ -_2_4_9 void _s_h_r_i_n_k_T_o_F_i_t(); │ │ │ │ │ -250 │ │ │ │ │ -251 // Performs any final operations on internal tables (factory helper) │ │ │ │ │ -_2_5_2 void _f_i_n_a_l_i_z_e(); │ │ │ │ │ +245 private: │ │ │ │ │ +246 Weight* _vertWeights; │ │ │ │ │ +247 Weight* _edgeWeights; │ │ │ │ │ +248 Weight* _faceWeights; │ │ │ │ │ +249 │ │ │ │ │ +250 int _vertCount; │ │ │ │ │ +251 int _edgeCount; │ │ │ │ │ +252 int _faceCount; │ │ │ │ │ 253 │ │ │ │ │ -254protected: │ │ │ │ │ -_2_5_5 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l() : ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(0) {} │ │ │ │ │ -_2_5_6 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l(int numControlVerts) │ │ │ │ │ -257 : ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(numControlVerts) │ │ │ │ │ -258 { } │ │ │ │ │ -259 │ │ │ │ │ -260 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -_2_6_1 friend class _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ -262 │ │ │ │ │ -_2_6_3 int ___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s; // number of control vertices │ │ │ │ │ -264 │ │ │ │ │ -_2_6_5 std::vector ___s_i_z_e_s; // number of coefficients for each stencil │ │ │ │ │ -_2_6_6 std::vector ___o_f_f_s_e_t_s, // offset to the start of each stencil │ │ │ │ │ -_2_6_7 ___i_n_d_i_c_e_s; // indices of contributing coarse vertices │ │ │ │ │ -_2_6_8 std::vector ___w_e_i_g_h_t_s; // stencil weight coefficients │ │ │ │ │ -269}; │ │ │ │ │ +254 bool _faceWeightsForFaceCenters; │ │ │ │ │ +255 }; │ │ │ │ │ +256}; │ │ │ │ │ +257 │ │ │ │ │ +258 │ │ │ │ │ +259// │ │ │ │ │ +260// Public entry points to the methods. Queries of the scheme type and its │ │ │ │ │ +261// use as a template parameter in subsequent implementation will be factored │ │ │ │ │ +262// out of a later release: │ │ │ │ │ +263// │ │ │ │ │ +264template │ │ │ │ │ +265template │ │ │ │ │ +266inline void │ │ │ │ │ +_2_6_7_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e(int level, T const & src, U & dst) │ │ │ │ │ +const { │ │ │ │ │ +268 │ │ │ │ │ +269 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ 270 │ │ │ │ │ -_2_7_3class _S_t_e_n_c_i_l_T_a_b_l_e : public _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ -274protected: │ │ │ │ │ -_2_7_5 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ -276 │ │ │ │ │ -277public: │ │ │ │ │ -_2_7_8 _S_t_e_n_c_i_l _G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x index) const { │ │ │ │ │ -279 return _S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ -280 } │ │ │ │ │ -_2_8_1 _S_t_e_n_c_i_l _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ -282 return _S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ -283 } │ │ │ │ │ -284 │ │ │ │ │ -285protected: │ │ │ │ │ -_2_8_6 _S_t_e_n_c_i_l_T_a_b_l_e() : _B_a_s_e_T_a_b_l_e() { } │ │ │ │ │ -_2_8_7 _S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts) : _B_a_s_e_T_a_b_l_e(numControlVerts) { } │ │ │ │ │ -_2_8_8 _S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts, │ │ │ │ │ -289 std::vector const& offsets, │ │ │ │ │ -290 std::vector const& sizes, │ │ │ │ │ -291 std::vector const& sources, │ │ │ │ │ -292 std::vector const& weights, │ │ │ │ │ -293 bool includeCoarseVerts, │ │ │ │ │ -294 size_t firstOffset) │ │ │ │ │ -295 : _B_a_s_e_T_a_b_l_e(numControlVerts, offsets, │ │ │ │ │ -296 sizes, sources, weights, includeCoarseVerts, firstOffset) { } │ │ │ │ │ -297}; │ │ │ │ │ -298 │ │ │ │ │ -299 │ │ │ │ │ -302template │ │ │ │ │ -_3_0_3class _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l : public _S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ -304public: │ │ │ │ │ -305 │ │ │ │ │ -_3_2_4 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l( int* size, │ │ │ │ │ -325 _I_n_d_e_x * indices, │ │ │ │ │ -326 REAL * weights, │ │ │ │ │ -327 REAL * duWeights=0, │ │ │ │ │ -328 REAL * dvWeights=0, │ │ │ │ │ -329 REAL * duuWeights=0, │ │ │ │ │ -330 REAL * duvWeights=0, │ │ │ │ │ -331 REAL * dvvWeights=0) │ │ │ │ │ -332 : _S_t_e_n_c_i_l_R_e_a_l(size, indices, weights), │ │ │ │ │ -333 _duWeights(duWeights), │ │ │ │ │ -334 _dvWeights(dvWeights), │ │ │ │ │ -335 _duuWeights(duuWeights), │ │ │ │ │ -336 _duvWeights(duvWeights), │ │ │ │ │ -337 _dvvWeights(dvvWeights) { │ │ │ │ │ +271 switch (_refiner._subdivType) { │ │ │ │ │ +272 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ +273 interpFromFaces(level, src, dst); │ │ │ │ │ +274 interpFromEdges(level, src, dst); │ │ │ │ │ +275 interpFromVerts(level, src, dst); │ │ │ │ │ +276 break; │ │ │ │ │ +277 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ +278 interpFromFaces(level, src, dst); │ │ │ │ │ +279 interpFromEdges(level, src, dst); │ │ │ │ │ +280 interpFromVerts(level, src, dst); │ │ │ │ │ +281 break; │ │ │ │ │ +282 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ +283 interpFromFaces(level, src, dst); │ │ │ │ │ +284 interpFromEdges(level, src, dst); │ │ │ │ │ +285 interpFromVerts(level, src, dst); │ │ │ │ │ +286 break; │ │ │ │ │ +287 } │ │ │ │ │ +288} │ │ │ │ │ +289 │ │ │ │ │ +290template │ │ │ │ │ +291template │ │ │ │ │ +292inline void │ │ │ │ │ +_2_9_3_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g(int level, T const & src, U │ │ │ │ │ +& dst, int channel) const { │ │ │ │ │ +294 │ │ │ │ │ +295 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ +296 │ │ │ │ │ +297 switch (_refiner._subdivType) { │ │ │ │ │ +298 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ +299 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ +300 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ +301 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ +302 break; │ │ │ │ │ +303 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ +304 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ +305 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ +306 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ +307 break; │ │ │ │ │ +308 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ +309 interpFVarFromFaces(level, src, dst, channel); │ │ │ │ │ +310 interpFVarFromEdges(level, src, dst, channel); │ │ │ │ │ +311 interpFVarFromVerts(level, src, dst, channel); │ │ │ │ │ +312 break; │ │ │ │ │ +313 } │ │ │ │ │ +314} │ │ │ │ │ +315 │ │ │ │ │ +316template │ │ │ │ │ +317template │ │ │ │ │ +318inline void │ │ │ │ │ +_3_1_9_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t(T const & src, U & dst) const { │ │ │ │ │ +320 │ │ │ │ │ +321 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ +0) { │ │ │ │ │ +322 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ +323 "Failure in PrimvarRefiner::Limit() -- " │ │ │ │ │ +324 "last level of refinement does not include full topology."); │ │ │ │ │ +325 return; │ │ │ │ │ +326 } │ │ │ │ │ +327 │ │ │ │ │ +328 switch (_refiner._subdivType) { │ │ │ │ │ +329 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ +330 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ +331 break; │ │ │ │ │ +332 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ +333 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ +334 break; │ │ │ │ │ +335 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ +336 limit(src, dst, (U*)0, (U*)0); │ │ │ │ │ +337 break; │ │ │ │ │ 338 } │ │ │ │ │ -339 │ │ │ │ │ -_3_4_1 REAL const * _G_e_t_D_u_W_e_i_g_h_t_s() const { │ │ │ │ │ -342 return _duWeights; │ │ │ │ │ -343 } │ │ │ │ │ -344 │ │ │ │ │ -_3_4_6 REAL const * _G_e_t_D_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -347 return _dvWeights; │ │ │ │ │ -348 } │ │ │ │ │ -349 │ │ │ │ │ -_3_5_1 REAL const * _G_e_t_D_u_u_W_e_i_g_h_t_s() const { │ │ │ │ │ -352 return _duuWeights; │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -_3_5_6 REAL const * _G_e_t_D_u_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -357 return _duvWeights; │ │ │ │ │ -358 } │ │ │ │ │ -359 │ │ │ │ │ -_3_6_1 REAL const * _G_e_t_D_v_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -362 return _dvvWeights; │ │ │ │ │ +339} │ │ │ │ │ +340 │ │ │ │ │ +341template │ │ │ │ │ +342template │ │ │ │ │ +343inline void │ │ │ │ │ +_3_4_4_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t(T const & src, U & dstPos, U1 & dstTan1, U2 │ │ │ │ │ +& dstTan2) const { │ │ │ │ │ +345 │ │ │ │ │ +346 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ +0) { │ │ │ │ │ +347 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ +348 "Failure in PrimvarRefiner::Limit() -- " │ │ │ │ │ +349 "last level of refinement does not include full topology."); │ │ │ │ │ +350 return; │ │ │ │ │ +351 } │ │ │ │ │ +352 │ │ │ │ │ +353 switch (_refiner._subdivType) { │ │ │ │ │ +354 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ +355 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ +356 break; │ │ │ │ │ +357 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ +358 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ +359 break; │ │ │ │ │ +360 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ +361 limit(src, dstPos, &dstTan1, &dstTan2); │ │ │ │ │ +362 break; │ │ │ │ │ 363 } │ │ │ │ │ -364 │ │ │ │ │ -_3_6_6 void _N_e_x_t() { │ │ │ │ │ -367 int stride = *this->___s_i_z_e; │ │ │ │ │ -368 ++this->___s_i_z_e; │ │ │ │ │ -369 this->___i_n_d_i_c_e_s += stride; │ │ │ │ │ -370 this->___w_e_i_g_h_t_s += stride; │ │ │ │ │ -371 if (_duWeights) _duWeights += stride; │ │ │ │ │ -372 if (_dvWeights) _dvWeights += stride; │ │ │ │ │ -373 if (_duuWeights) _duuWeights += stride; │ │ │ │ │ -374 if (_duvWeights) _duvWeights += stride; │ │ │ │ │ -375 if (_dvvWeights) _dvvWeights += stride; │ │ │ │ │ +364} │ │ │ │ │ +365 │ │ │ │ │ +366template │ │ │ │ │ +367template │ │ │ │ │ +368inline void │ │ │ │ │ +_3_6_9_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g(T const & src, U & dst, int │ │ │ │ │ +channel) const { │ │ │ │ │ +370 │ │ │ │ │ +371 if (_refiner.getLevel(_refiner.GetMaxLevel()).getNumVertexEdgesTotal() == │ │ │ │ │ +0) { │ │ │ │ │ +372 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ +373 "Failure in PrimvarRefiner::LimitFaceVarying() -- " │ │ │ │ │ +374 "last level of refinement does not include full topology."); │ │ │ │ │ +375 return; │ │ │ │ │ 376 } │ │ │ │ │ 377 │ │ │ │ │ -378private: │ │ │ │ │ -379 │ │ │ │ │ -380 friend class _S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -381 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -382 │ │ │ │ │ -383 REAL * _duWeights, // pointer to stencil u derivative limit weights │ │ │ │ │ -384 * _dvWeights, // pointer to stencil v derivative limit weights │ │ │ │ │ -385 * _duuWeights, // pointer to stencil uu derivative limit weights │ │ │ │ │ -386 * _duvWeights, // pointer to stencil uv derivative limit weights │ │ │ │ │ -387 * _dvvWeights; // pointer to stencil vv derivative limit weights │ │ │ │ │ -388}; │ │ │ │ │ -389 │ │ │ │ │ -_3_9_2class _L_i_m_i_t_S_t_e_n_c_i_l : public _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l { │ │ │ │ │ -393protected: │ │ │ │ │ -_3_9_4 typedef _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_S_t_e_n_c_i_l; │ │ │ │ │ +378 switch (_refiner._subdivType) { │ │ │ │ │ +379 case _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K: │ │ │ │ │ +380 limitFVar(src, dst, channel); │ │ │ │ │ +381 break; │ │ │ │ │ +382 case _S_d_c_:_:_S_C_H_E_M_E___L_O_O_P: │ │ │ │ │ +383 limitFVar(src, dst, channel); │ │ │ │ │ +384 break; │ │ │ │ │ +385 case _S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R: │ │ │ │ │ +386 limitFVar(src, dst, channel); │ │ │ │ │ +387 break; │ │ │ │ │ +388 } │ │ │ │ │ +389} │ │ │ │ │ +390 │ │ │ │ │ +391template │ │ │ │ │ +392template │ │ │ │ │ +393inline void │ │ │ │ │ +_3_9_4_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m(int level, T const & src, U │ │ │ │ │ +& dst) const { │ │ │ │ │ 395 │ │ │ │ │ -396public: │ │ │ │ │ -_3_9_7 _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_S_t_e_n_c_i_l const & other) : _B_a_s_e_S_t_e_n_c_i_l(other) { } │ │ │ │ │ -_3_9_8 _L_i_m_i_t_S_t_e_n_c_i_l(int* size, _I_n_d_e_x * indices, float * weights, │ │ │ │ │ -399 float * duWeights=0, float * dvWeights=0, │ │ │ │ │ -400 float * duuWeights=0, float * duvWeights=0, float * dvvWeights=0) │ │ │ │ │ -401 : _B_a_s_e_S_t_e_n_c_i_l(size, indices, weights, │ │ │ │ │ -402 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights) { } │ │ │ │ │ -403}; │ │ │ │ │ +396 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ +397 │ │ │ │ │ +398 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +399 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ +400 │ │ │ │ │ +401 for (int cFace = 0; cFace < child.getNumFaces(); ++cFace) { │ │ │ │ │ +402 │ │ │ │ │ +403 _V_t_r_:_:_I_n_d_e_x pFace = refinement.getChildFaceParentFace(cFace); │ │ │ │ │ 404 │ │ │ │ │ -405 │ │ │ │ │ -408template │ │ │ │ │ -_4_0_9class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l : public _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ -410protected: │ │ │ │ │ -_4_1_1 _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l( │ │ │ │ │ -412 int numControlVerts, │ │ │ │ │ -413 std::vector const& offsets, │ │ │ │ │ -414 std::vector const& sizes, │ │ │ │ │ -415 std::vector const& sources, │ │ │ │ │ -416 std::vector const& weights, │ │ │ │ │ -417 std::vector const& duWeights, │ │ │ │ │ -418 std::vector const& dvWeights, │ │ │ │ │ -419 std::vector const& duuWeights, │ │ │ │ │ -420 std::vector const& duvWeights, │ │ │ │ │ -421 std::vector const& dvvWeights, │ │ │ │ │ -422 bool includeCoarseVerts, │ │ │ │ │ -423 size_t firstOffset); │ │ │ │ │ +405 dst[cFace] = src[pFace]; │ │ │ │ │ +406 } │ │ │ │ │ +407} │ │ │ │ │ +408 │ │ │ │ │ +409template │ │ │ │ │ +410template │ │ │ │ │ +411inline void │ │ │ │ │ +_4_1_2_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g(int level, T const & src, U & │ │ │ │ │ +dst) const { │ │ │ │ │ +413 │ │ │ │ │ +414 assert(level>0 && level<=(int)_refiner._refinements.size()); │ │ │ │ │ +415 │ │ │ │ │ +416 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +417 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ +418 │ │ │ │ │ +419 // │ │ │ │ │ +420 // Group values to interpolate based on origin -- note that there may │ │ │ │ │ +421 // be none originating from faces: │ │ │ │ │ +422 // │ │ │ │ │ +423 if (refinement.getNumChildVerticesFromFaces() > 0) { │ │ │ │ │ 424 │ │ │ │ │ -425public: │ │ │ │ │ +425 for (int face = 0; face < parent.getNumFaces(); ++face) { │ │ │ │ │ 426 │ │ │ │ │ -_4_2_8 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const; │ │ │ │ │ +427 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ +428 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ 429 │ │ │ │ │ -_4_3_1 _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const; │ │ │ │ │ +430 // Apply the weights to the parent face's vertices: │ │ │ │ │ +431 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = parent.getFaceVertices(face); │ │ │ │ │ 432 │ │ │ │ │ -_4_3_4 std::vector const & _G_e_t_D_u_W_e_i_g_h_t_s() const { │ │ │ │ │ -435 return _duWeights; │ │ │ │ │ -436 } │ │ │ │ │ -437 │ │ │ │ │ -_4_3_9 std::vector const & _G_e_t_D_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -440 return _dvWeights; │ │ │ │ │ +433 Weight fVaryingWeight = 1.0f / (Weight) fVerts._s_i_z_e(); │ │ │ │ │ +434 │ │ │ │ │ +435 dst[cVert].Clear(); │ │ │ │ │ +436 for (int i = 0; i < fVerts._s_i_z_e(); ++i) { │ │ │ │ │ +437 dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight); │ │ │ │ │ +438 } │ │ │ │ │ +439 } │ │ │ │ │ +440 } │ │ │ │ │ 441 } │ │ │ │ │ -442 │ │ │ │ │ -_4_4_4 std::vector const & _G_e_t_D_u_u_W_e_i_g_h_t_s() const { │ │ │ │ │ -445 return _duuWeights; │ │ │ │ │ -446 } │ │ │ │ │ -447 │ │ │ │ │ -_4_4_9 std::vector const & _G_e_t_D_u_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -450 return _duvWeights; │ │ │ │ │ -451 } │ │ │ │ │ -452 │ │ │ │ │ -_4_5_4 std::vector const & _G_e_t_D_v_v_W_e_i_g_h_t_s() const { │ │ │ │ │ -455 return _dvvWeights; │ │ │ │ │ -456 } │ │ │ │ │ -457 │ │ │ │ │ -475 template │ │ │ │ │ -_4_7_6 void _U_p_d_a_t_e_D_e_r_i_v_s(T const & srcValues, U & uderivs, U & vderivs, │ │ │ │ │ -477 int start=-1, int end=-1) const { │ │ │ │ │ -478 │ │ │ │ │ -479 this->_u_p_d_a_t_e(srcValues, uderivs, _duWeights, start, end); │ │ │ │ │ -480 this->_u_p_d_a_t_e(srcValues, vderivs, _dvWeights, start, end); │ │ │ │ │ -481 } │ │ │ │ │ -482 │ │ │ │ │ -483 template │ │ │ │ │ -_4_8_4 void _U_p_d_a_t_e_D_e_r_i_v_s(T1 const & srcBase, int numBase, T2 const & srcRef, │ │ │ │ │ -485 U & uderivs, U & vderivs, int start=-1, int end=-1) const { │ │ │ │ │ -486 │ │ │ │ │ -487 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uderivs, _duWeights, start, end); │ │ │ │ │ -488 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end); │ │ │ │ │ -489 } │ │ │ │ │ -490 │ │ │ │ │ -491 // Pointer interface for backward compatibility │ │ │ │ │ -492 template │ │ │ │ │ -_4_9_3 void _U_p_d_a_t_e_D_e_r_i_v_s(T const *src, U *uderivs, U *vderivs, │ │ │ │ │ -494 int start=-1, int end=-1) const { │ │ │ │ │ -495 │ │ │ │ │ -496 this->_u_p_d_a_t_e(src, uderivs, _duWeights, start, end); │ │ │ │ │ -497 this->_u_p_d_a_t_e(src, vderivs, _dvWeights, start, end); │ │ │ │ │ -498 } │ │ │ │ │ -499 template │ │ │ │ │ -_5_0_0 void _U_p_d_a_t_e_D_e_r_i_v_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ -501 U *uderivs, U *vderivs, int start=-1, int end=-1) const { │ │ │ │ │ +442 for (int edge = 0; edge < parent.getNumEdges(); ++edge) { │ │ │ │ │ +443 │ │ │ │ │ +444 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ +445 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ +446 │ │ │ │ │ +447 // Apply the weights to the parent edges's vertices │ │ │ │ │ +448 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(edge); │ │ │ │ │ +449 │ │ │ │ │ +450 dst[cVert].Clear(); │ │ │ │ │ +451 dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f); │ │ │ │ │ +452 dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f); │ │ │ │ │ +453 } │ │ │ │ │ +454 } │ │ │ │ │ +455 for (int vert = 0; vert < parent.getNumVertices(); ++vert) { │ │ │ │ │ +456 │ │ │ │ │ +457 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ +458 if (_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) { │ │ │ │ │ +459 │ │ │ │ │ +460 // Essentially copy the parent vertex: │ │ │ │ │ +461 dst[cVert].Clear(); │ │ │ │ │ +462 dst[cVert].AddWithWeight(src[vert], 1.0f); │ │ │ │ │ +463 } │ │ │ │ │ +464 } │ │ │ │ │ +465} │ │ │ │ │ +466 │ │ │ │ │ +467 │ │ │ │ │ +468// │ │ │ │ │ +469// Internal implementation methods -- grouping vertices to be interpolated │ │ │ │ │ +470// based on the type of parent component from which they originated: │ │ │ │ │ +471// │ │ │ │ │ +472template │ │ │ │ │ +473template │ │ │ │ │ +474inline void │ │ │ │ │ +475_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_<_R_E_A_L_>_:_:_i_n_t_e_r_p_F_r_o_m_F_a_c_e_s(int level, T const & src, U & dst) │ │ │ │ │ +const { │ │ │ │ │ +476 │ │ │ │ │ +477 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +478 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ +479 │ │ │ │ │ +480 if (refinement.getNumChildVerticesFromFaces() == 0) return; │ │ │ │ │ +481 │ │ │ │ │ +482 _S_d_c_:_:_S_c_h_e_m_e_<_S_C_H_E_M_E_> scheme(_refiner._subdivOptions); │ │ │ │ │ +483 │ │ │ │ │ +484 Vtr::internal::StackBuffer fVertWeights(parent.getMaxValence()); │ │ │ │ │ +485 │ │ │ │ │ +486 for (int face = 0; face < parent.getNumFaces(); ++face) { │ │ │ │ │ +487 │ │ │ │ │ +488 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ +489 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +490 continue; │ │ │ │ │ +491 │ │ │ │ │ +492 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ +face: │ │ │ │ │ +493 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = parent.getFaceVertices(face); │ │ │ │ │ +494 │ │ │ │ │ +495 Mask fMask(fVertWeights, 0, 0); │ │ │ │ │ +496 Vtr::internal::FaceInterface fHood(fVerts._s_i_z_e()); │ │ │ │ │ +497 │ │ │ │ │ +498 scheme.ComputeFaceVertexMask(fHood, fMask); │ │ │ │ │ +499 │ │ │ │ │ +500 // Apply the weights to the parent face's vertices: │ │ │ │ │ +501 dst[cVert].Clear(); │ │ │ │ │ 502 │ │ │ │ │ -503 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uderivs, _duWeights, start, end); │ │ │ │ │ -504 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vderivs, _dvWeights, start, end); │ │ │ │ │ -505 } │ │ │ │ │ -506 │ │ │ │ │ -527 template │ │ │ │ │ -_5_2_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T const & srcValues, │ │ │ │ │ -529 U & uuderivs, U & uvderivs, U & vvderivs, │ │ │ │ │ -530 int start=-1, int end=-1) const { │ │ │ │ │ +503 for (int i = 0; i < fVerts._s_i_z_e(); ++i) { │ │ │ │ │ +504 │ │ │ │ │ +505 dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); │ │ │ │ │ +506 } │ │ │ │ │ +507 } │ │ │ │ │ +508} │ │ │ │ │ +509 │ │ │ │ │ +510template │ │ │ │ │ +511template │ │ │ │ │ +512inline void │ │ │ │ │ +513PrimvarRefinerReal::interpFromEdges(int level, T const & src, U & dst) │ │ │ │ │ +const { │ │ │ │ │ +514 │ │ │ │ │ +515 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +516 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ +517 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ +518 │ │ │ │ │ +519 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +520 │ │ │ │ │ +521 Vtr::internal::EdgeInterface eHood(parent); │ │ │ │ │ +522 │ │ │ │ │ +523 Weight eVertWeights[2]; │ │ │ │ │ +524 Vtr::internal::StackBuffer eFaceWeights(parent.getMaxEdgeFaces │ │ │ │ │ +()); │ │ │ │ │ +525 │ │ │ │ │ +526 for (int edge = 0; edge < parent.getNumEdges(); ++edge) { │ │ │ │ │ +527 │ │ │ │ │ +528 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ +529 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +530 continue; │ │ │ │ │ 531 │ │ │ │ │ -532 this->_u_p_d_a_t_e(srcValues, uuderivs, _duuWeights, start, end); │ │ │ │ │ -533 this->_u_p_d_a_t_e(srcValues, uvderivs, _duvWeights, start, end); │ │ │ │ │ -534 this->_u_p_d_a_t_e(srcValues, vvderivs, _dvvWeights, start, end); │ │ │ │ │ -535 } │ │ │ │ │ -536 │ │ │ │ │ -537 template │ │ │ │ │ -_5_3_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T1 const & srcBase, int numBase, T2 const & srcRef, │ │ │ │ │ -539 U & uuderivs, U & uvderivs, U & vvderivs, int start=-1, int end=-1) const { │ │ │ │ │ -540 │ │ │ │ │ -541 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end); │ │ │ │ │ -542 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end); │ │ │ │ │ -543 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end); │ │ │ │ │ -544 } │ │ │ │ │ -545 │ │ │ │ │ -546 // Pointer interface for backward compatibility │ │ │ │ │ -547 template │ │ │ │ │ -_5_4_8 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, │ │ │ │ │ -549 int start=-1, int end=-1) const { │ │ │ │ │ +532 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ +edge: │ │ │ │ │ +533 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(edge), │ │ │ │ │ +534 eFaces = parent.getEdgeFaces(edge); │ │ │ │ │ +535 │ │ │ │ │ +536 Mask eMask(eVertWeights, 0, eFaceWeights); │ │ │ │ │ +537 │ │ │ │ │ +538 eHood.SetIndex(edge); │ │ │ │ │ +539 │ │ │ │ │ +540 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = (parent.getEdgeSharpness(edge) > 0.0f) ? _S_d_c_:_: │ │ │ │ │ +_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E : Sdc::Crease::RULE_SMOOTH; │ │ │ │ │ +541 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = child.getVertexRule(cVert); │ │ │ │ │ +542 │ │ │ │ │ +543 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule); │ │ │ │ │ +544 │ │ │ │ │ +545 // Apply the weights to the parent edges's vertices and (if applicable) to │ │ │ │ │ +546 // the child vertices of its incident faces: │ │ │ │ │ +547 dst[cVert].Clear(); │ │ │ │ │ +548 dst[cVert].AddWithWeight(src[eVerts[0]], eVertWeights[0]); │ │ │ │ │ +549 dst[cVert].AddWithWeight(src[eVerts[1]], eVertWeights[1]); │ │ │ │ │ 550 │ │ │ │ │ -551 this->_u_p_d_a_t_e(src, uuderivs, _duuWeights, start, end); │ │ │ │ │ -552 this->_u_p_d_a_t_e(src, uvderivs, _duvWeights, start, end); │ │ │ │ │ -553 this->_u_p_d_a_t_e(src, vvderivs, _dvvWeights, start, end); │ │ │ │ │ -554 } │ │ │ │ │ -555 template │ │ │ │ │ -_5_5_6 void _U_p_d_a_t_e_2_n_d_D_e_r_i_v_s(T1 const *srcBase, int numBase, T2 const *srcRef, │ │ │ │ │ -557 U *uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const { │ │ │ │ │ +551 if (eMask.GetNumFaceWeights() > 0) { │ │ │ │ │ +552 │ │ │ │ │ +553 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ +554 │ │ │ │ │ +555 if (eMask.AreFaceWeightsForFaceCenters()) { │ │ │ │ │ +556 assert(refinement.getNumChildVerticesFromFaces() > 0); │ │ │ │ │ +557 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(eFaces[i]); │ │ │ │ │ 558 │ │ │ │ │ -559 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uuderivs, _duuWeights, start, end); │ │ │ │ │ -560 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, uvderivs, _duvWeights, start, end); │ │ │ │ │ -561 this->_u_p_d_a_t_e(srcBase, numBase, srcRef, vvderivs, _dvvWeights, start, end); │ │ │ │ │ -562 } │ │ │ │ │ -563 │ │ │ │ │ -_5_6_5 void _C_l_e_a_r(); │ │ │ │ │ -566 │ │ │ │ │ -567private: │ │ │ │ │ -568 friend class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l; │ │ │ │ │ -569 │ │ │ │ │ -570 // Resize the table arrays (factory helper) │ │ │ │ │ -571 void resize(int nstencils, int nelems); │ │ │ │ │ -572 │ │ │ │ │ -573private: │ │ │ │ │ -574 std::vector _duWeights, // u derivative limit stencil weights │ │ │ │ │ -575 _dvWeights, // v derivative limit stencil weights │ │ │ │ │ -576 _duuWeights, // uu derivative limit stencil weights │ │ │ │ │ -577 _duvWeights, // uv derivative limit stencil weights │ │ │ │ │ -578 _dvvWeights; // vv derivative limit stencil weights │ │ │ │ │ -579}; │ │ │ │ │ -580 │ │ │ │ │ -_5_8_3class _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e : public _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l { │ │ │ │ │ -584protected: │ │ │ │ │ -_5_8_5 typedef _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> _B_a_s_e_T_a_b_l_e; │ │ │ │ │ -586 │ │ │ │ │ -587public: │ │ │ │ │ -_5_8_8 _L_i_m_i_t_S_t_e_n_c_i_l _G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x index) const { │ │ │ │ │ -589 return _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ -590 } │ │ │ │ │ -_5_9_1 _L_i_m_i_t_S_t_e_n_c_i_l _o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ -592 return _L_i_m_i_t_S_t_e_n_c_i_l(_B_a_s_e_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(index)); │ │ │ │ │ -593 } │ │ │ │ │ +559 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ +560 dst[cVert].AddWithWeight(dst[cVertOfFace], eFaceWeights[i]); │ │ │ │ │ +561 } else { │ │ │ │ │ +562 _V_t_r_:_:_I_n_d_e_x pFace = eFaces[i]; │ │ │ │ │ +563 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pFaceEdges = parent.getFaceEdges(pFace), │ │ │ │ │ +564 pFaceVerts = parent.getFaceVertices(pFace); │ │ │ │ │ +565 │ │ │ │ │ +566 int eInFace = 0; │ │ │ │ │ +567 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ; │ │ │ │ │ +568 │ │ │ │ │ +569 int vInFace = eInFace + 2; │ │ │ │ │ +570 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts._s_i_z_e(); │ │ │ │ │ +571 │ │ │ │ │ +572 _V_t_r_:_:_I_n_d_e_x pVertNext = pFaceVerts[vInFace]; │ │ │ │ │ +573 dst[cVert].AddWithWeight(src[pVertNext], eFaceWeights[i]); │ │ │ │ │ +574 } │ │ │ │ │ +575 } │ │ │ │ │ +576 } │ │ │ │ │ +577 } │ │ │ │ │ +578} │ │ │ │ │ +579 │ │ │ │ │ +580template │ │ │ │ │ +581template │ │ │ │ │ +582inline void │ │ │ │ │ +583PrimvarRefinerReal::interpFromVerts(int level, T const & src, U & dst) │ │ │ │ │ +const { │ │ │ │ │ +584 │ │ │ │ │ +585 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +586 Vtr::internal::Level const & parent = refinement.parent(); │ │ │ │ │ +587 Vtr::internal::Level const & child = refinement.child(); │ │ │ │ │ +588 │ │ │ │ │ +589 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +590 │ │ │ │ │ +591 Vtr::internal::VertexInterface vHood(parent, child); │ │ │ │ │ +592 │ │ │ │ │ +593 Vtr::internal::StackBuffer weightBuffer(2*parent.getMaxValence │ │ │ │ │ +()); │ │ │ │ │ 594 │ │ │ │ │ -595protected: │ │ │ │ │ -_5_9_6 _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e(int numControlVerts, │ │ │ │ │ -597 std::vector const& offsets, │ │ │ │ │ -598 std::vector const& sizes, │ │ │ │ │ -599 std::vector const& sources, │ │ │ │ │ -600 std::vector const& weights, │ │ │ │ │ -601 std::vector const& duWeights, │ │ │ │ │ -602 std::vector const& dvWeights, │ │ │ │ │ -603 std::vector const& duuWeights, │ │ │ │ │ -604 std::vector const& duvWeights, │ │ │ │ │ -605 std::vector const& dvvWeights, │ │ │ │ │ -606 bool includeCoarseVerts, │ │ │ │ │ -607 size_t firstOffset) │ │ │ │ │ -608 : _B_a_s_e_T_a_b_l_e(numControlVerts, │ │ │ │ │ -609 offsets, sizes, sources, weights, │ │ │ │ │ -610 duWeights, dvWeights, duuWeights, duvWeights, dvvWeights, │ │ │ │ │ -611 includeCoarseVerts, firstOffset) { } │ │ │ │ │ -612}; │ │ │ │ │ -613 │ │ │ │ │ -614 │ │ │ │ │ -615// Update values by applying cached stencil weights to new control values │ │ │ │ │ -616template │ │ │ │ │ -617template void │ │ │ │ │ -_6_1_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_u_p_d_a_t_e(T1 const &srcBase, int numBase, │ │ │ │ │ -619 T2 const &srcRef, U &dstValues, │ │ │ │ │ -620 std::vector const &valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const { │ │ │ │ │ -621 │ │ │ │ │ -622 int const * sizes = &_sizes.at(0); │ │ │ │ │ -623 _I_n_d_e_x const * indices = &_indices.at(0); │ │ │ │ │ -624 REAL const * weights = &valueWeights.at(0); │ │ │ │ │ +595 for (int vert = 0; vert < parent.getNumVertices(); ++vert) { │ │ │ │ │ +596 │ │ │ │ │ +597 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ +598 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +599 continue; │ │ │ │ │ +600 │ │ │ │ │ +601 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ +edge: │ │ │ │ │ +602 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = parent.getVertexEdges(vert), │ │ │ │ │ +603 vFaces = parent.getVertexFaces(vert); │ │ │ │ │ +604 │ │ │ │ │ +605 Weight vVertWeight, │ │ │ │ │ +606 * vEdgeWeights = weightBuffer, │ │ │ │ │ +607 * vFaceWeights = vEdgeWeights + vEdges._s_i_z_e(); │ │ │ │ │ +608 │ │ │ │ │ +609 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights); │ │ │ │ │ +610 │ │ │ │ │ +611 vHood.SetIndex(vert, cVert); │ │ │ │ │ +612 │ │ │ │ │ +613 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = parent.getVertexRule(vert); │ │ │ │ │ +614 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = child.getVertexRule(cVert); │ │ │ │ │ +615 │ │ │ │ │ +616 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule); │ │ │ │ │ +617 │ │ │ │ │ +618 // Apply the weights to the parent vertex, the vertices opposite its │ │ │ │ │ +incident │ │ │ │ │ +619 // edges, and the child vertices of its incident faces: │ │ │ │ │ +620 // │ │ │ │ │ +621 // In order to improve numerical precision, it's better to apply smaller │ │ │ │ │ +weights │ │ │ │ │ +622 // first, so begin with the face-weights followed by the edge-weights and │ │ │ │ │ +the │ │ │ │ │ +623 // vertex weight last. │ │ │ │ │ +624 dst[cVert].Clear(); │ │ │ │ │ 625 │ │ │ │ │ -626 if (start > 0) { │ │ │ │ │ -627 assert(start < (_I_n_d_e_x)_offsets.size()); │ │ │ │ │ -628 sizes += start; │ │ │ │ │ -629 indices += _offsets[start]; │ │ │ │ │ -630 weights += _offsets[start]; │ │ │ │ │ -631 } else { │ │ │ │ │ -632 start = 0; │ │ │ │ │ -633 } │ │ │ │ │ -634 │ │ │ │ │ -635 int nstencils = ((end < start) ? GetNumStencils() : end) - start; │ │ │ │ │ -636 │ │ │ │ │ -637 for (int i = 0; i < nstencils; ++i, ++sizes) { │ │ │ │ │ -638 dstValues[start + i].Clear(); │ │ │ │ │ -639 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) { │ │ │ │ │ -640 if (*indices < numBase) { │ │ │ │ │ -641 dstValues[start + i].AddWithWeight(srcBase[*indices], *weights); │ │ │ │ │ -642 } else { │ │ │ │ │ -643 dstValues[start + i].AddWithWeight(srcRef[*indices - numBase], *weights); │ │ │ │ │ +626 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ +627 assert(vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ +628 │ │ │ │ │ +629 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ +630 │ │ │ │ │ +631 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(vFaces[i]); │ │ │ │ │ +632 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ +633 dst[cVert].AddWithWeight(dst[cVertOfFace], vFaceWeights[i]); │ │ │ │ │ +634 } │ │ │ │ │ +635 } │ │ │ │ │ +636 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ +637 │ │ │ │ │ +638 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ +639 │ │ │ │ │ +640 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = parent.getEdgeVertices(vEdges[i]); │ │ │ │ │ +641 _V_t_r_:_:_I_n_d_e_x pVertOppositeEdge = (eVerts[0] == vert) ? eVerts[1] : eVerts[0]; │ │ │ │ │ +642 │ │ │ │ │ +643 dst[cVert].AddWithWeight(src[pVertOppositeEdge], vEdgeWeights[i]); │ │ │ │ │ 644 } │ │ │ │ │ 645 } │ │ │ │ │ -646 } │ │ │ │ │ -647} │ │ │ │ │ -648template │ │ │ │ │ -649template void │ │ │ │ │ -_6_5_0_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_u_p_d_a_t_e(T const &srcValues, U &dstValues, │ │ │ │ │ -651 std::vector const &valueWeights, _I_n_d_e_x start, _I_n_d_e_x end) const { │ │ │ │ │ -652 │ │ │ │ │ -653 int const * sizes = &_sizes.at(0); │ │ │ │ │ -654 _I_n_d_e_x const * indices = &_indices.at(0); │ │ │ │ │ -655 REAL const * weights = &valueWeights.at(0); │ │ │ │ │ -656 │ │ │ │ │ -657 if (start > 0) { │ │ │ │ │ -658 assert(start < (_I_n_d_e_x)_offsets.size()); │ │ │ │ │ -659 sizes += start; │ │ │ │ │ -660 indices += _offsets[start]; │ │ │ │ │ -661 weights += _offsets[start]; │ │ │ │ │ -662 } else { │ │ │ │ │ -663 start = 0; │ │ │ │ │ -664 } │ │ │ │ │ -665 │ │ │ │ │ -666 int nstencils = ((end < start) ? GetNumStencils() : end) - start; │ │ │ │ │ +646 dst[cVert].AddWithWeight(src[vert], vVertWeight); │ │ │ │ │ +647 } │ │ │ │ │ +648} │ │ │ │ │ +649 │ │ │ │ │ +650 │ │ │ │ │ +651// │ │ │ │ │ +652// Internal face-varying implementation details: │ │ │ │ │ +653// │ │ │ │ │ +654template │ │ │ │ │ +655template │ │ │ │ │ +656inline void │ │ │ │ │ +657PrimvarRefinerReal::interpFVarFromFaces(int level, T const & src, U & │ │ │ │ │ +dst, int channel) const { │ │ │ │ │ +658 │ │ │ │ │ +659 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +660 │ │ │ │ │ +661 if (refinement.getNumChildVerticesFromFaces() == 0) return; │ │ │ │ │ +662 │ │ │ │ │ +663 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +664 │ │ │ │ │ +665 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ +666 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ 667 │ │ │ │ │ -668 for (int i = 0; i < nstencils; ++i, ++sizes) { │ │ │ │ │ -669 dstValues[start + i].Clear(); │ │ │ │ │ -670 for (int j = 0; j < *sizes; ++j, ++indices, ++weights) { │ │ │ │ │ -671 dstValues[start + i].AddWithWeight(srcValues[*indices], *weights); │ │ │ │ │ -672 } │ │ │ │ │ -673 } │ │ │ │ │ -674} │ │ │ │ │ -675 │ │ │ │ │ -676template │ │ │ │ │ -677inline void │ │ │ │ │ -_6_7_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s() { │ │ │ │ │ -679 _I_n_d_e_x offset=0; │ │ │ │ │ -680 int noffsets = (int)_sizes.size(); │ │ │ │ │ -681 _offsets.resize(noffsets); │ │ │ │ │ -682 for (int i=0; i<(int)_sizes.size(); ++i ) { │ │ │ │ │ -683 _offsets[i]=offset; │ │ │ │ │ -684 offset+=_sizes[i]; │ │ │ │ │ -685 } │ │ │ │ │ -686} │ │ │ │ │ -687 │ │ │ │ │ -688template │ │ │ │ │ -689inline void │ │ │ │ │ -_6_9_0_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(int nstencils, int nelems) { │ │ │ │ │ -691 _sizes.resize(nstencils); │ │ │ │ │ -692 _indices.resize(nelems); │ │ │ │ │ -693 _weights.resize(nelems); │ │ │ │ │ -694} │ │ │ │ │ -695 │ │ │ │ │ -696template │ │ │ │ │ -697inline void │ │ │ │ │ -_6_9_8_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_e_r_v_e(int nstencils, int nelems) { │ │ │ │ │ -699 _sizes.reserve(nstencils); │ │ │ │ │ -700 _indices.reserve(nelems); │ │ │ │ │ -701 _weights.reserve(nelems); │ │ │ │ │ -702} │ │ │ │ │ -703 │ │ │ │ │ -704template │ │ │ │ │ +668 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +669 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +670 │ │ │ │ │ +671 Vtr::internal::StackBuffer fValueWeights │ │ │ │ │ +(parentLevel.getMaxValence()); │ │ │ │ │ +672 │ │ │ │ │ +673 for (int face = 0; face < parentLevel.getNumFaces(); ++face) { │ │ │ │ │ +674 │ │ │ │ │ +675 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getFaceChildVertex(face); │ │ │ │ │ +676 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +677 continue; │ │ │ │ │ +678 │ │ │ │ │ +679 _V_t_r_:_:_I_n_d_e_x cVertValue = childFVar.getVertexValueOffset(cVert); │ │ │ │ │ +680 │ │ │ │ │ +681 // The only difference for face-varying here is that we get the values │ │ │ │ │ +associated │ │ │ │ │ +682 // with each face-vertex directly from the FVarLevel, rather than using the │ │ │ │ │ +parent │ │ │ │ │ +683 // face-vertices directly. If any face-vertex has any sibling values, then │ │ │ │ │ +we may │ │ │ │ │ +684 // get the wrong one using the face-vertex index directly. │ │ │ │ │ +685 │ │ │ │ │ +686 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ +face: │ │ │ │ │ +687 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fValues = parentFVar.getFaceValues(face); │ │ │ │ │ +688 │ │ │ │ │ +689 Mask fMask(fValueWeights, 0, 0); │ │ │ │ │ +690 Vtr::internal::FaceInterface fHood(fValues.size()); │ │ │ │ │ +691 │ │ │ │ │ +692 scheme.ComputeFaceVertexMask(fHood, fMask); │ │ │ │ │ +693 │ │ │ │ │ +694 // Apply the weights to the parent face's vertices: │ │ │ │ │ +695 dst[cVertValue].Clear(); │ │ │ │ │ +696 │ │ │ │ │ +697 for (int i = 0; i < fValues.size(); ++i) { │ │ │ │ │ +698 dst[cVertValue].AddWithWeight(src[fValues[i]], fValueWeights[i]); │ │ │ │ │ +699 } │ │ │ │ │ +700 } │ │ │ │ │ +701} │ │ │ │ │ +702 │ │ │ │ │ +703template │ │ │ │ │ +704template │ │ │ │ │ 705inline void │ │ │ │ │ -_7_0_6_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_s_h_r_i_n_k_T_o_F_i_t() { │ │ │ │ │ -707 std::vector(_sizes).swap(_sizes); │ │ │ │ │ -708 std::vector(_indices).swap(_indices); │ │ │ │ │ -709 std::vector(_weights).swap(_weights); │ │ │ │ │ -710} │ │ │ │ │ +706PrimvarRefinerReal::interpFVarFromEdges(int level, T const & src, U & │ │ │ │ │ +dst, int channel) const { │ │ │ │ │ +707 │ │ │ │ │ +708 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +709 │ │ │ │ │ +710 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ 711 │ │ │ │ │ -712template │ │ │ │ │ -713inline void │ │ │ │ │ -_7_1_4_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_f_i_n_a_l_i_z_e() { │ │ │ │ │ -715 shrinkToFit(); │ │ │ │ │ -716 generateOffsets(); │ │ │ │ │ -717} │ │ │ │ │ +712 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ +713 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ +714 │ │ │ │ │ +715 Vtr::internal::FVarRefinement const & refineFVar = │ │ │ │ │ +refinement.getFVarRefinement(channel); │ │ │ │ │ +716 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +717 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ 718 │ │ │ │ │ -719// Returns a Stencil at index i in the table │ │ │ │ │ -720template │ │ │ │ │ -721inline _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ -_7_2_2_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_G_e_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const { │ │ │ │ │ -723 assert((! _offsets.empty()) && i<(int)_offsets.size()); │ │ │ │ │ -724 │ │ │ │ │ -725 _I_n_d_e_x ofs = _offsets[i]; │ │ │ │ │ -726 │ │ │ │ │ -727 return _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>(const_cast(&_sizes[i]), │ │ │ │ │ -728 const_cast<_I_n_d_e_x*>(&_indices[ofs]), │ │ │ │ │ -729 const_cast(&_weights[ofs])); │ │ │ │ │ -730} │ │ │ │ │ -731 │ │ │ │ │ -732template │ │ │ │ │ -733inline _S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ -_7_3_4_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ -735 return GetStencil(index); │ │ │ │ │ -736} │ │ │ │ │ +719 // │ │ │ │ │ +720 // Allocate and initialize (if linearly interpolated) interpolation weights │ │ │ │ │ +for │ │ │ │ │ +721 // the edge mask: │ │ │ │ │ +722 // │ │ │ │ │ +723 Weight eVertWeights[2]; │ │ │ │ │ +724 Vtr::internal::StackBuffer eFaceWeights │ │ │ │ │ +(parentLevel.getMaxEdgeFaces()); │ │ │ │ │ +725 │ │ │ │ │ +726 Mask eMask(eVertWeights, 0, eFaceWeights); │ │ │ │ │ +727 │ │ │ │ │ +728 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == _S_d_c_:_: │ │ │ │ │ +_S_C_H_E_M_E___B_I_L_I_N_E_A_R); │ │ │ │ │ +729 if (isLinearFVar) { │ │ │ │ │ +730 eMask.SetNumVertexWeights(2); │ │ │ │ │ +731 eMask.SetNumEdgeWeights(0); │ │ │ │ │ +732 eMask.SetNumFaceWeights(0); │ │ │ │ │ +733 │ │ │ │ │ +734 eVertWeights[0] = 0.5f; │ │ │ │ │ +735 eVertWeights[1] = 0.5f; │ │ │ │ │ +736 } │ │ │ │ │ 737 │ │ │ │ │ -738template │ │ │ │ │ -739inline void │ │ │ │ │ -740_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(int nstencils, int nelems) { │ │ │ │ │ -741 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_r_e_s_i_z_e(nstencils, nelems); │ │ │ │ │ -742 _duWeights.resize(nelems); │ │ │ │ │ -743 _dvWeights.resize(nelems); │ │ │ │ │ -744} │ │ │ │ │ +738 Vtr::internal::EdgeInterface eHood(parentLevel); │ │ │ │ │ +739 │ │ │ │ │ +740 for (int edge = 0; edge < parentLevel.getNumEdges(); ++edge) { │ │ │ │ │ +741 │ │ │ │ │ +742 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getEdgeChildVertex(edge); │ │ │ │ │ +743 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +744 continue; │ │ │ │ │ 745 │ │ │ │ │ -746// Returns a LimitStencil at index i in the table │ │ │ │ │ -747template │ │ │ │ │ -748inline LimitStencilReal │ │ │ │ │ -_7_4_9_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l(_I_n_d_e_x i) const { │ │ │ │ │ -750 assert((! this->GetOffsets().empty()) && i<(int)this->GetOffsets().size()); │ │ │ │ │ -751 │ │ │ │ │ -752 _I_n_d_e_x ofs = this->GetOffsets()[i]; │ │ │ │ │ -753 │ │ │ │ │ -754 if (!_duWeights.empty() && !_dvWeights.empty() && │ │ │ │ │ -755 !_duuWeights.empty() && !_duvWeights.empty() && !_dvvWeights.empty()) { │ │ │ │ │ -756 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ -757 const_cast(&this->GetSizes()[i]), │ │ │ │ │ -758 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ -759 const_cast(&this->GetWeights()[ofs]), │ │ │ │ │ -760 const_cast(&GetDuWeights()[ofs]), │ │ │ │ │ -761 const_cast(&GetDvWeights()[ofs]), │ │ │ │ │ -762 const_cast(&GetDuuWeights()[ofs]), │ │ │ │ │ -763 const_cast(&GetDuvWeights()[ofs]), │ │ │ │ │ -764 const_cast(&GetDvvWeights()[ofs]) ); │ │ │ │ │ -765 } else if (!_duWeights.empty() && !_dvWeights.empty()) { │ │ │ │ │ -766 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ -767 const_cast(&this->GetSizes()[i]), │ │ │ │ │ -768 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ -769 const_cast(&this->GetWeights()[ofs]), │ │ │ │ │ -770 const_cast(&GetDuWeights()[ofs]), │ │ │ │ │ -771 const_cast(&GetDvWeights()[ofs]) ); │ │ │ │ │ -772 } else { │ │ │ │ │ -773 return _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_>( │ │ │ │ │ -774 const_cast(&this->GetSizes()[i]), │ │ │ │ │ -775 const_cast<_I_n_d_e_x *>(&this->GetControlIndices()[ofs]), │ │ │ │ │ -776 const_cast(&this->GetWeights()[ofs]) ); │ │ │ │ │ -777 } │ │ │ │ │ -778} │ │ │ │ │ -779 │ │ │ │ │ -780template │ │ │ │ │ -781inline _L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_<_R_E_A_L_> │ │ │ │ │ -_7_8_2_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_>_:_:_o_p_e_r_a_t_o_r_[_]_ (_I_n_d_e_x index) const { │ │ │ │ │ -783 return GetLimitStencil(index); │ │ │ │ │ -784} │ │ │ │ │ -785 │ │ │ │ │ -786} // end namespace Far │ │ │ │ │ -787 │ │ │ │ │ -788} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -789using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -790 │ │ │ │ │ -791} // end namespace OpenSubdiv │ │ │ │ │ +746 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y cVertValues = childFVar.getVertexValues(cVert); │ │ │ │ │ +747 │ │ │ │ │ +748 bool fvarEdgeVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues │ │ │ │ │ +[0]); │ │ │ │ │ +749 if (fvarEdgeVertMatchesVertex) { │ │ │ │ │ +750 // │ │ │ │ │ +751 // If smoothly interpolated, compute new weights for the edge mask: │ │ │ │ │ +752 // │ │ │ │ │ +753 if (!isLinearFVar) { │ │ │ │ │ +754 eHood.SetIndex(edge); │ │ │ │ │ +755 │ │ │ │ │ +756 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = (parentLevel.getEdgeSharpness(edge) > 0.0f) │ │ │ │ │ +757 ? _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E : Sdc::Crease::RULE_SMOOTH; │ │ │ │ │ +758 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = childLevel.getVertexRule(cVert); │ │ │ │ │ +759 │ │ │ │ │ +760 scheme.ComputeEdgeVertexMask(eHood, eMask, pRule, cRule); │ │ │ │ │ +761 } │ │ │ │ │ +762 │ │ │ │ │ +763 // Apply the weights to the parent edge's vertices and (if applicable) to │ │ │ │ │ +764 // the child vertices of its incident faces: │ │ │ │ │ +765 // │ │ │ │ │ +766 // Even though the face-varying topology matches the vertex topology, we │ │ │ │ │ +need │ │ │ │ │ +767 // to be careful here when getting values corresponding to the two end- │ │ │ │ │ +vertices. │ │ │ │ │ +768 // While the edge may be continuous, the vertices at their ends may have │ │ │ │ │ +769 // discontinuities elsewhere in their neighborhood (i.e. on the "other │ │ │ │ │ +side" │ │ │ │ │ +770 // of the end-vertex) and so have sibling values associated with them. In │ │ │ │ │ +most │ │ │ │ │ +771 // cases the topology for an end-vertex will match and we can use it │ │ │ │ │ +directly, │ │ │ │ │ +772 // but we must still check and retrieve as needed. │ │ │ │ │ +773 // │ │ │ │ │ +774 // Indices for values corresponding to face-vertices are guaranteed to │ │ │ │ │ +match, │ │ │ │ │ +775 // so we can use the child-vertex indices directly. │ │ │ │ │ +776 // │ │ │ │ │ +777 // And by "directly", we always use getVertexValue(vertexIndex) to │ │ │ │ │ +reference │ │ │ │ │ +778 // values in the "src" to account for the possible indirection that may │ │ │ │ │ +exist at │ │ │ │ │ +779 // level 0 -- where there may be fewer values than vertices and an │ │ │ │ │ +additional │ │ │ │ │ +780 // indirection is necessary. We can use a vertex index directly for "dst" │ │ │ │ │ +when │ │ │ │ │ +781 // it matches. │ │ │ │ │ +782 // │ │ │ │ │ +783 _V_t_r_:_:_I_n_d_e_x eVertValues[2]; │ │ │ │ │ +784 │ │ │ │ │ +785 parentFVar.getEdgeFaceValues(edge, 0, eVertValues); │ │ │ │ │ +786 │ │ │ │ │ +787 _I_n_d_e_x cVertValue = cVertValues[0]; │ │ │ │ │ +788 │ │ │ │ │ +789 dst[cVertValue].Clear(); │ │ │ │ │ +790 dst[cVertValue].AddWithWeight(src[eVertValues[0]], eVertWeights[0]); │ │ │ │ │ +791 dst[cVertValue].AddWithWeight(src[eVertValues[1]], eVertWeights[1]); │ │ │ │ │ 792 │ │ │ │ │ -793#endif // OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ +793 if (eMask.GetNumFaceWeights() > 0) { │ │ │ │ │ +794 │ │ │ │ │ +795 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eFaces = parentLevel.getEdgeFaces(edge); │ │ │ │ │ +796 │ │ │ │ │ +797 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ +798 if (eMask.AreFaceWeightsForFaceCenters()) { │ │ │ │ │ +799 │ │ │ │ │ +800 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(eFaces[i]); │ │ │ │ │ +801 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ +802 │ │ │ │ │ +803 _V_t_r_:_:_I_n_d_e_x cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace); │ │ │ │ │ +804 dst[cVertValue].AddWithWeight(dst[cValueOfFace], eFaceWeights[i]); │ │ │ │ │ +805 } else { │ │ │ │ │ +806 _V_t_r_:_:_I_n_d_e_x pFace = eFaces[i]; │ │ │ │ │ +807 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pFaceEdges = parentLevel.getFaceEdges(pFace), │ │ │ │ │ +808 pFaceVerts = parentLevel.getFaceVertices(pFace); │ │ │ │ │ +809 │ │ │ │ │ +810 int eInFace = 0; │ │ │ │ │ +811 for ( ; pFaceEdges[eInFace] != edge; ++eInFace ) ; │ │ │ │ │ +812 │ │ │ │ │ +813 // Edge "i" spans vertices [i,i+1] so we want i+2... │ │ │ │ │ +814 int vInFace = eInFace + 2; │ │ │ │ │ +815 if (vInFace >= pFaceVerts.size()) vInFace -= pFaceVerts._s_i_z_e(); │ │ │ │ │ +816 │ │ │ │ │ +817 _V_t_r_:_:_I_n_d_e_x pValueNext = parentFVar.getFaceValues(pFace)[vInFace]; │ │ │ │ │ +818 dst[cVertValue].AddWithWeight(src[pValueNext], eFaceWeights[i]); │ │ │ │ │ +819 } │ │ │ │ │ +820 } │ │ │ │ │ +821 } │ │ │ │ │ +822 } else { │ │ │ │ │ +823 // │ │ │ │ │ +824 // Mismatched edge-verts should just be linearly interpolated between the │ │ │ │ │ +pairs of │ │ │ │ │ +825 // values for each sibling of the child edge-vertex -- the question is: │ │ │ │ │ +which face │ │ │ │ │ +826 // holds that pair of values for a given sibling? │ │ │ │ │ +827 // │ │ │ │ │ +828 // In the manifold case, the sibling and edge-face indices will correspond. │ │ │ │ │ +We │ │ │ │ │ +829 // will eventually need to update this to account for > 3 incident faces. │ │ │ │ │ +830 // │ │ │ │ │ +831 for (int i = 0; i < cVertValues.size(); ++i) { │ │ │ │ │ +832 _V_t_r_:_:_I_n_d_e_x eVertValues[2]; │ │ │ │ │ +833 int eFaceIndex = refineFVar.getChildValueParentSource(cVert, i); │ │ │ │ │ +834 assert(eFaceIndex == i); │ │ │ │ │ +835 │ │ │ │ │ +836 parentFVar.getEdgeFaceValues(edge, eFaceIndex, eVertValues); │ │ │ │ │ +837 │ │ │ │ │ +838 _I_n_d_e_x cVertValue = cVertValues[i]; │ │ │ │ │ +839 │ │ │ │ │ +840 dst[cVertValue].Clear(); │ │ │ │ │ +841 dst[cVertValue].AddWithWeight(src[eVertValues[0]], 0.5); │ │ │ │ │ +842 dst[cVertValue].AddWithWeight(src[eVertValues[1]], 0.5); │ │ │ │ │ +843 } │ │ │ │ │ +844 } │ │ │ │ │ +845 } │ │ │ │ │ +846} │ │ │ │ │ +847 │ │ │ │ │ +848template │ │ │ │ │ +849template │ │ │ │ │ +850inline void │ │ │ │ │ +851PrimvarRefinerReal::interpFVarFromVerts(int level, T const & src, U & │ │ │ │ │ +dst, int channel) const { │ │ │ │ │ +852 │ │ │ │ │ +853 Vtr::internal::Refinement const & refinement = _refiner.getRefinement │ │ │ │ │ +(level-1); │ │ │ │ │ +854 │ │ │ │ │ +855 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +856 │ │ │ │ │ +857 Vtr::internal::Level const & parentLevel = refinement.parent(); │ │ │ │ │ +858 Vtr::internal::Level const & childLevel = refinement.child(); │ │ │ │ │ +859 │ │ │ │ │ +860 Vtr::internal::FVarRefinement const & refineFVar = │ │ │ │ │ +refinement.getFVarRefinement(channel); │ │ │ │ │ +861 Vtr::internal::FVarLevel const & parentFVar = parentLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +862 Vtr::internal::FVarLevel const & childFVar = childLevel.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +863 │ │ │ │ │ +864 bool isLinearFVar = parentFVar.isLinear() || (_refiner._subdivType == _S_d_c_:_: │ │ │ │ │ +_S_C_H_E_M_E___B_I_L_I_N_E_A_R); │ │ │ │ │ +865 │ │ │ │ │ +866 Vtr::internal::StackBuffer weightBuffer │ │ │ │ │ +(2*parentLevel.getMaxValence()); │ │ │ │ │ +867 │ │ │ │ │ +868 Vtr::internal::StackBuffer vEdgeValues │ │ │ │ │ +(parentLevel.getMaxValence()); │ │ │ │ │ +869 │ │ │ │ │ +870 Vtr::internal::VertexInterface vHood(parentLevel, childLevel); │ │ │ │ │ +871 │ │ │ │ │ +872 for (int vert = 0; vert < parentLevel.getNumVertices(); ++vert) { │ │ │ │ │ +873 │ │ │ │ │ +874 _V_t_r_:_:_I_n_d_e_x cVert = refinement.getVertexChildVertex(vert); │ │ │ │ │ +875 if (!_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVert)) │ │ │ │ │ +876 continue; │ │ │ │ │ +877 │ │ │ │ │ +878 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pVertValues = parentFVar.getVertexValues(vert), │ │ │ │ │ +879 cVertValues = childFVar.getVertexValues(cVert); │ │ │ │ │ +880 │ │ │ │ │ +881 bool fvarVertVertMatchesVertex = childFVar.valueTopologyMatches(cVertValues │ │ │ │ │ +[0]); │ │ │ │ │ +882 if (isLinearFVar && fvarVertVertMatchesVertex) { │ │ │ │ │ +883 dst[cVertValues[0]].Clear(); │ │ │ │ │ +884 dst[cVertValues[0]].AddWithWeight(src[pVertValues[0]], 1.0f); │ │ │ │ │ +885 continue; │ │ │ │ │ +886 } │ │ │ │ │ +887 │ │ │ │ │ +888 if (fvarVertVertMatchesVertex) { │ │ │ │ │ +889 // │ │ │ │ │ +890 // Declare and compute mask weights for this vertex relative to its parent │ │ │ │ │ +edge: │ │ │ │ │ +891 // │ │ │ │ │ +892 // (We really need to encapsulate this somewhere else for use here and in │ │ │ │ │ +the │ │ │ │ │ +893 // general case) │ │ │ │ │ +894 // │ │ │ │ │ +895 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = parentLevel.getVertexEdges(vert); │ │ │ │ │ +896 │ │ │ │ │ +897 Weight vVertWeight; │ │ │ │ │ +898 Weight * vEdgeWeights = weightBuffer; │ │ │ │ │ +899 Weight * vFaceWeights = vEdgeWeights + vEdges._s_i_z_e(); │ │ │ │ │ +900 │ │ │ │ │ +901 Mask vMask(&vVertWeight, vEdgeWeights, vFaceWeights); │ │ │ │ │ +902 │ │ │ │ │ +903 vHood.SetIndex(vert, cVert); │ │ │ │ │ +904 │ │ │ │ │ +905 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e pRule = parentLevel.getVertexRule(vert); │ │ │ │ │ +906 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e cRule = childLevel.getVertexRule(cVert); │ │ │ │ │ +907 │ │ │ │ │ +908 scheme.ComputeVertexVertexMask(vHood, vMask, pRule, cRule); │ │ │ │ │ +909 │ │ │ │ │ +910 // Apply the weights to the parent vertex, the vertices opposite its │ │ │ │ │ +incident │ │ │ │ │ +911 // edges, and the child vertices of its incident faces: │ │ │ │ │ +912 // │ │ │ │ │ +913 // Even though the face-varying topology matches the vertex topology, we │ │ │ │ │ +need │ │ │ │ │ +914 // to be careful here when getting values corresponding to vertices at the │ │ │ │ │ +915 // ends of edges. While the edge may be continuous, the end vertex may have │ │ │ │ │ +916 // discontinuities elsewhere in their neighborhood (i.e. on the "other │ │ │ │ │ +side" │ │ │ │ │ +917 // of the end-vertex) and so have sibling values associated with them. In │ │ │ │ │ +most │ │ │ │ │ +918 // cases the topology for an end-vertex will match and we can use it │ │ │ │ │ +directly, │ │ │ │ │ +919 // but we must still check and retrieve as needed. │ │ │ │ │ +920 // │ │ │ │ │ +921 // Indices for values corresponding to face-vertices are guaranteed to │ │ │ │ │ +match, │ │ │ │ │ +922 // so we can use the child-vertex indices directly. │ │ │ │ │ +923 // │ │ │ │ │ +924 // And by "directly", we always use getVertexValue(vertexIndex) to │ │ │ │ │ +reference │ │ │ │ │ +925 // values in the "src" to account for the possible indirection that may │ │ │ │ │ +exist at │ │ │ │ │ +926 // level 0 -- where there may be fewer values than vertices and an │ │ │ │ │ +additional │ │ │ │ │ +927 // indirection is necessary. We can use a vertex index directly for "dst" │ │ │ │ │ +when │ │ │ │ │ +928 // it matches. │ │ │ │ │ +929 // │ │ │ │ │ +930 // As with applying the mask to vertex data, in order to improve numerical │ │ │ │ │ +931 // precision, it's better to apply smaller weights first, so begin with the │ │ │ │ │ +932 // face-weights followed by the edge-weights and the vertex weight last. │ │ │ │ │ +933 // │ │ │ │ │ +934 _V_t_r_:_:_I_n_d_e_x pVertValue = pVertValues[0]; │ │ │ │ │ +935 _V_t_r_:_:_I_n_d_e_x cVertValue = cVertValues[0]; │ │ │ │ │ +936 │ │ │ │ │ +937 dst[cVertValue].Clear(); │ │ │ │ │ +938 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ +939 assert(vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ +940 │ │ │ │ │ +941 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = parentLevel.getVertexFaces(vert); │ │ │ │ │ +942 │ │ │ │ │ +943 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ +944 │ │ │ │ │ +945 _V_t_r_:_:_I_n_d_e_x cVertOfFace = refinement.getFaceChildVertex(vFaces[i]); │ │ │ │ │ +946 assert(_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d(cVertOfFace)); │ │ │ │ │ +947 │ │ │ │ │ +948 _V_t_r_:_:_I_n_d_e_x cValueOfFace = childFVar.getVertexValueOffset(cVertOfFace); │ │ │ │ │ +949 dst[cVertValue].AddWithWeight(dst[cValueOfFace], vFaceWeights[i]); │ │ │ │ │ +950 } │ │ │ │ │ +951 } │ │ │ │ │ +952 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ +953 │ │ │ │ │ +954 parentFVar.getVertexEdgeValues(vert, vEdgeValues); │ │ │ │ │ +955 │ │ │ │ │ +956 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ +957 dst[cVertValue].AddWithWeight(src[vEdgeValues[i]], vEdgeWeights[i]); │ │ │ │ │ +958 } │ │ │ │ │ +959 } │ │ │ │ │ +960 dst[cVertValue].AddWithWeight(src[pVertValue], vVertWeight); │ │ │ │ │ +961 } else { │ │ │ │ │ +962 // │ │ │ │ │ +963 // Each FVar value associated with a vertex will be either a corner or a │ │ │ │ │ +crease, │ │ │ │ │ +964 // or potentially in transition from corner to crease: │ │ │ │ │ +965 // - if the CHILD is a corner, there can be no transition so we have a │ │ │ │ │ +corner │ │ │ │ │ +966 // - otherwise if the PARENT is a crease, both will be creases (no │ │ │ │ │ +transition) │ │ │ │ │ +967 // - otherwise the parent must be a corner and the child a crease │ │ │ │ │ +(transition) │ │ │ │ │ +968 // │ │ │ │ │ +969 Vtr::internal::FVarLevel::ConstValueTagArray pValueTags = │ │ │ │ │ +parentFVar.getVertexValueTags(vert); │ │ │ │ │ +970 Vtr::internal::FVarLevel::ConstValueTagArray cValueTags = │ │ │ │ │ +childFVar.getVertexValueTags(cVert); │ │ │ │ │ +971 │ │ │ │ │ +972 for (int cSiblingIndex = 0; cSiblingIndex < cVertValues.size(); │ │ │ │ │ +++cSiblingIndex) { │ │ │ │ │ +973 int pSiblingIndex = refineFVar.getChildValueParentSource(cVert, │ │ │ │ │ +cSiblingIndex); │ │ │ │ │ +974 assert(pSiblingIndex == cSiblingIndex); │ │ │ │ │ +975 │ │ │ │ │ +976 typedef Vtr::internal::FVarLevel::Sibling SiblingIntType; │ │ │ │ │ +977 │ │ │ │ │ +978 SiblingIntType cSibling = (SiblingIntType) cSiblingIndex; │ │ │ │ │ +979 SiblingIntType pSibling = (SiblingIntType) pSiblingIndex; │ │ │ │ │ +980 │ │ │ │ │ +981 _V_t_r_:_:_I_n_d_e_x pVertValue = pVertValues[pSibling]; │ │ │ │ │ +982 _V_t_r_:_:_I_n_d_e_x cVertValue = cVertValues[cSibling]; │ │ │ │ │ +983 │ │ │ │ │ +984 dst[cVertValue].Clear(); │ │ │ │ │ +985 if (isLinearFVar || cValueTags[cSibling].isCorner()) { │ │ │ │ │ +986 dst[cVertValue].AddWithWeight(src[pVertValue], 1.0f); │ │ │ │ │ +987 } else { │ │ │ │ │ +988 // │ │ │ │ │ +989 // We have either a crease or a transition from corner to crease -- in │ │ │ │ │ +990 // either case, we need the end values for the full/fractional crease: │ │ │ │ │ +991 // │ │ │ │ │ +992 _I_n_d_e_x pEndValues[2]; │ │ │ │ │ +993 parentFVar.getVertexCreaseEndValues(vert, pSibling, pEndValues); │ │ │ │ │ +994 │ │ │ │ │ +995 Weight vWeight = 0.75f; │ │ │ │ │ +996 Weight eWeight = 0.125f; │ │ │ │ │ +997 │ │ │ │ │ +998 // │ │ │ │ │ +999 // If semi-sharp we need to apply fractional weighting -- if made sharp │ │ │ │ │ +because │ │ │ │ │ +1000 // of the other sibling (dependent-sharp) use the fractional weight from │ │ │ │ │ +that │ │ │ │ │ +1001 // other sibling (should only occur when there are 2): │ │ │ │ │ +1002 // │ │ │ │ │ +1003 if (pValueTags[pSibling].isSemiSharp()) { │ │ │ │ │ +1004 Weight wCorner = pValueTags[pSibling].isDepSharp() │ │ │ │ │ +1005 ? refineFVar.getFractionalWeight(vert, !pSibling, cVert, !cSibling) │ │ │ │ │ +1006 : refineFVar.getFractionalWeight(vert, pSibling, cVert, cSibling); │ │ │ │ │ +1007 Weight wCrease = 1.0f - wCorner; │ │ │ │ │ +1008 │ │ │ │ │ +1009 vWeight = wCrease * 0.75f + wCorner; │ │ │ │ │ +1010 eWeight = wCrease * 0.125f; │ │ │ │ │ +1011 } │ │ │ │ │ +1012 dst[cVertValue].AddWithWeight(src[pEndValues[0]], eWeight); │ │ │ │ │ +1013 dst[cVertValue].AddWithWeight(src[pEndValues[1]], eWeight); │ │ │ │ │ +1014 dst[cVertValue].AddWithWeight(src[pVertValue], vWeight); │ │ │ │ │ +1015 } │ │ │ │ │ +1016 } │ │ │ │ │ +1017 } │ │ │ │ │ +1018 } │ │ │ │ │ +1019} │ │ │ │ │ +1020 │ │ │ │ │ +1021template │ │ │ │ │ +1022template │ │ │ │ │ +1023inline void │ │ │ │ │ +1024PrimvarRefinerReal::limit(T const & src, U & dstPos, U1 * dstTan1Ptr, │ │ │ │ │ +U2 * dstTan2Ptr) const { │ │ │ │ │ +1025 │ │ │ │ │ +1026 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +1027 │ │ │ │ │ +1028 Vtr::internal::Level const & level = _refiner.getLevel │ │ │ │ │ +(_refiner.GetMaxLevel()); │ │ │ │ │ +1029 │ │ │ │ │ +1030 int maxWeightsPerMask = 1 + 2 * level.getMaxValence(); │ │ │ │ │ +1031 bool hasTangents = (dstTan1Ptr && dstTan2Ptr); │ │ │ │ │ +1032 int numMasks = 1 + (hasTangents ? 2 : 0); │ │ │ │ │ +1033 │ │ │ │ │ +1034 Vtr::internal::StackBuffer indexBuffer(maxWeightsPerMask); │ │ │ │ │ +1035 Vtr::internal::StackBuffer weightBuffer(numMasks * │ │ │ │ │ +maxWeightsPerMask); │ │ │ │ │ +1036 │ │ │ │ │ +1037 Weight * vPosWeights = weightBuffer, │ │ │ │ │ +1038 * ePosWeights = vPosWeights + 1, │ │ │ │ │ +1039 * fPosWeights = ePosWeights + level.getMaxValence(); │ │ │ │ │ +1040 Weight * vTan1Weights = vPosWeights + maxWeightsPerMask, │ │ │ │ │ +1041 * eTan1Weights = ePosWeights + maxWeightsPerMask, │ │ │ │ │ +1042 * fTan1Weights = fPosWeights + maxWeightsPerMask; │ │ │ │ │ +1043 Weight * vTan2Weights = vTan1Weights + maxWeightsPerMask, │ │ │ │ │ +1044 * eTan2Weights = eTan1Weights + maxWeightsPerMask, │ │ │ │ │ +1045 * fTan2Weights = fTan1Weights + maxWeightsPerMask; │ │ │ │ │ +1046 │ │ │ │ │ +1047 Mask posMask( vPosWeights, ePosWeights, fPosWeights); │ │ │ │ │ +1048 Mask tan1Mask(vTan1Weights, eTan1Weights, fTan1Weights); │ │ │ │ │ +1049 Mask tan2Mask(vTan2Weights, eTan2Weights, fTan2Weights); │ │ │ │ │ +1050 │ │ │ │ │ +1051 // This is a bit obscure -- assigning both parent and child as last level │ │ │ │ │ +-- but │ │ │ │ │ +1052 // this mask type was intended for another purpose. Consider one for the │ │ │ │ │ +limit: │ │ │ │ │ +1053 Vtr::internal::VertexInterface vHood(level, level); │ │ │ │ │ +1054 │ │ │ │ │ +1055 for (int vert = 0; vert < level.getNumVertices(); ++vert) { │ │ │ │ │ +1056 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = level.getVertexEdges(vert); │ │ │ │ │ +1057 │ │ │ │ │ +1058 // Incomplete vertices (present in sparse refinement) do not have their │ │ │ │ │ +full │ │ │ │ │ +1059 // topological neighborhood to determine a proper limit -- just leave the │ │ │ │ │ +1060 // vertex at the refined location and continue to the next: │ │ │ │ │ +1061 if (level.getVertexTag(vert)._incomplete || (vEdges.size() == 0)) { │ │ │ │ │ +1062 dstPos[vert].Clear(); │ │ │ │ │ +1063 dstPos[vert].AddWithWeight(src[vert], 1.0); │ │ │ │ │ +1064 if (hasTangents) { │ │ │ │ │ +1065 (*dstTan1Ptr)[vert].Clear(); │ │ │ │ │ +1066 (*dstTan2Ptr)[vert].Clear(); │ │ │ │ │ +1067 } │ │ │ │ │ +1068 continue; │ │ │ │ │ +1069 } │ │ │ │ │ +1070 │ │ │ │ │ +1071 // │ │ │ │ │ +1072 // Limit masks require the subdivision Rule for the vertex in order to │ │ │ │ │ +deal │ │ │ │ │ +1073 // with infinitely sharp features correctly -- including boundaries and │ │ │ │ │ +corners. │ │ │ │ │ +1074 // The vertex neighborhood is minimally defined with vertex and edge │ │ │ │ │ +counts. │ │ │ │ │ +1075 // │ │ │ │ │ +1076 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e vRule = level.getVertexRule(vert); │ │ │ │ │ +1077 │ │ │ │ │ +1078 // This is a bit obscure -- child vertex index will be ignored here │ │ │ │ │ +1079 vHood.SetIndex(vert, vert); │ │ │ │ │ +1080 │ │ │ │ │ +1081 if (hasTangents) { │ │ │ │ │ +1082 scheme.ComputeVertexLimitMask(vHood, posMask, tan1Mask, tan2Mask, vRule); │ │ │ │ │ +1083 } else { │ │ │ │ │ +1084 scheme.ComputeVertexLimitMask(vHood, posMask, vRule); │ │ │ │ │ +1085 } │ │ │ │ │ +1086 │ │ │ │ │ +1087 // │ │ │ │ │ +1088 // Gather the neighboring vertices of this vertex -- the vertices opposite │ │ │ │ │ +its │ │ │ │ │ +1089 // incident edges, and the opposite vertices of its incident faces: │ │ │ │ │ +1090 // │ │ │ │ │ +1091 _I_n_d_e_x * eIndices = indexBuffer; │ │ │ │ │ +1092 _I_n_d_e_x * fIndices = indexBuffer + vEdges._s_i_z_e(); │ │ │ │ │ +1093 │ │ │ │ │ +1094 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ +1095 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eVerts = level.getEdgeVertices(vEdges[i]); │ │ │ │ │ +1096 │ │ │ │ │ +1097 eIndices[i] = (eVerts[0] == vert) ? eVerts[1] : eVerts[0]; │ │ │ │ │ +1098 } │ │ │ │ │ +1099 if (posMask.GetNumFaceWeights() || (hasTangents && │ │ │ │ │ +tan1Mask.GetNumFaceWeights())) { │ │ │ │ │ +1100 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = level.getVertexFaces(vert); │ │ │ │ │ +1101 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y vInFace = level.getVertexFaceLocalIndices(vert); │ │ │ │ │ +1102 │ │ │ │ │ +1103 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ +1104 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y fVerts = level.getFaceVertices(vFaces[i]); │ │ │ │ │ +1105 │ │ │ │ │ +1106 _L_o_c_a_l_I_n_d_e_x vOppInFace = (vInFace[i] + 2); │ │ │ │ │ +1107 if (vOppInFace >= fVerts.size()) vOppInFace -= (_L_o_c_a_l_I_n_d_e_x)fVerts._s_i_z_e(); │ │ │ │ │ +1108 │ │ │ │ │ +1109 fIndices[i] = level.getFaceVertices(vFaces[i])[vOppInFace]; │ │ │ │ │ +1110 } │ │ │ │ │ +1111 } │ │ │ │ │ +1112 │ │ │ │ │ +1113 // │ │ │ │ │ +1114 // Combine the weights and indices for position and tangents. As with │ │ │ │ │ +applying │ │ │ │ │ +1115 // refinement masks to vertex data, in order to improve numerical │ │ │ │ │ +precision, it's │ │ │ │ │ +1116 // better to apply smaller weights first, so begin with the face-weights │ │ │ │ │ +followed │ │ │ │ │ +1117 // by the edge-weights and the vertex weight last. │ │ │ │ │ +1118 // │ │ │ │ │ +1119 dstPos[vert].Clear(); │ │ │ │ │ +1120 for (int i = 0; i < posMask.GetNumFaceWeights(); ++i) { │ │ │ │ │ +1121 dstPos[vert].AddWithWeight(src[fIndices[i]], fPosWeights[i]); │ │ │ │ │ +1122 } │ │ │ │ │ +1123 for (int i = 0; i < posMask.GetNumEdgeWeights(); ++i) { │ │ │ │ │ +1124 dstPos[vert].AddWithWeight(src[eIndices[i]], ePosWeights[i]); │ │ │ │ │ +1125 } │ │ │ │ │ +1126 dstPos[vert].AddWithWeight(src[vert], vPosWeights[0]); │ │ │ │ │ +1127 │ │ │ │ │ +1128 // │ │ │ │ │ +1129 // Apply the tangent masks -- both will have the same number of weights │ │ │ │ │ +and │ │ │ │ │ +1130 // indices (one tangent may be "padded" to accommodate the other), but │ │ │ │ │ +these │ │ │ │ │ +1131 // may differ from those of the position: │ │ │ │ │ +1132 // │ │ │ │ │ +1133 if (hasTangents) { │ │ │ │ │ +1134 assert(tan1Mask.GetNumFaceWeights() == tan2Mask.GetNumFaceWeights()); │ │ │ │ │ +1135 assert(tan1Mask.GetNumEdgeWeights() == tan2Mask.GetNumEdgeWeights()); │ │ │ │ │ +1136 │ │ │ │ │ +1137 U1 & dstTan1 = *dstTan1Ptr; │ │ │ │ │ +1138 U2 & dstTan2 = *dstTan2Ptr; │ │ │ │ │ +1139 │ │ │ │ │ +1140 dstTan1[vert].Clear(); │ │ │ │ │ +1141 dstTan2[vert].Clear(); │ │ │ │ │ +1142 for (int i = 0; i < tan1Mask.GetNumFaceWeights(); ++i) { │ │ │ │ │ +1143 dstTan1[vert].AddWithWeight(src[fIndices[i]], fTan1Weights[i]); │ │ │ │ │ +1144 dstTan2[vert].AddWithWeight(src[fIndices[i]], fTan2Weights[i]); │ │ │ │ │ +1145 } │ │ │ │ │ +1146 for (int i = 0; i < tan1Mask.GetNumEdgeWeights(); ++i) { │ │ │ │ │ +1147 dstTan1[vert].AddWithWeight(src[eIndices[i]], eTan1Weights[i]); │ │ │ │ │ +1148 dstTan2[vert].AddWithWeight(src[eIndices[i]], eTan2Weights[i]); │ │ │ │ │ +1149 } │ │ │ │ │ +1150 dstTan1[vert].AddWithWeight(src[vert], vTan1Weights[0]); │ │ │ │ │ +1151 dstTan2[vert].AddWithWeight(src[vert], vTan2Weights[0]); │ │ │ │ │ +1152 } │ │ │ │ │ +1153 } │ │ │ │ │ +1154} │ │ │ │ │ +1155 │ │ │ │ │ +1156template │ │ │ │ │ +1157template │ │ │ │ │ +1158inline void │ │ │ │ │ +1159PrimvarRefinerReal::limitFVar(T const & src, U & dst, int channel) │ │ │ │ │ +const { │ │ │ │ │ +1160 │ │ │ │ │ +1161 Sdc::Scheme scheme(_refiner._subdivOptions); │ │ │ │ │ +1162 │ │ │ │ │ +1163 Vtr::internal::Level const & level = _refiner.getLevel │ │ │ │ │ +(_refiner.GetMaxLevel()); │ │ │ │ │ +1164 Vtr::internal::FVarLevel const & fvarChannel = level.getFVarLevel │ │ │ │ │ +(channel); │ │ │ │ │ +1165 │ │ │ │ │ +1166 int maxWeightsPerMask = 1 + 2 * level.getMaxValence(); │ │ │ │ │ +1167 │ │ │ │ │ +1168 Vtr::internal::StackBuffer weightBuffer(maxWeightsPerMask); │ │ │ │ │ +1169 Vtr::internal::StackBuffer vEdgeBuffer(level.getMaxValence()); │ │ │ │ │ +1170 │ │ │ │ │ +1171 // This is a bit obscure -- assign both parent and child as last level │ │ │ │ │ +1172 Vtr::internal::VertexInterface vHood(level, level); │ │ │ │ │ +1173 │ │ │ │ │ +1174 for (int vert = 0; vert < level.getNumVertices(); ++vert) { │ │ │ │ │ +1175 │ │ │ │ │ +1176 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vEdges = level.getVertexEdges(vert); │ │ │ │ │ +1177 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vValues = fvarChannel.getVertexValues(vert); │ │ │ │ │ +1178 │ │ │ │ │ +1179 // Incomplete vertices (present in sparse refinement) do not have their │ │ │ │ │ +full │ │ │ │ │ +1180 // topological neighborhood to determine a proper limit -- just leave the │ │ │ │ │ +1181 // values (perhaps more than one per vertex) at the refined location. │ │ │ │ │ +1182 // │ │ │ │ │ +1183 // The same can be done if the face-varying channel is purely linear. │ │ │ │ │ +1184 // │ │ │ │ │ +1185 bool isIncomplete = (level.getVertexTag(vert)._incomplete || (vEdges.size │ │ │ │ │ +() == 0)); │ │ │ │ │ +1186 if (isIncomplete || fvarChannel.isLinear()) { │ │ │ │ │ +1187 for (int i = 0; i < vValues.size(); ++i) { │ │ │ │ │ +1188 _V_t_r_:_:_I_n_d_e_x vValue = vValues[i]; │ │ │ │ │ +1189 │ │ │ │ │ +1190 dst[vValue].Clear(); │ │ │ │ │ +1191 dst[vValue].AddWithWeight(src[vValue], 1.0f); │ │ │ │ │ +1192 } │ │ │ │ │ +1193 continue; │ │ │ │ │ +1194 } │ │ │ │ │ +1195 │ │ │ │ │ +1196 bool fvarVertMatchesVertex = fvarChannel.valueTopologyMatches(vValues[0]); │ │ │ │ │ +1197 if (fvarVertMatchesVertex) { │ │ │ │ │ +1198 │ │ │ │ │ +1199 // Assign the mask weights to the common buffer and compute the mask: │ │ │ │ │ +1200 // │ │ │ │ │ +1201 Weight * vWeights = weightBuffer, │ │ │ │ │ +1202 * eWeights = vWeights + 1, │ │ │ │ │ +1203 * fWeights = eWeights + vEdges._s_i_z_e(); │ │ │ │ │ +1204 │ │ │ │ │ +1205 Mask vMask(vWeights, eWeights, fWeights); │ │ │ │ │ +1206 │ │ │ │ │ +1207 vHood.SetIndex(vert, vert); │ │ │ │ │ +1208 │ │ │ │ │ +1209 scheme.ComputeVertexLimitMask(vHood, vMask, level.getVertexRule(vert)); │ │ │ │ │ +1210 │ │ │ │ │ +1211 // │ │ │ │ │ +1212 // Apply mask to corresponding FVar values for neighboring vertices: │ │ │ │ │ +1213 // │ │ │ │ │ +1214 _V_t_r_:_:_I_n_d_e_x vValue = vValues[0]; │ │ │ │ │ +1215 │ │ │ │ │ +1216 dst[vValue].Clear(); │ │ │ │ │ +1217 if (vMask.GetNumFaceWeights() > 0) { │ │ │ │ │ +1218 assert(!vMask.AreFaceWeightsForFaceCenters()); │ │ │ │ │ +1219 │ │ │ │ │ +1220 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y vFaces = level.getVertexFaces(vert); │ │ │ │ │ +1221 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y vInFace = level.getVertexFaceLocalIndices(vert); │ │ │ │ │ +1222 │ │ │ │ │ +1223 for (int i = 0; i < vFaces.size(); ++i) { │ │ │ │ │ +1224 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y faceValues = fvarChannel.getFaceValues(vFaces[i]); │ │ │ │ │ +1225 _L_o_c_a_l_I_n_d_e_x vOppInFace = vInFace[i] + 2; │ │ │ │ │ +1226 if (vOppInFace >= faceValues.size()) vOppInFace -= faceValues._s_i_z_e(); │ │ │ │ │ +1227 │ │ │ │ │ +1228 _I_n_d_e_x vValueOppositeFace = faceValues[vOppInFace]; │ │ │ │ │ +1229 │ │ │ │ │ +1230 dst[vValue].AddWithWeight(src[vValueOppositeFace], fWeights[i]); │ │ │ │ │ +1231 } │ │ │ │ │ +1232 } │ │ │ │ │ +1233 if (vMask.GetNumEdgeWeights() > 0) { │ │ │ │ │ +1234 _I_n_d_e_x * vEdgeValues = vEdgeBuffer; │ │ │ │ │ +1235 fvarChannel.getVertexEdgeValues(vert, vEdgeValues); │ │ │ │ │ +1236 │ │ │ │ │ +1237 for (int i = 0; i < vEdges.size(); ++i) { │ │ │ │ │ +1238 dst[vValue].AddWithWeight(src[vEdgeValues[i]], eWeights[i]); │ │ │ │ │ +1239 } │ │ │ │ │ +1240 } │ │ │ │ │ +1241 dst[vValue].AddWithWeight(src[vValue], vWeights[0]); │ │ │ │ │ +1242 } else { │ │ │ │ │ +1243 // │ │ │ │ │ +1244 // Sibling FVar values associated with a vertex will be either a corner or │ │ │ │ │ +a crease: │ │ │ │ │ +1245 // │ │ │ │ │ +1246 for (int i = 0; i < vValues.size(); ++i) { │ │ │ │ │ +1247 _V_t_r_:_:_I_n_d_e_x vValue = vValues[i]; │ │ │ │ │ +1248 │ │ │ │ │ +1249 dst[vValue].Clear(); │ │ │ │ │ +1250 if (fvarChannel.getValueTag(vValue).isCorner()) { │ │ │ │ │ +1251 dst[vValue].AddWithWeight(src[vValue], 1.0f); │ │ │ │ │ +1252 } else { │ │ │ │ │ +1253 _I_n_d_e_x vEndValues[2]; │ │ │ │ │ +1254 fvarChannel.getVertexCreaseEndValues(vert, i, vEndValues); │ │ │ │ │ +1255 │ │ │ │ │ +1256 dst[vValue].AddWithWeight(src[vEndValues[0]], 1.0f/6.0f); │ │ │ │ │ +1257 dst[vValue].AddWithWeight(src[vEndValues[1]], 1.0f/6.0f); │ │ │ │ │ +1258 dst[vValue].AddWithWeight(src[vValue], 2.0f/3.0f); │ │ │ │ │ +1259 } │ │ │ │ │ +1260 } │ │ │ │ │ +1261 } │ │ │ │ │ +1262 } │ │ │ │ │ +1263} │ │ │ │ │ +1264 │ │ │ │ │ +_1_2_6_5class _P_r_i_m_v_a_r_R_e_f_i_n_e_r : public _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l { │ │ │ │ │ +1266public: │ │ │ │ │ +_1_2_6_7 _P_r_i_m_v_a_r_R_e_f_i_n_e_r(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner) │ │ │ │ │ +1268 : _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l(refiner) { } │ │ │ │ │ +1269}; │ │ │ │ │ +1270 │ │ │ │ │ +1271} // end namespace Far │ │ │ │ │ +1272 │ │ │ │ │ +1273} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +1274using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +1275} // end namespace OpenSubdiv │ │ │ │ │ +1276 │ │ │ │ │ +1277#endif /* OPENSUBDIV3_FAR_PRIMVAR_REFINER_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ +Vtr::LocalIndex LocalIndex │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_E_r_r_o_r │ │ │ │ │ +void Error(ErrorType err, const char *format,...) │ │ │ │ │ +Sends an OSD error with a message (internal use only) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +Vtr::ConstIndexArray ConstIndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +Vtr::ConstLocalIndexArray ConstLocalIndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ +@ FAR_RUNTIME_ERROR │ │ │ │ │ +Issue a generic runtime error, but continue execution. │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._h_:_4_0 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_I_n_d_e_x │ │ │ │ │ Vtr::Index Index │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ -A specialized factory for StencilTable. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l │ │ │ │ │ -A specialized factory for LimitStencilTable. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -Vertex stencil descriptor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -StencilReal() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___s_i_z_e │ │ │ │ │ -int * _size │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -StencilReal(int *size, Index *indices, REAL *weights) │ │ │ │ │ -Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_N_e_x_t │ │ │ │ │ -void Next() │ │ │ │ │ -Advance to the next stencil in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -StencilReal(StencilReal const &other) │ │ │ │ │ -Copy constructor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___i_n_d_i_c_e_s │ │ │ │ │ -Index * _indices │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_V_e_r_t_e_x_I_n_d_i_c_e_s │ │ │ │ │ -Index const * GetVertexIndices() const │ │ │ │ │ -Returns the control vertices' indices. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_S_i_z_e │ │ │ │ │ -int GetSize() const │ │ │ │ │ -Returns the size of the stencil. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:___w_e_i_g_h_t_s │ │ │ │ │ -REAL * _weights │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_S_i_z_e_P_t_r │ │ │ │ │ -int * GetSizePtr() const │ │ │ │ │ -Returns the size of the stencil as a pointer. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetWeights() const │ │ │ │ │ -Returns the interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l │ │ │ │ │ -Vertex stencil class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ -Stencil(BaseStencil const &other) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ -Stencil(int *size, Index *indices, float *weights) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_B_a_s_e_S_t_e_n_c_i_l │ │ │ │ │ -StencilReal< float > BaseStencil │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_:_:_S_t_e_n_c_i_l │ │ │ │ │ -Stencil() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -Table of subdivision stencils. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumControlVertices() const │ │ │ │ │ -Returns the number of control vertices indexed in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___s_i_z_e_s │ │ │ │ │ -std::vector< int > _sizes │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ -friend class Far::PatchTableBuilder │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(T1 const &srcBase, int numBase, T2 const &srcRef, U &dstValues, │ │ │ │ │ -std::vector< REAL > const &valueWeights, Index start, Index end) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ -void UpdateValues(T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ -&dstValues, Index start=-1, Index end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_1_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_C_o_n_t_r_o_l_I_n_d_i_c_e_s │ │ │ │ │ -std::vector< Index > const & GetControlIndices() const │ │ │ │ │ -Returns the indices of the control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_f_i_n_a_l_i_z_e │ │ │ │ │ -void finalize() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_1_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -StencilReal< REAL > operator[](Index index) const │ │ │ │ │ -Returns the stencil at index i in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___n_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -int _numControlVertices │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(T const &srcValues, U &dstValues, std::vector< REAL > const │ │ │ │ │ -&valueWeights, Index start, Index end) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_5_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_S_i_z_e_s │ │ │ │ │ -std::vector< int > const & GetSizes() const │ │ │ │ │ -Returns the number of control vertices of each stencil in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -Returns the number of stencils in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_~_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -virtual ~StencilTableReal() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_O_f_f_s_e_t_s │ │ │ │ │ -std::vector< Index > const & GetOffsets() const │ │ │ │ │ -Returns the offset to a given stencil (factory may leave empty) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_S_t_e_n_c_i_l │ │ │ │ │ -StencilReal< REAL > GetStencil(Index i) const │ │ │ │ │ -Returns a Stencil at index i in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_g_e_n_e_r_a_t_e_O_f_f_s_e_t_s │ │ │ │ │ -void generateOffsets() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_C_l_e_a_r │ │ │ │ │ -void Clear() │ │ │ │ │ -Clears the stencils from the table. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___o_f_f_s_e_t_s │ │ │ │ │ -std::vector< Index > _offsets │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___w_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > _weights │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(int nstencils, int nelems) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_9_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetWeights() const │ │ │ │ │ -Returns the stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_8_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ -void UpdateValues(T1 const *srcBase, int numBase, T2 const *srcRef, U *dst, │ │ │ │ │ -Index start=-1, Index end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -StencilTableReal(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ -vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ -REAL > const &weights, bool includeCoarseVerts, size_t firstOffset) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:___i_n_d_i_c_e_s │ │ │ │ │ -std::vector< Index > _indices │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -StencilTableReal() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_r_e_s_e_r_v_e │ │ │ │ │ -void reserve(int nstencils, int nelems) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_6_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ -void UpdateValues(T const *src, U *dst, Index start=-1, Index end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_1_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_V_a_l_u_e_s │ │ │ │ │ -void UpdateValues(T const &srcValues, U &dstValues, Index start=-1, Index end=- │ │ │ │ │ -1) const │ │ │ │ │ -Updates point values based on the control values. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_0_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ -vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ -float > const &weights, bool includeCoarseVerts, size_t firstOffset) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable(int numControlVerts) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_B_a_s_e_T_a_b_l_e │ │ │ │ │ -StencilTableReal< float > BaseTable │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_t_e_n_c_i_l │ │ │ │ │ -Stencil GetStencil(Index index) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -Stencil operator[](Index index) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable() │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -Limit point stencil descriptor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetDuvWeights() const │ │ │ │ │ -Returns the uv derivative weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_v_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetDvWeights() const │ │ │ │ │ -Returns the v derivative weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_4_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_N_e_x_t │ │ │ │ │ -void Next() │ │ │ │ │ -Advance to the next stencil in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetDvvWeights() const │ │ │ │ │ -Returns the vv derivative weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l │ │ │ │ │ -LimitStencilReal(int *size, Index *indices, REAL *weights, REAL *duWeights=0, │ │ │ │ │ -REAL *dvWeights=0, REAL *duuWeights=0, REAL *duvWeights=0, REAL *dvvWeights=0) │ │ │ │ │ -Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_2_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetDuWeights() const │ │ │ │ │ -Returns the u derivative weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_R_e_a_l_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s │ │ │ │ │ -REAL const * GetDuuWeights() const │ │ │ │ │ -Returns the uu derivative weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -Limit point stencil class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -LimitStencil(BaseStencil const &other) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_B_a_s_e_S_t_e_n_c_i_l │ │ │ │ │ -LimitStencilReal< float > BaseStencil │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_:_:_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -LimitStencil(int *size, Index *indices, float *weights, float *duWeights=0, │ │ │ │ │ -float *dvWeights=0, float *duuWeights=0, float *duvWeights=0, float │ │ │ │ │ -*dvvWeights=0) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_3_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -Table of limit subdivision stencils. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetDuuWeights() const │ │ │ │ │ -Returns the 'uu' derivative stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -LimitStencilReal< REAL > operator[](Index index) const │ │ │ │ │ -Returns the limit stencil at index i in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetDvvWeights() const │ │ │ │ │ -Returns the 'vv' derivative stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ -void UpdateDerivs(T const *src, U *uderivs, U *vderivs, int start=-1, int end=- │ │ │ │ │ -1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ -void Update2ndDerivs(T const *src, T *uuderivs, U *uvderivs, U *vvderivs, int │ │ │ │ │ -start=-1, int end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_v_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetDvWeights() const │ │ │ │ │ -Returns the 'v' derivative stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_3_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ -void Update2ndDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U │ │ │ │ │ -*uuderivs, U *uvderivs, U *vvderivs, int start=-1, int end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ -void UpdateDerivs(T const &srcValues, U &uderivs, U &vderivs, int start=-1, int │ │ │ │ │ -end=-1) const │ │ │ │ │ -Updates derivative values based on the control values. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -LimitStencilReal< REAL > GetLimitStencil(Index i) const │ │ │ │ │ -Returns a LimitStencil at index i in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_7_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_: │ │ │ │ │ -_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l │ │ │ │ │ -LimitStencilTableReal(int numControlVerts, std::vector< int > const &offsets, │ │ │ │ │ -std::vector< int > const &sizes, std::vector< int > const &sources, std:: │ │ │ │ │ -vector< REAL > const &weights, std::vector< REAL > const &duWeights, std:: │ │ │ │ │ -vector< REAL > const &dvWeights, std::vector< REAL > const &duuWeights, std:: │ │ │ │ │ -vector< REAL > const &duvWeights, std::vector< REAL > const &dvvWeights, bool │ │ │ │ │ -includeCoarseVerts, size_t firstOffset) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ -void Update2ndDerivs(T const &srcValues, U &uuderivs, U &uvderivs, U &vvderivs, │ │ │ │ │ -int start=-1, int end=-1) const │ │ │ │ │ -Updates 2nd derivative values based on the control values. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetDuWeights() const │ │ │ │ │ -Returns the 'u' derivative stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_C_l_e_a_r │ │ │ │ │ -void Clear() │ │ │ │ │ -Clears the stencils from the table. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_2_n_d_D_e_r_i_v_s │ │ │ │ │ -void Update2ndDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U │ │ │ │ │ -&uuderivs, U &uvderivs, U &vvderivs, int start=-1, int end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_3_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s │ │ │ │ │ -std::vector< REAL > const & GetDuvWeights() const │ │ │ │ │ -Returns the 'uv' derivative stencil interpolation weights. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ -void UpdateDerivs(T1 const &srcBase, int numBase, T2 const &srcRef, U &uderivs, │ │ │ │ │ -U &vderivs, int start=-1, int end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_4_8_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_U_p_d_a_t_e_D_e_r_i_v_s │ │ │ │ │ -void UpdateDerivs(T1 const *srcBase, int numBase, T2 const *srcRef, U *uderivs, │ │ │ │ │ -U *vderivs, int start=-1, int end=-1) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_B_a_s_e_T_a_b_l_e │ │ │ │ │ -LimitStencilTableReal< float > BaseTable │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_L_i_m_i_t_S_t_e_n_c_i_l │ │ │ │ │ -LimitStencil GetLimitStencil(Index index) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -LimitStencilTable(int numControlVerts, std::vector< int > const &offsets, std:: │ │ │ │ │ -vector< int > const &sizes, std::vector< int > const &sources, std::vector< │ │ │ │ │ -float > const &weights, std::vector< float > const &duWeights, std::vector< │ │ │ │ │ -float > const &dvWeights, std::vector< float > const &duuWeights, std::vector< │ │ │ │ │ -float > const &duvWeights, std::vector< float > const &dvvWeights, bool │ │ │ │ │ -includeCoarseVerts, size_t firstOffset) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -LimitStencil operator[](Index index) const │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_9_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_I_s_V_a_l_i_d │ │ │ │ │ +bool IndexIsValid(Index index) │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___B_I_L_I_N_E_A_R │ │ │ │ │ +@ SCHEME_BILINEAR │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K │ │ │ │ │ +@ SCHEME_CATMARK │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_3_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_C_H_E_M_E___L_O_O_P │ │ │ │ │ +@ SCHEME_LOOP │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ +Applies refinement operations to generic primvar data. │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t │ │ │ │ │ +void Limit(T const &src, U &dstPos) const │ │ │ │ │ +Apply limit weights to a primvar buffer. │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_1_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ +PrimvarRefinerReal(TopologyRefiner const &refiner) │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t │ │ │ │ │ +void Limit(T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_U_n_i_f_o_r_m │ │ │ │ │ +void InterpolateFaceUniform(int level, T const &src, U &dst) const │ │ │ │ │ +Refine uniform (per-face) primvar data between levels. │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_9_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +TopologyRefiner const & GetTopologyRefiner() const │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_V_a_r_y_i_n_g │ │ │ │ │ +void InterpolateVarying(int level, T const &src, U &dst) const │ │ │ │ │ +Apply only varying interpolation weights to a primvar buffer for a single level │ │ │ │ │ +of refinement. │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_4_1_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void Interpolate(int level, T const &src, U &dst) const │ │ │ │ │ +Apply vertex interpolation weights to a primvar buffer for a single level of │ │ │ │ │ +refinement. │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_2_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_I_n_t_e_r_p_o_l_a_t_e_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +void InterpolateFaceVarying(int level, T const &src, U &dst, int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Apply face-varying interpolation weights to a primvar buffer associated with a │ │ │ │ │ +particular face-varyin... │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_2_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_~_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l │ │ │ │ │ +~PrimvarRefinerReal() │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l_:_:_L_i_m_i_t_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +void LimitFaceVarying(T const &src, U &dst, int channel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_3_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_1_2_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r_:_:_P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ +PrimvarRefiner(TopologyRefiner const &refiner) │ │ │ │ │ +DDeeffiinniittiioonn _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h_:_1_2_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +Stores topology data for a specified set of refinement options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ +Rule │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E │ │ │ │ │ +@ RULE_CREASE │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e │ │ │ │ │ +Scheme is a class template which provides all implementation for the │ │ │ │ │ +subdivision schemes supported by... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_s_i_z_e │ │ │ │ │ +size_type size() const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_7_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ + * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ @@ -293,15 +293,15 @@ │ │ │ │
229} // end namespace OPENSUBDIV_VERSION
│ │ │ │
230using namespace OPENSUBDIV_VERSION;
│ │ │ │
231
│ │ │ │
232} // end namespace OpenSubdiv
│ │ │ │
233
│ │ │ │
234
│ │ │ │
235#endif /* OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │
Factory for constructing a PatchTable from a TopologyRefiner.
│ │ │ │ │ │ │ │
static PatchTable * Create(TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
Instantiates a PatchTable from a client-provided TopologyRefiner.
│ │ │ │ │ │ │ │
unsigned int generateVaryingTables
Generate varying patch tables.
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ @@ -96,16 +96,16 @@ │ │ │ │ Namespaces │ │ │ │
patchTable.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../far/patchDescriptor.h"
│ │ │ │ #include "../far/patchParam.h"
│ │ │ │ -#include "../far/stencilTable.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ +#include "../far/stencilTable.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ #include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ @@ -804,15 +804,15 @@ │ │ │ │
903
│ │ │ │
904} // end namespace OPENSUBDIV_VERSION
│ │ │ │
905using namespace OPENSUBDIV_VERSION;
│ │ │ │
906
│ │ │ │
907} // end namespace OpenSubdiv
│ │ │ │
908
│ │ │ │
909#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */
│ │ │ │ - │ │ │ │ + │ │ │ │
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │
std::vector< PatchParam > PatchParamTable
Definition patchParam.h:243
│ │ │ │ │ │ │ │ │ │ │ │
Vtr::Array< PatchParam > PatchParamArray
Definition patchParam.h:245
│ │ │ │
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ │ │ │ │ @@ -894,17 +894,17 @@ │ │ │ │
bool LocalPointStencilPrecisionMatchesType() const
Tests if the precision of the stencil table to compute local point vertex values matches the given fl...
│ │ │ │
StencilTableReal< REAL > const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
│ │ │ │
int GetNumLocalPointsFaceVarying(int channel=0) const
Returns the number of local face-varying points for channel.
│ │ │ │
Handle that can be used as unique patch identifier within PatchTable.
Definition patchTable.h:60
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ - │ │ │ │ + │ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
refinement.h File Reference
│ │ │ │ +
stackBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../vtr/types.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ -#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  PatchTable
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -115,13 +110,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,19 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinement.h File Reference │ │ │ │ │ +stackBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ -#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/refinement.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/stackBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.h
│ │ │ │ +
stackBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │ +
2// Copyright 2015 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,457 +118,223 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_REFINEMENT_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_STACK_BUFFER_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29#include "../sdc/types.h"
│ │ │ │ -
30#include "../sdc/options.h"
│ │ │ │ -
31#include "../vtr/types.h"
│ │ │ │ -
32#include "../vtr/level.h"
│ │ │ │ -
33
│ │ │ │ -
34#include <vector>
│ │ │ │ -
35
│ │ │ │ -
36//
│ │ │ │ -
37// Declaration for the main refinement class (Refinement) and its pre-requisites:
│ │ │ │ -
38//
│ │ │ │ -
39namespace OpenSubdiv {
│ │ │ │ -
40namespace OPENSUBDIV_VERSION {
│ │ │ │ -
41
│ │ │ │ -
42namespace Vtr {
│ │ │ │ -
43namespace internal {
│ │ │ │ -
44
│ │ │ │ -
45class FVarRefinement;
│ │ │ │ -
46
│ │ │ │ +
29namespace OpenSubdiv {
│ │ │ │ +
30namespace OPENSUBDIV_VERSION {
│ │ │ │ +
31
│ │ │ │ +
32namespace Vtr {
│ │ │ │ +
33namespace internal {
│ │ │ │ +
34
│ │ │ │ +
35//
│ │ │ │ +
36// The StackBuffer class is intended solely to take the place of VLAs (Variable
│ │ │ │ +
37// Length Arrays) which most compilers support, but are not strictly standard C++.
│ │ │ │ +
38// Portability concerns forces us to make use of either alloca() or some other
│ │ │ │ +
39// mechanism to create small arrays on the stack that are typically based on the
│ │ │ │ +
40// valence of a vertex -- small in general, but occasionally large.
│ │ │ │ +
41//
│ │ │ │ +
42// Note also that since the intent of this is to replace VLAs -- not general
│ │ │ │ +
43// std::vectors -- support for std::vector functionality is intentionally limited
│ │ │ │ +
44// and STL-like naming is avoided. Like a VLA there is no incremental growth.
│ │ │ │ +
45// Support for resizing is available to reuse an instance at the beginning of a
│ │ │ │ +
46// loop with a new size, but resizing in this case reinitializes all elements.
│ │ │ │
47//
│ │ │ │ -
48// Refinement:
│ │ │ │ -
49// A refinement is a mapping between two levels -- relating the components in the original
│ │ │ │ -
50// (parent) level to the one refined (child). The refinement may be complete (uniform) or sparse
│ │ │ │ -
51// (adaptive or otherwise selective), so not all components in the parent level will spawn
│ │ │ │ -
52// components in the child level.
│ │ │ │ -
53//
│ │ │ │ -
54// Refinement is an abstract class and expects subclasses corresponding to the different types
│ │ │ │ -
55// of topological splits that the supported subdivision schemes collectively require, i.e. those
│ │ │ │ -
56// listed in Sdc::SplitType. Note the virtual requirements expected of the subclasses in the list
│ │ │ │ -
57// of protected methods -- they differ mainly in the topology that is created in the child Level
│ │ │ │ -
58// and not the propagation of tags through refinement, subdivision of sharpness values or the
│ │ │ │ -
59// treatment of face-varying data. The primary subclasses are QuadRefinement and TriRefinement.
│ │ │ │ -
60//
│ │ │ │ -
61// At a high level, all that is necessary in terms of interface is to construct, initialize
│ │ │ │ -
62// (linking the two levels), optionally select components for sparse refinement (via use of the
│ │ │ │ -
63// SparseSelector) and call the refine() method. This usage is expected of Far::TopologyRefiner.
│ │ │ │ -
64//
│ │ │ │ -
65// Since we really want this class to be restricted from public access eventually, all methods
│ │ │ │ -
66// begin with lower case (as is the convention for protected methods) and the list of friends
│ │ │ │ -
67// will be maintained more strictly.
│ │ │ │ -
68//
│ │ │ │ -
69class Refinement {
│ │ │ │ -
70
│ │ │ │ -
71public:
│ │ │ │ -
72 Refinement(Level const & parent, Level & child, Sdc::Options const& schemeOptions);
│ │ │ │ -
73 virtual ~Refinement();
│ │ │ │ +
48
│ │ │ │ +
49template <typename TYPE, unsigned int SIZE, bool POD_TYPE = false>
│ │ │ │ +
50class StackBuffer
│ │ │ │ +
51{
│ │ │ │ +
52public:
│ │ │ │ +
53 typedef unsigned int size_type;
│ │ │ │ +
54
│ │ │ │ +
55public:
│ │ │ │ +
56 // Constructors and destructor -- declared inline below:
│ │ │ │ +
57 StackBuffer();
│ │ │ │ +
58 StackBuffer(size_type size);
│ │ │ │ +
59 ~StackBuffer();
│ │ │ │ +
60
│ │ │ │ +
61public:
│ │ │ │ +
62 // Note the reliance on implicit casting so that it can be used similar to
│ │ │ │ +
63 // a VLA. This removes the need for operator[] as the resulting TYPE* will
│ │ │ │ +
64 // natively support []. (The presence of both TYPE* and operator[] also
│ │ │ │ +
65 // causes an ambiguous overloading error with 32-bit MSVC builds.)
│ │ │ │ +
66
│ │ │ │ +
67 operator TYPE const * () const { return _data; }
│ │ │ │ +
68 operator TYPE * () { return _data; }
│ │ │ │ +
69
│ │ │ │ +
70 size_type GetSize() const { return _size; }
│ │ │ │ +
71
│ │ │ │ +
72 void SetSize(size_type size);
│ │ │ │ +
73 void Reserve(size_type capacity);
│ │ │ │
74
│ │ │ │ -
75 Level const& parent() const { return *_parent; }
│ │ │ │ -
76 Level const& child() const { return *_child; }
│ │ │ │ -
77 Level& child() { return *_child; }
│ │ │ │ -
78
│ │ │ │ -
79 Sdc::Split getSplitType() const { return _splitType; }
│ │ │ │ -
80 int getRegularFaceSize() const { return _regFaceSize; }
│ │ │ │ -
81 Sdc::Options getOptions() const { return _options; }
│ │ │ │ -
82
│ │ │ │ -
83 // Face-varying:
│ │ │ │ -
84 int getNumFVarChannels() const { return (int) _fvarChannels.size(); }
│ │ │ │ -
85
│ │ │ │ -
86 FVarRefinement const & getFVarRefinement(int c) const { return *_fvarChannels[c]; }
│ │ │ │ -
87
│ │ │ │ -
88 //
│ │ │ │ -
89 // Options associated with the actual refinement operation, which may end up
│ │ │ │ -
90 // quite involved if we want to allow for the refinement of data that is not
│ │ │ │ -
91 // of interest to be suppressed. For now we have:
│ │ │ │ -
92 //
│ │ │ │ -
93 // "sparse": the alternative to uniform refinement, which requires that
│ │ │ │ -
94 // components be previously selected/marked to be included.
│ │ │ │ -
95 //
│ │ │ │ -
96 // "minimal topology": this is one that may get broken down into a finer
│ │ │ │ -
97 // set of options. It suppresses "full topology" in the child level
│ │ │ │ -
98 // and only generates what is minimally necessary for interpolation --
│ │ │ │ -
99 // which requires at least the face-vertices for faces, but also the
│ │ │ │ -
100 // vertex-faces for any face-varying channels present. So it will
│ │ │ │ -
101 // generate one or two of the six possible topological relations.
│ │ │ │ -
102 //
│ │ │ │ -
103 // These are strictly controlled right now, e.g. for sparse refinement, we
│ │ │ │ -
104 // currently enforce full topology at the finest level to allow for subsequent
│ │ │ │ -
105 // patch construction.
│ │ │ │ -
106 //
│ │ │ │ -
107 struct Options {
│ │ │ │ -
108 Options() : _sparse(false),
│ │ │ │ -
109 _faceVertsFirst(false),
│ │ │ │ -
110 _minimalTopology(false)
│ │ │ │ -
111 { }
│ │ │ │ +
75private:
│ │ │ │ +
76 // Non-copyable:
│ │ │ │ +
77 StackBuffer(const StackBuffer<TYPE,SIZE,POD_TYPE> &) { }
│ │ │ │ +
78 StackBuffer& operator=(const StackBuffer<TYPE,SIZE,POD_TYPE> &) { return *this; }
│ │ │ │ +
79
│ │ │ │ +
80 void allocate(size_type capacity);
│ │ │ │ +
81 void deallocate();
│ │ │ │ +
82 void construct();
│ │ │ │ +
83 void destruct();
│ │ │ │ +
84
│ │ │ │ +
85private:
│ │ │ │ +
86 TYPE * _data;
│ │ │ │ +
87 size_type _size;
│ │ │ │ +
88 size_type _capacity;
│ │ │ │ +
89
│ │ │ │ +
90 // Is alignment an issue here? The staticData arena will at least be double-word
│ │ │ │ +
91 // aligned within this struct, which meets current and most anticipated needs.
│ │ │ │ +
92 char _staticData[SIZE * sizeof(TYPE)];
│ │ │ │ +
93 char * _dynamicData;
│ │ │ │ +
94};
│ │ │ │ +
95
│ │ │ │ +
96
│ │ │ │ +
97//
│ │ │ │ +
98// Core allocation/deallocation methods:
│ │ │ │ +
99//
│ │ │ │ +
100template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
101inline void
│ │ │ │ +
102StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) {
│ │ │ │ +
103
│ │ │ │ +
104 // Again, is alignment an issue here? C++ spec says new will return pointer
│ │ │ │ +
105 // "suitably aligned" for conversion to pointers of other types, which implies
│ │ │ │ +
106 // at least an alignment of 16.
│ │ │ │ +
107 _dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE)));
│ │ │ │ +
108
│ │ │ │ +
109 _data = reinterpret_cast<TYPE*>(_dynamicData);
│ │ │ │ +
110 _capacity = capacity;
│ │ │ │ +
111}
│ │ │ │
112
│ │ │ │ -
113 unsigned int _sparse : 1;
│ │ │ │ -
114 unsigned int _faceVertsFirst : 1;
│ │ │ │ -
115 unsigned int _minimalTopology : 1;
│ │ │ │ +
113template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
114inline void
│ │ │ │ +
115StackBuffer<TYPE,SIZE,POD_TYPE>::deallocate() {
│ │ │ │
116
│ │ │ │ -
117 // Still under consideration:
│ │ │ │ -
118 //unsigned int _childToParentMap : 1;
│ │ │ │ -
119 };
│ │ │ │ -
120
│ │ │ │ -
121 void refine(Options options = Options());
│ │ │ │ +
117 ::operator delete(_dynamicData);
│ │ │ │ +
118
│ │ │ │ +
119 _data = reinterpret_cast<TYPE*>(_staticData);
│ │ │ │ +
120 _capacity = SIZE;
│ │ │ │ +
121}
│ │ │ │
122
│ │ │ │ -
123 bool hasFaceVerticesFirst() const { return _faceVertsFirst; }
│ │ │ │ -
124
│ │ │ │ -
125public:
│ │ │ │ -
126 //
│ │ │ │ -
127 // Access to members -- some testing classes (involving vertex interpolation)
│ │ │ │ -
128 // currently make use of these:
│ │ │ │ -
129 //
│ │ │ │ -
130 int getNumChildFacesFromFaces() const { return _childFaceFromFaceCount; }
│ │ │ │ -
131 int getNumChildEdgesFromFaces() const { return _childEdgeFromFaceCount; }
│ │ │ │ -
132 int getNumChildEdgesFromEdges() const { return _childEdgeFromEdgeCount; }
│ │ │ │ -
133 int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; }
│ │ │ │ -
134 int getNumChildVerticesFromEdges() const { return _childVertFromEdgeCount; }
│ │ │ │ -
135 int getNumChildVerticesFromVertices() const { return _childVertFromVertCount; }
│ │ │ │ -
136
│ │ │ │ -
137 Index getFirstChildFaceFromFaces() const { return _firstChildFaceFromFace; }
│ │ │ │ -
138 Index getFirstChildEdgeFromFaces() const { return _firstChildEdgeFromFace; }
│ │ │ │ -
139 Index getFirstChildEdgeFromEdges() const { return _firstChildEdgeFromEdge; }
│ │ │ │ -
140 Index getFirstChildVertexFromFaces() const { return _firstChildVertFromFace; }
│ │ │ │ -
141 Index getFirstChildVertexFromEdges() const { return _firstChildVertFromEdge; }
│ │ │ │ -
142 Index getFirstChildVertexFromVertices() const { return _firstChildVertFromVert; }
│ │ │ │ -
143
│ │ │ │ -
144 Index getFaceChildVertex(Index f) const { return _faceChildVertIndex[f]; }
│ │ │ │ -
145 Index getEdgeChildVertex(Index e) const { return _edgeChildVertIndex[e]; }
│ │ │ │ -
146 Index getVertexChildVertex(Index v) const { return _vertChildVertIndex[v]; }
│ │ │ │ -
147
│ │ │ │ -
148 ConstIndexArray getFaceChildFaces(Index parentFace) const;
│ │ │ │ -
149 ConstIndexArray getFaceChildEdges(Index parentFace) const;
│ │ │ │ -
150 ConstIndexArray getEdgeChildEdges(Index parentEdge) const;
│ │ │ │ -
151
│ │ │ │ -
152 // Child-to-parent relationships
│ │ │ │ -
153 bool isChildVertexComplete(Index v) const { return ! _childVertexTag[v]._incomplete; }
│ │ │ │ -
154
│ │ │ │ -
155 Index getChildFaceParentFace(Index f) const { return _childFaceParentIndex[f]; }
│ │ │ │ -
156 int getChildFaceInParentFace(Index f) const { return _childFaceTag[f]._indexInParent; }
│ │ │ │ -
157
│ │ │ │ -
158 Index getChildEdgeParentIndex(Index e) const { return _childEdgeParentIndex[e]; }
│ │ │ │ -
159
│ │ │ │ -
160 Index getChildVertexParentIndex(Index v) const { return _childVertexParentIndex[v]; }
│ │ │ │ -
161
│ │ │ │ -
162//
│ │ │ │ -
163// Modifiers intended for internal/protected use:
│ │ │ │ -
164//
│ │ │ │ -
165public:
│ │ │ │ +
123//
│ │ │ │ +
124// Explicit element-wise construction and destruction within allocated memory.
│ │ │ │ +
125// Compilers do not always optimize out the iteration here even when there is
│ │ │ │ +
126// no construction or destruction, so the POD_TYPE arguement can be used to
│ │ │ │ +
127// force this when/if it becomes an issue (and it has been in some cases).
│ │ │ │ +
128//
│ │ │ │ +
129template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
130inline void
│ │ │ │ +
131StackBuffer<TYPE,SIZE,POD_TYPE>::construct() {
│ │ │ │ +
132
│ │ │ │ +
133 for (size_type i = 0; i < _size; ++i) {
│ │ │ │ +
134 (void) new (&_data[i]) TYPE;
│ │ │ │ +
135 }
│ │ │ │ +
136}
│ │ │ │ +
137template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
138inline void
│ │ │ │ +
139StackBuffer<TYPE,SIZE,POD_TYPE>::destruct() {
│ │ │ │ +
140
│ │ │ │ +
141 for (size_type i = 0; i < _size; ++i) {
│ │ │ │ +
142 _data[i].~TYPE();
│ │ │ │ +
143 }
│ │ │ │ +
144}
│ │ │ │ +
145
│ │ │ │ +
146//
│ │ │ │ +
147// Inline constructors and destructor:
│ │ │ │ +
148//
│ │ │ │ +
149template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
150inline
│ │ │ │ +
151StackBuffer<TYPE,SIZE,POD_TYPE>::StackBuffer() :
│ │ │ │ +
152 _data(reinterpret_cast<TYPE*>(_staticData)),
│ │ │ │ +
153 _size(0),
│ │ │ │ +
154 _capacity(SIZE),
│ │ │ │ +
155 _dynamicData(0) {
│ │ │ │ +
156
│ │ │ │ +
157}
│ │ │ │ +
158
│ │ │ │ +
159template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
160inline
│ │ │ │ +
161StackBuffer<TYPE,SIZE,POD_TYPE>::StackBuffer(size_type size) :
│ │ │ │ +
162 _data(reinterpret_cast<TYPE*>(_staticData)),
│ │ │ │ +
163 _size(size),
│ │ │ │ +
164 _capacity(SIZE),
│ │ │ │ +
165 _dynamicData(0) {
│ │ │ │
166
│ │ │ │ -
167 IndexArray getFaceChildFaces(Index parentFace);
│ │ │ │ -
168 IndexArray getFaceChildEdges(Index parentFace);
│ │ │ │ -
169 IndexArray getEdgeChildEdges(Index parentEdge);
│ │ │ │ -
170
│ │ │ │ -
171public:
│ │ │ │ -
172 //
│ │ │ │ -
173 // Tags have now been added per-component in Level, but there is additional need to tag
│ │ │ │ -
174 // components within Refinement -- we can't tag the parent level components for any
│ │ │ │ -
175 // refinement (in order to keep it const) and tags associated with children that are
│ │ │ │ -
176 // specific to the child-to-parent mapping may not be warranted in the child level.
│ │ │ │ -
177 //
│ │ │ │ -
178 // Parent tags are only required for sparse refinement. The main property to tag is
│ │ │ │ -
179 // whether a component was selected, and so a single SparseTag is used for all three
│ │ │ │ -
180 // component types. Tagging if a component is "transitional" is also useful. This may
│ │ │ │ -
181 // only be necessary for edges but is currently packed into a mask per-edge for faces,
│ │ │ │ -
182 // which could be deferred, in which case "transitional" could be a single bit.
│ │ │ │ -
183 //
│ │ │ │ -
184 // Child tags are part of the child-to-parent mapping, which consists of the parent
│ │ │ │ -
185 // component index for each child component, plus a tag for the child indicating more
│ │ │ │ -
186 // about its relationship to its parent, e.g. is it completely defined, what the parent
│ │ │ │ -
187 // component type is, what is the index of the child within its parent, etc.
│ │ │ │ -
188 //
│ │ │ │ -
189 struct SparseTag {
│ │ │ │ -
190 SparseTag() : _selected(0), _transitional(0) { }
│ │ │ │ +
167 if (size > SIZE) {
│ │ │ │ +
168 allocate(size);
│ │ │ │ +
169 }
│ │ │ │ +
170 if (!POD_TYPE) {
│ │ │ │ +
171 construct();
│ │ │ │ +
172 }
│ │ │ │ +
173}
│ │ │ │ +
174
│ │ │ │ +
175template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
176inline
│ │ │ │ +
177StackBuffer<TYPE,SIZE,POD_TYPE>::~StackBuffer() {
│ │ │ │ +
178
│ │ │ │ +
179 if (!POD_TYPE) {
│ │ │ │ +
180 destruct();
│ │ │ │ +
181 }
│ │ │ │ +
182 deallocate();
│ │ │ │ +
183}
│ │ │ │ +
184
│ │ │ │ +
185//
│ │ │ │ +
186// Inline sizing methods:
│ │ │ │ +
187//
│ │ │ │ +
188template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
189inline void
│ │ │ │ +
190StackBuffer<TYPE,SIZE,POD_TYPE>::Reserve(size_type capacity) {
│ │ │ │
191
│ │ │ │ -
192 unsigned char _selected : 1; // component specifically selected for refinement
│ │ │ │ -
193 unsigned char _transitional : 4; // adjacent to a refined component (4-bits for face)
│ │ │ │ -
194 };
│ │ │ │ -
195
│ │ │ │ -
196 struct ChildTag {
│ │ │ │ -
197 ChildTag() { }
│ │ │ │ -
198
│ │ │ │ -
199 unsigned char _incomplete : 1; // incomplete neighborhood to represent limit of parent
│ │ │ │ -
200 unsigned char _parentType : 2; // type of parent component: vertex, edge or face
│ │ │ │ -
201 unsigned char _indexInParent : 2; // index of child wrt parent: 0-3, or iterative if N > 4
│ │ │ │ -
202 };
│ │ │ │ -
203
│ │ │ │ -
204 // Methods to access and modify tags:
│ │ │ │ -
205 SparseTag const & getParentFaceSparseTag( Index f) const { return _parentFaceTag[f]; }
│ │ │ │ -
206 SparseTag const & getParentEdgeSparseTag( Index e) const { return _parentEdgeTag[e]; }
│ │ │ │ -
207 SparseTag const & getParentVertexSparseTag(Index v) const { return _parentVertexTag[v]; }
│ │ │ │ -
208
│ │ │ │ -
209 SparseTag & getParentFaceSparseTag( Index f) { return _parentFaceTag[f]; }
│ │ │ │ -
210 SparseTag & getParentEdgeSparseTag( Index e) { return _parentEdgeTag[e]; }
│ │ │ │ -
211 SparseTag & getParentVertexSparseTag(Index v) { return _parentVertexTag[v]; }
│ │ │ │ -
212
│ │ │ │ -
213 ChildTag const & getChildFaceTag( Index f) const { return _childFaceTag[f]; }
│ │ │ │ -
214 ChildTag const & getChildEdgeTag( Index e) const { return _childEdgeTag[e]; }
│ │ │ │ -
215 ChildTag const & getChildVertexTag(Index v) const { return _childVertexTag[v]; }
│ │ │ │ -
216
│ │ │ │ -
217 ChildTag & getChildFaceTag( Index f) { return _childFaceTag[f]; }
│ │ │ │ -
218 ChildTag & getChildEdgeTag( Index e) { return _childEdgeTag[e]; }
│ │ │ │ -
219 ChildTag & getChildVertexTag(Index v) { return _childVertexTag[v]; }
│ │ │ │ -
220
│ │ │ │ -
221// Remaining methods should really be protected -- for use by subclasses...
│ │ │ │ -
222public:
│ │ │ │ -
223 //
│ │ │ │ -
224 // Methods involved in constructing the parent-to-child mapping -- when the
│ │ │ │ -
225 // refinement is sparse, additional methods are needed to identify the selection:
│ │ │ │ -
226 //
│ │ │ │ -
227 void populateParentToChildMapping();
│ │ │ │ -
228 void populateParentChildIndices();
│ │ │ │ -
229 void printParentToChildMapping() const;
│ │ │ │ -
230
│ │ │ │ -
231 virtual void allocateParentChildIndices() = 0;
│ │ │ │ -
232
│ │ │ │ -
233 // Supporting method for sparse refinement:
│ │ │ │ -
234 void initializeSparseSelectionTags();
│ │ │ │ -
235 void markSparseChildComponentIndices();
│ │ │ │ -
236 void markSparseVertexChildren();
│ │ │ │ -
237 void markSparseEdgeChildren();
│ │ │ │ -
238
│ │ │ │ -
239 virtual void markSparseFaceChildren() = 0;
│ │ │ │ -
240
│ │ │ │ -
241 void initializeChildComponentCounts();
│ │ │ │ -
242
│ │ │ │ -
243 //
│ │ │ │ -
244 // Methods involved in constructing the child-to-parent mapping:
│ │ │ │ -
245 //
│ │ │ │ -
246 void populateChildToParentMapping();
│ │ │ │ -
247
│ │ │ │ -
248 void populateFaceParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
249 void populateFaceParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
250
│ │ │ │ -
251 void populateEdgeParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
252 void populateEdgeParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
253 void populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
254
│ │ │ │ -
255 void populateVertexParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
256 void populateVertexParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
257 void populateVertexParentFromParentEdges(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
258 void populateVertexParentFromParentVertices(ChildTag const initialChildTags[2][4]);
│ │ │ │ -
259
│ │ │ │ -
260 //
│ │ │ │ -
261 // Methods involved in propagating component tags from parent to child:
│ │ │ │ -
262 //
│ │ │ │ -
263 void propagateComponentTags();
│ │ │ │ -
264
│ │ │ │ -
265 void populateFaceTagVectors();
│ │ │ │ -
266 void populateFaceTagsFromParentFaces();
│ │ │ │ -
267
│ │ │ │ -
268 void populateEdgeTagVectors();
│ │ │ │ -
269 void populateEdgeTagsFromParentFaces();
│ │ │ │ -
270 void populateEdgeTagsFromParentEdges();
│ │ │ │ -
271
│ │ │ │ -
272 void populateVertexTagVectors();
│ │ │ │ -
273 void populateVertexTagsFromParentFaces();
│ │ │ │ -
274 void populateVertexTagsFromParentEdges();
│ │ │ │ -
275 void populateVertexTagsFromParentVertices();
│ │ │ │ -
276
│ │ │ │ -
277 //
│ │ │ │ -
278 // Methods (and types) involved in subdividing the topology -- though not
│ │ │ │ -
279 // fully exploited, any subset of the 6 relations can be generated:
│ │ │ │ -
280 //
│ │ │ │ -
281 struct Relations {
│ │ │ │ -
282 unsigned int _faceVertices : 1;
│ │ │ │ -
283 unsigned int _faceEdges : 1;
│ │ │ │ -
284 unsigned int _edgeVertices : 1;
│ │ │ │ -
285 unsigned int _edgeFaces : 1;
│ │ │ │ -
286 unsigned int _vertexFaces : 1;
│ │ │ │ -
287 unsigned int _vertexEdges : 1;
│ │ │ │ -
288
│ │ │ │ -
289 void setAll(bool enable) {
│ │ │ │ -
290 _faceVertices = enable;
│ │ │ │ -
291 _faceEdges = enable;
│ │ │ │ -
292 _edgeVertices = enable;
│ │ │ │ -
293 _edgeFaces = enable;
│ │ │ │ -
294 _vertexFaces = enable;
│ │ │ │ -
295 _vertexEdges = enable;
│ │ │ │ -
296 }
│ │ │ │ -
297 };
│ │ │ │ -
298
│ │ │ │ -
299 void subdivideTopology(Relations const& relationsToSubdivide);
│ │ │ │ -
300
│ │ │ │ -
301 virtual void populateFaceVertexRelation() = 0;
│ │ │ │ -
302 virtual void populateFaceEdgeRelation() = 0;
│ │ │ │ -
303 virtual void populateEdgeVertexRelation() = 0;
│ │ │ │ -
304 virtual void populateEdgeFaceRelation() = 0;
│ │ │ │ -
305 virtual void populateVertexFaceRelation() = 0;
│ │ │ │ -
306 virtual void populateVertexEdgeRelation() = 0;
│ │ │ │ -
307
│ │ │ │ -
308 //
│ │ │ │ -
309 // Methods involved in subdividing and inspecting sharpness values:
│ │ │ │ -
310 //
│ │ │ │ -
311 void subdivideSharpnessValues();
│ │ │ │ -
312
│ │ │ │ -
313 void subdivideVertexSharpness();
│ │ │ │ -
314 void subdivideEdgeSharpness();
│ │ │ │ -
315 void reclassifySemisharpVertices();
│ │ │ │ -
316
│ │ │ │ -
317 //
│ │ │ │ -
318 // Methods involved in subdividing face-varying topology:
│ │ │ │ -
319 //
│ │ │ │ -
320 void subdivideFVarChannels();
│ │ │ │ -
321
│ │ │ │ -
322protected:
│ │ │ │ -
323 // A debug method of Level prints a Refinement (should really change this)
│ │ │ │ -
324 friend void Level::print(const Refinement *) const;
│ │ │ │ -
325
│ │ │ │ -
326 //
│ │ │ │ -
327 // Data members -- the logical grouping of some of these (and methods that make use
│ │ │ │ -
328 // of them) may lead to grouping them into a few utility classes or structs...
│ │ │ │ -
329 //
│ │ │ │ -
330
│ │ │ │ -
331 // Defined on construction:
│ │ │ │ -
332 Level const * _parent;
│ │ │ │ -
333 Level * _child;
│ │ │ │ -
334 Sdc::Options _options;
│ │ │ │ -
335
│ │ │ │ -
336 // Defined by the subclass:
│ │ │ │ -
337 Sdc::Split _splitType;
│ │ │ │ -
338 int _regFaceSize;
│ │ │ │ -
339
│ │ │ │ -
340 // Determined by the refinement options:
│ │ │ │ -
341 bool _uniform;
│ │ │ │ -
342 bool _faceVertsFirst;
│ │ │ │ -
343
│ │ │ │ -
344 //
│ │ │ │ -
345 // Inventory and ordering of the types of child components:
│ │ │ │ -
346 //
│ │ │ │ -
347 int _childFaceFromFaceCount; // arguably redundant (all faces originate from faces)
│ │ │ │ -
348 int _childEdgeFromFaceCount;
│ │ │ │ -
349 int _childEdgeFromEdgeCount;
│ │ │ │ -
350 int _childVertFromFaceCount;
│ │ │ │ -
351 int _childVertFromEdgeCount;
│ │ │ │ -
352 int _childVertFromVertCount;
│ │ │ │ -
353
│ │ │ │ -
354 int _firstChildFaceFromFace; // arguably redundant (all faces originate from faces)
│ │ │ │ -
355 int _firstChildEdgeFromFace;
│ │ │ │ -
356 int _firstChildEdgeFromEdge;
│ │ │ │ -
357 int _firstChildVertFromFace;
│ │ │ │ -
358 int _firstChildVertFromEdge;
│ │ │ │ -
359 int _firstChildVertFromVert;
│ │ │ │ -
360
│ │ │ │ -
361 //
│ │ │ │ -
362 // The parent-to-child mapping:
│ │ │ │ -
363 // These are vectors sized according to the number of parent components (and
│ │ │ │ -
364 // their topology) that contain references/indices to the child components that
│ │ │ │ -
365 // result from them by refinement. When refinement is sparse, parent components
│ │ │ │ -
366 // that have not spawned all child components will have their missing children
│ │ │ │ -
367 // marked as invalid.
│ │ │ │ -
368 //
│ │ │ │ -
369 // NOTE the "Array" members here. Often vectors within the Level can be shared
│ │ │ │ -
370 // with the Refinement, and an Array instance is used to do so. If not shared
│ │ │ │ -
371 // the subclass just initializes the Array members after allocating its own local
│ │ │ │ -
372 // vector members.
│ │ │ │ -
373 //
│ │ │ │ -
374 IndexArray _faceChildFaceCountsAndOffsets;
│ │ │ │ -
375 IndexArray _faceChildEdgeCountsAndOffsets;
│ │ │ │ -
376
│ │ │ │ -
377 IndexVector _faceChildFaceIndices; // *cannot* always use face-vert counts/offsets
│ │ │ │ -
378 IndexVector _faceChildEdgeIndices; // can use face-vert counts/offsets
│ │ │ │ -
379 IndexVector _faceChildVertIndex;
│ │ │ │ -
380
│ │ │ │ -
381 IndexVector _edgeChildEdgeIndices; // trivial/corresponding pair for each
│ │ │ │ -
382 IndexVector _edgeChildVertIndex;
│ │ │ │ -
383
│ │ │ │ -
384 IndexVector _vertChildVertIndex;
│ │ │ │ -
385
│ │ │ │ -
386 //
│ │ │ │ -
387 // The child-to-parent mapping:
│ │ │ │ -
388 //
│ │ │ │ -
389 IndexVector _childFaceParentIndex;
│ │ │ │ -
390 IndexVector _childEdgeParentIndex;
│ │ │ │ -
391 IndexVector _childVertexParentIndex;
│ │ │ │ -
392
│ │ │ │ -
393 std::vector<ChildTag> _childFaceTag;
│ │ │ │ -
394 std::vector<ChildTag> _childEdgeTag;
│ │ │ │ -
395 std::vector<ChildTag> _childVertexTag;
│ │ │ │ -
396
│ │ │ │ -
397 //
│ │ │ │ -
398 // Tags for sparse selection of components:
│ │ │ │ -
399 //
│ │ │ │ -
400 std::vector<SparseTag> _parentFaceTag;
│ │ │ │ -
401 std::vector<SparseTag> _parentEdgeTag;
│ │ │ │ -
402 std::vector<SparseTag> _parentVertexTag;
│ │ │ │ -
403
│ │ │ │ -
404 //
│ │ │ │ -
405 // Refinement data for face-varying channels present in the Levels being refined:
│ │ │ │ -
406 //
│ │ │ │ -
407 std::vector<FVarRefinement*> _fvarChannels;
│ │ │ │ -
408};
│ │ │ │ -
409
│ │ │ │ -
410inline ConstIndexArray
│ │ │ │ -
411Refinement::getFaceChildFaces(Index parentFace) const {
│ │ │ │ -
412
│ │ │ │ -
413 return ConstIndexArray(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets[2*parentFace+1]],
│ │ │ │ -
414 _faceChildFaceCountsAndOffsets[2*parentFace]);
│ │ │ │ -
415}
│ │ │ │ -
416
│ │ │ │ -
417inline IndexArray
│ │ │ │ -
418Refinement::getFaceChildFaces(Index parentFace) {
│ │ │ │ -
419
│ │ │ │ -
420 return IndexArray(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets[2*parentFace+1]],
│ │ │ │ -
421 _faceChildFaceCountsAndOffsets[2*parentFace]);
│ │ │ │ -
422}
│ │ │ │ -
423
│ │ │ │ -
424inline ConstIndexArray
│ │ │ │ -
425Refinement::getFaceChildEdges(Index parentFace) const {
│ │ │ │ -
426
│ │ │ │ -
427 return ConstIndexArray(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets[2*parentFace+1]],
│ │ │ │ -
428 _faceChildEdgeCountsAndOffsets[2*parentFace]);
│ │ │ │ -
429}
│ │ │ │ -
430inline IndexArray
│ │ │ │ -
431Refinement::getFaceChildEdges(Index parentFace) {
│ │ │ │ -
432
│ │ │ │ -
433 return IndexArray(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets[2*parentFace+1]],
│ │ │ │ -
434 _faceChildEdgeCountsAndOffsets[2*parentFace]);
│ │ │ │ -
435}
│ │ │ │ -
436
│ │ │ │ -
437inline ConstIndexArray
│ │ │ │ -
438Refinement::getEdgeChildEdges(Index parentEdge) const {
│ │ │ │ -
439
│ │ │ │ -
440 return ConstIndexArray(&_edgeChildEdgeIndices[parentEdge*2], 2);
│ │ │ │ -
441}
│ │ │ │ -
442
│ │ │ │ -
443inline IndexArray
│ │ │ │ -
444Refinement::getEdgeChildEdges(Index parentEdge) {
│ │ │ │ -
445
│ │ │ │ -
446 return IndexArray(&_edgeChildEdgeIndices[parentEdge*2], 2);
│ │ │ │ -
447}
│ │ │ │ -
448
│ │ │ │ -
449} // end namespace internal
│ │ │ │ -
450} // end namespace Vtr
│ │ │ │ -
451
│ │ │ │ -
452} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
453using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
454} // end namespace OpenSubdiv
│ │ │ │ -
455
│ │ │ │ -
456#endif /* OPENSUBDIV3_VTR_REFINEMENT_H */
│ │ │ │ - │ │ │ │ - │ │ │ │ -
std::vector< Index > IndexVector
Definition types.h:77
│ │ │ │ -
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ - │ │ │ │ -
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │ +
192 if (capacity > _capacity) {
│ │ │ │ +
193 if (!POD_TYPE) {
│ │ │ │ +
194 destruct();
│ │ │ │ +
195 }
│ │ │ │ +
196 deallocate();
│ │ │ │ +
197 allocate(capacity);
│ │ │ │ +
198 }
│ │ │ │ +
199}
│ │ │ │ +
200
│ │ │ │ +
201template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ +
202inline void
│ │ │ │ +
203StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
│ │ │ │ +
204{
│ │ │ │ +
205 if (!POD_TYPE) {
│ │ │ │ +
206 destruct();
│ │ │ │ +
207 }
│ │ │ │ +
208 if (size == 0) {
│ │ │ │ +
209 deallocate();
│ │ │ │ +
210 } else if (size > _capacity) {
│ │ │ │ +
211 deallocate();
│ │ │ │ +
212 allocate(size);
│ │ │ │ +
213 }
│ │ │ │ +
214 _size = size;
│ │ │ │ +
215 if (!POD_TYPE) {
│ │ │ │ +
216 construct();
│ │ │ │ +
217 }
│ │ │ │ +
218}
│ │ │ │ +
219
│ │ │ │ +
220} // end namespace internal
│ │ │ │ +
221} // end namespace Vtr
│ │ │ │ +
222
│ │ │ │ +
223} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
224using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
225} // end namespace OpenSubdiv
│ │ │ │ +
226
│ │ │ │ +
227#endif /* OPENSUBDIV3_VTR_STACK_BUFFER_H */
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -refinement.h │ │ │ │ │ +stackBuffer.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ +2// Copyright 2015 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,545 +23,230 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_REFINEMENT_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../sdc/types.h" │ │ │ │ │ -30#include "../sdc/options.h" │ │ │ │ │ -31#include "../vtr/types.h" │ │ │ │ │ -32#include "../vtr/level.h" │ │ │ │ │ -33 │ │ │ │ │ -34#include │ │ │ │ │ -35 │ │ │ │ │ -36// │ │ │ │ │ -37// Declaration for the main refinement class (Refinement) and its pre- │ │ │ │ │ -requisites: │ │ │ │ │ -38// │ │ │ │ │ -39namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -40namespace OPENSUBDIV_VERSION { │ │ │ │ │ -41 │ │ │ │ │ -42namespace Vtr { │ │ │ │ │ -43namespace internal { │ │ │ │ │ -44 │ │ │ │ │ -45class FVarRefinement; │ │ │ │ │ -46 │ │ │ │ │ +29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +30namespace OPENSUBDIV_VERSION { │ │ │ │ │ +31 │ │ │ │ │ +32namespace Vtr { │ │ │ │ │ +33namespace internal { │ │ │ │ │ +34 │ │ │ │ │ +35// │ │ │ │ │ +36// The StackBuffer class is intended solely to take the place of VLAs │ │ │ │ │ +(Variable │ │ │ │ │ +37// Length Arrays) which most compilers support, but are not strictly standard │ │ │ │ │ +C++. │ │ │ │ │ +38// Portability concerns forces us to make use of either alloca() or some │ │ │ │ │ +other │ │ │ │ │ +39// mechanism to create small arrays on the stack that are typically based on │ │ │ │ │ +the │ │ │ │ │ +40// valence of a vertex -- small in general, but occasionally large. │ │ │ │ │ +41// │ │ │ │ │ +42// Note also that since the intent of this is to replace VLAs -- not general │ │ │ │ │ +43// std::vectors -- support for std::vector functionality is intentionally │ │ │ │ │ +limited │ │ │ │ │ +44// and STL-like naming is avoided. Like a VLA there is no incremental growth. │ │ │ │ │ +45// Support for resizing is available to reuse an instance at the beginning of │ │ │ │ │ +a │ │ │ │ │ +46// loop with a new size, but resizing in this case reinitializes all │ │ │ │ │ +elements. │ │ │ │ │ 47// │ │ │ │ │ -48// Refinement: │ │ │ │ │ -49// A refinement is a mapping between two levels -- relating the components in │ │ │ │ │ -the original │ │ │ │ │ -50// (parent) level to the one refined (child). The refinement may be complete │ │ │ │ │ -(uniform) or sparse │ │ │ │ │ -51// (adaptive or otherwise selective), so not all components in the parent │ │ │ │ │ -level will spawn │ │ │ │ │ -52// components in the child level. │ │ │ │ │ -53// │ │ │ │ │ -54// Refinement is an abstract class and expects subclasses corresponding to │ │ │ │ │ -the different types │ │ │ │ │ -55// of topological splits that the supported subdivision schemes collectively │ │ │ │ │ -require, i.e. those │ │ │ │ │ -56// listed in Sdc::SplitType. Note the virtual requirements expected of the │ │ │ │ │ -subclasses in the list │ │ │ │ │ -57// of protected methods -- they differ mainly in the topology that is created │ │ │ │ │ -in the child Level │ │ │ │ │ -58// and not the propagation of tags through refinement, subdivision of │ │ │ │ │ -sharpness values or the │ │ │ │ │ -59// treatment of face-varying data. The primary subclasses are QuadRefinement │ │ │ │ │ -and TriRefinement. │ │ │ │ │ -60// │ │ │ │ │ -61// At a high level, all that is necessary in terms of interface is to │ │ │ │ │ -construct, initialize │ │ │ │ │ -62// (linking the two levels), optionally select components for sparse │ │ │ │ │ -refinement (via use of the │ │ │ │ │ -63// SparseSelector) and call the refine() method. This usage is expected of │ │ │ │ │ -Far::TopologyRefiner. │ │ │ │ │ -64// │ │ │ │ │ -65// Since we really want this class to be restricted from public access │ │ │ │ │ -eventually, all methods │ │ │ │ │ -66// begin with lower case (as is the convention for protected methods) and the │ │ │ │ │ -list of friends │ │ │ │ │ -67// will be maintained more strictly. │ │ │ │ │ -68// │ │ │ │ │ -69class Refinement { │ │ │ │ │ -70 │ │ │ │ │ -71public: │ │ │ │ │ -72 Refinement(Level const & parent, Level & child, Sdc::Options const& │ │ │ │ │ -schemeOptions); │ │ │ │ │ -73 virtual ~Refinement(); │ │ │ │ │ +48 │ │ │ │ │ +49template │ │ │ │ │ +50class StackBuffer │ │ │ │ │ +51{ │ │ │ │ │ +52public: │ │ │ │ │ +53 typedef unsigned int size_type; │ │ │ │ │ +54 │ │ │ │ │ +55public: │ │ │ │ │ +56 // Constructors and destructor -- declared inline below: │ │ │ │ │ +57 StackBuffer(); │ │ │ │ │ +58 StackBuffer(size_type size); │ │ │ │ │ +59 ~StackBuffer(); │ │ │ │ │ +60 │ │ │ │ │ +61public: │ │ │ │ │ +62 // Note the reliance on implicit casting so that it can be used similar to │ │ │ │ │ +63 // a VLA. This removes the need for operator[] as the resulting TYPE* will │ │ │ │ │ +64 // natively support []. (The presence of both TYPE* and operator[] also │ │ │ │ │ +65 // causes an ambiguous overloading error with 32-bit MSVC builds.) │ │ │ │ │ +66 │ │ │ │ │ +67 operator TYPE const * () const { return _data; } │ │ │ │ │ +68 operator TYPE * () { return _data; } │ │ │ │ │ +69 │ │ │ │ │ +70 size_type GetSize() const { return _size; } │ │ │ │ │ +71 │ │ │ │ │ +72 void SetSize(size_type size); │ │ │ │ │ +73 void Reserve(size_type capacity); │ │ │ │ │ 74 │ │ │ │ │ -75 Level const& parent() const { return *_parent; } │ │ │ │ │ -76 Level const& child() const { return *_child; } │ │ │ │ │ -77 Level& child() { return *_child; } │ │ │ │ │ -78 │ │ │ │ │ -79 _S_d_c_:_:_S_p_l_i_t getSplitType() const { return _splitType; } │ │ │ │ │ -80 int getRegularFaceSize() const { return _regFaceSize; } │ │ │ │ │ -81 Sdc::Options getOptions() const { return _options; } │ │ │ │ │ -82 │ │ │ │ │ -83 // Face-varying: │ │ │ │ │ -84 int getNumFVarChannels() const { return (int) _fvarChannels.size(); } │ │ │ │ │ -85 │ │ │ │ │ -86 FVarRefinement const & getFVarRefinement(int c) const { return │ │ │ │ │ -*_fvarChannels[c]; } │ │ │ │ │ -87 │ │ │ │ │ -88 // │ │ │ │ │ -89 // Options associated with the actual refinement operation, which may end up │ │ │ │ │ -90 // quite involved if we want to allow for the refinement of data that is not │ │ │ │ │ -91 // of interest to be suppressed. For now we have: │ │ │ │ │ -92 // │ │ │ │ │ -93 // "sparse": the alternative to uniform refinement, which requires that │ │ │ │ │ -94 // components be previously selected/marked to be included. │ │ │ │ │ -95 // │ │ │ │ │ -96 // "minimal topology": this is one that may get broken down into a finer │ │ │ │ │ -97 // set of options. It suppresses "full topology" in the child level │ │ │ │ │ -98 // and only generates what is minimally necessary for interpolation -- │ │ │ │ │ -99 // which requires at least the face-vertices for faces, but also the │ │ │ │ │ -100 // vertex-faces for any face-varying channels present. So it will │ │ │ │ │ -101 // generate one or two of the six possible topological relations. │ │ │ │ │ -102 // │ │ │ │ │ -103 // These are strictly controlled right now, e.g. for sparse refinement, we │ │ │ │ │ -104 // currently enforce full topology at the finest level to allow for │ │ │ │ │ -subsequent │ │ │ │ │ -105 // patch construction. │ │ │ │ │ -106 // │ │ │ │ │ -107 struct Options { │ │ │ │ │ -108 Options() : _sparse(false), │ │ │ │ │ -109 _faceVertsFirst(false), │ │ │ │ │ -110 _minimalTopology(false) │ │ │ │ │ -111 { } │ │ │ │ │ +75private: │ │ │ │ │ +76 // Non-copyable: │ │ │ │ │ +77 StackBuffer(const StackBuffer &) { } │ │ │ │ │ +78 StackBuffer& operator=(const StackBuffer &) { return │ │ │ │ │ +*this; } │ │ │ │ │ +79 │ │ │ │ │ +80 void allocate(size_type capacity); │ │ │ │ │ +81 void deallocate(); │ │ │ │ │ +82 void construct(); │ │ │ │ │ +83 void destruct(); │ │ │ │ │ +84 │ │ │ │ │ +85private: │ │ │ │ │ +86 TYPE * _data; │ │ │ │ │ +87 size_type _size; │ │ │ │ │ +88 size_type _capacity; │ │ │ │ │ +89 │ │ │ │ │ +90 // Is alignment an issue here? The staticData arena will at least be double- │ │ │ │ │ +word │ │ │ │ │ +91 // aligned within this struct, which meets current and most anticipated │ │ │ │ │ +needs. │ │ │ │ │ +92 char _staticData[SIZE * sizeof(TYPE)]; │ │ │ │ │ +93 char * _dynamicData; │ │ │ │ │ +94}; │ │ │ │ │ +95 │ │ │ │ │ +96 │ │ │ │ │ +97// │ │ │ │ │ +98// Core allocation/deallocation methods: │ │ │ │ │ +99// │ │ │ │ │ +100template │ │ │ │ │ +101inline void │ │ │ │ │ +102StackBuffer::allocate(size_type capacity) { │ │ │ │ │ +103 │ │ │ │ │ +104 // Again, is alignment an issue here? C++ spec says new will return pointer │ │ │ │ │ +105 // "suitably aligned" for conversion to pointers of other types, which │ │ │ │ │ +implies │ │ │ │ │ +106 // at least an alignment of 16. │ │ │ │ │ +107 _dynamicData = static_cast(::operator new(capacity * sizeof(TYPE))); │ │ │ │ │ +108 │ │ │ │ │ +109 _data = reinterpret_cast(_dynamicData); │ │ │ │ │ +110 _capacity = capacity; │ │ │ │ │ +111} │ │ │ │ │ 112 │ │ │ │ │ -113 unsigned int _sparse : 1; │ │ │ │ │ -114 unsigned int _faceVertsFirst : 1; │ │ │ │ │ -115 unsigned int _minimalTopology : 1; │ │ │ │ │ +113template │ │ │ │ │ +114inline void │ │ │ │ │ +115StackBuffer::deallocate() { │ │ │ │ │ 116 │ │ │ │ │ -117 // Still under consideration: │ │ │ │ │ -118 //unsigned int _childToParentMap : 1; │ │ │ │ │ -119 }; │ │ │ │ │ -120 │ │ │ │ │ -121 void refine(Options options = Options()); │ │ │ │ │ +117 ::operator delete(_dynamicData); │ │ │ │ │ +118 │ │ │ │ │ +119 _data = reinterpret_cast(_staticData); │ │ │ │ │ +120 _capacity = SIZE; │ │ │ │ │ +121} │ │ │ │ │ 122 │ │ │ │ │ -123 bool hasFaceVerticesFirst() const { return _faceVertsFirst; } │ │ │ │ │ -124 │ │ │ │ │ -125public: │ │ │ │ │ -126 // │ │ │ │ │ -127 // Access to members -- some testing classes (involving vertex │ │ │ │ │ -interpolation) │ │ │ │ │ -128 // currently make use of these: │ │ │ │ │ -129 // │ │ │ │ │ -130 int getNumChildFacesFromFaces() const { return _childFaceFromFaceCount; } │ │ │ │ │ -131 int getNumChildEdgesFromFaces() const { return _childEdgeFromFaceCount; } │ │ │ │ │ -132 int getNumChildEdgesFromEdges() const { return _childEdgeFromEdgeCount; } │ │ │ │ │ -133 int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; │ │ │ │ │ -} │ │ │ │ │ -134 int getNumChildVerticesFromEdges() const { return _childVertFromEdgeCount; │ │ │ │ │ -} │ │ │ │ │ -135 int getNumChildVerticesFromVertices() const { return │ │ │ │ │ -_childVertFromVertCount; } │ │ │ │ │ -136 │ │ │ │ │ -137 _I_n_d_e_x getFirstChildFaceFromFaces() const { return _firstChildFaceFromFace; │ │ │ │ │ -} │ │ │ │ │ -138 _I_n_d_e_x getFirstChildEdgeFromFaces() const { return _firstChildEdgeFromFace; │ │ │ │ │ -} │ │ │ │ │ -139 _I_n_d_e_x getFirstChildEdgeFromEdges() const { return _firstChildEdgeFromEdge; │ │ │ │ │ -} │ │ │ │ │ -140 _I_n_d_e_x getFirstChildVertexFromFaces() const { return │ │ │ │ │ -_firstChildVertFromFace; } │ │ │ │ │ -141 _I_n_d_e_x getFirstChildVertexFromEdges() const { return │ │ │ │ │ -_firstChildVertFromEdge; } │ │ │ │ │ -142 _I_n_d_e_x getFirstChildVertexFromVertices() const { return │ │ │ │ │ -_firstChildVertFromVert; } │ │ │ │ │ -143 │ │ │ │ │ -144 _I_n_d_e_x getFaceChildVertex(_I_n_d_e_x f) const { return _faceChildVertIndex[f]; } │ │ │ │ │ -145 _I_n_d_e_x getEdgeChildVertex(_I_n_d_e_x e) const { return _edgeChildVertIndex[e]; } │ │ │ │ │ -146 _I_n_d_e_x getVertexChildVertex(_I_n_d_e_x v) const { return _vertChildVertIndex[v]; │ │ │ │ │ -} │ │ │ │ │ -147 │ │ │ │ │ -148 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceChildFaces(_I_n_d_e_x parentFace) const; │ │ │ │ │ -149 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceChildEdges(_I_n_d_e_x parentFace) const; │ │ │ │ │ -150 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeChildEdges(_I_n_d_e_x parentEdge) const; │ │ │ │ │ -151 │ │ │ │ │ -152 // Child-to-parent relationships │ │ │ │ │ -153 bool isChildVertexComplete(_I_n_d_e_x v) const { return ! _childVertexTag │ │ │ │ │ -[v]._incomplete; } │ │ │ │ │ -154 │ │ │ │ │ -155 _I_n_d_e_x getChildFaceParentFace(_I_n_d_e_x f) const { return _childFaceParentIndex │ │ │ │ │ -[f]; } │ │ │ │ │ -156 int getChildFaceInParentFace(_I_n_d_e_x f) const { return _childFaceTag │ │ │ │ │ -[f]._indexInParent; } │ │ │ │ │ -157 │ │ │ │ │ -158 _I_n_d_e_x getChildEdgeParentIndex(_I_n_d_e_x e) const { return _childEdgeParentIndex │ │ │ │ │ -[e]; } │ │ │ │ │ -159 │ │ │ │ │ -160 _I_n_d_e_x getChildVertexParentIndex(_I_n_d_e_x v) const { return │ │ │ │ │ -_childVertexParentIndex[v]; } │ │ │ │ │ -161 │ │ │ │ │ -162// │ │ │ │ │ -163// Modifiers intended for internal/protected use: │ │ │ │ │ -164// │ │ │ │ │ -165public: │ │ │ │ │ +123// │ │ │ │ │ +124// Explicit element-wise construction and destruction within allocated │ │ │ │ │ +memory. │ │ │ │ │ +125// Compilers do not always optimize out the iteration here even when there │ │ │ │ │ +is │ │ │ │ │ +126// no construction or destruction, so the POD_TYPE arguement can be used to │ │ │ │ │ +127// force this when/if it becomes an issue (and it has been in some cases). │ │ │ │ │ +128// │ │ │ │ │ +129template │ │ │ │ │ +130inline void │ │ │ │ │ +131StackBuffer::construct() { │ │ │ │ │ +132 │ │ │ │ │ +133 for (size_type i = 0; i < _size; ++i) { │ │ │ │ │ +134 (void) new (&_data[i]) TYPE; │ │ │ │ │ +135 } │ │ │ │ │ +136} │ │ │ │ │ +137template │ │ │ │ │ +138inline void │ │ │ │ │ +139StackBuffer::destruct() { │ │ │ │ │ +140 │ │ │ │ │ +141 for (size_type i = 0; i < _size; ++i) { │ │ │ │ │ +142 _data[i].~TYPE(); │ │ │ │ │ +143 } │ │ │ │ │ +144} │ │ │ │ │ +145 │ │ │ │ │ +146// │ │ │ │ │ +147// Inline constructors and destructor: │ │ │ │ │ +148// │ │ │ │ │ +149template │ │ │ │ │ +150inline │ │ │ │ │ +151StackBuffer::StackBuffer() : │ │ │ │ │ +152 _data(reinterpret_cast(_staticData)), │ │ │ │ │ +153 _size(0), │ │ │ │ │ +154 _capacity(SIZE), │ │ │ │ │ +155 _dynamicData(0) { │ │ │ │ │ +156 │ │ │ │ │ +157} │ │ │ │ │ +158 │ │ │ │ │ +159template │ │ │ │ │ +160inline │ │ │ │ │ +161StackBuffer::StackBuffer(size_type size) : │ │ │ │ │ +162 _data(reinterpret_cast(_staticData)), │ │ │ │ │ +163 _size(size), │ │ │ │ │ +164 _capacity(SIZE), │ │ │ │ │ +165 _dynamicData(0) { │ │ │ │ │ 166 │ │ │ │ │ -167 _I_n_d_e_x_A_r_r_a_y getFaceChildFaces(_I_n_d_e_x parentFace); │ │ │ │ │ -168 _I_n_d_e_x_A_r_r_a_y getFaceChildEdges(_I_n_d_e_x parentFace); │ │ │ │ │ -169 _I_n_d_e_x_A_r_r_a_y getEdgeChildEdges(_I_n_d_e_x parentEdge); │ │ │ │ │ -170 │ │ │ │ │ -171public: │ │ │ │ │ -172 // │ │ │ │ │ -173 // Tags have now been added per-component in Level, but there is additional │ │ │ │ │ -need to tag │ │ │ │ │ -174 // components within Refinement -- we can't tag the parent level components │ │ │ │ │ -for any │ │ │ │ │ -175 // refinement (in order to keep it const) and tags associated with children │ │ │ │ │ -that are │ │ │ │ │ -176 // specific to the child-to-parent mapping may not be warranted in the │ │ │ │ │ -child level. │ │ │ │ │ -177 // │ │ │ │ │ -178 // Parent tags are only required for sparse refinement. The main property │ │ │ │ │ -to tag is │ │ │ │ │ -179 // whether a component was selected, and so a single SparseTag is used for │ │ │ │ │ -all three │ │ │ │ │ -180 // component types. Tagging if a component is "transitional" is also │ │ │ │ │ -useful. This may │ │ │ │ │ -181 // only be necessary for edges but is currently packed into a mask per-edge │ │ │ │ │ -for faces, │ │ │ │ │ -182 // which could be deferred, in which case "transitional" could be a single │ │ │ │ │ -bit. │ │ │ │ │ -183 // │ │ │ │ │ -184 // Child tags are part of the child-to-parent mapping, which consists of │ │ │ │ │ -the parent │ │ │ │ │ -185 // component index for each child component, plus a tag for the child │ │ │ │ │ -indicating more │ │ │ │ │ -186 // about its relationship to its parent, e.g. is it completely defined, │ │ │ │ │ -what the parent │ │ │ │ │ -187 // component type is, what is the index of the child within its parent, │ │ │ │ │ -etc. │ │ │ │ │ -188 // │ │ │ │ │ -189 struct SparseTag { │ │ │ │ │ -190 SparseTag() : _selected(0), _transitional(0) { } │ │ │ │ │ +167 if (size > SIZE) { │ │ │ │ │ +168 allocate(size); │ │ │ │ │ +169 } │ │ │ │ │ +170 if (!POD_TYPE) { │ │ │ │ │ +171 construct(); │ │ │ │ │ +172 } │ │ │ │ │ +173} │ │ │ │ │ +174 │ │ │ │ │ +175template │ │ │ │ │ +176inline │ │ │ │ │ +177StackBuffer::~StackBuffer() { │ │ │ │ │ +178 │ │ │ │ │ +179 if (!POD_TYPE) { │ │ │ │ │ +180 destruct(); │ │ │ │ │ +181 } │ │ │ │ │ +182 deallocate(); │ │ │ │ │ +183} │ │ │ │ │ +184 │ │ │ │ │ +185// │ │ │ │ │ +186// Inline sizing methods: │ │ │ │ │ +187// │ │ │ │ │ +188template │ │ │ │ │ +189inline void │ │ │ │ │ +190StackBuffer::Reserve(size_type capacity) { │ │ │ │ │ 191 │ │ │ │ │ -192 unsigned char _selected : 1; // component specifically selected for │ │ │ │ │ -refinement │ │ │ │ │ -193 unsigned char _transitional : 4; // adjacent to a refined component (4-bits │ │ │ │ │ -for face) │ │ │ │ │ -194 }; │ │ │ │ │ -195 │ │ │ │ │ -196 struct ChildTag { │ │ │ │ │ -197 ChildTag() { } │ │ │ │ │ -198 │ │ │ │ │ -199 unsigned char _incomplete : 1; // incomplete neighborhood to represent │ │ │ │ │ -limit of parent │ │ │ │ │ -200 unsigned char _parentType : 2; // type of parent component: vertex, edge or │ │ │ │ │ -face │ │ │ │ │ -201 unsigned char _indexInParent : 2; // index of child wrt parent: 0-3, or │ │ │ │ │ -iterative if N > 4 │ │ │ │ │ -202 }; │ │ │ │ │ -203 │ │ │ │ │ -204 // Methods to access and modify tags: │ │ │ │ │ -205 SparseTag const & getParentFaceSparseTag( _I_n_d_e_x f) const { return │ │ │ │ │ -_parentFaceTag[f]; } │ │ │ │ │ -206 SparseTag const & getParentEdgeSparseTag( _I_n_d_e_x e) const { return │ │ │ │ │ -_parentEdgeTag[e]; } │ │ │ │ │ -207 SparseTag const & getParentVertexSparseTag(_I_n_d_e_x v) const { return │ │ │ │ │ -_parentVertexTag[v]; } │ │ │ │ │ -208 │ │ │ │ │ -209 SparseTag & getParentFaceSparseTag( _I_n_d_e_x f) { return _parentFaceTag[f]; } │ │ │ │ │ -210 SparseTag & getParentEdgeSparseTag( _I_n_d_e_x e) { return _parentEdgeTag[e]; } │ │ │ │ │ -211 SparseTag & getParentVertexSparseTag(_I_n_d_e_x v) { return _parentVertexTag[v]; │ │ │ │ │ -} │ │ │ │ │ -212 │ │ │ │ │ -213 ChildTag const & getChildFaceTag( _I_n_d_e_x f) const { return _childFaceTag[f]; │ │ │ │ │ -} │ │ │ │ │ -214 ChildTag const & getChildEdgeTag( _I_n_d_e_x e) const { return _childEdgeTag[e]; │ │ │ │ │ -} │ │ │ │ │ -215 ChildTag const & getChildVertexTag(_I_n_d_e_x v) const { return _childVertexTag │ │ │ │ │ -[v]; } │ │ │ │ │ -216 │ │ │ │ │ -217 ChildTag & getChildFaceTag( _I_n_d_e_x f) { return _childFaceTag[f]; } │ │ │ │ │ -218 ChildTag & getChildEdgeTag( _I_n_d_e_x e) { return _childEdgeTag[e]; } │ │ │ │ │ -219 ChildTag & getChildVertexTag(_I_n_d_e_x v) { return _childVertexTag[v]; } │ │ │ │ │ -220 │ │ │ │ │ -221// Remaining methods should really be protected -- for use by subclasses... │ │ │ │ │ -222public: │ │ │ │ │ -223 // │ │ │ │ │ -224 // Methods involved in constructing the parent-to-child mapping -- when the │ │ │ │ │ -225 // refinement is sparse, additional methods are needed to identify the │ │ │ │ │ -selection: │ │ │ │ │ -226 // │ │ │ │ │ -227 void populateParentToChildMapping(); │ │ │ │ │ -228 void populateParentChildIndices(); │ │ │ │ │ -229 void printParentToChildMapping() const; │ │ │ │ │ -230 │ │ │ │ │ -231 virtual void allocateParentChildIndices() = 0; │ │ │ │ │ -232 │ │ │ │ │ -233 // Supporting method for sparse refinement: │ │ │ │ │ -234 void initializeSparseSelectionTags(); │ │ │ │ │ -235 void markSparseChildComponentIndices(); │ │ │ │ │ -236 void markSparseVertexChildren(); │ │ │ │ │ -237 void markSparseEdgeChildren(); │ │ │ │ │ -238 │ │ │ │ │ -239 virtual void markSparseFaceChildren() = 0; │ │ │ │ │ -240 │ │ │ │ │ -241 void initializeChildComponentCounts(); │ │ │ │ │ -242 │ │ │ │ │ -243 // │ │ │ │ │ -244 // Methods involved in constructing the child-to-parent mapping: │ │ │ │ │ -245 // │ │ │ │ │ -246 void populateChildToParentMapping(); │ │ │ │ │ -247 │ │ │ │ │ -248 void populateFaceParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ -249 void populateFaceParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ -[4]); │ │ │ │ │ -250 │ │ │ │ │ -251 void populateEdgeParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ -252 void populateEdgeParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ -[4]); │ │ │ │ │ -253 void populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2] │ │ │ │ │ -[4]); │ │ │ │ │ -254 │ │ │ │ │ -255 void populateVertexParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ -256 void populateVertexParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ -[4]); │ │ │ │ │ -257 void populateVertexParentFromParentEdges(ChildTag const initialChildTags[2] │ │ │ │ │ -[4]); │ │ │ │ │ -258 void populateVertexParentFromParentVertices(ChildTag const initialChildTags │ │ │ │ │ -[2][4]); │ │ │ │ │ -259 │ │ │ │ │ -260 // │ │ │ │ │ -261 // Methods involved in propagating component tags from parent to child: │ │ │ │ │ -262 // │ │ │ │ │ -263 void propagateComponentTags(); │ │ │ │ │ -264 │ │ │ │ │ -265 void populateFaceTagVectors(); │ │ │ │ │ -266 void populateFaceTagsFromParentFaces(); │ │ │ │ │ -267 │ │ │ │ │ -268 void populateEdgeTagVectors(); │ │ │ │ │ -269 void populateEdgeTagsFromParentFaces(); │ │ │ │ │ -270 void populateEdgeTagsFromParentEdges(); │ │ │ │ │ -271 │ │ │ │ │ -272 void populateVertexTagVectors(); │ │ │ │ │ -273 void populateVertexTagsFromParentFaces(); │ │ │ │ │ -274 void populateVertexTagsFromParentEdges(); │ │ │ │ │ -275 void populateVertexTagsFromParentVertices(); │ │ │ │ │ -276 │ │ │ │ │ -277 // │ │ │ │ │ -278 // Methods (and types) involved in subdividing the topology -- though not │ │ │ │ │ -279 // fully exploited, any subset of the 6 relations can be generated: │ │ │ │ │ -280 // │ │ │ │ │ -281 struct Relations { │ │ │ │ │ -282 unsigned int _faceVertices : 1; │ │ │ │ │ -283 unsigned int _faceEdges : 1; │ │ │ │ │ -284 unsigned int _edgeVertices : 1; │ │ │ │ │ -285 unsigned int _edgeFaces : 1; │ │ │ │ │ -286 unsigned int _vertexFaces : 1; │ │ │ │ │ -287 unsigned int _vertexEdges : 1; │ │ │ │ │ -288 │ │ │ │ │ -289 void setAll(bool enable) { │ │ │ │ │ -290 _faceVertices = enable; │ │ │ │ │ -291 _faceEdges = enable; │ │ │ │ │ -292 _edgeVertices = enable; │ │ │ │ │ -293 _edgeFaces = enable; │ │ │ │ │ -294 _vertexFaces = enable; │ │ │ │ │ -295 _vertexEdges = enable; │ │ │ │ │ -296 } │ │ │ │ │ -297 }; │ │ │ │ │ -298 │ │ │ │ │ -299 void subdivideTopology(Relations const& relationsToSubdivide); │ │ │ │ │ -300 │ │ │ │ │ -301 virtual void populateFaceVertexRelation() = 0; │ │ │ │ │ -302 virtual void populateFaceEdgeRelation() = 0; │ │ │ │ │ -303 virtual void populateEdgeVertexRelation() = 0; │ │ │ │ │ -304 virtual void populateEdgeFaceRelation() = 0; │ │ │ │ │ -305 virtual void populateVertexFaceRelation() = 0; │ │ │ │ │ -306 virtual void populateVertexEdgeRelation() = 0; │ │ │ │ │ -307 │ │ │ │ │ -308 // │ │ │ │ │ -309 // Methods involved in subdividing and inspecting sharpness values: │ │ │ │ │ -310 // │ │ │ │ │ -311 void subdivideSharpnessValues(); │ │ │ │ │ -312 │ │ │ │ │ -313 void subdivideVertexSharpness(); │ │ │ │ │ -314 void subdivideEdgeSharpness(); │ │ │ │ │ -315 void reclassifySemisharpVertices(); │ │ │ │ │ -316 │ │ │ │ │ -317 // │ │ │ │ │ -318 // Methods involved in subdividing face-varying topology: │ │ │ │ │ -319 // │ │ │ │ │ -320 void subdivideFVarChannels(); │ │ │ │ │ -321 │ │ │ │ │ -322protected: │ │ │ │ │ -323 // A debug method of Level prints a Refinement (should really change this) │ │ │ │ │ -324 friend void Level::print(const Refinement *) const; │ │ │ │ │ -325 │ │ │ │ │ -326 // │ │ │ │ │ -327 // Data members -- the logical grouping of some of these (and methods that │ │ │ │ │ -make use │ │ │ │ │ -328 // of them) may lead to grouping them into a few utility classes or │ │ │ │ │ -structs... │ │ │ │ │ -329 // │ │ │ │ │ -330 │ │ │ │ │ -331 // Defined on construction: │ │ │ │ │ -332 Level const * _parent; │ │ │ │ │ -333 Level * _child; │ │ │ │ │ -334 Sdc::Options _options; │ │ │ │ │ -335 │ │ │ │ │ -336 // Defined by the subclass: │ │ │ │ │ -337 _S_d_c_:_:_S_p_l_i_t _splitType; │ │ │ │ │ -338 int _regFaceSize; │ │ │ │ │ -339 │ │ │ │ │ -340 // Determined by the refinement options: │ │ │ │ │ -341 bool _uniform; │ │ │ │ │ -342 bool _faceVertsFirst; │ │ │ │ │ -343 │ │ │ │ │ -344 // │ │ │ │ │ -345 // Inventory and ordering of the types of child components: │ │ │ │ │ -346 // │ │ │ │ │ -347 int _childFaceFromFaceCount; // arguably redundant (all faces originate │ │ │ │ │ -from faces) │ │ │ │ │ -348 int _childEdgeFromFaceCount; │ │ │ │ │ -349 int _childEdgeFromEdgeCount; │ │ │ │ │ -350 int _childVertFromFaceCount; │ │ │ │ │ -351 int _childVertFromEdgeCount; │ │ │ │ │ -352 int _childVertFromVertCount; │ │ │ │ │ -353 │ │ │ │ │ -354 int _firstChildFaceFromFace; // arguably redundant (all faces originate │ │ │ │ │ -from faces) │ │ │ │ │ -355 int _firstChildEdgeFromFace; │ │ │ │ │ -356 int _firstChildEdgeFromEdge; │ │ │ │ │ -357 int _firstChildVertFromFace; │ │ │ │ │ -358 int _firstChildVertFromEdge; │ │ │ │ │ -359 int _firstChildVertFromVert; │ │ │ │ │ -360 │ │ │ │ │ -361 // │ │ │ │ │ -362 // The parent-to-child mapping: │ │ │ │ │ -363 // These are vectors sized according to the number of parent components │ │ │ │ │ -(and │ │ │ │ │ -364 // their topology) that contain references/indices to the child components │ │ │ │ │ -that │ │ │ │ │ -365 // result from them by refinement. When refinement is sparse, parent │ │ │ │ │ -components │ │ │ │ │ -366 // that have not spawned all child components will have their missing │ │ │ │ │ -children │ │ │ │ │ -367 // marked as invalid. │ │ │ │ │ -368 // │ │ │ │ │ -369 // NOTE the "Array" members here. Often vectors within the Level can be │ │ │ │ │ -shared │ │ │ │ │ -370 // with the Refinement, and an Array instance is used to do so. If not │ │ │ │ │ -shared │ │ │ │ │ -371 // the subclass just initializes the Array members after allocating its own │ │ │ │ │ -local │ │ │ │ │ -372 // vector members. │ │ │ │ │ -373 // │ │ │ │ │ -374 _I_n_d_e_x_A_r_r_a_y _faceChildFaceCountsAndOffsets; │ │ │ │ │ -375 _I_n_d_e_x_A_r_r_a_y _faceChildEdgeCountsAndOffsets; │ │ │ │ │ -376 │ │ │ │ │ -377 _I_n_d_e_x_V_e_c_t_o_r _faceChildFaceIndices; // *cannot* always use face-vert counts/ │ │ │ │ │ -offsets │ │ │ │ │ -378 _I_n_d_e_x_V_e_c_t_o_r _faceChildEdgeIndices; // can use face-vert counts/offsets │ │ │ │ │ -379 _I_n_d_e_x_V_e_c_t_o_r _faceChildVertIndex; │ │ │ │ │ -380 │ │ │ │ │ -381 _I_n_d_e_x_V_e_c_t_o_r _edgeChildEdgeIndices; // trivial/corresponding pair for each │ │ │ │ │ -382 _I_n_d_e_x_V_e_c_t_o_r _edgeChildVertIndex; │ │ │ │ │ -383 │ │ │ │ │ -384 _I_n_d_e_x_V_e_c_t_o_r _vertChildVertIndex; │ │ │ │ │ -385 │ │ │ │ │ -386 // │ │ │ │ │ -387 // The child-to-parent mapping: │ │ │ │ │ -388 // │ │ │ │ │ -389 _I_n_d_e_x_V_e_c_t_o_r _childFaceParentIndex; │ │ │ │ │ -390 _I_n_d_e_x_V_e_c_t_o_r _childEdgeParentIndex; │ │ │ │ │ -391 _I_n_d_e_x_V_e_c_t_o_r _childVertexParentIndex; │ │ │ │ │ -392 │ │ │ │ │ -393 std::vector _childFaceTag; │ │ │ │ │ -394 std::vector _childEdgeTag; │ │ │ │ │ -395 std::vector _childVertexTag; │ │ │ │ │ -396 │ │ │ │ │ -397 // │ │ │ │ │ -398 // Tags for sparse selection of components: │ │ │ │ │ -399 // │ │ │ │ │ -400 std::vector _parentFaceTag; │ │ │ │ │ -401 std::vector _parentEdgeTag; │ │ │ │ │ -402 std::vector _parentVertexTag; │ │ │ │ │ -403 │ │ │ │ │ -404 // │ │ │ │ │ -405 // Refinement data for face-varying channels present in the Levels being │ │ │ │ │ -refined: │ │ │ │ │ -406 // │ │ │ │ │ -407 std::vector _fvarChannels; │ │ │ │ │ -408}; │ │ │ │ │ -409 │ │ │ │ │ -410inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -411Refinement::getFaceChildFaces(_I_n_d_e_x parentFace) const { │ │ │ │ │ -412 │ │ │ │ │ -413 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceChildFaceIndices │ │ │ │ │ -[_faceChildFaceCountsAndOffsets[2*parentFace+1]], │ │ │ │ │ -414 _faceChildFaceCountsAndOffsets[2*parentFace]); │ │ │ │ │ -415} │ │ │ │ │ -416 │ │ │ │ │ -417inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -418Refinement::getFaceChildFaces(_I_n_d_e_x parentFace) { │ │ │ │ │ -419 │ │ │ │ │ -420 return _I_n_d_e_x_A_r_r_a_y(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets │ │ │ │ │ -[2*parentFace+1]], │ │ │ │ │ -421 _faceChildFaceCountsAndOffsets[2*parentFace]); │ │ │ │ │ -422} │ │ │ │ │ -423 │ │ │ │ │ -424inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -425Refinement::getFaceChildEdges(_I_n_d_e_x parentFace) const { │ │ │ │ │ -426 │ │ │ │ │ -427 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceChildEdgeIndices │ │ │ │ │ -[_faceChildEdgeCountsAndOffsets[2*parentFace+1]], │ │ │ │ │ -428 _faceChildEdgeCountsAndOffsets[2*parentFace]); │ │ │ │ │ -429} │ │ │ │ │ -430inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -431Refinement::getFaceChildEdges(_I_n_d_e_x parentFace) { │ │ │ │ │ -432 │ │ │ │ │ -433 return _I_n_d_e_x_A_r_r_a_y(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets │ │ │ │ │ -[2*parentFace+1]], │ │ │ │ │ -434 _faceChildEdgeCountsAndOffsets[2*parentFace]); │ │ │ │ │ -435} │ │ │ │ │ -436 │ │ │ │ │ -437inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -438Refinement::getEdgeChildEdges(_I_n_d_e_x parentEdge) const { │ │ │ │ │ -439 │ │ │ │ │ -440 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeChildEdgeIndices[parentEdge*2], 2); │ │ │ │ │ -441} │ │ │ │ │ -442 │ │ │ │ │ -443inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -444Refinement::getEdgeChildEdges(_I_n_d_e_x parentEdge) { │ │ │ │ │ -445 │ │ │ │ │ -446 return _I_n_d_e_x_A_r_r_a_y(&_edgeChildEdgeIndices[parentEdge*2], 2); │ │ │ │ │ -447} │ │ │ │ │ -448 │ │ │ │ │ -449} // end namespace internal │ │ │ │ │ -450} // end namespace Vtr │ │ │ │ │ -451 │ │ │ │ │ -452} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -453using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -454} // end namespace OpenSubdiv │ │ │ │ │ -455 │ │ │ │ │ -456#endif /* OPENSUBDIV3_VTR_REFINEMENT_H */ │ │ │ │ │ +192 if (capacity > _capacity) { │ │ │ │ │ +193 if (!POD_TYPE) { │ │ │ │ │ +194 destruct(); │ │ │ │ │ +195 } │ │ │ │ │ +196 deallocate(); │ │ │ │ │ +197 allocate(capacity); │ │ │ │ │ +198 } │ │ │ │ │ +199} │ │ │ │ │ +200 │ │ │ │ │ +201template │ │ │ │ │ +202inline void │ │ │ │ │ +203StackBuffer::SetSize(size_type size) │ │ │ │ │ +204{ │ │ │ │ │ +205 if (!POD_TYPE) { │ │ │ │ │ +206 destruct(); │ │ │ │ │ +207 } │ │ │ │ │ +208 if (size == 0) { │ │ │ │ │ +209 deallocate(); │ │ │ │ │ +210 } else if (size > _capacity) { │ │ │ │ │ +211 deallocate(); │ │ │ │ │ +212 allocate(size); │ │ │ │ │ +213 } │ │ │ │ │ +214 _size = size; │ │ │ │ │ +215 if (!POD_TYPE) { │ │ │ │ │ +216 construct(); │ │ │ │ │ +217 } │ │ │ │ │ +218} │ │ │ │ │ +219 │ │ │ │ │ +220} // end namespace internal │ │ │ │ │ +221} // end namespace Vtr │ │ │ │ │ +222 │ │ │ │ │ +223} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +224using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +225} // end namespace OpenSubdiv │ │ │ │ │ +226 │ │ │ │ │ +227#endif /* OPENSUBDIV3_VTR_STACK_BUFFER_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ -std::vector< Index > IndexVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -ConstArray< Index > ConstIndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -Array< Index > IndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_p_l_i_t │ │ │ │ │ -Split │ │ │ │ │ -Enumerated type for all face splitting schemes. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00749.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/fvarRefinement.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/sparseSelector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,26 +89,21 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
fvarRefinement.h File Reference
│ │ │ │ +
sparseSelector.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/crease.h"
│ │ │ │ #include "../vtr/types.h"
│ │ │ │ -#include "../vtr/refinement.h"
│ │ │ │ -#include "../vtr/fvarLevel.h"
│ │ │ │ +#include "../vtr/refinement.h"
│ │ │ │ #include <vector>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +113,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,22 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -fvarRefinement.h File Reference │ │ │ │ │ +sparseSelector.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_c_r_e_a_s_e_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_f_v_a_r_L_e_v_e_l_._h" │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/fvarRefinement.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/sparseSelector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
fvarRefinement.h
│ │ │ │ +
sparseSelector.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,115 +118,98 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29#include "../sdc/types.h"
│ │ │ │ -
30#include "../sdc/crease.h"
│ │ │ │ -
31#include "../vtr/types.h"
│ │ │ │ -
32#include "../vtr/refinement.h"
│ │ │ │ -
33#include "../vtr/fvarLevel.h"
│ │ │ │ -
34
│ │ │ │ -
35#include <vector>
│ │ │ │ -
36#include <cassert>
│ │ │ │ -
37#include <cstring>
│ │ │ │ -
38
│ │ │ │ +
29#include "../vtr/types.h"
│ │ │ │ +
30#include "../vtr/refinement.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <vector>
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Vtr {
│ │ │ │ +
38namespace internal {
│ │ │ │
39
│ │ │ │ -
40namespace OpenSubdiv {
│ │ │ │ -
41namespace OPENSUBDIV_VERSION {
│ │ │ │ -
42
│ │ │ │ -
43namespace Vtr {
│ │ │ │ -
44namespace internal {
│ │ │ │ -
45
│ │ │ │ -
46//
│ │ │ │ -
47// FVarRefinement:
│ │ │ │ -
48// A face-varying refinement contains data to support the refinement of a
│ │ │ │ -
49// particular face-varying "channel". Just as Refinement maintains a mapping
│ │ │ │ -
50// between the components of a parent Level and its child, the face-varying
│ │ │ │ -
51// analog maintains a mapping between the face-varying values of a parent
│ │ │ │ -
52// FVarLevel and its child.
│ │ │ │ -
53//
│ │ │ │ -
54// It turns out there is little data necessary here, so the class consists
│ │ │ │ -
55// mainly of methods that populate the child FVarLevel. The mapping data in
│ │ │ │ -
56// the refinement between Levels serves most purposes and all that is required
│ │ │ │ -
57// in addition is a mapping from values in the child FVarLevel to the parent.
│ │ │ │ -
58//
│ │ │ │ -
59class FVarRefinement {
│ │ │ │ -
60public:
│ │ │ │ -
61 FVarRefinement(Refinement const& refinement, FVarLevel& parent, FVarLevel& child);
│ │ │ │ -
62 ~FVarRefinement();
│ │ │ │ -
63
│ │ │ │ -
64 int getChildValueParentSource(Index vIndex, int sibling) const {
│ │ │ │ -
65 return _childValueParentSource[_childFVar.getVertexValueOffset(vIndex, (LocalIndex)sibling)];
│ │ │ │ -
66 }
│ │ │ │ +
40//
│ │ │ │ +
41// SparseSelector:
│ │ │ │ +
42// Class supporting "selection" of components in a Level for sparse Refinement.
│ │ │ │ +
43// The term "selection" here implies interest in the limit for that component, i.e.
│ │ │ │ +
44// the limit point for a selected vertex, the limit patch for a face, etc. So this
│ │ │ │ +
45// class is responsible for ensuring that all neighboring components required to
│ │ │ │ +
46// support the limit of those selected are included in the refinement.
│ │ │ │ +
47//
│ │ │ │ +
48// This class is associated with (and constructed given) a Refinement and its role
│ │ │ │ +
49// is to initialize that Refinement instance for eventual sparse refinement. So it
│ │ │ │ +
50// is a friend of and expected to modify the Refinement as part of the selection.
│ │ │ │ +
51// Given its simplicity and scope it may be worth nesting it in Vtr::Refinement.
│ │ │ │ +
52//
│ │ │ │ +
53// While all three component types -- vertices, edges and faces -- can be selected,
│ │ │ │ +
54// only selection of faces is currently used and actively supported as part of the
│ │ │ │ +
55// feature-adaptive refinement.
│ │ │ │ +
56//
│ │ │ │ +
57class SparseSelector {
│ │ │ │ +
58
│ │ │ │ +
59public:
│ │ │ │ +
60 SparseSelector(Refinement& refine) : _refine(&refine), _selected(false) { }
│ │ │ │ +
61 ~SparseSelector() { }
│ │ │ │ +
62
│ │ │ │ +
63 void setRefinement(Refinement& refine) { _refine = &refine; }
│ │ │ │ +
64 Refinement& getRefinement() const { return *_refine; }
│ │ │ │ +
65
│ │ │ │ +
66 bool isSelectionEmpty() const { return !_selected; }
│ │ │ │
67
│ │ │ │ -
68 float getFractionalWeight(Index pVert, LocalIndex pSibling,
│ │ │ │ -
69 Index cVert, LocalIndex cSibling) const;
│ │ │ │ -
70
│ │ │ │ -
71
│ │ │ │ -
72 // Modifiers supporting application of the refinement:
│ │ │ │ -
73 void applyRefinement();
│ │ │ │ -
74
│ │ │ │ -
75 void estimateAndAllocateChildValues();
│ │ │ │ -
76 void populateChildValues();
│ │ │ │ -
77 void populateChildValuesFromFaceVertices();
│ │ │ │ -
78 void populateChildValuesFromEdgeVertices();
│ │ │ │ -
79 int populateChildValuesForEdgeVertex(Index cVert, Index pEdge);
│ │ │ │ -
80 void populateChildValuesFromVertexVertices();
│ │ │ │ -
81 int populateChildValuesForVertexVertex(Index cVert, Index pVert);
│ │ │ │ -
82 void trimAndFinalizeChildValues();
│ │ │ │ -
83
│ │ │ │ -
84 void propagateEdgeTags();
│ │ │ │ -
85 void propagateValueTags();
│ │ │ │ -
86 void propagateValueCreases();
│ │ │ │ -
87 void reclassifySemisharpValues();
│ │ │ │ +
68 //
│ │ │ │ +
69 // Methods for selecting (and marking) components for refinement. All component indices
│ │ │ │ +
70 // refer to components in the parent:
│ │ │ │ +
71 //
│ │ │ │ +
72 void selectVertex(Index pVertex);
│ │ │ │ +
73 void selectEdge( Index pEdge);
│ │ │ │ +
74 void selectFace( Index pFace);
│ │ │ │ +
75
│ │ │ │ +
76private:
│ │ │ │ +
77 SparseSelector() : _refine(0), _selected(false) { }
│ │ │ │ +
78
│ │ │ │ +
79 bool wasVertexSelected(Index pVertex) const { return _refine->getParentVertexSparseTag(pVertex)._selected; }
│ │ │ │ +
80 bool wasEdgeSelected( Index pEdge) const { return _refine->getParentEdgeSparseTag(pEdge)._selected; }
│ │ │ │ +
81 bool wasFaceSelected( Index pFace) const { return _refine->getParentFaceSparseTag(pFace)._selected; }
│ │ │ │ +
82
│ │ │ │ +
83 void markVertexSelected(Index pVertex) const { _refine->getParentVertexSparseTag(pVertex)._selected = true; }
│ │ │ │ +
84 void markEdgeSelected( Index pEdge) const { _refine->getParentEdgeSparseTag(pEdge)._selected = true; }
│ │ │ │ +
85 void markFaceSelected( Index pFace) const { _refine->getParentFaceSparseTag(pFace)._selected = true; }
│ │ │ │ +
86
│ │ │ │ +
87 void initializeSelection();
│ │ │ │
88
│ │ │ │
89private:
│ │ │ │ -
90 //
│ │ │ │ -
91 // Identify the Refinement, its Levels and assigned FVarLevels for more
│ │ │ │ -
92 // immediate access -- child FVarLevel is non-const as it is to be assigned:
│ │ │ │ -
93 //
│ │ │ │ -
94 Refinement const & _refinement;
│ │ │ │ -
95
│ │ │ │ -
96 Level const & _parentLevel;
│ │ │ │ -
97 FVarLevel const & _parentFVar;
│ │ │ │ -
98
│ │ │ │ -
99 Level const & _childLevel;
│ │ │ │ -
100 FVarLevel & _childFVar;
│ │ │ │ -
101
│ │ │ │ -
102 // When refinement is sparse, we need a mapping between siblings of a vertex
│ │ │ │ -
103 // value in the parent and child -- and for some child values, there will not
│ │ │ │ -
104 // be a parent value, in which case the source of the parent component will
│ │ │ │ -
105 // be stored. So we refer to the parent "source" rather than "sibling":
│ │ │ │ -
106 //
│ │ │ │ -
107 std::vector<LocalIndex> _childValueParentSource;
│ │ │ │ -
108};
│ │ │ │ -
109
│ │ │ │ -
110} // end namespace internal
│ │ │ │ -
111} // end namespace Vtr
│ │ │ │ -
112
│ │ │ │ -
113} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
114using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
115} // end namespace OpenSubdiv
│ │ │ │ -
116
│ │ │ │ -
117#endif /* OPENSUBDIV3_VTR_FVAR_REFINEMENT_H */
│ │ │ │ - │ │ │ │ +
90 Refinement* _refine;
│ │ │ │ +
91 bool _selected;
│ │ │ │ +
92};
│ │ │ │ +
93
│ │ │ │ +
94} // end namespace internal
│ │ │ │ +
95} // end namespace Vtr
│ │ │ │ +
96
│ │ │ │ +
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
98using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
99} // end namespace OpenSubdiv
│ │ │ │ +
100
│ │ │ │ +
101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */
│ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -fvarRefinement.h │ │ │ │ │ +sparseSelector.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,118 +23,111 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../sdc/types.h" │ │ │ │ │ -30#include "../sdc/crease.h" │ │ │ │ │ -31#include "../vtr/types.h" │ │ │ │ │ -32#include "../vtr/refinement.h" │ │ │ │ │ -33#include "../vtr/fvarLevel.h" │ │ │ │ │ -34 │ │ │ │ │ -35#include │ │ │ │ │ -36#include │ │ │ │ │ -37#include │ │ │ │ │ -38 │ │ │ │ │ +29#include "../vtr/types.h" │ │ │ │ │ +30#include "../vtr/refinement.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Vtr { │ │ │ │ │ +38namespace internal { │ │ │ │ │ 39 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ -42 │ │ │ │ │ -43namespace Vtr { │ │ │ │ │ -44namespace internal { │ │ │ │ │ -45 │ │ │ │ │ -46// │ │ │ │ │ -47// FVarRefinement: │ │ │ │ │ -48// A face-varying refinement contains data to support the refinement of a │ │ │ │ │ -49// particular face-varying "channel". Just as Refinement maintains a mapping │ │ │ │ │ -50// between the components of a parent Level and its child, the face-varying │ │ │ │ │ -51// analog maintains a mapping between the face-varying values of a parent │ │ │ │ │ -52// FVarLevel and its child. │ │ │ │ │ -53// │ │ │ │ │ -54// It turns out there is little data necessary here, so the class consists │ │ │ │ │ -55// mainly of methods that populate the child FVarLevel. The mapping data in │ │ │ │ │ -56// the refinement between Levels serves most purposes and all that is │ │ │ │ │ -required │ │ │ │ │ -57// in addition is a mapping from values in the child FVarLevel to the parent. │ │ │ │ │ -58// │ │ │ │ │ -59class FVarRefinement { │ │ │ │ │ -60public: │ │ │ │ │ -61 FVarRefinement(Refinement const& refinement, FVarLevel& parent, FVarLevel& │ │ │ │ │ -child); │ │ │ │ │ -62 ~FVarRefinement(); │ │ │ │ │ -63 │ │ │ │ │ -64 int getChildValueParentSource(_I_n_d_e_x vIndex, int sibling) const { │ │ │ │ │ -65 return _childValueParentSource[_childFVar.getVertexValueOffset(vIndex, │ │ │ │ │ -(_L_o_c_a_l_I_n_d_e_x)sibling)]; │ │ │ │ │ -66 } │ │ │ │ │ +40// │ │ │ │ │ +41// SparseSelector: │ │ │ │ │ +42// Class supporting "selection" of components in a Level for sparse │ │ │ │ │ +Refinement. │ │ │ │ │ +43// The term "selection" here implies interest in the limit for that │ │ │ │ │ +component, i.e. │ │ │ │ │ +44// the limit point for a selected vertex, the limit patch for a face, etc. So │ │ │ │ │ +this │ │ │ │ │ +45// class is responsible for ensuring that all neighboring components required │ │ │ │ │ +to │ │ │ │ │ +46// support the limit of those selected are included in the refinement. │ │ │ │ │ +47// │ │ │ │ │ +48// This class is associated with (and constructed given) a Refinement and its │ │ │ │ │ +role │ │ │ │ │ +49// is to initialize that Refinement instance for eventual sparse refinement. │ │ │ │ │ +So it │ │ │ │ │ +50// is a friend of and expected to modify the Refinement as part of the │ │ │ │ │ +selection. │ │ │ │ │ +51// Given its simplicity and scope it may be worth nesting it in Vtr:: │ │ │ │ │ +Refinement. │ │ │ │ │ +52// │ │ │ │ │ +53// While all three component types -- vertices, edges and faces -- can be │ │ │ │ │ +selected, │ │ │ │ │ +54// only selection of faces is currently used and actively supported as part │ │ │ │ │ +of the │ │ │ │ │ +55// feature-adaptive refinement. │ │ │ │ │ +56// │ │ │ │ │ +57class SparseSelector { │ │ │ │ │ +58 │ │ │ │ │ +59public: │ │ │ │ │ +60 SparseSelector(Refinement& refine) : _refine(&refine), _selected(false) { } │ │ │ │ │ +61 ~SparseSelector() { } │ │ │ │ │ +62 │ │ │ │ │ +63 void setRefinement(Refinement& refine) { _refine = &refine; } │ │ │ │ │ +64 Refinement& getRefinement() const { return *_refine; } │ │ │ │ │ +65 │ │ │ │ │ +66 bool isSelectionEmpty() const { return !_selected; } │ │ │ │ │ 67 │ │ │ │ │ -68 float getFractionalWeight(_I_n_d_e_x pVert, _L_o_c_a_l_I_n_d_e_x pSibling, │ │ │ │ │ -69 _I_n_d_e_x cVert, _L_o_c_a_l_I_n_d_e_x cSibling) const; │ │ │ │ │ -70 │ │ │ │ │ -71 │ │ │ │ │ -72 // Modifiers supporting application of the refinement: │ │ │ │ │ -73 void applyRefinement(); │ │ │ │ │ -74 │ │ │ │ │ -75 void estimateAndAllocateChildValues(); │ │ │ │ │ -76 void populateChildValues(); │ │ │ │ │ -77 void populateChildValuesFromFaceVertices(); │ │ │ │ │ -78 void populateChildValuesFromEdgeVertices(); │ │ │ │ │ -79 int populateChildValuesForEdgeVertex(_I_n_d_e_x cVert, _I_n_d_e_x pEdge); │ │ │ │ │ -80 void populateChildValuesFromVertexVertices(); │ │ │ │ │ -81 int populateChildValuesForVertexVertex(_I_n_d_e_x cVert, _I_n_d_e_x pVert); │ │ │ │ │ -82 void trimAndFinalizeChildValues(); │ │ │ │ │ -83 │ │ │ │ │ -84 void propagateEdgeTags(); │ │ │ │ │ -85 void propagateValueTags(); │ │ │ │ │ -86 void propagateValueCreases(); │ │ │ │ │ -87 void reclassifySemisharpValues(); │ │ │ │ │ +68 // │ │ │ │ │ +69 // Methods for selecting (and marking) components for refinement. All │ │ │ │ │ +component indices │ │ │ │ │ +70 // refer to components in the parent: │ │ │ │ │ +71 // │ │ │ │ │ +72 void selectVertex(_I_n_d_e_x pVertex); │ │ │ │ │ +73 void selectEdge( _I_n_d_e_x pEdge); │ │ │ │ │ +74 void selectFace( _I_n_d_e_x pFace); │ │ │ │ │ +75 │ │ │ │ │ +76private: │ │ │ │ │ +77 SparseSelector() : _refine(0), _selected(false) { } │ │ │ │ │ +78 │ │ │ │ │ +79 bool wasVertexSelected(_I_n_d_e_x pVertex) const { return _refine- │ │ │ │ │ +>getParentVertexSparseTag(pVertex)._selected; } │ │ │ │ │ +80 bool wasEdgeSelected( _I_n_d_e_x pEdge) const { return _refine- │ │ │ │ │ +>getParentEdgeSparseTag(pEdge)._selected; } │ │ │ │ │ +81 bool wasFaceSelected( _I_n_d_e_x pFace) const { return _refine- │ │ │ │ │ +>getParentFaceSparseTag(pFace)._selected; } │ │ │ │ │ +82 │ │ │ │ │ +83 void markVertexSelected(_I_n_d_e_x pVertex) const { _refine- │ │ │ │ │ +>getParentVertexSparseTag(pVertex)._selected = true; } │ │ │ │ │ +84 void markEdgeSelected( _I_n_d_e_x pEdge) const { _refine->getParentEdgeSparseTag │ │ │ │ │ +(pEdge)._selected = true; } │ │ │ │ │ +85 void markFaceSelected( _I_n_d_e_x pFace) const { _refine->getParentFaceSparseTag │ │ │ │ │ +(pFace)._selected = true; } │ │ │ │ │ +86 │ │ │ │ │ +87 void initializeSelection(); │ │ │ │ │ 88 │ │ │ │ │ 89private: │ │ │ │ │ -90 // │ │ │ │ │ -91 // Identify the Refinement, its Levels and assigned FVarLevels for more │ │ │ │ │ -92 // immediate access -- child FVarLevel is non-const as it is to be assigned: │ │ │ │ │ -93 // │ │ │ │ │ -94 Refinement const & _refinement; │ │ │ │ │ -95 │ │ │ │ │ -96 Level const & _parentLevel; │ │ │ │ │ -97 FVarLevel const & _parentFVar; │ │ │ │ │ -98 │ │ │ │ │ -99 Level const & _childLevel; │ │ │ │ │ -100 FVarLevel & _childFVar; │ │ │ │ │ -101 │ │ │ │ │ -102 // When refinement is sparse, we need a mapping between siblings of a │ │ │ │ │ -vertex │ │ │ │ │ -103 // value in the parent and child -- and for some child values, there will │ │ │ │ │ -not │ │ │ │ │ -104 // be a parent value, in which case the source of the parent component will │ │ │ │ │ -105 // be stored. So we refer to the parent "source" rather than "sibling": │ │ │ │ │ -106 // │ │ │ │ │ -107 std::vector _childValueParentSource; │ │ │ │ │ -108}; │ │ │ │ │ -109 │ │ │ │ │ -110} // end namespace internal │ │ │ │ │ -111} // end namespace Vtr │ │ │ │ │ -112 │ │ │ │ │ -113} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -114using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -115} // end namespace OpenSubdiv │ │ │ │ │ -116 │ │ │ │ │ -117#endif /* OPENSUBDIV3_VTR_FVAR_REFINEMENT_H */ │ │ │ │ │ +90 Refinement* _refine; │ │ │ │ │ +91 bool _selected; │ │ │ │ │ +92}; │ │ │ │ │ +93 │ │ │ │ │ +94} // end namespace internal │ │ │ │ │ +95} // end namespace Vtr │ │ │ │ │ +96 │ │ │ │ │ +97} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +98using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +99} // end namespace OpenSubdiv │ │ │ │ │ +100 │ │ │ │ │ +101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ int Index │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ -unsigned short LocalIndex │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00752.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/stackBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/refinement.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,18 +89,23 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
stackBuffer.h File Reference
│ │ │ │ +
refinement.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../sdc/types.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ +#include "../vtr/types.h"
│ │ │ │ +#include "../vtr/level.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -110,13 +115,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -stackBuffer.h File Reference │ │ │ │ │ +refinement.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/stackBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/refinement.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
stackBuffer.h
│ │ │ │ +
refinement.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 DreamWorks Animation LLC.
│ │ │ │ +
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -118,223 +118,457 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_STACK_BUFFER_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_REFINEMENT_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29namespace OpenSubdiv {
│ │ │ │ -
30namespace OPENSUBDIV_VERSION {
│ │ │ │ -
31
│ │ │ │ -
32namespace Vtr {
│ │ │ │ -
33namespace internal {
│ │ │ │ -
34
│ │ │ │ -
35//
│ │ │ │ -
36// The StackBuffer class is intended solely to take the place of VLAs (Variable
│ │ │ │ -
37// Length Arrays) which most compilers support, but are not strictly standard C++.
│ │ │ │ -
38// Portability concerns forces us to make use of either alloca() or some other
│ │ │ │ -
39// mechanism to create small arrays on the stack that are typically based on the
│ │ │ │ -
40// valence of a vertex -- small in general, but occasionally large.
│ │ │ │ -
41//
│ │ │ │ -
42// Note also that since the intent of this is to replace VLAs -- not general
│ │ │ │ -
43// std::vectors -- support for std::vector functionality is intentionally limited
│ │ │ │ -
44// and STL-like naming is avoided. Like a VLA there is no incremental growth.
│ │ │ │ -
45// Support for resizing is available to reuse an instance at the beginning of a
│ │ │ │ -
46// loop with a new size, but resizing in this case reinitializes all elements.
│ │ │ │ +
29#include "../sdc/types.h"
│ │ │ │ +
30#include "../sdc/options.h"
│ │ │ │ +
31#include "../vtr/types.h"
│ │ │ │ +
32#include "../vtr/level.h"
│ │ │ │ +
33
│ │ │ │ +
34#include <vector>
│ │ │ │ +
35
│ │ │ │ +
36//
│ │ │ │ +
37// Declaration for the main refinement class (Refinement) and its pre-requisites:
│ │ │ │ +
38//
│ │ │ │ +
39namespace OpenSubdiv {
│ │ │ │ +
40namespace OPENSUBDIV_VERSION {
│ │ │ │ +
41
│ │ │ │ +
42namespace Vtr {
│ │ │ │ +
43namespace internal {
│ │ │ │ +
44
│ │ │ │ +
45class FVarRefinement;
│ │ │ │ +
46
│ │ │ │
47//
│ │ │ │ -
48
│ │ │ │ -
49template <typename TYPE, unsigned int SIZE, bool POD_TYPE = false>
│ │ │ │ -
50class StackBuffer
│ │ │ │ -
51{
│ │ │ │ -
52public:
│ │ │ │ -
53 typedef unsigned int size_type;
│ │ │ │ -
54
│ │ │ │ -
55public:
│ │ │ │ -
56 // Constructors and destructor -- declared inline below:
│ │ │ │ -
57 StackBuffer();
│ │ │ │ -
58 StackBuffer(size_type size);
│ │ │ │ -
59 ~StackBuffer();
│ │ │ │ -
60
│ │ │ │ -
61public:
│ │ │ │ -
62 // Note the reliance on implicit casting so that it can be used similar to
│ │ │ │ -
63 // a VLA. This removes the need for operator[] as the resulting TYPE* will
│ │ │ │ -
64 // natively support []. (The presence of both TYPE* and operator[] also
│ │ │ │ -
65 // causes an ambiguous overloading error with 32-bit MSVC builds.)
│ │ │ │ -
66
│ │ │ │ -
67 operator TYPE const * () const { return _data; }
│ │ │ │ -
68 operator TYPE * () { return _data; }
│ │ │ │ -
69
│ │ │ │ -
70 size_type GetSize() const { return _size; }
│ │ │ │ -
71
│ │ │ │ -
72 void SetSize(size_type size);
│ │ │ │ -
73 void Reserve(size_type capacity);
│ │ │ │ +
48// Refinement:
│ │ │ │ +
49// A refinement is a mapping between two levels -- relating the components in the original
│ │ │ │ +
50// (parent) level to the one refined (child). The refinement may be complete (uniform) or sparse
│ │ │ │ +
51// (adaptive or otherwise selective), so not all components in the parent level will spawn
│ │ │ │ +
52// components in the child level.
│ │ │ │ +
53//
│ │ │ │ +
54// Refinement is an abstract class and expects subclasses corresponding to the different types
│ │ │ │ +
55// of topological splits that the supported subdivision schemes collectively require, i.e. those
│ │ │ │ +
56// listed in Sdc::SplitType. Note the virtual requirements expected of the subclasses in the list
│ │ │ │ +
57// of protected methods -- they differ mainly in the topology that is created in the child Level
│ │ │ │ +
58// and not the propagation of tags through refinement, subdivision of sharpness values or the
│ │ │ │ +
59// treatment of face-varying data. The primary subclasses are QuadRefinement and TriRefinement.
│ │ │ │ +
60//
│ │ │ │ +
61// At a high level, all that is necessary in terms of interface is to construct, initialize
│ │ │ │ +
62// (linking the two levels), optionally select components for sparse refinement (via use of the
│ │ │ │ +
63// SparseSelector) and call the refine() method. This usage is expected of Far::TopologyRefiner.
│ │ │ │ +
64//
│ │ │ │ +
65// Since we really want this class to be restricted from public access eventually, all methods
│ │ │ │ +
66// begin with lower case (as is the convention for protected methods) and the list of friends
│ │ │ │ +
67// will be maintained more strictly.
│ │ │ │ +
68//
│ │ │ │ +
69class Refinement {
│ │ │ │ +
70
│ │ │ │ +
71public:
│ │ │ │ +
72 Refinement(Level const & parent, Level & child, Sdc::Options const& schemeOptions);
│ │ │ │ +
73 virtual ~Refinement();
│ │ │ │
74
│ │ │ │ -
75private:
│ │ │ │ -
76 // Non-copyable:
│ │ │ │ -
77 StackBuffer(const StackBuffer<TYPE,SIZE,POD_TYPE> &) { }
│ │ │ │ -
78 StackBuffer& operator=(const StackBuffer<TYPE,SIZE,POD_TYPE> &) { return *this; }
│ │ │ │ -
79
│ │ │ │ -
80 void allocate(size_type capacity);
│ │ │ │ -
81 void deallocate();
│ │ │ │ -
82 void construct();
│ │ │ │ -
83 void destruct();
│ │ │ │ -
84
│ │ │ │ -
85private:
│ │ │ │ -
86 TYPE * _data;
│ │ │ │ -
87 size_type _size;
│ │ │ │ -
88 size_type _capacity;
│ │ │ │ -
89
│ │ │ │ -
90 // Is alignment an issue here? The staticData arena will at least be double-word
│ │ │ │ -
91 // aligned within this struct, which meets current and most anticipated needs.
│ │ │ │ -
92 char _staticData[SIZE * sizeof(TYPE)];
│ │ │ │ -
93 char * _dynamicData;
│ │ │ │ -
94};
│ │ │ │ -
95
│ │ │ │ -
96
│ │ │ │ -
97//
│ │ │ │ -
98// Core allocation/deallocation methods:
│ │ │ │ -
99//
│ │ │ │ -
100template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
101inline void
│ │ │ │ -
102StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) {
│ │ │ │ -
103
│ │ │ │ -
104 // Again, is alignment an issue here? C++ spec says new will return pointer
│ │ │ │ -
105 // "suitably aligned" for conversion to pointers of other types, which implies
│ │ │ │ -
106 // at least an alignment of 16.
│ │ │ │ -
107 _dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE)));
│ │ │ │ -
108
│ │ │ │ -
109 _data = reinterpret_cast<TYPE*>(_dynamicData);
│ │ │ │ -
110 _capacity = capacity;
│ │ │ │ -
111}
│ │ │ │ +
75 Level const& parent() const { return *_parent; }
│ │ │ │ +
76 Level const& child() const { return *_child; }
│ │ │ │ +
77 Level& child() { return *_child; }
│ │ │ │ +
78
│ │ │ │ +
79 Sdc::Split getSplitType() const { return _splitType; }
│ │ │ │ +
80 int getRegularFaceSize() const { return _regFaceSize; }
│ │ │ │ +
81 Sdc::Options getOptions() const { return _options; }
│ │ │ │ +
82
│ │ │ │ +
83 // Face-varying:
│ │ │ │ +
84 int getNumFVarChannels() const { return (int) _fvarChannels.size(); }
│ │ │ │ +
85
│ │ │ │ +
86 FVarRefinement const & getFVarRefinement(int c) const { return *_fvarChannels[c]; }
│ │ │ │ +
87
│ │ │ │ +
88 //
│ │ │ │ +
89 // Options associated with the actual refinement operation, which may end up
│ │ │ │ +
90 // quite involved if we want to allow for the refinement of data that is not
│ │ │ │ +
91 // of interest to be suppressed. For now we have:
│ │ │ │ +
92 //
│ │ │ │ +
93 // "sparse": the alternative to uniform refinement, which requires that
│ │ │ │ +
94 // components be previously selected/marked to be included.
│ │ │ │ +
95 //
│ │ │ │ +
96 // "minimal topology": this is one that may get broken down into a finer
│ │ │ │ +
97 // set of options. It suppresses "full topology" in the child level
│ │ │ │ +
98 // and only generates what is minimally necessary for interpolation --
│ │ │ │ +
99 // which requires at least the face-vertices for faces, but also the
│ │ │ │ +
100 // vertex-faces for any face-varying channels present. So it will
│ │ │ │ +
101 // generate one or two of the six possible topological relations.
│ │ │ │ +
102 //
│ │ │ │ +
103 // These are strictly controlled right now, e.g. for sparse refinement, we
│ │ │ │ +
104 // currently enforce full topology at the finest level to allow for subsequent
│ │ │ │ +
105 // patch construction.
│ │ │ │ +
106 //
│ │ │ │ +
107 struct Options {
│ │ │ │ +
108 Options() : _sparse(false),
│ │ │ │ +
109 _faceVertsFirst(false),
│ │ │ │ +
110 _minimalTopology(false)
│ │ │ │ +
111 { }
│ │ │ │
112
│ │ │ │ -
113template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
114inline void
│ │ │ │ -
115StackBuffer<TYPE,SIZE,POD_TYPE>::deallocate() {
│ │ │ │ +
113 unsigned int _sparse : 1;
│ │ │ │ +
114 unsigned int _faceVertsFirst : 1;
│ │ │ │ +
115 unsigned int _minimalTopology : 1;
│ │ │ │
116
│ │ │ │ -
117 ::operator delete(_dynamicData);
│ │ │ │ -
118
│ │ │ │ -
119 _data = reinterpret_cast<TYPE*>(_staticData);
│ │ │ │ -
120 _capacity = SIZE;
│ │ │ │ -
121}
│ │ │ │ +
117 // Still under consideration:
│ │ │ │ +
118 //unsigned int _childToParentMap : 1;
│ │ │ │ +
119 };
│ │ │ │ +
120
│ │ │ │ +
121 void refine(Options options = Options());
│ │ │ │
122
│ │ │ │ -
123//
│ │ │ │ -
124// Explicit element-wise construction and destruction within allocated memory.
│ │ │ │ -
125// Compilers do not always optimize out the iteration here even when there is
│ │ │ │ -
126// no construction or destruction, so the POD_TYPE arguement can be used to
│ │ │ │ -
127// force this when/if it becomes an issue (and it has been in some cases).
│ │ │ │ -
128//
│ │ │ │ -
129template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
130inline void
│ │ │ │ -
131StackBuffer<TYPE,SIZE,POD_TYPE>::construct() {
│ │ │ │ -
132
│ │ │ │ -
133 for (size_type i = 0; i < _size; ++i) {
│ │ │ │ -
134 (void) new (&_data[i]) TYPE;
│ │ │ │ -
135 }
│ │ │ │ -
136}
│ │ │ │ -
137template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
138inline void
│ │ │ │ -
139StackBuffer<TYPE,SIZE,POD_TYPE>::destruct() {
│ │ │ │ -
140
│ │ │ │ -
141 for (size_type i = 0; i < _size; ++i) {
│ │ │ │ -
142 _data[i].~TYPE();
│ │ │ │ -
143 }
│ │ │ │ -
144}
│ │ │ │ -
145
│ │ │ │ -
146//
│ │ │ │ -
147// Inline constructors and destructor:
│ │ │ │ -
148//
│ │ │ │ -
149template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
150inline
│ │ │ │ -
151StackBuffer<TYPE,SIZE,POD_TYPE>::StackBuffer() :
│ │ │ │ -
152 _data(reinterpret_cast<TYPE*>(_staticData)),
│ │ │ │ -
153 _size(0),
│ │ │ │ -
154 _capacity(SIZE),
│ │ │ │ -
155 _dynamicData(0) {
│ │ │ │ -
156
│ │ │ │ -
157}
│ │ │ │ -
158
│ │ │ │ -
159template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
160inline
│ │ │ │ -
161StackBuffer<TYPE,SIZE,POD_TYPE>::StackBuffer(size_type size) :
│ │ │ │ -
162 _data(reinterpret_cast<TYPE*>(_staticData)),
│ │ │ │ -
163 _size(size),
│ │ │ │ -
164 _capacity(SIZE),
│ │ │ │ -
165 _dynamicData(0) {
│ │ │ │ +
123 bool hasFaceVerticesFirst() const { return _faceVertsFirst; }
│ │ │ │ +
124
│ │ │ │ +
125public:
│ │ │ │ +
126 //
│ │ │ │ +
127 // Access to members -- some testing classes (involving vertex interpolation)
│ │ │ │ +
128 // currently make use of these:
│ │ │ │ +
129 //
│ │ │ │ +
130 int getNumChildFacesFromFaces() const { return _childFaceFromFaceCount; }
│ │ │ │ +
131 int getNumChildEdgesFromFaces() const { return _childEdgeFromFaceCount; }
│ │ │ │ +
132 int getNumChildEdgesFromEdges() const { return _childEdgeFromEdgeCount; }
│ │ │ │ +
133 int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; }
│ │ │ │ +
134 int getNumChildVerticesFromEdges() const { return _childVertFromEdgeCount; }
│ │ │ │ +
135 int getNumChildVerticesFromVertices() const { return _childVertFromVertCount; }
│ │ │ │ +
136
│ │ │ │ +
137 Index getFirstChildFaceFromFaces() const { return _firstChildFaceFromFace; }
│ │ │ │ +
138 Index getFirstChildEdgeFromFaces() const { return _firstChildEdgeFromFace; }
│ │ │ │ +
139 Index getFirstChildEdgeFromEdges() const { return _firstChildEdgeFromEdge; }
│ │ │ │ +
140 Index getFirstChildVertexFromFaces() const { return _firstChildVertFromFace; }
│ │ │ │ +
141 Index getFirstChildVertexFromEdges() const { return _firstChildVertFromEdge; }
│ │ │ │ +
142 Index getFirstChildVertexFromVertices() const { return _firstChildVertFromVert; }
│ │ │ │ +
143
│ │ │ │ +
144 Index getFaceChildVertex(Index f) const { return _faceChildVertIndex[f]; }
│ │ │ │ +
145 Index getEdgeChildVertex(Index e) const { return _edgeChildVertIndex[e]; }
│ │ │ │ +
146 Index getVertexChildVertex(Index v) const { return _vertChildVertIndex[v]; }
│ │ │ │ +
147
│ │ │ │ +
148 ConstIndexArray getFaceChildFaces(Index parentFace) const;
│ │ │ │ +
149 ConstIndexArray getFaceChildEdges(Index parentFace) const;
│ │ │ │ +
150 ConstIndexArray getEdgeChildEdges(Index parentEdge) const;
│ │ │ │ +
151
│ │ │ │ +
152 // Child-to-parent relationships
│ │ │ │ +
153 bool isChildVertexComplete(Index v) const { return ! _childVertexTag[v]._incomplete; }
│ │ │ │ +
154
│ │ │ │ +
155 Index getChildFaceParentFace(Index f) const { return _childFaceParentIndex[f]; }
│ │ │ │ +
156 int getChildFaceInParentFace(Index f) const { return _childFaceTag[f]._indexInParent; }
│ │ │ │ +
157
│ │ │ │ +
158 Index getChildEdgeParentIndex(Index e) const { return _childEdgeParentIndex[e]; }
│ │ │ │ +
159
│ │ │ │ +
160 Index getChildVertexParentIndex(Index v) const { return _childVertexParentIndex[v]; }
│ │ │ │ +
161
│ │ │ │ +
162//
│ │ │ │ +
163// Modifiers intended for internal/protected use:
│ │ │ │ +
164//
│ │ │ │ +
165public:
│ │ │ │
166
│ │ │ │ -
167 if (size > SIZE) {
│ │ │ │ -
168 allocate(size);
│ │ │ │ -
169 }
│ │ │ │ -
170 if (!POD_TYPE) {
│ │ │ │ -
171 construct();
│ │ │ │ -
172 }
│ │ │ │ -
173}
│ │ │ │ -
174
│ │ │ │ -
175template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
176inline
│ │ │ │ -
177StackBuffer<TYPE,SIZE,POD_TYPE>::~StackBuffer() {
│ │ │ │ -
178
│ │ │ │ -
179 if (!POD_TYPE) {
│ │ │ │ -
180 destruct();
│ │ │ │ -
181 }
│ │ │ │ -
182 deallocate();
│ │ │ │ -
183}
│ │ │ │ -
184
│ │ │ │ -
185//
│ │ │ │ -
186// Inline sizing methods:
│ │ │ │ -
187//
│ │ │ │ -
188template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
189inline void
│ │ │ │ -
190StackBuffer<TYPE,SIZE,POD_TYPE>::Reserve(size_type capacity) {
│ │ │ │ +
167 IndexArray getFaceChildFaces(Index parentFace);
│ │ │ │ +
168 IndexArray getFaceChildEdges(Index parentFace);
│ │ │ │ +
169 IndexArray getEdgeChildEdges(Index parentEdge);
│ │ │ │ +
170
│ │ │ │ +
171public:
│ │ │ │ +
172 //
│ │ │ │ +
173 // Tags have now been added per-component in Level, but there is additional need to tag
│ │ │ │ +
174 // components within Refinement -- we can't tag the parent level components for any
│ │ │ │ +
175 // refinement (in order to keep it const) and tags associated with children that are
│ │ │ │ +
176 // specific to the child-to-parent mapping may not be warranted in the child level.
│ │ │ │ +
177 //
│ │ │ │ +
178 // Parent tags are only required for sparse refinement. The main property to tag is
│ │ │ │ +
179 // whether a component was selected, and so a single SparseTag is used for all three
│ │ │ │ +
180 // component types. Tagging if a component is "transitional" is also useful. This may
│ │ │ │ +
181 // only be necessary for edges but is currently packed into a mask per-edge for faces,
│ │ │ │ +
182 // which could be deferred, in which case "transitional" could be a single bit.
│ │ │ │ +
183 //
│ │ │ │ +
184 // Child tags are part of the child-to-parent mapping, which consists of the parent
│ │ │ │ +
185 // component index for each child component, plus a tag for the child indicating more
│ │ │ │ +
186 // about its relationship to its parent, e.g. is it completely defined, what the parent
│ │ │ │ +
187 // component type is, what is the index of the child within its parent, etc.
│ │ │ │ +
188 //
│ │ │ │ +
189 struct SparseTag {
│ │ │ │ +
190 SparseTag() : _selected(0), _transitional(0) { }
│ │ │ │
191
│ │ │ │ -
192 if (capacity > _capacity) {
│ │ │ │ -
193 if (!POD_TYPE) {
│ │ │ │ -
194 destruct();
│ │ │ │ -
195 }
│ │ │ │ -
196 deallocate();
│ │ │ │ -
197 allocate(capacity);
│ │ │ │ -
198 }
│ │ │ │ -
199}
│ │ │ │ -
200
│ │ │ │ -
201template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
202inline void
│ │ │ │ -
203StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
│ │ │ │ -
204{
│ │ │ │ -
205 if (!POD_TYPE) {
│ │ │ │ -
206 destruct();
│ │ │ │ -
207 }
│ │ │ │ -
208 if (size == 0) {
│ │ │ │ -
209 deallocate();
│ │ │ │ -
210 } else if (size > _capacity) {
│ │ │ │ -
211 deallocate();
│ │ │ │ -
212 allocate(size);
│ │ │ │ -
213 }
│ │ │ │ -
214 _size = size;
│ │ │ │ -
215 if (!POD_TYPE) {
│ │ │ │ -
216 construct();
│ │ │ │ -
217 }
│ │ │ │ -
218}
│ │ │ │ -
219
│ │ │ │ -
220} // end namespace internal
│ │ │ │ -
221} // end namespace Vtr
│ │ │ │ -
222
│ │ │ │ -
223} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
224using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
225} // end namespace OpenSubdiv
│ │ │ │ -
226
│ │ │ │ -
227#endif /* OPENSUBDIV3_VTR_STACK_BUFFER_H */
│ │ │ │ - │ │ │ │ +
192 unsigned char _selected : 1; // component specifically selected for refinement
│ │ │ │ +
193 unsigned char _transitional : 4; // adjacent to a refined component (4-bits for face)
│ │ │ │ +
194 };
│ │ │ │ +
195
│ │ │ │ +
196 struct ChildTag {
│ │ │ │ +
197 ChildTag() { }
│ │ │ │ +
198
│ │ │ │ +
199 unsigned char _incomplete : 1; // incomplete neighborhood to represent limit of parent
│ │ │ │ +
200 unsigned char _parentType : 2; // type of parent component: vertex, edge or face
│ │ │ │ +
201 unsigned char _indexInParent : 2; // index of child wrt parent: 0-3, or iterative if N > 4
│ │ │ │ +
202 };
│ │ │ │ +
203
│ │ │ │ +
204 // Methods to access and modify tags:
│ │ │ │ +
205 SparseTag const & getParentFaceSparseTag( Index f) const { return _parentFaceTag[f]; }
│ │ │ │ +
206 SparseTag const & getParentEdgeSparseTag( Index e) const { return _parentEdgeTag[e]; }
│ │ │ │ +
207 SparseTag const & getParentVertexSparseTag(Index v) const { return _parentVertexTag[v]; }
│ │ │ │ +
208
│ │ │ │ +
209 SparseTag & getParentFaceSparseTag( Index f) { return _parentFaceTag[f]; }
│ │ │ │ +
210 SparseTag & getParentEdgeSparseTag( Index e) { return _parentEdgeTag[e]; }
│ │ │ │ +
211 SparseTag & getParentVertexSparseTag(Index v) { return _parentVertexTag[v]; }
│ │ │ │ +
212
│ │ │ │ +
213 ChildTag const & getChildFaceTag( Index f) const { return _childFaceTag[f]; }
│ │ │ │ +
214 ChildTag const & getChildEdgeTag( Index e) const { return _childEdgeTag[e]; }
│ │ │ │ +
215 ChildTag const & getChildVertexTag(Index v) const { return _childVertexTag[v]; }
│ │ │ │ +
216
│ │ │ │ +
217 ChildTag & getChildFaceTag( Index f) { return _childFaceTag[f]; }
│ │ │ │ +
218 ChildTag & getChildEdgeTag( Index e) { return _childEdgeTag[e]; }
│ │ │ │ +
219 ChildTag & getChildVertexTag(Index v) { return _childVertexTag[v]; }
│ │ │ │ +
220
│ │ │ │ +
221// Remaining methods should really be protected -- for use by subclasses...
│ │ │ │ +
222public:
│ │ │ │ +
223 //
│ │ │ │ +
224 // Methods involved in constructing the parent-to-child mapping -- when the
│ │ │ │ +
225 // refinement is sparse, additional methods are needed to identify the selection:
│ │ │ │ +
226 //
│ │ │ │ +
227 void populateParentToChildMapping();
│ │ │ │ +
228 void populateParentChildIndices();
│ │ │ │ +
229 void printParentToChildMapping() const;
│ │ │ │ +
230
│ │ │ │ +
231 virtual void allocateParentChildIndices() = 0;
│ │ │ │ +
232
│ │ │ │ +
233 // Supporting method for sparse refinement:
│ │ │ │ +
234 void initializeSparseSelectionTags();
│ │ │ │ +
235 void markSparseChildComponentIndices();
│ │ │ │ +
236 void markSparseVertexChildren();
│ │ │ │ +
237 void markSparseEdgeChildren();
│ │ │ │ +
238
│ │ │ │ +
239 virtual void markSparseFaceChildren() = 0;
│ │ │ │ +
240
│ │ │ │ +
241 void initializeChildComponentCounts();
│ │ │ │ +
242
│ │ │ │ +
243 //
│ │ │ │ +
244 // Methods involved in constructing the child-to-parent mapping:
│ │ │ │ +
245 //
│ │ │ │ +
246 void populateChildToParentMapping();
│ │ │ │ +
247
│ │ │ │ +
248 void populateFaceParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
249 void populateFaceParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
250
│ │ │ │ +
251 void populateEdgeParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
252 void populateEdgeParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
253 void populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
254
│ │ │ │ +
255 void populateVertexParentVectors(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
256 void populateVertexParentFromParentFaces(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
257 void populateVertexParentFromParentEdges(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
258 void populateVertexParentFromParentVertices(ChildTag const initialChildTags[2][4]);
│ │ │ │ +
259
│ │ │ │ +
260 //
│ │ │ │ +
261 // Methods involved in propagating component tags from parent to child:
│ │ │ │ +
262 //
│ │ │ │ +
263 void propagateComponentTags();
│ │ │ │ +
264
│ │ │ │ +
265 void populateFaceTagVectors();
│ │ │ │ +
266 void populateFaceTagsFromParentFaces();
│ │ │ │ +
267
│ │ │ │ +
268 void populateEdgeTagVectors();
│ │ │ │ +
269 void populateEdgeTagsFromParentFaces();
│ │ │ │ +
270 void populateEdgeTagsFromParentEdges();
│ │ │ │ +
271
│ │ │ │ +
272 void populateVertexTagVectors();
│ │ │ │ +
273 void populateVertexTagsFromParentFaces();
│ │ │ │ +
274 void populateVertexTagsFromParentEdges();
│ │ │ │ +
275 void populateVertexTagsFromParentVertices();
│ │ │ │ +
276
│ │ │ │ +
277 //
│ │ │ │ +
278 // Methods (and types) involved in subdividing the topology -- though not
│ │ │ │ +
279 // fully exploited, any subset of the 6 relations can be generated:
│ │ │ │ +
280 //
│ │ │ │ +
281 struct Relations {
│ │ │ │ +
282 unsigned int _faceVertices : 1;
│ │ │ │ +
283 unsigned int _faceEdges : 1;
│ │ │ │ +
284 unsigned int _edgeVertices : 1;
│ │ │ │ +
285 unsigned int _edgeFaces : 1;
│ │ │ │ +
286 unsigned int _vertexFaces : 1;
│ │ │ │ +
287 unsigned int _vertexEdges : 1;
│ │ │ │ +
288
│ │ │ │ +
289 void setAll(bool enable) {
│ │ │ │ +
290 _faceVertices = enable;
│ │ │ │ +
291 _faceEdges = enable;
│ │ │ │ +
292 _edgeVertices = enable;
│ │ │ │ +
293 _edgeFaces = enable;
│ │ │ │ +
294 _vertexFaces = enable;
│ │ │ │ +
295 _vertexEdges = enable;
│ │ │ │ +
296 }
│ │ │ │ +
297 };
│ │ │ │ +
298
│ │ │ │ +
299 void subdivideTopology(Relations const& relationsToSubdivide);
│ │ │ │ +
300
│ │ │ │ +
301 virtual void populateFaceVertexRelation() = 0;
│ │ │ │ +
302 virtual void populateFaceEdgeRelation() = 0;
│ │ │ │ +
303 virtual void populateEdgeVertexRelation() = 0;
│ │ │ │ +
304 virtual void populateEdgeFaceRelation() = 0;
│ │ │ │ +
305 virtual void populateVertexFaceRelation() = 0;
│ │ │ │ +
306 virtual void populateVertexEdgeRelation() = 0;
│ │ │ │ +
307
│ │ │ │ +
308 //
│ │ │ │ +
309 // Methods involved in subdividing and inspecting sharpness values:
│ │ │ │ +
310 //
│ │ │ │ +
311 void subdivideSharpnessValues();
│ │ │ │ +
312
│ │ │ │ +
313 void subdivideVertexSharpness();
│ │ │ │ +
314 void subdivideEdgeSharpness();
│ │ │ │ +
315 void reclassifySemisharpVertices();
│ │ │ │ +
316
│ │ │ │ +
317 //
│ │ │ │ +
318 // Methods involved in subdividing face-varying topology:
│ │ │ │ +
319 //
│ │ │ │ +
320 void subdivideFVarChannels();
│ │ │ │ +
321
│ │ │ │ +
322protected:
│ │ │ │ +
323 // A debug method of Level prints a Refinement (should really change this)
│ │ │ │ +
324 friend void Level::print(const Refinement *) const;
│ │ │ │ +
325
│ │ │ │ +
326 //
│ │ │ │ +
327 // Data members -- the logical grouping of some of these (and methods that make use
│ │ │ │ +
328 // of them) may lead to grouping them into a few utility classes or structs...
│ │ │ │ +
329 //
│ │ │ │ +
330
│ │ │ │ +
331 // Defined on construction:
│ │ │ │ +
332 Level const * _parent;
│ │ │ │ +
333 Level * _child;
│ │ │ │ +
334 Sdc::Options _options;
│ │ │ │ +
335
│ │ │ │ +
336 // Defined by the subclass:
│ │ │ │ +
337 Sdc::Split _splitType;
│ │ │ │ +
338 int _regFaceSize;
│ │ │ │ +
339
│ │ │ │ +
340 // Determined by the refinement options:
│ │ │ │ +
341 bool _uniform;
│ │ │ │ +
342 bool _faceVertsFirst;
│ │ │ │ +
343
│ │ │ │ +
344 //
│ │ │ │ +
345 // Inventory and ordering of the types of child components:
│ │ │ │ +
346 //
│ │ │ │ +
347 int _childFaceFromFaceCount; // arguably redundant (all faces originate from faces)
│ │ │ │ +
348 int _childEdgeFromFaceCount;
│ │ │ │ +
349 int _childEdgeFromEdgeCount;
│ │ │ │ +
350 int _childVertFromFaceCount;
│ │ │ │ +
351 int _childVertFromEdgeCount;
│ │ │ │ +
352 int _childVertFromVertCount;
│ │ │ │ +
353
│ │ │ │ +
354 int _firstChildFaceFromFace; // arguably redundant (all faces originate from faces)
│ │ │ │ +
355 int _firstChildEdgeFromFace;
│ │ │ │ +
356 int _firstChildEdgeFromEdge;
│ │ │ │ +
357 int _firstChildVertFromFace;
│ │ │ │ +
358 int _firstChildVertFromEdge;
│ │ │ │ +
359 int _firstChildVertFromVert;
│ │ │ │ +
360
│ │ │ │ +
361 //
│ │ │ │ +
362 // The parent-to-child mapping:
│ │ │ │ +
363 // These are vectors sized according to the number of parent components (and
│ │ │ │ +
364 // their topology) that contain references/indices to the child components that
│ │ │ │ +
365 // result from them by refinement. When refinement is sparse, parent components
│ │ │ │ +
366 // that have not spawned all child components will have their missing children
│ │ │ │ +
367 // marked as invalid.
│ │ │ │ +
368 //
│ │ │ │ +
369 // NOTE the "Array" members here. Often vectors within the Level can be shared
│ │ │ │ +
370 // with the Refinement, and an Array instance is used to do so. If not shared
│ │ │ │ +
371 // the subclass just initializes the Array members after allocating its own local
│ │ │ │ +
372 // vector members.
│ │ │ │ +
373 //
│ │ │ │ +
374 IndexArray _faceChildFaceCountsAndOffsets;
│ │ │ │ +
375 IndexArray _faceChildEdgeCountsAndOffsets;
│ │ │ │ +
376
│ │ │ │ +
377 IndexVector _faceChildFaceIndices; // *cannot* always use face-vert counts/offsets
│ │ │ │ +
378 IndexVector _faceChildEdgeIndices; // can use face-vert counts/offsets
│ │ │ │ +
379 IndexVector _faceChildVertIndex;
│ │ │ │ +
380
│ │ │ │ +
381 IndexVector _edgeChildEdgeIndices; // trivial/corresponding pair for each
│ │ │ │ +
382 IndexVector _edgeChildVertIndex;
│ │ │ │ +
383
│ │ │ │ +
384 IndexVector _vertChildVertIndex;
│ │ │ │ +
385
│ │ │ │ +
386 //
│ │ │ │ +
387 // The child-to-parent mapping:
│ │ │ │ +
388 //
│ │ │ │ +
389 IndexVector _childFaceParentIndex;
│ │ │ │ +
390 IndexVector _childEdgeParentIndex;
│ │ │ │ +
391 IndexVector _childVertexParentIndex;
│ │ │ │ +
392
│ │ │ │ +
393 std::vector<ChildTag> _childFaceTag;
│ │ │ │ +
394 std::vector<ChildTag> _childEdgeTag;
│ │ │ │ +
395 std::vector<ChildTag> _childVertexTag;
│ │ │ │ +
396
│ │ │ │ +
397 //
│ │ │ │ +
398 // Tags for sparse selection of components:
│ │ │ │ +
399 //
│ │ │ │ +
400 std::vector<SparseTag> _parentFaceTag;
│ │ │ │ +
401 std::vector<SparseTag> _parentEdgeTag;
│ │ │ │ +
402 std::vector<SparseTag> _parentVertexTag;
│ │ │ │ +
403
│ │ │ │ +
404 //
│ │ │ │ +
405 // Refinement data for face-varying channels present in the Levels being refined:
│ │ │ │ +
406 //
│ │ │ │ +
407 std::vector<FVarRefinement*> _fvarChannels;
│ │ │ │ +
408};
│ │ │ │ +
409
│ │ │ │ +
410inline ConstIndexArray
│ │ │ │ +
411Refinement::getFaceChildFaces(Index parentFace) const {
│ │ │ │ +
412
│ │ │ │ +
413 return ConstIndexArray(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets[2*parentFace+1]],
│ │ │ │ +
414 _faceChildFaceCountsAndOffsets[2*parentFace]);
│ │ │ │ +
415}
│ │ │ │ +
416
│ │ │ │ +
417inline IndexArray
│ │ │ │ +
418Refinement::getFaceChildFaces(Index parentFace) {
│ │ │ │ +
419
│ │ │ │ +
420 return IndexArray(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets[2*parentFace+1]],
│ │ │ │ +
421 _faceChildFaceCountsAndOffsets[2*parentFace]);
│ │ │ │ +
422}
│ │ │ │ +
423
│ │ │ │ +
424inline ConstIndexArray
│ │ │ │ +
425Refinement::getFaceChildEdges(Index parentFace) const {
│ │ │ │ +
426
│ │ │ │ +
427 return ConstIndexArray(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets[2*parentFace+1]],
│ │ │ │ +
428 _faceChildEdgeCountsAndOffsets[2*parentFace]);
│ │ │ │ +
429}
│ │ │ │ +
430inline IndexArray
│ │ │ │ +
431Refinement::getFaceChildEdges(Index parentFace) {
│ │ │ │ +
432
│ │ │ │ +
433 return IndexArray(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets[2*parentFace+1]],
│ │ │ │ +
434 _faceChildEdgeCountsAndOffsets[2*parentFace]);
│ │ │ │ +
435}
│ │ │ │ +
436
│ │ │ │ +
437inline ConstIndexArray
│ │ │ │ +
438Refinement::getEdgeChildEdges(Index parentEdge) const {
│ │ │ │ +
439
│ │ │ │ +
440 return ConstIndexArray(&_edgeChildEdgeIndices[parentEdge*2], 2);
│ │ │ │ +
441}
│ │ │ │ +
442
│ │ │ │ +
443inline IndexArray
│ │ │ │ +
444Refinement::getEdgeChildEdges(Index parentEdge) {
│ │ │ │ +
445
│ │ │ │ +
446 return IndexArray(&_edgeChildEdgeIndices[parentEdge*2], 2);
│ │ │ │ +
447}
│ │ │ │ +
448
│ │ │ │ +
449} // end namespace internal
│ │ │ │ +
450} // end namespace Vtr
│ │ │ │ +
451
│ │ │ │ +
452} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
453using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
454} // end namespace OpenSubdiv
│ │ │ │ +
455
│ │ │ │ +
456#endif /* OPENSUBDIV3_VTR_REFINEMENT_H */
│ │ │ │ + │ │ │ │ + │ │ │ │ +
std::vector< Index > IndexVector
Definition types.h:77
│ │ │ │ +
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ + │ │ │ │ +
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -stackBuffer.h │ │ │ │ │ +refinement.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 DreamWorks Animation LLC. │ │ │ │ │ +2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -23,230 +23,545 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_REFINEMENT_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -30namespace OPENSUBDIV_VERSION { │ │ │ │ │ -31 │ │ │ │ │ -32namespace Vtr { │ │ │ │ │ -33namespace internal { │ │ │ │ │ -34 │ │ │ │ │ -35// │ │ │ │ │ -36// The StackBuffer class is intended solely to take the place of VLAs │ │ │ │ │ -(Variable │ │ │ │ │ -37// Length Arrays) which most compilers support, but are not strictly standard │ │ │ │ │ -C++. │ │ │ │ │ -38// Portability concerns forces us to make use of either alloca() or some │ │ │ │ │ -other │ │ │ │ │ -39// mechanism to create small arrays on the stack that are typically based on │ │ │ │ │ -the │ │ │ │ │ -40// valence of a vertex -- small in general, but occasionally large. │ │ │ │ │ -41// │ │ │ │ │ -42// Note also that since the intent of this is to replace VLAs -- not general │ │ │ │ │ -43// std::vectors -- support for std::vector functionality is intentionally │ │ │ │ │ -limited │ │ │ │ │ -44// and STL-like naming is avoided. Like a VLA there is no incremental growth. │ │ │ │ │ -45// Support for resizing is available to reuse an instance at the beginning of │ │ │ │ │ -a │ │ │ │ │ -46// loop with a new size, but resizing in this case reinitializes all │ │ │ │ │ -elements. │ │ │ │ │ +29#include "../sdc/types.h" │ │ │ │ │ +30#include "../sdc/options.h" │ │ │ │ │ +31#include "../vtr/types.h" │ │ │ │ │ +32#include "../vtr/level.h" │ │ │ │ │ +33 │ │ │ │ │ +34#include │ │ │ │ │ +35 │ │ │ │ │ +36// │ │ │ │ │ +37// Declaration for the main refinement class (Refinement) and its pre- │ │ │ │ │ +requisites: │ │ │ │ │ +38// │ │ │ │ │ +39namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +40namespace OPENSUBDIV_VERSION { │ │ │ │ │ +41 │ │ │ │ │ +42namespace Vtr { │ │ │ │ │ +43namespace internal { │ │ │ │ │ +44 │ │ │ │ │ +45class FVarRefinement; │ │ │ │ │ +46 │ │ │ │ │ 47// │ │ │ │ │ -48 │ │ │ │ │ -49template │ │ │ │ │ -50class StackBuffer │ │ │ │ │ -51{ │ │ │ │ │ -52public: │ │ │ │ │ -53 typedef unsigned int size_type; │ │ │ │ │ -54 │ │ │ │ │ -55public: │ │ │ │ │ -56 // Constructors and destructor -- declared inline below: │ │ │ │ │ -57 StackBuffer(); │ │ │ │ │ -58 StackBuffer(size_type size); │ │ │ │ │ -59 ~StackBuffer(); │ │ │ │ │ -60 │ │ │ │ │ -61public: │ │ │ │ │ -62 // Note the reliance on implicit casting so that it can be used similar to │ │ │ │ │ -63 // a VLA. This removes the need for operator[] as the resulting TYPE* will │ │ │ │ │ -64 // natively support []. (The presence of both TYPE* and operator[] also │ │ │ │ │ -65 // causes an ambiguous overloading error with 32-bit MSVC builds.) │ │ │ │ │ -66 │ │ │ │ │ -67 operator TYPE const * () const { return _data; } │ │ │ │ │ -68 operator TYPE * () { return _data; } │ │ │ │ │ -69 │ │ │ │ │ -70 size_type GetSize() const { return _size; } │ │ │ │ │ -71 │ │ │ │ │ -72 void SetSize(size_type size); │ │ │ │ │ -73 void Reserve(size_type capacity); │ │ │ │ │ +48// Refinement: │ │ │ │ │ +49// A refinement is a mapping between two levels -- relating the components in │ │ │ │ │ +the original │ │ │ │ │ +50// (parent) level to the one refined (child). The refinement may be complete │ │ │ │ │ +(uniform) or sparse │ │ │ │ │ +51// (adaptive or otherwise selective), so not all components in the parent │ │ │ │ │ +level will spawn │ │ │ │ │ +52// components in the child level. │ │ │ │ │ +53// │ │ │ │ │ +54// Refinement is an abstract class and expects subclasses corresponding to │ │ │ │ │ +the different types │ │ │ │ │ +55// of topological splits that the supported subdivision schemes collectively │ │ │ │ │ +require, i.e. those │ │ │ │ │ +56// listed in Sdc::SplitType. Note the virtual requirements expected of the │ │ │ │ │ +subclasses in the list │ │ │ │ │ +57// of protected methods -- they differ mainly in the topology that is created │ │ │ │ │ +in the child Level │ │ │ │ │ +58// and not the propagation of tags through refinement, subdivision of │ │ │ │ │ +sharpness values or the │ │ │ │ │ +59// treatment of face-varying data. The primary subclasses are QuadRefinement │ │ │ │ │ +and TriRefinement. │ │ │ │ │ +60// │ │ │ │ │ +61// At a high level, all that is necessary in terms of interface is to │ │ │ │ │ +construct, initialize │ │ │ │ │ +62// (linking the two levels), optionally select components for sparse │ │ │ │ │ +refinement (via use of the │ │ │ │ │ +63// SparseSelector) and call the refine() method. This usage is expected of │ │ │ │ │ +Far::TopologyRefiner. │ │ │ │ │ +64// │ │ │ │ │ +65// Since we really want this class to be restricted from public access │ │ │ │ │ +eventually, all methods │ │ │ │ │ +66// begin with lower case (as is the convention for protected methods) and the │ │ │ │ │ +list of friends │ │ │ │ │ +67// will be maintained more strictly. │ │ │ │ │ +68// │ │ │ │ │ +69class Refinement { │ │ │ │ │ +70 │ │ │ │ │ +71public: │ │ │ │ │ +72 Refinement(Level const & parent, Level & child, Sdc::Options const& │ │ │ │ │ +schemeOptions); │ │ │ │ │ +73 virtual ~Refinement(); │ │ │ │ │ 74 │ │ │ │ │ -75private: │ │ │ │ │ -76 // Non-copyable: │ │ │ │ │ -77 StackBuffer(const StackBuffer &) { } │ │ │ │ │ -78 StackBuffer& operator=(const StackBuffer &) { return │ │ │ │ │ -*this; } │ │ │ │ │ -79 │ │ │ │ │ -80 void allocate(size_type capacity); │ │ │ │ │ -81 void deallocate(); │ │ │ │ │ -82 void construct(); │ │ │ │ │ -83 void destruct(); │ │ │ │ │ -84 │ │ │ │ │ -85private: │ │ │ │ │ -86 TYPE * _data; │ │ │ │ │ -87 size_type _size; │ │ │ │ │ -88 size_type _capacity; │ │ │ │ │ -89 │ │ │ │ │ -90 // Is alignment an issue here? The staticData arena will at least be double- │ │ │ │ │ -word │ │ │ │ │ -91 // aligned within this struct, which meets current and most anticipated │ │ │ │ │ -needs. │ │ │ │ │ -92 char _staticData[SIZE * sizeof(TYPE)]; │ │ │ │ │ -93 char * _dynamicData; │ │ │ │ │ -94}; │ │ │ │ │ -95 │ │ │ │ │ -96 │ │ │ │ │ -97// │ │ │ │ │ -98// Core allocation/deallocation methods: │ │ │ │ │ -99// │ │ │ │ │ -100template │ │ │ │ │ -101inline void │ │ │ │ │ -102StackBuffer::allocate(size_type capacity) { │ │ │ │ │ -103 │ │ │ │ │ -104 // Again, is alignment an issue here? C++ spec says new will return pointer │ │ │ │ │ -105 // "suitably aligned" for conversion to pointers of other types, which │ │ │ │ │ -implies │ │ │ │ │ -106 // at least an alignment of 16. │ │ │ │ │ -107 _dynamicData = static_cast(::operator new(capacity * sizeof(TYPE))); │ │ │ │ │ -108 │ │ │ │ │ -109 _data = reinterpret_cast(_dynamicData); │ │ │ │ │ -110 _capacity = capacity; │ │ │ │ │ -111} │ │ │ │ │ +75 Level const& parent() const { return *_parent; } │ │ │ │ │ +76 Level const& child() const { return *_child; } │ │ │ │ │ +77 Level& child() { return *_child; } │ │ │ │ │ +78 │ │ │ │ │ +79 _S_d_c_:_:_S_p_l_i_t getSplitType() const { return _splitType; } │ │ │ │ │ +80 int getRegularFaceSize() const { return _regFaceSize; } │ │ │ │ │ +81 Sdc::Options getOptions() const { return _options; } │ │ │ │ │ +82 │ │ │ │ │ +83 // Face-varying: │ │ │ │ │ +84 int getNumFVarChannels() const { return (int) _fvarChannels.size(); } │ │ │ │ │ +85 │ │ │ │ │ +86 FVarRefinement const & getFVarRefinement(int c) const { return │ │ │ │ │ +*_fvarChannels[c]; } │ │ │ │ │ +87 │ │ │ │ │ +88 // │ │ │ │ │ +89 // Options associated with the actual refinement operation, which may end up │ │ │ │ │ +90 // quite involved if we want to allow for the refinement of data that is not │ │ │ │ │ +91 // of interest to be suppressed. For now we have: │ │ │ │ │ +92 // │ │ │ │ │ +93 // "sparse": the alternative to uniform refinement, which requires that │ │ │ │ │ +94 // components be previously selected/marked to be included. │ │ │ │ │ +95 // │ │ │ │ │ +96 // "minimal topology": this is one that may get broken down into a finer │ │ │ │ │ +97 // set of options. It suppresses "full topology" in the child level │ │ │ │ │ +98 // and only generates what is minimally necessary for interpolation -- │ │ │ │ │ +99 // which requires at least the face-vertices for faces, but also the │ │ │ │ │ +100 // vertex-faces for any face-varying channels present. So it will │ │ │ │ │ +101 // generate one or two of the six possible topological relations. │ │ │ │ │ +102 // │ │ │ │ │ +103 // These are strictly controlled right now, e.g. for sparse refinement, we │ │ │ │ │ +104 // currently enforce full topology at the finest level to allow for │ │ │ │ │ +subsequent │ │ │ │ │ +105 // patch construction. │ │ │ │ │ +106 // │ │ │ │ │ +107 struct Options { │ │ │ │ │ +108 Options() : _sparse(false), │ │ │ │ │ +109 _faceVertsFirst(false), │ │ │ │ │ +110 _minimalTopology(false) │ │ │ │ │ +111 { } │ │ │ │ │ 112 │ │ │ │ │ -113template │ │ │ │ │ -114inline void │ │ │ │ │ -115StackBuffer::deallocate() { │ │ │ │ │ +113 unsigned int _sparse : 1; │ │ │ │ │ +114 unsigned int _faceVertsFirst : 1; │ │ │ │ │ +115 unsigned int _minimalTopology : 1; │ │ │ │ │ 116 │ │ │ │ │ -117 ::operator delete(_dynamicData); │ │ │ │ │ -118 │ │ │ │ │ -119 _data = reinterpret_cast(_staticData); │ │ │ │ │ -120 _capacity = SIZE; │ │ │ │ │ -121} │ │ │ │ │ +117 // Still under consideration: │ │ │ │ │ +118 //unsigned int _childToParentMap : 1; │ │ │ │ │ +119 }; │ │ │ │ │ +120 │ │ │ │ │ +121 void refine(Options options = Options()); │ │ │ │ │ 122 │ │ │ │ │ -123// │ │ │ │ │ -124// Explicit element-wise construction and destruction within allocated │ │ │ │ │ -memory. │ │ │ │ │ -125// Compilers do not always optimize out the iteration here even when there │ │ │ │ │ -is │ │ │ │ │ -126// no construction or destruction, so the POD_TYPE arguement can be used to │ │ │ │ │ -127// force this when/if it becomes an issue (and it has been in some cases). │ │ │ │ │ -128// │ │ │ │ │ -129template │ │ │ │ │ -130inline void │ │ │ │ │ -131StackBuffer::construct() { │ │ │ │ │ -132 │ │ │ │ │ -133 for (size_type i = 0; i < _size; ++i) { │ │ │ │ │ -134 (void) new (&_data[i]) TYPE; │ │ │ │ │ -135 } │ │ │ │ │ -136} │ │ │ │ │ -137template │ │ │ │ │ -138inline void │ │ │ │ │ -139StackBuffer::destruct() { │ │ │ │ │ -140 │ │ │ │ │ -141 for (size_type i = 0; i < _size; ++i) { │ │ │ │ │ -142 _data[i].~TYPE(); │ │ │ │ │ -143 } │ │ │ │ │ -144} │ │ │ │ │ -145 │ │ │ │ │ -146// │ │ │ │ │ -147// Inline constructors and destructor: │ │ │ │ │ -148// │ │ │ │ │ -149template │ │ │ │ │ -150inline │ │ │ │ │ -151StackBuffer::StackBuffer() : │ │ │ │ │ -152 _data(reinterpret_cast(_staticData)), │ │ │ │ │ -153 _size(0), │ │ │ │ │ -154 _capacity(SIZE), │ │ │ │ │ -155 _dynamicData(0) { │ │ │ │ │ -156 │ │ │ │ │ -157} │ │ │ │ │ -158 │ │ │ │ │ -159template │ │ │ │ │ -160inline │ │ │ │ │ -161StackBuffer::StackBuffer(size_type size) : │ │ │ │ │ -162 _data(reinterpret_cast(_staticData)), │ │ │ │ │ -163 _size(size), │ │ │ │ │ -164 _capacity(SIZE), │ │ │ │ │ -165 _dynamicData(0) { │ │ │ │ │ +123 bool hasFaceVerticesFirst() const { return _faceVertsFirst; } │ │ │ │ │ +124 │ │ │ │ │ +125public: │ │ │ │ │ +126 // │ │ │ │ │ +127 // Access to members -- some testing classes (involving vertex │ │ │ │ │ +interpolation) │ │ │ │ │ +128 // currently make use of these: │ │ │ │ │ +129 // │ │ │ │ │ +130 int getNumChildFacesFromFaces() const { return _childFaceFromFaceCount; } │ │ │ │ │ +131 int getNumChildEdgesFromFaces() const { return _childEdgeFromFaceCount; } │ │ │ │ │ +132 int getNumChildEdgesFromEdges() const { return _childEdgeFromEdgeCount; } │ │ │ │ │ +133 int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; │ │ │ │ │ +} │ │ │ │ │ +134 int getNumChildVerticesFromEdges() const { return _childVertFromEdgeCount; │ │ │ │ │ +} │ │ │ │ │ +135 int getNumChildVerticesFromVertices() const { return │ │ │ │ │ +_childVertFromVertCount; } │ │ │ │ │ +136 │ │ │ │ │ +137 _I_n_d_e_x getFirstChildFaceFromFaces() const { return _firstChildFaceFromFace; │ │ │ │ │ +} │ │ │ │ │ +138 _I_n_d_e_x getFirstChildEdgeFromFaces() const { return _firstChildEdgeFromFace; │ │ │ │ │ +} │ │ │ │ │ +139 _I_n_d_e_x getFirstChildEdgeFromEdges() const { return _firstChildEdgeFromEdge; │ │ │ │ │ +} │ │ │ │ │ +140 _I_n_d_e_x getFirstChildVertexFromFaces() const { return │ │ │ │ │ +_firstChildVertFromFace; } │ │ │ │ │ +141 _I_n_d_e_x getFirstChildVertexFromEdges() const { return │ │ │ │ │ +_firstChildVertFromEdge; } │ │ │ │ │ +142 _I_n_d_e_x getFirstChildVertexFromVertices() const { return │ │ │ │ │ +_firstChildVertFromVert; } │ │ │ │ │ +143 │ │ │ │ │ +144 _I_n_d_e_x getFaceChildVertex(_I_n_d_e_x f) const { return _faceChildVertIndex[f]; } │ │ │ │ │ +145 _I_n_d_e_x getEdgeChildVertex(_I_n_d_e_x e) const { return _edgeChildVertIndex[e]; } │ │ │ │ │ +146 _I_n_d_e_x getVertexChildVertex(_I_n_d_e_x v) const { return _vertChildVertIndex[v]; │ │ │ │ │ +} │ │ │ │ │ +147 │ │ │ │ │ +148 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceChildFaces(_I_n_d_e_x parentFace) const; │ │ │ │ │ +149 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceChildEdges(_I_n_d_e_x parentFace) const; │ │ │ │ │ +150 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeChildEdges(_I_n_d_e_x parentEdge) const; │ │ │ │ │ +151 │ │ │ │ │ +152 // Child-to-parent relationships │ │ │ │ │ +153 bool isChildVertexComplete(_I_n_d_e_x v) const { return ! _childVertexTag │ │ │ │ │ +[v]._incomplete; } │ │ │ │ │ +154 │ │ │ │ │ +155 _I_n_d_e_x getChildFaceParentFace(_I_n_d_e_x f) const { return _childFaceParentIndex │ │ │ │ │ +[f]; } │ │ │ │ │ +156 int getChildFaceInParentFace(_I_n_d_e_x f) const { return _childFaceTag │ │ │ │ │ +[f]._indexInParent; } │ │ │ │ │ +157 │ │ │ │ │ +158 _I_n_d_e_x getChildEdgeParentIndex(_I_n_d_e_x e) const { return _childEdgeParentIndex │ │ │ │ │ +[e]; } │ │ │ │ │ +159 │ │ │ │ │ +160 _I_n_d_e_x getChildVertexParentIndex(_I_n_d_e_x v) const { return │ │ │ │ │ +_childVertexParentIndex[v]; } │ │ │ │ │ +161 │ │ │ │ │ +162// │ │ │ │ │ +163// Modifiers intended for internal/protected use: │ │ │ │ │ +164// │ │ │ │ │ +165public: │ │ │ │ │ 166 │ │ │ │ │ -167 if (size > SIZE) { │ │ │ │ │ -168 allocate(size); │ │ │ │ │ -169 } │ │ │ │ │ -170 if (!POD_TYPE) { │ │ │ │ │ -171 construct(); │ │ │ │ │ -172 } │ │ │ │ │ -173} │ │ │ │ │ -174 │ │ │ │ │ -175template │ │ │ │ │ -176inline │ │ │ │ │ -177StackBuffer::~StackBuffer() { │ │ │ │ │ -178 │ │ │ │ │ -179 if (!POD_TYPE) { │ │ │ │ │ -180 destruct(); │ │ │ │ │ -181 } │ │ │ │ │ -182 deallocate(); │ │ │ │ │ -183} │ │ │ │ │ -184 │ │ │ │ │ -185// │ │ │ │ │ -186// Inline sizing methods: │ │ │ │ │ -187// │ │ │ │ │ -188template │ │ │ │ │ -189inline void │ │ │ │ │ -190StackBuffer::Reserve(size_type capacity) { │ │ │ │ │ +167 _I_n_d_e_x_A_r_r_a_y getFaceChildFaces(_I_n_d_e_x parentFace); │ │ │ │ │ +168 _I_n_d_e_x_A_r_r_a_y getFaceChildEdges(_I_n_d_e_x parentFace); │ │ │ │ │ +169 _I_n_d_e_x_A_r_r_a_y getEdgeChildEdges(_I_n_d_e_x parentEdge); │ │ │ │ │ +170 │ │ │ │ │ +171public: │ │ │ │ │ +172 // │ │ │ │ │ +173 // Tags have now been added per-component in Level, but there is additional │ │ │ │ │ +need to tag │ │ │ │ │ +174 // components within Refinement -- we can't tag the parent level components │ │ │ │ │ +for any │ │ │ │ │ +175 // refinement (in order to keep it const) and tags associated with children │ │ │ │ │ +that are │ │ │ │ │ +176 // specific to the child-to-parent mapping may not be warranted in the │ │ │ │ │ +child level. │ │ │ │ │ +177 // │ │ │ │ │ +178 // Parent tags are only required for sparse refinement. The main property │ │ │ │ │ +to tag is │ │ │ │ │ +179 // whether a component was selected, and so a single SparseTag is used for │ │ │ │ │ +all three │ │ │ │ │ +180 // component types. Tagging if a component is "transitional" is also │ │ │ │ │ +useful. This may │ │ │ │ │ +181 // only be necessary for edges but is currently packed into a mask per-edge │ │ │ │ │ +for faces, │ │ │ │ │ +182 // which could be deferred, in which case "transitional" could be a single │ │ │ │ │ +bit. │ │ │ │ │ +183 // │ │ │ │ │ +184 // Child tags are part of the child-to-parent mapping, which consists of │ │ │ │ │ +the parent │ │ │ │ │ +185 // component index for each child component, plus a tag for the child │ │ │ │ │ +indicating more │ │ │ │ │ +186 // about its relationship to its parent, e.g. is it completely defined, │ │ │ │ │ +what the parent │ │ │ │ │ +187 // component type is, what is the index of the child within its parent, │ │ │ │ │ +etc. │ │ │ │ │ +188 // │ │ │ │ │ +189 struct SparseTag { │ │ │ │ │ +190 SparseTag() : _selected(0), _transitional(0) { } │ │ │ │ │ 191 │ │ │ │ │ -192 if (capacity > _capacity) { │ │ │ │ │ -193 if (!POD_TYPE) { │ │ │ │ │ -194 destruct(); │ │ │ │ │ -195 } │ │ │ │ │ -196 deallocate(); │ │ │ │ │ -197 allocate(capacity); │ │ │ │ │ -198 } │ │ │ │ │ -199} │ │ │ │ │ -200 │ │ │ │ │ -201template │ │ │ │ │ -202inline void │ │ │ │ │ -203StackBuffer::SetSize(size_type size) │ │ │ │ │ -204{ │ │ │ │ │ -205 if (!POD_TYPE) { │ │ │ │ │ -206 destruct(); │ │ │ │ │ -207 } │ │ │ │ │ -208 if (size == 0) { │ │ │ │ │ -209 deallocate(); │ │ │ │ │ -210 } else if (size > _capacity) { │ │ │ │ │ -211 deallocate(); │ │ │ │ │ -212 allocate(size); │ │ │ │ │ -213 } │ │ │ │ │ -214 _size = size; │ │ │ │ │ -215 if (!POD_TYPE) { │ │ │ │ │ -216 construct(); │ │ │ │ │ -217 } │ │ │ │ │ -218} │ │ │ │ │ -219 │ │ │ │ │ -220} // end namespace internal │ │ │ │ │ -221} // end namespace Vtr │ │ │ │ │ -222 │ │ │ │ │ -223} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -224using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -225} // end namespace OpenSubdiv │ │ │ │ │ -226 │ │ │ │ │ -227#endif /* OPENSUBDIV3_VTR_STACK_BUFFER_H */ │ │ │ │ │ +192 unsigned char _selected : 1; // component specifically selected for │ │ │ │ │ +refinement │ │ │ │ │ +193 unsigned char _transitional : 4; // adjacent to a refined component (4-bits │ │ │ │ │ +for face) │ │ │ │ │ +194 }; │ │ │ │ │ +195 │ │ │ │ │ +196 struct ChildTag { │ │ │ │ │ +197 ChildTag() { } │ │ │ │ │ +198 │ │ │ │ │ +199 unsigned char _incomplete : 1; // incomplete neighborhood to represent │ │ │ │ │ +limit of parent │ │ │ │ │ +200 unsigned char _parentType : 2; // type of parent component: vertex, edge or │ │ │ │ │ +face │ │ │ │ │ +201 unsigned char _indexInParent : 2; // index of child wrt parent: 0-3, or │ │ │ │ │ +iterative if N > 4 │ │ │ │ │ +202 }; │ │ │ │ │ +203 │ │ │ │ │ +204 // Methods to access and modify tags: │ │ │ │ │ +205 SparseTag const & getParentFaceSparseTag( _I_n_d_e_x f) const { return │ │ │ │ │ +_parentFaceTag[f]; } │ │ │ │ │ +206 SparseTag const & getParentEdgeSparseTag( _I_n_d_e_x e) const { return │ │ │ │ │ +_parentEdgeTag[e]; } │ │ │ │ │ +207 SparseTag const & getParentVertexSparseTag(_I_n_d_e_x v) const { return │ │ │ │ │ +_parentVertexTag[v]; } │ │ │ │ │ +208 │ │ │ │ │ +209 SparseTag & getParentFaceSparseTag( _I_n_d_e_x f) { return _parentFaceTag[f]; } │ │ │ │ │ +210 SparseTag & getParentEdgeSparseTag( _I_n_d_e_x e) { return _parentEdgeTag[e]; } │ │ │ │ │ +211 SparseTag & getParentVertexSparseTag(_I_n_d_e_x v) { return _parentVertexTag[v]; │ │ │ │ │ +} │ │ │ │ │ +212 │ │ │ │ │ +213 ChildTag const & getChildFaceTag( _I_n_d_e_x f) const { return _childFaceTag[f]; │ │ │ │ │ +} │ │ │ │ │ +214 ChildTag const & getChildEdgeTag( _I_n_d_e_x e) const { return _childEdgeTag[e]; │ │ │ │ │ +} │ │ │ │ │ +215 ChildTag const & getChildVertexTag(_I_n_d_e_x v) const { return _childVertexTag │ │ │ │ │ +[v]; } │ │ │ │ │ +216 │ │ │ │ │ +217 ChildTag & getChildFaceTag( _I_n_d_e_x f) { return _childFaceTag[f]; } │ │ │ │ │ +218 ChildTag & getChildEdgeTag( _I_n_d_e_x e) { return _childEdgeTag[e]; } │ │ │ │ │ +219 ChildTag & getChildVertexTag(_I_n_d_e_x v) { return _childVertexTag[v]; } │ │ │ │ │ +220 │ │ │ │ │ +221// Remaining methods should really be protected -- for use by subclasses... │ │ │ │ │ +222public: │ │ │ │ │ +223 // │ │ │ │ │ +224 // Methods involved in constructing the parent-to-child mapping -- when the │ │ │ │ │ +225 // refinement is sparse, additional methods are needed to identify the │ │ │ │ │ +selection: │ │ │ │ │ +226 // │ │ │ │ │ +227 void populateParentToChildMapping(); │ │ │ │ │ +228 void populateParentChildIndices(); │ │ │ │ │ +229 void printParentToChildMapping() const; │ │ │ │ │ +230 │ │ │ │ │ +231 virtual void allocateParentChildIndices() = 0; │ │ │ │ │ +232 │ │ │ │ │ +233 // Supporting method for sparse refinement: │ │ │ │ │ +234 void initializeSparseSelectionTags(); │ │ │ │ │ +235 void markSparseChildComponentIndices(); │ │ │ │ │ +236 void markSparseVertexChildren(); │ │ │ │ │ +237 void markSparseEdgeChildren(); │ │ │ │ │ +238 │ │ │ │ │ +239 virtual void markSparseFaceChildren() = 0; │ │ │ │ │ +240 │ │ │ │ │ +241 void initializeChildComponentCounts(); │ │ │ │ │ +242 │ │ │ │ │ +243 // │ │ │ │ │ +244 // Methods involved in constructing the child-to-parent mapping: │ │ │ │ │ +245 // │ │ │ │ │ +246 void populateChildToParentMapping(); │ │ │ │ │ +247 │ │ │ │ │ +248 void populateFaceParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ +249 void populateFaceParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ +[4]); │ │ │ │ │ +250 │ │ │ │ │ +251 void populateEdgeParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ +252 void populateEdgeParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ +[4]); │ │ │ │ │ +253 void populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2] │ │ │ │ │ +[4]); │ │ │ │ │ +254 │ │ │ │ │ +255 void populateVertexParentVectors(ChildTag const initialChildTags[2][4]); │ │ │ │ │ +256 void populateVertexParentFromParentFaces(ChildTag const initialChildTags[2] │ │ │ │ │ +[4]); │ │ │ │ │ +257 void populateVertexParentFromParentEdges(ChildTag const initialChildTags[2] │ │ │ │ │ +[4]); │ │ │ │ │ +258 void populateVertexParentFromParentVertices(ChildTag const initialChildTags │ │ │ │ │ +[2][4]); │ │ │ │ │ +259 │ │ │ │ │ +260 // │ │ │ │ │ +261 // Methods involved in propagating component tags from parent to child: │ │ │ │ │ +262 // │ │ │ │ │ +263 void propagateComponentTags(); │ │ │ │ │ +264 │ │ │ │ │ +265 void populateFaceTagVectors(); │ │ │ │ │ +266 void populateFaceTagsFromParentFaces(); │ │ │ │ │ +267 │ │ │ │ │ +268 void populateEdgeTagVectors(); │ │ │ │ │ +269 void populateEdgeTagsFromParentFaces(); │ │ │ │ │ +270 void populateEdgeTagsFromParentEdges(); │ │ │ │ │ +271 │ │ │ │ │ +272 void populateVertexTagVectors(); │ │ │ │ │ +273 void populateVertexTagsFromParentFaces(); │ │ │ │ │ +274 void populateVertexTagsFromParentEdges(); │ │ │ │ │ +275 void populateVertexTagsFromParentVertices(); │ │ │ │ │ +276 │ │ │ │ │ +277 // │ │ │ │ │ +278 // Methods (and types) involved in subdividing the topology -- though not │ │ │ │ │ +279 // fully exploited, any subset of the 6 relations can be generated: │ │ │ │ │ +280 // │ │ │ │ │ +281 struct Relations { │ │ │ │ │ +282 unsigned int _faceVertices : 1; │ │ │ │ │ +283 unsigned int _faceEdges : 1; │ │ │ │ │ +284 unsigned int _edgeVertices : 1; │ │ │ │ │ +285 unsigned int _edgeFaces : 1; │ │ │ │ │ +286 unsigned int _vertexFaces : 1; │ │ │ │ │ +287 unsigned int _vertexEdges : 1; │ │ │ │ │ +288 │ │ │ │ │ +289 void setAll(bool enable) { │ │ │ │ │ +290 _faceVertices = enable; │ │ │ │ │ +291 _faceEdges = enable; │ │ │ │ │ +292 _edgeVertices = enable; │ │ │ │ │ +293 _edgeFaces = enable; │ │ │ │ │ +294 _vertexFaces = enable; │ │ │ │ │ +295 _vertexEdges = enable; │ │ │ │ │ +296 } │ │ │ │ │ +297 }; │ │ │ │ │ +298 │ │ │ │ │ +299 void subdivideTopology(Relations const& relationsToSubdivide); │ │ │ │ │ +300 │ │ │ │ │ +301 virtual void populateFaceVertexRelation() = 0; │ │ │ │ │ +302 virtual void populateFaceEdgeRelation() = 0; │ │ │ │ │ +303 virtual void populateEdgeVertexRelation() = 0; │ │ │ │ │ +304 virtual void populateEdgeFaceRelation() = 0; │ │ │ │ │ +305 virtual void populateVertexFaceRelation() = 0; │ │ │ │ │ +306 virtual void populateVertexEdgeRelation() = 0; │ │ │ │ │ +307 │ │ │ │ │ +308 // │ │ │ │ │ +309 // Methods involved in subdividing and inspecting sharpness values: │ │ │ │ │ +310 // │ │ │ │ │ +311 void subdivideSharpnessValues(); │ │ │ │ │ +312 │ │ │ │ │ +313 void subdivideVertexSharpness(); │ │ │ │ │ +314 void subdivideEdgeSharpness(); │ │ │ │ │ +315 void reclassifySemisharpVertices(); │ │ │ │ │ +316 │ │ │ │ │ +317 // │ │ │ │ │ +318 // Methods involved in subdividing face-varying topology: │ │ │ │ │ +319 // │ │ │ │ │ +320 void subdivideFVarChannels(); │ │ │ │ │ +321 │ │ │ │ │ +322protected: │ │ │ │ │ +323 // A debug method of Level prints a Refinement (should really change this) │ │ │ │ │ +324 friend void Level::print(const Refinement *) const; │ │ │ │ │ +325 │ │ │ │ │ +326 // │ │ │ │ │ +327 // Data members -- the logical grouping of some of these (and methods that │ │ │ │ │ +make use │ │ │ │ │ +328 // of them) may lead to grouping them into a few utility classes or │ │ │ │ │ +structs... │ │ │ │ │ +329 // │ │ │ │ │ +330 │ │ │ │ │ +331 // Defined on construction: │ │ │ │ │ +332 Level const * _parent; │ │ │ │ │ +333 Level * _child; │ │ │ │ │ +334 Sdc::Options _options; │ │ │ │ │ +335 │ │ │ │ │ +336 // Defined by the subclass: │ │ │ │ │ +337 _S_d_c_:_:_S_p_l_i_t _splitType; │ │ │ │ │ +338 int _regFaceSize; │ │ │ │ │ +339 │ │ │ │ │ +340 // Determined by the refinement options: │ │ │ │ │ +341 bool _uniform; │ │ │ │ │ +342 bool _faceVertsFirst; │ │ │ │ │ +343 │ │ │ │ │ +344 // │ │ │ │ │ +345 // Inventory and ordering of the types of child components: │ │ │ │ │ +346 // │ │ │ │ │ +347 int _childFaceFromFaceCount; // arguably redundant (all faces originate │ │ │ │ │ +from faces) │ │ │ │ │ +348 int _childEdgeFromFaceCount; │ │ │ │ │ +349 int _childEdgeFromEdgeCount; │ │ │ │ │ +350 int _childVertFromFaceCount; │ │ │ │ │ +351 int _childVertFromEdgeCount; │ │ │ │ │ +352 int _childVertFromVertCount; │ │ │ │ │ +353 │ │ │ │ │ +354 int _firstChildFaceFromFace; // arguably redundant (all faces originate │ │ │ │ │ +from faces) │ │ │ │ │ +355 int _firstChildEdgeFromFace; │ │ │ │ │ +356 int _firstChildEdgeFromEdge; │ │ │ │ │ +357 int _firstChildVertFromFace; │ │ │ │ │ +358 int _firstChildVertFromEdge; │ │ │ │ │ +359 int _firstChildVertFromVert; │ │ │ │ │ +360 │ │ │ │ │ +361 // │ │ │ │ │ +362 // The parent-to-child mapping: │ │ │ │ │ +363 // These are vectors sized according to the number of parent components │ │ │ │ │ +(and │ │ │ │ │ +364 // their topology) that contain references/indices to the child components │ │ │ │ │ +that │ │ │ │ │ +365 // result from them by refinement. When refinement is sparse, parent │ │ │ │ │ +components │ │ │ │ │ +366 // that have not spawned all child components will have their missing │ │ │ │ │ +children │ │ │ │ │ +367 // marked as invalid. │ │ │ │ │ +368 // │ │ │ │ │ +369 // NOTE the "Array" members here. Often vectors within the Level can be │ │ │ │ │ +shared │ │ │ │ │ +370 // with the Refinement, and an Array instance is used to do so. If not │ │ │ │ │ +shared │ │ │ │ │ +371 // the subclass just initializes the Array members after allocating its own │ │ │ │ │ +local │ │ │ │ │ +372 // vector members. │ │ │ │ │ +373 // │ │ │ │ │ +374 _I_n_d_e_x_A_r_r_a_y _faceChildFaceCountsAndOffsets; │ │ │ │ │ +375 _I_n_d_e_x_A_r_r_a_y _faceChildEdgeCountsAndOffsets; │ │ │ │ │ +376 │ │ │ │ │ +377 _I_n_d_e_x_V_e_c_t_o_r _faceChildFaceIndices; // *cannot* always use face-vert counts/ │ │ │ │ │ +offsets │ │ │ │ │ +378 _I_n_d_e_x_V_e_c_t_o_r _faceChildEdgeIndices; // can use face-vert counts/offsets │ │ │ │ │ +379 _I_n_d_e_x_V_e_c_t_o_r _faceChildVertIndex; │ │ │ │ │ +380 │ │ │ │ │ +381 _I_n_d_e_x_V_e_c_t_o_r _edgeChildEdgeIndices; // trivial/corresponding pair for each │ │ │ │ │ +382 _I_n_d_e_x_V_e_c_t_o_r _edgeChildVertIndex; │ │ │ │ │ +383 │ │ │ │ │ +384 _I_n_d_e_x_V_e_c_t_o_r _vertChildVertIndex; │ │ │ │ │ +385 │ │ │ │ │ +386 // │ │ │ │ │ +387 // The child-to-parent mapping: │ │ │ │ │ +388 // │ │ │ │ │ +389 _I_n_d_e_x_V_e_c_t_o_r _childFaceParentIndex; │ │ │ │ │ +390 _I_n_d_e_x_V_e_c_t_o_r _childEdgeParentIndex; │ │ │ │ │ +391 _I_n_d_e_x_V_e_c_t_o_r _childVertexParentIndex; │ │ │ │ │ +392 │ │ │ │ │ +393 std::vector _childFaceTag; │ │ │ │ │ +394 std::vector _childEdgeTag; │ │ │ │ │ +395 std::vector _childVertexTag; │ │ │ │ │ +396 │ │ │ │ │ +397 // │ │ │ │ │ +398 // Tags for sparse selection of components: │ │ │ │ │ +399 // │ │ │ │ │ +400 std::vector _parentFaceTag; │ │ │ │ │ +401 std::vector _parentEdgeTag; │ │ │ │ │ +402 std::vector _parentVertexTag; │ │ │ │ │ +403 │ │ │ │ │ +404 // │ │ │ │ │ +405 // Refinement data for face-varying channels present in the Levels being │ │ │ │ │ +refined: │ │ │ │ │ +406 // │ │ │ │ │ +407 std::vector _fvarChannels; │ │ │ │ │ +408}; │ │ │ │ │ +409 │ │ │ │ │ +410inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +411Refinement::getFaceChildFaces(_I_n_d_e_x parentFace) const { │ │ │ │ │ +412 │ │ │ │ │ +413 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceChildFaceIndices │ │ │ │ │ +[_faceChildFaceCountsAndOffsets[2*parentFace+1]], │ │ │ │ │ +414 _faceChildFaceCountsAndOffsets[2*parentFace]); │ │ │ │ │ +415} │ │ │ │ │ +416 │ │ │ │ │ +417inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +418Refinement::getFaceChildFaces(_I_n_d_e_x parentFace) { │ │ │ │ │ +419 │ │ │ │ │ +420 return _I_n_d_e_x_A_r_r_a_y(&_faceChildFaceIndices[_faceChildFaceCountsAndOffsets │ │ │ │ │ +[2*parentFace+1]], │ │ │ │ │ +421 _faceChildFaceCountsAndOffsets[2*parentFace]); │ │ │ │ │ +422} │ │ │ │ │ +423 │ │ │ │ │ +424inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +425Refinement::getFaceChildEdges(_I_n_d_e_x parentFace) const { │ │ │ │ │ +426 │ │ │ │ │ +427 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceChildEdgeIndices │ │ │ │ │ +[_faceChildEdgeCountsAndOffsets[2*parentFace+1]], │ │ │ │ │ +428 _faceChildEdgeCountsAndOffsets[2*parentFace]); │ │ │ │ │ +429} │ │ │ │ │ +430inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +431Refinement::getFaceChildEdges(_I_n_d_e_x parentFace) { │ │ │ │ │ +432 │ │ │ │ │ +433 return _I_n_d_e_x_A_r_r_a_y(&_faceChildEdgeIndices[_faceChildEdgeCountsAndOffsets │ │ │ │ │ +[2*parentFace+1]], │ │ │ │ │ +434 _faceChildEdgeCountsAndOffsets[2*parentFace]); │ │ │ │ │ +435} │ │ │ │ │ +436 │ │ │ │ │ +437inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +438Refinement::getEdgeChildEdges(_I_n_d_e_x parentEdge) const { │ │ │ │ │ +439 │ │ │ │ │ +440 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeChildEdgeIndices[parentEdge*2], 2); │ │ │ │ │ +441} │ │ │ │ │ +442 │ │ │ │ │ +443inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +444Refinement::getEdgeChildEdges(_I_n_d_e_x parentEdge) { │ │ │ │ │ +445 │ │ │ │ │ +446 return _I_n_d_e_x_A_r_r_a_y(&_edgeChildEdgeIndices[parentEdge*2], 2); │ │ │ │ │ +447} │ │ │ │ │ +448 │ │ │ │ │ +449} // end namespace internal │ │ │ │ │ +450} // end namespace Vtr │ │ │ │ │ +451 │ │ │ │ │ +452} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +453using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +454} // end namespace OpenSubdiv │ │ │ │ │ +455 │ │ │ │ │ +456#endif /* OPENSUBDIV3_VTR_REFINEMENT_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_V_e_c_t_o_r │ │ │ │ │ +std::vector< Index > IndexVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +ConstArray< Index > ConstIndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +Array< Index > IndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_p_l_i_t │ │ │ │ │ +Split │ │ │ │ │ +Enumerated type for all face splitting schemes. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00755.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/componentInterfaces.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/level.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,23 +89,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
componentInterfaces.h File Reference
│ │ │ │ +
level.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../sdc/types.h"
│ │ │ │ #include "../sdc/crease.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ #include "../vtr/types.h"
│ │ │ │ -#include "../vtr/stackBuffer.h"
│ │ │ │ +#include <algorithm>
│ │ │ │ #include <vector>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstring>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -115,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,27 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -componentInterfaces.h File Reference │ │ │ │ │ +level.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ #include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ #include "_._._/_s_d_c_/_c_r_e_a_s_e_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ + * _l_e_v_e_l_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/componentInterfaces.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/level.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
componentInterfaces.h
│ │ │ │ +
level.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,155 +118,882 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_LEVEL_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_LEVEL_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │
29#include "../sdc/types.h"
│ │ │ │
30#include "../sdc/crease.h"
│ │ │ │ -
31#include "../vtr/types.h"
│ │ │ │ -
32#include "../vtr/stackBuffer.h"
│ │ │ │ +
31#include "../sdc/options.h"
│ │ │ │ +
32#include "../vtr/types.h"
│ │ │ │
33
│ │ │ │ -
34#include <vector>
│ │ │ │ -
35
│ │ │ │ -
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ +
34#include <algorithm>
│ │ │ │ +
35#include <vector>
│ │ │ │ +
36#include <cassert>
│ │ │ │ +
37#include <cstring>
│ │ │ │ +
38
│ │ │ │
39
│ │ │ │ -
40namespace Vtr {
│ │ │ │ -
41namespace internal {
│ │ │ │ +
40namespace OpenSubdiv {
│ │ │ │ +
41namespace OPENSUBDIV_VERSION {
│ │ │ │
42
│ │ │ │ -
43//
│ │ │ │ -
44// Simple classes supporting the interfaces required of generic topological
│ │ │ │ -
45// types in the Scheme mask queries, e.g. <typename FACE, VERTEX, etc.>
│ │ │ │ -
46//
│ │ │ │ -
47// These are not used with Vtr but arguably belong with it as the details to
│ │ │ │ -
48// write these efficiently depends very much on intimate details of Vtr's
│ │ │ │ -
49// implementation, e.g. the use of tag bits, subdivision Rules, etc.
│ │ │ │ -
50//
│ │ │ │ +
43namespace Vtr {
│ │ │ │ +
44namespace internal {
│ │ │ │ +
45
│ │ │ │ +
46class Refinement;
│ │ │ │ +
47class TriRefinement;
│ │ │ │ +
48class QuadRefinement;
│ │ │ │ +
49class FVarRefinement;
│ │ │ │ +
50class FVarLevel;
│ │ │ │
51
│ │ │ │ -
52
│ │ │ │ -
53//
│ │ │ │ -
54// For <typename FACE>, which provides information in the neighborhood of a face:
│ │ │ │ -
55//
│ │ │ │ -
56class FaceInterface {
│ │ │ │ -
57public:
│ │ │ │ -
58 FaceInterface() { }
│ │ │ │ -
59 FaceInterface(int vertCount) : _vertCount(vertCount) { }
│ │ │ │ -
60 ~FaceInterface() { }
│ │ │ │ -
61
│ │ │ │ -
62public: // Generic interface expected of <typename FACE>:
│ │ │ │ -
63 int GetNumVertices() const { return _vertCount; }
│ │ │ │ -
64
│ │ │ │ -
65private:
│ │ │ │ -
66 int _vertCount;
│ │ │ │ -
67};
│ │ │ │ -
68
│ │ │ │ -
69
│ │ │ │ -
70//
│ │ │ │ -
71// For <typename EDGE>, which provides information in the neighborhood of an edge:
│ │ │ │ -
72//
│ │ │ │ -
73class EdgeInterface {
│ │ │ │ -
74public:
│ │ │ │ -
75 EdgeInterface() { }
│ │ │ │ -
76 EdgeInterface(Level const& level) : _level(&level) { }
│ │ │ │ -
77 ~EdgeInterface() { }
│ │ │ │ -
78
│ │ │ │ -
79 void SetIndex(int edgeIndex) { _eIndex = edgeIndex; }
│ │ │ │ -
80
│ │ │ │ -
81public: // Generic interface expected of <typename EDGE>:
│ │ │ │ -
82 int GetNumFaces() const { return _level->getEdgeFaces(_eIndex).size(); }
│ │ │ │ -
83 float GetSharpness() const { return _level->getEdgeSharpness(_eIndex); }
│ │ │ │ +
52//
│ │ │ │ +
53// Level:
│ │ │ │ +
54// A refinement level includes a vectorized representation of the topology
│ │ │ │ +
55// for a particular subdivision level. The topology is "complete" in that any
│ │ │ │ +
56// level can be used as the base level of another subdivision hierarchy and can
│ │ │ │ +
57// be considered a complete mesh independent of its ancestors. It currently
│ │ │ │ +
58// does contain a "depth" member -- as some inferences can then be made about
│ │ │ │ +
59// the topology (i.e. all quads or all tris if not level 0).
│ │ │ │ +
60//
│ │ │ │ +
61// This class is intended for private use within the library. There are still
│ │ │ │ +
62// opportunities to specialize levels -- e.g. those supporting N-sided faces vs
│ │ │ │ +
63// those that are purely quads or tris -- so we prefer to insulate it from public
│ │ │ │ +
64// access.
│ │ │ │ +
65//
│ │ │ │ +
66// The representation of topology here is to store six topological relationships
│ │ │ │ +
67// in tables of integers. Each is stored in its own array(s) so the result is
│ │ │ │ +
68// a SOA representation of the topology. The six relations are:
│ │ │ │ +
69//
│ │ │ │ +
70// - face-verts: vertices incident/comprising a face
│ │ │ │ +
71// - face-edges: edges incident a face
│ │ │ │ +
72// - edge-verts: vertices incident/comprising an edge
│ │ │ │ +
73// - edge-faces: faces incident an edge
│ │ │ │ +
74// - vert-faces: faces incident a vertex
│ │ │ │ +
75// - vert-edges: edges incident a vertex
│ │ │ │ +
76//
│ │ │ │ +
77// There is some redundancy here but the intent is not that this be a minimal
│ │ │ │ +
78// representation, the intent is that it be amenable to refinement. Classes in
│ │ │ │ +
79// the Far layer essentially store 5 of these 6 in a permuted form -- we add
│ │ │ │ +
80// the face-edges here to simplify refinement.
│ │ │ │ +
81//
│ │ │ │ +
82
│ │ │ │ +
83class Level {
│ │ │ │
84
│ │ │ │ -
85 void GetChildSharpnesses(Sdc::Crease const&, float s[2]) const {
│ │ │ │ -
86 // Need to use the Refinement here to identify the two child edges:
│ │ │ │ -
87 s[0] = s[1] = GetSharpness() - 1.0f;
│ │ │ │ -
88 }
│ │ │ │ -
89
│ │ │ │ -
90 void GetNumVerticesPerFace(int vertsPerFace[]) const {
│ │ │ │ -
91 ConstIndexArray eFaces = _level->getEdgeFaces(_eIndex);
│ │ │ │ -
92 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ -
93 vertsPerFace[i] = _level->getFaceVertices(eFaces[i]).size();
│ │ │ │ -
94 }
│ │ │ │ -
95 }
│ │ │ │ -
96
│ │ │ │ -
97private:
│ │ │ │ -
98 const Level* _level;
│ │ │ │ +
85public:
│ │ │ │ +
86 //
│ │ │ │ +
87 // Simple nested types to hold the tags for each component type -- some of
│ │ │ │ +
88 // which are user-specified features (e.g. whether a face is a hole or not)
│ │ │ │ +
89 // while others indicate the topological nature of the component, how it
│ │ │ │ +
90 // is affected by creasing in its neighborhood, etc.
│ │ │ │ +
91 //
│ │ │ │ +
92 // Most of these properties are passed down to child components during
│ │ │ │ +
93 // refinement, but some -- notably the designation of a component as semi-
│ │ │ │ +
94 // sharp -- require re-determination as sharpness values are reduced at each
│ │ │ │ +
95 // level.
│ │ │ │ +
96 //
│ │ │ │ +
97 struct VTag {
│ │ │ │ +
98 VTag() { }
│ │ │ │
99
│ │ │ │ -
100 int _eIndex;
│ │ │ │ -
101};
│ │ │ │ -
102
│ │ │ │ -
103
│ │ │ │ -
104//
│ │ │ │ -
105// For <typename VERTEX>, which provides information in the neighborhood of a vertex:
│ │ │ │ -
106//
│ │ │ │ -
107class VertexInterface {
│ │ │ │ -
108public:
│ │ │ │ -
109 VertexInterface() { }
│ │ │ │ -
110 VertexInterface(Level const& parent, Level const& child) : _parent(&parent), _child(&child) { }
│ │ │ │ -
111 ~VertexInterface() { }
│ │ │ │ -
112
│ │ │ │ -
113 void SetIndex(int parentIndex, int childIndex) {
│ │ │ │ -
114 _pIndex = parentIndex;
│ │ │ │ -
115 _cIndex = childIndex;
│ │ │ │ -
116 _eCount = _parent->getVertexEdges(_pIndex).size();
│ │ │ │ -
117 _fCount = _parent->getVertexFaces(_pIndex).size();
│ │ │ │ -
118 }
│ │ │ │ -
119
│ │ │ │ -
120public: // Generic interface expected of <typename VERT>:
│ │ │ │ -
121 int GetNumEdges() const { return _eCount; }
│ │ │ │ -
122 int GetNumFaces() const { return _fCount; }
│ │ │ │ -
123
│ │ │ │ -
124 float GetSharpness() const { return _parent->getVertexSharpness(_pIndex); }
│ │ │ │ -
125 float* GetSharpnessPerEdge(float pSharpness[]) const {
│ │ │ │ -
126 ConstIndexArray pEdges = _parent->getVertexEdges(_pIndex);
│ │ │ │ -
127 for (int i = 0; i < _eCount; ++i) {
│ │ │ │ -
128 pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
│ │ │ │ -
129 }
│ │ │ │ -
130 return pSharpness;
│ │ │ │ -
131 }
│ │ │ │ -
132
│ │ │ │ -
133 float GetChildSharpness(Sdc::Crease const&) const { return _child->getVertexSharpness(_cIndex); }
│ │ │ │ -
134 float* GetChildSharpnessPerEdge(Sdc::Crease const& crease, float cSharpness[]) const {
│ │ │ │ -
135 internal::StackBuffer<float,16> pSharpness(_eCount);
│ │ │ │ -
136 GetSharpnessPerEdge(pSharpness);
│ │ │ │ -
137 crease.SubdivideEdgeSharpnessesAroundVertex(_eCount, pSharpness, cSharpness);
│ │ │ │ -
138 return cSharpness;
│ │ │ │ -
139 }
│ │ │ │ -
140
│ │ │ │ -
141private:
│ │ │ │ -
142 const Level* _parent;
│ │ │ │ -
143 const Level* _child;
│ │ │ │ -
144
│ │ │ │ -
145 int _pIndex;
│ │ │ │ -
146 int _cIndex;
│ │ │ │ -
147 int _eCount;
│ │ │ │ -
148 int _fCount;
│ │ │ │ -
149};
│ │ │ │ -
150
│ │ │ │ -
151} // end namespace internal
│ │ │ │ -
152} // end namespace Vtr
│ │ │ │ -
153
│ │ │ │ -
154} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
155using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
156} // end namespace OpenSubdiv
│ │ │ │ -
157
│ │ │ │ -
158#endif /* OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H */
│ │ │ │ - │ │ │ │ +
100 // When cleared, the VTag ALMOST represents a smooth, regular, interior
│ │ │ │ +
101 // vertex -- the Type enum requires a bit be explicitly set for Smooth,
│ │ │ │ +
102 // so that must be done explicitly if desired on initialization.
│ │ │ │ +
103 void clear() { std::memset((void*) this, 0, sizeof(VTag)); }
│ │ │ │ +
104
│ │ │ │ +
105 typedef unsigned short VTagSize;
│ │ │ │ +
106
│ │ │ │ +
107 VTagSize _nonManifold : 1; // fixed
│ │ │ │ +
108 VTagSize _xordinary : 1; // fixed
│ │ │ │ +
109 VTagSize _boundary : 1; // fixed
│ │ │ │ +
110 VTagSize _corner : 1; // fixed
│ │ │ │ +
111 VTagSize _infSharp : 1; // fixed
│ │ │ │ +
112 VTagSize _semiSharp : 1; // variable
│ │ │ │ +
113 VTagSize _semiSharpEdges : 1; // variable
│ │ │ │ +
114 VTagSize _rule : 4; // variable when _semiSharp
│ │ │ │ +
115
│ │ │ │ +
116 // These next to tags are complementary -- the "incomplete" tag is only
│ │ │ │ +
117 // relevant for refined levels while the "incident an irregular face" tag
│ │ │ │ +
118 // is only relevant for the base level. They could be combined as both
│ │ │ │ +
119 // indicate "no full regular ring" around a vertex
│ │ │ │ +
120 VTagSize _incomplete : 1; // variable only set in refined levels
│ │ │ │ +
121 VTagSize _incidIrregFace : 1; // variable only set in base level
│ │ │ │ +
122
│ │ │ │ +
123 // Tags indicating incident infinitely-sharp (permanent) features
│ │ │ │ +
124 VTagSize _infSharpEdges : 1; // fixed
│ │ │ │ +
125 VTagSize _infSharpCrease : 1; // fixed
│ │ │ │ +
126 VTagSize _infIrregular : 1; // fixed
│ │ │ │ +
127
│ │ │ │ +
128 // Alternate constructor and accessor for dealing with integer bits directly:
│ │ │ │ +
129 explicit VTag(VTagSize bits) {
│ │ │ │ +
130 std::memcpy(this, &bits, sizeof(bits));
│ │ │ │ +
131 }
│ │ │ │ +
132 VTagSize getBits() const {
│ │ │ │ +
133 VTagSize bits;
│ │ │ │ +
134 std::memcpy(&bits, this, sizeof(bits));
│ │ │ │ +
135 return bits;
│ │ │ │ +
136 }
│ │ │ │ +
137
│ │ │ │ +
138 static VTag BitwiseOr(VTag const vTags[], int size = 4);
│ │ │ │ +
139 };
│ │ │ │ +
140 struct ETag {
│ │ │ │ +
141 ETag() { }
│ │ │ │ +
142
│ │ │ │ +
143 // When cleared, the ETag represents a smooth, manifold, interior edge
│ │ │ │ +
144 void clear() { std::memset((void*) this, 0, sizeof(ETag)); }
│ │ │ │ +
145
│ │ │ │ +
146 typedef unsigned char ETagSize;
│ │ │ │ +
147
│ │ │ │ +
148 ETagSize _nonManifold : 1; // fixed
│ │ │ │ +
149 ETagSize _boundary : 1; // fixed
│ │ │ │ +
150 ETagSize _infSharp : 1; // fixed
│ │ │ │ +
151 ETagSize _semiSharp : 1; // variable
│ │ │ │ +
152
│ │ │ │ +
153 // Alternate constructor and accessor for dealing with integer bits directly:
│ │ │ │ +
154 explicit ETag(ETagSize bits) {
│ │ │ │ +
155 std::memcpy(this, &bits, sizeof(bits));
│ │ │ │ +
156 }
│ │ │ │ +
157 ETagSize getBits() const {
│ │ │ │ +
158 ETagSize bits;
│ │ │ │ +
159 std::memcpy(&bits, this, sizeof(bits));
│ │ │ │ +
160 return bits;
│ │ │ │ +
161 }
│ │ │ │ +
162
│ │ │ │ +
163 static ETag BitwiseOr(ETag const eTags[], int size = 4);
│ │ │ │ +
164 };
│ │ │ │ +
165 struct FTag {
│ │ │ │ +
166 FTag() { }
│ │ │ │ +
167
│ │ │ │ +
168 void clear() { std::memset((void*) this, 0, sizeof(FTag)); }
│ │ │ │ +
169
│ │ │ │ +
170 typedef unsigned char FTagSize;
│ │ │ │ +
171
│ │ │ │ +
172 FTagSize _hole : 1; // fixed
│ │ │ │ +
173
│ │ │ │ +
174 // On deck -- coming soon...
│ │ │ │ +
175 //FTagSize _hasEdits : 1; // variable
│ │ │ │ +
176 };
│ │ │ │ +
177
│ │ │ │ +
178 // Additional simple struct to identify a "span" around a vertex, i.e. a
│ │ │ │ +
179 // subset of the faces around a vertex delimited by some property (e.g. a
│ │ │ │ +
180 // face-varying discontinuity, an inf-sharp edge, etc.)
│ │ │ │ +
181 //
│ │ │ │ +
182 // The span requires an "origin" and a "size" to fully define its extent.
│ │ │ │ +
183 // Use of the size is required over a leading/trailing pair as the valence
│ │ │ │ +
184 // around a non-manifold vertex cannot be trivially determined from two
│ │ │ │ +
185 // extremeties. Similarly a start face is chosen over an edge as starting
│ │ │ │ +
186 // with a manifold edge is ambiguous. Additional tags also support
│ │ │ │ +
187 // non-manifold cases, e.g. periodic spans at the apex of a double cone.
│ │ │ │ +
188 //
│ │ │ │ +
189 // Currently setting the size to 0 or leaving the span "unassigned" is an
│ │ │ │ +
190 // indication to use the full neighborhood rather than a subset -- prefer
│ │ │ │ +
191 // use of the const method here to direct inspection of the member.
│ │ │ │ +
192 //
│ │ │ │ +
193 struct VSpan {
│ │ │ │ +
194 VSpan() { std::memset((void*) this, 0, sizeof(VSpan)); }
│ │ │ │ +
195
│ │ │ │ +
196 void clear() { std::memset((void*) this, 0, sizeof(VSpan)); }
│ │ │ │ +
197 bool isAssigned() const { return _numFaces > 0; }
│ │ │ │ +
198
│ │ │ │ +
199 LocalIndex _numFaces;
│ │ │ │ +
200 LocalIndex _startFace;
│ │ │ │ +
201 LocalIndex _cornerInSpan;
│ │ │ │ +
202
│ │ │ │ +
203 unsigned short _periodic : 1;
│ │ │ │ +
204 unsigned short _sharp : 1;
│ │ │ │ +
205 };
│ │ │ │ +
206
│ │ │ │ +
207public:
│ │ │ │ +
208 Level();
│ │ │ │ +
209 ~Level();
│ │ │ │ +
210
│ │ │ │ +
211 // Simple accessors:
│ │ │ │ +
212 int getDepth() const { return _depth; }
│ │ │ │ +
213
│ │ │ │ +
214 int getNumVertices() const { return _vertCount; }
│ │ │ │ +
215 int getNumFaces() const { return _faceCount; }
│ │ │ │ +
216 int getNumEdges() const { return _edgeCount; }
│ │ │ │ +
217
│ │ │ │ +
218 // More global sizes may prove useful...
│ │ │ │ +
219 int getNumFaceVerticesTotal() const { return (int) _faceVertIndices.size(); }
│ │ │ │ +
220 int getNumFaceEdgesTotal() const { return (int) _faceEdgeIndices.size(); }
│ │ │ │ +
221 int getNumEdgeVerticesTotal() const { return (int) _edgeVertIndices.size(); }
│ │ │ │ +
222 int getNumEdgeFacesTotal() const { return (int) _edgeFaceIndices.size(); }
│ │ │ │ +
223 int getNumVertexFacesTotal() const { return (int) _vertFaceIndices.size(); }
│ │ │ │ +
224 int getNumVertexEdgesTotal() const { return (int) _vertEdgeIndices.size(); }
│ │ │ │ +
225
│ │ │ │ +
226 int getMaxValence() const { return _maxValence; }
│ │ │ │ +
227 int getMaxEdgeFaces() const { return _maxEdgeFaces; }
│ │ │ │ +
228
│ │ │ │ +
229 // Methods to access the relation tables/indices -- note that for some relations
│ │ │ │ +
230 // (i.e. those where a component is "contained by" a neighbor, or more generally
│ │ │ │ +
231 // when the neighbor is a simplex of higher dimension) we store an additional
│ │ │ │ +
232 // "local index", e.g. for the case of vert-faces if one of the faces F[i] is
│ │ │ │ +
233 // incident a vertex V, then L[i] is the "local index" in F[i] of vertex V.
│ │ │ │ +
234 // Once have only quads (or tris), this local index need only occupy two bits
│ │ │ │ +
235 // and could conceivably be packed into the same integer as the face index, but
│ │ │ │ +
236 // for now, given the need to support faces of potentially high valence we'll
│ │ │ │ +
237 // use an 8- or 16-bit integer.
│ │ │ │ +
238 //
│ │ │ │ +
239 // Methods to access the six topological relations:
│ │ │ │ +
240 ConstIndexArray getFaceVertices(Index faceIndex) const;
│ │ │ │ +
241 ConstIndexArray getFaceEdges(Index faceIndex) const;
│ │ │ │ +
242 ConstIndexArray getEdgeVertices(Index edgeIndex) const;
│ │ │ │ +
243 ConstIndexArray getEdgeFaces(Index edgeIndex) const;
│ │ │ │ +
244 ConstIndexArray getVertexFaces(Index vertIndex) const;
│ │ │ │ +
245 ConstIndexArray getVertexEdges(Index vertIndex) const;
│ │ │ │ +
246
│ │ │ │ +
247 ConstLocalIndexArray getEdgeFaceLocalIndices(Index edgeIndex) const;
│ │ │ │ +
248 ConstLocalIndexArray getVertexFaceLocalIndices(Index vertIndex) const;
│ │ │ │ +
249 ConstLocalIndexArray getVertexEdgeLocalIndices(Index vertIndex) const;
│ │ │ │ +
250
│ │ │ │ +
251 // Replace these with access to sharpness buffers/arrays rather than elements:
│ │ │ │ +
252 float getEdgeSharpness(Index edgeIndex) const;
│ │ │ │ +
253 float getVertexSharpness(Index vertIndex) const;
│ │ │ │ +
254 Sdc::Crease::Rule getVertexRule(Index vertIndex) const;
│ │ │ │ +
255
│ │ │ │ +
256 Index findEdge(Index v0Index, Index v1Index) const;
│ │ │ │ +
257
│ │ │ │ +
258 // Holes
│ │ │ │ +
259 void setFaceHole(Index faceIndex, bool b);
│ │ │ │ +
260 bool isFaceHole(Index faceIndex) const;
│ │ │ │ +
261
│ │ │ │ +
262 // Face-varying
│ │ │ │ +
263 Sdc::Options getFVarOptions(int channel) const;
│ │ │ │ +
264 int getNumFVarChannels() const { return (int) _fvarChannels.size(); }
│ │ │ │ +
265 int getNumFVarValues(int channel) const;
│ │ │ │ +
266 ConstIndexArray getFaceFVarValues(Index faceIndex, int channel) const;
│ │ │ │ +
267
│ │ │ │ +
268 FVarLevel & getFVarLevel(int channel) { return *_fvarChannels[channel]; }
│ │ │ │ +
269 FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels[channel]; }
│ │ │ │ +
270
│ │ │ │ +
271 // Manifold/non-manifold tags:
│ │ │ │ +
272 void setEdgeNonManifold(Index edgeIndex, bool b);
│ │ │ │ +
273 bool isEdgeNonManifold(Index edgeIndex) const;
│ │ │ │ +
274
│ │ │ │ +
275 void setVertexNonManifold(Index vertIndex, bool b);
│ │ │ │ +
276 bool isVertexNonManifold(Index vertIndex) const;
│ │ │ │ +
277
│ │ │ │ +
278 // General access to all component tags:
│ │ │ │ +
279 VTag const & getVertexTag(Index vertIndex) const { return _vertTags[vertIndex]; }
│ │ │ │ +
280 ETag const & getEdgeTag(Index edgeIndex) const { return _edgeTags[edgeIndex]; }
│ │ │ │ +
281 FTag const & getFaceTag(Index faceIndex) const { return _faceTags[faceIndex]; }
│ │ │ │ +
282
│ │ │ │ +
283 VTag & getVertexTag(Index vertIndex) { return _vertTags[vertIndex]; }
│ │ │ │ +
284 ETag & getEdgeTag(Index edgeIndex) { return _edgeTags[edgeIndex]; }
│ │ │ │ +
285 FTag & getFaceTag(Index faceIndex) { return _faceTags[faceIndex]; }
│ │ │ │ +
286
│ │ │ │ +
287public:
│ │ │ │ +
288
│ │ │ │ +
289 // Debugging aides:
│ │ │ │ +
290 enum TopologyError {
│ │ │ │ +
291 TOPOLOGY_MISSING_EDGE_FACES=0,
│ │ │ │ +
292 TOPOLOGY_MISSING_EDGE_VERTS,
│ │ │ │ +
293 TOPOLOGY_MISSING_FACE_EDGES,
│ │ │ │ +
294 TOPOLOGY_MISSING_FACE_VERTS,
│ │ │ │ +
295 TOPOLOGY_MISSING_VERT_FACES,
│ │ │ │ +
296 TOPOLOGY_MISSING_VERT_EDGES,
│ │ │ │ +
297
│ │ │ │ +
298 TOPOLOGY_FAILED_CORRELATION_EDGE_FACE,
│ │ │ │ +
299 TOPOLOGY_FAILED_CORRELATION_FACE_VERT,
│ │ │ │ +
300 TOPOLOGY_FAILED_CORRELATION_FACE_EDGE,
│ │ │ │ +
301
│ │ │ │ +
302 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE,
│ │ │ │ +
303 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE,
│ │ │ │ +
304 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES,
│ │ │ │ +
305
│ │ │ │ +
306 TOPOLOGY_DEGENERATE_EDGE,
│ │ │ │ +
307 TOPOLOGY_NON_MANIFOLD_EDGE,
│ │ │ │ +
308
│ │ │ │ +
309 TOPOLOGY_INVALID_CREASE_EDGE,
│ │ │ │ +
310 TOPOLOGY_INVALID_CREASE_VERT
│ │ │ │ +
311 };
│ │ │ │ +
312
│ │ │ │ +
313 static char const * getTopologyErrorString(TopologyError errCode);
│ │ │ │ +
314
│ │ │ │ +
315 typedef void (* ValidationCallback)(TopologyError errCode, char const * msg, void const * clientData);
│ │ │ │ +
316
│ │ │ │ +
317 bool validateTopology(ValidationCallback callback=0, void const * clientData=0) const;
│ │ │ │ +
318
│ │ │ │ +
319 void print(const Refinement* parentRefinement = 0) const;
│ │ │ │ +
320
│ │ │ │ +
321public:
│ │ │ │ +
322 // High-level topology queries -- these may be moved elsewhere:
│ │ │ │ +
323
│ │ │ │ +
324 bool isSingleCreasePatch(Index face, float* sharpnessOut=NULL, int* rotationOut=NULL) const;
│ │ │ │ +
325
│ │ │ │ +
326 //
│ │ │ │ +
327 // When inspecting topology, the component tags -- particularly VTag and ETag -- are most
│ │ │ │ +
328 // often inspected in groups for the face to which they belong. They are designed to be
│ │ │ │ +
329 // bitwise OR'd (the result then referred to as a "composite" tag) to make quick decisions
│ │ │ │ +
330 // about the face as a whole to avoid tedious topological inspection.
│ │ │ │ +
331 //
│ │ │ │ +
332 // The same logic can be applied to topology in a FVar channel when tags specific to that
│ │ │ │ +
333 // channel are used. Note that the VTags apply to the FVar values assigned to the corners
│ │ │ │ +
334 // of the face and not the vertex as a whole. The "composite" face-varying VTag for a
│ │ │ │ +
335 // vertex is the union of VTags of all distinct FVar values for that vertex.
│ │ │ │ +
336 //
│ │ │ │ +
337 bool doesVertexFVarTopologyMatch(Index vIndex, int fvarChannel) const;
│ │ │ │ +
338 bool doesFaceFVarTopologyMatch( Index fIndex, int fvarChannel) const;
│ │ │ │ +
339 bool doesEdgeFVarTopologyMatch( Index eIndex, int fvarChannel) const;
│ │ │ │ +
340
│ │ │ │ +
341 void getFaceVTags(Index fIndex, VTag vTags[], int fvarChannel = -1) const;
│ │ │ │ +
342 void getFaceETags(Index fIndex, ETag eTags[], int fvarChannel = -1) const;
│ │ │ │ +
343
│ │ │ │ +
344 VTag getFaceCompositeVTag(Index fIndex, int fvarChannel = -1) const;
│ │ │ │ +
345 VTag getFaceCompositeVTag(ConstIndexArray & fVerts) const;
│ │ │ │ +
346
│ │ │ │ +
347 VTag getVertexCompositeFVarVTag(Index vIndex, int fvarChannel) const;
│ │ │ │ +
348
│ │ │ │ +
349 //
│ │ │ │ +
350 // When gathering "patch points" we may want the indices of the vertices or the corresponding
│ │ │ │ +
351 // FVar values for a particular channel. Both are represented and equally accessible within
│ │ │ │ +
352 // the faces, so we allow all to be returned through these methods. Setting the optional FVar
│ │ │ │ +
353 // channel to -1 will retrieve indices of vertices instead of FVar values:
│ │ │ │ +
354 //
│ │ │ │ +
355 int gatherQuadLinearPatchPoints(Index fIndex, Index patchPoints[], int rotation = 0,
│ │ │ │ +
356 int fvarChannel = -1) const;
│ │ │ │ +
357
│ │ │ │ +
358 int gatherQuadRegularInteriorPatchPoints(Index fIndex, Index patchPoints[], int rotation = 0,
│ │ │ │ +
359 int fvarChannel = -1) const;
│ │ │ │ +
360 int gatherQuadRegularBoundaryPatchPoints(Index fIndex, Index patchPoints[], int boundaryEdgeInFace,
│ │ │ │ +
361 int fvarChannel = -1) const;
│ │ │ │ +
362 int gatherQuadRegularCornerPatchPoints( Index fIndex, Index patchPoints[], int cornerVertInFace,
│ │ │ │ +
363 int fvarChannel = -1) const;
│ │ │ │ +
364
│ │ │ │ +
365 int gatherQuadRegularRingAroundVertex(Index vIndex, Index ringPoints[],
│ │ │ │ +
366 int fvarChannel = -1) const;
│ │ │ │ +
367 int gatherQuadRegularPartialRingAroundVertex(Index vIndex, VSpan const & span, Index ringPoints[],
│ │ │ │ +
368 int fvarChannel = -1) const;
│ │ │ │ +
369
│ │ │ │ +
370 // WIP -- for future use, need to extend for face-varying...
│ │ │ │ +
371 int gatherTriRegularInteriorPatchPoints( Index fIndex, Index patchVerts[], int rotation = 0) const;
│ │ │ │ +
372 int gatherTriRegularBoundaryVertexPatchPoints(Index fIndex, Index patchVerts[], int boundaryVertInFace) const;
│ │ │ │ +
373 int gatherTriRegularBoundaryEdgePatchPoints( Index fIndex, Index patchVerts[], int boundaryEdgeInFace) const;
│ │ │ │ +
374 int gatherTriRegularCornerVertexPatchPoints( Index fIndex, Index patchVerts[], int cornerVertInFace) const;
│ │ │ │ +
375 int gatherTriRegularCornerEdgePatchPoints( Index fIndex, Index patchVerts[], int cornerEdgeInFace) const;
│ │ │ │ +
376
│ │ │ │ +
377public:
│ │ │ │ +
378 // Sizing methods used to construct a level to populate:
│ │ │ │ +
379 void resizeFaces( int numFaces);
│ │ │ │ +
380 void resizeFaceVertices(int numFaceVertsTotal);
│ │ │ │ +
381 void resizeFaceEdges( int numFaceEdgesTotal);
│ │ │ │ +
382
│ │ │ │ +
383 void resizeEdges( int numEdges);
│ │ │ │ +
384 void resizeEdgeVertices(); // always 2*edgeCount
│ │ │ │ +
385 void resizeEdgeFaces(int numEdgeFacesTotal);
│ │ │ │ +
386
│ │ │ │ +
387 void resizeVertices( int numVertices);
│ │ │ │ +
388 void resizeVertexFaces(int numVertexFacesTotal);
│ │ │ │ +
389 void resizeVertexEdges(int numVertexEdgesTotal);
│ │ │ │ +
390
│ │ │ │ +
391 void setMaxValence(int maxValence);
│ │ │ │ +
392
│ │ │ │ +
393 // Modifiers to populate the relations for each component:
│ │ │ │ +
394 IndexArray getFaceVertices(Index faceIndex);
│ │ │ │ +
395 IndexArray getFaceEdges(Index faceIndex);
│ │ │ │ +
396 IndexArray getEdgeVertices(Index edgeIndex);
│ │ │ │ +
397 IndexArray getEdgeFaces(Index edgeIndex);
│ │ │ │ +
398 IndexArray getVertexFaces(Index vertIndex);
│ │ │ │ +
399 IndexArray getVertexEdges(Index vertIndex);
│ │ │ │ +
400
│ │ │ │ +
401 LocalIndexArray getEdgeFaceLocalIndices(Index edgeIndex);
│ │ │ │ +
402 LocalIndexArray getVertexFaceLocalIndices(Index vertIndex);
│ │ │ │ +
403 LocalIndexArray getVertexEdgeLocalIndices(Index vertIndex);
│ │ │ │ +
404
│ │ │ │ +
405 // Replace these with access to sharpness buffers/arrays rather than elements:
│ │ │ │ +
406 float& getEdgeSharpness(Index edgeIndex);
│ │ │ │ +
407 float& getVertexSharpness(Index vertIndex);
│ │ │ │ +
408
│ │ │ │ +
409 // Create, destroy and populate face-varying channels:
│ │ │ │ +
410 int createFVarChannel(int fvarValueCount, Sdc::Options const& options);
│ │ │ │ +
411 void destroyFVarChannel(int channel);
│ │ │ │ +
412
│ │ │ │ +
413 IndexArray getFaceFVarValues(Index faceIndex, int channel);
│ │ │ │ +
414
│ │ │ │ +
415 void completeFVarChannelTopology(int channel, int regBoundaryValence);
│ │ │ │ +
416
│ │ │ │ +
417 // Counts and offsets for all relation types:
│ │ │ │ +
418 // - these may be unwarranted if we let Refinement access members directly...
│ │ │ │ +
419 int getNumFaceVertices( Index faceIndex) const { return _faceVertCountsAndOffsets[2*faceIndex]; }
│ │ │ │ +
420 int getOffsetOfFaceVertices(Index faceIndex) const { return _faceVertCountsAndOffsets[2*faceIndex + 1]; }
│ │ │ │ +
421
│ │ │ │ +
422 int getNumFaceEdges( Index faceIndex) const { return getNumFaceVertices(faceIndex); }
│ │ │ │ +
423 int getOffsetOfFaceEdges(Index faceIndex) const { return getOffsetOfFaceVertices(faceIndex); }
│ │ │ │ +
424
│ │ │ │ +
425 int getNumEdgeVertices( Index ) const { return 2; }
│ │ │ │ +
426 int getOffsetOfEdgeVertices(Index edgeIndex) const { return 2 * edgeIndex; }
│ │ │ │ +
427
│ │ │ │ +
428 int getNumEdgeFaces( Index edgeIndex) const { return _edgeFaceCountsAndOffsets[2*edgeIndex]; }
│ │ │ │ +
429 int getOffsetOfEdgeFaces(Index edgeIndex) const { return _edgeFaceCountsAndOffsets[2*edgeIndex + 1]; }
│ │ │ │ +
430
│ │ │ │ +
431 int getNumVertexFaces( Index vertIndex) const { return _vertFaceCountsAndOffsets[2*vertIndex]; }
│ │ │ │ +
432 int getOffsetOfVertexFaces(Index vertIndex) const { return _vertFaceCountsAndOffsets[2*vertIndex + 1]; }
│ │ │ │ +
433
│ │ │ │ +
434 int getNumVertexEdges( Index vertIndex) const { return _vertEdgeCountsAndOffsets[2*vertIndex]; }
│ │ │ │ +
435 int getOffsetOfVertexEdges(Index vertIndex) const { return _vertEdgeCountsAndOffsets[2*vertIndex + 1]; }
│ │ │ │ +
436
│ │ │ │ +
437 ConstIndexArray getFaceVertices() const;
│ │ │ │ +
438
│ │ │ │ +
439 //
│ │ │ │ +
440 // Note that for some relations, the size of the relations for a child component
│ │ │ │ +
441 // can vary radically from its parent due to the sparsity of the refinement. So
│ │ │ │ +
442 // in these cases a few additional utilities are provided to help define the set
│ │ │ │ +
443 // of incident components. Assuming adequate memory has been allocated, the
│ │ │ │ +
444 // "resize" methods here initialize the set of incident components by setting
│ │ │ │ +
445 // both the size and the appropriate offset, while "trim" is use to quickly lower
│ │ │ │ +
446 // the size from an upper bound and nothing else.
│ │ │ │ +
447 //
│ │ │ │ +
448 void resizeFaceVertices(Index FaceIndex, int count);
│ │ │ │ +
449
│ │ │ │ +
450 void resizeEdgeFaces(Index edgeIndex, int count);
│ │ │ │ +
451 void trimEdgeFaces( Index edgeIndex, int count);
│ │ │ │ +
452
│ │ │ │ +
453 void resizeVertexFaces(Index vertIndex, int count);
│ │ │ │ +
454 void trimVertexFaces( Index vertIndex, int count);
│ │ │ │ +
455
│ │ │ │ +
456 void resizeVertexEdges(Index vertIndex, int count);
│ │ │ │ +
457 void trimVertexEdges( Index vertIndex, int count);
│ │ │ │ +
458
│ │ │ │ +
459public:
│ │ │ │ +
460 //
│ │ │ │ +
461 // Initial plans were to have a few specific classes properly construct the
│ │ │ │ +
462 // topology from scratch, e.g. the Refinement class and a Factory class for
│ │ │ │ +
463 // the base level, by populating all topological relations. The need to have
│ │ │ │ +
464 // a class construct full topology given only a simple face-vertex list, made
│ │ │ │ +
465 // it necessary to write code to define and orient all relations -- and most
│ │ │ │ +
466 // of that seemed best placed here.
│ │ │ │ +
467 //
│ │ │ │ +
468 bool completeTopologyFromFaceVertices();
│ │ │ │ +
469 Index findEdge(Index v0, Index v1, ConstIndexArray v0Edges) const;
│ │ │ │ +
470
│ │ │ │ +
471 // Methods supporting the above:
│ │ │ │ +
472 void orientIncidentComponents();
│ │ │ │ +
473 bool orderVertexFacesAndEdges(Index vIndex, Index* vFaces, Index* vEdges) const;
│ │ │ │ +
474 bool orderVertexFacesAndEdges(Index vIndex);
│ │ │ │ +
475 void populateLocalIndices();
│ │ │ │ +
476
│ │ │ │ +
477 IndexArray shareFaceVertCountsAndOffsets() const;
│ │ │ │ +
478
│ │ │ │ +
479private:
│ │ │ │ +
480 // Refinement classes (including all subclasses) build a Level:
│ │ │ │ +
481 friend class Refinement;
│ │ │ │ +
482 friend class TriRefinement;
│ │ │ │ +
483 friend class QuadRefinement;
│ │ │ │ +
484
│ │ │ │ +
485 //
│ │ │ │ +
486 // A Level is independent of subdivision scheme or options. While it may have been
│ │ │ │ +
487 // affected by them in its construction, they are not associated with it -- a Level
│ │ │ │ +
488 // is pure topology and any subdivision parameters are external.
│ │ │ │ +
489 //
│ │ │ │ +
490
│ │ │ │ +
491 // Simple members for inventory, etc.
│ │ │ │ +
492 int _faceCount;
│ │ │ │ +
493 int _edgeCount;
│ │ │ │ +
494 int _vertCount;
│ │ │ │ +
495
│ │ │ │ +
496 // The "depth" member is clearly useful in both the topological splitting and the
│ │ │ │ +
497 // stencil queries, but arguably it ties the Level to a hierarchy which counters
│ │ │ │ +
498 // the idea of it being independent.
│ │ │ │ +
499 int _depth;
│ │ │ │ +
500
│ │ │ │ +
501 // Maxima to help clients manage sizing of data buffers. Given "max valence",
│ │ │ │ +
502 // the "max edge faces" is strictly redundant as it will always be less, but
│ │ │ │ +
503 // since it will typically be so much less (i.e. 2) it is kept for now.
│ │ │ │ +
504 int _maxEdgeFaces;
│ │ │ │ +
505 int _maxValence;
│ │ │ │ +
506
│ │ │ │ +
507 //
│ │ │ │ +
508 // Topology vectors:
│ │ │ │ +
509 // Note that of all of these, only data for the face-edge relation is not
│ │ │ │ +
510 // stored in the osd::FarTables in any form. The FarTable vectors combine
│ │ │ │ +
511 // the edge-vert and edge-face relations. The eventual goal is that this
│ │ │ │ +
512 // data be part of the osd::Far classes and be a superset of the FarTable
│ │ │ │ +
513 // vectors, i.e. no data duplication or conversion. The fact that FarTable
│ │ │ │ +
514 // already stores 5 of the 6 possible relations should make the topology
│ │ │ │ +
515 // storage as a whole a non-issue.
│ │ │ │ +
516 //
│ │ │ │ +
517 // The vert-face-child and vert-edge-child indices are also arguably not
│ │ │ │ +
518 // a topology relation but more one for parent/child relations. But it is
│ │ │ │ +
519 // a topological relationship, and if named differently would not likely
│ │ │ │ +
520 // raise this. It has been named with "child" in the name as it does play
│ │ │ │ +
521 // a more significant role during subdivision in mapping between parent
│ │ │ │ +
522 // and child components, and so has been named to reflect that more clearly.
│ │ │ │ +
523 //
│ │ │ │ +
524
│ │ │ │ +
525 // Per-face:
│ │ │ │ +
526 std::vector<Index> _faceVertCountsAndOffsets; // 2 per face, redundant after level 0
│ │ │ │ +
527 std::vector<Index> _faceVertIndices; // 3 or 4 per face, variable at level 0
│ │ │ │ +
528 std::vector<Index> _faceEdgeIndices; // matches face-vert indices
│ │ │ │ +
529 std::vector<FTag> _faceTags; // 1 per face: includes "hole" tag
│ │ │ │ +
530
│ │ │ │ +
531 // Per-edge:
│ │ │ │ +
532 std::vector<Index> _edgeVertIndices; // 2 per edge
│ │ │ │ +
533 std::vector<Index> _edgeFaceCountsAndOffsets; // 2 per edge
│ │ │ │ +
534 std::vector<Index> _edgeFaceIndices; // varies with faces per edge
│ │ │ │ +
535 std::vector<LocalIndex> _edgeFaceLocalIndices; // varies with faces per edge
│ │ │ │ +
536
│ │ │ │ +
537 std::vector<float> _edgeSharpness; // 1 per edge
│ │ │ │ +
538 std::vector<ETag> _edgeTags; // 1 per edge: manifold, boundary, etc.
│ │ │ │ +
539
│ │ │ │ +
540 // Per-vertex:
│ │ │ │ +
541 std::vector<Index> _vertFaceCountsAndOffsets; // 2 per vertex
│ │ │ │ +
542 std::vector<Index> _vertFaceIndices; // varies with valence
│ │ │ │ +
543 std::vector<LocalIndex> _vertFaceLocalIndices; // varies with valence, 8-bit for now
│ │ │ │ +
544
│ │ │ │ +
545 std::vector<Index> _vertEdgeCountsAndOffsets; // 2 per vertex
│ │ │ │ +
546 std::vector<Index> _vertEdgeIndices; // varies with valence
│ │ │ │ +
547 std::vector<LocalIndex> _vertEdgeLocalIndices; // varies with valence, 8-bit for now
│ │ │ │ +
548
│ │ │ │ +
549 std::vector<float> _vertSharpness; // 1 per vertex
│ │ │ │ +
550 std::vector<VTag> _vertTags; // 1 per vertex: manifold, Sdc::Rule, etc.
│ │ │ │ +
551
│ │ │ │ +
552 // Face-varying channels:
│ │ │ │ +
553 std::vector<FVarLevel*> _fvarChannels;
│ │ │ │ +
554};
│ │ │ │ +
555
│ │ │ │ +
556//
│ │ │ │ +
557// Access/modify the vertices incident a given face:
│ │ │ │ +
558//
│ │ │ │ +
559inline ConstIndexArray
│ │ │ │ +
560Level::getFaceVertices(Index faceIndex) const {
│ │ │ │ +
561 return ConstIndexArray(&_faceVertIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ +
562 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ +
563}
│ │ │ │ +
564inline IndexArray
│ │ │ │ +
565Level::getFaceVertices(Index faceIndex) {
│ │ │ │ +
566 return IndexArray(&_faceVertIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ +
567 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ +
568}
│ │ │ │ +
569
│ │ │ │ +
570inline void
│ │ │ │ +
571Level::resizeFaceVertices(Index faceIndex, int count) {
│ │ │ │ +
572
│ │ │ │ +
573 int* countOffsetPair = &_faceVertCountsAndOffsets[faceIndex*2];
│ │ │ │ +
574
│ │ │ │ +
575 countOffsetPair[0] = count;
│ │ │ │ +
576 countOffsetPair[1] = (faceIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ +
577
│ │ │ │ +
578 _maxValence = std::max(_maxValence, count);
│ │ │ │ +
579}
│ │ │ │ +
580
│ │ │ │ +
581inline ConstIndexArray
│ │ │ │ +
582Level::getFaceVertices() const {
│ │ │ │ +
583 return ConstIndexArray(&_faceVertIndices[0], (int)_faceVertIndices.size());
│ │ │ │ +
584}
│ │ │ │ +
585
│ │ │ │ +
586//
│ │ │ │ +
587// Access/modify the edges incident a given face:
│ │ │ │ +
588//
│ │ │ │ +
589inline ConstIndexArray
│ │ │ │ +
590Level::getFaceEdges(Index faceIndex) const {
│ │ │ │ +
591 return ConstIndexArray(&_faceEdgeIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ +
592 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ +
593}
│ │ │ │ +
594inline IndexArray
│ │ │ │ +
595Level::getFaceEdges(Index faceIndex) {
│ │ │ │ +
596 return IndexArray(&_faceEdgeIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ +
597 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ +
598}
│ │ │ │ +
599
│ │ │ │ +
600//
│ │ │ │ +
601// Access/modify the faces incident a given vertex:
│ │ │ │ +
602//
│ │ │ │ +
603inline ConstIndexArray
│ │ │ │ +
604Level::getVertexFaces(Index vertIndex) const {
│ │ │ │ +
605 return ConstIndexArray( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
606 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
607}
│ │ │ │ +
608inline IndexArray
│ │ │ │ +
609Level::getVertexFaces(Index vertIndex) {
│ │ │ │ +
610 return IndexArray( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
611 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
612}
│ │ │ │ +
613
│ │ │ │ + │ │ │ │ +
615Level::getVertexFaceLocalIndices(Index vertIndex) const {
│ │ │ │ +
616 return ConstLocalIndexArray( (&_vertFaceLocalIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
617 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
618}
│ │ │ │ +
619inline LocalIndexArray
│ │ │ │ +
620Level::getVertexFaceLocalIndices(Index vertIndex) {
│ │ │ │ +
621 return LocalIndexArray( (&_vertFaceLocalIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
622 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
623}
│ │ │ │ +
624
│ │ │ │ +
625inline void
│ │ │ │ +
626Level::resizeVertexFaces(Index vertIndex, int count) {
│ │ │ │ +
627 int* countOffsetPair = &_vertFaceCountsAndOffsets[vertIndex*2];
│ │ │ │ +
628
│ │ │ │ +
629 countOffsetPair[0] = count;
│ │ │ │ +
630 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ +
631}
│ │ │ │ +
632inline void
│ │ │ │ +
633Level::trimVertexFaces(Index vertIndex, int count) {
│ │ │ │ +
634 _vertFaceCountsAndOffsets[vertIndex*2] = count;
│ │ │ │ +
635}
│ │ │ │ +
636
│ │ │ │ +
637//
│ │ │ │ +
638// Access/modify the edges incident a given vertex:
│ │ │ │ +
639//
│ │ │ │ +
640inline ConstIndexArray
│ │ │ │ +
641Level::getVertexEdges(Index vertIndex) const {
│ │ │ │ +
642 return ConstIndexArray( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
643 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
644}
│ │ │ │ +
645inline IndexArray
│ │ │ │ +
646Level::getVertexEdges(Index vertIndex) {
│ │ │ │ +
647 return IndexArray( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
648 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
649}
│ │ │ │ +
650
│ │ │ │ + │ │ │ │ +
652Level::getVertexEdgeLocalIndices(Index vertIndex) const {
│ │ │ │ +
653 return ConstLocalIndexArray( (&_vertEdgeLocalIndices[0]) + _vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
654 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
655}
│ │ │ │ +
656inline LocalIndexArray
│ │ │ │ +
657Level::getVertexEdgeLocalIndices(Index vertIndex) {
│ │ │ │ +
658 return LocalIndexArray( (&_vertEdgeLocalIndices[0]) + _vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ +
659 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ +
660}
│ │ │ │ +
661
│ │ │ │ +
662inline void
│ │ │ │ +
663Level::resizeVertexEdges(Index vertIndex, int count) {
│ │ │ │ +
664 int* countOffsetPair = &_vertEdgeCountsAndOffsets[vertIndex*2];
│ │ │ │ +
665
│ │ │ │ +
666 countOffsetPair[0] = count;
│ │ │ │ +
667 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ +
668
│ │ │ │ +
669 _maxValence = std::max(_maxValence, count);
│ │ │ │ +
670}
│ │ │ │ +
671inline void
│ │ │ │ +
672Level::trimVertexEdges(Index vertIndex, int count) {
│ │ │ │ +
673 _vertEdgeCountsAndOffsets[vertIndex*2] = count;
│ │ │ │ +
674}
│ │ │ │ +
675
│ │ │ │ +
676inline void
│ │ │ │ +
677Level::setMaxValence(int valence) {
│ │ │ │ +
678 _maxValence = valence;
│ │ │ │ +
679}
│ │ │ │ +
680
│ │ │ │ +
681//
│ │ │ │ +
682// Access/modify the vertices incident a given edge:
│ │ │ │ +
683//
│ │ │ │ +
684inline ConstIndexArray
│ │ │ │ +
685Level::getEdgeVertices(Index edgeIndex) const {
│ │ │ │ +
686 return ConstIndexArray(&_edgeVertIndices[edgeIndex*2], 2);
│ │ │ │ +
687}
│ │ │ │ +
688inline IndexArray
│ │ │ │ +
689Level::getEdgeVertices(Index edgeIndex) {
│ │ │ │ +
690 return IndexArray(&_edgeVertIndices[edgeIndex*2], 2);
│ │ │ │ +
691}
│ │ │ │ +
692
│ │ │ │ +
693//
│ │ │ │ +
694// Access/modify the faces incident a given edge:
│ │ │ │ +
695//
│ │ │ │ +
696inline ConstIndexArray
│ │ │ │ +
697Level::getEdgeFaces(Index edgeIndex) const {
│ │ │ │ +
698 return ConstIndexArray(&_edgeFaceIndices[0] +
│ │ │ │ +
699 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ +
700 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ +
701}
│ │ │ │ +
702inline IndexArray
│ │ │ │ +
703Level::getEdgeFaces(Index edgeIndex) {
│ │ │ │ +
704 return IndexArray(&_edgeFaceIndices[0] +
│ │ │ │ +
705 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ +
706 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ +
707}
│ │ │ │ +
708
│ │ │ │ + │ │ │ │ +
710Level::getEdgeFaceLocalIndices(Index edgeIndex) const {
│ │ │ │ +
711 return ConstLocalIndexArray(&_edgeFaceLocalIndices[0] +
│ │ │ │ +
712 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ +
713 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ +
714}
│ │ │ │ +
715inline LocalIndexArray
│ │ │ │ +
716Level::getEdgeFaceLocalIndices(Index edgeIndex) {
│ │ │ │ +
717 return LocalIndexArray(&_edgeFaceLocalIndices[0] +
│ │ │ │ +
718 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ +
719 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ +
720}
│ │ │ │ +
721
│ │ │ │ +
722inline void
│ │ │ │ +
723Level::resizeEdgeFaces(Index edgeIndex, int count) {
│ │ │ │ +
724 int* countOffsetPair = &_edgeFaceCountsAndOffsets[edgeIndex*2];
│ │ │ │ +
725
│ │ │ │ +
726 countOffsetPair[0] = count;
│ │ │ │ +
727 countOffsetPair[1] = (edgeIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ +
728
│ │ │ │ +
729 _maxEdgeFaces = std::max(_maxEdgeFaces, count);
│ │ │ │ +
730}
│ │ │ │ +
731inline void
│ │ │ │ +
732Level::trimEdgeFaces(Index edgeIndex, int count) {
│ │ │ │ +
733 _edgeFaceCountsAndOffsets[edgeIndex*2] = count;
│ │ │ │ +
734}
│ │ │ │ +
735
│ │ │ │ +
736//
│ │ │ │ +
737// Access/modify sharpness values:
│ │ │ │ +
738//
│ │ │ │ +
739inline float
│ │ │ │ +
740Level::getEdgeSharpness(Index edgeIndex) const {
│ │ │ │ +
741 return _edgeSharpness[edgeIndex];
│ │ │ │ +
742}
│ │ │ │ +
743inline float&
│ │ │ │ +
744Level::getEdgeSharpness(Index edgeIndex) {
│ │ │ │ +
745 return _edgeSharpness[edgeIndex];
│ │ │ │ +
746}
│ │ │ │ +
747
│ │ │ │ +
748inline float
│ │ │ │ +
749Level::getVertexSharpness(Index vertIndex) const {
│ │ │ │ +
750 return _vertSharpness[vertIndex];
│ │ │ │ +
751}
│ │ │ │ +
752inline float&
│ │ │ │ +
753Level::getVertexSharpness(Index vertIndex) {
│ │ │ │ +
754 return _vertSharpness[vertIndex];
│ │ │ │ +
755}
│ │ │ │ +
756
│ │ │ │ + │ │ │ │ +
758Level::getVertexRule(Index vertIndex) const {
│ │ │ │ +
759 return (Sdc::Crease::Rule) _vertTags[vertIndex]._rule;
│ │ │ │ +
760}
│ │ │ │ +
761
│ │ │ │ +
762//
│ │ │ │ +
763// Access/modify hole tag:
│ │ │ │ +
764//
│ │ │ │ +
765inline void
│ │ │ │ +
766Level::setFaceHole(Index faceIndex, bool b) {
│ │ │ │ +
767 _faceTags[faceIndex]._hole = b;
│ │ │ │ +
768}
│ │ │ │ +
769inline bool
│ │ │ │ +
770Level::isFaceHole(Index faceIndex) const {
│ │ │ │ +
771 return _faceTags[faceIndex]._hole;
│ │ │ │ +
772}
│ │ │ │ +
773
│ │ │ │ +
774//
│ │ │ │ +
775// Access/modify non-manifold tags:
│ │ │ │ +
776//
│ │ │ │ +
777inline void
│ │ │ │ +
778Level::setEdgeNonManifold(Index edgeIndex, bool b) {
│ │ │ │ +
779 _edgeTags[edgeIndex]._nonManifold = b;
│ │ │ │ +
780}
│ │ │ │ +
781inline bool
│ │ │ │ +
782Level::isEdgeNonManifold(Index edgeIndex) const {
│ │ │ │ +
783 return _edgeTags[edgeIndex]._nonManifold;
│ │ │ │ +
784}
│ │ │ │ +
785
│ │ │ │ +
786inline void
│ │ │ │ +
787Level::setVertexNonManifold(Index vertIndex, bool b) {
│ │ │ │ +
788 _vertTags[vertIndex]._nonManifold = b;
│ │ │ │ +
789}
│ │ │ │ +
790inline bool
│ │ │ │ +
791Level::isVertexNonManifold(Index vertIndex) const {
│ │ │ │ +
792 return _vertTags[vertIndex]._nonManifold;
│ │ │ │ +
793}
│ │ │ │ +
794
│ │ │ │ +
795//
│ │ │ │ +
796// Sizing methods to allocate space:
│ │ │ │ +
797//
│ │ │ │ +
798inline void
│ │ │ │ +
799Level::resizeFaces(int faceCount) {
│ │ │ │ +
800 _faceCount = faceCount;
│ │ │ │ +
801 _faceVertCountsAndOffsets.resize(2 * faceCount);
│ │ │ │ +
802
│ │ │ │ +
803 _faceTags.resize(faceCount);
│ │ │ │ +
804 std::memset((void*) &_faceTags[0], 0, _faceCount * sizeof(FTag));
│ │ │ │ +
805}
│ │ │ │ +
806inline void
│ │ │ │ +
807Level::resizeFaceVertices(int totalFaceVertCount) {
│ │ │ │ +
808 _faceVertIndices.resize(totalFaceVertCount);
│ │ │ │ +
809}
│ │ │ │ +
810inline void
│ │ │ │ +
811Level::resizeFaceEdges(int totalFaceEdgeCount) {
│ │ │ │ +
812 _faceEdgeIndices.resize(totalFaceEdgeCount);
│ │ │ │ +
813}
│ │ │ │ +
814
│ │ │ │ +
815inline void
│ │ │ │ +
816Level::resizeEdges(int edgeCount) {
│ │ │ │ +
817
│ │ │ │ +
818 _edgeCount = edgeCount;
│ │ │ │ +
819 _edgeFaceCountsAndOffsets.resize(2 * edgeCount);
│ │ │ │ +
820
│ │ │ │ +
821 _edgeSharpness.resize(edgeCount);
│ │ │ │ +
822 _edgeTags.resize(edgeCount);
│ │ │ │ +
823
│ │ │ │ +
824 if (edgeCount>0) {
│ │ │ │ +
825 std::memset((void*) &_edgeTags[0], 0, _edgeCount * sizeof(ETag));
│ │ │ │ +
826 }
│ │ │ │ +
827}
│ │ │ │ +
828inline void
│ │ │ │ +
829Level::resizeEdgeVertices() {
│ │ │ │ +
830
│ │ │ │ +
831 _edgeVertIndices.resize(2 * _edgeCount);
│ │ │ │ +
832}
│ │ │ │ +
833inline void
│ │ │ │ +
834Level::resizeEdgeFaces(int totalEdgeFaceCount) {
│ │ │ │ +
835
│ │ │ │ +
836 _edgeFaceIndices.resize(totalEdgeFaceCount);
│ │ │ │ +
837 _edgeFaceLocalIndices.resize(totalEdgeFaceCount);
│ │ │ │ +
838}
│ │ │ │ +
839
│ │ │ │ +
840inline void
│ │ │ │ +
841Level::resizeVertices(int vertCount) {
│ │ │ │ +
842
│ │ │ │ +
843 _vertCount = vertCount;
│ │ │ │ +
844 _vertFaceCountsAndOffsets.resize(2 * vertCount);
│ │ │ │ +
845 _vertEdgeCountsAndOffsets.resize(2 * vertCount);
│ │ │ │ +
846
│ │ │ │ +
847 _vertSharpness.resize(vertCount);
│ │ │ │ +
848 _vertTags.resize(vertCount);
│ │ │ │ +
849 std::memset((void*) &_vertTags[0], 0, _vertCount * sizeof(VTag));
│ │ │ │ +
850}
│ │ │ │ +
851inline void
│ │ │ │ +
852Level::resizeVertexFaces(int totalVertFaceCount) {
│ │ │ │ +
853
│ │ │ │ +
854 _vertFaceIndices.resize(totalVertFaceCount);
│ │ │ │ +
855 _vertFaceLocalIndices.resize(totalVertFaceCount);
│ │ │ │ +
856}
│ │ │ │ +
857inline void
│ │ │ │ +
858Level::resizeVertexEdges(int totalVertEdgeCount) {
│ │ │ │ +
859
│ │ │ │ +
860 _vertEdgeIndices.resize(totalVertEdgeCount);
│ │ │ │ +
861 _vertEdgeLocalIndices.resize(totalVertEdgeCount);
│ │ │ │ +
862}
│ │ │ │ +
863
│ │ │ │ +
864inline IndexArray
│ │ │ │ +
865Level::shareFaceVertCountsAndOffsets() const {
│ │ │ │ +
866 // XXXX manuelk we have to force const casting here (classes don't 'share'
│ │ │ │ +
867 // members usually...)
│ │ │ │ +
868 return IndexArray(const_cast<Index *>(&_faceVertCountsAndOffsets[0]),
│ │ │ │ +
869 (int)_faceVertCountsAndOffsets.size());
│ │ │ │ +
870}
│ │ │ │ +
871
│ │ │ │ +
872} // end namespace internal
│ │ │ │ +
873} // end namespace Vtr
│ │ │ │ +
874
│ │ │ │ +
875} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
876using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
877} // end namespace OpenSubdiv
│ │ │ │ +
878
│ │ │ │ +
879#endif /* OPENSUBDIV3_VTR_LEVEL_H */
│ │ │ │ + │ │ │ │ +
ConstArray< LocalIndex > ConstLocalIndexArray
Definition types.h:83
│ │ │ │ +
Array< LocalIndex > LocalIndexArray
Definition types.h:82
│ │ │ │ + │ │ │ │
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -componentInterfaces.h │ │ │ │ │ +level.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,158 +23,986 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_LEVEL_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_LEVEL_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ 29#include "../sdc/types.h" │ │ │ │ │ 30#include "../sdc/crease.h" │ │ │ │ │ -31#include "../vtr/types.h" │ │ │ │ │ -32#include "../vtr/stackBuffer.h" │ │ │ │ │ +31#include "../sdc/options.h" │ │ │ │ │ +32#include "../vtr/types.h" │ │ │ │ │ 33 │ │ │ │ │ -34#include │ │ │ │ │ -35 │ │ │ │ │ -36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34#include │ │ │ │ │ +35#include │ │ │ │ │ +36#include │ │ │ │ │ +37#include │ │ │ │ │ +38 │ │ │ │ │ 39 │ │ │ │ │ -40namespace Vtr { │ │ │ │ │ -41namespace internal { │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -43// │ │ │ │ │ -44// Simple classes supporting the interfaces required of generic topological │ │ │ │ │ -45// types in the Scheme mask queries, e.g. │ │ │ │ │ -46// │ │ │ │ │ -47// These are not used with Vtr but arguably belong with it as the details to │ │ │ │ │ -48// write these efficiently depends very much on intimate details of Vtr's │ │ │ │ │ -49// implementation, e.g. the use of tag bits, subdivision Rules, etc. │ │ │ │ │ -50// │ │ │ │ │ +43namespace Vtr { │ │ │ │ │ +44namespace internal { │ │ │ │ │ +45 │ │ │ │ │ +46class Refinement; │ │ │ │ │ +47class TriRefinement; │ │ │ │ │ +48class QuadRefinement; │ │ │ │ │ +49class FVarRefinement; │ │ │ │ │ +50class FVarLevel; │ │ │ │ │ 51 │ │ │ │ │ -52 │ │ │ │ │ -53// │ │ │ │ │ -54// For , which provides information in the neighborhood of a │ │ │ │ │ -face: │ │ │ │ │ -55// │ │ │ │ │ -56class FaceInterface { │ │ │ │ │ -57public: │ │ │ │ │ -58 FaceInterface() { } │ │ │ │ │ -59 FaceInterface(int vertCount) : _vertCount(vertCount) { } │ │ │ │ │ -60 ~FaceInterface() { } │ │ │ │ │ -61 │ │ │ │ │ -62public: // Generic interface expected of : │ │ │ │ │ -63 int GetNumVertices() const { return _vertCount; } │ │ │ │ │ -64 │ │ │ │ │ -65private: │ │ │ │ │ -66 int _vertCount; │ │ │ │ │ -67}; │ │ │ │ │ -68 │ │ │ │ │ -69 │ │ │ │ │ -70// │ │ │ │ │ -71// For , which provides information in the neighborhood of an │ │ │ │ │ -edge: │ │ │ │ │ -72// │ │ │ │ │ -73class EdgeInterface { │ │ │ │ │ -74public: │ │ │ │ │ -75 EdgeInterface() { } │ │ │ │ │ -76 EdgeInterface(Level const& level) : _level(&level) { } │ │ │ │ │ -77 ~EdgeInterface() { } │ │ │ │ │ -78 │ │ │ │ │ -79 void SetIndex(int edgeIndex) { _eIndex = edgeIndex; } │ │ │ │ │ -80 │ │ │ │ │ -81public: // Generic interface expected of : │ │ │ │ │ -82 int GetNumFaces() const { return _level->getEdgeFaces(_eIndex).size(); } │ │ │ │ │ -83 float GetSharpness() const { return _level->getEdgeSharpness(_eIndex); } │ │ │ │ │ +52// │ │ │ │ │ +53// Level: │ │ │ │ │ +54// A refinement level includes a vectorized representation of the topology │ │ │ │ │ +55// for a particular subdivision level. The topology is "complete" in that any │ │ │ │ │ +56// level can be used as the base level of another subdivision hierarchy and │ │ │ │ │ +can │ │ │ │ │ +57// be considered a complete mesh independent of its ancestors. It currently │ │ │ │ │ +58// does contain a "depth" member -- as some inferences can then be made about │ │ │ │ │ +59// the topology (i.e. all quads or all tris if not level 0). │ │ │ │ │ +60// │ │ │ │ │ +61// This class is intended for private use within the library. There are still │ │ │ │ │ +62// opportunities to specialize levels -- e.g. those supporting N-sided faces │ │ │ │ │ +vs │ │ │ │ │ +63// those that are purely quads or tris -- so we prefer to insulate it from │ │ │ │ │ +public │ │ │ │ │ +64// access. │ │ │ │ │ +65// │ │ │ │ │ +66// The representation of topology here is to store six topological │ │ │ │ │ +relationships │ │ │ │ │ +67// in tables of integers. Each is stored in its own array(s) so the result is │ │ │ │ │ +68// a SOA representation of the topology. The six relations are: │ │ │ │ │ +69// │ │ │ │ │ +70// - face-verts: vertices incident/comprising a face │ │ │ │ │ +71// - face-edges: edges incident a face │ │ │ │ │ +72// - edge-verts: vertices incident/comprising an edge │ │ │ │ │ +73// - edge-faces: faces incident an edge │ │ │ │ │ +74// - vert-faces: faces incident a vertex │ │ │ │ │ +75// - vert-edges: edges incident a vertex │ │ │ │ │ +76// │ │ │ │ │ +77// There is some redundancy here but the intent is not that this be a minimal │ │ │ │ │ +78// representation, the intent is that it be amenable to refinement. Classes │ │ │ │ │ +in │ │ │ │ │ +79// the Far layer essentially store 5 of these 6 in a permuted form -- we add │ │ │ │ │ +80// the face-edges here to simplify refinement. │ │ │ │ │ +81// │ │ │ │ │ +82 │ │ │ │ │ +83class Level { │ │ │ │ │ 84 │ │ │ │ │ -85 void GetChildSharpnesses(Sdc::Crease const&, float s[2]) const { │ │ │ │ │ -86 // Need to use the Refinement here to identify the two child edges: │ │ │ │ │ -87 s[0] = s[1] = GetSharpness() - 1.0f; │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -90 void GetNumVerticesPerFace(int vertsPerFace[]) const { │ │ │ │ │ -91 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eFaces = _level->getEdgeFaces(_eIndex); │ │ │ │ │ -92 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ -93 vertsPerFace[i] = _level->getFaceVertices(eFaces[i]).size(); │ │ │ │ │ -94 } │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97private: │ │ │ │ │ -98 const Level* _level; │ │ │ │ │ +85public: │ │ │ │ │ +86 // │ │ │ │ │ +87 // Simple nested types to hold the tags for each component type -- some of │ │ │ │ │ +88 // which are user-specified features (e.g. whether a face is a hole or not) │ │ │ │ │ +89 // while others indicate the topological nature of the component, how it │ │ │ │ │ +90 // is affected by creasing in its neighborhood, etc. │ │ │ │ │ +91 // │ │ │ │ │ +92 // Most of these properties are passed down to child components during │ │ │ │ │ +93 // refinement, but some -- notably the designation of a component as semi- │ │ │ │ │ +94 // sharp -- require re-determination as sharpness values are reduced at each │ │ │ │ │ +95 // level. │ │ │ │ │ +96 // │ │ │ │ │ +97 struct VTag { │ │ │ │ │ +98 VTag() { } │ │ │ │ │ 99 │ │ │ │ │ -100 int _eIndex; │ │ │ │ │ -101}; │ │ │ │ │ -102 │ │ │ │ │ -103 │ │ │ │ │ -104// │ │ │ │ │ -105// For , which provides information in the neighborhood of │ │ │ │ │ -a vertex: │ │ │ │ │ -106// │ │ │ │ │ -107class VertexInterface { │ │ │ │ │ -108public: │ │ │ │ │ -109 VertexInterface() { } │ │ │ │ │ -110 VertexInterface(Level const& parent, Level const& child) : _parent │ │ │ │ │ -(&parent), _child(&child) { } │ │ │ │ │ -111 ~VertexInterface() { } │ │ │ │ │ -112 │ │ │ │ │ -113 void SetIndex(int parentIndex, int childIndex) { │ │ │ │ │ -114 _pIndex = parentIndex; │ │ │ │ │ -115 _cIndex = childIndex; │ │ │ │ │ -116 _eCount = _parent->getVertexEdges(_pIndex).size(); │ │ │ │ │ -117 _fCount = _parent->getVertexFaces(_pIndex).size(); │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120public: // Generic interface expected of : │ │ │ │ │ -121 int GetNumEdges() const { return _eCount; } │ │ │ │ │ -122 int GetNumFaces() const { return _fCount; } │ │ │ │ │ -123 │ │ │ │ │ -124 float GetSharpness() const { return _parent->getVertexSharpness(_pIndex); } │ │ │ │ │ -125 float* GetSharpnessPerEdge(float pSharpness[]) const { │ │ │ │ │ -126 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pEdges = _parent->getVertexEdges(_pIndex); │ │ │ │ │ -127 for (int i = 0; i < _eCount; ++i) { │ │ │ │ │ -128 pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]); │ │ │ │ │ -129 } │ │ │ │ │ -130 return pSharpness; │ │ │ │ │ +100 // When cleared, the VTag ALMOST represents a smooth, regular, interior │ │ │ │ │ +101 // vertex -- the Type enum requires a bit be explicitly set for Smooth, │ │ │ │ │ +102 // so that must be done explicitly if desired on initialization. │ │ │ │ │ +103 void clear() { std::memset((void*) this, 0, sizeof(VTag)); } │ │ │ │ │ +104 │ │ │ │ │ +105 typedef unsigned short VTagSize; │ │ │ │ │ +106 │ │ │ │ │ +107 VTagSize _nonManifold : 1; // fixed │ │ │ │ │ +108 VTagSize _xordinary : 1; // fixed │ │ │ │ │ +109 VTagSize _boundary : 1; // fixed │ │ │ │ │ +110 VTagSize _corner : 1; // fixed │ │ │ │ │ +111 VTagSize _infSharp : 1; // fixed │ │ │ │ │ +112 VTagSize _semiSharp : 1; // variable │ │ │ │ │ +113 VTagSize _semiSharpEdges : 1; // variable │ │ │ │ │ +114 VTagSize _rule : 4; // variable when _semiSharp │ │ │ │ │ +115 │ │ │ │ │ +116 // These next to tags are complementary -- the "incomplete" tag is only │ │ │ │ │ +117 // relevant for refined levels while the "incident an irregular face" tag │ │ │ │ │ +118 // is only relevant for the base level. They could be combined as both │ │ │ │ │ +119 // indicate "no full regular ring" around a vertex │ │ │ │ │ +120 VTagSize _incomplete : 1; // variable only set in refined levels │ │ │ │ │ +121 VTagSize _incidIrregFace : 1; // variable only set in base level │ │ │ │ │ +122 │ │ │ │ │ +123 // Tags indicating incident infinitely-sharp (permanent) features │ │ │ │ │ +124 VTagSize _infSharpEdges : 1; // fixed │ │ │ │ │ +125 VTagSize _infSharpCrease : 1; // fixed │ │ │ │ │ +126 VTagSize _infIrregular : 1; // fixed │ │ │ │ │ +127 │ │ │ │ │ +128 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ +directly: │ │ │ │ │ +129 explicit VTag(VTagSize bits) { │ │ │ │ │ +130 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ 131 } │ │ │ │ │ -132 │ │ │ │ │ -133 float GetChildSharpness(Sdc::Crease const&) const { return _child- │ │ │ │ │ ->getVertexSharpness(_cIndex); } │ │ │ │ │ -134 float* GetChildSharpnessPerEdge(Sdc::Crease const& crease, float cSharpness │ │ │ │ │ -[]) const { │ │ │ │ │ -135 internal::StackBuffer pSharpness(_eCount); │ │ │ │ │ -136 GetSharpnessPerEdge(pSharpness); │ │ │ │ │ -137 crease.SubdivideEdgeSharpnessesAroundVertex(_eCount, pSharpness, │ │ │ │ │ -cSharpness); │ │ │ │ │ -138 return cSharpness; │ │ │ │ │ -139 } │ │ │ │ │ -140 │ │ │ │ │ -141private: │ │ │ │ │ -142 const Level* _parent; │ │ │ │ │ -143 const Level* _child; │ │ │ │ │ -144 │ │ │ │ │ -145 int _pIndex; │ │ │ │ │ -146 int _cIndex; │ │ │ │ │ -147 int _eCount; │ │ │ │ │ -148 int _fCount; │ │ │ │ │ -149}; │ │ │ │ │ -150 │ │ │ │ │ -151} // end namespace internal │ │ │ │ │ -152} // end namespace Vtr │ │ │ │ │ -153 │ │ │ │ │ -154} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -155using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -156} // end namespace OpenSubdiv │ │ │ │ │ -157 │ │ │ │ │ -158#endif /* OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H */ │ │ │ │ │ +132 VTagSize getBits() const { │ │ │ │ │ +133 VTagSize bits; │ │ │ │ │ +134 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ +135 return bits; │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 static VTag BitwiseOr(VTag const vTags[], int size = 4); │ │ │ │ │ +139 }; │ │ │ │ │ +140 struct ETag { │ │ │ │ │ +141 ETag() { } │ │ │ │ │ +142 │ │ │ │ │ +143 // When cleared, the ETag represents a smooth, manifold, interior edge │ │ │ │ │ +144 void clear() { std::memset((void*) this, 0, sizeof(ETag)); } │ │ │ │ │ +145 │ │ │ │ │ +146 typedef unsigned char ETagSize; │ │ │ │ │ +147 │ │ │ │ │ +148 ETagSize _nonManifold : 1; // fixed │ │ │ │ │ +149 ETagSize _boundary : 1; // fixed │ │ │ │ │ +150 ETagSize _infSharp : 1; // fixed │ │ │ │ │ +151 ETagSize _semiSharp : 1; // variable │ │ │ │ │ +152 │ │ │ │ │ +153 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ +directly: │ │ │ │ │ +154 explicit ETag(ETagSize bits) { │ │ │ │ │ +155 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ +156 } │ │ │ │ │ +157 ETagSize getBits() const { │ │ │ │ │ +158 ETagSize bits; │ │ │ │ │ +159 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ +160 return bits; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +163 static ETag BitwiseOr(ETag const eTags[], int size = 4); │ │ │ │ │ +164 }; │ │ │ │ │ +165 struct FTag { │ │ │ │ │ +166 FTag() { } │ │ │ │ │ +167 │ │ │ │ │ +168 void clear() { std::memset((void*) this, 0, sizeof(FTag)); } │ │ │ │ │ +169 │ │ │ │ │ +170 typedef unsigned char FTagSize; │ │ │ │ │ +171 │ │ │ │ │ +172 FTagSize _hole : 1; // fixed │ │ │ │ │ +173 │ │ │ │ │ +174 // On deck -- coming soon... │ │ │ │ │ +175 //FTagSize _hasEdits : 1; // variable │ │ │ │ │ +176 }; │ │ │ │ │ +177 │ │ │ │ │ +178 // Additional simple struct to identify a "span" around a vertex, i.e. a │ │ │ │ │ +179 // subset of the faces around a vertex delimited by some property (e.g. a │ │ │ │ │ +180 // face-varying discontinuity, an inf-sharp edge, etc.) │ │ │ │ │ +181 // │ │ │ │ │ +182 // The span requires an "origin" and a "size" to fully define its extent. │ │ │ │ │ +183 // Use of the size is required over a leading/trailing pair as the valence │ │ │ │ │ +184 // around a non-manifold vertex cannot be trivially determined from two │ │ │ │ │ +185 // extremeties. Similarly a start face is chosen over an edge as starting │ │ │ │ │ +186 // with a manifold edge is ambiguous. Additional tags also support │ │ │ │ │ +187 // non-manifold cases, e.g. periodic spans at the apex of a double cone. │ │ │ │ │ +188 // │ │ │ │ │ +189 // Currently setting the size to 0 or leaving the span "unassigned" is an │ │ │ │ │ +190 // indication to use the full neighborhood rather than a subset -- prefer │ │ │ │ │ +191 // use of the const method here to direct inspection of the member. │ │ │ │ │ +192 // │ │ │ │ │ +193 struct VSpan { │ │ │ │ │ +194 VSpan() { std::memset((void*) this, 0, sizeof(VSpan)); } │ │ │ │ │ +195 │ │ │ │ │ +196 void clear() { std::memset((void*) this, 0, sizeof(VSpan)); } │ │ │ │ │ +197 bool isAssigned() const { return _numFaces > 0; } │ │ │ │ │ +198 │ │ │ │ │ +199 _L_o_c_a_l_I_n_d_e_x _numFaces; │ │ │ │ │ +200 _L_o_c_a_l_I_n_d_e_x _startFace; │ │ │ │ │ +201 _L_o_c_a_l_I_n_d_e_x _cornerInSpan; │ │ │ │ │ +202 │ │ │ │ │ +203 unsigned short _periodic : 1; │ │ │ │ │ +204 unsigned short _sharp : 1; │ │ │ │ │ +205 }; │ │ │ │ │ +206 │ │ │ │ │ +207public: │ │ │ │ │ +208 Level(); │ │ │ │ │ +209 ~Level(); │ │ │ │ │ +210 │ │ │ │ │ +211 // Simple accessors: │ │ │ │ │ +212 int getDepth() const { return _depth; } │ │ │ │ │ +213 │ │ │ │ │ +214 int getNumVertices() const { return _vertCount; } │ │ │ │ │ +215 int getNumFaces() const { return _faceCount; } │ │ │ │ │ +216 int getNumEdges() const { return _edgeCount; } │ │ │ │ │ +217 │ │ │ │ │ +218 // More global sizes may prove useful... │ │ │ │ │ +219 int getNumFaceVerticesTotal() const { return (int) _faceVertIndices.size(); │ │ │ │ │ +} │ │ │ │ │ +220 int getNumFaceEdgesTotal() const { return (int) _faceEdgeIndices.size(); } │ │ │ │ │ +221 int getNumEdgeVerticesTotal() const { return (int) _edgeVertIndices.size(); │ │ │ │ │ +} │ │ │ │ │ +222 int getNumEdgeFacesTotal() const { return (int) _edgeFaceIndices.size(); } │ │ │ │ │ +223 int getNumVertexFacesTotal() const { return (int) _vertFaceIndices.size(); │ │ │ │ │ +} │ │ │ │ │ +224 int getNumVertexEdgesTotal() const { return (int) _vertEdgeIndices.size(); │ │ │ │ │ +} │ │ │ │ │ +225 │ │ │ │ │ +226 int getMaxValence() const { return _maxValence; } │ │ │ │ │ +227 int getMaxEdgeFaces() const { return _maxEdgeFaces; } │ │ │ │ │ +228 │ │ │ │ │ +229 // Methods to access the relation tables/indices -- note that for some │ │ │ │ │ +relations │ │ │ │ │ +230 // (i.e. those where a component is "contained by" a neighbor, or more │ │ │ │ │ +generally │ │ │ │ │ +231 // when the neighbor is a simplex of higher dimension) we store an │ │ │ │ │ +additional │ │ │ │ │ +232 // "local index", e.g. for the case of vert-faces if one of the faces F[i] │ │ │ │ │ +is │ │ │ │ │ +233 // incident a vertex V, then L[i] is the "local index" in F[i] of vertex V. │ │ │ │ │ +234 // Once have only quads (or tris), this local index need only occupy two │ │ │ │ │ +bits │ │ │ │ │ +235 // and could conceivably be packed into the same integer as the face index, │ │ │ │ │ +but │ │ │ │ │ +236 // for now, given the need to support faces of potentially high valence │ │ │ │ │ +we'll │ │ │ │ │ +237 // use an 8- or 16-bit integer. │ │ │ │ │ +238 // │ │ │ │ │ +239 // Methods to access the six topological relations: │ │ │ │ │ +240 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceVertices(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +241 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceEdges(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +242 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeVertices(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ +243 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeFaces(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ +244 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexFaces(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +245 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexEdges(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +246 │ │ │ │ │ +247 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ +248 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +249 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +250 │ │ │ │ │ +251 // Replace these with access to sharpness buffers/arrays rather than │ │ │ │ │ +elements: │ │ │ │ │ +252 float getEdgeSharpness(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ +253 float getVertexSharpness(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +254 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e getVertexRule(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +255 │ │ │ │ │ +256 _I_n_d_e_x findEdge(_I_n_d_e_x v0Index, _I_n_d_e_x v1Index) const; │ │ │ │ │ +257 │ │ │ │ │ +258 // Holes │ │ │ │ │ +259 void setFaceHole(_I_n_d_e_x faceIndex, bool b); │ │ │ │ │ +260 bool isFaceHole(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +261 │ │ │ │ │ +262 // Face-varying │ │ │ │ │ +263 Sdc::Options getFVarOptions(int channel) const; │ │ │ │ │ +264 int getNumFVarChannels() const { return (int) _fvarChannels.size(); } │ │ │ │ │ +265 int getNumFVarValues(int channel) const; │ │ │ │ │ +266 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceFVarValues(_I_n_d_e_x faceIndex, int channel) const; │ │ │ │ │ +267 │ │ │ │ │ +268 FVarLevel & getFVarLevel(int channel) { return *_fvarChannels[channel]; } │ │ │ │ │ +269 FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels │ │ │ │ │ +[channel]; } │ │ │ │ │ +270 │ │ │ │ │ +271 // Manifold/non-manifold tags: │ │ │ │ │ +272 void setEdgeNonManifold(_I_n_d_e_x edgeIndex, bool b); │ │ │ │ │ +273 bool isEdgeNonManifold(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ +274 │ │ │ │ │ +275 void setVertexNonManifold(_I_n_d_e_x vertIndex, bool b); │ │ │ │ │ +276 bool isVertexNonManifold(_I_n_d_e_x vertIndex) const; │ │ │ │ │ +277 │ │ │ │ │ +278 // General access to all component tags: │ │ │ │ │ +279 VTag const & getVertexTag(_I_n_d_e_x vertIndex) const { return _vertTags │ │ │ │ │ +[vertIndex]; } │ │ │ │ │ +280 ETag const & getEdgeTag(_I_n_d_e_x edgeIndex) const { return _edgeTags │ │ │ │ │ +[edgeIndex]; } │ │ │ │ │ +281 FTag const & getFaceTag(_I_n_d_e_x faceIndex) const { return _faceTags │ │ │ │ │ +[faceIndex]; } │ │ │ │ │ +282 │ │ │ │ │ +283 VTag & getVertexTag(_I_n_d_e_x vertIndex) { return _vertTags[vertIndex]; } │ │ │ │ │ +284 ETag & getEdgeTag(_I_n_d_e_x edgeIndex) { return _edgeTags[edgeIndex]; } │ │ │ │ │ +285 FTag & getFaceTag(_I_n_d_e_x faceIndex) { return _faceTags[faceIndex]; } │ │ │ │ │ +286 │ │ │ │ │ +287public: │ │ │ │ │ +288 │ │ │ │ │ +289 // Debugging aides: │ │ │ │ │ +290 enum TopologyError { │ │ │ │ │ +291 TOPOLOGY_MISSING_EDGE_FACES=0, │ │ │ │ │ +292 TOPOLOGY_MISSING_EDGE_VERTS, │ │ │ │ │ +293 TOPOLOGY_MISSING_FACE_EDGES, │ │ │ │ │ +294 TOPOLOGY_MISSING_FACE_VERTS, │ │ │ │ │ +295 TOPOLOGY_MISSING_VERT_FACES, │ │ │ │ │ +296 TOPOLOGY_MISSING_VERT_EDGES, │ │ │ │ │ +297 │ │ │ │ │ +298 TOPOLOGY_FAILED_CORRELATION_EDGE_FACE, │ │ │ │ │ +299 TOPOLOGY_FAILED_CORRELATION_FACE_VERT, │ │ │ │ │ +300 TOPOLOGY_FAILED_CORRELATION_FACE_EDGE, │ │ │ │ │ +301 │ │ │ │ │ +302 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE, │ │ │ │ │ +303 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE, │ │ │ │ │ +304 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES, │ │ │ │ │ +305 │ │ │ │ │ +306 TOPOLOGY_DEGENERATE_EDGE, │ │ │ │ │ +307 TOPOLOGY_NON_MANIFOLD_EDGE, │ │ │ │ │ +308 │ │ │ │ │ +309 TOPOLOGY_INVALID_CREASE_EDGE, │ │ │ │ │ +310 TOPOLOGY_INVALID_CREASE_VERT │ │ │ │ │ +311 }; │ │ │ │ │ +312 │ │ │ │ │ +313 static char const * getTopologyErrorString(TopologyError errCode); │ │ │ │ │ +314 │ │ │ │ │ +315 typedef void (* ValidationCallback)(TopologyError errCode, char const * │ │ │ │ │ +msg, void const * clientData); │ │ │ │ │ +316 │ │ │ │ │ +317 bool validateTopology(ValidationCallback callback=0, void const * │ │ │ │ │ +clientData=0) const; │ │ │ │ │ +318 │ │ │ │ │ +319 void print(const Refinement* parentRefinement = 0) const; │ │ │ │ │ +320 │ │ │ │ │ +321public: │ │ │ │ │ +322 // High-level topology queries -- these may be moved elsewhere: │ │ │ │ │ +323 │ │ │ │ │ +324 bool isSingleCreasePatch(_I_n_d_e_x face, float* sharpnessOut=NULL, int* │ │ │ │ │ +rotationOut=NULL) const; │ │ │ │ │ +325 │ │ │ │ │ +326 // │ │ │ │ │ +327 // When inspecting topology, the component tags -- particularly VTag and │ │ │ │ │ +ETag -- are most │ │ │ │ │ +328 // often inspected in groups for the face to which they belong. They are │ │ │ │ │ +designed to be │ │ │ │ │ +329 // bitwise OR'd (the result then referred to as a "composite" tag) to make │ │ │ │ │ +quick decisions │ │ │ │ │ +330 // about the face as a whole to avoid tedious topological inspection. │ │ │ │ │ +331 // │ │ │ │ │ +332 // The same logic can be applied to topology in a FVar channel when tags │ │ │ │ │ +specific to that │ │ │ │ │ +333 // channel are used. Note that the VTags apply to the FVar values assigned │ │ │ │ │ +to the corners │ │ │ │ │ +334 // of the face and not the vertex as a whole. The "composite" face-varying │ │ │ │ │ +VTag for a │ │ │ │ │ +335 // vertex is the union of VTags of all distinct FVar values for that │ │ │ │ │ +vertex. │ │ │ │ │ +336 // │ │ │ │ │ +337 bool doesVertexFVarTopologyMatch(_I_n_d_e_x vIndex, int fvarChannel) const; │ │ │ │ │ +338 bool doesFaceFVarTopologyMatch( _I_n_d_e_x fIndex, int fvarChannel) const; │ │ │ │ │ +339 bool doesEdgeFVarTopologyMatch( _I_n_d_e_x eIndex, int fvarChannel) const; │ │ │ │ │ +340 │ │ │ │ │ +341 void getFaceVTags(_I_n_d_e_x fIndex, VTag vTags[], int fvarChannel = -1) const; │ │ │ │ │ +342 void getFaceETags(_I_n_d_e_x fIndex, ETag eTags[], int fvarChannel = -1) const; │ │ │ │ │ +343 │ │ │ │ │ +344 VTag getFaceCompositeVTag(_I_n_d_e_x fIndex, int fvarChannel = -1) const; │ │ │ │ │ +345 VTag getFaceCompositeVTag(_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y & fVerts) const; │ │ │ │ │ +346 │ │ │ │ │ +347 VTag getVertexCompositeFVarVTag(_I_n_d_e_x vIndex, int fvarChannel) const; │ │ │ │ │ +348 │ │ │ │ │ +349 // │ │ │ │ │ +350 // When gathering "patch points" we may want the indices of the vertices or │ │ │ │ │ +the corresponding │ │ │ │ │ +351 // FVar values for a particular channel. Both are represented and equally │ │ │ │ │ +accessible within │ │ │ │ │ +352 // the faces, so we allow all to be returned through these methods. Setting │ │ │ │ │ +the optional FVar │ │ │ │ │ +353 // channel to -1 will retrieve indices of vertices instead of FVar values: │ │ │ │ │ +354 // │ │ │ │ │ +355 int gatherQuadLinearPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], int │ │ │ │ │ +rotation = 0, │ │ │ │ │ +356 int fvarChannel = -1) const; │ │ │ │ │ +357 │ │ │ │ │ +358 int gatherQuadRegularInteriorPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ +int rotation = 0, │ │ │ │ │ +359 int fvarChannel = -1) const; │ │ │ │ │ +360 int gatherQuadRegularBoundaryPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ +int boundaryEdgeInFace, │ │ │ │ │ +361 int fvarChannel = -1) const; │ │ │ │ │ +362 int gatherQuadRegularCornerPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ +int cornerVertInFace, │ │ │ │ │ +363 int fvarChannel = -1) const; │ │ │ │ │ +364 │ │ │ │ │ +365 int gatherQuadRegularRingAroundVertex(_I_n_d_e_x vIndex, _I_n_d_e_x ringPoints[], │ │ │ │ │ +366 int fvarChannel = -1) const; │ │ │ │ │ +367 int gatherQuadRegularPartialRingAroundVertex(_I_n_d_e_x vIndex, VSpan const & │ │ │ │ │ +span, _I_n_d_e_x ringPoints[], │ │ │ │ │ +368 int fvarChannel = -1) const; │ │ │ │ │ +369 │ │ │ │ │ +370 // WIP -- for future use, need to extend for face-varying... │ │ │ │ │ +371 int gatherTriRegularInteriorPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts[], │ │ │ │ │ +int rotation = 0) const; │ │ │ │ │ +372 int gatherTriRegularBoundaryVertexPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x │ │ │ │ │ +patchVerts[], int boundaryVertInFace) const; │ │ │ │ │ +373 int gatherTriRegularBoundaryEdgePatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ +[], int boundaryEdgeInFace) const; │ │ │ │ │ +374 int gatherTriRegularCornerVertexPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ +[], int cornerVertInFace) const; │ │ │ │ │ +375 int gatherTriRegularCornerEdgePatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ +[], int cornerEdgeInFace) const; │ │ │ │ │ +376 │ │ │ │ │ +377public: │ │ │ │ │ +378 // Sizing methods used to construct a level to populate: │ │ │ │ │ +379 void resizeFaces( int numFaces); │ │ │ │ │ +380 void resizeFaceVertices(int numFaceVertsTotal); │ │ │ │ │ +381 void resizeFaceEdges( int numFaceEdgesTotal); │ │ │ │ │ +382 │ │ │ │ │ +383 void resizeEdges( int numEdges); │ │ │ │ │ +384 void resizeEdgeVertices(); // always 2*edgeCount │ │ │ │ │ +385 void resizeEdgeFaces(int numEdgeFacesTotal); │ │ │ │ │ +386 │ │ │ │ │ +387 void resizeVertices( int numVertices); │ │ │ │ │ +388 void resizeVertexFaces(int numVertexFacesTotal); │ │ │ │ │ +389 void resizeVertexEdges(int numVertexEdgesTotal); │ │ │ │ │ +390 │ │ │ │ │ +391 void setMaxValence(int maxValence); │ │ │ │ │ +392 │ │ │ │ │ +393 // Modifiers to populate the relations for each component: │ │ │ │ │ +394 _I_n_d_e_x_A_r_r_a_y getFaceVertices(_I_n_d_e_x faceIndex); │ │ │ │ │ +395 _I_n_d_e_x_A_r_r_a_y getFaceEdges(_I_n_d_e_x faceIndex); │ │ │ │ │ +396 _I_n_d_e_x_A_r_r_a_y getEdgeVertices(_I_n_d_e_x edgeIndex); │ │ │ │ │ +397 _I_n_d_e_x_A_r_r_a_y getEdgeFaces(_I_n_d_e_x edgeIndex); │ │ │ │ │ +398 _I_n_d_e_x_A_r_r_a_y getVertexFaces(_I_n_d_e_x vertIndex); │ │ │ │ │ +399 _I_n_d_e_x_A_r_r_a_y getVertexEdges(_I_n_d_e_x vertIndex); │ │ │ │ │ +400 │ │ │ │ │ +401 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex); │ │ │ │ │ +402 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexFaceLocalIndices(_I_n_d_e_x vertIndex); │ │ │ │ │ +403 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex); │ │ │ │ │ +404 │ │ │ │ │ +405 // Replace these with access to sharpness buffers/arrays rather than │ │ │ │ │ +elements: │ │ │ │ │ +406 float& getEdgeSharpness(_I_n_d_e_x edgeIndex); │ │ │ │ │ +407 float& getVertexSharpness(_I_n_d_e_x vertIndex); │ │ │ │ │ +408 │ │ │ │ │ +409 // Create, destroy and populate face-varying channels: │ │ │ │ │ +410 int createFVarChannel(int fvarValueCount, Sdc::Options const& options); │ │ │ │ │ +411 void destroyFVarChannel(int channel); │ │ │ │ │ +412 │ │ │ │ │ +413 _I_n_d_e_x_A_r_r_a_y getFaceFVarValues(_I_n_d_e_x faceIndex, int channel); │ │ │ │ │ +414 │ │ │ │ │ +415 void completeFVarChannelTopology(int channel, int regBoundaryValence); │ │ │ │ │ +416 │ │ │ │ │ +417 // Counts and offsets for all relation types: │ │ │ │ │ +418 // - these may be unwarranted if we let Refinement access members │ │ │ │ │ +directly... │ │ │ │ │ +419 int getNumFaceVertices( _I_n_d_e_x faceIndex) const { return │ │ │ │ │ +_faceVertCountsAndOffsets[2*faceIndex]; } │ │ │ │ │ +420 int getOffsetOfFaceVertices(_I_n_d_e_x faceIndex) const { return │ │ │ │ │ +_faceVertCountsAndOffsets[2*faceIndex + 1]; } │ │ │ │ │ +421 │ │ │ │ │ +422 int getNumFaceEdges( _I_n_d_e_x faceIndex) const { return getNumFaceVertices │ │ │ │ │ +(faceIndex); } │ │ │ │ │ +423 int getOffsetOfFaceEdges(_I_n_d_e_x faceIndex) const { return │ │ │ │ │ +getOffsetOfFaceVertices(faceIndex); } │ │ │ │ │ +424 │ │ │ │ │ +425 int getNumEdgeVertices( _I_n_d_e_x ) const { return 2; } │ │ │ │ │ +426 int getOffsetOfEdgeVertices(_I_n_d_e_x edgeIndex) const { return 2 * edgeIndex; │ │ │ │ │ +} │ │ │ │ │ +427 │ │ │ │ │ +428 int getNumEdgeFaces( _I_n_d_e_x edgeIndex) const { return │ │ │ │ │ +_edgeFaceCountsAndOffsets[2*edgeIndex]; } │ │ │ │ │ +429 int getOffsetOfEdgeFaces(_I_n_d_e_x edgeIndex) const { return │ │ │ │ │ +_edgeFaceCountsAndOffsets[2*edgeIndex + 1]; } │ │ │ │ │ +430 │ │ │ │ │ +431 int getNumVertexFaces( _I_n_d_e_x vertIndex) const { return │ │ │ │ │ +_vertFaceCountsAndOffsets[2*vertIndex]; } │ │ │ │ │ +432 int getOffsetOfVertexFaces(_I_n_d_e_x vertIndex) const { return │ │ │ │ │ +_vertFaceCountsAndOffsets[2*vertIndex + 1]; } │ │ │ │ │ +433 │ │ │ │ │ +434 int getNumVertexEdges( _I_n_d_e_x vertIndex) const { return │ │ │ │ │ +_vertEdgeCountsAndOffsets[2*vertIndex]; } │ │ │ │ │ +435 int getOffsetOfVertexEdges(_I_n_d_e_x vertIndex) const { return │ │ │ │ │ +_vertEdgeCountsAndOffsets[2*vertIndex + 1]; } │ │ │ │ │ +436 │ │ │ │ │ +437 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceVertices() const; │ │ │ │ │ +438 │ │ │ │ │ +439 // │ │ │ │ │ +440 // Note that for some relations, the size of the relations for a child │ │ │ │ │ +component │ │ │ │ │ +441 // can vary radically from its parent due to the sparsity of the │ │ │ │ │ +refinement. So │ │ │ │ │ +442 // in these cases a few additional utilities are provided to help define │ │ │ │ │ +the set │ │ │ │ │ +443 // of incident components. Assuming adequate memory has been allocated, the │ │ │ │ │ +444 // "resize" methods here initialize the set of incident components by │ │ │ │ │ +setting │ │ │ │ │ +445 // both the size and the appropriate offset, while "trim" is use to quickly │ │ │ │ │ +lower │ │ │ │ │ +446 // the size from an upper bound and nothing else. │ │ │ │ │ +447 // │ │ │ │ │ +448 void resizeFaceVertices(_I_n_d_e_x FaceIndex, int count); │ │ │ │ │ +449 │ │ │ │ │ +450 void resizeEdgeFaces(_I_n_d_e_x edgeIndex, int count); │ │ │ │ │ +451 void trimEdgeFaces( _I_n_d_e_x edgeIndex, int count); │ │ │ │ │ +452 │ │ │ │ │ +453 void resizeVertexFaces(_I_n_d_e_x vertIndex, int count); │ │ │ │ │ +454 void trimVertexFaces( _I_n_d_e_x vertIndex, int count); │ │ │ │ │ +455 │ │ │ │ │ +456 void resizeVertexEdges(_I_n_d_e_x vertIndex, int count); │ │ │ │ │ +457 void trimVertexEdges( _I_n_d_e_x vertIndex, int count); │ │ │ │ │ +458 │ │ │ │ │ +459public: │ │ │ │ │ +460 // │ │ │ │ │ +461 // Initial plans were to have a few specific classes properly construct the │ │ │ │ │ +462 // topology from scratch, e.g. the Refinement class and a Factory class for │ │ │ │ │ +463 // the base level, by populating all topological relations. The need to │ │ │ │ │ +have │ │ │ │ │ +464 // a class construct full topology given only a simple face-vertex list, │ │ │ │ │ +made │ │ │ │ │ +465 // it necessary to write code to define and orient all relations -- and │ │ │ │ │ +most │ │ │ │ │ +466 // of that seemed best placed here. │ │ │ │ │ +467 // │ │ │ │ │ +468 bool completeTopologyFromFaceVertices(); │ │ │ │ │ +469 _I_n_d_e_x findEdge(_I_n_d_e_x v0, _I_n_d_e_x v1, _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y v0Edges) const; │ │ │ │ │ +470 │ │ │ │ │ +471 // Methods supporting the above: │ │ │ │ │ +472 void orientIncidentComponents(); │ │ │ │ │ +473 bool orderVertexFacesAndEdges(_I_n_d_e_x vIndex, _I_n_d_e_x* vFaces, _I_n_d_e_x* vEdges) │ │ │ │ │ +const; │ │ │ │ │ +474 bool orderVertexFacesAndEdges(_I_n_d_e_x vIndex); │ │ │ │ │ +475 void populateLocalIndices(); │ │ │ │ │ +476 │ │ │ │ │ +477 _I_n_d_e_x_A_r_r_a_y shareFaceVertCountsAndOffsets() const; │ │ │ │ │ +478 │ │ │ │ │ +479private: │ │ │ │ │ +480 // Refinement classes (including all subclasses) build a Level: │ │ │ │ │ +481 friend class Refinement; │ │ │ │ │ +482 friend class TriRefinement; │ │ │ │ │ +483 friend class QuadRefinement; │ │ │ │ │ +484 │ │ │ │ │ +485 // │ │ │ │ │ +486 // A Level is independent of subdivision scheme or options. While it may │ │ │ │ │ +have been │ │ │ │ │ +487 // affected by them in its construction, they are not associated with it - │ │ │ │ │ +- a Level │ │ │ │ │ +488 // is pure topology and any subdivision parameters are external. │ │ │ │ │ +489 // │ │ │ │ │ +490 │ │ │ │ │ +491 // Simple members for inventory, etc. │ │ │ │ │ +492 int _faceCount; │ │ │ │ │ +493 int _edgeCount; │ │ │ │ │ +494 int _vertCount; │ │ │ │ │ +495 │ │ │ │ │ +496 // The "depth" member is clearly useful in both the topological splitting │ │ │ │ │ +and the │ │ │ │ │ +497 // stencil queries, but arguably it ties the Level to a hierarchy which │ │ │ │ │ +counters │ │ │ │ │ +498 // the idea of it being independent. │ │ │ │ │ +499 int _depth; │ │ │ │ │ +500 │ │ │ │ │ +501 // Maxima to help clients manage sizing of data buffers. Given "max │ │ │ │ │ +valence", │ │ │ │ │ +502 // the "max edge faces" is strictly redundant as it will always be less, │ │ │ │ │ +but │ │ │ │ │ +503 // since it will typically be so much less (i.e. 2) it is kept for now. │ │ │ │ │ +504 int _maxEdgeFaces; │ │ │ │ │ +505 int _maxValence; │ │ │ │ │ +506 │ │ │ │ │ +507 // │ │ │ │ │ +508 // Topology vectors: │ │ │ │ │ +509 // Note that of all of these, only data for the face-edge relation is not │ │ │ │ │ +510 // stored in the osd::FarTables in any form. The FarTable vectors combine │ │ │ │ │ +511 // the edge-vert and edge-face relations. The eventual goal is that this │ │ │ │ │ +512 // data be part of the osd::Far classes and be a superset of the FarTable │ │ │ │ │ +513 // vectors, i.e. no data duplication or conversion. The fact that FarTable │ │ │ │ │ +514 // already stores 5 of the 6 possible relations should make the topology │ │ │ │ │ +515 // storage as a whole a non-issue. │ │ │ │ │ +516 // │ │ │ │ │ +517 // The vert-face-child and vert-edge-child indices are also arguably not │ │ │ │ │ +518 // a topology relation but more one for parent/child relations. But it is │ │ │ │ │ +519 // a topological relationship, and if named differently would not likely │ │ │ │ │ +520 // raise this. It has been named with "child" in the name as it does play │ │ │ │ │ +521 // a more significant role during subdivision in mapping between parent │ │ │ │ │ +522 // and child components, and so has been named to reflect that more │ │ │ │ │ +clearly. │ │ │ │ │ +523 // │ │ │ │ │ +524 │ │ │ │ │ +525 // Per-face: │ │ │ │ │ +526 std::vector _faceVertCountsAndOffsets; // 2 per face, redundant │ │ │ │ │ +after level 0 │ │ │ │ │ +527 std::vector _faceVertIndices; // 3 or 4 per face, variable at level │ │ │ │ │ +0 │ │ │ │ │ +528 std::vector _faceEdgeIndices; // matches face-vert indices │ │ │ │ │ +529 std::vector _faceTags; // 1 per face: includes "hole" tag │ │ │ │ │ +530 │ │ │ │ │ +531 // Per-edge: │ │ │ │ │ +532 std::vector _edgeVertIndices; // 2 per edge │ │ │ │ │ +533 std::vector _edgeFaceCountsAndOffsets; // 2 per edge │ │ │ │ │ +534 std::vector _edgeFaceIndices; // varies with faces per edge │ │ │ │ │ +535 std::vector _edgeFaceLocalIndices; // varies with faces per │ │ │ │ │ +edge │ │ │ │ │ +536 │ │ │ │ │ +537 std::vector _edgeSharpness; // 1 per edge │ │ │ │ │ +538 std::vector _edgeTags; // 1 per edge: manifold, boundary, etc. │ │ │ │ │ +539 │ │ │ │ │ +540 // Per-vertex: │ │ │ │ │ +541 std::vector _vertFaceCountsAndOffsets; // 2 per vertex │ │ │ │ │ +542 std::vector _vertFaceIndices; // varies with valence │ │ │ │ │ +543 std::vector _vertFaceLocalIndices; // varies with valence, 8- │ │ │ │ │ +bit for now │ │ │ │ │ +544 │ │ │ │ │ +545 std::vector _vertEdgeCountsAndOffsets; // 2 per vertex │ │ │ │ │ +546 std::vector _vertEdgeIndices; // varies with valence │ │ │ │ │ +547 std::vector _vertEdgeLocalIndices; // varies with valence, 8- │ │ │ │ │ +bit for now │ │ │ │ │ +548 │ │ │ │ │ +549 std::vector _vertSharpness; // 1 per vertex │ │ │ │ │ +550 std::vector _vertTags; // 1 per vertex: manifold, Sdc::Rule, etc. │ │ │ │ │ +551 │ │ │ │ │ +552 // Face-varying channels: │ │ │ │ │ +553 std::vector _fvarChannels; │ │ │ │ │ +554}; │ │ │ │ │ +555 │ │ │ │ │ +556// │ │ │ │ │ +557// Access/modify the vertices incident a given face: │ │ │ │ │ +558// │ │ │ │ │ +559inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +560Level::getFaceVertices(_I_n_d_e_x faceIndex) const { │ │ │ │ │ +561 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[_faceVertCountsAndOffsets │ │ │ │ │ +[faceIndex*2+1]], │ │ │ │ │ +562 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ +563} │ │ │ │ │ +564inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +565Level::getFaceVertices(_I_n_d_e_x faceIndex) { │ │ │ │ │ +566 return _I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[_faceVertCountsAndOffsets │ │ │ │ │ +[faceIndex*2+1]], │ │ │ │ │ +567 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ +568} │ │ │ │ │ +569 │ │ │ │ │ +570inline void │ │ │ │ │ +571Level::resizeFaceVertices(_I_n_d_e_x faceIndex, int count) { │ │ │ │ │ +572 │ │ │ │ │ +573 int* countOffsetPair = &_faceVertCountsAndOffsets[faceIndex*2]; │ │ │ │ │ +574 │ │ │ │ │ +575 countOffsetPair[0] = count; │ │ │ │ │ +576 countOffsetPair[1] = (faceIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ +countOffsetPair[-1]); │ │ │ │ │ +577 │ │ │ │ │ +578 _maxValence = std::max(_maxValence, count); │ │ │ │ │ +579} │ │ │ │ │ +580 │ │ │ │ │ +581inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +582Level::getFaceVertices() const { │ │ │ │ │ +583 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[0], (int)_faceVertIndices.size()); │ │ │ │ │ +584} │ │ │ │ │ +585 │ │ │ │ │ +586// │ │ │ │ │ +587// Access/modify the edges incident a given face: │ │ │ │ │ +588// │ │ │ │ │ +589inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +590Level::getFaceEdges(_I_n_d_e_x faceIndex) const { │ │ │ │ │ +591 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceEdgeIndices[_faceVertCountsAndOffsets │ │ │ │ │ +[faceIndex*2+1]], │ │ │ │ │ +592 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ +593} │ │ │ │ │ +594inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +595Level::getFaceEdges(_I_n_d_e_x faceIndex) { │ │ │ │ │ +596 return _I_n_d_e_x_A_r_r_a_y(&_faceEdgeIndices[_faceVertCountsAndOffsets │ │ │ │ │ +[faceIndex*2+1]], │ │ │ │ │ +597 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ +598} │ │ │ │ │ +599 │ │ │ │ │ +600// │ │ │ │ │ +601// Access/modify the faces incident a given vertex: │ │ │ │ │ +602// │ │ │ │ │ +603inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +604Level::getVertexFaces(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +605 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets │ │ │ │ │ +[vertIndex*2+1], │ │ │ │ │ +606 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +607} │ │ │ │ │ +608inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +609Level::getVertexFaces(_I_n_d_e_x vertIndex) { │ │ │ │ │ +610 return _I_n_d_e_x_A_r_r_a_y( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets │ │ │ │ │ +[vertIndex*2+1], │ │ │ │ │ +611 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +612} │ │ │ │ │ +613 │ │ │ │ │ +614inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +615Level::getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +616 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertFaceLocalIndices[0]) + │ │ │ │ │ +_vertFaceCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ +617 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +618} │ │ │ │ │ +619inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +620Level::getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) { │ │ │ │ │ +621 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertFaceLocalIndices[0]) + │ │ │ │ │ +_vertFaceCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ +622 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +623} │ │ │ │ │ +624 │ │ │ │ │ +625inline void │ │ │ │ │ +626Level::resizeVertexFaces(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ +627 int* countOffsetPair = &_vertFaceCountsAndOffsets[vertIndex*2]; │ │ │ │ │ +628 │ │ │ │ │ +629 countOffsetPair[0] = count; │ │ │ │ │ +630 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ +countOffsetPair[-1]); │ │ │ │ │ +631} │ │ │ │ │ +632inline void │ │ │ │ │ +633Level::trimVertexFaces(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ +634 _vertFaceCountsAndOffsets[vertIndex*2] = count; │ │ │ │ │ +635} │ │ │ │ │ +636 │ │ │ │ │ +637// │ │ │ │ │ +638// Access/modify the edges incident a given vertex: │ │ │ │ │ +639// │ │ │ │ │ +640inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +641Level::getVertexEdges(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +642 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets │ │ │ │ │ +[vertIndex*2+1], │ │ │ │ │ +643 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +644} │ │ │ │ │ +645inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +646Level::getVertexEdges(_I_n_d_e_x vertIndex) { │ │ │ │ │ +647 return _I_n_d_e_x_A_r_r_a_y( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets │ │ │ │ │ +[vertIndex*2+1], │ │ │ │ │ +648 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +649} │ │ │ │ │ +650 │ │ │ │ │ +651inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +652Level::getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +653 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeLocalIndices[0]) + │ │ │ │ │ +_vertEdgeCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ +654 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +655} │ │ │ │ │ +656inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +657Level::getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) { │ │ │ │ │ +658 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeLocalIndices[0]) + │ │ │ │ │ +_vertEdgeCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ +659 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ +660} │ │ │ │ │ +661 │ │ │ │ │ +662inline void │ │ │ │ │ +663Level::resizeVertexEdges(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ +664 int* countOffsetPair = &_vertEdgeCountsAndOffsets[vertIndex*2]; │ │ │ │ │ +665 │ │ │ │ │ +666 countOffsetPair[0] = count; │ │ │ │ │ +667 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ +countOffsetPair[-1]); │ │ │ │ │ +668 │ │ │ │ │ +669 _maxValence = std::max(_maxValence, count); │ │ │ │ │ +670} │ │ │ │ │ +671inline void │ │ │ │ │ +672Level::trimVertexEdges(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ +673 _vertEdgeCountsAndOffsets[vertIndex*2] = count; │ │ │ │ │ +674} │ │ │ │ │ +675 │ │ │ │ │ +676inline void │ │ │ │ │ +677Level::setMaxValence(int valence) { │ │ │ │ │ +678 _maxValence = valence; │ │ │ │ │ +679} │ │ │ │ │ +680 │ │ │ │ │ +681// │ │ │ │ │ +682// Access/modify the vertices incident a given edge: │ │ │ │ │ +683// │ │ │ │ │ +684inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +685Level::getEdgeVertices(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ +686 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeVertIndices[edgeIndex*2], 2); │ │ │ │ │ +687} │ │ │ │ │ +688inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +689Level::getEdgeVertices(_I_n_d_e_x edgeIndex) { │ │ │ │ │ +690 return _I_n_d_e_x_A_r_r_a_y(&_edgeVertIndices[edgeIndex*2], 2); │ │ │ │ │ +691} │ │ │ │ │ +692 │ │ │ │ │ +693// │ │ │ │ │ +694// Access/modify the faces incident a given edge: │ │ │ │ │ +695// │ │ │ │ │ +696inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +697Level::getEdgeFaces(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ +698 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeFaceIndices[0] + │ │ │ │ │ +699 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ +700 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ +701} │ │ │ │ │ +702inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +703Level::getEdgeFaces(_I_n_d_e_x edgeIndex) { │ │ │ │ │ +704 return _I_n_d_e_x_A_r_r_a_y(&_edgeFaceIndices[0] + │ │ │ │ │ +705 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ +706 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ +707} │ │ │ │ │ +708 │ │ │ │ │ +709inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +710Level::getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ +711 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y(&_edgeFaceLocalIndices[0] + │ │ │ │ │ +712 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ +713 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ +714} │ │ │ │ │ +715inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +716Level::getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) { │ │ │ │ │ +717 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y(&_edgeFaceLocalIndices[0] + │ │ │ │ │ +718 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ +719 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ +720} │ │ │ │ │ +721 │ │ │ │ │ +722inline void │ │ │ │ │ +723Level::resizeEdgeFaces(_I_n_d_e_x edgeIndex, int count) { │ │ │ │ │ +724 int* countOffsetPair = &_edgeFaceCountsAndOffsets[edgeIndex*2]; │ │ │ │ │ +725 │ │ │ │ │ +726 countOffsetPair[0] = count; │ │ │ │ │ +727 countOffsetPair[1] = (edgeIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ +countOffsetPair[-1]); │ │ │ │ │ +728 │ │ │ │ │ +729 _maxEdgeFaces = std::max(_maxEdgeFaces, count); │ │ │ │ │ +730} │ │ │ │ │ +731inline void │ │ │ │ │ +732Level::trimEdgeFaces(_I_n_d_e_x edgeIndex, int count) { │ │ │ │ │ +733 _edgeFaceCountsAndOffsets[edgeIndex*2] = count; │ │ │ │ │ +734} │ │ │ │ │ +735 │ │ │ │ │ +736// │ │ │ │ │ +737// Access/modify sharpness values: │ │ │ │ │ +738// │ │ │ │ │ +739inline float │ │ │ │ │ +740Level::getEdgeSharpness(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ +741 return _edgeSharpness[edgeIndex]; │ │ │ │ │ +742} │ │ │ │ │ +743inline float& │ │ │ │ │ +744Level::getEdgeSharpness(_I_n_d_e_x edgeIndex) { │ │ │ │ │ +745 return _edgeSharpness[edgeIndex]; │ │ │ │ │ +746} │ │ │ │ │ +747 │ │ │ │ │ +748inline float │ │ │ │ │ +749Level::getVertexSharpness(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +750 return _vertSharpness[vertIndex]; │ │ │ │ │ +751} │ │ │ │ │ +752inline float& │ │ │ │ │ +753Level::getVertexSharpness(_I_n_d_e_x vertIndex) { │ │ │ │ │ +754 return _vertSharpness[vertIndex]; │ │ │ │ │ +755} │ │ │ │ │ +756 │ │ │ │ │ +757inline _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ +758Level::getVertexRule(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +759 return (_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e) _vertTags[vertIndex]._rule; │ │ │ │ │ +760} │ │ │ │ │ +761 │ │ │ │ │ +762// │ │ │ │ │ +763// Access/modify hole tag: │ │ │ │ │ +764// │ │ │ │ │ +765inline void │ │ │ │ │ +766Level::setFaceHole(_I_n_d_e_x faceIndex, bool b) { │ │ │ │ │ +767 _faceTags[faceIndex]._hole = b; │ │ │ │ │ +768} │ │ │ │ │ +769inline bool │ │ │ │ │ +770Level::isFaceHole(_I_n_d_e_x faceIndex) const { │ │ │ │ │ +771 return _faceTags[faceIndex]._hole; │ │ │ │ │ +772} │ │ │ │ │ +773 │ │ │ │ │ +774// │ │ │ │ │ +775// Access/modify non-manifold tags: │ │ │ │ │ +776// │ │ │ │ │ +777inline void │ │ │ │ │ +778Level::setEdgeNonManifold(_I_n_d_e_x edgeIndex, bool b) { │ │ │ │ │ +779 _edgeTags[edgeIndex]._nonManifold = b; │ │ │ │ │ +780} │ │ │ │ │ +781inline bool │ │ │ │ │ +782Level::isEdgeNonManifold(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ +783 return _edgeTags[edgeIndex]._nonManifold; │ │ │ │ │ +784} │ │ │ │ │ +785 │ │ │ │ │ +786inline void │ │ │ │ │ +787Level::setVertexNonManifold(_I_n_d_e_x vertIndex, bool b) { │ │ │ │ │ +788 _vertTags[vertIndex]._nonManifold = b; │ │ │ │ │ +789} │ │ │ │ │ +790inline bool │ │ │ │ │ +791Level::isVertexNonManifold(_I_n_d_e_x vertIndex) const { │ │ │ │ │ +792 return _vertTags[vertIndex]._nonManifold; │ │ │ │ │ +793} │ │ │ │ │ +794 │ │ │ │ │ +795// │ │ │ │ │ +796// Sizing methods to allocate space: │ │ │ │ │ +797// │ │ │ │ │ +798inline void │ │ │ │ │ +799Level::resizeFaces(int faceCount) { │ │ │ │ │ +800 _faceCount = faceCount; │ │ │ │ │ +801 _faceVertCountsAndOffsets.resize(2 * faceCount); │ │ │ │ │ +802 │ │ │ │ │ +803 _faceTags.resize(faceCount); │ │ │ │ │ +804 std::memset((void*) &_faceTags[0], 0, _faceCount * sizeof(FTag)); │ │ │ │ │ +805} │ │ │ │ │ +806inline void │ │ │ │ │ +807Level::resizeFaceVertices(int totalFaceVertCount) { │ │ │ │ │ +808 _faceVertIndices.resize(totalFaceVertCount); │ │ │ │ │ +809} │ │ │ │ │ +810inline void │ │ │ │ │ +811Level::resizeFaceEdges(int totalFaceEdgeCount) { │ │ │ │ │ +812 _faceEdgeIndices.resize(totalFaceEdgeCount); │ │ │ │ │ +813} │ │ │ │ │ +814 │ │ │ │ │ +815inline void │ │ │ │ │ +816Level::resizeEdges(int edgeCount) { │ │ │ │ │ +817 │ │ │ │ │ +818 _edgeCount = edgeCount; │ │ │ │ │ +819 _edgeFaceCountsAndOffsets.resize(2 * edgeCount); │ │ │ │ │ +820 │ │ │ │ │ +821 _edgeSharpness.resize(edgeCount); │ │ │ │ │ +822 _edgeTags.resize(edgeCount); │ │ │ │ │ +823 │ │ │ │ │ +824 if (edgeCount>0) { │ │ │ │ │ +825 std::memset((void*) &_edgeTags[0], 0, _edgeCount * sizeof(ETag)); │ │ │ │ │ +826 } │ │ │ │ │ +827} │ │ │ │ │ +828inline void │ │ │ │ │ +829Level::resizeEdgeVertices() { │ │ │ │ │ +830 │ │ │ │ │ +831 _edgeVertIndices.resize(2 * _edgeCount); │ │ │ │ │ +832} │ │ │ │ │ +833inline void │ │ │ │ │ +834Level::resizeEdgeFaces(int totalEdgeFaceCount) { │ │ │ │ │ +835 │ │ │ │ │ +836 _edgeFaceIndices.resize(totalEdgeFaceCount); │ │ │ │ │ +837 _edgeFaceLocalIndices.resize(totalEdgeFaceCount); │ │ │ │ │ +838} │ │ │ │ │ +839 │ │ │ │ │ +840inline void │ │ │ │ │ +841Level::resizeVertices(int vertCount) { │ │ │ │ │ +842 │ │ │ │ │ +843 _vertCount = vertCount; │ │ │ │ │ +844 _vertFaceCountsAndOffsets.resize(2 * vertCount); │ │ │ │ │ +845 _vertEdgeCountsAndOffsets.resize(2 * vertCount); │ │ │ │ │ +846 │ │ │ │ │ +847 _vertSharpness.resize(vertCount); │ │ │ │ │ +848 _vertTags.resize(vertCount); │ │ │ │ │ +849 std::memset((void*) &_vertTags[0], 0, _vertCount * sizeof(VTag)); │ │ │ │ │ +850} │ │ │ │ │ +851inline void │ │ │ │ │ +852Level::resizeVertexFaces(int totalVertFaceCount) { │ │ │ │ │ +853 │ │ │ │ │ +854 _vertFaceIndices.resize(totalVertFaceCount); │ │ │ │ │ +855 _vertFaceLocalIndices.resize(totalVertFaceCount); │ │ │ │ │ +856} │ │ │ │ │ +857inline void │ │ │ │ │ +858Level::resizeVertexEdges(int totalVertEdgeCount) { │ │ │ │ │ +859 │ │ │ │ │ +860 _vertEdgeIndices.resize(totalVertEdgeCount); │ │ │ │ │ +861 _vertEdgeLocalIndices.resize(totalVertEdgeCount); │ │ │ │ │ +862} │ │ │ │ │ +863 │ │ │ │ │ +864inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +865Level::shareFaceVertCountsAndOffsets() const { │ │ │ │ │ +866 // XXXX manuelk we have to force const casting here (classes don't 'share' │ │ │ │ │ +867 // members usually...) │ │ │ │ │ +868 return _I_n_d_e_x_A_r_r_a_y(const_cast<_I_n_d_e_x *>(&_faceVertCountsAndOffsets[0]), │ │ │ │ │ +869 (int)_faceVertCountsAndOffsets.size()); │ │ │ │ │ +870} │ │ │ │ │ +871 │ │ │ │ │ +872} // end namespace internal │ │ │ │ │ +873} // end namespace Vtr │ │ │ │ │ +874 │ │ │ │ │ +875} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +876using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +877} // end namespace OpenSubdiv │ │ │ │ │ +878 │ │ │ │ │ +879#endif /* OPENSUBDIV3_VTR_LEVEL_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +ConstArray< LocalIndex > ConstLocalIndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +Array< LocalIndex > LocalIndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ +int Index │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ ConstArray< Index > ConstIndexArray │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ +unsigned short LocalIndex │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +Array< Index > IndexArray │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ +Rule │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ + * _l_e_v_e_l_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00758.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/sparseSelector.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarRefinement.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,21 +89,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
sparseSelector.h File Reference
│ │ │ │ +
fvarRefinement.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../sdc/types.h"
│ │ │ │ +#include "../sdc/crease.h"
│ │ │ │ #include "../vtr/types.h"
│ │ │ │ -#include "../vtr/refinement.h"
│ │ │ │ +#include "../vtr/refinement.h"
│ │ │ │ +#include "../vtr/fvarLevel.h"
│ │ │ │ #include <vector>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstring>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -113,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,27 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -sparseSelector.h File Reference │ │ │ │ │ +fvarRefinement.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_c_r_e_a_s_e_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_f_v_a_r_L_e_v_e_l_._h" │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ + * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/sparseSelector.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarRefinement.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
sparseSelector.h
│ │ │ │ +
fvarRefinement.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,98 +118,115 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29#include "../vtr/types.h"
│ │ │ │ -
30#include "../vtr/refinement.h"
│ │ │ │ -
31
│ │ │ │ -
32#include <vector>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Vtr {
│ │ │ │ -
38namespace internal {
│ │ │ │ +
29#include "../sdc/types.h"
│ │ │ │ +
30#include "../sdc/crease.h"
│ │ │ │ +
31#include "../vtr/types.h"
│ │ │ │ +
32#include "../vtr/refinement.h"
│ │ │ │ +
33#include "../vtr/fvarLevel.h"
│ │ │ │ +
34
│ │ │ │ +
35#include <vector>
│ │ │ │ +
36#include <cassert>
│ │ │ │ +
37#include <cstring>
│ │ │ │ +
38
│ │ │ │
39
│ │ │ │ -
40//
│ │ │ │ -
41// SparseSelector:
│ │ │ │ -
42// Class supporting "selection" of components in a Level for sparse Refinement.
│ │ │ │ -
43// The term "selection" here implies interest in the limit for that component, i.e.
│ │ │ │ -
44// the limit point for a selected vertex, the limit patch for a face, etc. So this
│ │ │ │ -
45// class is responsible for ensuring that all neighboring components required to
│ │ │ │ -
46// support the limit of those selected are included in the refinement.
│ │ │ │ -
47//
│ │ │ │ -
48// This class is associated with (and constructed given) a Refinement and its role
│ │ │ │ -
49// is to initialize that Refinement instance for eventual sparse refinement. So it
│ │ │ │ -
50// is a friend of and expected to modify the Refinement as part of the selection.
│ │ │ │ -
51// Given its simplicity and scope it may be worth nesting it in Vtr::Refinement.
│ │ │ │ -
52//
│ │ │ │ -
53// While all three component types -- vertices, edges and faces -- can be selected,
│ │ │ │ -
54// only selection of faces is currently used and actively supported as part of the
│ │ │ │ -
55// feature-adaptive refinement.
│ │ │ │ -
56//
│ │ │ │ -
57class SparseSelector {
│ │ │ │ -
58
│ │ │ │ -
59public:
│ │ │ │ -
60 SparseSelector(Refinement& refine) : _refine(&refine), _selected(false) { }
│ │ │ │ -
61 ~SparseSelector() { }
│ │ │ │ -
62
│ │ │ │ -
63 void setRefinement(Refinement& refine) { _refine = &refine; }
│ │ │ │ -
64 Refinement& getRefinement() const { return *_refine; }
│ │ │ │ -
65
│ │ │ │ -
66 bool isSelectionEmpty() const { return !_selected; }
│ │ │ │ +
40namespace OpenSubdiv {
│ │ │ │ +
41namespace OPENSUBDIV_VERSION {
│ │ │ │ +
42
│ │ │ │ +
43namespace Vtr {
│ │ │ │ +
44namespace internal {
│ │ │ │ +
45
│ │ │ │ +
46//
│ │ │ │ +
47// FVarRefinement:
│ │ │ │ +
48// A face-varying refinement contains data to support the refinement of a
│ │ │ │ +
49// particular face-varying "channel". Just as Refinement maintains a mapping
│ │ │ │ +
50// between the components of a parent Level and its child, the face-varying
│ │ │ │ +
51// analog maintains a mapping between the face-varying values of a parent
│ │ │ │ +
52// FVarLevel and its child.
│ │ │ │ +
53//
│ │ │ │ +
54// It turns out there is little data necessary here, so the class consists
│ │ │ │ +
55// mainly of methods that populate the child FVarLevel. The mapping data in
│ │ │ │ +
56// the refinement between Levels serves most purposes and all that is required
│ │ │ │ +
57// in addition is a mapping from values in the child FVarLevel to the parent.
│ │ │ │ +
58//
│ │ │ │ +
59class FVarRefinement {
│ │ │ │ +
60public:
│ │ │ │ +
61 FVarRefinement(Refinement const& refinement, FVarLevel& parent, FVarLevel& child);
│ │ │ │ +
62 ~FVarRefinement();
│ │ │ │ +
63
│ │ │ │ +
64 int getChildValueParentSource(Index vIndex, int sibling) const {
│ │ │ │ +
65 return _childValueParentSource[_childFVar.getVertexValueOffset(vIndex, (LocalIndex)sibling)];
│ │ │ │ +
66 }
│ │ │ │
67
│ │ │ │ -
68 //
│ │ │ │ -
69 // Methods for selecting (and marking) components for refinement. All component indices
│ │ │ │ -
70 // refer to components in the parent:
│ │ │ │ -
71 //
│ │ │ │ -
72 void selectVertex(Index pVertex);
│ │ │ │ -
73 void selectEdge( Index pEdge);
│ │ │ │ -
74 void selectFace( Index pFace);
│ │ │ │ -
75
│ │ │ │ -
76private:
│ │ │ │ -
77 SparseSelector() : _refine(0), _selected(false) { }
│ │ │ │ -
78
│ │ │ │ -
79 bool wasVertexSelected(Index pVertex) const { return _refine->getParentVertexSparseTag(pVertex)._selected; }
│ │ │ │ -
80 bool wasEdgeSelected( Index pEdge) const { return _refine->getParentEdgeSparseTag(pEdge)._selected; }
│ │ │ │ -
81 bool wasFaceSelected( Index pFace) const { return _refine->getParentFaceSparseTag(pFace)._selected; }
│ │ │ │ -
82
│ │ │ │ -
83 void markVertexSelected(Index pVertex) const { _refine->getParentVertexSparseTag(pVertex)._selected = true; }
│ │ │ │ -
84 void markEdgeSelected( Index pEdge) const { _refine->getParentEdgeSparseTag(pEdge)._selected = true; }
│ │ │ │ -
85 void markFaceSelected( Index pFace) const { _refine->getParentFaceSparseTag(pFace)._selected = true; }
│ │ │ │ -
86
│ │ │ │ -
87 void initializeSelection();
│ │ │ │ +
68 float getFractionalWeight(Index pVert, LocalIndex pSibling,
│ │ │ │ +
69 Index cVert, LocalIndex cSibling) const;
│ │ │ │ +
70
│ │ │ │ +
71
│ │ │ │ +
72 // Modifiers supporting application of the refinement:
│ │ │ │ +
73 void applyRefinement();
│ │ │ │ +
74
│ │ │ │ +
75 void estimateAndAllocateChildValues();
│ │ │ │ +
76 void populateChildValues();
│ │ │ │ +
77 void populateChildValuesFromFaceVertices();
│ │ │ │ +
78 void populateChildValuesFromEdgeVertices();
│ │ │ │ +
79 int populateChildValuesForEdgeVertex(Index cVert, Index pEdge);
│ │ │ │ +
80 void populateChildValuesFromVertexVertices();
│ │ │ │ +
81 int populateChildValuesForVertexVertex(Index cVert, Index pVert);
│ │ │ │ +
82 void trimAndFinalizeChildValues();
│ │ │ │ +
83
│ │ │ │ +
84 void propagateEdgeTags();
│ │ │ │ +
85 void propagateValueTags();
│ │ │ │ +
86 void propagateValueCreases();
│ │ │ │ +
87 void reclassifySemisharpValues();
│ │ │ │
88
│ │ │ │
89private:
│ │ │ │ -
90 Refinement* _refine;
│ │ │ │ -
91 bool _selected;
│ │ │ │ -
92};
│ │ │ │ -
93
│ │ │ │ -
94} // end namespace internal
│ │ │ │ -
95} // end namespace Vtr
│ │ │ │ -
96
│ │ │ │ -
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
98using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
99} // end namespace OpenSubdiv
│ │ │ │ -
100
│ │ │ │ -
101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */
│ │ │ │ - │ │ │ │ +
90 //
│ │ │ │ +
91 // Identify the Refinement, its Levels and assigned FVarLevels for more
│ │ │ │ +
92 // immediate access -- child FVarLevel is non-const as it is to be assigned:
│ │ │ │ +
93 //
│ │ │ │ +
94 Refinement const & _refinement;
│ │ │ │ +
95
│ │ │ │ +
96 Level const & _parentLevel;
│ │ │ │ +
97 FVarLevel const & _parentFVar;
│ │ │ │ +
98
│ │ │ │ +
99 Level const & _childLevel;
│ │ │ │ +
100 FVarLevel & _childFVar;
│ │ │ │ +
101
│ │ │ │ +
102 // When refinement is sparse, we need a mapping between siblings of a vertex
│ │ │ │ +
103 // value in the parent and child -- and for some child values, there will not
│ │ │ │ +
104 // be a parent value, in which case the source of the parent component will
│ │ │ │ +
105 // be stored. So we refer to the parent "source" rather than "sibling":
│ │ │ │ +
106 //
│ │ │ │ +
107 std::vector<LocalIndex> _childValueParentSource;
│ │ │ │ +
108};
│ │ │ │ +
109
│ │ │ │ +
110} // end namespace internal
│ │ │ │ +
111} // end namespace Vtr
│ │ │ │ +
112
│ │ │ │ +
113} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
114using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
115} // end namespace OpenSubdiv
│ │ │ │ +
116
│ │ │ │ +
117#endif /* OPENSUBDIV3_VTR_FVAR_REFINEMENT_H */
│ │ │ │ + │ │ │ │ │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -sparseSelector.h │ │ │ │ │ +fvarRefinement.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,111 +23,118 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../vtr/types.h" │ │ │ │ │ -30#include "../vtr/refinement.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Vtr { │ │ │ │ │ -38namespace internal { │ │ │ │ │ +29#include "../sdc/types.h" │ │ │ │ │ +30#include "../sdc/crease.h" │ │ │ │ │ +31#include "../vtr/types.h" │ │ │ │ │ +32#include "../vtr/refinement.h" │ │ │ │ │ +33#include "../vtr/fvarLevel.h" │ │ │ │ │ +34 │ │ │ │ │ +35#include │ │ │ │ │ +36#include │ │ │ │ │ +37#include │ │ │ │ │ +38 │ │ │ │ │ 39 │ │ │ │ │ -40// │ │ │ │ │ -41// SparseSelector: │ │ │ │ │ -42// Class supporting "selection" of components in a Level for sparse │ │ │ │ │ -Refinement. │ │ │ │ │ -43// The term "selection" here implies interest in the limit for that │ │ │ │ │ -component, i.e. │ │ │ │ │ -44// the limit point for a selected vertex, the limit patch for a face, etc. So │ │ │ │ │ -this │ │ │ │ │ -45// class is responsible for ensuring that all neighboring components required │ │ │ │ │ -to │ │ │ │ │ -46// support the limit of those selected are included in the refinement. │ │ │ │ │ -47// │ │ │ │ │ -48// This class is associated with (and constructed given) a Refinement and its │ │ │ │ │ -role │ │ │ │ │ -49// is to initialize that Refinement instance for eventual sparse refinement. │ │ │ │ │ -So it │ │ │ │ │ -50// is a friend of and expected to modify the Refinement as part of the │ │ │ │ │ -selection. │ │ │ │ │ -51// Given its simplicity and scope it may be worth nesting it in Vtr:: │ │ │ │ │ -Refinement. │ │ │ │ │ -52// │ │ │ │ │ -53// While all three component types -- vertices, edges and faces -- can be │ │ │ │ │ -selected, │ │ │ │ │ -54// only selection of faces is currently used and actively supported as part │ │ │ │ │ -of the │ │ │ │ │ -55// feature-adaptive refinement. │ │ │ │ │ -56// │ │ │ │ │ -57class SparseSelector { │ │ │ │ │ -58 │ │ │ │ │ -59public: │ │ │ │ │ -60 SparseSelector(Refinement& refine) : _refine(&refine), _selected(false) { } │ │ │ │ │ -61 ~SparseSelector() { } │ │ │ │ │ -62 │ │ │ │ │ -63 void setRefinement(Refinement& refine) { _refine = &refine; } │ │ │ │ │ -64 Refinement& getRefinement() const { return *_refine; } │ │ │ │ │ -65 │ │ │ │ │ -66 bool isSelectionEmpty() const { return !_selected; } │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +42 │ │ │ │ │ +43namespace Vtr { │ │ │ │ │ +44namespace internal { │ │ │ │ │ +45 │ │ │ │ │ +46// │ │ │ │ │ +47// FVarRefinement: │ │ │ │ │ +48// A face-varying refinement contains data to support the refinement of a │ │ │ │ │ +49// particular face-varying "channel". Just as Refinement maintains a mapping │ │ │ │ │ +50// between the components of a parent Level and its child, the face-varying │ │ │ │ │ +51// analog maintains a mapping between the face-varying values of a parent │ │ │ │ │ +52// FVarLevel and its child. │ │ │ │ │ +53// │ │ │ │ │ +54// It turns out there is little data necessary here, so the class consists │ │ │ │ │ +55// mainly of methods that populate the child FVarLevel. The mapping data in │ │ │ │ │ +56// the refinement between Levels serves most purposes and all that is │ │ │ │ │ +required │ │ │ │ │ +57// in addition is a mapping from values in the child FVarLevel to the parent. │ │ │ │ │ +58// │ │ │ │ │ +59class FVarRefinement { │ │ │ │ │ +60public: │ │ │ │ │ +61 FVarRefinement(Refinement const& refinement, FVarLevel& parent, FVarLevel& │ │ │ │ │ +child); │ │ │ │ │ +62 ~FVarRefinement(); │ │ │ │ │ +63 │ │ │ │ │ +64 int getChildValueParentSource(_I_n_d_e_x vIndex, int sibling) const { │ │ │ │ │ +65 return _childValueParentSource[_childFVar.getVertexValueOffset(vIndex, │ │ │ │ │ +(_L_o_c_a_l_I_n_d_e_x)sibling)]; │ │ │ │ │ +66 } │ │ │ │ │ 67 │ │ │ │ │ -68 // │ │ │ │ │ -69 // Methods for selecting (and marking) components for refinement. All │ │ │ │ │ -component indices │ │ │ │ │ -70 // refer to components in the parent: │ │ │ │ │ -71 // │ │ │ │ │ -72 void selectVertex(_I_n_d_e_x pVertex); │ │ │ │ │ -73 void selectEdge( _I_n_d_e_x pEdge); │ │ │ │ │ -74 void selectFace( _I_n_d_e_x pFace); │ │ │ │ │ -75 │ │ │ │ │ -76private: │ │ │ │ │ -77 SparseSelector() : _refine(0), _selected(false) { } │ │ │ │ │ -78 │ │ │ │ │ -79 bool wasVertexSelected(_I_n_d_e_x pVertex) const { return _refine- │ │ │ │ │ ->getParentVertexSparseTag(pVertex)._selected; } │ │ │ │ │ -80 bool wasEdgeSelected( _I_n_d_e_x pEdge) const { return _refine- │ │ │ │ │ ->getParentEdgeSparseTag(pEdge)._selected; } │ │ │ │ │ -81 bool wasFaceSelected( _I_n_d_e_x pFace) const { return _refine- │ │ │ │ │ ->getParentFaceSparseTag(pFace)._selected; } │ │ │ │ │ -82 │ │ │ │ │ -83 void markVertexSelected(_I_n_d_e_x pVertex) const { _refine- │ │ │ │ │ ->getParentVertexSparseTag(pVertex)._selected = true; } │ │ │ │ │ -84 void markEdgeSelected( _I_n_d_e_x pEdge) const { _refine->getParentEdgeSparseTag │ │ │ │ │ -(pEdge)._selected = true; } │ │ │ │ │ -85 void markFaceSelected( _I_n_d_e_x pFace) const { _refine->getParentFaceSparseTag │ │ │ │ │ -(pFace)._selected = true; } │ │ │ │ │ -86 │ │ │ │ │ -87 void initializeSelection(); │ │ │ │ │ +68 float getFractionalWeight(_I_n_d_e_x pVert, _L_o_c_a_l_I_n_d_e_x pSibling, │ │ │ │ │ +69 _I_n_d_e_x cVert, _L_o_c_a_l_I_n_d_e_x cSibling) const; │ │ │ │ │ +70 │ │ │ │ │ +71 │ │ │ │ │ +72 // Modifiers supporting application of the refinement: │ │ │ │ │ +73 void applyRefinement(); │ │ │ │ │ +74 │ │ │ │ │ +75 void estimateAndAllocateChildValues(); │ │ │ │ │ +76 void populateChildValues(); │ │ │ │ │ +77 void populateChildValuesFromFaceVertices(); │ │ │ │ │ +78 void populateChildValuesFromEdgeVertices(); │ │ │ │ │ +79 int populateChildValuesForEdgeVertex(_I_n_d_e_x cVert, _I_n_d_e_x pEdge); │ │ │ │ │ +80 void populateChildValuesFromVertexVertices(); │ │ │ │ │ +81 int populateChildValuesForVertexVertex(_I_n_d_e_x cVert, _I_n_d_e_x pVert); │ │ │ │ │ +82 void trimAndFinalizeChildValues(); │ │ │ │ │ +83 │ │ │ │ │ +84 void propagateEdgeTags(); │ │ │ │ │ +85 void propagateValueTags(); │ │ │ │ │ +86 void propagateValueCreases(); │ │ │ │ │ +87 void reclassifySemisharpValues(); │ │ │ │ │ 88 │ │ │ │ │ 89private: │ │ │ │ │ -90 Refinement* _refine; │ │ │ │ │ -91 bool _selected; │ │ │ │ │ -92}; │ │ │ │ │ -93 │ │ │ │ │ -94} // end namespace internal │ │ │ │ │ -95} // end namespace Vtr │ │ │ │ │ -96 │ │ │ │ │ -97} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -98using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -99} // end namespace OpenSubdiv │ │ │ │ │ -100 │ │ │ │ │ -101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */ │ │ │ │ │ +90 // │ │ │ │ │ +91 // Identify the Refinement, its Levels and assigned FVarLevels for more │ │ │ │ │ +92 // immediate access -- child FVarLevel is non-const as it is to be assigned: │ │ │ │ │ +93 // │ │ │ │ │ +94 Refinement const & _refinement; │ │ │ │ │ +95 │ │ │ │ │ +96 Level const & _parentLevel; │ │ │ │ │ +97 FVarLevel const & _parentFVar; │ │ │ │ │ +98 │ │ │ │ │ +99 Level const & _childLevel; │ │ │ │ │ +100 FVarLevel & _childFVar; │ │ │ │ │ +101 │ │ │ │ │ +102 // When refinement is sparse, we need a mapping between siblings of a │ │ │ │ │ +vertex │ │ │ │ │ +103 // value in the parent and child -- and for some child values, there will │ │ │ │ │ +not │ │ │ │ │ +104 // be a parent value, in which case the source of the parent component will │ │ │ │ │ +105 // be stored. So we refer to the parent "source" rather than "sibling": │ │ │ │ │ +106 // │ │ │ │ │ +107 std::vector _childValueParentSource; │ │ │ │ │ +108}; │ │ │ │ │ +109 │ │ │ │ │ +110} // end namespace internal │ │ │ │ │ +111} // end namespace Vtr │ │ │ │ │ +112 │ │ │ │ │ +113} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +114using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +115} // end namespace OpenSubdiv │ │ │ │ │ +116 │ │ │ │ │ +117#endif /* OPENSUBDIV3_VTR_FVAR_REFINEMENT_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ int Index │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ +unsigned short LocalIndex │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ + * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00761.html │ │ │ │ @@ -95,17 +95,17 @@ │ │ │ │ Namespaces │ │ │ │
fvarLevel.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../sdc/types.h"
│ │ │ │ #include "../sdc/crease.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ #include "../vtr/types.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ +#include "../vtr/level.h"
│ │ │ │ #include <vector>
│ │ │ │ #include <cassert>
│ │ │ │ #include <cstring>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00761_source.html │ │ │ │ @@ -534,15 +534,15 @@ │ │ │ │
433} // end namespace Vtr
│ │ │ │
434
│ │ │ │
435} // end namespace OPENSUBDIV_VERSION
│ │ │ │
436using namespace OPENSUBDIV_VERSION;
│ │ │ │
437} // end namespace OpenSubdiv
│ │ │ │
438
│ │ │ │
439#endif /* OPENSUBDIV3_VTR_FVAR_LEVEL_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
ConstArray< LocalIndex > ConstLocalIndexArray
Definition types.h:83
│ │ │ │
Array< LocalIndex > LocalIndexArray
Definition types.h:82
│ │ │ │ │ │ │ │
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/level.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/componentInterfaces.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,26 +89,23 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
level.h File Reference
│ │ │ │ +
componentInterfaces.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../sdc/types.h"
│ │ │ │ #include "../sdc/crease.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ #include "../vtr/types.h"
│ │ │ │ -#include <algorithm>
│ │ │ │ +#include "../vtr/stackBuffer.h"
│ │ │ │ #include <vector>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +115,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -level.h File Reference │ │ │ │ │ +componentInterfaces.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ #include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ #include "_._._/_s_d_c_/_c_r_e_a_s_e_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ #include "_._._/_v_t_r_/_t_y_p_e_s_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _l_e_v_e_l_._h │ │ │ │ │ + * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/level.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/componentInterfaces.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
level.h
│ │ │ │ +
componentInterfaces.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,882 +118,155 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_VTR_LEVEL_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_LEVEL_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H
│ │ │ │ +
25#define OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │
29#include "../sdc/types.h"
│ │ │ │
30#include "../sdc/crease.h"
│ │ │ │ -
31#include "../sdc/options.h"
│ │ │ │ -
32#include "../vtr/types.h"
│ │ │ │ +
31#include "../vtr/types.h"
│ │ │ │ +
32#include "../vtr/stackBuffer.h"
│ │ │ │
33
│ │ │ │ -
34#include <algorithm>
│ │ │ │ -
35#include <vector>
│ │ │ │ -
36#include <cassert>
│ │ │ │ -
37#include <cstring>
│ │ │ │ -
38
│ │ │ │ +
34#include <vector>
│ │ │ │ +
35
│ │ │ │ +
36
│ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │
39
│ │ │ │ -
40namespace OpenSubdiv {
│ │ │ │ -
41namespace OPENSUBDIV_VERSION {
│ │ │ │ +
40namespace Vtr {
│ │ │ │ +
41namespace internal {
│ │ │ │
42
│ │ │ │ -
43namespace Vtr {
│ │ │ │ -
44namespace internal {
│ │ │ │ -
45
│ │ │ │ -
46class Refinement;
│ │ │ │ -
47class TriRefinement;
│ │ │ │ -
48class QuadRefinement;
│ │ │ │ -
49class FVarRefinement;
│ │ │ │ -
50class FVarLevel;
│ │ │ │ +
43//
│ │ │ │ +
44// Simple classes supporting the interfaces required of generic topological
│ │ │ │ +
45// types in the Scheme mask queries, e.g. <typename FACE, VERTEX, etc.>
│ │ │ │ +
46//
│ │ │ │ +
47// These are not used with Vtr but arguably belong with it as the details to
│ │ │ │ +
48// write these efficiently depends very much on intimate details of Vtr's
│ │ │ │ +
49// implementation, e.g. the use of tag bits, subdivision Rules, etc.
│ │ │ │ +
50//
│ │ │ │
51
│ │ │ │ -
52//
│ │ │ │ -
53// Level:
│ │ │ │ -
54// A refinement level includes a vectorized representation of the topology
│ │ │ │ -
55// for a particular subdivision level. The topology is "complete" in that any
│ │ │ │ -
56// level can be used as the base level of another subdivision hierarchy and can
│ │ │ │ -
57// be considered a complete mesh independent of its ancestors. It currently
│ │ │ │ -
58// does contain a "depth" member -- as some inferences can then be made about
│ │ │ │ -
59// the topology (i.e. all quads or all tris if not level 0).
│ │ │ │ -
60//
│ │ │ │ -
61// This class is intended for private use within the library. There are still
│ │ │ │ -
62// opportunities to specialize levels -- e.g. those supporting N-sided faces vs
│ │ │ │ -
63// those that are purely quads or tris -- so we prefer to insulate it from public
│ │ │ │ -
64// access.
│ │ │ │ -
65//
│ │ │ │ -
66// The representation of topology here is to store six topological relationships
│ │ │ │ -
67// in tables of integers. Each is stored in its own array(s) so the result is
│ │ │ │ -
68// a SOA representation of the topology. The six relations are:
│ │ │ │ -
69//
│ │ │ │ -
70// - face-verts: vertices incident/comprising a face
│ │ │ │ -
71// - face-edges: edges incident a face
│ │ │ │ -
72// - edge-verts: vertices incident/comprising an edge
│ │ │ │ -
73// - edge-faces: faces incident an edge
│ │ │ │ -
74// - vert-faces: faces incident a vertex
│ │ │ │ -
75// - vert-edges: edges incident a vertex
│ │ │ │ -
76//
│ │ │ │ -
77// There is some redundancy here but the intent is not that this be a minimal
│ │ │ │ -
78// representation, the intent is that it be amenable to refinement. Classes in
│ │ │ │ -
79// the Far layer essentially store 5 of these 6 in a permuted form -- we add
│ │ │ │ -
80// the face-edges here to simplify refinement.
│ │ │ │ -
81//
│ │ │ │ -
82
│ │ │ │ -
83class Level {
│ │ │ │ +
52
│ │ │ │ +
53//
│ │ │ │ +
54// For <typename FACE>, which provides information in the neighborhood of a face:
│ │ │ │ +
55//
│ │ │ │ +
56class FaceInterface {
│ │ │ │ +
57public:
│ │ │ │ +
58 FaceInterface() { }
│ │ │ │ +
59 FaceInterface(int vertCount) : _vertCount(vertCount) { }
│ │ │ │ +
60 ~FaceInterface() { }
│ │ │ │ +
61
│ │ │ │ +
62public: // Generic interface expected of <typename FACE>:
│ │ │ │ +
63 int GetNumVertices() const { return _vertCount; }
│ │ │ │ +
64
│ │ │ │ +
65private:
│ │ │ │ +
66 int _vertCount;
│ │ │ │ +
67};
│ │ │ │ +
68
│ │ │ │ +
69
│ │ │ │ +
70//
│ │ │ │ +
71// For <typename EDGE>, which provides information in the neighborhood of an edge:
│ │ │ │ +
72//
│ │ │ │ +
73class EdgeInterface {
│ │ │ │ +
74public:
│ │ │ │ +
75 EdgeInterface() { }
│ │ │ │ +
76 EdgeInterface(Level const& level) : _level(&level) { }
│ │ │ │ +
77 ~EdgeInterface() { }
│ │ │ │ +
78
│ │ │ │ +
79 void SetIndex(int edgeIndex) { _eIndex = edgeIndex; }
│ │ │ │ +
80
│ │ │ │ +
81public: // Generic interface expected of <typename EDGE>:
│ │ │ │ +
82 int GetNumFaces() const { return _level->getEdgeFaces(_eIndex).size(); }
│ │ │ │ +
83 float GetSharpness() const { return _level->getEdgeSharpness(_eIndex); }
│ │ │ │
84
│ │ │ │ -
85public:
│ │ │ │ -
86 //
│ │ │ │ -
87 // Simple nested types to hold the tags for each component type -- some of
│ │ │ │ -
88 // which are user-specified features (e.g. whether a face is a hole or not)
│ │ │ │ -
89 // while others indicate the topological nature of the component, how it
│ │ │ │ -
90 // is affected by creasing in its neighborhood, etc.
│ │ │ │ -
91 //
│ │ │ │ -
92 // Most of these properties are passed down to child components during
│ │ │ │ -
93 // refinement, but some -- notably the designation of a component as semi-
│ │ │ │ -
94 // sharp -- require re-determination as sharpness values are reduced at each
│ │ │ │ -
95 // level.
│ │ │ │ -
96 //
│ │ │ │ -
97 struct VTag {
│ │ │ │ -
98 VTag() { }
│ │ │ │ +
85 void GetChildSharpnesses(Sdc::Crease const&, float s[2]) const {
│ │ │ │ +
86 // Need to use the Refinement here to identify the two child edges:
│ │ │ │ +
87 s[0] = s[1] = GetSharpness() - 1.0f;
│ │ │ │ +
88 }
│ │ │ │ +
89
│ │ │ │ +
90 void GetNumVerticesPerFace(int vertsPerFace[]) const {
│ │ │ │ +
91 ConstIndexArray eFaces = _level->getEdgeFaces(_eIndex);
│ │ │ │ +
92 for (int i = 0; i < eFaces.size(); ++i) {
│ │ │ │ +
93 vertsPerFace[i] = _level->getFaceVertices(eFaces[i]).size();
│ │ │ │ +
94 }
│ │ │ │ +
95 }
│ │ │ │ +
96
│ │ │ │ +
97private:
│ │ │ │ +
98 const Level* _level;
│ │ │ │
99
│ │ │ │ -
100 // When cleared, the VTag ALMOST represents a smooth, regular, interior
│ │ │ │ -
101 // vertex -- the Type enum requires a bit be explicitly set for Smooth,
│ │ │ │ -
102 // so that must be done explicitly if desired on initialization.
│ │ │ │ -
103 void clear() { std::memset((void*) this, 0, sizeof(VTag)); }
│ │ │ │ -
104
│ │ │ │ -
105 typedef unsigned short VTagSize;
│ │ │ │ -
106
│ │ │ │ -
107 VTagSize _nonManifold : 1; // fixed
│ │ │ │ -
108 VTagSize _xordinary : 1; // fixed
│ │ │ │ -
109 VTagSize _boundary : 1; // fixed
│ │ │ │ -
110 VTagSize _corner : 1; // fixed
│ │ │ │ -
111 VTagSize _infSharp : 1; // fixed
│ │ │ │ -
112 VTagSize _semiSharp : 1; // variable
│ │ │ │ -
113 VTagSize _semiSharpEdges : 1; // variable
│ │ │ │ -
114 VTagSize _rule : 4; // variable when _semiSharp
│ │ │ │ -
115
│ │ │ │ -
116 // These next to tags are complementary -- the "incomplete" tag is only
│ │ │ │ -
117 // relevant for refined levels while the "incident an irregular face" tag
│ │ │ │ -
118 // is only relevant for the base level. They could be combined as both
│ │ │ │ -
119 // indicate "no full regular ring" around a vertex
│ │ │ │ -
120 VTagSize _incomplete : 1; // variable only set in refined levels
│ │ │ │ -
121 VTagSize _incidIrregFace : 1; // variable only set in base level
│ │ │ │ -
122
│ │ │ │ -
123 // Tags indicating incident infinitely-sharp (permanent) features
│ │ │ │ -
124 VTagSize _infSharpEdges : 1; // fixed
│ │ │ │ -
125 VTagSize _infSharpCrease : 1; // fixed
│ │ │ │ -
126 VTagSize _infIrregular : 1; // fixed
│ │ │ │ -
127
│ │ │ │ -
128 // Alternate constructor and accessor for dealing with integer bits directly:
│ │ │ │ -
129 explicit VTag(VTagSize bits) {
│ │ │ │ -
130 std::memcpy(this, &bits, sizeof(bits));
│ │ │ │ -
131 }
│ │ │ │ -
132 VTagSize getBits() const {
│ │ │ │ -
133 VTagSize bits;
│ │ │ │ -
134 std::memcpy(&bits, this, sizeof(bits));
│ │ │ │ -
135 return bits;
│ │ │ │ -
136 }
│ │ │ │ -
137
│ │ │ │ -
138 static VTag BitwiseOr(VTag const vTags[], int size = 4);
│ │ │ │ -
139 };
│ │ │ │ -
140 struct ETag {
│ │ │ │ -
141 ETag() { }
│ │ │ │ -
142
│ │ │ │ -
143 // When cleared, the ETag represents a smooth, manifold, interior edge
│ │ │ │ -
144 void clear() { std::memset((void*) this, 0, sizeof(ETag)); }
│ │ │ │ -
145
│ │ │ │ -
146 typedef unsigned char ETagSize;
│ │ │ │ -
147
│ │ │ │ -
148 ETagSize _nonManifold : 1; // fixed
│ │ │ │ -
149 ETagSize _boundary : 1; // fixed
│ │ │ │ -
150 ETagSize _infSharp : 1; // fixed
│ │ │ │ -
151 ETagSize _semiSharp : 1; // variable
│ │ │ │ -
152
│ │ │ │ -
153 // Alternate constructor and accessor for dealing with integer bits directly:
│ │ │ │ -
154 explicit ETag(ETagSize bits) {
│ │ │ │ -
155 std::memcpy(this, &bits, sizeof(bits));
│ │ │ │ -
156 }
│ │ │ │ -
157 ETagSize getBits() const {
│ │ │ │ -
158 ETagSize bits;
│ │ │ │ -
159 std::memcpy(&bits, this, sizeof(bits));
│ │ │ │ -
160 return bits;
│ │ │ │ -
161 }
│ │ │ │ -
162
│ │ │ │ -
163 static ETag BitwiseOr(ETag const eTags[], int size = 4);
│ │ │ │ -
164 };
│ │ │ │ -
165 struct FTag {
│ │ │ │ -
166 FTag() { }
│ │ │ │ -
167
│ │ │ │ -
168 void clear() { std::memset((void*) this, 0, sizeof(FTag)); }
│ │ │ │ -
169
│ │ │ │ -
170 typedef unsigned char FTagSize;
│ │ │ │ -
171
│ │ │ │ -
172 FTagSize _hole : 1; // fixed
│ │ │ │ -
173
│ │ │ │ -
174 // On deck -- coming soon...
│ │ │ │ -
175 //FTagSize _hasEdits : 1; // variable
│ │ │ │ -
176 };
│ │ │ │ -
177
│ │ │ │ -
178 // Additional simple struct to identify a "span" around a vertex, i.e. a
│ │ │ │ -
179 // subset of the faces around a vertex delimited by some property (e.g. a
│ │ │ │ -
180 // face-varying discontinuity, an inf-sharp edge, etc.)
│ │ │ │ -
181 //
│ │ │ │ -
182 // The span requires an "origin" and a "size" to fully define its extent.
│ │ │ │ -
183 // Use of the size is required over a leading/trailing pair as the valence
│ │ │ │ -
184 // around a non-manifold vertex cannot be trivially determined from two
│ │ │ │ -
185 // extremeties. Similarly a start face is chosen over an edge as starting
│ │ │ │ -
186 // with a manifold edge is ambiguous. Additional tags also support
│ │ │ │ -
187 // non-manifold cases, e.g. periodic spans at the apex of a double cone.
│ │ │ │ -
188 //
│ │ │ │ -
189 // Currently setting the size to 0 or leaving the span "unassigned" is an
│ │ │ │ -
190 // indication to use the full neighborhood rather than a subset -- prefer
│ │ │ │ -
191 // use of the const method here to direct inspection of the member.
│ │ │ │ -
192 //
│ │ │ │ -
193 struct VSpan {
│ │ │ │ -
194 VSpan() { std::memset((void*) this, 0, sizeof(VSpan)); }
│ │ │ │ -
195
│ │ │ │ -
196 void clear() { std::memset((void*) this, 0, sizeof(VSpan)); }
│ │ │ │ -
197 bool isAssigned() const { return _numFaces > 0; }
│ │ │ │ -
198
│ │ │ │ -
199 LocalIndex _numFaces;
│ │ │ │ -
200 LocalIndex _startFace;
│ │ │ │ -
201 LocalIndex _cornerInSpan;
│ │ │ │ -
202
│ │ │ │ -
203 unsigned short _periodic : 1;
│ │ │ │ -
204 unsigned short _sharp : 1;
│ │ │ │ -
205 };
│ │ │ │ -
206
│ │ │ │ -
207public:
│ │ │ │ -
208 Level();
│ │ │ │ -
209 ~Level();
│ │ │ │ -
210
│ │ │ │ -
211 // Simple accessors:
│ │ │ │ -
212 int getDepth() const { return _depth; }
│ │ │ │ -
213
│ │ │ │ -
214 int getNumVertices() const { return _vertCount; }
│ │ │ │ -
215 int getNumFaces() const { return _faceCount; }
│ │ │ │ -
216 int getNumEdges() const { return _edgeCount; }
│ │ │ │ -
217
│ │ │ │ -
218 // More global sizes may prove useful...
│ │ │ │ -
219 int getNumFaceVerticesTotal() const { return (int) _faceVertIndices.size(); }
│ │ │ │ -
220 int getNumFaceEdgesTotal() const { return (int) _faceEdgeIndices.size(); }
│ │ │ │ -
221 int getNumEdgeVerticesTotal() const { return (int) _edgeVertIndices.size(); }
│ │ │ │ -
222 int getNumEdgeFacesTotal() const { return (int) _edgeFaceIndices.size(); }
│ │ │ │ -
223 int getNumVertexFacesTotal() const { return (int) _vertFaceIndices.size(); }
│ │ │ │ -
224 int getNumVertexEdgesTotal() const { return (int) _vertEdgeIndices.size(); }
│ │ │ │ -
225
│ │ │ │ -
226 int getMaxValence() const { return _maxValence; }
│ │ │ │ -
227 int getMaxEdgeFaces() const { return _maxEdgeFaces; }
│ │ │ │ -
228
│ │ │ │ -
229 // Methods to access the relation tables/indices -- note that for some relations
│ │ │ │ -
230 // (i.e. those where a component is "contained by" a neighbor, or more generally
│ │ │ │ -
231 // when the neighbor is a simplex of higher dimension) we store an additional
│ │ │ │ -
232 // "local index", e.g. for the case of vert-faces if one of the faces F[i] is
│ │ │ │ -
233 // incident a vertex V, then L[i] is the "local index" in F[i] of vertex V.
│ │ │ │ -
234 // Once have only quads (or tris), this local index need only occupy two bits
│ │ │ │ -
235 // and could conceivably be packed into the same integer as the face index, but
│ │ │ │ -
236 // for now, given the need to support faces of potentially high valence we'll
│ │ │ │ -
237 // use an 8- or 16-bit integer.
│ │ │ │ -
238 //
│ │ │ │ -
239 // Methods to access the six topological relations:
│ │ │ │ -
240 ConstIndexArray getFaceVertices(Index faceIndex) const;
│ │ │ │ -
241 ConstIndexArray getFaceEdges(Index faceIndex) const;
│ │ │ │ -
242 ConstIndexArray getEdgeVertices(Index edgeIndex) const;
│ │ │ │ -
243 ConstIndexArray getEdgeFaces(Index edgeIndex) const;
│ │ │ │ -
244 ConstIndexArray getVertexFaces(Index vertIndex) const;
│ │ │ │ -
245 ConstIndexArray getVertexEdges(Index vertIndex) const;
│ │ │ │ -
246
│ │ │ │ -
247 ConstLocalIndexArray getEdgeFaceLocalIndices(Index edgeIndex) const;
│ │ │ │ -
248 ConstLocalIndexArray getVertexFaceLocalIndices(Index vertIndex) const;
│ │ │ │ -
249 ConstLocalIndexArray getVertexEdgeLocalIndices(Index vertIndex) const;
│ │ │ │ -
250
│ │ │ │ -
251 // Replace these with access to sharpness buffers/arrays rather than elements:
│ │ │ │ -
252 float getEdgeSharpness(Index edgeIndex) const;
│ │ │ │ -
253 float getVertexSharpness(Index vertIndex) const;
│ │ │ │ -
254 Sdc::Crease::Rule getVertexRule(Index vertIndex) const;
│ │ │ │ -
255
│ │ │ │ -
256 Index findEdge(Index v0Index, Index v1Index) const;
│ │ │ │ -
257
│ │ │ │ -
258 // Holes
│ │ │ │ -
259 void setFaceHole(Index faceIndex, bool b);
│ │ │ │ -
260 bool isFaceHole(Index faceIndex) const;
│ │ │ │ -
261
│ │ │ │ -
262 // Face-varying
│ │ │ │ -
263 Sdc::Options getFVarOptions(int channel) const;
│ │ │ │ -
264 int getNumFVarChannels() const { return (int) _fvarChannels.size(); }
│ │ │ │ -
265 int getNumFVarValues(int channel) const;
│ │ │ │ -
266 ConstIndexArray getFaceFVarValues(Index faceIndex, int channel) const;
│ │ │ │ -
267
│ │ │ │ -
268 FVarLevel & getFVarLevel(int channel) { return *_fvarChannels[channel]; }
│ │ │ │ -
269 FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels[channel]; }
│ │ │ │ -
270
│ │ │ │ -
271 // Manifold/non-manifold tags:
│ │ │ │ -
272 void setEdgeNonManifold(Index edgeIndex, bool b);
│ │ │ │ -
273 bool isEdgeNonManifold(Index edgeIndex) const;
│ │ │ │ -
274
│ │ │ │ -
275 void setVertexNonManifold(Index vertIndex, bool b);
│ │ │ │ -
276 bool isVertexNonManifold(Index vertIndex) const;
│ │ │ │ -
277
│ │ │ │ -
278 // General access to all component tags:
│ │ │ │ -
279 VTag const & getVertexTag(Index vertIndex) const { return _vertTags[vertIndex]; }
│ │ │ │ -
280 ETag const & getEdgeTag(Index edgeIndex) const { return _edgeTags[edgeIndex]; }
│ │ │ │ -
281 FTag const & getFaceTag(Index faceIndex) const { return _faceTags[faceIndex]; }
│ │ │ │ -
282
│ │ │ │ -
283 VTag & getVertexTag(Index vertIndex) { return _vertTags[vertIndex]; }
│ │ │ │ -
284 ETag & getEdgeTag(Index edgeIndex) { return _edgeTags[edgeIndex]; }
│ │ │ │ -
285 FTag & getFaceTag(Index faceIndex) { return _faceTags[faceIndex]; }
│ │ │ │ -
286
│ │ │ │ -
287public:
│ │ │ │ -
288
│ │ │ │ -
289 // Debugging aides:
│ │ │ │ -
290 enum TopologyError {
│ │ │ │ -
291 TOPOLOGY_MISSING_EDGE_FACES=0,
│ │ │ │ -
292 TOPOLOGY_MISSING_EDGE_VERTS,
│ │ │ │ -
293 TOPOLOGY_MISSING_FACE_EDGES,
│ │ │ │ -
294 TOPOLOGY_MISSING_FACE_VERTS,
│ │ │ │ -
295 TOPOLOGY_MISSING_VERT_FACES,
│ │ │ │ -
296 TOPOLOGY_MISSING_VERT_EDGES,
│ │ │ │ -
297
│ │ │ │ -
298 TOPOLOGY_FAILED_CORRELATION_EDGE_FACE,
│ │ │ │ -
299 TOPOLOGY_FAILED_CORRELATION_FACE_VERT,
│ │ │ │ -
300 TOPOLOGY_FAILED_CORRELATION_FACE_EDGE,
│ │ │ │ -
301
│ │ │ │ -
302 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE,
│ │ │ │ -
303 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE,
│ │ │ │ -
304 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES,
│ │ │ │ -
305
│ │ │ │ -
306 TOPOLOGY_DEGENERATE_EDGE,
│ │ │ │ -
307 TOPOLOGY_NON_MANIFOLD_EDGE,
│ │ │ │ -
308
│ │ │ │ -
309 TOPOLOGY_INVALID_CREASE_EDGE,
│ │ │ │ -
310 TOPOLOGY_INVALID_CREASE_VERT
│ │ │ │ -
311 };
│ │ │ │ -
312
│ │ │ │ -
313 static char const * getTopologyErrorString(TopologyError errCode);
│ │ │ │ -
314
│ │ │ │ -
315 typedef void (* ValidationCallback)(TopologyError errCode, char const * msg, void const * clientData);
│ │ │ │ -
316
│ │ │ │ -
317 bool validateTopology(ValidationCallback callback=0, void const * clientData=0) const;
│ │ │ │ -
318
│ │ │ │ -
319 void print(const Refinement* parentRefinement = 0) const;
│ │ │ │ -
320
│ │ │ │ -
321public:
│ │ │ │ -
322 // High-level topology queries -- these may be moved elsewhere:
│ │ │ │ -
323
│ │ │ │ -
324 bool isSingleCreasePatch(Index face, float* sharpnessOut=NULL, int* rotationOut=NULL) const;
│ │ │ │ -
325
│ │ │ │ -
326 //
│ │ │ │ -
327 // When inspecting topology, the component tags -- particularly VTag and ETag -- are most
│ │ │ │ -
328 // often inspected in groups for the face to which they belong. They are designed to be
│ │ │ │ -
329 // bitwise OR'd (the result then referred to as a "composite" tag) to make quick decisions
│ │ │ │ -
330 // about the face as a whole to avoid tedious topological inspection.
│ │ │ │ -
331 //
│ │ │ │ -
332 // The same logic can be applied to topology in a FVar channel when tags specific to that
│ │ │ │ -
333 // channel are used. Note that the VTags apply to the FVar values assigned to the corners
│ │ │ │ -
334 // of the face and not the vertex as a whole. The "composite" face-varying VTag for a
│ │ │ │ -
335 // vertex is the union of VTags of all distinct FVar values for that vertex.
│ │ │ │ -
336 //
│ │ │ │ -
337 bool doesVertexFVarTopologyMatch(Index vIndex, int fvarChannel) const;
│ │ │ │ -
338 bool doesFaceFVarTopologyMatch( Index fIndex, int fvarChannel) const;
│ │ │ │ -
339 bool doesEdgeFVarTopologyMatch( Index eIndex, int fvarChannel) const;
│ │ │ │ -
340
│ │ │ │ -
341 void getFaceVTags(Index fIndex, VTag vTags[], int fvarChannel = -1) const;
│ │ │ │ -
342 void getFaceETags(Index fIndex, ETag eTags[], int fvarChannel = -1) const;
│ │ │ │ -
343
│ │ │ │ -
344 VTag getFaceCompositeVTag(Index fIndex, int fvarChannel = -1) const;
│ │ │ │ -
345 VTag getFaceCompositeVTag(ConstIndexArray & fVerts) const;
│ │ │ │ -
346
│ │ │ │ -
347 VTag getVertexCompositeFVarVTag(Index vIndex, int fvarChannel) const;
│ │ │ │ -
348
│ │ │ │ -
349 //
│ │ │ │ -
350 // When gathering "patch points" we may want the indices of the vertices or the corresponding
│ │ │ │ -
351 // FVar values for a particular channel. Both are represented and equally accessible within
│ │ │ │ -
352 // the faces, so we allow all to be returned through these methods. Setting the optional FVar
│ │ │ │ -
353 // channel to -1 will retrieve indices of vertices instead of FVar values:
│ │ │ │ -
354 //
│ │ │ │ -
355 int gatherQuadLinearPatchPoints(Index fIndex, Index patchPoints[], int rotation = 0,
│ │ │ │ -
356 int fvarChannel = -1) const;
│ │ │ │ -
357
│ │ │ │ -
358 int gatherQuadRegularInteriorPatchPoints(Index fIndex, Index patchPoints[], int rotation = 0,
│ │ │ │ -
359 int fvarChannel = -1) const;
│ │ │ │ -
360 int gatherQuadRegularBoundaryPatchPoints(Index fIndex, Index patchPoints[], int boundaryEdgeInFace,
│ │ │ │ -
361 int fvarChannel = -1) const;
│ │ │ │ -
362 int gatherQuadRegularCornerPatchPoints( Index fIndex, Index patchPoints[], int cornerVertInFace,
│ │ │ │ -
363 int fvarChannel = -1) const;
│ │ │ │ -
364
│ │ │ │ -
365 int gatherQuadRegularRingAroundVertex(Index vIndex, Index ringPoints[],
│ │ │ │ -
366 int fvarChannel = -1) const;
│ │ │ │ -
367 int gatherQuadRegularPartialRingAroundVertex(Index vIndex, VSpan const & span, Index ringPoints[],
│ │ │ │ -
368 int fvarChannel = -1) const;
│ │ │ │ -
369
│ │ │ │ -
370 // WIP -- for future use, need to extend for face-varying...
│ │ │ │ -
371 int gatherTriRegularInteriorPatchPoints( Index fIndex, Index patchVerts[], int rotation = 0) const;
│ │ │ │ -
372 int gatherTriRegularBoundaryVertexPatchPoints(Index fIndex, Index patchVerts[], int boundaryVertInFace) const;
│ │ │ │ -
373 int gatherTriRegularBoundaryEdgePatchPoints( Index fIndex, Index patchVerts[], int boundaryEdgeInFace) const;
│ │ │ │ -
374 int gatherTriRegularCornerVertexPatchPoints( Index fIndex, Index patchVerts[], int cornerVertInFace) const;
│ │ │ │ -
375 int gatherTriRegularCornerEdgePatchPoints( Index fIndex, Index patchVerts[], int cornerEdgeInFace) const;
│ │ │ │ -
376
│ │ │ │ -
377public:
│ │ │ │ -
378 // Sizing methods used to construct a level to populate:
│ │ │ │ -
379 void resizeFaces( int numFaces);
│ │ │ │ -
380 void resizeFaceVertices(int numFaceVertsTotal);
│ │ │ │ -
381 void resizeFaceEdges( int numFaceEdgesTotal);
│ │ │ │ -
382
│ │ │ │ -
383 void resizeEdges( int numEdges);
│ │ │ │ -
384 void resizeEdgeVertices(); // always 2*edgeCount
│ │ │ │ -
385 void resizeEdgeFaces(int numEdgeFacesTotal);
│ │ │ │ -
386
│ │ │ │ -
387 void resizeVertices( int numVertices);
│ │ │ │ -
388 void resizeVertexFaces(int numVertexFacesTotal);
│ │ │ │ -
389 void resizeVertexEdges(int numVertexEdgesTotal);
│ │ │ │ -
390
│ │ │ │ -
391 void setMaxValence(int maxValence);
│ │ │ │ -
392
│ │ │ │ -
393 // Modifiers to populate the relations for each component:
│ │ │ │ -
394 IndexArray getFaceVertices(Index faceIndex);
│ │ │ │ -
395 IndexArray getFaceEdges(Index faceIndex);
│ │ │ │ -
396 IndexArray getEdgeVertices(Index edgeIndex);
│ │ │ │ -
397 IndexArray getEdgeFaces(Index edgeIndex);
│ │ │ │ -
398 IndexArray getVertexFaces(Index vertIndex);
│ │ │ │ -
399 IndexArray getVertexEdges(Index vertIndex);
│ │ │ │ -
400
│ │ │ │ -
401 LocalIndexArray getEdgeFaceLocalIndices(Index edgeIndex);
│ │ │ │ -
402 LocalIndexArray getVertexFaceLocalIndices(Index vertIndex);
│ │ │ │ -
403 LocalIndexArray getVertexEdgeLocalIndices(Index vertIndex);
│ │ │ │ -
404
│ │ │ │ -
405 // Replace these with access to sharpness buffers/arrays rather than elements:
│ │ │ │ -
406 float& getEdgeSharpness(Index edgeIndex);
│ │ │ │ -
407 float& getVertexSharpness(Index vertIndex);
│ │ │ │ -
408
│ │ │ │ -
409 // Create, destroy and populate face-varying channels:
│ │ │ │ -
410 int createFVarChannel(int fvarValueCount, Sdc::Options const& options);
│ │ │ │ -
411 void destroyFVarChannel(int channel);
│ │ │ │ -
412
│ │ │ │ -
413 IndexArray getFaceFVarValues(Index faceIndex, int channel);
│ │ │ │ -
414
│ │ │ │ -
415 void completeFVarChannelTopology(int channel, int regBoundaryValence);
│ │ │ │ -
416
│ │ │ │ -
417 // Counts and offsets for all relation types:
│ │ │ │ -
418 // - these may be unwarranted if we let Refinement access members directly...
│ │ │ │ -
419 int getNumFaceVertices( Index faceIndex) const { return _faceVertCountsAndOffsets[2*faceIndex]; }
│ │ │ │ -
420 int getOffsetOfFaceVertices(Index faceIndex) const { return _faceVertCountsAndOffsets[2*faceIndex + 1]; }
│ │ │ │ -
421
│ │ │ │ -
422 int getNumFaceEdges( Index faceIndex) const { return getNumFaceVertices(faceIndex); }
│ │ │ │ -
423 int getOffsetOfFaceEdges(Index faceIndex) const { return getOffsetOfFaceVertices(faceIndex); }
│ │ │ │ -
424
│ │ │ │ -
425 int getNumEdgeVertices( Index ) const { return 2; }
│ │ │ │ -
426 int getOffsetOfEdgeVertices(Index edgeIndex) const { return 2 * edgeIndex; }
│ │ │ │ -
427
│ │ │ │ -
428 int getNumEdgeFaces( Index edgeIndex) const { return _edgeFaceCountsAndOffsets[2*edgeIndex]; }
│ │ │ │ -
429 int getOffsetOfEdgeFaces(Index edgeIndex) const { return _edgeFaceCountsAndOffsets[2*edgeIndex + 1]; }
│ │ │ │ -
430
│ │ │ │ -
431 int getNumVertexFaces( Index vertIndex) const { return _vertFaceCountsAndOffsets[2*vertIndex]; }
│ │ │ │ -
432 int getOffsetOfVertexFaces(Index vertIndex) const { return _vertFaceCountsAndOffsets[2*vertIndex + 1]; }
│ │ │ │ -
433
│ │ │ │ -
434 int getNumVertexEdges( Index vertIndex) const { return _vertEdgeCountsAndOffsets[2*vertIndex]; }
│ │ │ │ -
435 int getOffsetOfVertexEdges(Index vertIndex) const { return _vertEdgeCountsAndOffsets[2*vertIndex + 1]; }
│ │ │ │ -
436
│ │ │ │ -
437 ConstIndexArray getFaceVertices() const;
│ │ │ │ -
438
│ │ │ │ -
439 //
│ │ │ │ -
440 // Note that for some relations, the size of the relations for a child component
│ │ │ │ -
441 // can vary radically from its parent due to the sparsity of the refinement. So
│ │ │ │ -
442 // in these cases a few additional utilities are provided to help define the set
│ │ │ │ -
443 // of incident components. Assuming adequate memory has been allocated, the
│ │ │ │ -
444 // "resize" methods here initialize the set of incident components by setting
│ │ │ │ -
445 // both the size and the appropriate offset, while "trim" is use to quickly lower
│ │ │ │ -
446 // the size from an upper bound and nothing else.
│ │ │ │ -
447 //
│ │ │ │ -
448 void resizeFaceVertices(Index FaceIndex, int count);
│ │ │ │ -
449
│ │ │ │ -
450 void resizeEdgeFaces(Index edgeIndex, int count);
│ │ │ │ -
451 void trimEdgeFaces( Index edgeIndex, int count);
│ │ │ │ -
452
│ │ │ │ -
453 void resizeVertexFaces(Index vertIndex, int count);
│ │ │ │ -
454 void trimVertexFaces( Index vertIndex, int count);
│ │ │ │ -
455
│ │ │ │ -
456 void resizeVertexEdges(Index vertIndex, int count);
│ │ │ │ -
457 void trimVertexEdges( Index vertIndex, int count);
│ │ │ │ -
458
│ │ │ │ -
459public:
│ │ │ │ -
460 //
│ │ │ │ -
461 // Initial plans were to have a few specific classes properly construct the
│ │ │ │ -
462 // topology from scratch, e.g. the Refinement class and a Factory class for
│ │ │ │ -
463 // the base level, by populating all topological relations. The need to have
│ │ │ │ -
464 // a class construct full topology given only a simple face-vertex list, made
│ │ │ │ -
465 // it necessary to write code to define and orient all relations -- and most
│ │ │ │ -
466 // of that seemed best placed here.
│ │ │ │ -
467 //
│ │ │ │ -
468 bool completeTopologyFromFaceVertices();
│ │ │ │ -
469 Index findEdge(Index v0, Index v1, ConstIndexArray v0Edges) const;
│ │ │ │ -
470
│ │ │ │ -
471 // Methods supporting the above:
│ │ │ │ -
472 void orientIncidentComponents();
│ │ │ │ -
473 bool orderVertexFacesAndEdges(Index vIndex, Index* vFaces, Index* vEdges) const;
│ │ │ │ -
474 bool orderVertexFacesAndEdges(Index vIndex);
│ │ │ │ -
475 void populateLocalIndices();
│ │ │ │ -
476
│ │ │ │ -
477 IndexArray shareFaceVertCountsAndOffsets() const;
│ │ │ │ -
478
│ │ │ │ -
479private:
│ │ │ │ -
480 // Refinement classes (including all subclasses) build a Level:
│ │ │ │ -
481 friend class Refinement;
│ │ │ │ -
482 friend class TriRefinement;
│ │ │ │ -
483 friend class QuadRefinement;
│ │ │ │ -
484
│ │ │ │ -
485 //
│ │ │ │ -
486 // A Level is independent of subdivision scheme or options. While it may have been
│ │ │ │ -
487 // affected by them in its construction, they are not associated with it -- a Level
│ │ │ │ -
488 // is pure topology and any subdivision parameters are external.
│ │ │ │ -
489 //
│ │ │ │ -
490
│ │ │ │ -
491 // Simple members for inventory, etc.
│ │ │ │ -
492 int _faceCount;
│ │ │ │ -
493 int _edgeCount;
│ │ │ │ -
494 int _vertCount;
│ │ │ │ -
495
│ │ │ │ -
496 // The "depth" member is clearly useful in both the topological splitting and the
│ │ │ │ -
497 // stencil queries, but arguably it ties the Level to a hierarchy which counters
│ │ │ │ -
498 // the idea of it being independent.
│ │ │ │ -
499 int _depth;
│ │ │ │ -
500
│ │ │ │ -
501 // Maxima to help clients manage sizing of data buffers. Given "max valence",
│ │ │ │ -
502 // the "max edge faces" is strictly redundant as it will always be less, but
│ │ │ │ -
503 // since it will typically be so much less (i.e. 2) it is kept for now.
│ │ │ │ -
504 int _maxEdgeFaces;
│ │ │ │ -
505 int _maxValence;
│ │ │ │ -
506
│ │ │ │ -
507 //
│ │ │ │ -
508 // Topology vectors:
│ │ │ │ -
509 // Note that of all of these, only data for the face-edge relation is not
│ │ │ │ -
510 // stored in the osd::FarTables in any form. The FarTable vectors combine
│ │ │ │ -
511 // the edge-vert and edge-face relations. The eventual goal is that this
│ │ │ │ -
512 // data be part of the osd::Far classes and be a superset of the FarTable
│ │ │ │ -
513 // vectors, i.e. no data duplication or conversion. The fact that FarTable
│ │ │ │ -
514 // already stores 5 of the 6 possible relations should make the topology
│ │ │ │ -
515 // storage as a whole a non-issue.
│ │ │ │ -
516 //
│ │ │ │ -
517 // The vert-face-child and vert-edge-child indices are also arguably not
│ │ │ │ -
518 // a topology relation but more one for parent/child relations. But it is
│ │ │ │ -
519 // a topological relationship, and if named differently would not likely
│ │ │ │ -
520 // raise this. It has been named with "child" in the name as it does play
│ │ │ │ -
521 // a more significant role during subdivision in mapping between parent
│ │ │ │ -
522 // and child components, and so has been named to reflect that more clearly.
│ │ │ │ -
523 //
│ │ │ │ -
524
│ │ │ │ -
525 // Per-face:
│ │ │ │ -
526 std::vector<Index> _faceVertCountsAndOffsets; // 2 per face, redundant after level 0
│ │ │ │ -
527 std::vector<Index> _faceVertIndices; // 3 or 4 per face, variable at level 0
│ │ │ │ -
528 std::vector<Index> _faceEdgeIndices; // matches face-vert indices
│ │ │ │ -
529 std::vector<FTag> _faceTags; // 1 per face: includes "hole" tag
│ │ │ │ -
530
│ │ │ │ -
531 // Per-edge:
│ │ │ │ -
532 std::vector<Index> _edgeVertIndices; // 2 per edge
│ │ │ │ -
533 std::vector<Index> _edgeFaceCountsAndOffsets; // 2 per edge
│ │ │ │ -
534 std::vector<Index> _edgeFaceIndices; // varies with faces per edge
│ │ │ │ -
535 std::vector<LocalIndex> _edgeFaceLocalIndices; // varies with faces per edge
│ │ │ │ -
536
│ │ │ │ -
537 std::vector<float> _edgeSharpness; // 1 per edge
│ │ │ │ -
538 std::vector<ETag> _edgeTags; // 1 per edge: manifold, boundary, etc.
│ │ │ │ -
539
│ │ │ │ -
540 // Per-vertex:
│ │ │ │ -
541 std::vector<Index> _vertFaceCountsAndOffsets; // 2 per vertex
│ │ │ │ -
542 std::vector<Index> _vertFaceIndices; // varies with valence
│ │ │ │ -
543 std::vector<LocalIndex> _vertFaceLocalIndices; // varies with valence, 8-bit for now
│ │ │ │ -
544
│ │ │ │ -
545 std::vector<Index> _vertEdgeCountsAndOffsets; // 2 per vertex
│ │ │ │ -
546 std::vector<Index> _vertEdgeIndices; // varies with valence
│ │ │ │ -
547 std::vector<LocalIndex> _vertEdgeLocalIndices; // varies with valence, 8-bit for now
│ │ │ │ -
548
│ │ │ │ -
549 std::vector<float> _vertSharpness; // 1 per vertex
│ │ │ │ -
550 std::vector<VTag> _vertTags; // 1 per vertex: manifold, Sdc::Rule, etc.
│ │ │ │ -
551
│ │ │ │ -
552 // Face-varying channels:
│ │ │ │ -
553 std::vector<FVarLevel*> _fvarChannels;
│ │ │ │ -
554};
│ │ │ │ -
555
│ │ │ │ -
556//
│ │ │ │ -
557// Access/modify the vertices incident a given face:
│ │ │ │ -
558//
│ │ │ │ -
559inline ConstIndexArray
│ │ │ │ -
560Level::getFaceVertices(Index faceIndex) const {
│ │ │ │ -
561 return ConstIndexArray(&_faceVertIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ -
562 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ -
563}
│ │ │ │ -
564inline IndexArray
│ │ │ │ -
565Level::getFaceVertices(Index faceIndex) {
│ │ │ │ -
566 return IndexArray(&_faceVertIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ -
567 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ -
568}
│ │ │ │ -
569
│ │ │ │ -
570inline void
│ │ │ │ -
571Level::resizeFaceVertices(Index faceIndex, int count) {
│ │ │ │ -
572
│ │ │ │ -
573 int* countOffsetPair = &_faceVertCountsAndOffsets[faceIndex*2];
│ │ │ │ -
574
│ │ │ │ -
575 countOffsetPair[0] = count;
│ │ │ │ -
576 countOffsetPair[1] = (faceIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ -
577
│ │ │ │ -
578 _maxValence = std::max(_maxValence, count);
│ │ │ │ -
579}
│ │ │ │ -
580
│ │ │ │ -
581inline ConstIndexArray
│ │ │ │ -
582Level::getFaceVertices() const {
│ │ │ │ -
583 return ConstIndexArray(&_faceVertIndices[0], (int)_faceVertIndices.size());
│ │ │ │ -
584}
│ │ │ │ -
585
│ │ │ │ -
586//
│ │ │ │ -
587// Access/modify the edges incident a given face:
│ │ │ │ -
588//
│ │ │ │ -
589inline ConstIndexArray
│ │ │ │ -
590Level::getFaceEdges(Index faceIndex) const {
│ │ │ │ -
591 return ConstIndexArray(&_faceEdgeIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ -
592 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ -
593}
│ │ │ │ -
594inline IndexArray
│ │ │ │ -
595Level::getFaceEdges(Index faceIndex) {
│ │ │ │ -
596 return IndexArray(&_faceEdgeIndices[_faceVertCountsAndOffsets[faceIndex*2+1]],
│ │ │ │ -
597 _faceVertCountsAndOffsets[faceIndex*2]);
│ │ │ │ -
598}
│ │ │ │ -
599
│ │ │ │ -
600//
│ │ │ │ -
601// Access/modify the faces incident a given vertex:
│ │ │ │ -
602//
│ │ │ │ -
603inline ConstIndexArray
│ │ │ │ -
604Level::getVertexFaces(Index vertIndex) const {
│ │ │ │ -
605 return ConstIndexArray( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
606 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
607}
│ │ │ │ -
608inline IndexArray
│ │ │ │ -
609Level::getVertexFaces(Index vertIndex) {
│ │ │ │ -
610 return IndexArray( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
611 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
612}
│ │ │ │ -
613
│ │ │ │ - │ │ │ │ -
615Level::getVertexFaceLocalIndices(Index vertIndex) const {
│ │ │ │ -
616 return ConstLocalIndexArray( (&_vertFaceLocalIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
617 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
618}
│ │ │ │ -
619inline LocalIndexArray
│ │ │ │ -
620Level::getVertexFaceLocalIndices(Index vertIndex) {
│ │ │ │ -
621 return LocalIndexArray( (&_vertFaceLocalIndices[0]) + _vertFaceCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
622 _vertFaceCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
623}
│ │ │ │ -
624
│ │ │ │ -
625inline void
│ │ │ │ -
626Level::resizeVertexFaces(Index vertIndex, int count) {
│ │ │ │ -
627 int* countOffsetPair = &_vertFaceCountsAndOffsets[vertIndex*2];
│ │ │ │ -
628
│ │ │ │ -
629 countOffsetPair[0] = count;
│ │ │ │ -
630 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ -
631}
│ │ │ │ -
632inline void
│ │ │ │ -
633Level::trimVertexFaces(Index vertIndex, int count) {
│ │ │ │ -
634 _vertFaceCountsAndOffsets[vertIndex*2] = count;
│ │ │ │ -
635}
│ │ │ │ -
636
│ │ │ │ -
637//
│ │ │ │ -
638// Access/modify the edges incident a given vertex:
│ │ │ │ -
639//
│ │ │ │ -
640inline ConstIndexArray
│ │ │ │ -
641Level::getVertexEdges(Index vertIndex) const {
│ │ │ │ -
642 return ConstIndexArray( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
643 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
644}
│ │ │ │ -
645inline IndexArray
│ │ │ │ -
646Level::getVertexEdges(Index vertIndex) {
│ │ │ │ -
647 return IndexArray( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
648 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
649}
│ │ │ │ -
650
│ │ │ │ - │ │ │ │ -
652Level::getVertexEdgeLocalIndices(Index vertIndex) const {
│ │ │ │ -
653 return ConstLocalIndexArray( (&_vertEdgeLocalIndices[0]) + _vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
654 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
655}
│ │ │ │ -
656inline LocalIndexArray
│ │ │ │ -
657Level::getVertexEdgeLocalIndices(Index vertIndex) {
│ │ │ │ -
658 return LocalIndexArray( (&_vertEdgeLocalIndices[0]) + _vertEdgeCountsAndOffsets[vertIndex*2+1],
│ │ │ │ -
659 _vertEdgeCountsAndOffsets[vertIndex*2]);
│ │ │ │ -
660}
│ │ │ │ -
661
│ │ │ │ -
662inline void
│ │ │ │ -
663Level::resizeVertexEdges(Index vertIndex, int count) {
│ │ │ │ -
664 int* countOffsetPair = &_vertEdgeCountsAndOffsets[vertIndex*2];
│ │ │ │ -
665
│ │ │ │ -
666 countOffsetPair[0] = count;
│ │ │ │ -
667 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ -
668
│ │ │ │ -
669 _maxValence = std::max(_maxValence, count);
│ │ │ │ -
670}
│ │ │ │ -
671inline void
│ │ │ │ -
672Level::trimVertexEdges(Index vertIndex, int count) {
│ │ │ │ -
673 _vertEdgeCountsAndOffsets[vertIndex*2] = count;
│ │ │ │ -
674}
│ │ │ │ -
675
│ │ │ │ -
676inline void
│ │ │ │ -
677Level::setMaxValence(int valence) {
│ │ │ │ -
678 _maxValence = valence;
│ │ │ │ -
679}
│ │ │ │ -
680
│ │ │ │ -
681//
│ │ │ │ -
682// Access/modify the vertices incident a given edge:
│ │ │ │ -
683//
│ │ │ │ -
684inline ConstIndexArray
│ │ │ │ -
685Level::getEdgeVertices(Index edgeIndex) const {
│ │ │ │ -
686 return ConstIndexArray(&_edgeVertIndices[edgeIndex*2], 2);
│ │ │ │ -
687}
│ │ │ │ -
688inline IndexArray
│ │ │ │ -
689Level::getEdgeVertices(Index edgeIndex) {
│ │ │ │ -
690 return IndexArray(&_edgeVertIndices[edgeIndex*2], 2);
│ │ │ │ -
691}
│ │ │ │ -
692
│ │ │ │ -
693//
│ │ │ │ -
694// Access/modify the faces incident a given edge:
│ │ │ │ -
695//
│ │ │ │ -
696inline ConstIndexArray
│ │ │ │ -
697Level::getEdgeFaces(Index edgeIndex) const {
│ │ │ │ -
698 return ConstIndexArray(&_edgeFaceIndices[0] +
│ │ │ │ -
699 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ -
700 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ -
701}
│ │ │ │ -
702inline IndexArray
│ │ │ │ -
703Level::getEdgeFaces(Index edgeIndex) {
│ │ │ │ -
704 return IndexArray(&_edgeFaceIndices[0] +
│ │ │ │ -
705 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ -
706 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ -
707}
│ │ │ │ -
708
│ │ │ │ - │ │ │ │ -
710Level::getEdgeFaceLocalIndices(Index edgeIndex) const {
│ │ │ │ -
711 return ConstLocalIndexArray(&_edgeFaceLocalIndices[0] +
│ │ │ │ -
712 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ -
713 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ -
714}
│ │ │ │ -
715inline LocalIndexArray
│ │ │ │ -
716Level::getEdgeFaceLocalIndices(Index edgeIndex) {
│ │ │ │ -
717 return LocalIndexArray(&_edgeFaceLocalIndices[0] +
│ │ │ │ -
718 _edgeFaceCountsAndOffsets[edgeIndex*2+1],
│ │ │ │ -
719 _edgeFaceCountsAndOffsets[edgeIndex*2]);
│ │ │ │ -
720}
│ │ │ │ -
721
│ │ │ │ -
722inline void
│ │ │ │ -
723Level::resizeEdgeFaces(Index edgeIndex, int count) {
│ │ │ │ -
724 int* countOffsetPair = &_edgeFaceCountsAndOffsets[edgeIndex*2];
│ │ │ │ -
725
│ │ │ │ -
726 countOffsetPair[0] = count;
│ │ │ │ -
727 countOffsetPair[1] = (edgeIndex == 0) ? 0 : (countOffsetPair[-2] + countOffsetPair[-1]);
│ │ │ │ -
728
│ │ │ │ -
729 _maxEdgeFaces = std::max(_maxEdgeFaces, count);
│ │ │ │ -
730}
│ │ │ │ -
731inline void
│ │ │ │ -
732Level::trimEdgeFaces(Index edgeIndex, int count) {
│ │ │ │ -
733 _edgeFaceCountsAndOffsets[edgeIndex*2] = count;
│ │ │ │ -
734}
│ │ │ │ -
735
│ │ │ │ -
736//
│ │ │ │ -
737// Access/modify sharpness values:
│ │ │ │ -
738//
│ │ │ │ -
739inline float
│ │ │ │ -
740Level::getEdgeSharpness(Index edgeIndex) const {
│ │ │ │ -
741 return _edgeSharpness[edgeIndex];
│ │ │ │ -
742}
│ │ │ │ -
743inline float&
│ │ │ │ -
744Level::getEdgeSharpness(Index edgeIndex) {
│ │ │ │ -
745 return _edgeSharpness[edgeIndex];
│ │ │ │ -
746}
│ │ │ │ -
747
│ │ │ │ -
748inline float
│ │ │ │ -
749Level::getVertexSharpness(Index vertIndex) const {
│ │ │ │ -
750 return _vertSharpness[vertIndex];
│ │ │ │ -
751}
│ │ │ │ -
752inline float&
│ │ │ │ -
753Level::getVertexSharpness(Index vertIndex) {
│ │ │ │ -
754 return _vertSharpness[vertIndex];
│ │ │ │ -
755}
│ │ │ │ -
756
│ │ │ │ - │ │ │ │ -
758Level::getVertexRule(Index vertIndex) const {
│ │ │ │ -
759 return (Sdc::Crease::Rule) _vertTags[vertIndex]._rule;
│ │ │ │ -
760}
│ │ │ │ -
761
│ │ │ │ -
762//
│ │ │ │ -
763// Access/modify hole tag:
│ │ │ │ -
764//
│ │ │ │ -
765inline void
│ │ │ │ -
766Level::setFaceHole(Index faceIndex, bool b) {
│ │ │ │ -
767 _faceTags[faceIndex]._hole = b;
│ │ │ │ -
768}
│ │ │ │ -
769inline bool
│ │ │ │ -
770Level::isFaceHole(Index faceIndex) const {
│ │ │ │ -
771 return _faceTags[faceIndex]._hole;
│ │ │ │ -
772}
│ │ │ │ -
773
│ │ │ │ -
774//
│ │ │ │ -
775// Access/modify non-manifold tags:
│ │ │ │ -
776//
│ │ │ │ -
777inline void
│ │ │ │ -
778Level::setEdgeNonManifold(Index edgeIndex, bool b) {
│ │ │ │ -
779 _edgeTags[edgeIndex]._nonManifold = b;
│ │ │ │ -
780}
│ │ │ │ -
781inline bool
│ │ │ │ -
782Level::isEdgeNonManifold(Index edgeIndex) const {
│ │ │ │ -
783 return _edgeTags[edgeIndex]._nonManifold;
│ │ │ │ -
784}
│ │ │ │ -
785
│ │ │ │ -
786inline void
│ │ │ │ -
787Level::setVertexNonManifold(Index vertIndex, bool b) {
│ │ │ │ -
788 _vertTags[vertIndex]._nonManifold = b;
│ │ │ │ -
789}
│ │ │ │ -
790inline bool
│ │ │ │ -
791Level::isVertexNonManifold(Index vertIndex) const {
│ │ │ │ -
792 return _vertTags[vertIndex]._nonManifold;
│ │ │ │ -
793}
│ │ │ │ -
794
│ │ │ │ -
795//
│ │ │ │ -
796// Sizing methods to allocate space:
│ │ │ │ -
797//
│ │ │ │ -
798inline void
│ │ │ │ -
799Level::resizeFaces(int faceCount) {
│ │ │ │ -
800 _faceCount = faceCount;
│ │ │ │ -
801 _faceVertCountsAndOffsets.resize(2 * faceCount);
│ │ │ │ -
802
│ │ │ │ -
803 _faceTags.resize(faceCount);
│ │ │ │ -
804 std::memset((void*) &_faceTags[0], 0, _faceCount * sizeof(FTag));
│ │ │ │ -
805}
│ │ │ │ -
806inline void
│ │ │ │ -
807Level::resizeFaceVertices(int totalFaceVertCount) {
│ │ │ │ -
808 _faceVertIndices.resize(totalFaceVertCount);
│ │ │ │ -
809}
│ │ │ │ -
810inline void
│ │ │ │ -
811Level::resizeFaceEdges(int totalFaceEdgeCount) {
│ │ │ │ -
812 _faceEdgeIndices.resize(totalFaceEdgeCount);
│ │ │ │ -
813}
│ │ │ │ -
814
│ │ │ │ -
815inline void
│ │ │ │ -
816Level::resizeEdges(int edgeCount) {
│ │ │ │ -
817
│ │ │ │ -
818 _edgeCount = edgeCount;
│ │ │ │ -
819 _edgeFaceCountsAndOffsets.resize(2 * edgeCount);
│ │ │ │ -
820
│ │ │ │ -
821 _edgeSharpness.resize(edgeCount);
│ │ │ │ -
822 _edgeTags.resize(edgeCount);
│ │ │ │ -
823
│ │ │ │ -
824 if (edgeCount>0) {
│ │ │ │ -
825 std::memset((void*) &_edgeTags[0], 0, _edgeCount * sizeof(ETag));
│ │ │ │ -
826 }
│ │ │ │ -
827}
│ │ │ │ -
828inline void
│ │ │ │ -
829Level::resizeEdgeVertices() {
│ │ │ │ -
830
│ │ │ │ -
831 _edgeVertIndices.resize(2 * _edgeCount);
│ │ │ │ -
832}
│ │ │ │ -
833inline void
│ │ │ │ -
834Level::resizeEdgeFaces(int totalEdgeFaceCount) {
│ │ │ │ -
835
│ │ │ │ -
836 _edgeFaceIndices.resize(totalEdgeFaceCount);
│ │ │ │ -
837 _edgeFaceLocalIndices.resize(totalEdgeFaceCount);
│ │ │ │ -
838}
│ │ │ │ -
839
│ │ │ │ -
840inline void
│ │ │ │ -
841Level::resizeVertices(int vertCount) {
│ │ │ │ -
842
│ │ │ │ -
843 _vertCount = vertCount;
│ │ │ │ -
844 _vertFaceCountsAndOffsets.resize(2 * vertCount);
│ │ │ │ -
845 _vertEdgeCountsAndOffsets.resize(2 * vertCount);
│ │ │ │ -
846
│ │ │ │ -
847 _vertSharpness.resize(vertCount);
│ │ │ │ -
848 _vertTags.resize(vertCount);
│ │ │ │ -
849 std::memset((void*) &_vertTags[0], 0, _vertCount * sizeof(VTag));
│ │ │ │ -
850}
│ │ │ │ -
851inline void
│ │ │ │ -
852Level::resizeVertexFaces(int totalVertFaceCount) {
│ │ │ │ -
853
│ │ │ │ -
854 _vertFaceIndices.resize(totalVertFaceCount);
│ │ │ │ -
855 _vertFaceLocalIndices.resize(totalVertFaceCount);
│ │ │ │ -
856}
│ │ │ │ -
857inline void
│ │ │ │ -
858Level::resizeVertexEdges(int totalVertEdgeCount) {
│ │ │ │ -
859
│ │ │ │ -
860 _vertEdgeIndices.resize(totalVertEdgeCount);
│ │ │ │ -
861 _vertEdgeLocalIndices.resize(totalVertEdgeCount);
│ │ │ │ -
862}
│ │ │ │ -
863
│ │ │ │ -
864inline IndexArray
│ │ │ │ -
865Level::shareFaceVertCountsAndOffsets() const {
│ │ │ │ -
866 // XXXX manuelk we have to force const casting here (classes don't 'share'
│ │ │ │ -
867 // members usually...)
│ │ │ │ -
868 return IndexArray(const_cast<Index *>(&_faceVertCountsAndOffsets[0]),
│ │ │ │ -
869 (int)_faceVertCountsAndOffsets.size());
│ │ │ │ -
870}
│ │ │ │ -
871
│ │ │ │ -
872} // end namespace internal
│ │ │ │ -
873} // end namespace Vtr
│ │ │ │ -
874
│ │ │ │ -
875} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
876using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
877} // end namespace OpenSubdiv
│ │ │ │ -
878
│ │ │ │ -
879#endif /* OPENSUBDIV3_VTR_LEVEL_H */
│ │ │ │ - │ │ │ │ -
ConstArray< LocalIndex > ConstLocalIndexArray
Definition types.h:83
│ │ │ │ -
Array< LocalIndex > LocalIndexArray
Definition types.h:82
│ │ │ │ - │ │ │ │ +
100 int _eIndex;
│ │ │ │ +
101};
│ │ │ │ +
102
│ │ │ │ +
103
│ │ │ │ +
104//
│ │ │ │ +
105// For <typename VERTEX>, which provides information in the neighborhood of a vertex:
│ │ │ │ +
106//
│ │ │ │ +
107class VertexInterface {
│ │ │ │ +
108public:
│ │ │ │ +
109 VertexInterface() { }
│ │ │ │ +
110 VertexInterface(Level const& parent, Level const& child) : _parent(&parent), _child(&child) { }
│ │ │ │ +
111 ~VertexInterface() { }
│ │ │ │ +
112
│ │ │ │ +
113 void SetIndex(int parentIndex, int childIndex) {
│ │ │ │ +
114 _pIndex = parentIndex;
│ │ │ │ +
115 _cIndex = childIndex;
│ │ │ │ +
116 _eCount = _parent->getVertexEdges(_pIndex).size();
│ │ │ │ +
117 _fCount = _parent->getVertexFaces(_pIndex).size();
│ │ │ │ +
118 }
│ │ │ │ +
119
│ │ │ │ +
120public: // Generic interface expected of <typename VERT>:
│ │ │ │ +
121 int GetNumEdges() const { return _eCount; }
│ │ │ │ +
122 int GetNumFaces() const { return _fCount; }
│ │ │ │ +
123
│ │ │ │ +
124 float GetSharpness() const { return _parent->getVertexSharpness(_pIndex); }
│ │ │ │ +
125 float* GetSharpnessPerEdge(float pSharpness[]) const {
│ │ │ │ +
126 ConstIndexArray pEdges = _parent->getVertexEdges(_pIndex);
│ │ │ │ +
127 for (int i = 0; i < _eCount; ++i) {
│ │ │ │ +
128 pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
│ │ │ │ +
129 }
│ │ │ │ +
130 return pSharpness;
│ │ │ │ +
131 }
│ │ │ │ +
132
│ │ │ │ +
133 float GetChildSharpness(Sdc::Crease const&) const { return _child->getVertexSharpness(_cIndex); }
│ │ │ │ +
134 float* GetChildSharpnessPerEdge(Sdc::Crease const& crease, float cSharpness[]) const {
│ │ │ │ +
135 internal::StackBuffer<float,16> pSharpness(_eCount);
│ │ │ │ +
136 GetSharpnessPerEdge(pSharpness);
│ │ │ │ +
137 crease.SubdivideEdgeSharpnessesAroundVertex(_eCount, pSharpness, cSharpness);
│ │ │ │ +
138 return cSharpness;
│ │ │ │ +
139 }
│ │ │ │ +
140
│ │ │ │ +
141private:
│ │ │ │ +
142 const Level* _parent;
│ │ │ │ +
143 const Level* _child;
│ │ │ │ +
144
│ │ │ │ +
145 int _pIndex;
│ │ │ │ +
146 int _cIndex;
│ │ │ │ +
147 int _eCount;
│ │ │ │ +
148 int _fCount;
│ │ │ │ +
149};
│ │ │ │ +
150
│ │ │ │ +
151} // end namespace internal
│ │ │ │ +
152} // end namespace Vtr
│ │ │ │ +
153
│ │ │ │ +
154} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
155using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
156} // end namespace OpenSubdiv
│ │ │ │ +
157
│ │ │ │ +
158#endif /* OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H */
│ │ │ │ + │ │ │ │
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -level.h │ │ │ │ │ +componentInterfaces.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,986 +23,158 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_VTR_LEVEL_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_LEVEL_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ 29#include "../sdc/types.h" │ │ │ │ │ 30#include "../sdc/crease.h" │ │ │ │ │ -31#include "../sdc/options.h" │ │ │ │ │ -32#include "../vtr/types.h" │ │ │ │ │ +31#include "../vtr/types.h" │ │ │ │ │ +32#include "../vtr/stackBuffer.h" │ │ │ │ │ 33 │ │ │ │ │ -34#include │ │ │ │ │ -35#include │ │ │ │ │ -36#include │ │ │ │ │ -37#include │ │ │ │ │ -38 │ │ │ │ │ +34#include │ │ │ │ │ +35 │ │ │ │ │ +36 │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ 39 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +40namespace Vtr { │ │ │ │ │ +41namespace internal { │ │ │ │ │ 42 │ │ │ │ │ -43namespace Vtr { │ │ │ │ │ -44namespace internal { │ │ │ │ │ -45 │ │ │ │ │ -46class Refinement; │ │ │ │ │ -47class TriRefinement; │ │ │ │ │ -48class QuadRefinement; │ │ │ │ │ -49class FVarRefinement; │ │ │ │ │ -50class FVarLevel; │ │ │ │ │ +43// │ │ │ │ │ +44// Simple classes supporting the interfaces required of generic topological │ │ │ │ │ +45// types in the Scheme mask queries, e.g. │ │ │ │ │ +46// │ │ │ │ │ +47// These are not used with Vtr but arguably belong with it as the details to │ │ │ │ │ +48// write these efficiently depends very much on intimate details of Vtr's │ │ │ │ │ +49// implementation, e.g. the use of tag bits, subdivision Rules, etc. │ │ │ │ │ +50// │ │ │ │ │ 51 │ │ │ │ │ -52// │ │ │ │ │ -53// Level: │ │ │ │ │ -54// A refinement level includes a vectorized representation of the topology │ │ │ │ │ -55// for a particular subdivision level. The topology is "complete" in that any │ │ │ │ │ -56// level can be used as the base level of another subdivision hierarchy and │ │ │ │ │ -can │ │ │ │ │ -57// be considered a complete mesh independent of its ancestors. It currently │ │ │ │ │ -58// does contain a "depth" member -- as some inferences can then be made about │ │ │ │ │ -59// the topology (i.e. all quads or all tris if not level 0). │ │ │ │ │ -60// │ │ │ │ │ -61// This class is intended for private use within the library. There are still │ │ │ │ │ -62// opportunities to specialize levels -- e.g. those supporting N-sided faces │ │ │ │ │ -vs │ │ │ │ │ -63// those that are purely quads or tris -- so we prefer to insulate it from │ │ │ │ │ -public │ │ │ │ │ -64// access. │ │ │ │ │ -65// │ │ │ │ │ -66// The representation of topology here is to store six topological │ │ │ │ │ -relationships │ │ │ │ │ -67// in tables of integers. Each is stored in its own array(s) so the result is │ │ │ │ │ -68// a SOA representation of the topology. The six relations are: │ │ │ │ │ -69// │ │ │ │ │ -70// - face-verts: vertices incident/comprising a face │ │ │ │ │ -71// - face-edges: edges incident a face │ │ │ │ │ -72// - edge-verts: vertices incident/comprising an edge │ │ │ │ │ -73// - edge-faces: faces incident an edge │ │ │ │ │ -74// - vert-faces: faces incident a vertex │ │ │ │ │ -75// - vert-edges: edges incident a vertex │ │ │ │ │ -76// │ │ │ │ │ -77// There is some redundancy here but the intent is not that this be a minimal │ │ │ │ │ -78// representation, the intent is that it be amenable to refinement. Classes │ │ │ │ │ -in │ │ │ │ │ -79// the Far layer essentially store 5 of these 6 in a permuted form -- we add │ │ │ │ │ -80// the face-edges here to simplify refinement. │ │ │ │ │ -81// │ │ │ │ │ -82 │ │ │ │ │ -83class Level { │ │ │ │ │ +52 │ │ │ │ │ +53// │ │ │ │ │ +54// For , which provides information in the neighborhood of a │ │ │ │ │ +face: │ │ │ │ │ +55// │ │ │ │ │ +56class FaceInterface { │ │ │ │ │ +57public: │ │ │ │ │ +58 FaceInterface() { } │ │ │ │ │ +59 FaceInterface(int vertCount) : _vertCount(vertCount) { } │ │ │ │ │ +60 ~FaceInterface() { } │ │ │ │ │ +61 │ │ │ │ │ +62public: // Generic interface expected of : │ │ │ │ │ +63 int GetNumVertices() const { return _vertCount; } │ │ │ │ │ +64 │ │ │ │ │ +65private: │ │ │ │ │ +66 int _vertCount; │ │ │ │ │ +67}; │ │ │ │ │ +68 │ │ │ │ │ +69 │ │ │ │ │ +70// │ │ │ │ │ +71// For , which provides information in the neighborhood of an │ │ │ │ │ +edge: │ │ │ │ │ +72// │ │ │ │ │ +73class EdgeInterface { │ │ │ │ │ +74public: │ │ │ │ │ +75 EdgeInterface() { } │ │ │ │ │ +76 EdgeInterface(Level const& level) : _level(&level) { } │ │ │ │ │ +77 ~EdgeInterface() { } │ │ │ │ │ +78 │ │ │ │ │ +79 void SetIndex(int edgeIndex) { _eIndex = edgeIndex; } │ │ │ │ │ +80 │ │ │ │ │ +81public: // Generic interface expected of : │ │ │ │ │ +82 int GetNumFaces() const { return _level->getEdgeFaces(_eIndex).size(); } │ │ │ │ │ +83 float GetSharpness() const { return _level->getEdgeSharpness(_eIndex); } │ │ │ │ │ 84 │ │ │ │ │ -85public: │ │ │ │ │ -86 // │ │ │ │ │ -87 // Simple nested types to hold the tags for each component type -- some of │ │ │ │ │ -88 // which are user-specified features (e.g. whether a face is a hole or not) │ │ │ │ │ -89 // while others indicate the topological nature of the component, how it │ │ │ │ │ -90 // is affected by creasing in its neighborhood, etc. │ │ │ │ │ -91 // │ │ │ │ │ -92 // Most of these properties are passed down to child components during │ │ │ │ │ -93 // refinement, but some -- notably the designation of a component as semi- │ │ │ │ │ -94 // sharp -- require re-determination as sharpness values are reduced at each │ │ │ │ │ -95 // level. │ │ │ │ │ -96 // │ │ │ │ │ -97 struct VTag { │ │ │ │ │ -98 VTag() { } │ │ │ │ │ +85 void GetChildSharpnesses(Sdc::Crease const&, float s[2]) const { │ │ │ │ │ +86 // Need to use the Refinement here to identify the two child edges: │ │ │ │ │ +87 s[0] = s[1] = GetSharpness() - 1.0f; │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +90 void GetNumVerticesPerFace(int vertsPerFace[]) const { │ │ │ │ │ +91 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y eFaces = _level->getEdgeFaces(_eIndex); │ │ │ │ │ +92 for (int i = 0; i < eFaces.size(); ++i) { │ │ │ │ │ +93 vertsPerFace[i] = _level->getFaceVertices(eFaces[i]).size(); │ │ │ │ │ +94 } │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +97private: │ │ │ │ │ +98 const Level* _level; │ │ │ │ │ 99 │ │ │ │ │ -100 // When cleared, the VTag ALMOST represents a smooth, regular, interior │ │ │ │ │ -101 // vertex -- the Type enum requires a bit be explicitly set for Smooth, │ │ │ │ │ -102 // so that must be done explicitly if desired on initialization. │ │ │ │ │ -103 void clear() { std::memset((void*) this, 0, sizeof(VTag)); } │ │ │ │ │ -104 │ │ │ │ │ -105 typedef unsigned short VTagSize; │ │ │ │ │ -106 │ │ │ │ │ -107 VTagSize _nonManifold : 1; // fixed │ │ │ │ │ -108 VTagSize _xordinary : 1; // fixed │ │ │ │ │ -109 VTagSize _boundary : 1; // fixed │ │ │ │ │ -110 VTagSize _corner : 1; // fixed │ │ │ │ │ -111 VTagSize _infSharp : 1; // fixed │ │ │ │ │ -112 VTagSize _semiSharp : 1; // variable │ │ │ │ │ -113 VTagSize _semiSharpEdges : 1; // variable │ │ │ │ │ -114 VTagSize _rule : 4; // variable when _semiSharp │ │ │ │ │ -115 │ │ │ │ │ -116 // These next to tags are complementary -- the "incomplete" tag is only │ │ │ │ │ -117 // relevant for refined levels while the "incident an irregular face" tag │ │ │ │ │ -118 // is only relevant for the base level. They could be combined as both │ │ │ │ │ -119 // indicate "no full regular ring" around a vertex │ │ │ │ │ -120 VTagSize _incomplete : 1; // variable only set in refined levels │ │ │ │ │ -121 VTagSize _incidIrregFace : 1; // variable only set in base level │ │ │ │ │ -122 │ │ │ │ │ -123 // Tags indicating incident infinitely-sharp (permanent) features │ │ │ │ │ -124 VTagSize _infSharpEdges : 1; // fixed │ │ │ │ │ -125 VTagSize _infSharpCrease : 1; // fixed │ │ │ │ │ -126 VTagSize _infIrregular : 1; // fixed │ │ │ │ │ -127 │ │ │ │ │ -128 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ -directly: │ │ │ │ │ -129 explicit VTag(VTagSize bits) { │ │ │ │ │ -130 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ +100 int _eIndex; │ │ │ │ │ +101}; │ │ │ │ │ +102 │ │ │ │ │ +103 │ │ │ │ │ +104// │ │ │ │ │ +105// For , which provides information in the neighborhood of │ │ │ │ │ +a vertex: │ │ │ │ │ +106// │ │ │ │ │ +107class VertexInterface { │ │ │ │ │ +108public: │ │ │ │ │ +109 VertexInterface() { } │ │ │ │ │ +110 VertexInterface(Level const& parent, Level const& child) : _parent │ │ │ │ │ +(&parent), _child(&child) { } │ │ │ │ │ +111 ~VertexInterface() { } │ │ │ │ │ +112 │ │ │ │ │ +113 void SetIndex(int parentIndex, int childIndex) { │ │ │ │ │ +114 _pIndex = parentIndex; │ │ │ │ │ +115 _cIndex = childIndex; │ │ │ │ │ +116 _eCount = _parent->getVertexEdges(_pIndex).size(); │ │ │ │ │ +117 _fCount = _parent->getVertexFaces(_pIndex).size(); │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +120public: // Generic interface expected of : │ │ │ │ │ +121 int GetNumEdges() const { return _eCount; } │ │ │ │ │ +122 int GetNumFaces() const { return _fCount; } │ │ │ │ │ +123 │ │ │ │ │ +124 float GetSharpness() const { return _parent->getVertexSharpness(_pIndex); } │ │ │ │ │ +125 float* GetSharpnessPerEdge(float pSharpness[]) const { │ │ │ │ │ +126 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y pEdges = _parent->getVertexEdges(_pIndex); │ │ │ │ │ +127 for (int i = 0; i < _eCount; ++i) { │ │ │ │ │ +128 pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]); │ │ │ │ │ +129 } │ │ │ │ │ +130 return pSharpness; │ │ │ │ │ 131 } │ │ │ │ │ -132 VTagSize getBits() const { │ │ │ │ │ -133 VTagSize bits; │ │ │ │ │ -134 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ -135 return bits; │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 static VTag BitwiseOr(VTag const vTags[], int size = 4); │ │ │ │ │ -139 }; │ │ │ │ │ -140 struct ETag { │ │ │ │ │ -141 ETag() { } │ │ │ │ │ -142 │ │ │ │ │ -143 // When cleared, the ETag represents a smooth, manifold, interior edge │ │ │ │ │ -144 void clear() { std::memset((void*) this, 0, sizeof(ETag)); } │ │ │ │ │ -145 │ │ │ │ │ -146 typedef unsigned char ETagSize; │ │ │ │ │ -147 │ │ │ │ │ -148 ETagSize _nonManifold : 1; // fixed │ │ │ │ │ -149 ETagSize _boundary : 1; // fixed │ │ │ │ │ -150 ETagSize _infSharp : 1; // fixed │ │ │ │ │ -151 ETagSize _semiSharp : 1; // variable │ │ │ │ │ -152 │ │ │ │ │ -153 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ -directly: │ │ │ │ │ -154 explicit ETag(ETagSize bits) { │ │ │ │ │ -155 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ -156 } │ │ │ │ │ -157 ETagSize getBits() const { │ │ │ │ │ -158 ETagSize bits; │ │ │ │ │ -159 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ -160 return bits; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -163 static ETag BitwiseOr(ETag const eTags[], int size = 4); │ │ │ │ │ -164 }; │ │ │ │ │ -165 struct FTag { │ │ │ │ │ -166 FTag() { } │ │ │ │ │ -167 │ │ │ │ │ -168 void clear() { std::memset((void*) this, 0, sizeof(FTag)); } │ │ │ │ │ -169 │ │ │ │ │ -170 typedef unsigned char FTagSize; │ │ │ │ │ -171 │ │ │ │ │ -172 FTagSize _hole : 1; // fixed │ │ │ │ │ -173 │ │ │ │ │ -174 // On deck -- coming soon... │ │ │ │ │ -175 //FTagSize _hasEdits : 1; // variable │ │ │ │ │ -176 }; │ │ │ │ │ -177 │ │ │ │ │ -178 // Additional simple struct to identify a "span" around a vertex, i.e. a │ │ │ │ │ -179 // subset of the faces around a vertex delimited by some property (e.g. a │ │ │ │ │ -180 // face-varying discontinuity, an inf-sharp edge, etc.) │ │ │ │ │ -181 // │ │ │ │ │ -182 // The span requires an "origin" and a "size" to fully define its extent. │ │ │ │ │ -183 // Use of the size is required over a leading/trailing pair as the valence │ │ │ │ │ -184 // around a non-manifold vertex cannot be trivially determined from two │ │ │ │ │ -185 // extremeties. Similarly a start face is chosen over an edge as starting │ │ │ │ │ -186 // with a manifold edge is ambiguous. Additional tags also support │ │ │ │ │ -187 // non-manifold cases, e.g. periodic spans at the apex of a double cone. │ │ │ │ │ -188 // │ │ │ │ │ -189 // Currently setting the size to 0 or leaving the span "unassigned" is an │ │ │ │ │ -190 // indication to use the full neighborhood rather than a subset -- prefer │ │ │ │ │ -191 // use of the const method here to direct inspection of the member. │ │ │ │ │ -192 // │ │ │ │ │ -193 struct VSpan { │ │ │ │ │ -194 VSpan() { std::memset((void*) this, 0, sizeof(VSpan)); } │ │ │ │ │ -195 │ │ │ │ │ -196 void clear() { std::memset((void*) this, 0, sizeof(VSpan)); } │ │ │ │ │ -197 bool isAssigned() const { return _numFaces > 0; } │ │ │ │ │ -198 │ │ │ │ │ -199 _L_o_c_a_l_I_n_d_e_x _numFaces; │ │ │ │ │ -200 _L_o_c_a_l_I_n_d_e_x _startFace; │ │ │ │ │ -201 _L_o_c_a_l_I_n_d_e_x _cornerInSpan; │ │ │ │ │ -202 │ │ │ │ │ -203 unsigned short _periodic : 1; │ │ │ │ │ -204 unsigned short _sharp : 1; │ │ │ │ │ -205 }; │ │ │ │ │ -206 │ │ │ │ │ -207public: │ │ │ │ │ -208 Level(); │ │ │ │ │ -209 ~Level(); │ │ │ │ │ -210 │ │ │ │ │ -211 // Simple accessors: │ │ │ │ │ -212 int getDepth() const { return _depth; } │ │ │ │ │ -213 │ │ │ │ │ -214 int getNumVertices() const { return _vertCount; } │ │ │ │ │ -215 int getNumFaces() const { return _faceCount; } │ │ │ │ │ -216 int getNumEdges() const { return _edgeCount; } │ │ │ │ │ -217 │ │ │ │ │ -218 // More global sizes may prove useful... │ │ │ │ │ -219 int getNumFaceVerticesTotal() const { return (int) _faceVertIndices.size(); │ │ │ │ │ -} │ │ │ │ │ -220 int getNumFaceEdgesTotal() const { return (int) _faceEdgeIndices.size(); } │ │ │ │ │ -221 int getNumEdgeVerticesTotal() const { return (int) _edgeVertIndices.size(); │ │ │ │ │ -} │ │ │ │ │ -222 int getNumEdgeFacesTotal() const { return (int) _edgeFaceIndices.size(); } │ │ │ │ │ -223 int getNumVertexFacesTotal() const { return (int) _vertFaceIndices.size(); │ │ │ │ │ -} │ │ │ │ │ -224 int getNumVertexEdgesTotal() const { return (int) _vertEdgeIndices.size(); │ │ │ │ │ -} │ │ │ │ │ -225 │ │ │ │ │ -226 int getMaxValence() const { return _maxValence; } │ │ │ │ │ -227 int getMaxEdgeFaces() const { return _maxEdgeFaces; } │ │ │ │ │ -228 │ │ │ │ │ -229 // Methods to access the relation tables/indices -- note that for some │ │ │ │ │ -relations │ │ │ │ │ -230 // (i.e. those where a component is "contained by" a neighbor, or more │ │ │ │ │ -generally │ │ │ │ │ -231 // when the neighbor is a simplex of higher dimension) we store an │ │ │ │ │ -additional │ │ │ │ │ -232 // "local index", e.g. for the case of vert-faces if one of the faces F[i] │ │ │ │ │ -is │ │ │ │ │ -233 // incident a vertex V, then L[i] is the "local index" in F[i] of vertex V. │ │ │ │ │ -234 // Once have only quads (or tris), this local index need only occupy two │ │ │ │ │ -bits │ │ │ │ │ -235 // and could conceivably be packed into the same integer as the face index, │ │ │ │ │ -but │ │ │ │ │ -236 // for now, given the need to support faces of potentially high valence │ │ │ │ │ -we'll │ │ │ │ │ -237 // use an 8- or 16-bit integer. │ │ │ │ │ -238 // │ │ │ │ │ -239 // Methods to access the six topological relations: │ │ │ │ │ -240 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceVertices(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -241 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceEdges(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -242 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeVertices(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ -243 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getEdgeFaces(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ -244 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexFaces(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -245 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexEdges(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -246 │ │ │ │ │ -247 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ -248 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -249 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -250 │ │ │ │ │ -251 // Replace these with access to sharpness buffers/arrays rather than │ │ │ │ │ -elements: │ │ │ │ │ -252 float getEdgeSharpness(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ -253 float getVertexSharpness(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -254 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e getVertexRule(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -255 │ │ │ │ │ -256 _I_n_d_e_x findEdge(_I_n_d_e_x v0Index, _I_n_d_e_x v1Index) const; │ │ │ │ │ -257 │ │ │ │ │ -258 // Holes │ │ │ │ │ -259 void setFaceHole(_I_n_d_e_x faceIndex, bool b); │ │ │ │ │ -260 bool isFaceHole(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -261 │ │ │ │ │ -262 // Face-varying │ │ │ │ │ -263 Sdc::Options getFVarOptions(int channel) const; │ │ │ │ │ -264 int getNumFVarChannels() const { return (int) _fvarChannels.size(); } │ │ │ │ │ -265 int getNumFVarValues(int channel) const; │ │ │ │ │ -266 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceFVarValues(_I_n_d_e_x faceIndex, int channel) const; │ │ │ │ │ -267 │ │ │ │ │ -268 FVarLevel & getFVarLevel(int channel) { return *_fvarChannels[channel]; } │ │ │ │ │ -269 FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels │ │ │ │ │ -[channel]; } │ │ │ │ │ -270 │ │ │ │ │ -271 // Manifold/non-manifold tags: │ │ │ │ │ -272 void setEdgeNonManifold(_I_n_d_e_x edgeIndex, bool b); │ │ │ │ │ -273 bool isEdgeNonManifold(_I_n_d_e_x edgeIndex) const; │ │ │ │ │ -274 │ │ │ │ │ -275 void setVertexNonManifold(_I_n_d_e_x vertIndex, bool b); │ │ │ │ │ -276 bool isVertexNonManifold(_I_n_d_e_x vertIndex) const; │ │ │ │ │ -277 │ │ │ │ │ -278 // General access to all component tags: │ │ │ │ │ -279 VTag const & getVertexTag(_I_n_d_e_x vertIndex) const { return _vertTags │ │ │ │ │ -[vertIndex]; } │ │ │ │ │ -280 ETag const & getEdgeTag(_I_n_d_e_x edgeIndex) const { return _edgeTags │ │ │ │ │ -[edgeIndex]; } │ │ │ │ │ -281 FTag const & getFaceTag(_I_n_d_e_x faceIndex) const { return _faceTags │ │ │ │ │ -[faceIndex]; } │ │ │ │ │ -282 │ │ │ │ │ -283 VTag & getVertexTag(_I_n_d_e_x vertIndex) { return _vertTags[vertIndex]; } │ │ │ │ │ -284 ETag & getEdgeTag(_I_n_d_e_x edgeIndex) { return _edgeTags[edgeIndex]; } │ │ │ │ │ -285 FTag & getFaceTag(_I_n_d_e_x faceIndex) { return _faceTags[faceIndex]; } │ │ │ │ │ -286 │ │ │ │ │ -287public: │ │ │ │ │ -288 │ │ │ │ │ -289 // Debugging aides: │ │ │ │ │ -290 enum TopologyError { │ │ │ │ │ -291 TOPOLOGY_MISSING_EDGE_FACES=0, │ │ │ │ │ -292 TOPOLOGY_MISSING_EDGE_VERTS, │ │ │ │ │ -293 TOPOLOGY_MISSING_FACE_EDGES, │ │ │ │ │ -294 TOPOLOGY_MISSING_FACE_VERTS, │ │ │ │ │ -295 TOPOLOGY_MISSING_VERT_FACES, │ │ │ │ │ -296 TOPOLOGY_MISSING_VERT_EDGES, │ │ │ │ │ -297 │ │ │ │ │ -298 TOPOLOGY_FAILED_CORRELATION_EDGE_FACE, │ │ │ │ │ -299 TOPOLOGY_FAILED_CORRELATION_FACE_VERT, │ │ │ │ │ -300 TOPOLOGY_FAILED_CORRELATION_FACE_EDGE, │ │ │ │ │ -301 │ │ │ │ │ -302 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE, │ │ │ │ │ -303 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE, │ │ │ │ │ -304 TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES, │ │ │ │ │ -305 │ │ │ │ │ -306 TOPOLOGY_DEGENERATE_EDGE, │ │ │ │ │ -307 TOPOLOGY_NON_MANIFOLD_EDGE, │ │ │ │ │ -308 │ │ │ │ │ -309 TOPOLOGY_INVALID_CREASE_EDGE, │ │ │ │ │ -310 TOPOLOGY_INVALID_CREASE_VERT │ │ │ │ │ -311 }; │ │ │ │ │ -312 │ │ │ │ │ -313 static char const * getTopologyErrorString(TopologyError errCode); │ │ │ │ │ -314 │ │ │ │ │ -315 typedef void (* ValidationCallback)(TopologyError errCode, char const * │ │ │ │ │ -msg, void const * clientData); │ │ │ │ │ -316 │ │ │ │ │ -317 bool validateTopology(ValidationCallback callback=0, void const * │ │ │ │ │ -clientData=0) const; │ │ │ │ │ -318 │ │ │ │ │ -319 void print(const Refinement* parentRefinement = 0) const; │ │ │ │ │ -320 │ │ │ │ │ -321public: │ │ │ │ │ -322 // High-level topology queries -- these may be moved elsewhere: │ │ │ │ │ -323 │ │ │ │ │ -324 bool isSingleCreasePatch(_I_n_d_e_x face, float* sharpnessOut=NULL, int* │ │ │ │ │ -rotationOut=NULL) const; │ │ │ │ │ -325 │ │ │ │ │ -326 // │ │ │ │ │ -327 // When inspecting topology, the component tags -- particularly VTag and │ │ │ │ │ -ETag -- are most │ │ │ │ │ -328 // often inspected in groups for the face to which they belong. They are │ │ │ │ │ -designed to be │ │ │ │ │ -329 // bitwise OR'd (the result then referred to as a "composite" tag) to make │ │ │ │ │ -quick decisions │ │ │ │ │ -330 // about the face as a whole to avoid tedious topological inspection. │ │ │ │ │ -331 // │ │ │ │ │ -332 // The same logic can be applied to topology in a FVar channel when tags │ │ │ │ │ -specific to that │ │ │ │ │ -333 // channel are used. Note that the VTags apply to the FVar values assigned │ │ │ │ │ -to the corners │ │ │ │ │ -334 // of the face and not the vertex as a whole. The "composite" face-varying │ │ │ │ │ -VTag for a │ │ │ │ │ -335 // vertex is the union of VTags of all distinct FVar values for that │ │ │ │ │ -vertex. │ │ │ │ │ -336 // │ │ │ │ │ -337 bool doesVertexFVarTopologyMatch(_I_n_d_e_x vIndex, int fvarChannel) const; │ │ │ │ │ -338 bool doesFaceFVarTopologyMatch( _I_n_d_e_x fIndex, int fvarChannel) const; │ │ │ │ │ -339 bool doesEdgeFVarTopologyMatch( _I_n_d_e_x eIndex, int fvarChannel) const; │ │ │ │ │ -340 │ │ │ │ │ -341 void getFaceVTags(_I_n_d_e_x fIndex, VTag vTags[], int fvarChannel = -1) const; │ │ │ │ │ -342 void getFaceETags(_I_n_d_e_x fIndex, ETag eTags[], int fvarChannel = -1) const; │ │ │ │ │ -343 │ │ │ │ │ -344 VTag getFaceCompositeVTag(_I_n_d_e_x fIndex, int fvarChannel = -1) const; │ │ │ │ │ -345 VTag getFaceCompositeVTag(_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y & fVerts) const; │ │ │ │ │ -346 │ │ │ │ │ -347 VTag getVertexCompositeFVarVTag(_I_n_d_e_x vIndex, int fvarChannel) const; │ │ │ │ │ -348 │ │ │ │ │ -349 // │ │ │ │ │ -350 // When gathering "patch points" we may want the indices of the vertices or │ │ │ │ │ -the corresponding │ │ │ │ │ -351 // FVar values for a particular channel. Both are represented and equally │ │ │ │ │ -accessible within │ │ │ │ │ -352 // the faces, so we allow all to be returned through these methods. Setting │ │ │ │ │ -the optional FVar │ │ │ │ │ -353 // channel to -1 will retrieve indices of vertices instead of FVar values: │ │ │ │ │ -354 // │ │ │ │ │ -355 int gatherQuadLinearPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], int │ │ │ │ │ -rotation = 0, │ │ │ │ │ -356 int fvarChannel = -1) const; │ │ │ │ │ -357 │ │ │ │ │ -358 int gatherQuadRegularInteriorPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ -int rotation = 0, │ │ │ │ │ -359 int fvarChannel = -1) const; │ │ │ │ │ -360 int gatherQuadRegularBoundaryPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ -int boundaryEdgeInFace, │ │ │ │ │ -361 int fvarChannel = -1) const; │ │ │ │ │ -362 int gatherQuadRegularCornerPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchPoints[], │ │ │ │ │ -int cornerVertInFace, │ │ │ │ │ -363 int fvarChannel = -1) const; │ │ │ │ │ -364 │ │ │ │ │ -365 int gatherQuadRegularRingAroundVertex(_I_n_d_e_x vIndex, _I_n_d_e_x ringPoints[], │ │ │ │ │ -366 int fvarChannel = -1) const; │ │ │ │ │ -367 int gatherQuadRegularPartialRingAroundVertex(_I_n_d_e_x vIndex, VSpan const & │ │ │ │ │ -span, _I_n_d_e_x ringPoints[], │ │ │ │ │ -368 int fvarChannel = -1) const; │ │ │ │ │ -369 │ │ │ │ │ -370 // WIP -- for future use, need to extend for face-varying... │ │ │ │ │ -371 int gatherTriRegularInteriorPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts[], │ │ │ │ │ -int rotation = 0) const; │ │ │ │ │ -372 int gatherTriRegularBoundaryVertexPatchPoints(_I_n_d_e_x fIndex, _I_n_d_e_x │ │ │ │ │ -patchVerts[], int boundaryVertInFace) const; │ │ │ │ │ -373 int gatherTriRegularBoundaryEdgePatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ -[], int boundaryEdgeInFace) const; │ │ │ │ │ -374 int gatherTriRegularCornerVertexPatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ -[], int cornerVertInFace) const; │ │ │ │ │ -375 int gatherTriRegularCornerEdgePatchPoints( _I_n_d_e_x fIndex, _I_n_d_e_x patchVerts │ │ │ │ │ -[], int cornerEdgeInFace) const; │ │ │ │ │ -376 │ │ │ │ │ -377public: │ │ │ │ │ -378 // Sizing methods used to construct a level to populate: │ │ │ │ │ -379 void resizeFaces( int numFaces); │ │ │ │ │ -380 void resizeFaceVertices(int numFaceVertsTotal); │ │ │ │ │ -381 void resizeFaceEdges( int numFaceEdgesTotal); │ │ │ │ │ -382 │ │ │ │ │ -383 void resizeEdges( int numEdges); │ │ │ │ │ -384 void resizeEdgeVertices(); // always 2*edgeCount │ │ │ │ │ -385 void resizeEdgeFaces(int numEdgeFacesTotal); │ │ │ │ │ -386 │ │ │ │ │ -387 void resizeVertices( int numVertices); │ │ │ │ │ -388 void resizeVertexFaces(int numVertexFacesTotal); │ │ │ │ │ -389 void resizeVertexEdges(int numVertexEdgesTotal); │ │ │ │ │ -390 │ │ │ │ │ -391 void setMaxValence(int maxValence); │ │ │ │ │ -392 │ │ │ │ │ -393 // Modifiers to populate the relations for each component: │ │ │ │ │ -394 _I_n_d_e_x_A_r_r_a_y getFaceVertices(_I_n_d_e_x faceIndex); │ │ │ │ │ -395 _I_n_d_e_x_A_r_r_a_y getFaceEdges(_I_n_d_e_x faceIndex); │ │ │ │ │ -396 _I_n_d_e_x_A_r_r_a_y getEdgeVertices(_I_n_d_e_x edgeIndex); │ │ │ │ │ -397 _I_n_d_e_x_A_r_r_a_y getEdgeFaces(_I_n_d_e_x edgeIndex); │ │ │ │ │ -398 _I_n_d_e_x_A_r_r_a_y getVertexFaces(_I_n_d_e_x vertIndex); │ │ │ │ │ -399 _I_n_d_e_x_A_r_r_a_y getVertexEdges(_I_n_d_e_x vertIndex); │ │ │ │ │ -400 │ │ │ │ │ -401 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex); │ │ │ │ │ -402 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexFaceLocalIndices(_I_n_d_e_x vertIndex); │ │ │ │ │ -403 _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex); │ │ │ │ │ -404 │ │ │ │ │ -405 // Replace these with access to sharpness buffers/arrays rather than │ │ │ │ │ -elements: │ │ │ │ │ -406 float& getEdgeSharpness(_I_n_d_e_x edgeIndex); │ │ │ │ │ -407 float& getVertexSharpness(_I_n_d_e_x vertIndex); │ │ │ │ │ -408 │ │ │ │ │ -409 // Create, destroy and populate face-varying channels: │ │ │ │ │ -410 int createFVarChannel(int fvarValueCount, Sdc::Options const& options); │ │ │ │ │ -411 void destroyFVarChannel(int channel); │ │ │ │ │ -412 │ │ │ │ │ -413 _I_n_d_e_x_A_r_r_a_y getFaceFVarValues(_I_n_d_e_x faceIndex, int channel); │ │ │ │ │ -414 │ │ │ │ │ -415 void completeFVarChannelTopology(int channel, int regBoundaryValence); │ │ │ │ │ -416 │ │ │ │ │ -417 // Counts and offsets for all relation types: │ │ │ │ │ -418 // - these may be unwarranted if we let Refinement access members │ │ │ │ │ -directly... │ │ │ │ │ -419 int getNumFaceVertices( _I_n_d_e_x faceIndex) const { return │ │ │ │ │ -_faceVertCountsAndOffsets[2*faceIndex]; } │ │ │ │ │ -420 int getOffsetOfFaceVertices(_I_n_d_e_x faceIndex) const { return │ │ │ │ │ -_faceVertCountsAndOffsets[2*faceIndex + 1]; } │ │ │ │ │ -421 │ │ │ │ │ -422 int getNumFaceEdges( _I_n_d_e_x faceIndex) const { return getNumFaceVertices │ │ │ │ │ -(faceIndex); } │ │ │ │ │ -423 int getOffsetOfFaceEdges(_I_n_d_e_x faceIndex) const { return │ │ │ │ │ -getOffsetOfFaceVertices(faceIndex); } │ │ │ │ │ -424 │ │ │ │ │ -425 int getNumEdgeVertices( _I_n_d_e_x ) const { return 2; } │ │ │ │ │ -426 int getOffsetOfEdgeVertices(_I_n_d_e_x edgeIndex) const { return 2 * edgeIndex; │ │ │ │ │ -} │ │ │ │ │ -427 │ │ │ │ │ -428 int getNumEdgeFaces( _I_n_d_e_x edgeIndex) const { return │ │ │ │ │ -_edgeFaceCountsAndOffsets[2*edgeIndex]; } │ │ │ │ │ -429 int getOffsetOfEdgeFaces(_I_n_d_e_x edgeIndex) const { return │ │ │ │ │ -_edgeFaceCountsAndOffsets[2*edgeIndex + 1]; } │ │ │ │ │ -430 │ │ │ │ │ -431 int getNumVertexFaces( _I_n_d_e_x vertIndex) const { return │ │ │ │ │ -_vertFaceCountsAndOffsets[2*vertIndex]; } │ │ │ │ │ -432 int getOffsetOfVertexFaces(_I_n_d_e_x vertIndex) const { return │ │ │ │ │ -_vertFaceCountsAndOffsets[2*vertIndex + 1]; } │ │ │ │ │ -433 │ │ │ │ │ -434 int getNumVertexEdges( _I_n_d_e_x vertIndex) const { return │ │ │ │ │ -_vertEdgeCountsAndOffsets[2*vertIndex]; } │ │ │ │ │ -435 int getOffsetOfVertexEdges(_I_n_d_e_x vertIndex) const { return │ │ │ │ │ -_vertEdgeCountsAndOffsets[2*vertIndex + 1]; } │ │ │ │ │ -436 │ │ │ │ │ -437 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceVertices() const; │ │ │ │ │ -438 │ │ │ │ │ -439 // │ │ │ │ │ -440 // Note that for some relations, the size of the relations for a child │ │ │ │ │ -component │ │ │ │ │ -441 // can vary radically from its parent due to the sparsity of the │ │ │ │ │ -refinement. So │ │ │ │ │ -442 // in these cases a few additional utilities are provided to help define │ │ │ │ │ -the set │ │ │ │ │ -443 // of incident components. Assuming adequate memory has been allocated, the │ │ │ │ │ -444 // "resize" methods here initialize the set of incident components by │ │ │ │ │ -setting │ │ │ │ │ -445 // both the size and the appropriate offset, while "trim" is use to quickly │ │ │ │ │ -lower │ │ │ │ │ -446 // the size from an upper bound and nothing else. │ │ │ │ │ -447 // │ │ │ │ │ -448 void resizeFaceVertices(_I_n_d_e_x FaceIndex, int count); │ │ │ │ │ -449 │ │ │ │ │ -450 void resizeEdgeFaces(_I_n_d_e_x edgeIndex, int count); │ │ │ │ │ -451 void trimEdgeFaces( _I_n_d_e_x edgeIndex, int count); │ │ │ │ │ -452 │ │ │ │ │ -453 void resizeVertexFaces(_I_n_d_e_x vertIndex, int count); │ │ │ │ │ -454 void trimVertexFaces( _I_n_d_e_x vertIndex, int count); │ │ │ │ │ -455 │ │ │ │ │ -456 void resizeVertexEdges(_I_n_d_e_x vertIndex, int count); │ │ │ │ │ -457 void trimVertexEdges( _I_n_d_e_x vertIndex, int count); │ │ │ │ │ -458 │ │ │ │ │ -459public: │ │ │ │ │ -460 // │ │ │ │ │ -461 // Initial plans were to have a few specific classes properly construct the │ │ │ │ │ -462 // topology from scratch, e.g. the Refinement class and a Factory class for │ │ │ │ │ -463 // the base level, by populating all topological relations. The need to │ │ │ │ │ -have │ │ │ │ │ -464 // a class construct full topology given only a simple face-vertex list, │ │ │ │ │ -made │ │ │ │ │ -465 // it necessary to write code to define and orient all relations -- and │ │ │ │ │ -most │ │ │ │ │ -466 // of that seemed best placed here. │ │ │ │ │ -467 // │ │ │ │ │ -468 bool completeTopologyFromFaceVertices(); │ │ │ │ │ -469 _I_n_d_e_x findEdge(_I_n_d_e_x v0, _I_n_d_e_x v1, _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y v0Edges) const; │ │ │ │ │ -470 │ │ │ │ │ -471 // Methods supporting the above: │ │ │ │ │ -472 void orientIncidentComponents(); │ │ │ │ │ -473 bool orderVertexFacesAndEdges(_I_n_d_e_x vIndex, _I_n_d_e_x* vFaces, _I_n_d_e_x* vEdges) │ │ │ │ │ -const; │ │ │ │ │ -474 bool orderVertexFacesAndEdges(_I_n_d_e_x vIndex); │ │ │ │ │ -475 void populateLocalIndices(); │ │ │ │ │ -476 │ │ │ │ │ -477 _I_n_d_e_x_A_r_r_a_y shareFaceVertCountsAndOffsets() const; │ │ │ │ │ -478 │ │ │ │ │ -479private: │ │ │ │ │ -480 // Refinement classes (including all subclasses) build a Level: │ │ │ │ │ -481 friend class Refinement; │ │ │ │ │ -482 friend class TriRefinement; │ │ │ │ │ -483 friend class QuadRefinement; │ │ │ │ │ -484 │ │ │ │ │ -485 // │ │ │ │ │ -486 // A Level is independent of subdivision scheme or options. While it may │ │ │ │ │ -have been │ │ │ │ │ -487 // affected by them in its construction, they are not associated with it - │ │ │ │ │ -- a Level │ │ │ │ │ -488 // is pure topology and any subdivision parameters are external. │ │ │ │ │ -489 // │ │ │ │ │ -490 │ │ │ │ │ -491 // Simple members for inventory, etc. │ │ │ │ │ -492 int _faceCount; │ │ │ │ │ -493 int _edgeCount; │ │ │ │ │ -494 int _vertCount; │ │ │ │ │ -495 │ │ │ │ │ -496 // The "depth" member is clearly useful in both the topological splitting │ │ │ │ │ -and the │ │ │ │ │ -497 // stencil queries, but arguably it ties the Level to a hierarchy which │ │ │ │ │ -counters │ │ │ │ │ -498 // the idea of it being independent. │ │ │ │ │ -499 int _depth; │ │ │ │ │ -500 │ │ │ │ │ -501 // Maxima to help clients manage sizing of data buffers. Given "max │ │ │ │ │ -valence", │ │ │ │ │ -502 // the "max edge faces" is strictly redundant as it will always be less, │ │ │ │ │ -but │ │ │ │ │ -503 // since it will typically be so much less (i.e. 2) it is kept for now. │ │ │ │ │ -504 int _maxEdgeFaces; │ │ │ │ │ -505 int _maxValence; │ │ │ │ │ -506 │ │ │ │ │ -507 // │ │ │ │ │ -508 // Topology vectors: │ │ │ │ │ -509 // Note that of all of these, only data for the face-edge relation is not │ │ │ │ │ -510 // stored in the osd::FarTables in any form. The FarTable vectors combine │ │ │ │ │ -511 // the edge-vert and edge-face relations. The eventual goal is that this │ │ │ │ │ -512 // data be part of the osd::Far classes and be a superset of the FarTable │ │ │ │ │ -513 // vectors, i.e. no data duplication or conversion. The fact that FarTable │ │ │ │ │ -514 // already stores 5 of the 6 possible relations should make the topology │ │ │ │ │ -515 // storage as a whole a non-issue. │ │ │ │ │ -516 // │ │ │ │ │ -517 // The vert-face-child and vert-edge-child indices are also arguably not │ │ │ │ │ -518 // a topology relation but more one for parent/child relations. But it is │ │ │ │ │ -519 // a topological relationship, and if named differently would not likely │ │ │ │ │ -520 // raise this. It has been named with "child" in the name as it does play │ │ │ │ │ -521 // a more significant role during subdivision in mapping between parent │ │ │ │ │ -522 // and child components, and so has been named to reflect that more │ │ │ │ │ -clearly. │ │ │ │ │ -523 // │ │ │ │ │ -524 │ │ │ │ │ -525 // Per-face: │ │ │ │ │ -526 std::vector _faceVertCountsAndOffsets; // 2 per face, redundant │ │ │ │ │ -after level 0 │ │ │ │ │ -527 std::vector _faceVertIndices; // 3 or 4 per face, variable at level │ │ │ │ │ -0 │ │ │ │ │ -528 std::vector _faceEdgeIndices; // matches face-vert indices │ │ │ │ │ -529 std::vector _faceTags; // 1 per face: includes "hole" tag │ │ │ │ │ -530 │ │ │ │ │ -531 // Per-edge: │ │ │ │ │ -532 std::vector _edgeVertIndices; // 2 per edge │ │ │ │ │ -533 std::vector _edgeFaceCountsAndOffsets; // 2 per edge │ │ │ │ │ -534 std::vector _edgeFaceIndices; // varies with faces per edge │ │ │ │ │ -535 std::vector _edgeFaceLocalIndices; // varies with faces per │ │ │ │ │ -edge │ │ │ │ │ -536 │ │ │ │ │ -537 std::vector _edgeSharpness; // 1 per edge │ │ │ │ │ -538 std::vector _edgeTags; // 1 per edge: manifold, boundary, etc. │ │ │ │ │ -539 │ │ │ │ │ -540 // Per-vertex: │ │ │ │ │ -541 std::vector _vertFaceCountsAndOffsets; // 2 per vertex │ │ │ │ │ -542 std::vector _vertFaceIndices; // varies with valence │ │ │ │ │ -543 std::vector _vertFaceLocalIndices; // varies with valence, 8- │ │ │ │ │ -bit for now │ │ │ │ │ -544 │ │ │ │ │ -545 std::vector _vertEdgeCountsAndOffsets; // 2 per vertex │ │ │ │ │ -546 std::vector _vertEdgeIndices; // varies with valence │ │ │ │ │ -547 std::vector _vertEdgeLocalIndices; // varies with valence, 8- │ │ │ │ │ -bit for now │ │ │ │ │ -548 │ │ │ │ │ -549 std::vector _vertSharpness; // 1 per vertex │ │ │ │ │ -550 std::vector _vertTags; // 1 per vertex: manifold, Sdc::Rule, etc. │ │ │ │ │ -551 │ │ │ │ │ -552 // Face-varying channels: │ │ │ │ │ -553 std::vector _fvarChannels; │ │ │ │ │ -554}; │ │ │ │ │ -555 │ │ │ │ │ -556// │ │ │ │ │ -557// Access/modify the vertices incident a given face: │ │ │ │ │ -558// │ │ │ │ │ -559inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -560Level::getFaceVertices(_I_n_d_e_x faceIndex) const { │ │ │ │ │ -561 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[_faceVertCountsAndOffsets │ │ │ │ │ -[faceIndex*2+1]], │ │ │ │ │ -562 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ -563} │ │ │ │ │ -564inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -565Level::getFaceVertices(_I_n_d_e_x faceIndex) { │ │ │ │ │ -566 return _I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[_faceVertCountsAndOffsets │ │ │ │ │ -[faceIndex*2+1]], │ │ │ │ │ -567 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ -568} │ │ │ │ │ -569 │ │ │ │ │ -570inline void │ │ │ │ │ -571Level::resizeFaceVertices(_I_n_d_e_x faceIndex, int count) { │ │ │ │ │ -572 │ │ │ │ │ -573 int* countOffsetPair = &_faceVertCountsAndOffsets[faceIndex*2]; │ │ │ │ │ -574 │ │ │ │ │ -575 countOffsetPair[0] = count; │ │ │ │ │ -576 countOffsetPair[1] = (faceIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ -countOffsetPair[-1]); │ │ │ │ │ -577 │ │ │ │ │ -578 _maxValence = std::max(_maxValence, count); │ │ │ │ │ -579} │ │ │ │ │ -580 │ │ │ │ │ -581inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -582Level::getFaceVertices() const { │ │ │ │ │ -583 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertIndices[0], (int)_faceVertIndices.size()); │ │ │ │ │ -584} │ │ │ │ │ -585 │ │ │ │ │ -586// │ │ │ │ │ -587// Access/modify the edges incident a given face: │ │ │ │ │ -588// │ │ │ │ │ -589inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -590Level::getFaceEdges(_I_n_d_e_x faceIndex) const { │ │ │ │ │ -591 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceEdgeIndices[_faceVertCountsAndOffsets │ │ │ │ │ -[faceIndex*2+1]], │ │ │ │ │ -592 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ -593} │ │ │ │ │ -594inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -595Level::getFaceEdges(_I_n_d_e_x faceIndex) { │ │ │ │ │ -596 return _I_n_d_e_x_A_r_r_a_y(&_faceEdgeIndices[_faceVertCountsAndOffsets │ │ │ │ │ -[faceIndex*2+1]], │ │ │ │ │ -597 _faceVertCountsAndOffsets[faceIndex*2]); │ │ │ │ │ -598} │ │ │ │ │ -599 │ │ │ │ │ -600// │ │ │ │ │ -601// Access/modify the faces incident a given vertex: │ │ │ │ │ -602// │ │ │ │ │ -603inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -604Level::getVertexFaces(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -605 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets │ │ │ │ │ -[vertIndex*2+1], │ │ │ │ │ -606 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -607} │ │ │ │ │ -608inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -609Level::getVertexFaces(_I_n_d_e_x vertIndex) { │ │ │ │ │ -610 return _I_n_d_e_x_A_r_r_a_y( (&_vertFaceIndices[0]) + _vertFaceCountsAndOffsets │ │ │ │ │ -[vertIndex*2+1], │ │ │ │ │ -611 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -612} │ │ │ │ │ -613 │ │ │ │ │ -614inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -615Level::getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -616 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertFaceLocalIndices[0]) + │ │ │ │ │ -_vertFaceCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ -617 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -618} │ │ │ │ │ -619inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -620Level::getVertexFaceLocalIndices(_I_n_d_e_x vertIndex) { │ │ │ │ │ -621 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertFaceLocalIndices[0]) + │ │ │ │ │ -_vertFaceCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ -622 _vertFaceCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -623} │ │ │ │ │ -624 │ │ │ │ │ -625inline void │ │ │ │ │ -626Level::resizeVertexFaces(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ -627 int* countOffsetPair = &_vertFaceCountsAndOffsets[vertIndex*2]; │ │ │ │ │ -628 │ │ │ │ │ -629 countOffsetPair[0] = count; │ │ │ │ │ -630 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ -countOffsetPair[-1]); │ │ │ │ │ -631} │ │ │ │ │ -632inline void │ │ │ │ │ -633Level::trimVertexFaces(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ -634 _vertFaceCountsAndOffsets[vertIndex*2] = count; │ │ │ │ │ -635} │ │ │ │ │ -636 │ │ │ │ │ -637// │ │ │ │ │ -638// Access/modify the edges incident a given vertex: │ │ │ │ │ -639// │ │ │ │ │ -640inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -641Level::getVertexEdges(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -642 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets │ │ │ │ │ -[vertIndex*2+1], │ │ │ │ │ -643 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -644} │ │ │ │ │ -645inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -646Level::getVertexEdges(_I_n_d_e_x vertIndex) { │ │ │ │ │ -647 return _I_n_d_e_x_A_r_r_a_y( (&_vertEdgeIndices[0]) +_vertEdgeCountsAndOffsets │ │ │ │ │ -[vertIndex*2+1], │ │ │ │ │ -648 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -649} │ │ │ │ │ -650 │ │ │ │ │ -651inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -652Level::getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -653 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeLocalIndices[0]) + │ │ │ │ │ -_vertEdgeCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ -654 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -655} │ │ │ │ │ -656inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -657Level::getVertexEdgeLocalIndices(_I_n_d_e_x vertIndex) { │ │ │ │ │ -658 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y( (&_vertEdgeLocalIndices[0]) + │ │ │ │ │ -_vertEdgeCountsAndOffsets[vertIndex*2+1], │ │ │ │ │ -659 _vertEdgeCountsAndOffsets[vertIndex*2]); │ │ │ │ │ -660} │ │ │ │ │ -661 │ │ │ │ │ -662inline void │ │ │ │ │ -663Level::resizeVertexEdges(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ -664 int* countOffsetPair = &_vertEdgeCountsAndOffsets[vertIndex*2]; │ │ │ │ │ -665 │ │ │ │ │ -666 countOffsetPair[0] = count; │ │ │ │ │ -667 countOffsetPair[1] = (vertIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ -countOffsetPair[-1]); │ │ │ │ │ -668 │ │ │ │ │ -669 _maxValence = std::max(_maxValence, count); │ │ │ │ │ -670} │ │ │ │ │ -671inline void │ │ │ │ │ -672Level::trimVertexEdges(_I_n_d_e_x vertIndex, int count) { │ │ │ │ │ -673 _vertEdgeCountsAndOffsets[vertIndex*2] = count; │ │ │ │ │ -674} │ │ │ │ │ -675 │ │ │ │ │ -676inline void │ │ │ │ │ -677Level::setMaxValence(int valence) { │ │ │ │ │ -678 _maxValence = valence; │ │ │ │ │ -679} │ │ │ │ │ -680 │ │ │ │ │ -681// │ │ │ │ │ -682// Access/modify the vertices incident a given edge: │ │ │ │ │ -683// │ │ │ │ │ -684inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -685Level::getEdgeVertices(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ -686 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeVertIndices[edgeIndex*2], 2); │ │ │ │ │ -687} │ │ │ │ │ -688inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -689Level::getEdgeVertices(_I_n_d_e_x edgeIndex) { │ │ │ │ │ -690 return _I_n_d_e_x_A_r_r_a_y(&_edgeVertIndices[edgeIndex*2], 2); │ │ │ │ │ -691} │ │ │ │ │ -692 │ │ │ │ │ -693// │ │ │ │ │ -694// Access/modify the faces incident a given edge: │ │ │ │ │ -695// │ │ │ │ │ -696inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -697Level::getEdgeFaces(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ -698 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_edgeFaceIndices[0] + │ │ │ │ │ -699 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ -700 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ -701} │ │ │ │ │ -702inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -703Level::getEdgeFaces(_I_n_d_e_x edgeIndex) { │ │ │ │ │ -704 return _I_n_d_e_x_A_r_r_a_y(&_edgeFaceIndices[0] + │ │ │ │ │ -705 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ -706 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ -707} │ │ │ │ │ -708 │ │ │ │ │ -709inline _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -710Level::getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ -711 return _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y(&_edgeFaceLocalIndices[0] + │ │ │ │ │ -712 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ -713 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ -714} │ │ │ │ │ -715inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -716Level::getEdgeFaceLocalIndices(_I_n_d_e_x edgeIndex) { │ │ │ │ │ -717 return _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y(&_edgeFaceLocalIndices[0] + │ │ │ │ │ -718 _edgeFaceCountsAndOffsets[edgeIndex*2+1], │ │ │ │ │ -719 _edgeFaceCountsAndOffsets[edgeIndex*2]); │ │ │ │ │ -720} │ │ │ │ │ -721 │ │ │ │ │ -722inline void │ │ │ │ │ -723Level::resizeEdgeFaces(_I_n_d_e_x edgeIndex, int count) { │ │ │ │ │ -724 int* countOffsetPair = &_edgeFaceCountsAndOffsets[edgeIndex*2]; │ │ │ │ │ -725 │ │ │ │ │ -726 countOffsetPair[0] = count; │ │ │ │ │ -727 countOffsetPair[1] = (edgeIndex == 0) ? 0 : (countOffsetPair[-2] + │ │ │ │ │ -countOffsetPair[-1]); │ │ │ │ │ -728 │ │ │ │ │ -729 _maxEdgeFaces = std::max(_maxEdgeFaces, count); │ │ │ │ │ -730} │ │ │ │ │ -731inline void │ │ │ │ │ -732Level::trimEdgeFaces(_I_n_d_e_x edgeIndex, int count) { │ │ │ │ │ -733 _edgeFaceCountsAndOffsets[edgeIndex*2] = count; │ │ │ │ │ -734} │ │ │ │ │ -735 │ │ │ │ │ -736// │ │ │ │ │ -737// Access/modify sharpness values: │ │ │ │ │ -738// │ │ │ │ │ -739inline float │ │ │ │ │ -740Level::getEdgeSharpness(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ -741 return _edgeSharpness[edgeIndex]; │ │ │ │ │ -742} │ │ │ │ │ -743inline float& │ │ │ │ │ -744Level::getEdgeSharpness(_I_n_d_e_x edgeIndex) { │ │ │ │ │ -745 return _edgeSharpness[edgeIndex]; │ │ │ │ │ -746} │ │ │ │ │ -747 │ │ │ │ │ -748inline float │ │ │ │ │ -749Level::getVertexSharpness(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -750 return _vertSharpness[vertIndex]; │ │ │ │ │ -751} │ │ │ │ │ -752inline float& │ │ │ │ │ -753Level::getVertexSharpness(_I_n_d_e_x vertIndex) { │ │ │ │ │ -754 return _vertSharpness[vertIndex]; │ │ │ │ │ -755} │ │ │ │ │ -756 │ │ │ │ │ -757inline _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ -758Level::getVertexRule(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -759 return (_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e) _vertTags[vertIndex]._rule; │ │ │ │ │ -760} │ │ │ │ │ -761 │ │ │ │ │ -762// │ │ │ │ │ -763// Access/modify hole tag: │ │ │ │ │ -764// │ │ │ │ │ -765inline void │ │ │ │ │ -766Level::setFaceHole(_I_n_d_e_x faceIndex, bool b) { │ │ │ │ │ -767 _faceTags[faceIndex]._hole = b; │ │ │ │ │ -768} │ │ │ │ │ -769inline bool │ │ │ │ │ -770Level::isFaceHole(_I_n_d_e_x faceIndex) const { │ │ │ │ │ -771 return _faceTags[faceIndex]._hole; │ │ │ │ │ -772} │ │ │ │ │ -773 │ │ │ │ │ -774// │ │ │ │ │ -775// Access/modify non-manifold tags: │ │ │ │ │ -776// │ │ │ │ │ -777inline void │ │ │ │ │ -778Level::setEdgeNonManifold(_I_n_d_e_x edgeIndex, bool b) { │ │ │ │ │ -779 _edgeTags[edgeIndex]._nonManifold = b; │ │ │ │ │ -780} │ │ │ │ │ -781inline bool │ │ │ │ │ -782Level::isEdgeNonManifold(_I_n_d_e_x edgeIndex) const { │ │ │ │ │ -783 return _edgeTags[edgeIndex]._nonManifold; │ │ │ │ │ -784} │ │ │ │ │ -785 │ │ │ │ │ -786inline void │ │ │ │ │ -787Level::setVertexNonManifold(_I_n_d_e_x vertIndex, bool b) { │ │ │ │ │ -788 _vertTags[vertIndex]._nonManifold = b; │ │ │ │ │ -789} │ │ │ │ │ -790inline bool │ │ │ │ │ -791Level::isVertexNonManifold(_I_n_d_e_x vertIndex) const { │ │ │ │ │ -792 return _vertTags[vertIndex]._nonManifold; │ │ │ │ │ -793} │ │ │ │ │ -794 │ │ │ │ │ -795// │ │ │ │ │ -796// Sizing methods to allocate space: │ │ │ │ │ -797// │ │ │ │ │ -798inline void │ │ │ │ │ -799Level::resizeFaces(int faceCount) { │ │ │ │ │ -800 _faceCount = faceCount; │ │ │ │ │ -801 _faceVertCountsAndOffsets.resize(2 * faceCount); │ │ │ │ │ -802 │ │ │ │ │ -803 _faceTags.resize(faceCount); │ │ │ │ │ -804 std::memset((void*) &_faceTags[0], 0, _faceCount * sizeof(FTag)); │ │ │ │ │ -805} │ │ │ │ │ -806inline void │ │ │ │ │ -807Level::resizeFaceVertices(int totalFaceVertCount) { │ │ │ │ │ -808 _faceVertIndices.resize(totalFaceVertCount); │ │ │ │ │ -809} │ │ │ │ │ -810inline void │ │ │ │ │ -811Level::resizeFaceEdges(int totalFaceEdgeCount) { │ │ │ │ │ -812 _faceEdgeIndices.resize(totalFaceEdgeCount); │ │ │ │ │ -813} │ │ │ │ │ -814 │ │ │ │ │ -815inline void │ │ │ │ │ -816Level::resizeEdges(int edgeCount) { │ │ │ │ │ -817 │ │ │ │ │ -818 _edgeCount = edgeCount; │ │ │ │ │ -819 _edgeFaceCountsAndOffsets.resize(2 * edgeCount); │ │ │ │ │ -820 │ │ │ │ │ -821 _edgeSharpness.resize(edgeCount); │ │ │ │ │ -822 _edgeTags.resize(edgeCount); │ │ │ │ │ -823 │ │ │ │ │ -824 if (edgeCount>0) { │ │ │ │ │ -825 std::memset((void*) &_edgeTags[0], 0, _edgeCount * sizeof(ETag)); │ │ │ │ │ -826 } │ │ │ │ │ -827} │ │ │ │ │ -828inline void │ │ │ │ │ -829Level::resizeEdgeVertices() { │ │ │ │ │ -830 │ │ │ │ │ -831 _edgeVertIndices.resize(2 * _edgeCount); │ │ │ │ │ -832} │ │ │ │ │ -833inline void │ │ │ │ │ -834Level::resizeEdgeFaces(int totalEdgeFaceCount) { │ │ │ │ │ -835 │ │ │ │ │ -836 _edgeFaceIndices.resize(totalEdgeFaceCount); │ │ │ │ │ -837 _edgeFaceLocalIndices.resize(totalEdgeFaceCount); │ │ │ │ │ -838} │ │ │ │ │ -839 │ │ │ │ │ -840inline void │ │ │ │ │ -841Level::resizeVertices(int vertCount) { │ │ │ │ │ -842 │ │ │ │ │ -843 _vertCount = vertCount; │ │ │ │ │ -844 _vertFaceCountsAndOffsets.resize(2 * vertCount); │ │ │ │ │ -845 _vertEdgeCountsAndOffsets.resize(2 * vertCount); │ │ │ │ │ -846 │ │ │ │ │ -847 _vertSharpness.resize(vertCount); │ │ │ │ │ -848 _vertTags.resize(vertCount); │ │ │ │ │ -849 std::memset((void*) &_vertTags[0], 0, _vertCount * sizeof(VTag)); │ │ │ │ │ -850} │ │ │ │ │ -851inline void │ │ │ │ │ -852Level::resizeVertexFaces(int totalVertFaceCount) { │ │ │ │ │ -853 │ │ │ │ │ -854 _vertFaceIndices.resize(totalVertFaceCount); │ │ │ │ │ -855 _vertFaceLocalIndices.resize(totalVertFaceCount); │ │ │ │ │ -856} │ │ │ │ │ -857inline void │ │ │ │ │ -858Level::resizeVertexEdges(int totalVertEdgeCount) { │ │ │ │ │ -859 │ │ │ │ │ -860 _vertEdgeIndices.resize(totalVertEdgeCount); │ │ │ │ │ -861 _vertEdgeLocalIndices.resize(totalVertEdgeCount); │ │ │ │ │ -862} │ │ │ │ │ -863 │ │ │ │ │ -864inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -865Level::shareFaceVertCountsAndOffsets() const { │ │ │ │ │ -866 // XXXX manuelk we have to force const casting here (classes don't 'share' │ │ │ │ │ -867 // members usually...) │ │ │ │ │ -868 return _I_n_d_e_x_A_r_r_a_y(const_cast<_I_n_d_e_x *>(&_faceVertCountsAndOffsets[0]), │ │ │ │ │ -869 (int)_faceVertCountsAndOffsets.size()); │ │ │ │ │ -870} │ │ │ │ │ -871 │ │ │ │ │ -872} // end namespace internal │ │ │ │ │ -873} // end namespace Vtr │ │ │ │ │ -874 │ │ │ │ │ -875} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -876using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -877} // end namespace OpenSubdiv │ │ │ │ │ -878 │ │ │ │ │ -879#endif /* OPENSUBDIV3_VTR_LEVEL_H */ │ │ │ │ │ +132 │ │ │ │ │ +133 float GetChildSharpness(Sdc::Crease const&) const { return _child- │ │ │ │ │ +>getVertexSharpness(_cIndex); } │ │ │ │ │ +134 float* GetChildSharpnessPerEdge(Sdc::Crease const& crease, float cSharpness │ │ │ │ │ +[]) const { │ │ │ │ │ +135 internal::StackBuffer pSharpness(_eCount); │ │ │ │ │ +136 GetSharpnessPerEdge(pSharpness); │ │ │ │ │ +137 crease.SubdivideEdgeSharpnessesAroundVertex(_eCount, pSharpness, │ │ │ │ │ +cSharpness); │ │ │ │ │ +138 return cSharpness; │ │ │ │ │ +139 } │ │ │ │ │ +140 │ │ │ │ │ +141private: │ │ │ │ │ +142 const Level* _parent; │ │ │ │ │ +143 const Level* _child; │ │ │ │ │ +144 │ │ │ │ │ +145 int _pIndex; │ │ │ │ │ +146 int _cIndex; │ │ │ │ │ +147 int _eCount; │ │ │ │ │ +148 int _fCount; │ │ │ │ │ +149}; │ │ │ │ │ +150 │ │ │ │ │ +151} // end namespace internal │ │ │ │ │ +152} // end namespace Vtr │ │ │ │ │ +153 │ │ │ │ │ +154} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +155using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +156} // end namespace OpenSubdiv │ │ │ │ │ +157 │ │ │ │ │ +158#endif /* OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -ConstArray< LocalIndex > ConstLocalIndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -Array< LocalIndex > LocalIndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x │ │ │ │ │ -int Index │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_5_4 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ ConstArray< Index > ConstIndexArray │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_L_o_c_a_l_I_n_d_e_x │ │ │ │ │ -unsigned short LocalIndex │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_V_t_r_:_:_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -Array< Index > IndexArray │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e │ │ │ │ │ -Rule │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_8_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _v_t_r │ │ │ │ │ - * _l_e_v_e_l_._h │ │ │ │ │ + * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ @@ -261,15 +261,15 @@ │ │ │ │
142} // end namespace Vtr
│ │ │ │
143
│ │ │ │
144} // end namespace OPENSUBDIV_VERSION
│ │ │ │
145using namespace OPENSUBDIV_VERSION;
│ │ │ │
146} // end namespace OpenSubdiv
│ │ │ │
147
│ │ │ │
148#endif /* OPENSUBDIV3_VTR_ARRAY_INTERFACE_H */
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
const_reference operator[](int index) const
Definition array.h:76
│ │ │ │ │ │ │ │
size_type FindIndexIn4Tuple(value_type value) const
Definition array.h:80
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │ Classes | │ │ │ │ Namespaces │ │ │ │
scheme.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │ #include "../sdc/crease.h"
│ │ │ │ #include <cassert>
│ │ │ │ #include <cstdlib>
│ │ │ │ #include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ @@ -7091,15 +7091,15 @@ │ │ │ │ 0001bb20: 746d 6c22 3e3c 6469 7620 636c 6173 733d tml">.
All supporte │ │ │ │ 0001ce20: 6420 6f70 7469 6f6e 7320 6170 706c 7969 d options applyi │ │ │ │ 0001ce30: 6e67 2074 6f20 7375 6264 6976 6973 696f ng to subdivisio │ │ │ │ 0001ce40: 6e20 7363 6865 6d65 2e3c 2f64 6976 3e3c n scheme.
< │ │ │ │ 0001ce50: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ 0001ce60: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ 0001ce70: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> options. │ │ │ │ 0001cea0: 683a 3531 3c2f 613e 3c2f 6469 763e 3c2f h:51. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -
loopScheme.h File Reference
│ │ │ │ +
options.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/scheme.h"
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cmath>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Options
 All supported options applying to subdivision scheme. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,23 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -loopScheme.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +options.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_s_c_h_e_m_e_._h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _O_p_t_i_o_n_s │ │ │ │ │ +  All supported options applying to subdivision scheme. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _s_d_c │ │ │ │ │ - * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_p_t_i_o_n_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/loopScheme.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/options.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
loopScheme.h
│ │ │ │ +
options.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,618 +118,137 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H
│ │ │ │ -
25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_SDC_OPTIONS_H
│ │ │ │ +
25#define OPENSUBDIV3_SDC_OPTIONS_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29#include "../sdc/scheme.h"
│ │ │ │ -
30
│ │ │ │ -
31#include <cassert>
│ │ │ │ -
32#include <cmath>
│ │ │ │ +
29namespace OpenSubdiv {
│ │ │ │ +
30namespace OPENSUBDIV_VERSION {
│ │ │ │ +
31
│ │ │ │ +
32namespace Sdc {
│ │ │ │
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36namespace Sdc {
│ │ │ │ -
37
│ │ │ │ -
38
│ │ │ │ -
39//
│ │ │ │ -
40// Specializations for Sdc::Scheme<SCHEME_LOOP>:
│ │ │ │ -
41//
│ │ │ │ -
42//
│ │ │ │ -
43
│ │ │ │ -
44//
│ │ │ │ -
45// Loop traits:
│ │ │ │ -
46//
│ │ │ │ -
47template <>
│ │ │ │ - │ │ │ │ -
49
│ │ │ │ -
50template <>
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
53template <>
│ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
56template <>
│ │ │ │ - │ │ │ │ -
58
│ │ │ │ -
59
│ │ │ │ -
60//
│ │ │ │ -
61// Protected methods to assign the two types of masks for an edge-vertex --
│ │ │ │ -
62// Crease and Smooth.
│ │ │ │ -
63//
│ │ │ │ -
64// The Crease case does not really need to be specialized, though it may be
│ │ │ │ -
65// preferable to define all explicitly here.
│ │ │ │ -
66//
│ │ │ │ -
67template <>
│ │ │ │ -
68template <typename EDGE, typename MASK>
│ │ │ │ -
69inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71{
│ │ │ │ -
72 mask.SetNumVertexWeights(2);
│ │ │ │ -
73 mask.SetNumEdgeWeights(0);
│ │ │ │ -
74 mask.SetNumFaceWeights(0);
│ │ │ │ -
75 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51class Options {
│ │ │ │ +
52public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
59 };
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
67 };
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
71 };
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
75 };
│ │ │ │ +
│ │ │ │
76
│ │ │ │ -
77 mask.VertexWeight(0) = 0.5f;
│ │ │ │ -
78 mask.VertexWeight(1) = 0.5f;
│ │ │ │ -
79}
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81template <>
│ │ │ │ -
82template <typename EDGE, typename MASK>
│ │ │ │ -
83inline void
│ │ │ │ -
│ │ │ │ -
84Scheme<SCHEME_LOOP>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const
│ │ │ │ -
85{
│ │ │ │ -
86 int faceCount = edge.GetNumFaces();
│ │ │ │ +
77public:
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
79 Options() : _vtxBoundInterp(VTX_BOUNDARY_NONE),
│ │ │ │ +
80 _fvarLinInterp(FVAR_LINEAR_ALL),
│ │ │ │ +
81 _creasingMethod(CREASE_UNIFORM),
│ │ │ │ +
82 _triangleSub(TRI_SUB_CATMARK) { }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
84 //
│ │ │ │ +
85 // Trivial get/set methods:
│ │ │ │ +
86 //
│ │ │ │
87
│ │ │ │ -
88 mask.SetNumVertexWeights(2);
│ │ │ │ -
89 mask.SetNumEdgeWeights(0);
│ │ │ │ -
90 mask.SetNumFaceWeights(faceCount);
│ │ │ │ -
91 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
92
│ │ │ │ -
93 //
│ │ │ │ -
94 // This is where we run into the issue of "face weights" -- we want to weight the
│ │ │ │ -
95 // face-centers for Catmark, but face-centers are not generated for Loop. So do
│ │ │ │ -
96 // we make assumptions on how the mask is used, assign some property to the mask
│ │ │ │ -
97 // to indicate how they were assigned, or take input from the mask itself?
│ │ │ │ -
98 //
│ │ │ │ -
99 // Regardless, we have two choices:
│ │ │ │ -
100 // - face-weights are for the vertices opposite the edge (as in Hbr):
│ │ │ │ -
101 // vertex weights = 0.375f;
│ │ │ │ -
102 // face weights = 0.125f;
│ │ │ │ -
103 //
│ │ │ │ -
104 // - face-weights are for the face centers:
│ │ │ │ -
105 // vertex weights = 0.125f;
│ │ │ │ -
106 // face weights = 0.375f;
│ │ │ │ -
107 //
│ │ │ │ -
108 // Coincidentally the coefficients are the same but reversed.
│ │ │ │ -
109 //
│ │ │ │ -
110 typedef typename MASK::Weight Weight;
│ │ │ │ + │ │ │ │ +
90
│ │ │ │ +
92 void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b) { _vtxBoundInterp = (EnumIntType) b; }
│ │ │ │ +
93
│ │ │ │ + │ │ │ │ +
96
│ │ │ │ +
98 void SetFVarLinearInterpolation(FVarLinearInterpolation b) { _fvarLinInterp = (EnumIntType) b; }
│ │ │ │ +
99
│ │ │ │ +
101 CreasingMethod GetCreasingMethod() const { return (CreasingMethod) _creasingMethod; }
│ │ │ │ +
102
│ │ │ │ +
104 void SetCreasingMethod(CreasingMethod c) { _creasingMethod = (EnumIntType) c; }
│ │ │ │ +
105
│ │ │ │ + │ │ │ │ +
108
│ │ │ │ +
110 void SetTriangleSubdivision(TriangleSubdivision t) { _triangleSub = (EnumIntType) t; }
│ │ │ │
111
│ │ │ │ -
112 Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f;
│ │ │ │ -
113 Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f;
│ │ │ │ -
114
│ │ │ │ -
115 mask.VertexWeight(0) = vWeight;
│ │ │ │ -
116 mask.VertexWeight(1) = vWeight;
│ │ │ │ -
117
│ │ │ │ -
118 if (faceCount == 2) {
│ │ │ │ -
119 mask.FaceWeight(0) = fWeight;
│ │ │ │ -
120 mask.FaceWeight(1) = fWeight;
│ │ │ │ -
121 } else {
│ │ │ │ -
122 // The non-manifold case is not clearly defined -- we adjust the above
│ │ │ │ -
123 // face-weight to preserve the ratio of edge-center and face-centers:
│ │ │ │ -
124 fWeight *= 2.0f / (Weight) faceCount;
│ │ │ │ -
125 for (int i = 0; i < faceCount; ++i) {
│ │ │ │ -
126 mask.FaceWeight(i) = fWeight;
│ │ │ │ -
127 }
│ │ │ │ -
128 }
│ │ │ │ -
129}
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131
│ │ │ │ -
132//
│ │ │ │ -
133// Protected methods to assign the three types of masks for a vertex-vertex --
│ │ │ │ -
134// Corner, Crease and Smooth (Dart is the same as Smooth).
│ │ │ │ -
135//
│ │ │ │ -
136// Corner and Crease do not really need to be specialized, though it may be
│ │ │ │ -
137// preferable to define all explicitly here.
│ │ │ │ -
138//
│ │ │ │ -
139template <>
│ │ │ │ -
140template <typename VERTEX, typename MASK>
│ │ │ │ -
141inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
143{
│ │ │ │ -
144 mask.SetNumVertexWeights(1);
│ │ │ │ -
145 mask.SetNumEdgeWeights(0);
│ │ │ │ -
146 mask.SetNumFaceWeights(0);
│ │ │ │ -
147 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
148
│ │ │ │ -
149 mask.VertexWeight(0) = 1.0f;
│ │ │ │ -
150}
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
152template <>
│ │ │ │ -
153template <typename VERTEX, typename MASK>
│ │ │ │ -
154inline void
│ │ │ │ -
│ │ │ │ -
155Scheme<SCHEME_LOOP>::assignCreaseMaskForVertex(VERTEX const& vertex, MASK& mask,
│ │ │ │ -
156 int const creaseEnds[2]) const {
│ │ │ │ -
157 typedef typename MASK::Weight Weight;
│ │ │ │ -
158
│ │ │ │ -
159 int valence = vertex.GetNumEdges();
│ │ │ │ -
160
│ │ │ │ -
161 mask.SetNumVertexWeights(1);
│ │ │ │ -
162 mask.SetNumEdgeWeights(valence);
│ │ │ │ -
163 mask.SetNumFaceWeights(0);
│ │ │ │ -
164 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
165
│ │ │ │ -
166 Weight vWeight = 0.75f;
│ │ │ │ -
167 Weight eWeight = 0.125f;
│ │ │ │ -
168
│ │ │ │ -
169 mask.VertexWeight(0) = vWeight;
│ │ │ │ -
170 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
171 mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
172 }
│ │ │ │ -
173 mask.EdgeWeight(creaseEnds[0]) = eWeight;
│ │ │ │ -
174 mask.EdgeWeight(creaseEnds[1]) = eWeight;
│ │ │ │ -
175}
│ │ │ │ -
│ │ │ │ -
176
│ │ │ │ -
177template <>
│ │ │ │ -
178template <typename VERTEX, typename MASK>
│ │ │ │ -
179inline void
│ │ │ │ -
│ │ │ │ -
180Scheme<SCHEME_LOOP>::assignSmoothMaskForVertex(VERTEX const& vertex, MASK& mask) const
│ │ │ │ -
181{
│ │ │ │ -
182 typedef typename MASK::Weight Weight;
│ │ │ │ -
183
│ │ │ │ -
184 int valence = vertex.GetNumFaces();
│ │ │ │ -
185
│ │ │ │ -
186 mask.SetNumVertexWeights(1);
│ │ │ │ -
187 mask.SetNumEdgeWeights(valence);
│ │ │ │ -
188 mask.SetNumFaceWeights(0);
│ │ │ │ -
189 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
190
│ │ │ │ -
191 // Specialize for the regular case: 1/16 per edge-vert, 5/8 for the vert itself:
│ │ │ │ -
192 Weight eWeight = (Weight) 0.0625f;
│ │ │ │ -
193 Weight vWeight = (Weight) 0.625f;
│ │ │ │ -
194
│ │ │ │ -
195 if (valence != 6) {
│ │ │ │ -
196 // From HbrLoopSubdivision<T>::Subdivide(mesh, vertex):
│ │ │ │ -
197 // - could use some lookup tables here for common irregular valence (5, 7, 8)
│ │ │ │ -
198 // or all of these cosine calls will be adding up...
│ │ │ │ -
199
│ │ │ │ -
200 double dValence = (double) valence;
│ │ │ │ -
201 double invValence = 1.0f / dValence;
│ │ │ │ -
202 double cosTheta = std::cos(M_PI * 2.0f * invValence);
│ │ │ │ -
203
│ │ │ │ -
204 double beta = 0.25f * cosTheta + 0.375f;
│ │ │ │ -
205
│ │ │ │ -
206 eWeight = (Weight) ((0.625f - (beta * beta)) * invValence);
│ │ │ │ -
207 vWeight = (Weight) (1.0f - (eWeight * dValence));
│ │ │ │ -
208 }
│ │ │ │ -
209
│ │ │ │ -
210 mask.VertexWeight(0) = vWeight;
│ │ │ │ -
211 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
212 mask.EdgeWeight(i) = eWeight;
│ │ │ │ -
213 }
│ │ │ │ -
214}
│ │ │ │ -
│ │ │ │ -
215
│ │ │ │ -
216
│ │ │ │ -
217//
│ │ │ │ -
218// Limit masks for position:
│ │ │ │ -
219//
│ │ │ │ -
220template <>
│ │ │ │ -
221template <typename VERTEX, typename MASK>
│ │ │ │ -
222inline void
│ │ │ │ -
│ │ │ │ -
223Scheme<SCHEME_LOOP>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
│ │ │ │ -
224
│ │ │ │ -
225 posMask.SetNumVertexWeights(1);
│ │ │ │ -
226 posMask.SetNumEdgeWeights(0);
│ │ │ │ -
227 posMask.SetNumFaceWeights(0);
│ │ │ │ -
228 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
229
│ │ │ │ -
230 posMask.VertexWeight(0) = 1.0f;
│ │ │ │ -
231}
│ │ │ │ -
│ │ │ │ -
232
│ │ │ │ -
233template <>
│ │ │ │ -
234template <typename VERTEX, typename MASK>
│ │ │ │ -
235inline void
│ │ │ │ -
│ │ │ │ -
236Scheme<SCHEME_LOOP>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
│ │ │ │ -
237 int const creaseEnds[2]) const {
│ │ │ │ -
238
│ │ │ │ -
239 typedef typename MASK::Weight Weight;
│ │ │ │ -
240
│ │ │ │ -
241 int valence = vertex.GetNumEdges();
│ │ │ │ -
242
│ │ │ │ -
243 posMask.SetNumVertexWeights(1);
│ │ │ │ -
244 posMask.SetNumEdgeWeights(valence);
│ │ │ │ -
245 posMask.SetNumFaceWeights(0);
│ │ │ │ -
246 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
247
│ │ │ │ -
248 //
│ │ │ │ -
249 // The refinement mask for a crease vertex is (1/8, 3/4, 1/8) and for a crease
│ │ │ │ -
250 // edge is (1/2, 1/2) -- producing a uniform B-spline curve along the crease
│ │ │ │ -
251 // (boundary) whether the vertex or its crease is regular or not. The limit
│ │ │ │ -
252 // mask is therefore (1/6, 2/3, 1/6) for ALL cases.
│ │ │ │ -
253 //
│ │ │ │ -
254 // An alternative limit mask (1/5, 3/5, 1/5) is often published for use either
│ │ │ │ -
255 // for irregular crease vertices or for all crease/boundary vertices, but this
│ │ │ │ -
256 // is based on an alternate refinement mask for the edge -- (3/8, 5/8) versus
│ │ │ │ -
257 // the usual (1/2, 1/2) -- and will not produce the B-spline curve desired.
│ │ │ │ -
258 //
│ │ │ │ -
259 Weight vWeight = (Weight) (4.0 / 6.0);
│ │ │ │ -
260 Weight eWeight = (Weight) (1.0 / 6.0);
│ │ │ │ -
261
│ │ │ │ -
262 posMask.VertexWeight(0) = vWeight;
│ │ │ │ -
263 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
264 posMask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
265 }
│ │ │ │ -
266 posMask.EdgeWeight(creaseEnds[0]) = eWeight;
│ │ │ │ -
267 posMask.EdgeWeight(creaseEnds[1]) = eWeight;
│ │ │ │ -
268}
│ │ │ │ -
│ │ │ │ -
269
│ │ │ │ -
270template <>
│ │ │ │ -
271template <typename VERTEX, typename MASK>
│ │ │ │ -
272inline void
│ │ │ │ -
│ │ │ │ -
273Scheme<SCHEME_LOOP>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
│ │ │ │ -
274
│ │ │ │ -
275 typedef typename MASK::Weight Weight;
│ │ │ │ -
276
│ │ │ │ -
277 int valence = vertex.GetNumFaces();
│ │ │ │ -
278
│ │ │ │ -
279 posMask.SetNumVertexWeights(1);
│ │ │ │ -
280 posMask.SetNumEdgeWeights(valence);
│ │ │ │ -
281 posMask.SetNumFaceWeights(0);
│ │ │ │ -
282 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
283
│ │ │ │ -
284 // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert itself:
│ │ │ │ -
285 if (valence == 6) {
│ │ │ │ -
286 Weight eWeight = (Weight) (1.0 / 12.0);
│ │ │ │ -
287 Weight vWeight = 0.5f;
│ │ │ │ -
288
│ │ │ │ -
289 posMask.VertexWeight(0) = vWeight;
│ │ │ │ -
290
│ │ │ │ -
291 posMask.EdgeWeight(0) = eWeight;
│ │ │ │ -
292 posMask.EdgeWeight(1) = eWeight;
│ │ │ │ -
293 posMask.EdgeWeight(2) = eWeight;
│ │ │ │ -
294 posMask.EdgeWeight(3) = eWeight;
│ │ │ │ -
295 posMask.EdgeWeight(4) = eWeight;
│ │ │ │ -
296 posMask.EdgeWeight(5) = eWeight;
│ │ │ │ -
297
│ │ │ │ -
298 } else {
│ │ │ │ -
299 double dValence = (double) valence;
│ │ │ │ -
300 double invValence = 1.0f / dValence;
│ │ │ │ -
301 double cosTheta = std::cos(M_PI * 2.0f * invValence);
│ │ │ │ -
302
│ │ │ │ -
303 double beta = 0.25f * cosTheta + 0.375f;
│ │ │ │ -
304 double gamma = (0.625f - (beta * beta)) * invValence;
│ │ │ │ -
305
│ │ │ │ -
306 Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma)));
│ │ │ │ -
307 Weight vWeight = (Weight) (1.0f - (eWeight * dValence));
│ │ │ │ -
308
│ │ │ │ -
309 posMask.VertexWeight(0) = vWeight;
│ │ │ │ -
310 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
311 posMask.EdgeWeight(i) = eWeight;
│ │ │ │ -
312 }
│ │ │ │ -
313 }
│ │ │ │ -
314}
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316/*
│ │ │ │ -
317// Limit masks for tangents:
│ │ │ │ -
318//
│ │ │ │ -
319// A note on tangent magnitudes:
│ │ │ │ -
320//
│ │ │ │ -
321// Several formulae exist for limit tangents at a vertex to accommodate the
│ │ │ │ -
322// different topological configurations around the vertex. While these produce
│ │ │ │ -
323// the desired direction, there is inconsistency in the resulting magnitudes.
│ │ │ │ -
324// Ideally a regular mesh of uniformly shaped triangles with similar edge lengths
│ │ │ │ -
325// should produce tangents of similar magnitudes throughout -- including corners
│ │ │ │ -
326// and boundaries. So some of the common formulae for these are adjusted with
│ │ │ │ -
327// scale factors.
│ │ │ │ -
328//
│ │ │ │ -
329// For uses where magnitude does not matter, this scaling should be irrelevant.
│ │ │ │ -
330// But just as with patches, where the magnitudes of partial derivatives are
│ │ │ │ -
331// consistent between similar patches, the magnitudes of limit tangents should
│ │ │ │ -
332// also be similar.
│ │ │ │ -
333//
│ │ │ │ -
334// The reference tangents, in terms of magnitudes, are those produced by the
│ │ │ │ -
335// limit tangent mask for smooth interior vertices, for which well established
│ │ │ │ -
336// sin/cos formulae apply -- these remain unscaled. Formulae for the other
│ │ │ │ -
337// crease/boundary, corner tangents and irregular cases are scaled to be more
│ │ │ │ -
338// consistent with these.
│ │ │ │ -
339//
│ │ │ │ -
340// The crease/boundary tangents for the regular case can be viewed as derived
│ │ │ │ -
341// from the smooth interior masks with two "phantom" points extrapolated across
│ │ │ │ -
342// the regular boundary:
│ │ │ │ -
343//
│ │ │ │ -
344// v3 v2
│ │ │ │ -
345// X - - - - - X
│ │ │ │ -
346// / \ / \
│ │ │ │ -
347// / \ / \
│ │ │ │ -
348// v4 X - - - - - X - - - - - X v1
│ │ │ │ -
349// . . 0 . .
│ │ │ │ -
350// . . . .
│ │ │ │ -
351// . . . .
│ │ │ │ -
352// (v5) (v6)
│ │ │ │ -
353//
│ │ │ │ -
354// where v5 = v0 + (v4 - v3) and v6 = v0 + v1 - v2.
│ │ │ │ -
355//
│ │ │ │ -
356// When the standard limit tangent mask is applied, the cosines of increments
│ │ │ │ -
357// of pi/3 give us coefficients that are multiples of 1/2, leading to the first
│ │ │ │ -
358// tangent T1 = 3/2 * (v1 - v4), rather than the widely used T1 = v1 - v4. So
│ │ │ │ -
359// this scale factor of 3/2 is applied to ensure tangents along the boundaries
│ │ │ │ -
360// are of similar magnitude as tangents in the immediate interior (which may be
│ │ │ │ -
361// parallel).
│ │ │ │ -
362//
│ │ │ │ -
363// Tangents at corners are essentially a form of boundary tangent, and so its
│ │ │ │ -
364// simple difference formula is scaled to be consistent with adjoining boundary
│ │ │ │ -
365// tangents -- not just with the 3/2 factor from above, but with an additional
│ │ │ │ -
366// 2.0 to compensate for the fact that the difference of only side of the vertex
│ │ │ │ -
367// is considered here. The resulting scale factor of 3.0 for the regular corner
│ │ │ │ -
368// is what similarly arises by extrapolating an interior region around the
│ │ │ │ -
369// vertex and using the interior mask for the first tangent.
│ │ │ │ -
370//
│ │ │ │ -
371// The cross-tangent formula for the regular crease/boundary is similarly found
│ │ │ │ -
372// from the above construction of the boundary, but the commonly used weights of
│ │ │ │ -
373// +/- 1 and 2 result from omitting the common factor of sqrt(3)/2 (arising from
│ │ │ │ -
374// the sines of increments of pi/3). With that scale factor close to one, it has
│ │ │ │ -
375// less impact than the irregular cases, which are analogous to corner tangents
│ │ │ │ -
376// in that differences on only one side of the vertex are considered. While a
│ │ │ │ -
377// scaling of 3.0 is similarly understandable for the valence 2 and 3 cases, it is
│ │ │ │ -
378// less obvious in the irregular formula for valence > 4, but similarly effective.
│ │ │ │ -
379//
│ │ │ │ -
380// The end result of these adjustments should be a set of limit tangents that are
│ │ │ │ -
381// of similar magnitude over a regular mesh including boundaries and corners.
│ │ │ │ -
382*/
│ │ │ │ -
383template <>
│ │ │ │ -
384template <typename VERTEX, typename MASK>
│ │ │ │ -
385inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
387 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ -
388
│ │ │ │ -
389 int valence = vertex.GetNumEdges();
│ │ │ │ -
390
│ │ │ │ -
391 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ -
392 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
393 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ -
394 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
395
│ │ │ │ -
396 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ -
397 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
398 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ -
399 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
400
│ │ │ │ -
401 // See note above regarding scale factor of 3.0:
│ │ │ │ -
402 tan1Mask.VertexWeight(0) = -3.0f;
│ │ │ │ -
403 tan1Mask.EdgeWeight(0) = 3.0f;
│ │ │ │ -
404 tan1Mask.EdgeWeight(1) = 0.0f;
│ │ │ │ -
405
│ │ │ │ -
406 tan2Mask.VertexWeight(0) = -3.0f;
│ │ │ │ -
407 tan2Mask.EdgeWeight(0) = 0.0f;
│ │ │ │ -
408 tan2Mask.EdgeWeight(1) = 3.0f;
│ │ │ │ -
409
│ │ │ │ -
410 // Should be at least 2 edges -- be sure to clear weights for any more:
│ │ │ │ -
411 for (int i = 2; i < valence; ++i) {
│ │ │ │ -
412 tan1Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
413 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
414 }
│ │ │ │ -
415}
│ │ │ │ -
│ │ │ │ -
416
│ │ │ │ -
417template <>
│ │ │ │ -
418template <typename VERTEX, typename MASK>
│ │ │ │ -
419inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
421 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const {
│ │ │ │ -
422
│ │ │ │ -
423 typedef typename MASK::Weight Weight;
│ │ │ │ -
424
│ │ │ │ -
425 //
│ │ │ │ -
426 // First, the tangent along the crease:
│ │ │ │ -
427 // The first crease edge is considered the "leading" edge of the span
│ │ │ │ -
428 // of surface for which we are evaluating tangents and the second edge the
│ │ │ │ -
429 // "trailing edge". By convention, the tangent along the crease is oriented
│ │ │ │ -
430 // in the direction of the leading edge.
│ │ │ │ -
431 //
│ │ │ │ -
432 int valence = vertex.GetNumEdges();
│ │ │ │ -
433
│ │ │ │ -
434 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ -
435 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
436 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ -
437 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
438
│ │ │ │ -
439 tan1Mask.VertexWeight(0) = 0.0f;
│ │ │ │ -
440 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
441 tan1Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
442 }
│ │ │ │ -
443
│ │ │ │ -
444 // See the note above regarding scale factor of 1.5:
│ │ │ │ -
445 tan1Mask.EdgeWeight(creaseEnds[0]) = 1.5f;
│ │ │ │ -
446 tan1Mask.EdgeWeight(creaseEnds[1]) = -1.5f;
│ │ │ │ -
447
│ │ │ │ -
448 //
│ │ │ │ -
449 // Second, the tangent across the interior faces:
│ │ │ │ -
450 // Note this is ambiguous for an interior vertex. We currently return
│ │ │ │ -
451 // the tangent for the surface in the counter-clockwise span between the
│ │ │ │ -
452 // leading and trailing edges that form the crease. Given the expected
│ │ │ │ -
453 // computation of a surface normal as Tan1 X Tan2, this tangent should be
│ │ │ │ -
454 // oriented "inward" from the crease/boundary -- across the surface rather
│ │ │ │ -
455 // than outward and away from it.
│ │ │ │ -
456 //
│ │ │ │ -
457 // There is inconsistency in the orientation of this tangent in commonly
│ │ │ │ -
458 // published results: the general formula provided for arbitrary valence
│ │ │ │ -
459 // has the tangent pointing across the crease and "outward" from the surface,
│ │ │ │ -
460 // while the special cases for regular valence and lower have the tangent
│ │ │ │ -
461 // pointing across the surface and "inward" from the crease. So if we are
│ │ │ │ -
462 // to consistently orient the first tangent along the crease, regardless of
│ │ │ │ -
463 // the interior topology, we have to correct this. With the first tangent
│ │ │ │ -
464 // following the direction of the leading crease edge, we want the second
│ │ │ │ -
465 // tangent pointing inward/across the surface -- so we flip the result of
│ │ │ │ -
466 // the general formula.
│ │ │ │ -
467 //
│ │ │ │ -
468 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ -
469 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
470 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ -
471 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
472
│ │ │ │ -
473 for (int i = 0; i < creaseEnds[0]; ++i) {
│ │ │ │ -
474 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
475 }
│ │ │ │ -
476 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1;
│ │ │ │ -
477 if (interiorEdgeCount == 2) {
│ │ │ │ -
478 // See note above regarding scale factor of (sin(60 degs) == sqrt(3)/2:
│ │ │ │ -
479
│ │ │ │ -
480 static Weight const Root3 = (Weight) 1.73205080756887729352;
│ │ │ │ -
481 static Weight const Root3by2 = (Weight) (Root3 * 0.5);
│ │ │ │ -
482
│ │ │ │ -
483 tan2Mask.VertexWeight(0) = -Root3;
│ │ │ │ -
484
│ │ │ │ -
485 tan2Mask.EdgeWeight(creaseEnds[0]) = -Root3by2;
│ │ │ │ -
486 tan2Mask.EdgeWeight(creaseEnds[1]) = -Root3by2;
│ │ │ │ -
487
│ │ │ │ -
488 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = Root3;
│ │ │ │ -
489 tan2Mask.EdgeWeight(creaseEnds[0] + 2) = Root3;
│ │ │ │ -
490 } else if (interiorEdgeCount > 2) {
│ │ │ │ -
491 // See notes above regarding scale factor of -3.0 (-1 for orientation,
│ │ │ │ -
492 // 2.0 for considering the region as a half-disk, and 1.5 in keeping
│ │ │ │ -
493 // with the crease tangent):
│ │ │ │ -
494
│ │ │ │ -
495 double theta = M_PI / (interiorEdgeCount + 1);
│ │ │ │ -
496
│ │ │ │ -
497 tan2Mask.VertexWeight(0) = 0.0f;
│ │ │ │ -
498
│ │ │ │ -
499 Weight cWeight = (Weight) (-3.0f * std::sin(theta));
│ │ │ │ -
500 tan2Mask.EdgeWeight(creaseEnds[0]) = cWeight;
│ │ │ │ -
501 tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight;
│ │ │ │ -
502
│ │ │ │ -
503 double eCoeff = -3.0f * 2.0f * (std::cos(theta) - 1.0f);
│ │ │ │ -
504 for (int i = 1; i <= interiorEdgeCount; ++i) {
│ │ │ │ -
505 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) (eCoeff * std::sin(i * theta));
│ │ │ │ -
506 }
│ │ │ │ -
507 } else if (interiorEdgeCount == 1) {
│ │ │ │ -
508 // See notes above regarding scale factor of 3.0:
│ │ │ │ -
509
│ │ │ │ -
510 tan2Mask.VertexWeight(0) = -3.0f;
│ │ │ │ -
511
│ │ │ │ -
512 tan2Mask.EdgeWeight(creaseEnds[0]) = 0.0f;
│ │ │ │ -
513 tan2Mask.EdgeWeight(creaseEnds[1]) = 0.0f;
│ │ │ │ -
514
│ │ │ │ -
515 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = 3.0f;
│ │ │ │ -
516 } else {
│ │ │ │ -
517 // See notes above regarding scale factor of 3.0:
│ │ │ │ -
518
│ │ │ │ -
519 tan2Mask.VertexWeight(0) = -6.0f;
│ │ │ │ -
520
│ │ │ │ -
521 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f;
│ │ │ │ -
522 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f;
│ │ │ │ -
523 }
│ │ │ │ -
524 for (int i = creaseEnds[1] + 1; i < valence; ++i) {
│ │ │ │ -
525 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ -
526 }
│ │ │ │ -
527}
│ │ │ │ -
│ │ │ │ -
528
│ │ │ │ -
529template <>
│ │ │ │ -
530template <typename VERTEX, typename MASK>
│ │ │ │ -
531inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
533 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ -
534
│ │ │ │ -
535 typedef typename MASK::Weight Weight;
│ │ │ │ -
536
│ │ │ │ -
537 int valence = vertex.GetNumFaces();
│ │ │ │ -
538
│ │ │ │ -
539 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ -
540 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
541 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ -
542 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
543
│ │ │ │ -
544 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ -
545 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ -
546 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ -
547 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
548
│ │ │ │ -
549 tan1Mask.VertexWeight(0) = 0.0f;
│ │ │ │ -
550 tan2Mask.VertexWeight(0) = 0.0f;
│ │ │ │ -
551
│ │ │ │ -
552 if (valence == 6) {
│ │ │ │ -
553 static Weight const Root3by2 = (Weight)(0.5 * 1.73205080756887729352);
│ │ │ │ -
554
│ │ │ │ -
555 tan1Mask.EdgeWeight(0) = 1.0f;
│ │ │ │ -
556 tan1Mask.EdgeWeight(1) = 0.5f;
│ │ │ │ -
557 tan1Mask.EdgeWeight(2) = -0.5f;
│ │ │ │ -
558 tan1Mask.EdgeWeight(3) = -1.0f;
│ │ │ │ -
559 tan1Mask.EdgeWeight(4) = -0.5f;
│ │ │ │ -
560 tan1Mask.EdgeWeight(5) = 0.5f;
│ │ │ │ -
561
│ │ │ │ -
562 tan2Mask.EdgeWeight(0) = 0.0f;
│ │ │ │ -
563 tan2Mask.EdgeWeight(1) = Root3by2;
│ │ │ │ -
564 tan2Mask.EdgeWeight(2) = Root3by2;
│ │ │ │ -
565 tan2Mask.EdgeWeight(3) = 0.0f;
│ │ │ │ -
566 tan2Mask.EdgeWeight(4) = -Root3by2;
│ │ │ │ -
567 tan2Mask.EdgeWeight(5) = -Root3by2;
│ │ │ │ -
568 } else {
│ │ │ │ -
569 double alpha = 2.0f * M_PI / valence;
│ │ │ │ -
570 for (int i = 0; i < valence; ++i) {
│ │ │ │ -
571 double alphaI = alpha * i;
│ │ │ │ -
572 tan1Mask.EdgeWeight(i) = (Weight) std::cos(alphaI);
│ │ │ │ -
573 tan2Mask.EdgeWeight(i) = (Weight) std::sin(alphaI);
│ │ │ │ -
574 }
│ │ │ │ -
575 }
│ │ │ │ -
576}
│ │ │ │ -
│ │ │ │ -
577
│ │ │ │ -
578} // end namespace Sdc
│ │ │ │ -
579} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
580using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
581} // end namespace OpenSubdiv
│ │ │ │ -
582
│ │ │ │ -
583#endif /* OPENSUBDIV3_SDC_LOOP_SCHEME_H */
│ │ │ │ - │ │ │ │ -
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │ - │ │ │ │ -
void assignSmoothMaskForEdge(EDGE const &edge, MASK &mask) const
│ │ │ │ - │ │ │ │ -
void assignCreaseMaskForVertex(VERTEX const &edge, MASK &mask, int const creaseEnds[2]) const
│ │ │ │ -
void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2, int const creaseEnds[2]) const
│ │ │ │ - │ │ │ │ -
void assignCreaseMaskForEdge(EDGE const &edge, MASK &mask) const
Definition scheme.h:317
│ │ │ │ -
void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
│ │ │ │ - │ │ │ │ -
void assignCornerMaskForVertex(VERTEX const &edge, MASK &mask) const
Definition scheme.h:331
│ │ │ │ -
void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const creaseEnds[2]) const
│ │ │ │ -
void assignSmoothMaskForVertex(VERTEX const &edge, MASK &mask) const
│ │ │ │ - │ │ │ │ -
void assignSmoothLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const
│ │ │ │ -
void assignCornerLimitMask(VERTEX const &vertex, MASK &pos) const
│ │ │ │ -
void assignCornerLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const
│ │ │ │ +
112private:
│ │ │ │ +
113 // Use a small integer type to pack these rather than bitfields:
│ │ │ │ +
114 typedef unsigned char EnumIntType;
│ │ │ │ +
115
│ │ │ │ +
116 EnumIntType _vtxBoundInterp;
│ │ │ │ +
117 EnumIntType _fvarLinInterp;
│ │ │ │ +
118 EnumIntType _creasingMethod;
│ │ │ │ +
119 EnumIntType _triangleSub;
│ │ │ │ +
120};
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
122} // end namespace sdc
│ │ │ │ +
123
│ │ │ │ +
124} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
125using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
126} // end namespace OpenSubdiv
│ │ │ │ +
127
│ │ │ │ +
128#endif /* OPENSUBDIV3_SDC_OPTIONS_H */
│ │ │ │ + │ │ │ │ +
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ + │ │ │ │ +
@ TRI_SUB_CATMARK
Catmark weights (Catmark scheme only)
Definition options.h:73
│ │ │ │ +
@ TRI_SUB_SMOOTH
"smooth triangle" weights (Catmark scheme only)
Definition options.h:74
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
TriangleSubdivision GetTriangleSubdivision() const
Get triangle subdivision weights rule (Catmark scheme only !)
Definition options.h:107
│ │ │ │ +
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
Definition options.h:101
│ │ │ │ + │ │ │ │ +
void SetFVarLinearInterpolation(FVarLinearInterpolation b)
Set face-varying interpolation rule.
Definition options.h:98
│ │ │ │ +
void SetTriangleSubdivision(TriangleSubdivision t)
Set triangle subdivision weights rule (Catmark scheme only !)
Definition options.h:110
│ │ │ │ +
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Get vertex boundary interpolation rule.
Definition options.h:89
│ │ │ │ + │ │ │ │ +
@ FVAR_LINEAR_CORNERS_ONLY
sharpen corners only
Definition options.h:62
│ │ │ │ +
@ FVAR_LINEAR_BOUNDARIES
sharpen all boundaries ("always sharp")
Definition options.h:65
│ │ │ │ +
@ FVAR_LINEAR_CORNERS_PLUS2
("edge and corner + propagate corner")
Definition options.h:64
│ │ │ │ + │ │ │ │ +
@ FVAR_LINEAR_ALL
bilinear interpolation ("bilinear")
Definition options.h:66
│ │ │ │ +
@ FVAR_LINEAR_NONE
smooth everywhere ("edge only")
Definition options.h:61
│ │ │ │ +
void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b)
Set vertex boundary interpolation rule.
Definition options.h:92
│ │ │ │ +
FVarLinearInterpolation GetFVarLinearInterpolation() const
Get face-varying interpolation rule.
Definition options.h:95
│ │ │ │ + │ │ │ │ + │ │ │ │ +
@ VTX_BOUNDARY_EDGE_ONLY
all boundary edges sharpened and interpolated
Definition options.h:56
│ │ │ │ + │ │ │ │ +
void SetCreasingMethod(CreasingMethod c)
Set edge crease rule.
Definition options.h:104
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -loopScheme.h │ │ │ │ │ +options.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,671 +23,200 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../sdc/scheme.h" │ │ │ │ │ -30 │ │ │ │ │ -31#include │ │ │ │ │ -32#include │ │ │ │ │ +29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +30namespace OPENSUBDIV_VERSION { │ │ │ │ │ +31 │ │ │ │ │ +32namespace Sdc { │ │ │ │ │ 33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36namespace Sdc { │ │ │ │ │ -37 │ │ │ │ │ -38 │ │ │ │ │ -39// │ │ │ │ │ -40// Specializations for Sdc::Scheme: │ │ │ │ │ -41// │ │ │ │ │ -42// │ │ │ │ │ -43 │ │ │ │ │ -44// │ │ │ │ │ -45// Loop traits: │ │ │ │ │ -46// │ │ │ │ │ -47template <> │ │ │ │ │ -_4_8inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_T_o_p_o_l_o_g_i_c_a_l_S_p_l_i_t_T_y_p_e() { return │ │ │ │ │ -_S_P_L_I_T___T_O___T_R_I_S; } │ │ │ │ │ -49 │ │ │ │ │ -50template <> │ │ │ │ │ -_5_1inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 3; } │ │ │ │ │ -52 │ │ │ │ │ -53template <> │ │ │ │ │ -_5_4inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 6; } │ │ │ │ │ -55 │ │ │ │ │ -56template <> │ │ │ │ │ -_5_7inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_L_o_c_a_l_N_e_i_g_h_b_o_r_h_o_o_d_S_i_z_e() { return 1; } │ │ │ │ │ -58 │ │ │ │ │ -59 │ │ │ │ │ -60// │ │ │ │ │ -61// Protected methods to assign the two types of masks for an edge-vertex -- │ │ │ │ │ -62// Crease and Smooth. │ │ │ │ │ -63// │ │ │ │ │ -64// The Crease case does not really need to be specialized, though it may be │ │ │ │ │ -65// preferable to define all explicitly here. │ │ │ │ │ -66// │ │ │ │ │ -67template <> │ │ │ │ │ -68template │ │ │ │ │ -69inline void │ │ │ │ │ -_7_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_E_d_g_e(EDGE const&, MASK& mask) const │ │ │ │ │ -71{ │ │ │ │ │ -72 mask.SetNumVertexWeights(2); │ │ │ │ │ -73 mask.SetNumEdgeWeights(0); │ │ │ │ │ -74 mask.SetNumFaceWeights(0); │ │ │ │ │ -75 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +50 │ │ │ │ │ +_5_1class _O_p_t_i_o_n_s { │ │ │ │ │ +52public: │ │ │ │ │ +_5_3 enum _V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n { │ │ │ │ │ +54 _V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E = 0, │ │ │ │ │ +_5_6 _V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___O_N_L_Y, │ │ │ │ │ +57 _V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___A_N_D___C_O_R_N_E_R │ │ │ │ │ +_5_9 }; │ │ │ │ │ +_6_0 enum _F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n { │ │ │ │ │ +_6_1 _F_V_A_R___L_I_N_E_A_R___N_O_N_E = 0, │ │ │ │ │ +_6_2 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___O_N_L_Y, │ │ │ │ │ +_6_3 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_1, │ │ │ │ │ +_6_4 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_2, │ │ │ │ │ +_6_5 _F_V_A_R___L_I_N_E_A_R___B_O_U_N_D_A_R_I_E_S, │ │ │ │ │ +66 _F_V_A_R___L_I_N_E_A_R___A_L_L │ │ │ │ │ +_6_7 }; │ │ │ │ │ +_6_8 enum _C_r_e_a_s_i_n_g_M_e_t_h_o_d { │ │ │ │ │ +_6_9 _C_R_E_A_S_E___U_N_I_F_O_R_M = 0, │ │ │ │ │ +70 _C_R_E_A_S_E___C_H_A_I_K_I_N │ │ │ │ │ +_7_1 }; │ │ │ │ │ +_7_2 enum _T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n { │ │ │ │ │ +_7_3 _T_R_I___S_U_B___C_A_T_M_A_R_K = 0, │ │ │ │ │ +74 _T_R_I___S_U_B___S_M_O_O_T_H │ │ │ │ │ +_7_5 }; │ │ │ │ │ 76 │ │ │ │ │ -77 mask.VertexWeight(0) = 0.5f; │ │ │ │ │ -78 mask.VertexWeight(1) = 0.5f; │ │ │ │ │ -79} │ │ │ │ │ -80 │ │ │ │ │ -81template <> │ │ │ │ │ -82template │ │ │ │ │ -83inline void │ │ │ │ │ -_8_4_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_E_d_g_e(EDGE const& edge, MASK& mask) │ │ │ │ │ -const │ │ │ │ │ -85{ │ │ │ │ │ -86 int faceCount = edge.GetNumFaces(); │ │ │ │ │ +77public: │ │ │ │ │ +78 │ │ │ │ │ +_7_9 _O_p_t_i_o_n_s() : _vtxBoundInterp(_V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E), │ │ │ │ │ +80 _fvarLinInterp(_F_V_A_R___L_I_N_E_A_R___A_L_L), │ │ │ │ │ +81 _creasingMethod(_C_R_E_A_S_E___U_N_I_F_O_R_M), │ │ │ │ │ +82 _triangleSub(_T_R_I___S_U_B___C_A_T_M_A_R_K) { } │ │ │ │ │ +83 │ │ │ │ │ +84 // │ │ │ │ │ +85 // Trivial get/set methods: │ │ │ │ │ +86 // │ │ │ │ │ 87 │ │ │ │ │ -88 mask.SetNumVertexWeights(2); │ │ │ │ │ -89 mask.SetNumEdgeWeights(0); │ │ │ │ │ -90 mask.SetNumFaceWeights(faceCount); │ │ │ │ │ -91 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -92 │ │ │ │ │ -93 // │ │ │ │ │ -94 // This is where we run into the issue of "face weights" -- we want to │ │ │ │ │ -weight the │ │ │ │ │ -95 // face-centers for Catmark, but face-centers are not generated for Loop. So │ │ │ │ │ -do │ │ │ │ │ -96 // we make assumptions on how the mask is used, assign some property to the │ │ │ │ │ -mask │ │ │ │ │ -97 // to indicate how they were assigned, or take input from the mask itself? │ │ │ │ │ -98 // │ │ │ │ │ -99 // Regardless, we have two choices: │ │ │ │ │ -100 // - face-weights are for the vertices opposite the edge (as in Hbr): │ │ │ │ │ -101 // vertex weights = 0.375f; │ │ │ │ │ -102 // face weights = 0.125f; │ │ │ │ │ -103 // │ │ │ │ │ -104 // - face-weights are for the face centers: │ │ │ │ │ -105 // vertex weights = 0.125f; │ │ │ │ │ -106 // face weights = 0.375f; │ │ │ │ │ -107 // │ │ │ │ │ -108 // Coincidentally the coefficients are the same but reversed. │ │ │ │ │ -109 // │ │ │ │ │ -110 typedef typename MASK::Weight Weight; │ │ │ │ │ +_8_9 _V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n _G_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n() const { return │ │ │ │ │ +(_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n) _vtxBoundInterp; } │ │ │ │ │ +90 │ │ │ │ │ +_9_2 void _S_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n(_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n b) │ │ │ │ │ +{ _vtxBoundInterp = (EnumIntType) b; } │ │ │ │ │ +93 │ │ │ │ │ +_9_5 _F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n _G_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n() const { return │ │ │ │ │ +(_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n) _fvarLinInterp; } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 void _S_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n(_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n b) { _fvarLinInterp │ │ │ │ │ += (EnumIntType) b; } │ │ │ │ │ +99 │ │ │ │ │ +_1_0_1 _C_r_e_a_s_i_n_g_M_e_t_h_o_d _G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d() const { return (_C_r_e_a_s_i_n_g_M_e_t_h_o_d) │ │ │ │ │ +_creasingMethod; } │ │ │ │ │ +102 │ │ │ │ │ +_1_0_4 void _S_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d(_C_r_e_a_s_i_n_g_M_e_t_h_o_d c) { _creasingMethod = (EnumIntType) │ │ │ │ │ +c; } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_7 _T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n _G_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n() const { return │ │ │ │ │ +(_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n) _triangleSub; } │ │ │ │ │ +108 │ │ │ │ │ +_1_1_0 void _S_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n(_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n t) { _triangleSub = │ │ │ │ │ +(EnumIntType) t; } │ │ │ │ │ 111 │ │ │ │ │ -112 Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f; │ │ │ │ │ -113 Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f; │ │ │ │ │ -114 │ │ │ │ │ -115 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -116 mask.VertexWeight(1) = vWeight; │ │ │ │ │ -117 │ │ │ │ │ -118 if (faceCount == 2) { │ │ │ │ │ -119 mask.FaceWeight(0) = fWeight; │ │ │ │ │ -120 mask.FaceWeight(1) = fWeight; │ │ │ │ │ -121 } else { │ │ │ │ │ -122 // The non-manifold case is not clearly defined -- we adjust the above │ │ │ │ │ -123 // face-weight to preserve the ratio of edge-center and face-centers: │ │ │ │ │ -124 fWeight *= 2.0f / (Weight) faceCount; │ │ │ │ │ -125 for (int i = 0; i < faceCount; ++i) { │ │ │ │ │ -126 mask.FaceWeight(i) = fWeight; │ │ │ │ │ -127 } │ │ │ │ │ -128 } │ │ │ │ │ -129} │ │ │ │ │ -130 │ │ │ │ │ -131 │ │ │ │ │ -132// │ │ │ │ │ -133// Protected methods to assign the three types of masks for a vertex-vertex │ │ │ │ │ --- │ │ │ │ │ -134// Corner, Crease and Smooth (Dart is the same as Smooth). │ │ │ │ │ -135// │ │ │ │ │ -136// Corner and Crease do not really need to be specialized, though it may be │ │ │ │ │ -137// preferable to define all explicitly here. │ │ │ │ │ -138// │ │ │ │ │ -139template <> │ │ │ │ │ -140template │ │ │ │ │ -141inline void │ │ │ │ │ -_1_4_2_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const&, MASK& mask) │ │ │ │ │ -const │ │ │ │ │ -143{ │ │ │ │ │ -144 mask.SetNumVertexWeights(1); │ │ │ │ │ -145 mask.SetNumEdgeWeights(0); │ │ │ │ │ -146 mask.SetNumFaceWeights(0); │ │ │ │ │ -147 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -148 │ │ │ │ │ -149 mask.VertexWeight(0) = 1.0f; │ │ │ │ │ -150} │ │ │ │ │ -151 │ │ │ │ │ -152template <> │ │ │ │ │ -153template │ │ │ │ │ -154inline void │ │ │ │ │ -_1_5_5_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const& vertex, MASK& │ │ │ │ │ -mask, │ │ │ │ │ -156 int const creaseEnds[2]) const { │ │ │ │ │ -157 typedef typename MASK::Weight Weight; │ │ │ │ │ -158 │ │ │ │ │ -159 int valence = vertex.GetNumEdges(); │ │ │ │ │ -160 │ │ │ │ │ -161 mask.SetNumVertexWeights(1); │ │ │ │ │ -162 mask.SetNumEdgeWeights(valence); │ │ │ │ │ -163 mask.SetNumFaceWeights(0); │ │ │ │ │ -164 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -165 │ │ │ │ │ -166 Weight vWeight = 0.75f; │ │ │ │ │ -167 Weight eWeight = 0.125f; │ │ │ │ │ -168 │ │ │ │ │ -169 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -170 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -171 mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -172 } │ │ │ │ │ -173 mask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ -174 mask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ -175} │ │ │ │ │ -176 │ │ │ │ │ -177template <> │ │ │ │ │ -178template │ │ │ │ │ -179inline void │ │ │ │ │ -_1_8_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const& vertex, MASK& │ │ │ │ │ -mask) const │ │ │ │ │ -181{ │ │ │ │ │ -182 typedef typename MASK::Weight Weight; │ │ │ │ │ -183 │ │ │ │ │ -184 int valence = vertex.GetNumFaces(); │ │ │ │ │ -185 │ │ │ │ │ -186 mask.SetNumVertexWeights(1); │ │ │ │ │ -187 mask.SetNumEdgeWeights(valence); │ │ │ │ │ -188 mask.SetNumFaceWeights(0); │ │ │ │ │ -189 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -190 │ │ │ │ │ -191 // Specialize for the regular case: 1/16 per edge-vert, 5/8 for the vert │ │ │ │ │ -itself: │ │ │ │ │ -192 Weight eWeight = (Weight) 0.0625f; │ │ │ │ │ -193 Weight vWeight = (Weight) 0.625f; │ │ │ │ │ -194 │ │ │ │ │ -195 if (valence != 6) { │ │ │ │ │ -196 // From HbrLoopSubdivision::Subdivide(mesh, vertex): │ │ │ │ │ -197 // - could use some lookup tables here for common irregular valence (5, 7, │ │ │ │ │ -8) │ │ │ │ │ -198 // or all of these cosine calls will be adding up... │ │ │ │ │ -199 │ │ │ │ │ -200 double dValence = (double) valence; │ │ │ │ │ -201 double invValence = 1.0f / dValence; │ │ │ │ │ -202 double cosTheta = std::cos(M_PI * 2.0f * invValence); │ │ │ │ │ -203 │ │ │ │ │ -204 double beta = 0.25f * cosTheta + 0.375f; │ │ │ │ │ -205 │ │ │ │ │ -206 eWeight = (Weight) ((0.625f - (beta * beta)) * invValence); │ │ │ │ │ -207 vWeight = (Weight) (1.0f - (eWeight * dValence)); │ │ │ │ │ -208 } │ │ │ │ │ -209 │ │ │ │ │ -210 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -211 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -212 mask.EdgeWeight(i) = eWeight; │ │ │ │ │ -213 } │ │ │ │ │ -214} │ │ │ │ │ -215 │ │ │ │ │ -216 │ │ │ │ │ -217// │ │ │ │ │ -218// Limit masks for position: │ │ │ │ │ -219// │ │ │ │ │ -220template <> │ │ │ │ │ -221template │ │ │ │ │ -222inline void │ │ │ │ │ -_2_2_3_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_M_a_s_k(VERTEX const& /* vertex */, MASK& │ │ │ │ │ -posMask) const { │ │ │ │ │ -224 │ │ │ │ │ -225 posMask.SetNumVertexWeights(1); │ │ │ │ │ -226 posMask.SetNumEdgeWeights(0); │ │ │ │ │ -227 posMask.SetNumFaceWeights(0); │ │ │ │ │ -228 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -229 │ │ │ │ │ -230 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ -231} │ │ │ │ │ -232 │ │ │ │ │ -233template <> │ │ │ │ │ -234template │ │ │ │ │ -235inline void │ │ │ │ │ -_2_3_6_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ -posMask, │ │ │ │ │ -237 int const creaseEnds[2]) const { │ │ │ │ │ -238 │ │ │ │ │ -239 typedef typename MASK::Weight Weight; │ │ │ │ │ -240 │ │ │ │ │ -241 int valence = vertex.GetNumEdges(); │ │ │ │ │ -242 │ │ │ │ │ -243 posMask.SetNumVertexWeights(1); │ │ │ │ │ -244 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ -245 posMask.SetNumFaceWeights(0); │ │ │ │ │ -246 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -247 │ │ │ │ │ -248 // │ │ │ │ │ -249 // The refinement mask for a crease vertex is (1/8, 3/4, 1/8) and for a │ │ │ │ │ -crease │ │ │ │ │ -250 // edge is (1/2, 1/2) -- producing a uniform B-spline curve along the │ │ │ │ │ -crease │ │ │ │ │ -251 // (boundary) whether the vertex or its crease is regular or not. The limit │ │ │ │ │ -252 // mask is therefore (1/6, 2/3, 1/6) for ALL cases. │ │ │ │ │ -253 // │ │ │ │ │ -254 // An alternative limit mask (1/5, 3/5, 1/5) is often published for use │ │ │ │ │ -either │ │ │ │ │ -255 // for irregular crease vertices or for all crease/boundary vertices, but │ │ │ │ │ -this │ │ │ │ │ -256 // is based on an alternate refinement mask for the edge -- (3/8, 5/8) │ │ │ │ │ -versus │ │ │ │ │ -257 // the usual (1/2, 1/2) -- and will not produce the B-spline curve desired. │ │ │ │ │ -258 // │ │ │ │ │ -259 Weight vWeight = (Weight) (4.0 / 6.0); │ │ │ │ │ -260 Weight eWeight = (Weight) (1.0 / 6.0); │ │ │ │ │ -261 │ │ │ │ │ -262 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -263 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -264 posMask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -265 } │ │ │ │ │ -266 posMask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ -267 posMask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ -268} │ │ │ │ │ -269 │ │ │ │ │ -270template <> │ │ │ │ │ -271template │ │ │ │ │ -272inline void │ │ │ │ │ -_2_7_3_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ -posMask) const { │ │ │ │ │ -274 │ │ │ │ │ -275 typedef typename MASK::Weight Weight; │ │ │ │ │ -276 │ │ │ │ │ -277 int valence = vertex.GetNumFaces(); │ │ │ │ │ -278 │ │ │ │ │ -279 posMask.SetNumVertexWeights(1); │ │ │ │ │ -280 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ -281 posMask.SetNumFaceWeights(0); │ │ │ │ │ -282 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -283 │ │ │ │ │ -284 // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert │ │ │ │ │ -itself: │ │ │ │ │ -285 if (valence == 6) { │ │ │ │ │ -286 Weight eWeight = (Weight) (1.0 / 12.0); │ │ │ │ │ -287 Weight vWeight = 0.5f; │ │ │ │ │ -288 │ │ │ │ │ -289 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -290 │ │ │ │ │ -291 posMask.EdgeWeight(0) = eWeight; │ │ │ │ │ -292 posMask.EdgeWeight(1) = eWeight; │ │ │ │ │ -293 posMask.EdgeWeight(2) = eWeight; │ │ │ │ │ -294 posMask.EdgeWeight(3) = eWeight; │ │ │ │ │ -295 posMask.EdgeWeight(4) = eWeight; │ │ │ │ │ -296 posMask.EdgeWeight(5) = eWeight; │ │ │ │ │ -297 │ │ │ │ │ -298 } else { │ │ │ │ │ -299 double dValence = (double) valence; │ │ │ │ │ -300 double invValence = 1.0f / dValence; │ │ │ │ │ -301 double cosTheta = std::cos(M_PI * 2.0f * invValence); │ │ │ │ │ -302 │ │ │ │ │ -303 double beta = 0.25f * cosTheta + 0.375f; │ │ │ │ │ -304 double gamma = (0.625f - (beta * beta)) * invValence; │ │ │ │ │ -305 │ │ │ │ │ -306 Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma))); │ │ │ │ │ -307 Weight vWeight = (Weight) (1.0f - (eWeight * dValence)); │ │ │ │ │ -308 │ │ │ │ │ -309 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -310 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -311 posMask.EdgeWeight(i) = eWeight; │ │ │ │ │ -312 } │ │ │ │ │ -313 } │ │ │ │ │ -314} │ │ │ │ │ -315 │ │ │ │ │ -316/* │ │ │ │ │ -317// Limit masks for tangents: │ │ │ │ │ -318// │ │ │ │ │ -319// A note on tangent magnitudes: │ │ │ │ │ -320// │ │ │ │ │ -321// Several formulae exist for limit tangents at a vertex to accommodate the │ │ │ │ │ -322// different topological configurations around the vertex. While these │ │ │ │ │ -produce │ │ │ │ │ -323// the desired direction, there is inconsistency in the resulting │ │ │ │ │ -magnitudes. │ │ │ │ │ -324// Ideally a regular mesh of uniformly shaped triangles with similar edge │ │ │ │ │ -lengths │ │ │ │ │ -325// should produce tangents of similar magnitudes throughout -- including │ │ │ │ │ -corners │ │ │ │ │ -326// and boundaries. So some of the common formulae for these are adjusted │ │ │ │ │ -with │ │ │ │ │ -327// scale factors. │ │ │ │ │ -328// │ │ │ │ │ -329// For uses where magnitude does not matter, this scaling should be │ │ │ │ │ -irrelevant. │ │ │ │ │ -330// But just as with patches, where the magnitudes of partial derivatives are │ │ │ │ │ -331// consistent between similar patches, the magnitudes of limit tangents │ │ │ │ │ -should │ │ │ │ │ -332// also be similar. │ │ │ │ │ -333// │ │ │ │ │ -334// The reference tangents, in terms of magnitudes, are those produced by the │ │ │ │ │ -335// limit tangent mask for smooth interior vertices, for which well │ │ │ │ │ -established │ │ │ │ │ -336// sin/cos formulae apply -- these remain unscaled. Formulae for the other │ │ │ │ │ -337// crease/boundary, corner tangents and irregular cases are scaled to be │ │ │ │ │ -more │ │ │ │ │ -338// consistent with these. │ │ │ │ │ -339// │ │ │ │ │ -340// The crease/boundary tangents for the regular case can be viewed as │ │ │ │ │ -derived │ │ │ │ │ -341// from the smooth interior masks with two "phantom" points extrapolated │ │ │ │ │ -across │ │ │ │ │ -342// the regular boundary: │ │ │ │ │ -343// │ │ │ │ │ -344// v3 v2 │ │ │ │ │ -345// X - - - - - X │ │ │ │ │ -346// / \ / \ │ │ │ │ │ -347// / \ / \ │ │ │ │ │ -348// v4 X - - - - - X - - - - - X v1 │ │ │ │ │ -349// . . 0 . . │ │ │ │ │ -350// . . . . │ │ │ │ │ -351// . . . . │ │ │ │ │ -352// (v5) (v6) │ │ │ │ │ -353// │ │ │ │ │ -354// where v5 = v0 + (v4 - v3) and v6 = v0 + v1 - v2. │ │ │ │ │ -355// │ │ │ │ │ -356// When the standard limit tangent mask is applied, the cosines of │ │ │ │ │ -increments │ │ │ │ │ -357// of pi/3 give us coefficients that are multiples of 1/2, leading to the │ │ │ │ │ -first │ │ │ │ │ -358// tangent T1 = 3/2 * (v1 - v4), rather than the widely used T1 = v1 - v4. │ │ │ │ │ -So │ │ │ │ │ -359// this scale factor of 3/2 is applied to ensure tangents along the │ │ │ │ │ -boundaries │ │ │ │ │ -360// are of similar magnitude as tangents in the immediate interior (which may │ │ │ │ │ -be │ │ │ │ │ -361// parallel). │ │ │ │ │ -362// │ │ │ │ │ -363// Tangents at corners are essentially a form of boundary tangent, and so │ │ │ │ │ -its │ │ │ │ │ -364// simple difference formula is scaled to be consistent with adjoining │ │ │ │ │ -boundary │ │ │ │ │ -365// tangents -- not just with the 3/2 factor from above, but with an │ │ │ │ │ -additional │ │ │ │ │ -366// 2.0 to compensate for the fact that the difference of only side of the │ │ │ │ │ -vertex │ │ │ │ │ -367// is considered here. The resulting scale factor of 3.0 for the regular │ │ │ │ │ -corner │ │ │ │ │ -368// is what similarly arises by extrapolating an interior region around the │ │ │ │ │ -369// vertex and using the interior mask for the first tangent. │ │ │ │ │ -370// │ │ │ │ │ -371// The cross-tangent formula for the regular crease/boundary is similarly │ │ │ │ │ -found │ │ │ │ │ -372// from the above construction of the boundary, but the commonly used │ │ │ │ │ -weights of │ │ │ │ │ -373// +/- 1 and 2 result from omitting the common factor of sqrt(3)/2 (arising │ │ │ │ │ -from │ │ │ │ │ -374// the sines of increments of pi/3). With that scale factor close to one, it │ │ │ │ │ -has │ │ │ │ │ -375// less impact than the irregular cases, which are analogous to corner │ │ │ │ │ -tangents │ │ │ │ │ -376// in that differences on only one side of the vertex are considered. While │ │ │ │ │ -a │ │ │ │ │ -377// scaling of 3.0 is similarly understandable for the valence 2 and 3 cases, │ │ │ │ │ -it is │ │ │ │ │ -378// less obvious in the irregular formula for valence > 4, but similarly │ │ │ │ │ -effective. │ │ │ │ │ -379// │ │ │ │ │ -380// The end result of these adjustments should be a set of limit tangents │ │ │ │ │ -that are │ │ │ │ │ -381// of similar magnitude over a regular mesh including boundaries and │ │ │ │ │ -corners. │ │ │ │ │ -382*/ │ │ │ │ │ -383template <> │ │ │ │ │ -384template │ │ │ │ │ -385inline void │ │ │ │ │ -_3_8_6_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ -387 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -388 │ │ │ │ │ -389 int valence = vertex.GetNumEdges(); │ │ │ │ │ -390 │ │ │ │ │ -391 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -392 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -393 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ -394 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -395 │ │ │ │ │ -396 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -397 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -398 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ -399 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -400 │ │ │ │ │ -401 // See note above regarding scale factor of 3.0: │ │ │ │ │ -402 tan1Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ -403 tan1Mask.EdgeWeight(0) = 3.0f; │ │ │ │ │ -404 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ -405 │ │ │ │ │ -406 tan2Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ -407 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ -408 tan2Mask.EdgeWeight(1) = 3.0f; │ │ │ │ │ -409 │ │ │ │ │ -410 // Should be at least 2 edges -- be sure to clear weights for any more: │ │ │ │ │ -411 for (int i = 2; i < valence; ++i) { │ │ │ │ │ -412 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -413 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -414 } │ │ │ │ │ -415} │ │ │ │ │ -416 │ │ │ │ │ -417template <> │ │ │ │ │ -418template │ │ │ │ │ -419inline void │ │ │ │ │ -_4_2_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ -421 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const { │ │ │ │ │ -422 │ │ │ │ │ -423 typedef typename MASK::Weight Weight; │ │ │ │ │ -424 │ │ │ │ │ -425 // │ │ │ │ │ -426 // First, the tangent along the crease: │ │ │ │ │ -427 // The first crease edge is considered the "leading" edge of the span │ │ │ │ │ -428 // of surface for which we are evaluating tangents and the second edge the │ │ │ │ │ -429 // "trailing edge". By convention, the tangent along the crease is oriented │ │ │ │ │ -430 // in the direction of the leading edge. │ │ │ │ │ -431 // │ │ │ │ │ -432 int valence = vertex.GetNumEdges(); │ │ │ │ │ -433 │ │ │ │ │ -434 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -435 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -436 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ -437 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -438 │ │ │ │ │ -439 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -440 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -441 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -442 } │ │ │ │ │ -443 │ │ │ │ │ -444 // See the note above regarding scale factor of 1.5: │ │ │ │ │ -445 tan1Mask.EdgeWeight(creaseEnds[0]) = 1.5f; │ │ │ │ │ -446 tan1Mask.EdgeWeight(creaseEnds[1]) = -1.5f; │ │ │ │ │ -447 │ │ │ │ │ -448 // │ │ │ │ │ -449 // Second, the tangent across the interior faces: │ │ │ │ │ -450 // Note this is ambiguous for an interior vertex. We currently return │ │ │ │ │ -451 // the tangent for the surface in the counter-clockwise span between the │ │ │ │ │ -452 // leading and trailing edges that form the crease. Given the expected │ │ │ │ │ -453 // computation of a surface normal as Tan1 X Tan2, this tangent should be │ │ │ │ │ -454 // oriented "inward" from the crease/boundary -- across the surface rather │ │ │ │ │ -455 // than outward and away from it. │ │ │ │ │ -456 // │ │ │ │ │ -457 // There is inconsistency in the orientation of this tangent in commonly │ │ │ │ │ -458 // published results: the general formula provided for arbitrary valence │ │ │ │ │ -459 // has the tangent pointing across the crease and "outward" from the │ │ │ │ │ -surface, │ │ │ │ │ -460 // while the special cases for regular valence and lower have the tangent │ │ │ │ │ -461 // pointing across the surface and "inward" from the crease. So if we are │ │ │ │ │ -462 // to consistently orient the first tangent along the crease, regardless of │ │ │ │ │ -463 // the interior topology, we have to correct this. With the first tangent │ │ │ │ │ -464 // following the direction of the leading crease edge, we want the second │ │ │ │ │ -465 // tangent pointing inward/across the surface -- so we flip the result of │ │ │ │ │ -466 // the general formula. │ │ │ │ │ -467 // │ │ │ │ │ -468 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -469 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -470 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ -471 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -472 │ │ │ │ │ -473 for (int i = 0; i < creaseEnds[0]; ++i) { │ │ │ │ │ -474 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -475 } │ │ │ │ │ -476 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1; │ │ │ │ │ -477 if (interiorEdgeCount == 2) { │ │ │ │ │ -478 // See note above regarding scale factor of (sin(60 degs) == sqrt(3)/2: │ │ │ │ │ -479 │ │ │ │ │ -480 static Weight const Root3 = (Weight) 1.73205080756887729352; │ │ │ │ │ -481 static Weight const Root3by2 = (Weight) (Root3 * 0.5); │ │ │ │ │ -482 │ │ │ │ │ -483 tan2Mask.VertexWeight(0) = -Root3; │ │ │ │ │ -484 │ │ │ │ │ -485 tan2Mask.EdgeWeight(creaseEnds[0]) = -Root3by2; │ │ │ │ │ -486 tan2Mask.EdgeWeight(creaseEnds[1]) = -Root3by2; │ │ │ │ │ -487 │ │ │ │ │ -488 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = Root3; │ │ │ │ │ -489 tan2Mask.EdgeWeight(creaseEnds[0] + 2) = Root3; │ │ │ │ │ -490 } else if (interiorEdgeCount > 2) { │ │ │ │ │ -491 // See notes above regarding scale factor of -3.0 (-1 for orientation, │ │ │ │ │ -492 // 2.0 for considering the region as a half-disk, and 1.5 in keeping │ │ │ │ │ -493 // with the crease tangent): │ │ │ │ │ -494 │ │ │ │ │ -495 double theta = M_PI / (interiorEdgeCount + 1); │ │ │ │ │ -496 │ │ │ │ │ -497 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -498 │ │ │ │ │ -499 Weight cWeight = (Weight) (-3.0f * std::sin(theta)); │ │ │ │ │ -500 tan2Mask.EdgeWeight(creaseEnds[0]) = cWeight; │ │ │ │ │ -501 tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight; │ │ │ │ │ -502 │ │ │ │ │ -503 double eCoeff = -3.0f * 2.0f * (std::cos(theta) - 1.0f); │ │ │ │ │ -504 for (int i = 1; i <= interiorEdgeCount; ++i) { │ │ │ │ │ -505 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) (eCoeff * std::sin(i * │ │ │ │ │ -theta)); │ │ │ │ │ -506 } │ │ │ │ │ -507 } else if (interiorEdgeCount == 1) { │ │ │ │ │ -508 // See notes above regarding scale factor of 3.0: │ │ │ │ │ -509 │ │ │ │ │ -510 tan2Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ -511 │ │ │ │ │ -512 tan2Mask.EdgeWeight(creaseEnds[0]) = 0.0f; │ │ │ │ │ -513 tan2Mask.EdgeWeight(creaseEnds[1]) = 0.0f; │ │ │ │ │ -514 │ │ │ │ │ -515 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = 3.0f; │ │ │ │ │ -516 } else { │ │ │ │ │ -517 // See notes above regarding scale factor of 3.0: │ │ │ │ │ -518 │ │ │ │ │ -519 tan2Mask.VertexWeight(0) = -6.0f; │ │ │ │ │ -520 │ │ │ │ │ -521 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f; │ │ │ │ │ -522 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f; │ │ │ │ │ -523 } │ │ │ │ │ -524 for (int i = creaseEnds[1] + 1; i < valence; ++i) { │ │ │ │ │ -525 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -526 } │ │ │ │ │ -527} │ │ │ │ │ -528 │ │ │ │ │ -529template <> │ │ │ │ │ -530template │ │ │ │ │ -531inline void │ │ │ │ │ -_5_3_2_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ -533 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -534 │ │ │ │ │ -535 typedef typename MASK::Weight Weight; │ │ │ │ │ -536 │ │ │ │ │ -537 int valence = vertex.GetNumFaces(); │ │ │ │ │ -538 │ │ │ │ │ -539 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -540 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -541 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ -542 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -543 │ │ │ │ │ -544 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -545 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -546 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ -547 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -548 │ │ │ │ │ -549 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -550 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -551 │ │ │ │ │ -552 if (valence == 6) { │ │ │ │ │ -553 static Weight const Root3by2 = (Weight)(0.5 * 1.73205080756887729352); │ │ │ │ │ -554 │ │ │ │ │ -555 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ -556 tan1Mask.EdgeWeight(1) = 0.5f; │ │ │ │ │ -557 tan1Mask.EdgeWeight(2) = -0.5f; │ │ │ │ │ -558 tan1Mask.EdgeWeight(3) = -1.0f; │ │ │ │ │ -559 tan1Mask.EdgeWeight(4) = -0.5f; │ │ │ │ │ -560 tan1Mask.EdgeWeight(5) = 0.5f; │ │ │ │ │ -561 │ │ │ │ │ -562 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ -563 tan2Mask.EdgeWeight(1) = Root3by2; │ │ │ │ │ -564 tan2Mask.EdgeWeight(2) = Root3by2; │ │ │ │ │ -565 tan2Mask.EdgeWeight(3) = 0.0f; │ │ │ │ │ -566 tan2Mask.EdgeWeight(4) = -Root3by2; │ │ │ │ │ -567 tan2Mask.EdgeWeight(5) = -Root3by2; │ │ │ │ │ -568 } else { │ │ │ │ │ -569 double alpha = 2.0f * M_PI / valence; │ │ │ │ │ -570 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -571 double alphaI = alpha * i; │ │ │ │ │ -572 tan1Mask.EdgeWeight(i) = (Weight) std::cos(alphaI); │ │ │ │ │ -573 tan2Mask.EdgeWeight(i) = (Weight) std::sin(alphaI); │ │ │ │ │ -574 } │ │ │ │ │ -575 } │ │ │ │ │ -576} │ │ │ │ │ -577 │ │ │ │ │ -578} // end namespace Sdc │ │ │ │ │ -579} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -580using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -581} // end namespace OpenSubdiv │ │ │ │ │ -582 │ │ │ │ │ -583#endif /* OPENSUBDIV3_SDC_LOOP_SCHEME_H */ │ │ │ │ │ +112private: │ │ │ │ │ +113 // Use a small integer type to pack these rather than bitfields: │ │ │ │ │ +114 typedef unsigned char EnumIntType; │ │ │ │ │ +115 │ │ │ │ │ +116 EnumIntType _vtxBoundInterp; │ │ │ │ │ +117 EnumIntType _fvarLinInterp; │ │ │ │ │ +118 EnumIntType _creasingMethod; │ │ │ │ │ +119 EnumIntType _triangleSub; │ │ │ │ │ +120}; │ │ │ │ │ +121 │ │ │ │ │ +122} // end namespace sdc │ │ │ │ │ +123 │ │ │ │ │ +124} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +125using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +126} // end namespace OpenSubdiv │ │ │ │ │ +127 │ │ │ │ │ +128#endif /* OPENSUBDIV3_SDC_OPTIONS_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_p_l_i_t │ │ │ │ │ -Split │ │ │ │ │ -Enumerated type for all face splitting schemes. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_P_L_I_T___T_O___T_R_I_S │ │ │ │ │ -@ SPLIT_TO_TRIS │ │ │ │ │ -Used by Loop. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_E_d_g_e │ │ │ │ │ -void assignSmoothMaskForEdge(EDGE const &edge, MASK &mask) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_T_o_p_o_l_o_g_i_c_a_l_S_p_l_i_t_T_y_p_e │ │ │ │ │ -static Split GetTopologicalSplitType() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ -void assignCreaseMaskForVertex(VERTEX const &edge, MASK &mask, int const │ │ │ │ │ -creaseEnds[2]) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ -void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ -&tan2, int const creaseEnds[2]) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e │ │ │ │ │ -static int GetRegularFaceSize() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_E_d_g_e │ │ │ │ │ -void assignCreaseMaskForEdge(EDGE const &edge, MASK &mask) const │ │ │ │ │ -DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_3_1_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_M_a_s_k │ │ │ │ │ -void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_L_o_c_a_l_N_e_i_g_h_b_o_r_h_o_o_d_S_i_z_e │ │ │ │ │ -static int GetLocalNeighborhoodSize() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ -void assignCornerMaskForVertex(VERTEX const &edge, MASK &mask) const │ │ │ │ │ -DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_3_3_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_M_a_s_k │ │ │ │ │ -void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const │ │ │ │ │ -creaseEnds[2]) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ -void assignSmoothMaskForVertex(VERTEX const &edge, MASK &mask) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e │ │ │ │ │ -static int GetRegularVertexValence() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ -void assignSmoothLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ -&tan2) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_M_a_s_k │ │ │ │ │ -void assignCornerLimitMask(VERTEX const &vertex, MASK &pos) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ -void assignCornerLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ -&tan2) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ +All supported options applying to subdivision scheme. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ +TriangleSubdivision │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_R_I___S_U_B___C_A_T_M_A_R_K │ │ │ │ │ +@ TRI_SUB_CATMARK │ │ │ │ │ +Catmark weights (Catmark scheme only) │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_R_I___S_U_B___S_M_O_O_T_H │ │ │ │ │ +@ TRI_SUB_SMOOTH │ │ │ │ │ +"smooth triangle" weights (Catmark scheme only) │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ +CreasingMethod │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_R_E_A_S_E___U_N_I_F_O_R_M │ │ │ │ │ +@ CREASE_UNIFORM │ │ │ │ │ +Catmark rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_R_E_A_S_E___C_H_A_I_K_I_N │ │ │ │ │ +@ CREASE_CHAIKIN │ │ │ │ │ +Chaikin rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ +TriangleSubdivision GetTriangleSubdivision() const │ │ │ │ │ +Get triangle subdivision weights rule (Catmark scheme only !) │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ +CreasingMethod GetCreasingMethod() const │ │ │ │ │ +Get edge crease rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options() │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +void SetFVarLinearInterpolation(FVarLinearInterpolation b) │ │ │ │ │ +Set face-varying interpolation rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ +void SetTriangleSubdivision(TriangleSubdivision t) │ │ │ │ │ +Set triangle subdivision weights rule (Catmark scheme only !) │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_1_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const │ │ │ │ │ +Get vertex boundary interpolation rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_8_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +FVarLinearInterpolation │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___O_N_L_Y │ │ │ │ │ +@ FVAR_LINEAR_CORNERS_ONLY │ │ │ │ │ +sharpen corners only │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___B_O_U_N_D_A_R_I_E_S │ │ │ │ │ +@ FVAR_LINEAR_BOUNDARIES │ │ │ │ │ +sharpen all boundaries ("always sharp") │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_2 │ │ │ │ │ +@ FVAR_LINEAR_CORNERS_PLUS2 │ │ │ │ │ +("edge and corner + propagate corner") │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_1 │ │ │ │ │ +@ FVAR_LINEAR_CORNERS_PLUS1 │ │ │ │ │ +("edge corner") │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___A_L_L │ │ │ │ │ +@ FVAR_LINEAR_ALL │ │ │ │ │ +bilinear interpolation ("bilinear") │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___N_O_N_E │ │ │ │ │ +@ FVAR_LINEAR_NONE │ │ │ │ │ +smooth everywhere ("edge only") │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b) │ │ │ │ │ +Set vertex boundary interpolation rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +FVarLinearInterpolation GetFVarLinearInterpolation() const │ │ │ │ │ +Get face-varying interpolation rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +VtxBoundaryInterpolation │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E │ │ │ │ │ +@ VTX_BOUNDARY_NONE │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___O_N_L_Y │ │ │ │ │ +@ VTX_BOUNDARY_EDGE_ONLY │ │ │ │ │ +all boundary edges sharpened and interpolated │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___A_N_D___C_O_R_N_E_R │ │ │ │ │ +@ VTX_BOUNDARY_EDGE_AND_CORNER │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ +void SetCreasingMethod(CreasingMethod c) │ │ │ │ │ +Set edge crease rule. │ │ │ │ │ +DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_4 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _s_d_c │ │ │ │ │ - * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_p_t_i_o_n_s_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/options.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/loopScheme.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,42 +88,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
options.h File Reference
│ │ │ │ +
loopScheme.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../sdc/scheme.h"
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cmath>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Options
 All supported options applying to subdivision scheme. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,22 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -options.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +loopScheme.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "_._._/_s_d_c_/_s_c_h_e_m_e_._h" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _O_p_t_i_o_n_s │ │ │ │ │ -  All supported options applying to subdivision scheme. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _s_d_c │ │ │ │ │ - * _o_p_t_i_o_n_s_._h │ │ │ │ │ + * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/options.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/loopScheme.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
options.h
│ │ │ │ +
loopScheme.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2014 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -118,137 +118,618 @@ │ │ │ │
17//
│ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │ -
24#ifndef OPENSUBDIV3_SDC_OPTIONS_H
│ │ │ │ -
25#define OPENSUBDIV3_SDC_OPTIONS_H
│ │ │ │ +
24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H
│ │ │ │ +
25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H
│ │ │ │
26
│ │ │ │
27#include "../version.h"
│ │ │ │
28
│ │ │ │ -
29namespace OpenSubdiv {
│ │ │ │ -
30namespace OPENSUBDIV_VERSION {
│ │ │ │ -
31
│ │ │ │ -
32namespace Sdc {
│ │ │ │ +
29#include "../sdc/scheme.h"
│ │ │ │ +
30
│ │ │ │ +
31#include <cassert>
│ │ │ │ +
32#include <cmath>
│ │ │ │
33
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51class Options {
│ │ │ │ -
52public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
67 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
71 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
75 };
│ │ │ │ -
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36namespace Sdc {
│ │ │ │ +
37
│ │ │ │ +
38
│ │ │ │ +
39//
│ │ │ │ +
40// Specializations for Sdc::Scheme<SCHEME_LOOP>:
│ │ │ │ +
41//
│ │ │ │ +
42//
│ │ │ │ +
43
│ │ │ │ +
44//
│ │ │ │ +
45// Loop traits:
│ │ │ │ +
46//
│ │ │ │ +
47template <>
│ │ │ │ + │ │ │ │ +
49
│ │ │ │ +
50template <>
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
53template <>
│ │ │ │ + │ │ │ │ +
55
│ │ │ │ +
56template <>
│ │ │ │ + │ │ │ │ +
58
│ │ │ │ +
59
│ │ │ │ +
60//
│ │ │ │ +
61// Protected methods to assign the two types of masks for an edge-vertex --
│ │ │ │ +
62// Crease and Smooth.
│ │ │ │ +
63//
│ │ │ │ +
64// The Crease case does not really need to be specialized, though it may be
│ │ │ │ +
65// preferable to define all explicitly here.
│ │ │ │ +
66//
│ │ │ │ +
67template <>
│ │ │ │ +
68template <typename EDGE, typename MASK>
│ │ │ │ +
69inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71{
│ │ │ │ +
72 mask.SetNumVertexWeights(2);
│ │ │ │ +
73 mask.SetNumEdgeWeights(0);
│ │ │ │ +
74 mask.SetNumFaceWeights(0);
│ │ │ │ +
75 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │
76
│ │ │ │ -
77public:
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
79 Options() : _vtxBoundInterp(VTX_BOUNDARY_NONE),
│ │ │ │ -
80 _fvarLinInterp(FVAR_LINEAR_ALL),
│ │ │ │ -
81 _creasingMethod(CREASE_UNIFORM),
│ │ │ │ -
82 _triangleSub(TRI_SUB_CATMARK) { }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
84 //
│ │ │ │ -
85 // Trivial get/set methods:
│ │ │ │ -
86 //
│ │ │ │ +
77 mask.VertexWeight(0) = 0.5f;
│ │ │ │ +
78 mask.VertexWeight(1) = 0.5f;
│ │ │ │ +
79}
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81template <>
│ │ │ │ +
82template <typename EDGE, typename MASK>
│ │ │ │ +
83inline void
│ │ │ │ +
│ │ │ │ +
84Scheme<SCHEME_LOOP>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const
│ │ │ │ +
85{
│ │ │ │ +
86 int faceCount = edge.GetNumFaces();
│ │ │ │
87
│ │ │ │ - │ │ │ │ -
90
│ │ │ │ -
92 void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b) { _vtxBoundInterp = (EnumIntType) b; }
│ │ │ │ -
93
│ │ │ │ - │ │ │ │ -
96
│ │ │ │ -
98 void SetFVarLinearInterpolation(FVarLinearInterpolation b) { _fvarLinInterp = (EnumIntType) b; }
│ │ │ │ -
99
│ │ │ │ -
101 CreasingMethod GetCreasingMethod() const { return (CreasingMethod) _creasingMethod; }
│ │ │ │ -
102
│ │ │ │ -
104 void SetCreasingMethod(CreasingMethod c) { _creasingMethod = (EnumIntType) c; }
│ │ │ │ -
105
│ │ │ │ - │ │ │ │ -
108
│ │ │ │ -
110 void SetTriangleSubdivision(TriangleSubdivision t) { _triangleSub = (EnumIntType) t; }
│ │ │ │ +
88 mask.SetNumVertexWeights(2);
│ │ │ │ +
89 mask.SetNumEdgeWeights(0);
│ │ │ │ +
90 mask.SetNumFaceWeights(faceCount);
│ │ │ │ +
91 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
92
│ │ │ │ +
93 //
│ │ │ │ +
94 // This is where we run into the issue of "face weights" -- we want to weight the
│ │ │ │ +
95 // face-centers for Catmark, but face-centers are not generated for Loop. So do
│ │ │ │ +
96 // we make assumptions on how the mask is used, assign some property to the mask
│ │ │ │ +
97 // to indicate how they were assigned, or take input from the mask itself?
│ │ │ │ +
98 //
│ │ │ │ +
99 // Regardless, we have two choices:
│ │ │ │ +
100 // - face-weights are for the vertices opposite the edge (as in Hbr):
│ │ │ │ +
101 // vertex weights = 0.375f;
│ │ │ │ +
102 // face weights = 0.125f;
│ │ │ │ +
103 //
│ │ │ │ +
104 // - face-weights are for the face centers:
│ │ │ │ +
105 // vertex weights = 0.125f;
│ │ │ │ +
106 // face weights = 0.375f;
│ │ │ │ +
107 //
│ │ │ │ +
108 // Coincidentally the coefficients are the same but reversed.
│ │ │ │ +
109 //
│ │ │ │ +
110 typedef typename MASK::Weight Weight;
│ │ │ │
111
│ │ │ │ -
112private:
│ │ │ │ -
113 // Use a small integer type to pack these rather than bitfields:
│ │ │ │ -
114 typedef unsigned char EnumIntType;
│ │ │ │ -
115
│ │ │ │ -
116 EnumIntType _vtxBoundInterp;
│ │ │ │ -
117 EnumIntType _fvarLinInterp;
│ │ │ │ -
118 EnumIntType _creasingMethod;
│ │ │ │ -
119 EnumIntType _triangleSub;
│ │ │ │ -
120};
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
122} // end namespace sdc
│ │ │ │ -
123
│ │ │ │ -
124} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
125using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
126} // end namespace OpenSubdiv
│ │ │ │ -
127
│ │ │ │ -
128#endif /* OPENSUBDIV3_SDC_OPTIONS_H */
│ │ │ │ - │ │ │ │ -
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ - │ │ │ │ -
@ TRI_SUB_CATMARK
Catmark weights (Catmark scheme only)
Definition options.h:73
│ │ │ │ -
@ TRI_SUB_SMOOTH
"smooth triangle" weights (Catmark scheme only)
Definition options.h:74
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
TriangleSubdivision GetTriangleSubdivision() const
Get triangle subdivision weights rule (Catmark scheme only !)
Definition options.h:107
│ │ │ │ -
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
Definition options.h:101
│ │ │ │ - │ │ │ │ -
void SetFVarLinearInterpolation(FVarLinearInterpolation b)
Set face-varying interpolation rule.
Definition options.h:98
│ │ │ │ -
void SetTriangleSubdivision(TriangleSubdivision t)
Set triangle subdivision weights rule (Catmark scheme only !)
Definition options.h:110
│ │ │ │ -
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Get vertex boundary interpolation rule.
Definition options.h:89
│ │ │ │ - │ │ │ │ -
@ FVAR_LINEAR_CORNERS_ONLY
sharpen corners only
Definition options.h:62
│ │ │ │ -
@ FVAR_LINEAR_BOUNDARIES
sharpen all boundaries ("always sharp")
Definition options.h:65
│ │ │ │ -
@ FVAR_LINEAR_CORNERS_PLUS2
("edge and corner + propagate corner")
Definition options.h:64
│ │ │ │ - │ │ │ │ -
@ FVAR_LINEAR_ALL
bilinear interpolation ("bilinear")
Definition options.h:66
│ │ │ │ -
@ FVAR_LINEAR_NONE
smooth everywhere ("edge only")
Definition options.h:61
│ │ │ │ -
void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b)
Set vertex boundary interpolation rule.
Definition options.h:92
│ │ │ │ -
FVarLinearInterpolation GetFVarLinearInterpolation() const
Get face-varying interpolation rule.
Definition options.h:95
│ │ │ │ - │ │ │ │ - │ │ │ │ -
@ VTX_BOUNDARY_EDGE_ONLY
all boundary edges sharpened and interpolated
Definition options.h:56
│ │ │ │ - │ │ │ │ -
void SetCreasingMethod(CreasingMethod c)
Set edge crease rule.
Definition options.h:104
│ │ │ │ +
112 Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f;
│ │ │ │ +
113 Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f;
│ │ │ │ +
114
│ │ │ │ +
115 mask.VertexWeight(0) = vWeight;
│ │ │ │ +
116 mask.VertexWeight(1) = vWeight;
│ │ │ │ +
117
│ │ │ │ +
118 if (faceCount == 2) {
│ │ │ │ +
119 mask.FaceWeight(0) = fWeight;
│ │ │ │ +
120 mask.FaceWeight(1) = fWeight;
│ │ │ │ +
121 } else {
│ │ │ │ +
122 // The non-manifold case is not clearly defined -- we adjust the above
│ │ │ │ +
123 // face-weight to preserve the ratio of edge-center and face-centers:
│ │ │ │ +
124 fWeight *= 2.0f / (Weight) faceCount;
│ │ │ │ +
125 for (int i = 0; i < faceCount; ++i) {
│ │ │ │ +
126 mask.FaceWeight(i) = fWeight;
│ │ │ │ +
127 }
│ │ │ │ +
128 }
│ │ │ │ +
129}
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
131
│ │ │ │ +
132//
│ │ │ │ +
133// Protected methods to assign the three types of masks for a vertex-vertex --
│ │ │ │ +
134// Corner, Crease and Smooth (Dart is the same as Smooth).
│ │ │ │ +
135//
│ │ │ │ +
136// Corner and Crease do not really need to be specialized, though it may be
│ │ │ │ +
137// preferable to define all explicitly here.
│ │ │ │ +
138//
│ │ │ │ +
139template <>
│ │ │ │ +
140template <typename VERTEX, typename MASK>
│ │ │ │ +
141inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
143{
│ │ │ │ +
144 mask.SetNumVertexWeights(1);
│ │ │ │ +
145 mask.SetNumEdgeWeights(0);
│ │ │ │ +
146 mask.SetNumFaceWeights(0);
│ │ │ │ +
147 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
148
│ │ │ │ +
149 mask.VertexWeight(0) = 1.0f;
│ │ │ │ +
150}
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
152template <>
│ │ │ │ +
153template <typename VERTEX, typename MASK>
│ │ │ │ +
154inline void
│ │ │ │ +
│ │ │ │ +
155Scheme<SCHEME_LOOP>::assignCreaseMaskForVertex(VERTEX const& vertex, MASK& mask,
│ │ │ │ +
156 int const creaseEnds[2]) const {
│ │ │ │ +
157 typedef typename MASK::Weight Weight;
│ │ │ │ +
158
│ │ │ │ +
159 int valence = vertex.GetNumEdges();
│ │ │ │ +
160
│ │ │ │ +
161 mask.SetNumVertexWeights(1);
│ │ │ │ +
162 mask.SetNumEdgeWeights(valence);
│ │ │ │ +
163 mask.SetNumFaceWeights(0);
│ │ │ │ +
164 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
165
│ │ │ │ +
166 Weight vWeight = 0.75f;
│ │ │ │ +
167 Weight eWeight = 0.125f;
│ │ │ │ +
168
│ │ │ │ +
169 mask.VertexWeight(0) = vWeight;
│ │ │ │ +
170 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
171 mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
172 }
│ │ │ │ +
173 mask.EdgeWeight(creaseEnds[0]) = eWeight;
│ │ │ │ +
174 mask.EdgeWeight(creaseEnds[1]) = eWeight;
│ │ │ │ +
175}
│ │ │ │ +
│ │ │ │ +
176
│ │ │ │ +
177template <>
│ │ │ │ +
178template <typename VERTEX, typename MASK>
│ │ │ │ +
179inline void
│ │ │ │ +
│ │ │ │ +
180Scheme<SCHEME_LOOP>::assignSmoothMaskForVertex(VERTEX const& vertex, MASK& mask) const
│ │ │ │ +
181{
│ │ │ │ +
182 typedef typename MASK::Weight Weight;
│ │ │ │ +
183
│ │ │ │ +
184 int valence = vertex.GetNumFaces();
│ │ │ │ +
185
│ │ │ │ +
186 mask.SetNumVertexWeights(1);
│ │ │ │ +
187 mask.SetNumEdgeWeights(valence);
│ │ │ │ +
188 mask.SetNumFaceWeights(0);
│ │ │ │ +
189 mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
190
│ │ │ │ +
191 // Specialize for the regular case: 1/16 per edge-vert, 5/8 for the vert itself:
│ │ │ │ +
192 Weight eWeight = (Weight) 0.0625f;
│ │ │ │ +
193 Weight vWeight = (Weight) 0.625f;
│ │ │ │ +
194
│ │ │ │ +
195 if (valence != 6) {
│ │ │ │ +
196 // From HbrLoopSubdivision<T>::Subdivide(mesh, vertex):
│ │ │ │ +
197 // - could use some lookup tables here for common irregular valence (5, 7, 8)
│ │ │ │ +
198 // or all of these cosine calls will be adding up...
│ │ │ │ +
199
│ │ │ │ +
200 double dValence = (double) valence;
│ │ │ │ +
201 double invValence = 1.0f / dValence;
│ │ │ │ +
202 double cosTheta = std::cos(M_PI * 2.0f * invValence);
│ │ │ │ +
203
│ │ │ │ +
204 double beta = 0.25f * cosTheta + 0.375f;
│ │ │ │ +
205
│ │ │ │ +
206 eWeight = (Weight) ((0.625f - (beta * beta)) * invValence);
│ │ │ │ +
207 vWeight = (Weight) (1.0f - (eWeight * dValence));
│ │ │ │ +
208 }
│ │ │ │ +
209
│ │ │ │ +
210 mask.VertexWeight(0) = vWeight;
│ │ │ │ +
211 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
212 mask.EdgeWeight(i) = eWeight;
│ │ │ │ +
213 }
│ │ │ │ +
214}
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
216
│ │ │ │ +
217//
│ │ │ │ +
218// Limit masks for position:
│ │ │ │ +
219//
│ │ │ │ +
220template <>
│ │ │ │ +
221template <typename VERTEX, typename MASK>
│ │ │ │ +
222inline void
│ │ │ │ +
│ │ │ │ +
223Scheme<SCHEME_LOOP>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
│ │ │ │ +
224
│ │ │ │ +
225 posMask.SetNumVertexWeights(1);
│ │ │ │ +
226 posMask.SetNumEdgeWeights(0);
│ │ │ │ +
227 posMask.SetNumFaceWeights(0);
│ │ │ │ +
228 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
229
│ │ │ │ +
230 posMask.VertexWeight(0) = 1.0f;
│ │ │ │ +
231}
│ │ │ │ +
│ │ │ │ +
232
│ │ │ │ +
233template <>
│ │ │ │ +
234template <typename VERTEX, typename MASK>
│ │ │ │ +
235inline void
│ │ │ │ +
│ │ │ │ +
236Scheme<SCHEME_LOOP>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
│ │ │ │ +
237 int const creaseEnds[2]) const {
│ │ │ │ +
238
│ │ │ │ +
239 typedef typename MASK::Weight Weight;
│ │ │ │ +
240
│ │ │ │ +
241 int valence = vertex.GetNumEdges();
│ │ │ │ +
242
│ │ │ │ +
243 posMask.SetNumVertexWeights(1);
│ │ │ │ +
244 posMask.SetNumEdgeWeights(valence);
│ │ │ │ +
245 posMask.SetNumFaceWeights(0);
│ │ │ │ +
246 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
247
│ │ │ │ +
248 //
│ │ │ │ +
249 // The refinement mask for a crease vertex is (1/8, 3/4, 1/8) and for a crease
│ │ │ │ +
250 // edge is (1/2, 1/2) -- producing a uniform B-spline curve along the crease
│ │ │ │ +
251 // (boundary) whether the vertex or its crease is regular or not. The limit
│ │ │ │ +
252 // mask is therefore (1/6, 2/3, 1/6) for ALL cases.
│ │ │ │ +
253 //
│ │ │ │ +
254 // An alternative limit mask (1/5, 3/5, 1/5) is often published for use either
│ │ │ │ +
255 // for irregular crease vertices or for all crease/boundary vertices, but this
│ │ │ │ +
256 // is based on an alternate refinement mask for the edge -- (3/8, 5/8) versus
│ │ │ │ +
257 // the usual (1/2, 1/2) -- and will not produce the B-spline curve desired.
│ │ │ │ +
258 //
│ │ │ │ +
259 Weight vWeight = (Weight) (4.0 / 6.0);
│ │ │ │ +
260 Weight eWeight = (Weight) (1.0 / 6.0);
│ │ │ │ +
261
│ │ │ │ +
262 posMask.VertexWeight(0) = vWeight;
│ │ │ │ +
263 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
264 posMask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
265 }
│ │ │ │ +
266 posMask.EdgeWeight(creaseEnds[0]) = eWeight;
│ │ │ │ +
267 posMask.EdgeWeight(creaseEnds[1]) = eWeight;
│ │ │ │ +
268}
│ │ │ │ +
│ │ │ │ +
269
│ │ │ │ +
270template <>
│ │ │ │ +
271template <typename VERTEX, typename MASK>
│ │ │ │ +
272inline void
│ │ │ │ +
│ │ │ │ +
273Scheme<SCHEME_LOOP>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
│ │ │ │ +
274
│ │ │ │ +
275 typedef typename MASK::Weight Weight;
│ │ │ │ +
276
│ │ │ │ +
277 int valence = vertex.GetNumFaces();
│ │ │ │ +
278
│ │ │ │ +
279 posMask.SetNumVertexWeights(1);
│ │ │ │ +
280 posMask.SetNumEdgeWeights(valence);
│ │ │ │ +
281 posMask.SetNumFaceWeights(0);
│ │ │ │ +
282 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
283
│ │ │ │ +
284 // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert itself:
│ │ │ │ +
285 if (valence == 6) {
│ │ │ │ +
286 Weight eWeight = (Weight) (1.0 / 12.0);
│ │ │ │ +
287 Weight vWeight = 0.5f;
│ │ │ │ +
288
│ │ │ │ +
289 posMask.VertexWeight(0) = vWeight;
│ │ │ │ +
290
│ │ │ │ +
291 posMask.EdgeWeight(0) = eWeight;
│ │ │ │ +
292 posMask.EdgeWeight(1) = eWeight;
│ │ │ │ +
293 posMask.EdgeWeight(2) = eWeight;
│ │ │ │ +
294 posMask.EdgeWeight(3) = eWeight;
│ │ │ │ +
295 posMask.EdgeWeight(4) = eWeight;
│ │ │ │ +
296 posMask.EdgeWeight(5) = eWeight;
│ │ │ │ +
297
│ │ │ │ +
298 } else {
│ │ │ │ +
299 double dValence = (double) valence;
│ │ │ │ +
300 double invValence = 1.0f / dValence;
│ │ │ │ +
301 double cosTheta = std::cos(M_PI * 2.0f * invValence);
│ │ │ │ +
302
│ │ │ │ +
303 double beta = 0.25f * cosTheta + 0.375f;
│ │ │ │ +
304 double gamma = (0.625f - (beta * beta)) * invValence;
│ │ │ │ +
305
│ │ │ │ +
306 Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma)));
│ │ │ │ +
307 Weight vWeight = (Weight) (1.0f - (eWeight * dValence));
│ │ │ │ +
308
│ │ │ │ +
309 posMask.VertexWeight(0) = vWeight;
│ │ │ │ +
310 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
311 posMask.EdgeWeight(i) = eWeight;
│ │ │ │ +
312 }
│ │ │ │ +
313 }
│ │ │ │ +
314}
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
316/*
│ │ │ │ +
317// Limit masks for tangents:
│ │ │ │ +
318//
│ │ │ │ +
319// A note on tangent magnitudes:
│ │ │ │ +
320//
│ │ │ │ +
321// Several formulae exist for limit tangents at a vertex to accommodate the
│ │ │ │ +
322// different topological configurations around the vertex. While these produce
│ │ │ │ +
323// the desired direction, there is inconsistency in the resulting magnitudes.
│ │ │ │ +
324// Ideally a regular mesh of uniformly shaped triangles with similar edge lengths
│ │ │ │ +
325// should produce tangents of similar magnitudes throughout -- including corners
│ │ │ │ +
326// and boundaries. So some of the common formulae for these are adjusted with
│ │ │ │ +
327// scale factors.
│ │ │ │ +
328//
│ │ │ │ +
329// For uses where magnitude does not matter, this scaling should be irrelevant.
│ │ │ │ +
330// But just as with patches, where the magnitudes of partial derivatives are
│ │ │ │ +
331// consistent between similar patches, the magnitudes of limit tangents should
│ │ │ │ +
332// also be similar.
│ │ │ │ +
333//
│ │ │ │ +
334// The reference tangents, in terms of magnitudes, are those produced by the
│ │ │ │ +
335// limit tangent mask for smooth interior vertices, for which well established
│ │ │ │ +
336// sin/cos formulae apply -- these remain unscaled. Formulae for the other
│ │ │ │ +
337// crease/boundary, corner tangents and irregular cases are scaled to be more
│ │ │ │ +
338// consistent with these.
│ │ │ │ +
339//
│ │ │ │ +
340// The crease/boundary tangents for the regular case can be viewed as derived
│ │ │ │ +
341// from the smooth interior masks with two "phantom" points extrapolated across
│ │ │ │ +
342// the regular boundary:
│ │ │ │ +
343//
│ │ │ │ +
344// v3 v2
│ │ │ │ +
345// X - - - - - X
│ │ │ │ +
346// / \ / \
│ │ │ │ +
347// / \ / \
│ │ │ │ +
348// v4 X - - - - - X - - - - - X v1
│ │ │ │ +
349// . . 0 . .
│ │ │ │ +
350// . . . .
│ │ │ │ +
351// . . . .
│ │ │ │ +
352// (v5) (v6)
│ │ │ │ +
353//
│ │ │ │ +
354// where v5 = v0 + (v4 - v3) and v6 = v0 + v1 - v2.
│ │ │ │ +
355//
│ │ │ │ +
356// When the standard limit tangent mask is applied, the cosines of increments
│ │ │ │ +
357// of pi/3 give us coefficients that are multiples of 1/2, leading to the first
│ │ │ │ +
358// tangent T1 = 3/2 * (v1 - v4), rather than the widely used T1 = v1 - v4. So
│ │ │ │ +
359// this scale factor of 3/2 is applied to ensure tangents along the boundaries
│ │ │ │ +
360// are of similar magnitude as tangents in the immediate interior (which may be
│ │ │ │ +
361// parallel).
│ │ │ │ +
362//
│ │ │ │ +
363// Tangents at corners are essentially a form of boundary tangent, and so its
│ │ │ │ +
364// simple difference formula is scaled to be consistent with adjoining boundary
│ │ │ │ +
365// tangents -- not just with the 3/2 factor from above, but with an additional
│ │ │ │ +
366// 2.0 to compensate for the fact that the difference of only side of the vertex
│ │ │ │ +
367// is considered here. The resulting scale factor of 3.0 for the regular corner
│ │ │ │ +
368// is what similarly arises by extrapolating an interior region around the
│ │ │ │ +
369// vertex and using the interior mask for the first tangent.
│ │ │ │ +
370//
│ │ │ │ +
371// The cross-tangent formula for the regular crease/boundary is similarly found
│ │ │ │ +
372// from the above construction of the boundary, but the commonly used weights of
│ │ │ │ +
373// +/- 1 and 2 result from omitting the common factor of sqrt(3)/2 (arising from
│ │ │ │ +
374// the sines of increments of pi/3). With that scale factor close to one, it has
│ │ │ │ +
375// less impact than the irregular cases, which are analogous to corner tangents
│ │ │ │ +
376// in that differences on only one side of the vertex are considered. While a
│ │ │ │ +
377// scaling of 3.0 is similarly understandable for the valence 2 and 3 cases, it is
│ │ │ │ +
378// less obvious in the irregular formula for valence > 4, but similarly effective.
│ │ │ │ +
379//
│ │ │ │ +
380// The end result of these adjustments should be a set of limit tangents that are
│ │ │ │ +
381// of similar magnitude over a regular mesh including boundaries and corners.
│ │ │ │ +
382*/
│ │ │ │ +
383template <>
│ │ │ │ +
384template <typename VERTEX, typename MASK>
│ │ │ │ +
385inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
387 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ +
388
│ │ │ │ +
389 int valence = vertex.GetNumEdges();
│ │ │ │ +
390
│ │ │ │ +
391 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ +
392 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
393 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ +
394 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
395
│ │ │ │ +
396 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ +
397 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
398 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ +
399 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
400
│ │ │ │ +
401 // See note above regarding scale factor of 3.0:
│ │ │ │ +
402 tan1Mask.VertexWeight(0) = -3.0f;
│ │ │ │ +
403 tan1Mask.EdgeWeight(0) = 3.0f;
│ │ │ │ +
404 tan1Mask.EdgeWeight(1) = 0.0f;
│ │ │ │ +
405
│ │ │ │ +
406 tan2Mask.VertexWeight(0) = -3.0f;
│ │ │ │ +
407 tan2Mask.EdgeWeight(0) = 0.0f;
│ │ │ │ +
408 tan2Mask.EdgeWeight(1) = 3.0f;
│ │ │ │ +
409
│ │ │ │ +
410 // Should be at least 2 edges -- be sure to clear weights for any more:
│ │ │ │ +
411 for (int i = 2; i < valence; ++i) {
│ │ │ │ +
412 tan1Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
413 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
414 }
│ │ │ │ +
415}
│ │ │ │ +
│ │ │ │ +
416
│ │ │ │ +
417template <>
│ │ │ │ +
418template <typename VERTEX, typename MASK>
│ │ │ │ +
419inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
421 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const {
│ │ │ │ +
422
│ │ │ │ +
423 typedef typename MASK::Weight Weight;
│ │ │ │ +
424
│ │ │ │ +
425 //
│ │ │ │ +
426 // First, the tangent along the crease:
│ │ │ │ +
427 // The first crease edge is considered the "leading" edge of the span
│ │ │ │ +
428 // of surface for which we are evaluating tangents and the second edge the
│ │ │ │ +
429 // "trailing edge". By convention, the tangent along the crease is oriented
│ │ │ │ +
430 // in the direction of the leading edge.
│ │ │ │ +
431 //
│ │ │ │ +
432 int valence = vertex.GetNumEdges();
│ │ │ │ +
433
│ │ │ │ +
434 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ +
435 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
436 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ +
437 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
438
│ │ │ │ +
439 tan1Mask.VertexWeight(0) = 0.0f;
│ │ │ │ +
440 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
441 tan1Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
442 }
│ │ │ │ +
443
│ │ │ │ +
444 // See the note above regarding scale factor of 1.5:
│ │ │ │ +
445 tan1Mask.EdgeWeight(creaseEnds[0]) = 1.5f;
│ │ │ │ +
446 tan1Mask.EdgeWeight(creaseEnds[1]) = -1.5f;
│ │ │ │ +
447
│ │ │ │ +
448 //
│ │ │ │ +
449 // Second, the tangent across the interior faces:
│ │ │ │ +
450 // Note this is ambiguous for an interior vertex. We currently return
│ │ │ │ +
451 // the tangent for the surface in the counter-clockwise span between the
│ │ │ │ +
452 // leading and trailing edges that form the crease. Given the expected
│ │ │ │ +
453 // computation of a surface normal as Tan1 X Tan2, this tangent should be
│ │ │ │ +
454 // oriented "inward" from the crease/boundary -- across the surface rather
│ │ │ │ +
455 // than outward and away from it.
│ │ │ │ +
456 //
│ │ │ │ +
457 // There is inconsistency in the orientation of this tangent in commonly
│ │ │ │ +
458 // published results: the general formula provided for arbitrary valence
│ │ │ │ +
459 // has the tangent pointing across the crease and "outward" from the surface,
│ │ │ │ +
460 // while the special cases for regular valence and lower have the tangent
│ │ │ │ +
461 // pointing across the surface and "inward" from the crease. So if we are
│ │ │ │ +
462 // to consistently orient the first tangent along the crease, regardless of
│ │ │ │ +
463 // the interior topology, we have to correct this. With the first tangent
│ │ │ │ +
464 // following the direction of the leading crease edge, we want the second
│ │ │ │ +
465 // tangent pointing inward/across the surface -- so we flip the result of
│ │ │ │ +
466 // the general formula.
│ │ │ │ +
467 //
│ │ │ │ +
468 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ +
469 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
470 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ +
471 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
472
│ │ │ │ +
473 for (int i = 0; i < creaseEnds[0]; ++i) {
│ │ │ │ +
474 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
475 }
│ │ │ │ +
476 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1;
│ │ │ │ +
477 if (interiorEdgeCount == 2) {
│ │ │ │ +
478 // See note above regarding scale factor of (sin(60 degs) == sqrt(3)/2:
│ │ │ │ +
479
│ │ │ │ +
480 static Weight const Root3 = (Weight) 1.73205080756887729352;
│ │ │ │ +
481 static Weight const Root3by2 = (Weight) (Root3 * 0.5);
│ │ │ │ +
482
│ │ │ │ +
483 tan2Mask.VertexWeight(0) = -Root3;
│ │ │ │ +
484
│ │ │ │ +
485 tan2Mask.EdgeWeight(creaseEnds[0]) = -Root3by2;
│ │ │ │ +
486 tan2Mask.EdgeWeight(creaseEnds[1]) = -Root3by2;
│ │ │ │ +
487
│ │ │ │ +
488 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = Root3;
│ │ │ │ +
489 tan2Mask.EdgeWeight(creaseEnds[0] + 2) = Root3;
│ │ │ │ +
490 } else if (interiorEdgeCount > 2) {
│ │ │ │ +
491 // See notes above regarding scale factor of -3.0 (-1 for orientation,
│ │ │ │ +
492 // 2.0 for considering the region as a half-disk, and 1.5 in keeping
│ │ │ │ +
493 // with the crease tangent):
│ │ │ │ +
494
│ │ │ │ +
495 double theta = M_PI / (interiorEdgeCount + 1);
│ │ │ │ +
496
│ │ │ │ +
497 tan2Mask.VertexWeight(0) = 0.0f;
│ │ │ │ +
498
│ │ │ │ +
499 Weight cWeight = (Weight) (-3.0f * std::sin(theta));
│ │ │ │ +
500 tan2Mask.EdgeWeight(creaseEnds[0]) = cWeight;
│ │ │ │ +
501 tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight;
│ │ │ │ +
502
│ │ │ │ +
503 double eCoeff = -3.0f * 2.0f * (std::cos(theta) - 1.0f);
│ │ │ │ +
504 for (int i = 1; i <= interiorEdgeCount; ++i) {
│ │ │ │ +
505 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) (eCoeff * std::sin(i * theta));
│ │ │ │ +
506 }
│ │ │ │ +
507 } else if (interiorEdgeCount == 1) {
│ │ │ │ +
508 // See notes above regarding scale factor of 3.0:
│ │ │ │ +
509
│ │ │ │ +
510 tan2Mask.VertexWeight(0) = -3.0f;
│ │ │ │ +
511
│ │ │ │ +
512 tan2Mask.EdgeWeight(creaseEnds[0]) = 0.0f;
│ │ │ │ +
513 tan2Mask.EdgeWeight(creaseEnds[1]) = 0.0f;
│ │ │ │ +
514
│ │ │ │ +
515 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = 3.0f;
│ │ │ │ +
516 } else {
│ │ │ │ +
517 // See notes above regarding scale factor of 3.0:
│ │ │ │ +
518
│ │ │ │ +
519 tan2Mask.VertexWeight(0) = -6.0f;
│ │ │ │ +
520
│ │ │ │ +
521 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f;
│ │ │ │ +
522 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f;
│ │ │ │ +
523 }
│ │ │ │ +
524 for (int i = creaseEnds[1] + 1; i < valence; ++i) {
│ │ │ │ +
525 tan2Mask.EdgeWeight(i) = 0.0f;
│ │ │ │ +
526 }
│ │ │ │ +
527}
│ │ │ │ +
│ │ │ │ +
528
│ │ │ │ +
529template <>
│ │ │ │ +
530template <typename VERTEX, typename MASK>
│ │ │ │ +
531inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
533 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ +
534
│ │ │ │ +
535 typedef typename MASK::Weight Weight;
│ │ │ │ +
536
│ │ │ │ +
537 int valence = vertex.GetNumFaces();
│ │ │ │ +
538
│ │ │ │ +
539 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ +
540 tan1Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
541 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ +
542 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
543
│ │ │ │ +
544 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ +
545 tan2Mask.SetNumEdgeWeights(valence);
│ │ │ │ +
546 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ +
547 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ +
548
│ │ │ │ +
549 tan1Mask.VertexWeight(0) = 0.0f;
│ │ │ │ +
550 tan2Mask.VertexWeight(0) = 0.0f;
│ │ │ │ +
551
│ │ │ │ +
552 if (valence == 6) {
│ │ │ │ +
553 static Weight const Root3by2 = (Weight)(0.5 * 1.73205080756887729352);
│ │ │ │ +
554
│ │ │ │ +
555 tan1Mask.EdgeWeight(0) = 1.0f;
│ │ │ │ +
556 tan1Mask.EdgeWeight(1) = 0.5f;
│ │ │ │ +
557 tan1Mask.EdgeWeight(2) = -0.5f;
│ │ │ │ +
558 tan1Mask.EdgeWeight(3) = -1.0f;
│ │ │ │ +
559 tan1Mask.EdgeWeight(4) = -0.5f;
│ │ │ │ +
560 tan1Mask.EdgeWeight(5) = 0.5f;
│ │ │ │ +
561
│ │ │ │ +
562 tan2Mask.EdgeWeight(0) = 0.0f;
│ │ │ │ +
563 tan2Mask.EdgeWeight(1) = Root3by2;
│ │ │ │ +
564 tan2Mask.EdgeWeight(2) = Root3by2;
│ │ │ │ +
565 tan2Mask.EdgeWeight(3) = 0.0f;
│ │ │ │ +
566 tan2Mask.EdgeWeight(4) = -Root3by2;
│ │ │ │ +
567 tan2Mask.EdgeWeight(5) = -Root3by2;
│ │ │ │ +
568 } else {
│ │ │ │ +
569 double alpha = 2.0f * M_PI / valence;
│ │ │ │ +
570 for (int i = 0; i < valence; ++i) {
│ │ │ │ +
571 double alphaI = alpha * i;
│ │ │ │ +
572 tan1Mask.EdgeWeight(i) = (Weight) std::cos(alphaI);
│ │ │ │ +
573 tan2Mask.EdgeWeight(i) = (Weight) std::sin(alphaI);
│ │ │ │ +
574 }
│ │ │ │ +
575 }
│ │ │ │ +
576}
│ │ │ │ +
│ │ │ │ +
577
│ │ │ │ +
578} // end namespace Sdc
│ │ │ │ +
579} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
580using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
581} // end namespace OpenSubdiv
│ │ │ │ +
582
│ │ │ │ +
583#endif /* OPENSUBDIV3_SDC_LOOP_SCHEME_H */
│ │ │ │ + │ │ │ │ +
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │ + │ │ │ │ +
void assignSmoothMaskForEdge(EDGE const &edge, MASK &mask) const
│ │ │ │ + │ │ │ │ +
void assignCreaseMaskForVertex(VERTEX const &edge, MASK &mask, int const creaseEnds[2]) const
│ │ │ │ +
void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2, int const creaseEnds[2]) const
│ │ │ │ + │ │ │ │ +
void assignCreaseMaskForEdge(EDGE const &edge, MASK &mask) const
Definition scheme.h:317
│ │ │ │ +
void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
│ │ │ │ + │ │ │ │ +
void assignCornerMaskForVertex(VERTEX const &edge, MASK &mask) const
Definition scheme.h:331
│ │ │ │ +
void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const creaseEnds[2]) const
│ │ │ │ +
void assignSmoothMaskForVertex(VERTEX const &edge, MASK &mask) const
│ │ │ │ + │ │ │ │ +
void assignSmoothLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const
│ │ │ │ +
void assignCornerLimitMask(VERTEX const &vertex, MASK &pos) const
│ │ │ │ +
void assignCornerLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -options.h │ │ │ │ │ +loopScheme.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2014 DreamWorks Animation LLC. │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -23,200 +23,671 @@ │ │ │ │ │ 17// │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ -24#ifndef OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -30namespace OPENSUBDIV_VERSION { │ │ │ │ │ -31 │ │ │ │ │ -32namespace Sdc { │ │ │ │ │ +29#include "../sdc/scheme.h" │ │ │ │ │ +30 │ │ │ │ │ +31#include │ │ │ │ │ +32#include │ │ │ │ │ 33 │ │ │ │ │ -50 │ │ │ │ │ -_5_1class _O_p_t_i_o_n_s { │ │ │ │ │ -52public: │ │ │ │ │ -_5_3 enum _V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n { │ │ │ │ │ -54 _V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E = 0, │ │ │ │ │ -_5_6 _V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___O_N_L_Y, │ │ │ │ │ -57 _V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___A_N_D___C_O_R_N_E_R │ │ │ │ │ -_5_9 }; │ │ │ │ │ -_6_0 enum _F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n { │ │ │ │ │ -_6_1 _F_V_A_R___L_I_N_E_A_R___N_O_N_E = 0, │ │ │ │ │ -_6_2 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___O_N_L_Y, │ │ │ │ │ -_6_3 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_1, │ │ │ │ │ -_6_4 _F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_2, │ │ │ │ │ -_6_5 _F_V_A_R___L_I_N_E_A_R___B_O_U_N_D_A_R_I_E_S, │ │ │ │ │ -66 _F_V_A_R___L_I_N_E_A_R___A_L_L │ │ │ │ │ -_6_7 }; │ │ │ │ │ -_6_8 enum _C_r_e_a_s_i_n_g_M_e_t_h_o_d { │ │ │ │ │ -_6_9 _C_R_E_A_S_E___U_N_I_F_O_R_M = 0, │ │ │ │ │ -70 _C_R_E_A_S_E___C_H_A_I_K_I_N │ │ │ │ │ -_7_1 }; │ │ │ │ │ -_7_2 enum _T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n { │ │ │ │ │ -_7_3 _T_R_I___S_U_B___C_A_T_M_A_R_K = 0, │ │ │ │ │ -74 _T_R_I___S_U_B___S_M_O_O_T_H │ │ │ │ │ -_7_5 }; │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36namespace Sdc { │ │ │ │ │ +37 │ │ │ │ │ +38 │ │ │ │ │ +39// │ │ │ │ │ +40// Specializations for Sdc::Scheme: │ │ │ │ │ +41// │ │ │ │ │ +42// │ │ │ │ │ +43 │ │ │ │ │ +44// │ │ │ │ │ +45// Loop traits: │ │ │ │ │ +46// │ │ │ │ │ +47template <> │ │ │ │ │ +_4_8inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_T_o_p_o_l_o_g_i_c_a_l_S_p_l_i_t_T_y_p_e() { return │ │ │ │ │ +_S_P_L_I_T___T_O___T_R_I_S; } │ │ │ │ │ +49 │ │ │ │ │ +50template <> │ │ │ │ │ +_5_1inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 3; } │ │ │ │ │ +52 │ │ │ │ │ +53template <> │ │ │ │ │ +_5_4inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 6; } │ │ │ │ │ +55 │ │ │ │ │ +56template <> │ │ │ │ │ +_5_7inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_G_e_t_L_o_c_a_l_N_e_i_g_h_b_o_r_h_o_o_d_S_i_z_e() { return 1; } │ │ │ │ │ +58 │ │ │ │ │ +59 │ │ │ │ │ +60// │ │ │ │ │ +61// Protected methods to assign the two types of masks for an edge-vertex -- │ │ │ │ │ +62// Crease and Smooth. │ │ │ │ │ +63// │ │ │ │ │ +64// The Crease case does not really need to be specialized, though it may be │ │ │ │ │ +65// preferable to define all explicitly here. │ │ │ │ │ +66// │ │ │ │ │ +67template <> │ │ │ │ │ +68template │ │ │ │ │ +69inline void │ │ │ │ │ +_7_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_E_d_g_e(EDGE const&, MASK& mask) const │ │ │ │ │ +71{ │ │ │ │ │ +72 mask.SetNumVertexWeights(2); │ │ │ │ │ +73 mask.SetNumEdgeWeights(0); │ │ │ │ │ +74 mask.SetNumFaceWeights(0); │ │ │ │ │ +75 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ 76 │ │ │ │ │ -77public: │ │ │ │ │ -78 │ │ │ │ │ -_7_9 _O_p_t_i_o_n_s() : _vtxBoundInterp(_V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E), │ │ │ │ │ -80 _fvarLinInterp(_F_V_A_R___L_I_N_E_A_R___A_L_L), │ │ │ │ │ -81 _creasingMethod(_C_R_E_A_S_E___U_N_I_F_O_R_M), │ │ │ │ │ -82 _triangleSub(_T_R_I___S_U_B___C_A_T_M_A_R_K) { } │ │ │ │ │ -83 │ │ │ │ │ -84 // │ │ │ │ │ -85 // Trivial get/set methods: │ │ │ │ │ -86 // │ │ │ │ │ +77 mask.VertexWeight(0) = 0.5f; │ │ │ │ │ +78 mask.VertexWeight(1) = 0.5f; │ │ │ │ │ +79} │ │ │ │ │ +80 │ │ │ │ │ +81template <> │ │ │ │ │ +82template │ │ │ │ │ +83inline void │ │ │ │ │ +_8_4_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_E_d_g_e(EDGE const& edge, MASK& mask) │ │ │ │ │ +const │ │ │ │ │ +85{ │ │ │ │ │ +86 int faceCount = edge.GetNumFaces(); │ │ │ │ │ 87 │ │ │ │ │ -_8_9 _V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n _G_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n() const { return │ │ │ │ │ -(_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n) _vtxBoundInterp; } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 void _S_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n(_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n b) │ │ │ │ │ -{ _vtxBoundInterp = (EnumIntType) b; } │ │ │ │ │ -93 │ │ │ │ │ -_9_5 _F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n _G_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n() const { return │ │ │ │ │ -(_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n) _fvarLinInterp; } │ │ │ │ │ -96 │ │ │ │ │ -_9_8 void _S_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n(_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n b) { _fvarLinInterp │ │ │ │ │ -= (EnumIntType) b; } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_1 _C_r_e_a_s_i_n_g_M_e_t_h_o_d _G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d() const { return (_C_r_e_a_s_i_n_g_M_e_t_h_o_d) │ │ │ │ │ -_creasingMethod; } │ │ │ │ │ -102 │ │ │ │ │ -_1_0_4 void _S_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d(_C_r_e_a_s_i_n_g_M_e_t_h_o_d c) { _creasingMethod = (EnumIntType) │ │ │ │ │ -c; } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_7 _T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n _G_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n() const { return │ │ │ │ │ -(_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n) _triangleSub; } │ │ │ │ │ -108 │ │ │ │ │ -_1_1_0 void _S_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n(_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n t) { _triangleSub = │ │ │ │ │ -(EnumIntType) t; } │ │ │ │ │ +88 mask.SetNumVertexWeights(2); │ │ │ │ │ +89 mask.SetNumEdgeWeights(0); │ │ │ │ │ +90 mask.SetNumFaceWeights(faceCount); │ │ │ │ │ +91 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +92 │ │ │ │ │ +93 // │ │ │ │ │ +94 // This is where we run into the issue of "face weights" -- we want to │ │ │ │ │ +weight the │ │ │ │ │ +95 // face-centers for Catmark, but face-centers are not generated for Loop. So │ │ │ │ │ +do │ │ │ │ │ +96 // we make assumptions on how the mask is used, assign some property to the │ │ │ │ │ +mask │ │ │ │ │ +97 // to indicate how they were assigned, or take input from the mask itself? │ │ │ │ │ +98 // │ │ │ │ │ +99 // Regardless, we have two choices: │ │ │ │ │ +100 // - face-weights are for the vertices opposite the edge (as in Hbr): │ │ │ │ │ +101 // vertex weights = 0.375f; │ │ │ │ │ +102 // face weights = 0.125f; │ │ │ │ │ +103 // │ │ │ │ │ +104 // - face-weights are for the face centers: │ │ │ │ │ +105 // vertex weights = 0.125f; │ │ │ │ │ +106 // face weights = 0.375f; │ │ │ │ │ +107 // │ │ │ │ │ +108 // Coincidentally the coefficients are the same but reversed. │ │ │ │ │ +109 // │ │ │ │ │ +110 typedef typename MASK::Weight Weight; │ │ │ │ │ 111 │ │ │ │ │ -112private: │ │ │ │ │ -113 // Use a small integer type to pack these rather than bitfields: │ │ │ │ │ -114 typedef unsigned char EnumIntType; │ │ │ │ │ -115 │ │ │ │ │ -116 EnumIntType _vtxBoundInterp; │ │ │ │ │ -117 EnumIntType _fvarLinInterp; │ │ │ │ │ -118 EnumIntType _creasingMethod; │ │ │ │ │ -119 EnumIntType _triangleSub; │ │ │ │ │ -120}; │ │ │ │ │ -121 │ │ │ │ │ -122} // end namespace sdc │ │ │ │ │ -123 │ │ │ │ │ -124} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -125using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -126} // end namespace OpenSubdiv │ │ │ │ │ -127 │ │ │ │ │ -128#endif /* OPENSUBDIV3_SDC_OPTIONS_H */ │ │ │ │ │ +112 Weight vWeight = mask.AreFaceWeightsForFaceCenters() ? 0.125f : 0.375f; │ │ │ │ │ +113 Weight fWeight = mask.AreFaceWeightsForFaceCenters() ? 0.375f : 0.125f; │ │ │ │ │ +114 │ │ │ │ │ +115 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +116 mask.VertexWeight(1) = vWeight; │ │ │ │ │ +117 │ │ │ │ │ +118 if (faceCount == 2) { │ │ │ │ │ +119 mask.FaceWeight(0) = fWeight; │ │ │ │ │ +120 mask.FaceWeight(1) = fWeight; │ │ │ │ │ +121 } else { │ │ │ │ │ +122 // The non-manifold case is not clearly defined -- we adjust the above │ │ │ │ │ +123 // face-weight to preserve the ratio of edge-center and face-centers: │ │ │ │ │ +124 fWeight *= 2.0f / (Weight) faceCount; │ │ │ │ │ +125 for (int i = 0; i < faceCount; ++i) { │ │ │ │ │ +126 mask.FaceWeight(i) = fWeight; │ │ │ │ │ +127 } │ │ │ │ │ +128 } │ │ │ │ │ +129} │ │ │ │ │ +130 │ │ │ │ │ +131 │ │ │ │ │ +132// │ │ │ │ │ +133// Protected methods to assign the three types of masks for a vertex-vertex │ │ │ │ │ +-- │ │ │ │ │ +134// Corner, Crease and Smooth (Dart is the same as Smooth). │ │ │ │ │ +135// │ │ │ │ │ +136// Corner and Crease do not really need to be specialized, though it may be │ │ │ │ │ +137// preferable to define all explicitly here. │ │ │ │ │ +138// │ │ │ │ │ +139template <> │ │ │ │ │ +140template │ │ │ │ │ +141inline void │ │ │ │ │ +_1_4_2_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const&, MASK& mask) │ │ │ │ │ +const │ │ │ │ │ +143{ │ │ │ │ │ +144 mask.SetNumVertexWeights(1); │ │ │ │ │ +145 mask.SetNumEdgeWeights(0); │ │ │ │ │ +146 mask.SetNumFaceWeights(0); │ │ │ │ │ +147 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +148 │ │ │ │ │ +149 mask.VertexWeight(0) = 1.0f; │ │ │ │ │ +150} │ │ │ │ │ +151 │ │ │ │ │ +152template <> │ │ │ │ │ +153template │ │ │ │ │ +154inline void │ │ │ │ │ +_1_5_5_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const& vertex, MASK& │ │ │ │ │ +mask, │ │ │ │ │ +156 int const creaseEnds[2]) const { │ │ │ │ │ +157 typedef typename MASK::Weight Weight; │ │ │ │ │ +158 │ │ │ │ │ +159 int valence = vertex.GetNumEdges(); │ │ │ │ │ +160 │ │ │ │ │ +161 mask.SetNumVertexWeights(1); │ │ │ │ │ +162 mask.SetNumEdgeWeights(valence); │ │ │ │ │ +163 mask.SetNumFaceWeights(0); │ │ │ │ │ +164 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +165 │ │ │ │ │ +166 Weight vWeight = 0.75f; │ │ │ │ │ +167 Weight eWeight = 0.125f; │ │ │ │ │ +168 │ │ │ │ │ +169 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +170 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +171 mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +172 } │ │ │ │ │ +173 mask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ +174 mask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ +175} │ │ │ │ │ +176 │ │ │ │ │ +177template <> │ │ │ │ │ +178template │ │ │ │ │ +179inline void │ │ │ │ │ +_1_8_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_V_e_r_t_e_x(VERTEX const& vertex, MASK& │ │ │ │ │ +mask) const │ │ │ │ │ +181{ │ │ │ │ │ +182 typedef typename MASK::Weight Weight; │ │ │ │ │ +183 │ │ │ │ │ +184 int valence = vertex.GetNumFaces(); │ │ │ │ │ +185 │ │ │ │ │ +186 mask.SetNumVertexWeights(1); │ │ │ │ │ +187 mask.SetNumEdgeWeights(valence); │ │ │ │ │ +188 mask.SetNumFaceWeights(0); │ │ │ │ │ +189 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +190 │ │ │ │ │ +191 // Specialize for the regular case: 1/16 per edge-vert, 5/8 for the vert │ │ │ │ │ +itself: │ │ │ │ │ +192 Weight eWeight = (Weight) 0.0625f; │ │ │ │ │ +193 Weight vWeight = (Weight) 0.625f; │ │ │ │ │ +194 │ │ │ │ │ +195 if (valence != 6) { │ │ │ │ │ +196 // From HbrLoopSubdivision::Subdivide(mesh, vertex): │ │ │ │ │ +197 // - could use some lookup tables here for common irregular valence (5, 7, │ │ │ │ │ +8) │ │ │ │ │ +198 // or all of these cosine calls will be adding up... │ │ │ │ │ +199 │ │ │ │ │ +200 double dValence = (double) valence; │ │ │ │ │ +201 double invValence = 1.0f / dValence; │ │ │ │ │ +202 double cosTheta = std::cos(M_PI * 2.0f * invValence); │ │ │ │ │ +203 │ │ │ │ │ +204 double beta = 0.25f * cosTheta + 0.375f; │ │ │ │ │ +205 │ │ │ │ │ +206 eWeight = (Weight) ((0.625f - (beta * beta)) * invValence); │ │ │ │ │ +207 vWeight = (Weight) (1.0f - (eWeight * dValence)); │ │ │ │ │ +208 } │ │ │ │ │ +209 │ │ │ │ │ +210 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +211 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +212 mask.EdgeWeight(i) = eWeight; │ │ │ │ │ +213 } │ │ │ │ │ +214} │ │ │ │ │ +215 │ │ │ │ │ +216 │ │ │ │ │ +217// │ │ │ │ │ +218// Limit masks for position: │ │ │ │ │ +219// │ │ │ │ │ +220template <> │ │ │ │ │ +221template │ │ │ │ │ +222inline void │ │ │ │ │ +_2_2_3_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_M_a_s_k(VERTEX const& /* vertex */, MASK& │ │ │ │ │ +posMask) const { │ │ │ │ │ +224 │ │ │ │ │ +225 posMask.SetNumVertexWeights(1); │ │ │ │ │ +226 posMask.SetNumEdgeWeights(0); │ │ │ │ │ +227 posMask.SetNumFaceWeights(0); │ │ │ │ │ +228 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +229 │ │ │ │ │ +230 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ +231} │ │ │ │ │ +232 │ │ │ │ │ +233template <> │ │ │ │ │ +234template │ │ │ │ │ +235inline void │ │ │ │ │ +_2_3_6_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ +posMask, │ │ │ │ │ +237 int const creaseEnds[2]) const { │ │ │ │ │ +238 │ │ │ │ │ +239 typedef typename MASK::Weight Weight; │ │ │ │ │ +240 │ │ │ │ │ +241 int valence = vertex.GetNumEdges(); │ │ │ │ │ +242 │ │ │ │ │ +243 posMask.SetNumVertexWeights(1); │ │ │ │ │ +244 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ +245 posMask.SetNumFaceWeights(0); │ │ │ │ │ +246 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +247 │ │ │ │ │ +248 // │ │ │ │ │ +249 // The refinement mask for a crease vertex is (1/8, 3/4, 1/8) and for a │ │ │ │ │ +crease │ │ │ │ │ +250 // edge is (1/2, 1/2) -- producing a uniform B-spline curve along the │ │ │ │ │ +crease │ │ │ │ │ +251 // (boundary) whether the vertex or its crease is regular or not. The limit │ │ │ │ │ +252 // mask is therefore (1/6, 2/3, 1/6) for ALL cases. │ │ │ │ │ +253 // │ │ │ │ │ +254 // An alternative limit mask (1/5, 3/5, 1/5) is often published for use │ │ │ │ │ +either │ │ │ │ │ +255 // for irregular crease vertices or for all crease/boundary vertices, but │ │ │ │ │ +this │ │ │ │ │ +256 // is based on an alternate refinement mask for the edge -- (3/8, 5/8) │ │ │ │ │ +versus │ │ │ │ │ +257 // the usual (1/2, 1/2) -- and will not produce the B-spline curve desired. │ │ │ │ │ +258 // │ │ │ │ │ +259 Weight vWeight = (Weight) (4.0 / 6.0); │ │ │ │ │ +260 Weight eWeight = (Weight) (1.0 / 6.0); │ │ │ │ │ +261 │ │ │ │ │ +262 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +263 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +264 posMask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +265 } │ │ │ │ │ +266 posMask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ +267 posMask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ +268} │ │ │ │ │ +269 │ │ │ │ │ +270template <> │ │ │ │ │ +271template │ │ │ │ │ +272inline void │ │ │ │ │ +_2_7_3_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ +posMask) const { │ │ │ │ │ +274 │ │ │ │ │ +275 typedef typename MASK::Weight Weight; │ │ │ │ │ +276 │ │ │ │ │ +277 int valence = vertex.GetNumFaces(); │ │ │ │ │ +278 │ │ │ │ │ +279 posMask.SetNumVertexWeights(1); │ │ │ │ │ +280 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ +281 posMask.SetNumFaceWeights(0); │ │ │ │ │ +282 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +283 │ │ │ │ │ +284 // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert │ │ │ │ │ +itself: │ │ │ │ │ +285 if (valence == 6) { │ │ │ │ │ +286 Weight eWeight = (Weight) (1.0 / 12.0); │ │ │ │ │ +287 Weight vWeight = 0.5f; │ │ │ │ │ +288 │ │ │ │ │ +289 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +290 │ │ │ │ │ +291 posMask.EdgeWeight(0) = eWeight; │ │ │ │ │ +292 posMask.EdgeWeight(1) = eWeight; │ │ │ │ │ +293 posMask.EdgeWeight(2) = eWeight; │ │ │ │ │ +294 posMask.EdgeWeight(3) = eWeight; │ │ │ │ │ +295 posMask.EdgeWeight(4) = eWeight; │ │ │ │ │ +296 posMask.EdgeWeight(5) = eWeight; │ │ │ │ │ +297 │ │ │ │ │ +298 } else { │ │ │ │ │ +299 double dValence = (double) valence; │ │ │ │ │ +300 double invValence = 1.0f / dValence; │ │ │ │ │ +301 double cosTheta = std::cos(M_PI * 2.0f * invValence); │ │ │ │ │ +302 │ │ │ │ │ +303 double beta = 0.25f * cosTheta + 0.375f; │ │ │ │ │ +304 double gamma = (0.625f - (beta * beta)) * invValence; │ │ │ │ │ +305 │ │ │ │ │ +306 Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma))); │ │ │ │ │ +307 Weight vWeight = (Weight) (1.0f - (eWeight * dValence)); │ │ │ │ │ +308 │ │ │ │ │ +309 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +310 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +311 posMask.EdgeWeight(i) = eWeight; │ │ │ │ │ +312 } │ │ │ │ │ +313 } │ │ │ │ │ +314} │ │ │ │ │ +315 │ │ │ │ │ +316/* │ │ │ │ │ +317// Limit masks for tangents: │ │ │ │ │ +318// │ │ │ │ │ +319// A note on tangent magnitudes: │ │ │ │ │ +320// │ │ │ │ │ +321// Several formulae exist for limit tangents at a vertex to accommodate the │ │ │ │ │ +322// different topological configurations around the vertex. While these │ │ │ │ │ +produce │ │ │ │ │ +323// the desired direction, there is inconsistency in the resulting │ │ │ │ │ +magnitudes. │ │ │ │ │ +324// Ideally a regular mesh of uniformly shaped triangles with similar edge │ │ │ │ │ +lengths │ │ │ │ │ +325// should produce tangents of similar magnitudes throughout -- including │ │ │ │ │ +corners │ │ │ │ │ +326// and boundaries. So some of the common formulae for these are adjusted │ │ │ │ │ +with │ │ │ │ │ +327// scale factors. │ │ │ │ │ +328// │ │ │ │ │ +329// For uses where magnitude does not matter, this scaling should be │ │ │ │ │ +irrelevant. │ │ │ │ │ +330// But just as with patches, where the magnitudes of partial derivatives are │ │ │ │ │ +331// consistent between similar patches, the magnitudes of limit tangents │ │ │ │ │ +should │ │ │ │ │ +332// also be similar. │ │ │ │ │ +333// │ │ │ │ │ +334// The reference tangents, in terms of magnitudes, are those produced by the │ │ │ │ │ +335// limit tangent mask for smooth interior vertices, for which well │ │ │ │ │ +established │ │ │ │ │ +336// sin/cos formulae apply -- these remain unscaled. Formulae for the other │ │ │ │ │ +337// crease/boundary, corner tangents and irregular cases are scaled to be │ │ │ │ │ +more │ │ │ │ │ +338// consistent with these. │ │ │ │ │ +339// │ │ │ │ │ +340// The crease/boundary tangents for the regular case can be viewed as │ │ │ │ │ +derived │ │ │ │ │ +341// from the smooth interior masks with two "phantom" points extrapolated │ │ │ │ │ +across │ │ │ │ │ +342// the regular boundary: │ │ │ │ │ +343// │ │ │ │ │ +344// v3 v2 │ │ │ │ │ +345// X - - - - - X │ │ │ │ │ +346// / \ / \ │ │ │ │ │ +347// / \ / \ │ │ │ │ │ +348// v4 X - - - - - X - - - - - X v1 │ │ │ │ │ +349// . . 0 . . │ │ │ │ │ +350// . . . . │ │ │ │ │ +351// . . . . │ │ │ │ │ +352// (v5) (v6) │ │ │ │ │ +353// │ │ │ │ │ +354// where v5 = v0 + (v4 - v3) and v6 = v0 + v1 - v2. │ │ │ │ │ +355// │ │ │ │ │ +356// When the standard limit tangent mask is applied, the cosines of │ │ │ │ │ +increments │ │ │ │ │ +357// of pi/3 give us coefficients that are multiples of 1/2, leading to the │ │ │ │ │ +first │ │ │ │ │ +358// tangent T1 = 3/2 * (v1 - v4), rather than the widely used T1 = v1 - v4. │ │ │ │ │ +So │ │ │ │ │ +359// this scale factor of 3/2 is applied to ensure tangents along the │ │ │ │ │ +boundaries │ │ │ │ │ +360// are of similar magnitude as tangents in the immediate interior (which may │ │ │ │ │ +be │ │ │ │ │ +361// parallel). │ │ │ │ │ +362// │ │ │ │ │ +363// Tangents at corners are essentially a form of boundary tangent, and so │ │ │ │ │ +its │ │ │ │ │ +364// simple difference formula is scaled to be consistent with adjoining │ │ │ │ │ +boundary │ │ │ │ │ +365// tangents -- not just with the 3/2 factor from above, but with an │ │ │ │ │ +additional │ │ │ │ │ +366// 2.0 to compensate for the fact that the difference of only side of the │ │ │ │ │ +vertex │ │ │ │ │ +367// is considered here. The resulting scale factor of 3.0 for the regular │ │ │ │ │ +corner │ │ │ │ │ +368// is what similarly arises by extrapolating an interior region around the │ │ │ │ │ +369// vertex and using the interior mask for the first tangent. │ │ │ │ │ +370// │ │ │ │ │ +371// The cross-tangent formula for the regular crease/boundary is similarly │ │ │ │ │ +found │ │ │ │ │ +372// from the above construction of the boundary, but the commonly used │ │ │ │ │ +weights of │ │ │ │ │ +373// +/- 1 and 2 result from omitting the common factor of sqrt(3)/2 (arising │ │ │ │ │ +from │ │ │ │ │ +374// the sines of increments of pi/3). With that scale factor close to one, it │ │ │ │ │ +has │ │ │ │ │ +375// less impact than the irregular cases, which are analogous to corner │ │ │ │ │ +tangents │ │ │ │ │ +376// in that differences on only one side of the vertex are considered. While │ │ │ │ │ +a │ │ │ │ │ +377// scaling of 3.0 is similarly understandable for the valence 2 and 3 cases, │ │ │ │ │ +it is │ │ │ │ │ +378// less obvious in the irregular formula for valence > 4, but similarly │ │ │ │ │ +effective. │ │ │ │ │ +379// │ │ │ │ │ +380// The end result of these adjustments should be a set of limit tangents │ │ │ │ │ +that are │ │ │ │ │ +381// of similar magnitude over a regular mesh including boundaries and │ │ │ │ │ +corners. │ │ │ │ │ +382*/ │ │ │ │ │ +383template <> │ │ │ │ │ +384template │ │ │ │ │ +385inline void │ │ │ │ │ +_3_8_6_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ +387 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +388 │ │ │ │ │ +389 int valence = vertex.GetNumEdges(); │ │ │ │ │ +390 │ │ │ │ │ +391 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +392 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +393 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ +394 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +395 │ │ │ │ │ +396 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +397 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +398 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ +399 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +400 │ │ │ │ │ +401 // See note above regarding scale factor of 3.0: │ │ │ │ │ +402 tan1Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ +403 tan1Mask.EdgeWeight(0) = 3.0f; │ │ │ │ │ +404 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ +405 │ │ │ │ │ +406 tan2Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ +407 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ +408 tan2Mask.EdgeWeight(1) = 3.0f; │ │ │ │ │ +409 │ │ │ │ │ +410 // Should be at least 2 edges -- be sure to clear weights for any more: │ │ │ │ │ +411 for (int i = 2; i < valence; ++i) { │ │ │ │ │ +412 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +413 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +414 } │ │ │ │ │ +415} │ │ │ │ │ +416 │ │ │ │ │ +417template <> │ │ │ │ │ +418template │ │ │ │ │ +419inline void │ │ │ │ │ +_4_2_0_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ +421 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const { │ │ │ │ │ +422 │ │ │ │ │ +423 typedef typename MASK::Weight Weight; │ │ │ │ │ +424 │ │ │ │ │ +425 // │ │ │ │ │ +426 // First, the tangent along the crease: │ │ │ │ │ +427 // The first crease edge is considered the "leading" edge of the span │ │ │ │ │ +428 // of surface for which we are evaluating tangents and the second edge the │ │ │ │ │ +429 // "trailing edge". By convention, the tangent along the crease is oriented │ │ │ │ │ +430 // in the direction of the leading edge. │ │ │ │ │ +431 // │ │ │ │ │ +432 int valence = vertex.GetNumEdges(); │ │ │ │ │ +433 │ │ │ │ │ +434 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +435 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +436 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ +437 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +438 │ │ │ │ │ +439 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +440 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +441 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +442 } │ │ │ │ │ +443 │ │ │ │ │ +444 // See the note above regarding scale factor of 1.5: │ │ │ │ │ +445 tan1Mask.EdgeWeight(creaseEnds[0]) = 1.5f; │ │ │ │ │ +446 tan1Mask.EdgeWeight(creaseEnds[1]) = -1.5f; │ │ │ │ │ +447 │ │ │ │ │ +448 // │ │ │ │ │ +449 // Second, the tangent across the interior faces: │ │ │ │ │ +450 // Note this is ambiguous for an interior vertex. We currently return │ │ │ │ │ +451 // the tangent for the surface in the counter-clockwise span between the │ │ │ │ │ +452 // leading and trailing edges that form the crease. Given the expected │ │ │ │ │ +453 // computation of a surface normal as Tan1 X Tan2, this tangent should be │ │ │ │ │ +454 // oriented "inward" from the crease/boundary -- across the surface rather │ │ │ │ │ +455 // than outward and away from it. │ │ │ │ │ +456 // │ │ │ │ │ +457 // There is inconsistency in the orientation of this tangent in commonly │ │ │ │ │ +458 // published results: the general formula provided for arbitrary valence │ │ │ │ │ +459 // has the tangent pointing across the crease and "outward" from the │ │ │ │ │ +surface, │ │ │ │ │ +460 // while the special cases for regular valence and lower have the tangent │ │ │ │ │ +461 // pointing across the surface and "inward" from the crease. So if we are │ │ │ │ │ +462 // to consistently orient the first tangent along the crease, regardless of │ │ │ │ │ +463 // the interior topology, we have to correct this. With the first tangent │ │ │ │ │ +464 // following the direction of the leading crease edge, we want the second │ │ │ │ │ +465 // tangent pointing inward/across the surface -- so we flip the result of │ │ │ │ │ +466 // the general formula. │ │ │ │ │ +467 // │ │ │ │ │ +468 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +469 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +470 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ +471 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +472 │ │ │ │ │ +473 for (int i = 0; i < creaseEnds[0]; ++i) { │ │ │ │ │ +474 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +475 } │ │ │ │ │ +476 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1; │ │ │ │ │ +477 if (interiorEdgeCount == 2) { │ │ │ │ │ +478 // See note above regarding scale factor of (sin(60 degs) == sqrt(3)/2: │ │ │ │ │ +479 │ │ │ │ │ +480 static Weight const Root3 = (Weight) 1.73205080756887729352; │ │ │ │ │ +481 static Weight const Root3by2 = (Weight) (Root3 * 0.5); │ │ │ │ │ +482 │ │ │ │ │ +483 tan2Mask.VertexWeight(0) = -Root3; │ │ │ │ │ +484 │ │ │ │ │ +485 tan2Mask.EdgeWeight(creaseEnds[0]) = -Root3by2; │ │ │ │ │ +486 tan2Mask.EdgeWeight(creaseEnds[1]) = -Root3by2; │ │ │ │ │ +487 │ │ │ │ │ +488 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = Root3; │ │ │ │ │ +489 tan2Mask.EdgeWeight(creaseEnds[0] + 2) = Root3; │ │ │ │ │ +490 } else if (interiorEdgeCount > 2) { │ │ │ │ │ +491 // See notes above regarding scale factor of -3.0 (-1 for orientation, │ │ │ │ │ +492 // 2.0 for considering the region as a half-disk, and 1.5 in keeping │ │ │ │ │ +493 // with the crease tangent): │ │ │ │ │ +494 │ │ │ │ │ +495 double theta = M_PI / (interiorEdgeCount + 1); │ │ │ │ │ +496 │ │ │ │ │ +497 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +498 │ │ │ │ │ +499 Weight cWeight = (Weight) (-3.0f * std::sin(theta)); │ │ │ │ │ +500 tan2Mask.EdgeWeight(creaseEnds[0]) = cWeight; │ │ │ │ │ +501 tan2Mask.EdgeWeight(creaseEnds[1]) = cWeight; │ │ │ │ │ +502 │ │ │ │ │ +503 double eCoeff = -3.0f * 2.0f * (std::cos(theta) - 1.0f); │ │ │ │ │ +504 for (int i = 1; i <= interiorEdgeCount; ++i) { │ │ │ │ │ +505 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) (eCoeff * std::sin(i * │ │ │ │ │ +theta)); │ │ │ │ │ +506 } │ │ │ │ │ +507 } else if (interiorEdgeCount == 1) { │ │ │ │ │ +508 // See notes above regarding scale factor of 3.0: │ │ │ │ │ +509 │ │ │ │ │ +510 tan2Mask.VertexWeight(0) = -3.0f; │ │ │ │ │ +511 │ │ │ │ │ +512 tan2Mask.EdgeWeight(creaseEnds[0]) = 0.0f; │ │ │ │ │ +513 tan2Mask.EdgeWeight(creaseEnds[1]) = 0.0f; │ │ │ │ │ +514 │ │ │ │ │ +515 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = 3.0f; │ │ │ │ │ +516 } else { │ │ │ │ │ +517 // See notes above regarding scale factor of 3.0: │ │ │ │ │ +518 │ │ │ │ │ +519 tan2Mask.VertexWeight(0) = -6.0f; │ │ │ │ │ +520 │ │ │ │ │ +521 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f; │ │ │ │ │ +522 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f; │ │ │ │ │ +523 } │ │ │ │ │ +524 for (int i = creaseEnds[1] + 1; i < valence; ++i) { │ │ │ │ │ +525 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +526 } │ │ │ │ │ +527} │ │ │ │ │ +528 │ │ │ │ │ +529template <> │ │ │ │ │ +530template │ │ │ │ │ +531inline void │ │ │ │ │ +_5_3_2_S_c_h_e_m_e_<_S_C_H_E_M_E___L_O_O_P_>_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s(VERTEX const& vertex, │ │ │ │ │ +533 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +534 │ │ │ │ │ +535 typedef typename MASK::Weight Weight; │ │ │ │ │ +536 │ │ │ │ │ +537 int valence = vertex.GetNumFaces(); │ │ │ │ │ +538 │ │ │ │ │ +539 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +540 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +541 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ +542 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +543 │ │ │ │ │ +544 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +545 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +546 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ +547 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +548 │ │ │ │ │ +549 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +550 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +551 │ │ │ │ │ +552 if (valence == 6) { │ │ │ │ │ +553 static Weight const Root3by2 = (Weight)(0.5 * 1.73205080756887729352); │ │ │ │ │ +554 │ │ │ │ │ +555 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ +556 tan1Mask.EdgeWeight(1) = 0.5f; │ │ │ │ │ +557 tan1Mask.EdgeWeight(2) = -0.5f; │ │ │ │ │ +558 tan1Mask.EdgeWeight(3) = -1.0f; │ │ │ │ │ +559 tan1Mask.EdgeWeight(4) = -0.5f; │ │ │ │ │ +560 tan1Mask.EdgeWeight(5) = 0.5f; │ │ │ │ │ +561 │ │ │ │ │ +562 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ +563 tan2Mask.EdgeWeight(1) = Root3by2; │ │ │ │ │ +564 tan2Mask.EdgeWeight(2) = Root3by2; │ │ │ │ │ +565 tan2Mask.EdgeWeight(3) = 0.0f; │ │ │ │ │ +566 tan2Mask.EdgeWeight(4) = -Root3by2; │ │ │ │ │ +567 tan2Mask.EdgeWeight(5) = -Root3by2; │ │ │ │ │ +568 } else { │ │ │ │ │ +569 double alpha = 2.0f * M_PI / valence; │ │ │ │ │ +570 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +571 double alphaI = alpha * i; │ │ │ │ │ +572 tan1Mask.EdgeWeight(i) = (Weight) std::cos(alphaI); │ │ │ │ │ +573 tan2Mask.EdgeWeight(i) = (Weight) std::sin(alphaI); │ │ │ │ │ +574 } │ │ │ │ │ +575 } │ │ │ │ │ +576} │ │ │ │ │ +577 │ │ │ │ │ +578} // end namespace Sdc │ │ │ │ │ +579} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +580using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +581} // end namespace OpenSubdiv │ │ │ │ │ +582 │ │ │ │ │ +583#endif /* OPENSUBDIV3_SDC_LOOP_SCHEME_H */ │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ -All supported options applying to subdivision scheme. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ -TriangleSubdivision │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_R_I___S_U_B___C_A_T_M_A_R_K │ │ │ │ │ -@ TRI_SUB_CATMARK │ │ │ │ │ -Catmark weights (Catmark scheme only) │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_T_R_I___S_U_B___S_M_O_O_T_H │ │ │ │ │ -@ TRI_SUB_SMOOTH │ │ │ │ │ -"smooth triangle" weights (Catmark scheme only) │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ -CreasingMethod │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_R_E_A_S_E___U_N_I_F_O_R_M │ │ │ │ │ -@ CREASE_UNIFORM │ │ │ │ │ -Catmark rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_C_R_E_A_S_E___C_H_A_I_K_I_N │ │ │ │ │ -@ CREASE_CHAIKIN │ │ │ │ │ -Chaikin rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ -TriangleSubdivision GetTriangleSubdivision() const │ │ │ │ │ -Get triangle subdivision weights rule (Catmark scheme only !) │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ -CreasingMethod GetCreasingMethod() const │ │ │ │ │ -Get edge crease rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options() │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -void SetFVarLinearInterpolation(FVarLinearInterpolation b) │ │ │ │ │ -Set face-varying interpolation rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_T_r_i_a_n_g_l_e_S_u_b_d_i_v_i_s_i_o_n │ │ │ │ │ -void SetTriangleSubdivision(TriangleSubdivision t) │ │ │ │ │ -Set triangle subdivision weights rule (Catmark scheme only !) │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_1_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const │ │ │ │ │ -Get vertex boundary interpolation rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_8_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -FVarLinearInterpolation │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___O_N_L_Y │ │ │ │ │ -@ FVAR_LINEAR_CORNERS_ONLY │ │ │ │ │ -sharpen corners only │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___B_O_U_N_D_A_R_I_E_S │ │ │ │ │ -@ FVAR_LINEAR_BOUNDARIES │ │ │ │ │ -sharpen all boundaries ("always sharp") │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_2 │ │ │ │ │ -@ FVAR_LINEAR_CORNERS_PLUS2 │ │ │ │ │ -("edge and corner + propagate corner") │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___C_O_R_N_E_R_S___P_L_U_S_1 │ │ │ │ │ -@ FVAR_LINEAR_CORNERS_PLUS1 │ │ │ │ │ -("edge corner") │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___A_L_L │ │ │ │ │ -@ FVAR_LINEAR_ALL │ │ │ │ │ -bilinear interpolation ("bilinear") │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_F_V_A_R___L_I_N_E_A_R___N_O_N_E │ │ │ │ │ -@ FVAR_LINEAR_NONE │ │ │ │ │ -smooth everywhere ("edge only") │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b) │ │ │ │ │ -Set vertex boundary interpolation rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_V_a_r_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -FVarLinearInterpolation GetFVarLinearInterpolation() const │ │ │ │ │ -Get face-varying interpolation rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_9_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_t_x_B_o_u_n_d_a_r_y_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -VtxBoundaryInterpolation │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___N_O_N_E │ │ │ │ │ -@ VTX_BOUNDARY_NONE │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___O_N_L_Y │ │ │ │ │ -@ VTX_BOUNDARY_EDGE_ONLY │ │ │ │ │ -all boundary edges sharpened and interpolated │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_V_T_X___B_O_U_N_D_A_R_Y___E_D_G_E___A_N_D___C_O_R_N_E_R │ │ │ │ │ -@ VTX_BOUNDARY_EDGE_AND_CORNER │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d │ │ │ │ │ -void SetCreasingMethod(CreasingMethod c) │ │ │ │ │ -Set edge crease rule. │ │ │ │ │ -DDeeffiinniittiioonn _o_p_t_i_o_n_s_._h_:_1_0_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_p_l_i_t │ │ │ │ │ +Split │ │ │ │ │ +Enumerated type for all face splitting schemes. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_P_L_I_T___T_O___T_R_I_S │ │ │ │ │ +@ SPLIT_TO_TRIS │ │ │ │ │ +Used by Loop. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_E_d_g_e │ │ │ │ │ +void assignSmoothMaskForEdge(EDGE const &edge, MASK &mask) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_T_o_p_o_l_o_g_i_c_a_l_S_p_l_i_t_T_y_p_e │ │ │ │ │ +static Split GetTopologicalSplitType() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ +void assignCreaseMaskForVertex(VERTEX const &edge, MASK &mask, int const │ │ │ │ │ +creaseEnds[2]) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ +void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ +&tan2, int const creaseEnds[2]) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e │ │ │ │ │ +static int GetRegularFaceSize() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_M_a_s_k_F_o_r_E_d_g_e │ │ │ │ │ +void assignCreaseMaskForEdge(EDGE const &edge, MASK &mask) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_3_1_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_M_a_s_k │ │ │ │ │ +void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_L_o_c_a_l_N_e_i_g_h_b_o_r_h_o_o_d_S_i_z_e │ │ │ │ │ +static int GetLocalNeighborhoodSize() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ +void assignCornerMaskForVertex(VERTEX const &edge, MASK &mask) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_3_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_r_e_a_s_e_L_i_m_i_t_M_a_s_k │ │ │ │ │ +void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const │ │ │ │ │ +creaseEnds[2]) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_M_a_s_k_F_o_r_V_e_r_t_e_x │ │ │ │ │ +void assignSmoothMaskForVertex(VERTEX const &edge, MASK &mask) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e │ │ │ │ │ +static int GetRegularVertexValence() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_S_m_o_o_t_h_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ +void assignSmoothLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ +&tan2) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_M_a_s_k │ │ │ │ │ +void assignCornerLimitMask(VERTEX const &vertex, MASK &pos) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_a_s_s_i_g_n_C_o_r_n_e_r_L_i_m_i_t_T_a_n_g_e_n_t_M_a_s_k_s │ │ │ │ │ +void assignCornerLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK │ │ │ │ │ +&tan2) const │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _s_d_c │ │ │ │ │ - * _o_p_t_i_o_n_s_._h │ │ │ │ │ + * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
crease.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ +#include "../sdc/options.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ @@ -287,15 +287,15 @@ │ │ │ │
241} // end namespace sdc
│ │ │ │
242
│ │ │ │
243} // end namespace OPENSUBDIV_VERSION
│ │ │ │
244using namespace OPENSUBDIV_VERSION;
│ │ │ │
245} // end namespace OpenSubdiv
│ │ │ │
246
│ │ │ │
247#endif /* OPENSUBDIV3_SDC_CREASE_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
Types, constants and utilities related to semi-sharp creasing – whose implementation is independent o...
Definition crease.h:62
│ │ │ │
float SubdivideVertexSharpness(float vertexSharpness) const
Definition crease.h:222
│ │ │ │
static bool IsInfinite(float sharpness)
Definition crease.h:72
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -316,19 +316,19 @@ │ │ │ │
float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const
Definition crease.h:216
│ │ │ │ │ │ │ │
float SharpenBoundaryEdge(float edgeSharpness) const
Definition crease.h:189
│ │ │ │
float ComputeFractionalWeightAtVertex(float vertexSharpness, float childVertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness, float const *childEdgesSharpness) const
Transitional weighting: When the rules applicable to a parent vertex and its child differ,...
│ │ │ │
float SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) const
│ │ │ │
static bool IsSharp(float sharpness)
Definition crease.h:71
│ │ │ │ │ │ │ │ -
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ - │ │ │ │ -
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
Definition options.h:101
│ │ │ │ -
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Get vertex boundary interpolation rule.
Definition options.h:89
│ │ │ │ - │ │ │ │ +
All supported options applying to subdivision scheme.
Definition options.h:51
│ │ │ │ + │ │ │ │ +
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
Definition options.h:101
│ │ │ │ +
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Get vertex boundary interpolation rule.
Definition options.h:89
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
159
│ │ │ │
160} // end namespace OPENSUBDIV_VERSION
│ │ │ │
161using namespace OPENSUBDIV_VERSION;
│ │ │ │
162} // end namespace OpenSubdiv
│ │ │ │
163
│ │ │ │
164#endif /* OPENSUBDIV3_SDC_BILINEAR_SCHEME_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │
@ SPLIT_TO_QUADS
Used by Catmark and Bilinear.
Definition types.h:48
│ │ │ │ │ │ │ │ │ │ │ │
void ComputeVertexVertexMask(VERTEX const &vertexNeighborhood, MASK &vertexVertexMask, Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease::RULE_UNKNOWN) const
Vertex-vertex masks If known, a single Rule or pair of Rules can be specified (indicating a crease tr...
Definition scheme.h:512
│ │ │ │
void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2, int const creaseEnds[2]) const
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
clVertexBuffer.h File Reference
│ │ │ │ +
cudaPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/opencl.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Crease
 Types, constants and utilities related to semi-sharp creasing – whose implementation is independent of the subdivision scheme. More...
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CLVertexBuffer
 Concrete vertex buffer class for OpenCL subdivision. More...
class  CudaPatchTable
 CUDA patch table. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -clVertexBuffer.h File Reference │ │ │ │ │ +cudaPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_c_l_._h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for OpenCL subdivision. _M_o_r_e_._._. │ │ │ │ │ +class   _C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +  CUDA patch table. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ +  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00788.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00788 = [ │ │ │ │ │ - ["CLVertexBuffer", "a01157.html", "a01157"] │ │ │ │ │ + ["CudaPatchTable", "a01189.html", "a01189"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
clVertexBuffer.h
│ │ │ │ +
cudaPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,95 +119,131 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include "../osd/opencl.h"
│ │ │ │ -
30
│ │ │ │ -
31namespace OpenSubdiv {
│ │ │ │ -
32namespace OPENSUBDIV_VERSION {
│ │ │ │ -
33
│ │ │ │ -
34namespace Osd {
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
29
│ │ │ │ +
30#include "../osd/nonCopyable.h"
│ │ │ │ +
31#include "../osd/types.h"
│ │ │ │ +
32
│ │ │ │ +
33#include <vector>
│ │ │ │ +
34
│ │ │ │ +
35namespace OpenSubdiv {
│ │ │ │ +
36namespace OPENSUBDIV_VERSION {
│ │ │ │ +
37
│ │ │ │ +
38namespace Far{
│ │ │ │ +
39 class PatchTable;
│ │ │ │ +
40};
│ │ │ │ +
41
│ │ │ │ +
42namespace Osd {
│ │ │ │
43
│ │ │ │ -
44public:
│ │ │ │ -
46 static CLVertexBuffer * Create(int numElements, int numVertices, cl_context clContext);
│ │ │ │ -
47
│ │ │ │ -
48 template <typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
49 static CLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ -
50 DEVICE_CONTEXT context) {
│ │ │ │ -
51 return Create(numElements, numVertices, context->GetContext());
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ - │ │ │ │ -
56
│ │ │ │ -
59 void UpdateData(const float *src, int startVertex, int numVertices, cl_command_queue clQueue,
│ │ │ │ -
60 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* endEvent = NULL);
│ │ │ │ +
│ │ │ │ +
51class CudaPatchTable : private NonCopyable<CudaPatchTable> {
│ │ │ │ +
52public:
│ │ │ │ +
54 static CudaPatchTable *Create(Far::PatchTable const *patchTable,
│ │ │ │ +
55 void *deviceContext = NULL);
│ │ │ │ + │ │ │ │ +
58
│ │ │ │ +
60 void *GetPatchArrayBuffer() const { return _patchArrays; }
│ │ │ │
61
│ │ │ │ -
62 template<typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
63 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ -
64 DEVICE_CONTEXT context,
│ │ │ │ -
65 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* endEvent = NULL) {
│ │ │ │ -
66 UpdateData(src, startVertex, numVertices, context->GetCommandQueue(), startEvents, numStartEvents, endEvent);
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
70 int GetNumElements() const;
│ │ │ │ -
71
│ │ │ │ -
73 int GetNumVertices() const;
│ │ │ │ -
74
│ │ │ │ -
76 cl_mem BindCLBuffer(cl_command_queue queue);
│ │ │ │ -
77
│ │ │ │ -
78protected:
│ │ │ │ -
80 CLVertexBuffer(int numElements, int numVertices, cl_context clContext);
│ │ │ │ -
81
│ │ │ │ -
84 bool allocate(cl_context clContext);
│ │ │ │ -
85
│ │ │ │ -
86private:
│ │ │ │ -
87 int _numElements;
│ │ │ │ -
88 int _numVertices;
│ │ │ │ -
89 cl_mem _clMemory;
│ │ │ │ -
90};
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92} // end namespace Osd
│ │ │ │ -
93
│ │ │ │ -
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
95using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
96
│ │ │ │ -
97} // end namespace OpenSubdiv
│ │ │ │ -
98
│ │ │ │ -
99#endif // OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ -
Concrete vertex buffer class for OpenCL subdivision.
│ │ │ │ -
void UpdateData(const float *src, int startVertex, int numVertices, DEVICE_CONTEXT context, cl_event *startEvents=NULL, unsigned int numStartEvents=0, cl_event *endEvent=NULL)
│ │ │ │ - │ │ │ │ -
CLVertexBuffer(int numElements, int numVertices, cl_context clContext)
Constructor.
│ │ │ │ -
void UpdateData(const float *src, int startVertex, int numVertices, cl_command_queue clQueue, cl_event *startEvents=NULL, unsigned int numStartEvents=0, cl_event *endEvent=NULL)
│ │ │ │ -
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ - │ │ │ │ -
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ -
static CLVertexBuffer * Create(int numElements, int numVertices, cl_context clContext)
Creator. Returns NULL if error.
│ │ │ │ -
static CLVertexBuffer * Create(int numElements, int numVertices, DEVICE_CONTEXT context)
│ │ │ │ -
cl_mem BindCLBuffer(cl_command_queue queue)
Returns the CL memory object.
│ │ │ │ +
63 void *GetPatchIndexBuffer() const { return _indexBuffer; }
│ │ │ │ +
64
│ │ │ │ +
66 void *GetPatchParamBuffer() const { return _patchParamBuffer; }
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
78 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
81 void *GetFVarPatchArrayBuffer(int fvarChannel) const {
│ │ │ │ +
82 return _fvarPatchArrays[fvarChannel];
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
86 void *GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ +
87 return _fvarIndexBuffers[fvarChannel];
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
91 void *GetFVarPatchParamBuffer(int fvarChannel = 0) const {
│ │ │ │ +
92 return _fvarParamBuffers[fvarChannel];
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95protected:
│ │ │ │ + │ │ │ │ +
97
│ │ │ │ +
98 bool allocate(Far::PatchTable const *patchTable);
│ │ │ │ +
99
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
103
│ │ │ │ + │ │ │ │ + │ │ │ │ +
106
│ │ │ │ +
107 std::vector<void *> _fvarPatchArrays;
│ │ │ │ +
108 std::vector<void *> _fvarIndexBuffers;
│ │ │ │ +
109 std::vector<void *> _fvarParamBuffers;
│ │ │ │ +
110};
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112} // end namespace Osd
│ │ │ │ +
113
│ │ │ │ +
114} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
115using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
116
│ │ │ │ +
117} // end namespace OpenSubdiv
│ │ │ │ +
118
│ │ │ │ +
119#endif // OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ +
void * GetFVarPatchArrayBuffer(int fvarChannel) const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ + │ │ │ │ +
static CudaPatchTable * Create(Far::PatchTable const *patchTable, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ + │ │ │ │ +
void * GetVaryingPatchIndexBuffer() const
Returns the cuda memory of the array of varying control vertices.
│ │ │ │ + │ │ │ │ +
void * GetVaryingPatchArrayBuffer() const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
void * GetPatchArrayBuffer() const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ + │ │ │ │ +
bool allocate(Far::PatchTable const *patchTable)
│ │ │ │ +
void * GetPatchIndexBuffer() const
Returns the cuda memory of the patch control vertices.
│ │ │ │ +
int GetNumFVarChannels() const
Returns the number of face-varying channels buffers.
│ │ │ │ + │ │ │ │ +
void * GetPatchParamBuffer() const
Returns the cuda memory of the array of Osd::PatchParam buffer.
│ │ │ │ +
void * GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the cuda memory of the array of face-varying control vertices.
│ │ │ │ +
void * GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the cuda memory of the array of face-varying param.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -clVertexBuffer.h │ │ │ │ │ +cudaPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,114 +24,167 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../osd/opencl.h" │ │ │ │ │ -30 │ │ │ │ │ -31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -32namespace OPENSUBDIV_VERSION { │ │ │ │ │ -33 │ │ │ │ │ -34namespace Osd { │ │ │ │ │ -35 │ │ │ │ │ -_4_2class _C_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +29 │ │ │ │ │ +30#include "../osd/nonCopyable.h" │ │ │ │ │ +31#include "../osd/types.h" │ │ │ │ │ +32 │ │ │ │ │ +33#include │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Far{ │ │ │ │ │ +39 class PatchTable; │ │ │ │ │ +40}; │ │ │ │ │ +41 │ │ │ │ │ +42namespace Osd { │ │ │ │ │ 43 │ │ │ │ │ -44public: │ │ │ │ │ -_4_6 static _C_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, cl_context │ │ │ │ │ -clContext); │ │ │ │ │ -47 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 static _C_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -50 DEVICE_CONTEXT context) { │ │ │ │ │ -51 return _C_r_e_a_t_e(numElements, numVertices, context->GetContext()); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_5 _~_C_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ -56 │ │ │ │ │ -_5_9 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -cl_command_queue clQueue, │ │ │ │ │ -60 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* │ │ │ │ │ -endEvent = NULL); │ │ │ │ │ +_5_1class _C_u_d_a_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ +52public: │ │ │ │ │ +_5_4 static _C_u_d_a_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable, │ │ │ │ │ +55 void *deviceContext = NULL); │ │ │ │ │ +_5_7 _~_C_u_d_a_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +58 │ │ │ │ │ +_6_0 void *_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { return ___p_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ 61 │ │ │ │ │ -62 template │ │ │ │ │ -_6_3 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -64 DEVICE_CONTEXT context, │ │ │ │ │ -65 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* │ │ │ │ │ -endEvent = NULL) { │ │ │ │ │ -66 _U_p_d_a_t_e_D_a_t_a(src, startVertex, numVertices, context->GetCommandQueue(), │ │ │ │ │ -startEvents, numStartEvents, endEvent); │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_7_0 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -71 │ │ │ │ │ -_7_3 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ -74 │ │ │ │ │ -_7_6 cl_mem _B_i_n_d_C_L_B_u_f_f_e_r(cl_command_queue queue); │ │ │ │ │ -77 │ │ │ │ │ -78protected: │ │ │ │ │ -_8_0 _C_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices, cl_context clContext); │ │ │ │ │ -81 │ │ │ │ │ -_8_4 bool _a_l_l_o_c_a_t_e(cl_context clContext); │ │ │ │ │ -85 │ │ │ │ │ -86private: │ │ │ │ │ -87 int _numElements; │ │ │ │ │ -88 int _numVertices; │ │ │ │ │ -89 cl_mem _clMemory; │ │ │ │ │ -90}; │ │ │ │ │ -91 │ │ │ │ │ -92} // end namespace Osd │ │ │ │ │ -93 │ │ │ │ │ -94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -96 │ │ │ │ │ -97} // end namespace OpenSubdiv │ │ │ │ │ -98 │ │ │ │ │ -99#endif // OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +_6_3 void *_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return ___i_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ +64 │ │ │ │ │ +_6_6 void *_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; } │ │ │ │ │ +67 │ │ │ │ │ +_6_9 void *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ +70 return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +71 } │ │ │ │ │ +_7_3 void *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +74 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +_7_8 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ +79 │ │ │ │ │ +_8_1 void *_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r(int fvarChannel) const { │ │ │ │ │ +82 return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_6 void *_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +87 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +_9_1 void *_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +92 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +95protected: │ │ │ │ │ +_9_6 _C_u_d_a_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +97 │ │ │ │ │ +_9_8 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable); │ │ │ │ │ +99 │ │ │ │ │ +_1_0_0 void *___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_1 void *___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_1_0_2 void *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 void *___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_5 void *___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +106 │ │ │ │ │ +_1_0_7 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_8 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ +_1_0_9 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ +110}; │ │ │ │ │ +111 │ │ │ │ │ +112} // end namespace Osd │ │ │ │ │ +113 │ │ │ │ │ +114} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +115using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +116 │ │ │ │ │ +117} // end namespace OpenSubdiv │ │ │ │ │ +118 │ │ │ │ │ +119#endif // OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for OpenCL subdivision. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ -void UpdateData(const float *src, int startVertex, int numVertices, │ │ │ │ │ -DEVICE_CONTEXT context, cl_event *startEvents=NULL, unsigned int │ │ │ │ │ -numStartEvents=0, cl_event *endEvent=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -~CLVertexBuffer() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CLVertexBuffer(int numElements, int numVertices, cl_context clContext) │ │ │ │ │ -Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ -void UpdateData(const float *src, int startVertex, int numVertices, │ │ │ │ │ -cl_command_queue clQueue, cl_event *startEvents=NULL, unsigned int │ │ │ │ │ -numStartEvents=0, cl_event *endEvent=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ -int GetNumElements() const │ │ │ │ │ -Returns how many elements defined in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(cl_context clContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumVertices() const │ │ │ │ │ -Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLVertexBuffer * Create(int numElements, int numVertices, cl_context │ │ │ │ │ -clContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +CUDA patch table. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +void * GetFVarPatchArrayBuffer(int fvarChannel) const │ │ │ │ │ +Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< void * > _fvarParamBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CudaPatchTable * Create(Far::PatchTable const *patchTable, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ Creator. Returns NULL if error. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLVertexBuffer * Create(int numElements, int numVertices, DEVICE_CONTEXT │ │ │ │ │ -context) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_L_B_u_f_f_e_r │ │ │ │ │ -cl_mem BindCLBuffer(cl_command_queue queue) │ │ │ │ │ -Returns the CL memory object. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +void * _varyingPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +void * GetVaryingPatchIndexBuffer() const │ │ │ │ │ +Returns the cuda memory of the array of varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< void * > _fvarIndexBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +void * GetVaryingPatchArrayBuffer() const │ │ │ │ │ +Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +void * _varyingIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_~_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~CudaPatchTable() │ │ │ │ │ +Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +void * GetPatchArrayBuffer() const │ │ │ │ │ +Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +std::vector< void * > _fvarPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(Far::PatchTable const *patchTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +void * GetPatchIndexBuffer() const │ │ │ │ │ +Returns the cuda memory of the patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int GetNumFVarChannels() const │ │ │ │ │ +Returns the number of face-varying channels buffers. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +void * _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +void * GetPatchParamBuffer() const │ │ │ │ │ +Returns the cuda memory of the array of Osd::PatchParam buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +void * GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the cuda memory of the array of face-varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +void * GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the cuda memory of the array of face-varying param. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_9_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +CudaPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +void * _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +void * _indexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00791.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,28 +90,30 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cudaPatchTable.h File Reference
│ │ │ │ +
cudaEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ #include <vector>
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CudaPatchTable
 CUDA patch table. More...
class  CudaStencilTable
 CUDA stencil table. More...
 
class  CudaEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -122,13 +124,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,30 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cudaPatchTable.h File Reference │ │ │ │ │ +cudaEvaluator.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ #include │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  CUDA patch table. _M_o_r_e_._._. │ │ │ │ │ +class   _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  CUDA stencil table. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _C_u_d_a_E_v_a_l_u_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00791.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00791 = [ │ │ │ │ │ - ["CudaPatchTable", "a01189.html", "a01189"] │ │ │ │ │ + ["CudaStencilTable", "a01181.html", "a01181"], │ │ │ │ │ + ["CudaEvaluator", "a01185.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00791_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cudaPatchTable.h
│ │ │ │ +
cudaEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,131 +119,582 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../osd/nonCopyable.h"
│ │ │ │ -
31#include "../osd/types.h"
│ │ │ │ -
32
│ │ │ │ -
33#include <vector>
│ │ │ │ -
34
│ │ │ │ -
35namespace OpenSubdiv {
│ │ │ │ -
36namespace OPENSUBDIV_VERSION {
│ │ │ │ -
37
│ │ │ │ -
38namespace Far{
│ │ │ │ -
39 class PatchTable;
│ │ │ │ -
40};
│ │ │ │ -
41
│ │ │ │ -
42namespace Osd {
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
51class CudaPatchTable : private NonCopyable<CudaPatchTable> {
│ │ │ │ -
52public:
│ │ │ │ -
54 static CudaPatchTable *Create(Far::PatchTable const *patchTable,
│ │ │ │ -
55 void *deviceContext = NULL);
│ │ │ │ - │ │ │ │ -
58
│ │ │ │ -
60 void *GetPatchArrayBuffer() const { return _patchArrays; }
│ │ │ │ -
61
│ │ │ │ -
63 void *GetPatchIndexBuffer() const { return _indexBuffer; }
│ │ │ │ +
30#include <vector>
│ │ │ │ +
31#include "../osd/bufferDescriptor.h"
│ │ │ │ +
32#include "../osd/types.h"
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Far {
│ │ │ │ +
38 class PatchTable;
│ │ │ │ +
39 class StencilTable;
│ │ │ │ +
40 class LimitStencilTable;
│ │ │ │ +
41}
│ │ │ │ +
42
│ │ │ │ +
43namespace Osd {
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53public:
│ │ │ │ +
│ │ │ │ +
54 static CudaStencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ +
55 void *deviceContext = NULL) {
│ │ │ │ +
56 (void)deviceContext; // unused
│ │ │ │ +
57 return new CudaStencilTable(stencilTable);
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
59 static CudaStencilTable *Create(Far::LimitStencilTable const *limitStencilTable,
│ │ │ │ +
60 void *deviceContext = NULL) {
│ │ │ │ +
61 (void)deviceContext; // unused
│ │ │ │ +
62 return new CudaStencilTable(limitStencilTable);
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │
64
│ │ │ │ -
66 void *GetPatchParamBuffer() const { return _patchParamBuffer; }
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
78 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 void *GetFVarPatchArrayBuffer(int fvarChannel) const {
│ │ │ │ -
82 return _fvarPatchArrays[fvarChannel];
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
86 void *GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ -
87 return _fvarIndexBuffers[fvarChannel];
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
91 void *GetFVarPatchParamBuffer(int fvarChannel = 0) const {
│ │ │ │ -
92 return _fvarParamBuffers[fvarChannel];
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95protected:
│ │ │ │ - │ │ │ │ -
97
│ │ │ │ -
98 bool allocate(Far::PatchTable const *patchTable);
│ │ │ │ -
99
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
103
│ │ │ │ - │ │ │ │ - │ │ │ │ -
106
│ │ │ │ -
107 std::vector<void *> _fvarPatchArrays;
│ │ │ │ -
108 std::vector<void *> _fvarIndexBuffers;
│ │ │ │ -
109 std::vector<void *> _fvarParamBuffers;
│ │ │ │ -
110};
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112} // end namespace Osd
│ │ │ │ -
113
│ │ │ │ -
114} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
115using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
116
│ │ │ │ -
117} // end namespace OpenSubdiv
│ │ │ │ -
118
│ │ │ │ -
119#endif // OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ -
void * GetFVarPatchArrayBuffer(int fvarChannel) const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ - │ │ │ │ -
static CudaPatchTable * Create(Far::PatchTable const *patchTable, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ - │ │ │ │ -
void * GetVaryingPatchIndexBuffer() const
Returns the cuda memory of the array of varying control vertices.
│ │ │ │ - │ │ │ │ -
void * GetVaryingPatchArrayBuffer() const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
void * GetPatchArrayBuffer() const
Returns the cuda memory of the array of Osd::PatchArray buffer.
│ │ │ │ - │ │ │ │ -
bool allocate(Far::PatchTable const *patchTable)
│ │ │ │ -
void * GetPatchIndexBuffer() const
Returns the cuda memory of the patch control vertices.
│ │ │ │ -
int GetNumFVarChannels() const
Returns the number of face-varying channels buffers.
│ │ │ │ - │ │ │ │ -
void * GetPatchParamBuffer() const
Returns the cuda memory of the array of Osd::PatchParam buffer.
│ │ │ │ -
void * GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the cuda memory of the array of face-varying control vertices.
│ │ │ │ -
void * GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the cuda memory of the array of face-varying param.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
65 explicit CudaStencilTable(Far::StencilTable const *stencilTable);
│ │ │ │ +
66 explicit CudaStencilTable(Far::LimitStencilTable const *limitStencilTable);
│ │ │ │ + │ │ │ │ +
68
│ │ │ │ +
69 // interfaces needed for CudaCompute
│ │ │ │ +
70 void *GetSizesBuffer() const { return _sizes; }
│ │ │ │ +
71 void *GetOffsetsBuffer() const { return _offsets; }
│ │ │ │ +
72 void *GetIndicesBuffer() const { return _indices; }
│ │ │ │ +
73 void *GetWeightsBuffer() const { return _weights; }
│ │ │ │ +
74 void *GetDuWeightsBuffer() const { return _duWeights; }
│ │ │ │ +
75 void *GetDvWeightsBuffer() const { return _dvWeights; }
│ │ │ │ +
76 void *GetDuuWeightsBuffer() const { return _duuWeights; }
│ │ │ │ +
77 void *GetDuvWeightsBuffer() const { return _duvWeights; }
│ │ │ │ +
78 void *GetDvvWeightsBuffer() const { return _dvvWeights; }
│ │ │ │ +
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
80
│ │ │ │ +
81private:
│ │ │ │ +
82 void * _sizes,
│ │ │ │ +
83 * _offsets,
│ │ │ │ +
84 * _indices,
│ │ │ │ +
85 * _weights,
│ │ │ │ +
86 * _duWeights,
│ │ │ │ +
87 * _dvWeights,
│ │ │ │ +
88 * _duuWeights,
│ │ │ │ +
89 * _duvWeights,
│ │ │ │ +
90 * _dvvWeights;
│ │ │ │ +
91 int _numStencils;
│ │ │ │ +
92};
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
95public:
│ │ │ │ +
101
│ │ │ │ +
125 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
126 static bool EvalStencils(
│ │ │ │ +
127 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
128 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
129 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
130 const void *instance = NULL,
│ │ │ │ +
131 void * deviceContext = NULL) {
│ │ │ │ +
132
│ │ │ │ +
133 (void)instance; // unused
│ │ │ │ +
134 (void)deviceContext; // unused
│ │ │ │ +
135 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
136 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
137 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ +
138 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
139 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ +
140 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ +
141 /*start = */ 0,
│ │ │ │ +
142 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
171 static bool EvalStencils(
│ │ │ │ +
172 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
173 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
174 const int * sizes,
│ │ │ │ +
175 const int * offsets,
│ │ │ │ +
176 const int * indices,
│ │ │ │ +
177 const float * weights,
│ │ │ │ +
178 int start, int end);
│ │ │ │ +
179
│ │ │ │ +
217 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
218 static bool EvalStencils(
│ │ │ │ +
219 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
220 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
221 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
222 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
223 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
224 const CudaEvaluator *instance = NULL,
│ │ │ │ +
225 void * deviceContext = NULL) {
│ │ │ │ +
226
│ │ │ │ +
227 (void)instance; // unused
│ │ │ │ +
228 (void)deviceContext; // unused
│ │ │ │ +
229
│ │ │ │ +
230 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
231 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
232 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
233 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
234 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ +
235 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
236 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ +
237 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ +
238 (float const *)stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
239 (float const *)stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
240 /*start = */ 0,
│ │ │ │ +
241 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
242 }
│ │ │ │ +
│ │ │ │ +
243
│ │ │ │ +
284 static bool EvalStencils(
│ │ │ │ +
285 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
286 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
287 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
288 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
289 const int * sizes,
│ │ │ │ +
290 const int * offsets,
│ │ │ │ +
291 const int * indices,
│ │ │ │ +
292 const float * weights,
│ │ │ │ +
293 const float * duWeights,
│ │ │ │ +
294 const float * dvWeights,
│ │ │ │ +
295 int start, int end);
│ │ │ │ +
296
│ │ │ │ +
352 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
353 static bool EvalStencils(
│ │ │ │ +
354 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
355 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
356 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
357 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
358 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
359 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
360 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
361 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
362 const CudaEvaluator *instance = NULL,
│ │ │ │ +
363 void * deviceContext = NULL) {
│ │ │ │ +
364
│ │ │ │ +
365 (void)instance; // unused
│ │ │ │ +
366 (void)deviceContext; // unused
│ │ │ │ +
367
│ │ │ │ +
368 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
369 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
370 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
371 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
372 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ +
373 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ +
374 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ +
375 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ +
376 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
377 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ +
378 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ +
379 (float const *)stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
380 (float const *)stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
381 (float const *)stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ +
382 (float const *)stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ +
383 (float const *)stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ +
384 /*start = */ 0,
│ │ │ │ +
385 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
386 }
│ │ │ │ +
│ │ │ │ +
387
│ │ │ │ +
449 static bool EvalStencils(
│ │ │ │ +
450 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
451 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
452 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
453 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
454 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ +
455 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ +
456 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ +
457 const int * sizes,
│ │ │ │ +
458 const int * offsets,
│ │ │ │ +
459 const int * indices,
│ │ │ │ +
460 const float * weights,
│ │ │ │ +
461 const float * duWeights,
│ │ │ │ +
462 const float * dvWeights,
│ │ │ │ +
463 const float * duuWeights,
│ │ │ │ +
464 const float * duvWeights,
│ │ │ │ +
465 const float * dvvWeights,
│ │ │ │ +
466 int start, int end);
│ │ │ │ +
467
│ │ │ │ +
473
│ │ │ │ +
502 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
503 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
504 static bool EvalPatches(
│ │ │ │ +
505 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
506 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
507 int numPatchCoords,
│ │ │ │ +
508 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
509 PATCH_TABLE *patchTable,
│ │ │ │ +
510 CudaEvaluator const *instance,
│ │ │ │ +
511 void * deviceContext = NULL) {
│ │ │ │ +
512
│ │ │ │ +
513 (void)instance; // unused
│ │ │ │ +
514 (void)deviceContext; // unused
│ │ │ │ +
515
│ │ │ │ +
516 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
517 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
518 numPatchCoords,
│ │ │ │ +
519 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
520 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
521 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
522 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
523 }
│ │ │ │ +
│ │ │ │ +
524
│ │ │ │ +
563 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
564 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
565 static bool EvalPatches(
│ │ │ │ +
566 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
567 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
568 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
569 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
570 int numPatchCoords,
│ │ │ │ +
571 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
572 PATCH_TABLE *patchTable,
│ │ │ │ +
573 CudaEvaluator const *instance,
│ │ │ │ +
574 void * deviceContext = NULL) {
│ │ │ │ +
575
│ │ │ │ +
576 (void)instance; // unused
│ │ │ │ +
577 (void)deviceContext; // unused
│ │ │ │ +
578
│ │ │ │ +
579 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
580 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
581 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
582 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
583 numPatchCoords,
│ │ │ │ +
584 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
585 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
586 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
587 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
588 }
│ │ │ │ +
│ │ │ │ +
589
│ │ │ │ +
646 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
647 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
648 static bool EvalPatches(
│ │ │ │ +
649 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
650 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
651 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
652 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
653 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
654 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
655 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
656 int numPatchCoords,
│ │ │ │ +
657 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
658 PATCH_TABLE *patchTable,
│ │ │ │ +
659 CudaEvaluator const *instance,
│ │ │ │ +
660 void * deviceContext = NULL) {
│ │ │ │ +
661
│ │ │ │ +
662 (void)instance; // unused
│ │ │ │ +
663 (void)deviceContext; // unused
│ │ │ │ +
664
│ │ │ │ +
665 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
666 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
667 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
668 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
669 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ +
670 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ +
671 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ +
672 numPatchCoords,
│ │ │ │ +
673 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
674 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
675 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
676 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
677 }
│ │ │ │ +
│ │ │ │ +
678
│ │ │ │ +
706 static bool EvalPatches(
│ │ │ │ +
707 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
708 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
709 int numPatchCoords,
│ │ │ │ +
710 const PatchCoord *patchCoords,
│ │ │ │ +
711 const PatchArray *patchArrays,
│ │ │ │ +
712 const int *patchIndices,
│ │ │ │ +
713 const PatchParam *patchParams);
│ │ │ │ +
714
│ │ │ │ +
752 static bool EvalPatches(
│ │ │ │ +
753 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
754 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
755 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
756 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
757 int numPatchCoords,
│ │ │ │ +
758 PatchCoord const *patchCoords,
│ │ │ │ +
759 PatchArray const *patchArrays,
│ │ │ │ +
760 const int *patchIndices,
│ │ │ │ +
761 PatchParam const *patchParams);
│ │ │ │ +
762
│ │ │ │ +
815 static bool EvalPatches(
│ │ │ │ +
816 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
817 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
818 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
819 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
820 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ +
821 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ +
822 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ +
823 int numPatchCoords,
│ │ │ │ +
824 PatchCoord const *patchCoords,
│ │ │ │ +
825 PatchArray const *patchArrays,
│ │ │ │ +
826 const int *patchIndices,
│ │ │ │ +
827 PatchParam const *patchParams);
│ │ │ │ +
828
│ │ │ │ +
857 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
858 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
860 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
861 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
862 int numPatchCoords,
│ │ │ │ +
863 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
864 PATCH_TABLE *patchTable,
│ │ │ │ +
865 CudaEvaluator const *instance,
│ │ │ │ +
866 void * deviceContext = NULL) {
│ │ │ │ +
867
│ │ │ │ +
868 (void)instance; // unused
│ │ │ │ +
869 (void)deviceContext; // unused
│ │ │ │ +
870
│ │ │ │ +
871 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
872 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
873 numPatchCoords,
│ │ │ │ +
874 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
875 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
876 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
877 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
878 }
│ │ │ │ +
│ │ │ │ +
879
│ │ │ │ +
920 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
921 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
923 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
924 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
925 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
926 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
927 int numPatchCoords,
│ │ │ │ +
928 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
929 PATCH_TABLE *patchTable,
│ │ │ │ +
930 CudaEvaluator const *instance,
│ │ │ │ +
931 void * deviceContext = NULL) {
│ │ │ │ +
932
│ │ │ │ +
933 (void)instance; // unused
│ │ │ │ +
934 (void)deviceContext; // unused
│ │ │ │ +
935
│ │ │ │ +
936 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
937 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
938 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
939 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
940 numPatchCoords,
│ │ │ │ +
941 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
942 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
943 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
944 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
945 }
│ │ │ │ +
│ │ │ │ +
946
│ │ │ │ +
1005 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1006 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1008 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1009 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1010 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1011 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1012 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1013 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1014 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1015 int numPatchCoords,
│ │ │ │ +
1016 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1017 PATCH_TABLE *patchTable,
│ │ │ │ +
1018 CudaEvaluator const *instance,
│ │ │ │ +
1019 void * deviceContext = NULL) {
│ │ │ │ +
1020
│ │ │ │ +
1021 (void)instance; // unused
│ │ │ │ +
1022 (void)deviceContext; // unused
│ │ │ │ +
1023
│ │ │ │ +
1024 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
1025 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
1026 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
1027 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
1028 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ +
1029 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ +
1030 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ +
1031 numPatchCoords,
│ │ │ │ +
1032 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
1033 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
1034 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1035 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ +
1036 }
│ │ │ │ +
│ │ │ │ +
1037
│ │ │ │ +
1068 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1069 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1071 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1072 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1073 int numPatchCoords,
│ │ │ │ +
1074 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1075 PATCH_TABLE *patchTable,
│ │ │ │ +
1076 int fvarChannel,
│ │ │ │ +
1077 CudaEvaluator const *instance,
│ │ │ │ +
1078 void * deviceContext = NULL) {
│ │ │ │ +
1079
│ │ │ │ +
1080 (void)instance; // unused
│ │ │ │ +
1081 (void)deviceContext; // unused
│ │ │ │ +
1082
│ │ │ │ +
1083 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
1084 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
1085 numPatchCoords,
│ │ │ │ +
1086 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
1087 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1088 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1089 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1090 }
│ │ │ │ +
│ │ │ │ +
1091
│ │ │ │ +
1134 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1135 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1137 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1138 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1139 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1140 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1141 int numPatchCoords,
│ │ │ │ +
1142 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1143 PATCH_TABLE *patchTable,
│ │ │ │ +
1144 int fvarChannel,
│ │ │ │ +
1145 CudaEvaluator const *instance,
│ │ │ │ +
1146 void * deviceContext = NULL) {
│ │ │ │ +
1147
│ │ │ │ +
1148 (void)instance; // unused
│ │ │ │ +
1149 (void)deviceContext; // unused
│ │ │ │ +
1150
│ │ │ │ +
1151 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
1152 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
1153 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
1154 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
1155 numPatchCoords,
│ │ │ │ +
1156 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
1157 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1158 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1159 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1160 }
│ │ │ │ +
│ │ │ │ +
1161
│ │ │ │ +
1222 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1223 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1225 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1226 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1227 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1228 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1229 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1230 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1231 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1232 int numPatchCoords,
│ │ │ │ +
1233 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1234 PATCH_TABLE *patchTable,
│ │ │ │ +
1235 int fvarChannel,
│ │ │ │ +
1236 CudaEvaluator const *instance,
│ │ │ │ +
1237 void * deviceContext = NULL) {
│ │ │ │ +
1238
│ │ │ │ +
1239 (void)instance; // unused
│ │ │ │ +
1240 (void)deviceContext; // unused
│ │ │ │ +
1241
│ │ │ │ +
1242 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ +
1243 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ +
1244 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ +
1245 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ +
1246 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ +
1247 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ +
1248 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ +
1249 numPatchCoords,
│ │ │ │ +
1250 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ +
1251 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1252 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1253 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1254 }
│ │ │ │ +
│ │ │ │ +
1255
│ │ │ │ +
1261 static void Synchronize(void *deviceContext = NULL);
│ │ │ │ +
1262};
│ │ │ │ +
│ │ │ │ +
1263
│ │ │ │ +
1264
│ │ │ │ +
1265} // end namespace Osd
│ │ │ │ +
1266
│ │ │ │ +
1267} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
1268using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
1269
│ │ │ │ +
1270} // end namespace OpenSubdiv
│ │ │ │ +
1271
│ │ │ │ +
1272
│ │ │ │ +
1273#endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │ + │ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
CudaStencilTable(Far::LimitStencilTable const *limitStencilTable)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static CudaStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
CudaStencilTable(Far::StencilTable const *stencilTable)
│ │ │ │ +
static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
│ │ │ │ + │ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndices, const PatchParam *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw cuda buffers for input and output.
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const void *instance=NULL, void *deviceContext=NULL)
Generic static compute function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, const float *duuWeights, const float *duvWeights, const float *dvvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
│ │ │ │ +
static void Synchronize(void *deviceContext=NULL)
│ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cudaPatchTable.h │ │ │ │ │ +cudaEvaluator.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,167 +24,737 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/nonCopyable.h" │ │ │ │ │ -31#include "../osd/types.h" │ │ │ │ │ -32 │ │ │ │ │ -33#include │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Far{ │ │ │ │ │ -39 class PatchTable; │ │ │ │ │ -40}; │ │ │ │ │ -41 │ │ │ │ │ -42namespace Osd { │ │ │ │ │ -43 │ │ │ │ │ -_5_1class _C_u_d_a_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ -52public: │ │ │ │ │ -_5_4 static _C_u_d_a_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable, │ │ │ │ │ -55 void *deviceContext = NULL); │ │ │ │ │ -_5_7 _~_C_u_d_a_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -58 │ │ │ │ │ -_6_0 void *_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { return ___p_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ -61 │ │ │ │ │ -_6_3 void *_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return ___i_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../osd/bufferDescriptor.h" │ │ │ │ │ +32#include "../osd/types.h" │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Far { │ │ │ │ │ +38 class PatchTable; │ │ │ │ │ +39 class StencilTable; │ │ │ │ │ +40 class LimitStencilTable; │ │ │ │ │ +41} │ │ │ │ │ +42 │ │ │ │ │ +43namespace Osd { │ │ │ │ │ +44 │ │ │ │ │ +_5_2class _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e { │ │ │ │ │ +53public: │ │ │ │ │ +_5_4 static _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ +55 void *deviceContext = NULL) { │ │ │ │ │ +56 (void)deviceContext; // unused │ │ │ │ │ +57 return new _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable); │ │ │ │ │ +58 } │ │ │ │ │ +_5_9 static _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ +*limitStencilTable, │ │ │ │ │ +60 void *deviceContext = NULL) { │ │ │ │ │ +61 (void)deviceContext; // unused │ │ │ │ │ +62 return new _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(limitStencilTable); │ │ │ │ │ +63 } │ │ │ │ │ 64 │ │ │ │ │ -_6_6 void *_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; } │ │ │ │ │ -67 │ │ │ │ │ -_6_9 void *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ -70 return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -71 } │ │ │ │ │ -_7_3 void *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -74 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -75 } │ │ │ │ │ -76 │ │ │ │ │ -_7_8 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 void *_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r(int fvarChannel) const { │ │ │ │ │ -82 return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_6 void *_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -87 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_1 void *_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -92 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -95protected: │ │ │ │ │ -_9_6 _C_u_d_a_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -97 │ │ │ │ │ -_9_8 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable); │ │ │ │ │ -99 │ │ │ │ │ -_1_0_0 void *___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_1 void *___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_1_0_2 void *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 void *___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_5 void *___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -106 │ │ │ │ │ -_1_0_7 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_8 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ -_1_0_9 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ -110}; │ │ │ │ │ -111 │ │ │ │ │ -112} // end namespace Osd │ │ │ │ │ -113 │ │ │ │ │ -114} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -115using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -116 │ │ │ │ │ -117} // end namespace OpenSubdiv │ │ │ │ │ -118 │ │ │ │ │ -119#endif // OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ +_6_5 explicit _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable); │ │ │ │ │ +_6_6 explicit _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable); │ │ │ │ │ +_6_7 _~_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ +68 │ │ │ │ │ +69 // interfaces needed for CudaCompute │ │ │ │ │ +_7_0 void *_G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizes; } │ │ │ │ │ +_7_1 void *_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsets; } │ │ │ │ │ +_7_2 void *_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indices; } │ │ │ │ │ +_7_3 void *_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weights; } │ │ │ │ │ +_7_4 void *_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeights; } │ │ │ │ │ +_7_5 void *_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeights; } │ │ │ │ │ +_7_6 void *_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeights; } │ │ │ │ │ +_7_7 void *_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeights; } │ │ │ │ │ +_7_8 void *_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeights; } │ │ │ │ │ +_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +80 │ │ │ │ │ +81private: │ │ │ │ │ +82 void * _sizes, │ │ │ │ │ +83 * _offsets, │ │ │ │ │ +84 * _indices, │ │ │ │ │ +85 * _weights, │ │ │ │ │ +86 * _duWeights, │ │ │ │ │ +87 * _dvWeights, │ │ │ │ │ +88 * _duuWeights, │ │ │ │ │ +89 * _duvWeights, │ │ │ │ │ +90 * _dvvWeights; │ │ │ │ │ +91 int _numStencils; │ │ │ │ │ +92}; │ │ │ │ │ +93 │ │ │ │ │ +_9_4class _C_u_d_a_E_v_a_l_u_a_t_o_r { │ │ │ │ │ +95public: │ │ │ │ │ +101 │ │ │ │ │ +125 template │ │ │ │ │ +_1_2_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +127 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +128 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +129 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +130 const void *instance = NULL, │ │ │ │ │ +131 void * deviceContext = NULL) { │ │ │ │ │ +132 │ │ │ │ │ +133 (void)instance; // unused │ │ │ │ │ +134 (void)deviceContext; // unused │ │ │ │ │ +135 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +136 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +137 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ +138 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +139 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ +140 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ +141 /*start = */ 0, │ │ │ │ │ +142 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +_1_7_1 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +172 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +173 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +174 const int * sizes, │ │ │ │ │ +175 const int * offsets, │ │ │ │ │ +176 const int * indices, │ │ │ │ │ +177 const float * weights, │ │ │ │ │ +178 int start, int end); │ │ │ │ │ +179 │ │ │ │ │ +217 template │ │ │ │ │ +_2_1_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +219 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +220 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +221 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +222 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +223 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +224 const _C_u_d_a_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ +225 void * deviceContext = NULL) { │ │ │ │ │ +226 │ │ │ │ │ +227 (void)instance; // unused │ │ │ │ │ +228 (void)deviceContext; // unused │ │ │ │ │ +229 │ │ │ │ │ +230 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +231 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +232 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +233 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +234 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ +235 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +236 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ +237 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ +238 (float const *)stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +239 (float const *)stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +240 /*start = */ 0, │ │ │ │ │ +241 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +242 } │ │ │ │ │ +243 │ │ │ │ │ +_2_8_4 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +285 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +286 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +287 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +288 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +289 const int * sizes, │ │ │ │ │ +290 const int * offsets, │ │ │ │ │ +291 const int * indices, │ │ │ │ │ +292 const float * weights, │ │ │ │ │ +293 const float * duWeights, │ │ │ │ │ +294 const float * dvWeights, │ │ │ │ │ +295 int start, int end); │ │ │ │ │ +296 │ │ │ │ │ +352 template │ │ │ │ │ +_3_5_3 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +354 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +355 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +356 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +357 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +358 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +359 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +360 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +361 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +362 const _C_u_d_a_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ +363 void * deviceContext = NULL) { │ │ │ │ │ +364 │ │ │ │ │ +365 (void)instance; // unused │ │ │ │ │ +366 (void)deviceContext; // unused │ │ │ │ │ +367 │ │ │ │ │ +368 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +369 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +370 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +371 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +372 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ +373 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ +374 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ +375 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ +376 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +377 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ +378 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ +379 (float const *)stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +380 (float const *)stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +381 (float const *)stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ +382 (float const *)stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ +383 (float const *)stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ +384 /*start = */ 0, │ │ │ │ │ +385 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +386 } │ │ │ │ │ +387 │ │ │ │ │ +_4_4_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +450 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +451 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +452 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +453 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +454 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +455 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +456 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +457 const int * sizes, │ │ │ │ │ +458 const int * offsets, │ │ │ │ │ +459 const int * indices, │ │ │ │ │ +460 const float * weights, │ │ │ │ │ +461 const float * duWeights, │ │ │ │ │ +462 const float * dvWeights, │ │ │ │ │ +463 const float * duuWeights, │ │ │ │ │ +464 const float * duvWeights, │ │ │ │ │ +465 const float * dvvWeights, │ │ │ │ │ +466 int start, int end); │ │ │ │ │ +467 │ │ │ │ │ +473 │ │ │ │ │ +502 template │ │ │ │ │ +_5_0_4 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +505 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +506 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +507 int numPatchCoords, │ │ │ │ │ +508 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +509 PATCH_TABLE *patchTable, │ │ │ │ │ +510 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +511 void * deviceContext = NULL) { │ │ │ │ │ +512 │ │ │ │ │ +513 (void)instance; // unused │ │ │ │ │ +514 (void)deviceContext; // unused │ │ │ │ │ +515 │ │ │ │ │ +516 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +517 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +518 numPatchCoords, │ │ │ │ │ +519 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +520 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +521 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +522 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +523 } │ │ │ │ │ +524 │ │ │ │ │ +563 template │ │ │ │ │ +_5_6_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +566 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +567 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +568 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +569 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +570 int numPatchCoords, │ │ │ │ │ +571 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +572 PATCH_TABLE *patchTable, │ │ │ │ │ +573 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +574 void * deviceContext = NULL) { │ │ │ │ │ +575 │ │ │ │ │ +576 (void)instance; // unused │ │ │ │ │ +577 (void)deviceContext; // unused │ │ │ │ │ +578 │ │ │ │ │ +579 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +580 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +581 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +582 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +583 numPatchCoords, │ │ │ │ │ +584 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +585 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +586 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +587 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +588 } │ │ │ │ │ +589 │ │ │ │ │ +646 template │ │ │ │ │ +_6_4_8 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +649 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +650 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +651 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +652 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +653 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +654 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +655 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +656 int numPatchCoords, │ │ │ │ │ +657 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +658 PATCH_TABLE *patchTable, │ │ │ │ │ +659 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +660 void * deviceContext = NULL) { │ │ │ │ │ +661 │ │ │ │ │ +662 (void)instance; // unused │ │ │ │ │ +663 (void)deviceContext; // unused │ │ │ │ │ +664 │ │ │ │ │ +665 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +666 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +667 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +668 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +669 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ +670 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ +671 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ +672 numPatchCoords, │ │ │ │ │ +673 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +674 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +675 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +676 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +677 } │ │ │ │ │ +678 │ │ │ │ │ +_7_0_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +707 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +708 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +709 int numPatchCoords, │ │ │ │ │ +710 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ +711 const _P_a_t_c_h_A_r_r_a_y *patchArrays, │ │ │ │ │ +712 const int *patchIndices, │ │ │ │ │ +713 const _P_a_t_c_h_P_a_r_a_m *patchParams); │ │ │ │ │ +714 │ │ │ │ │ +_7_5_2 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +753 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +754 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +755 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +756 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +757 int numPatchCoords, │ │ │ │ │ +758 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ +759 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ +760 const int *patchIndices, │ │ │ │ │ +761 _P_a_t_c_h_P_a_r_a_m const *patchParams); │ │ │ │ │ +762 │ │ │ │ │ +_8_1_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +816 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +817 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +818 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +819 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +820 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +821 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +822 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +823 int numPatchCoords, │ │ │ │ │ +824 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ +825 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ +826 const int *patchIndices, │ │ │ │ │ +827 _P_a_t_c_h_P_a_r_a_m const *patchParams); │ │ │ │ │ +828 │ │ │ │ │ +857 template │ │ │ │ │ +_8_5_9 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +860 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +861 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +862 int numPatchCoords, │ │ │ │ │ +863 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +864 PATCH_TABLE *patchTable, │ │ │ │ │ +865 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +866 void * deviceContext = NULL) { │ │ │ │ │ +867 │ │ │ │ │ +868 (void)instance; // unused │ │ │ │ │ +869 (void)deviceContext; // unused │ │ │ │ │ +870 │ │ │ │ │ +871 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +872 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +873 numPatchCoords, │ │ │ │ │ +874 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +875 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +876 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +877 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +878 } │ │ │ │ │ +879 │ │ │ │ │ +920 template │ │ │ │ │ +_9_2_2 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +923 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +924 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +925 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +926 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +927 int numPatchCoords, │ │ │ │ │ +928 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +929 PATCH_TABLE *patchTable, │ │ │ │ │ +930 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +931 void * deviceContext = NULL) { │ │ │ │ │ +932 │ │ │ │ │ +933 (void)instance; // unused │ │ │ │ │ +934 (void)deviceContext; // unused │ │ │ │ │ +935 │ │ │ │ │ +936 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +937 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +938 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +939 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +940 numPatchCoords, │ │ │ │ │ +941 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +942 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +943 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +944 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +945 } │ │ │ │ │ +946 │ │ │ │ │ +1005 template │ │ │ │ │ +_1_0_0_7 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1008 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1009 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1010 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1011 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1012 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1013 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1014 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1015 int numPatchCoords, │ │ │ │ │ +1016 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1017 PATCH_TABLE *patchTable, │ │ │ │ │ +1018 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1019 void * deviceContext = NULL) { │ │ │ │ │ +1020 │ │ │ │ │ +1021 (void)instance; // unused │ │ │ │ │ +1022 (void)deviceContext; // unused │ │ │ │ │ +1023 │ │ │ │ │ +1024 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +1025 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +1026 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +1027 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +1028 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ +1029 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ +1030 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ +1031 numPatchCoords, │ │ │ │ │ +1032 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +1033 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +1034 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1035 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1036 } │ │ │ │ │ +1037 │ │ │ │ │ +1068 template │ │ │ │ │ +_1_0_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1071 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1072 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1073 int numPatchCoords, │ │ │ │ │ +1074 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1075 PATCH_TABLE *patchTable, │ │ │ │ │ +1076 int fvarChannel, │ │ │ │ │ +1077 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1078 void * deviceContext = NULL) { │ │ │ │ │ +1079 │ │ │ │ │ +1080 (void)instance; // unused │ │ │ │ │ +1081 (void)deviceContext; // unused │ │ │ │ │ +1082 │ │ │ │ │ +1083 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +1084 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +1085 numPatchCoords, │ │ │ │ │ +1086 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +1087 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1088 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1089 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1090 } │ │ │ │ │ +1091 │ │ │ │ │ +1134 template │ │ │ │ │ +_1_1_3_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1137 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1138 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1139 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1140 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1141 int numPatchCoords, │ │ │ │ │ +1142 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1143 PATCH_TABLE *patchTable, │ │ │ │ │ +1144 int fvarChannel, │ │ │ │ │ +1145 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1146 void * deviceContext = NULL) { │ │ │ │ │ +1147 │ │ │ │ │ +1148 (void)instance; // unused │ │ │ │ │ +1149 (void)deviceContext; // unused │ │ │ │ │ +1150 │ │ │ │ │ +1151 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +1152 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +1153 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +1154 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +1155 numPatchCoords, │ │ │ │ │ +1156 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +1157 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1158 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1159 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1160 } │ │ │ │ │ +1161 │ │ │ │ │ +1222 template │ │ │ │ │ +_1_2_2_4 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1225 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1226 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1227 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1228 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1229 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1230 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1231 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1232 int numPatchCoords, │ │ │ │ │ +1233 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1234 PATCH_TABLE *patchTable, │ │ │ │ │ +1235 int fvarChannel, │ │ │ │ │ +1236 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1237 void * deviceContext = NULL) { │ │ │ │ │ +1238 │ │ │ │ │ +1239 (void)instance; // unused │ │ │ │ │ +1240 (void)deviceContext; // unused │ │ │ │ │ +1241 │ │ │ │ │ +1242 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ +1243 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ +1244 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ +1245 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ +1246 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ +1247 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ +1248 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ +1249 numPatchCoords, │ │ │ │ │ +1250 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ +1251 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1252 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1253 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1254 } │ │ │ │ │ +1255 │ │ │ │ │ +_1_2_6_1 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext = NULL); │ │ │ │ │ +1262}; │ │ │ │ │ +1263 │ │ │ │ │ +1264 │ │ │ │ │ +1265} // end namespace Osd │ │ │ │ │ +1266 │ │ │ │ │ +1267} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +1268using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +1269 │ │ │ │ │ +1270} // end namespace OpenSubdiv │ │ │ │ │ +1271 │ │ │ │ │ +1272 │ │ │ │ │ +1273#endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -CUDA patch table. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -void * GetFVarPatchArrayBuffer(int fvarChannel) const │ │ │ │ │ -Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< void * > _fvarParamBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CudaPatchTable * Create(Far::PatchTable const *patchTable, void │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +CUDA stencil table. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetDuvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +~CudaStencilTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetDuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetDvvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetOffsetsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +CudaStencilTable(Far::LimitStencilTable const *limitStencilTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetDvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetDuuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +void * GetWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CudaStencilTable * Create(Far::LimitStencilTable const │ │ │ │ │ +*limitStencilTable, void *deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ +void * GetSizesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ +void * GetIndicesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +CudaStencilTable(Far::StencilTable const *stencilTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void │ │ │ │ │ *deviceContext=NULL) │ │ │ │ │ -Creator. Returns NULL if error. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -void * _varyingPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -void * GetVaryingPatchIndexBuffer() const │ │ │ │ │ -Returns the cuda memory of the array of varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< void * > _fvarIndexBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -void * GetVaryingPatchArrayBuffer() const │ │ │ │ │ -Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -void * _varyingIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_~_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~CudaPatchTable() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -void * GetPatchArrayBuffer() const │ │ │ │ │ -Returns the cuda memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -std::vector< void * > _fvarPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(Far::PatchTable const *patchTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -void * GetPatchIndexBuffer() const │ │ │ │ │ -Returns the cuda memory of the patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int GetNumFVarChannels() const │ │ │ │ │ -Returns the number of face-varying channels buffers. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -void * _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -void * GetPatchParamBuffer() const │ │ │ │ │ -Returns the cuda memory of the array of Osd::PatchParam buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -void * GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the cuda memory of the array of face-varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -void * GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the cuda memory of the array of face-varying param. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_9_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -CudaPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -void * _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -void * _indexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_1 │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_9_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const │ │ │ │ │ +PatchCoord *patchCoords, const PatchArray *patchArrays, const int │ │ │ │ │ +*patchIndices, const PatchParam *patchParams) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_9_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_6_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +const CudaEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_3_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, int start, int end) │ │ │ │ │ +Static eval stencils function which takes raw cuda buffers for input and │ │ │ │ │ +output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ +CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_8_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const │ │ │ │ │ +CudaEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_2_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ +BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ +float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord │ │ │ │ │ +const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, │ │ │ │ │ +PatchParam const *patchParams) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const │ │ │ │ │ +*instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_1_3_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ +const *stencilTable, const void *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static compute function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_2_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ +const float *dvWeights, int start, int end) │ │ │ │ │ +Static eval stencils function with derivatives, which takes raw cuda pointers │ │ │ │ │ +for input and output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ +BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ +float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ +const float *dvWeights, const float *duuWeights, const float *duvWeights, const │ │ │ │ │ +float *dvvWeights, int start, int end) │ │ │ │ │ +Static eval stencils function with derivatives, which takes raw cuda pointers │ │ │ │ │ +for input and output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +static void Synchronize(void *deviceContext=NULL) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, │ │ │ │ │ +PatchCoord const *patchCoords, PatchArray const *patchArrays, const int │ │ │ │ │ +*patchIndices, PatchParam const *patchParams) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const │ │ │ │ │ +*instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_0_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const │ │ │ │ │ +*instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_0_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ +CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_2_2_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_0_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ +Coordinates set on a patch table. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/clVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,47 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cudaEvaluator.h File Reference
│ │ │ │ +
clVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ +#include "../osd/opencl.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CudaStencilTable
 CUDA stencil table. More...
 
class  CudaEvaluator
class  CLVertexBuffer
 Concrete vertex buffer class for OpenCL subdivision. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cudaEvaluator.h File Reference │ │ │ │ │ +clVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_o_p_e_n_c_l_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  CUDA stencil table. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _C_u_d_a_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for OpenCL subdivision. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00794 = [ │ │ │ │ │ - ["CudaStencilTable", "a01181.html", "a01181"], │ │ │ │ │ - ["CudaEvaluator", "a01185.html", null] │ │ │ │ │ + ["CLVertexBuffer", "a01157.html", "a01157"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/clVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cudaEvaluator.h
│ │ │ │ +
clVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,582 +119,95 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include <vector>
│ │ │ │ -
31#include "../osd/bufferDescriptor.h"
│ │ │ │ -
32#include "../osd/types.h"
│ │ │ │ +
29#include "../osd/opencl.h"
│ │ │ │ +
30
│ │ │ │ +
31namespace OpenSubdiv {
│ │ │ │ +
32namespace OPENSUBDIV_VERSION {
│ │ │ │
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Far {
│ │ │ │ -
38 class PatchTable;
│ │ │ │ -
39 class StencilTable;
│ │ │ │ -
40 class LimitStencilTable;
│ │ │ │ -
41}
│ │ │ │ -
42
│ │ │ │ -
43namespace Osd {
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53public:
│ │ │ │ -
│ │ │ │ -
54 static CudaStencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ -
55 void *deviceContext = NULL) {
│ │ │ │ -
56 (void)deviceContext; // unused
│ │ │ │ -
57 return new CudaStencilTable(stencilTable);
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
59 static CudaStencilTable *Create(Far::LimitStencilTable const *limitStencilTable,
│ │ │ │ -
60 void *deviceContext = NULL) {
│ │ │ │ -
61 (void)deviceContext; // unused
│ │ │ │ -
62 return new CudaStencilTable(limitStencilTable);
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 explicit CudaStencilTable(Far::StencilTable const *stencilTable);
│ │ │ │ -
66 explicit CudaStencilTable(Far::LimitStencilTable const *limitStencilTable);
│ │ │ │ - │ │ │ │ +
34namespace Osd {
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43
│ │ │ │ +
44public:
│ │ │ │ +
46 static CLVertexBuffer * Create(int numElements, int numVertices, cl_context clContext);
│ │ │ │ +
47
│ │ │ │ +
48 template <typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
49 static CLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
50 DEVICE_CONTEXT context) {
│ │ │ │ +
51 return Create(numElements, numVertices, context->GetContext());
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ + │ │ │ │ +
56
│ │ │ │ +
59 void UpdateData(const float *src, int startVertex, int numVertices, cl_command_queue clQueue,
│ │ │ │ +
60 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* endEvent = NULL);
│ │ │ │ +
61
│ │ │ │ +
62 template<typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
63 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
64 DEVICE_CONTEXT context,
│ │ │ │ +
65 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* endEvent = NULL) {
│ │ │ │ +
66 UpdateData(src, startVertex, numVertices, context->GetCommandQueue(), startEvents, numStartEvents, endEvent);
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │
68
│ │ │ │ -
69 // interfaces needed for CudaCompute
│ │ │ │ -
70 void *GetSizesBuffer() const { return _sizes; }
│ │ │ │ -
71 void *GetOffsetsBuffer() const { return _offsets; }
│ │ │ │ -
72 void *GetIndicesBuffer() const { return _indices; }
│ │ │ │ -
73 void *GetWeightsBuffer() const { return _weights; }
│ │ │ │ -
74 void *GetDuWeightsBuffer() const { return _duWeights; }
│ │ │ │ -
75 void *GetDvWeightsBuffer() const { return _dvWeights; }
│ │ │ │ -
76 void *GetDuuWeightsBuffer() const { return _duuWeights; }
│ │ │ │ -
77 void *GetDuvWeightsBuffer() const { return _duvWeights; }
│ │ │ │ -
78 void *GetDvvWeightsBuffer() const { return _dvvWeights; }
│ │ │ │ -
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ -
80
│ │ │ │ -
81private:
│ │ │ │ -
82 void * _sizes,
│ │ │ │ -
83 * _offsets,
│ │ │ │ -
84 * _indices,
│ │ │ │ -
85 * _weights,
│ │ │ │ -
86 * _duWeights,
│ │ │ │ -
87 * _dvWeights,
│ │ │ │ -
88 * _duuWeights,
│ │ │ │ -
89 * _duvWeights,
│ │ │ │ -
90 * _dvvWeights;
│ │ │ │ -
91 int _numStencils;
│ │ │ │ -
92};
│ │ │ │ +
70 int GetNumElements() const;
│ │ │ │ +
71
│ │ │ │ +
73 int GetNumVertices() const;
│ │ │ │ +
74
│ │ │ │ +
76 cl_mem BindCLBuffer(cl_command_queue queue);
│ │ │ │ +
77
│ │ │ │ +
78protected:
│ │ │ │ +
80 CLVertexBuffer(int numElements, int numVertices, cl_context clContext);
│ │ │ │ +
81
│ │ │ │ +
84 bool allocate(cl_context clContext);
│ │ │ │ +
85
│ │ │ │ +
86private:
│ │ │ │ +
87 int _numElements;
│ │ │ │ +
88 int _numVertices;
│ │ │ │ +
89 cl_mem _clMemory;
│ │ │ │ +
90};
│ │ │ │
│ │ │ │ +
91
│ │ │ │ +
92} // end namespace Osd
│ │ │ │
93
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
95public:
│ │ │ │ -
101
│ │ │ │ -
125 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
126 static bool EvalStencils(
│ │ │ │ -
127 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
128 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
129 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
130 const void *instance = NULL,
│ │ │ │ -
131 void * deviceContext = NULL) {
│ │ │ │ -
132
│ │ │ │ -
133 (void)instance; // unused
│ │ │ │ -
134 (void)deviceContext; // unused
│ │ │ │ -
135 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
136 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
137 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ -
138 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
139 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ -
140 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ -
141 /*start = */ 0,
│ │ │ │ -
142 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
171 static bool EvalStencils(
│ │ │ │ -
172 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
173 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
174 const int * sizes,
│ │ │ │ -
175 const int * offsets,
│ │ │ │ -
176 const int * indices,
│ │ │ │ -
177 const float * weights,
│ │ │ │ -
178 int start, int end);
│ │ │ │ -
179
│ │ │ │ -
217 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
218 static bool EvalStencils(
│ │ │ │ -
219 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
220 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
221 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
222 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
223 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
224 const CudaEvaluator *instance = NULL,
│ │ │ │ -
225 void * deviceContext = NULL) {
│ │ │ │ -
226
│ │ │ │ -
227 (void)instance; // unused
│ │ │ │ -
228 (void)deviceContext; // unused
│ │ │ │ -
229
│ │ │ │ -
230 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
231 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
232 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
233 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
234 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ -
235 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
236 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ -
237 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ -
238 (float const *)stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
239 (float const *)stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
240 /*start = */ 0,
│ │ │ │ -
241 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
242 }
│ │ │ │ -
│ │ │ │ -
243
│ │ │ │ -
284 static bool EvalStencils(
│ │ │ │ -
285 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
286 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
287 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
288 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
289 const int * sizes,
│ │ │ │ -
290 const int * offsets,
│ │ │ │ -
291 const int * indices,
│ │ │ │ -
292 const float * weights,
│ │ │ │ -
293 const float * duWeights,
│ │ │ │ -
294 const float * dvWeights,
│ │ │ │ -
295 int start, int end);
│ │ │ │ -
296
│ │ │ │ -
352 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
353 static bool EvalStencils(
│ │ │ │ -
354 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
355 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
356 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
357 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
358 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
359 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
360 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
361 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
362 const CudaEvaluator *instance = NULL,
│ │ │ │ -
363 void * deviceContext = NULL) {
│ │ │ │ -
364
│ │ │ │ -
365 (void)instance; // unused
│ │ │ │ -
366 (void)deviceContext; // unused
│ │ │ │ -
367
│ │ │ │ -
368 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
369 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
370 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
371 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
372 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ -
373 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ -
374 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ -
375 (int const *)stencilTable->GetSizesBuffer(),
│ │ │ │ -
376 (int const *)stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
377 (int const *)stencilTable->GetIndicesBuffer(),
│ │ │ │ -
378 (float const *)stencilTable->GetWeightsBuffer(),
│ │ │ │ -
379 (float const *)stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
380 (float const *)stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
381 (float const *)stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ -
382 (float const *)stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ -
383 (float const *)stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ -
384 /*start = */ 0,
│ │ │ │ -
385 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
386 }
│ │ │ │ -
│ │ │ │ -
387
│ │ │ │ -
449 static bool EvalStencils(
│ │ │ │ -
450 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
451 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
452 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
453 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
454 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ -
455 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ -
456 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ -
457 const int * sizes,
│ │ │ │ -
458 const int * offsets,
│ │ │ │ -
459 const int * indices,
│ │ │ │ -
460 const float * weights,
│ │ │ │ -
461 const float * duWeights,
│ │ │ │ -
462 const float * dvWeights,
│ │ │ │ -
463 const float * duuWeights,
│ │ │ │ -
464 const float * duvWeights,
│ │ │ │ -
465 const float * dvvWeights,
│ │ │ │ -
466 int start, int end);
│ │ │ │ -
467
│ │ │ │ -
473
│ │ │ │ -
502 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
503 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
504 static bool EvalPatches(
│ │ │ │ -
505 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
506 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
507 int numPatchCoords,
│ │ │ │ -
508 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
509 PATCH_TABLE *patchTable,
│ │ │ │ -
510 CudaEvaluator const *instance,
│ │ │ │ -
511 void * deviceContext = NULL) {
│ │ │ │ -
512
│ │ │ │ -
513 (void)instance; // unused
│ │ │ │ -
514 (void)deviceContext; // unused
│ │ │ │ -
515
│ │ │ │ -
516 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
517 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
518 numPatchCoords,
│ │ │ │ -
519 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
520 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
521 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
522 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
523 }
│ │ │ │ -
│ │ │ │ -
524
│ │ │ │ -
563 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
564 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
565 static bool EvalPatches(
│ │ │ │ -
566 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
567 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
568 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
569 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
570 int numPatchCoords,
│ │ │ │ -
571 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
572 PATCH_TABLE *patchTable,
│ │ │ │ -
573 CudaEvaluator const *instance,
│ │ │ │ -
574 void * deviceContext = NULL) {
│ │ │ │ -
575
│ │ │ │ -
576 (void)instance; // unused
│ │ │ │ -
577 (void)deviceContext; // unused
│ │ │ │ -
578
│ │ │ │ -
579 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
580 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
581 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
582 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
583 numPatchCoords,
│ │ │ │ -
584 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
585 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
586 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
587 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
588 }
│ │ │ │ -
│ │ │ │ -
589
│ │ │ │ -
646 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
647 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
648 static bool EvalPatches(
│ │ │ │ -
649 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
650 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
651 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
652 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
653 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
654 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
655 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
656 int numPatchCoords,
│ │ │ │ -
657 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
658 PATCH_TABLE *patchTable,
│ │ │ │ -
659 CudaEvaluator const *instance,
│ │ │ │ -
660 void * deviceContext = NULL) {
│ │ │ │ -
661
│ │ │ │ -
662 (void)instance; // unused
│ │ │ │ -
663 (void)deviceContext; // unused
│ │ │ │ -
664
│ │ │ │ -
665 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
666 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
667 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
668 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
669 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ -
670 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ -
671 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ -
672 numPatchCoords,
│ │ │ │ -
673 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
674 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
675 (const int *)patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
676 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
677 }
│ │ │ │ -
│ │ │ │ -
678
│ │ │ │ -
706 static bool EvalPatches(
│ │ │ │ -
707 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
708 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
709 int numPatchCoords,
│ │ │ │ -
710 const PatchCoord *patchCoords,
│ │ │ │ -
711 const PatchArray *patchArrays,
│ │ │ │ -
712 const int *patchIndices,
│ │ │ │ -
713 const PatchParam *patchParams);
│ │ │ │ -
714
│ │ │ │ -
752 static bool EvalPatches(
│ │ │ │ -
753 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
754 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
755 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
756 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
757 int numPatchCoords,
│ │ │ │ -
758 PatchCoord const *patchCoords,
│ │ │ │ -
759 PatchArray const *patchArrays,
│ │ │ │ -
760 const int *patchIndices,
│ │ │ │ -
761 PatchParam const *patchParams);
│ │ │ │ -
762
│ │ │ │ -
815 static bool EvalPatches(
│ │ │ │ -
816 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
817 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
818 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
819 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
820 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ -
821 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ -
822 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ -
823 int numPatchCoords,
│ │ │ │ -
824 PatchCoord const *patchCoords,
│ │ │ │ -
825 PatchArray const *patchArrays,
│ │ │ │ -
826 const int *patchIndices,
│ │ │ │ -
827 PatchParam const *patchParams);
│ │ │ │ -
828
│ │ │ │ -
857 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
858 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
860 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
861 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
862 int numPatchCoords,
│ │ │ │ -
863 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
864 PATCH_TABLE *patchTable,
│ │ │ │ -
865 CudaEvaluator const *instance,
│ │ │ │ -
866 void * deviceContext = NULL) {
│ │ │ │ -
867
│ │ │ │ -
868 (void)instance; // unused
│ │ │ │ -
869 (void)deviceContext; // unused
│ │ │ │ -
870
│ │ │ │ -
871 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
872 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
873 numPatchCoords,
│ │ │ │ -
874 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
875 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
876 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
877 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
878 }
│ │ │ │ -
│ │ │ │ -
879
│ │ │ │ -
920 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
921 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
923 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
924 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
925 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
926 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
927 int numPatchCoords,
│ │ │ │ -
928 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
929 PATCH_TABLE *patchTable,
│ │ │ │ -
930 CudaEvaluator const *instance,
│ │ │ │ -
931 void * deviceContext = NULL) {
│ │ │ │ -
932
│ │ │ │ -
933 (void)instance; // unused
│ │ │ │ -
934 (void)deviceContext; // unused
│ │ │ │ -
935
│ │ │ │ -
936 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
937 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
938 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
939 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
940 numPatchCoords,
│ │ │ │ -
941 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
942 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
943 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
944 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
945 }
│ │ │ │ -
│ │ │ │ -
946
│ │ │ │ -
1005 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1006 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1008 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1009 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1010 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1011 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1012 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1013 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1014 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1015 int numPatchCoords,
│ │ │ │ -
1016 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1017 PATCH_TABLE *patchTable,
│ │ │ │ -
1018 CudaEvaluator const *instance,
│ │ │ │ -
1019 void * deviceContext = NULL) {
│ │ │ │ -
1020
│ │ │ │ -
1021 (void)instance; // unused
│ │ │ │ -
1022 (void)deviceContext; // unused
│ │ │ │ -
1023
│ │ │ │ -
1024 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
1025 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
1026 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
1027 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
1028 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ -
1029 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ -
1030 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ -
1031 numPatchCoords,
│ │ │ │ -
1032 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
1033 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
1034 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1035 (const PatchParam *)patchTable->GetPatchParamBuffer());
│ │ │ │ -
1036 }
│ │ │ │ -
│ │ │ │ -
1037
│ │ │ │ -
1068 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1069 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1071 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1072 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1073 int numPatchCoords,
│ │ │ │ -
1074 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1075 PATCH_TABLE *patchTable,
│ │ │ │ -
1076 int fvarChannel,
│ │ │ │ -
1077 CudaEvaluator const *instance,
│ │ │ │ -
1078 void * deviceContext = NULL) {
│ │ │ │ -
1079
│ │ │ │ -
1080 (void)instance; // unused
│ │ │ │ -
1081 (void)deviceContext; // unused
│ │ │ │ -
1082
│ │ │ │ -
1083 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
1084 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
1085 numPatchCoords,
│ │ │ │ -
1086 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
1087 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1088 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1089 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1090 }
│ │ │ │ -
│ │ │ │ -
1091
│ │ │ │ -
1134 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1135 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1137 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1138 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1139 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1140 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1141 int numPatchCoords,
│ │ │ │ -
1142 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1143 PATCH_TABLE *patchTable,
│ │ │ │ -
1144 int fvarChannel,
│ │ │ │ -
1145 CudaEvaluator const *instance,
│ │ │ │ -
1146 void * deviceContext = NULL) {
│ │ │ │ -
1147
│ │ │ │ -
1148 (void)instance; // unused
│ │ │ │ -
1149 (void)deviceContext; // unused
│ │ │ │ -
1150
│ │ │ │ -
1151 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
1152 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
1153 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
1154 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
1155 numPatchCoords,
│ │ │ │ -
1156 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
1157 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1158 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1159 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1160 }
│ │ │ │ -
│ │ │ │ -
1161
│ │ │ │ -
1222 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1223 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1225 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1226 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1227 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1228 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1229 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1230 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1231 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1232 int numPatchCoords,
│ │ │ │ -
1233 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1234 PATCH_TABLE *patchTable,
│ │ │ │ -
1235 int fvarChannel,
│ │ │ │ -
1236 CudaEvaluator const *instance,
│ │ │ │ -
1237 void * deviceContext = NULL) {
│ │ │ │ -
1238
│ │ │ │ -
1239 (void)instance; // unused
│ │ │ │ -
1240 (void)deviceContext; // unused
│ │ │ │ -
1241
│ │ │ │ -
1242 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
│ │ │ │ -
1243 dstBuffer->BindCudaBuffer(), dstDesc,
│ │ │ │ -
1244 duBuffer->BindCudaBuffer(), duDesc,
│ │ │ │ -
1245 dvBuffer->BindCudaBuffer(), dvDesc,
│ │ │ │ -
1246 duuBuffer->BindCudaBuffer(), duuDesc,
│ │ │ │ -
1247 duvBuffer->BindCudaBuffer(), duvDesc,
│ │ │ │ -
1248 dvvBuffer->BindCudaBuffer(), dvvDesc,
│ │ │ │ -
1249 numPatchCoords,
│ │ │ │ -
1250 (const PatchCoord *)patchCoords->BindCudaBuffer(),
│ │ │ │ -
1251 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1252 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1253 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1254 }
│ │ │ │ -
│ │ │ │ -
1255
│ │ │ │ -
1261 static void Synchronize(void *deviceContext = NULL);
│ │ │ │ -
1262};
│ │ │ │ -
│ │ │ │ -
1263
│ │ │ │ -
1264
│ │ │ │ -
1265} // end namespace Osd
│ │ │ │ -
1266
│ │ │ │ -
1267} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
1268using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
1269
│ │ │ │ -
1270} // end namespace OpenSubdiv
│ │ │ │ -
1271
│ │ │ │ -
1272
│ │ │ │ -
1273#endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
CudaStencilTable(Far::LimitStencilTable const *limitStencilTable)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static CudaStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
CudaStencilTable(Far::StencilTable const *stencilTable)
│ │ │ │ -
static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
│ │ │ │ - │ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndices, const PatchParam *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw cuda buffers for input and output.
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const void *instance=NULL, void *deviceContext=NULL)
Generic static compute function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, const float *duuWeights, const float *duvWeights, const float *dvvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
│ │ │ │ -
static void Synchronize(void *deviceContext=NULL)
│ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ - │ │ │ │ - │ │ │ │ +
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
95using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
96
│ │ │ │ +
97} // end namespace OpenSubdiv
│ │ │ │ +
98
│ │ │ │ +
99#endif // OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ + │ │ │ │ +
Concrete vertex buffer class for OpenCL subdivision.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, DEVICE_CONTEXT context, cl_event *startEvents=NULL, unsigned int numStartEvents=0, cl_event *endEvent=NULL)
│ │ │ │ + │ │ │ │ +
CLVertexBuffer(int numElements, int numVertices, cl_context clContext)
Constructor.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, cl_command_queue clQueue, cl_event *startEvents=NULL, unsigned int numStartEvents=0, cl_event *endEvent=NULL)
│ │ │ │ +
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ + │ │ │ │ +
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ +
static CLVertexBuffer * Create(int numElements, int numVertices, cl_context clContext)
Creator. Returns NULL if error.
│ │ │ │ +
static CLVertexBuffer * Create(int numElements, int numVertices, DEVICE_CONTEXT context)
│ │ │ │ +
cl_mem BindCLBuffer(cl_command_queue queue)
Returns the CL memory object.
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cudaEvaluator.h │ │ │ │ │ +clVertexBuffer.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,737 +24,114 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include │ │ │ │ │ -31#include "../osd/bufferDescriptor.h" │ │ │ │ │ -32#include "../osd/types.h" │ │ │ │ │ +29#include "../osd/opencl.h" │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ 33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 class PatchTable; │ │ │ │ │ -39 class StencilTable; │ │ │ │ │ -40 class LimitStencilTable; │ │ │ │ │ -41} │ │ │ │ │ -42 │ │ │ │ │ -43namespace Osd { │ │ │ │ │ -44 │ │ │ │ │ -_5_2class _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e { │ │ │ │ │ -53public: │ │ │ │ │ -_5_4 static _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ -55 void *deviceContext = NULL) { │ │ │ │ │ -56 (void)deviceContext; // unused │ │ │ │ │ -57 return new _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable); │ │ │ │ │ -58 } │ │ │ │ │ -_5_9 static _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ -*limitStencilTable, │ │ │ │ │ -60 void *deviceContext = NULL) { │ │ │ │ │ -61 (void)deviceContext; // unused │ │ │ │ │ -62 return new _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(limitStencilTable); │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -_6_5 explicit _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable); │ │ │ │ │ -_6_6 explicit _C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable); │ │ │ │ │ -_6_7 _~_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ +34namespace Osd { │ │ │ │ │ +35 │ │ │ │ │ +_4_2class _C_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +43 │ │ │ │ │ +44public: │ │ │ │ │ +_4_6 static _C_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, cl_context │ │ │ │ │ +clContext); │ │ │ │ │ +47 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 static _C_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +50 DEVICE_CONTEXT context) { │ │ │ │ │ +51 return _C_r_e_a_t_e(numElements, numVertices, context->GetContext()); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_5 _~_C_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ +56 │ │ │ │ │ +_5_9 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +cl_command_queue clQueue, │ │ │ │ │ +60 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* │ │ │ │ │ +endEvent = NULL); │ │ │ │ │ +61 │ │ │ │ │ +62 template │ │ │ │ │ +_6_3 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +64 DEVICE_CONTEXT context, │ │ │ │ │ +65 cl_event* startEvents = NULL, unsigned int numStartEvents = 0, cl_event* │ │ │ │ │ +endEvent = NULL) { │ │ │ │ │ +66 _U_p_d_a_t_e_D_a_t_a(src, startVertex, numVertices, context->GetCommandQueue(), │ │ │ │ │ +startEvents, numStartEvents, endEvent); │ │ │ │ │ +67 } │ │ │ │ │ 68 │ │ │ │ │ -69 // interfaces needed for CudaCompute │ │ │ │ │ -_7_0 void *_G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizes; } │ │ │ │ │ -_7_1 void *_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsets; } │ │ │ │ │ -_7_2 void *_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indices; } │ │ │ │ │ -_7_3 void *_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weights; } │ │ │ │ │ -_7_4 void *_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeights; } │ │ │ │ │ -_7_5 void *_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeights; } │ │ │ │ │ -_7_6 void *_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeights; } │ │ │ │ │ -_7_7 void *_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeights; } │ │ │ │ │ -_7_8 void *_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeights; } │ │ │ │ │ -_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ -80 │ │ │ │ │ -81private: │ │ │ │ │ -82 void * _sizes, │ │ │ │ │ -83 * _offsets, │ │ │ │ │ -84 * _indices, │ │ │ │ │ -85 * _weights, │ │ │ │ │ -86 * _duWeights, │ │ │ │ │ -87 * _dvWeights, │ │ │ │ │ -88 * _duuWeights, │ │ │ │ │ -89 * _duvWeights, │ │ │ │ │ -90 * _dvvWeights; │ │ │ │ │ -91 int _numStencils; │ │ │ │ │ -92}; │ │ │ │ │ +_7_0 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +71 │ │ │ │ │ +_7_3 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +74 │ │ │ │ │ +_7_6 cl_mem _B_i_n_d_C_L_B_u_f_f_e_r(cl_command_queue queue); │ │ │ │ │ +77 │ │ │ │ │ +78protected: │ │ │ │ │ +_8_0 _C_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices, cl_context clContext); │ │ │ │ │ +81 │ │ │ │ │ +_8_4 bool _a_l_l_o_c_a_t_e(cl_context clContext); │ │ │ │ │ +85 │ │ │ │ │ +86private: │ │ │ │ │ +87 int _numElements; │ │ │ │ │ +88 int _numVertices; │ │ │ │ │ +89 cl_mem _clMemory; │ │ │ │ │ +90}; │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace Osd │ │ │ │ │ 93 │ │ │ │ │ -_9_4class _C_u_d_a_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -95public: │ │ │ │ │ -101 │ │ │ │ │ -125 template │ │ │ │ │ -_1_2_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -127 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -128 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -129 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -130 const void *instance = NULL, │ │ │ │ │ -131 void * deviceContext = NULL) { │ │ │ │ │ -132 │ │ │ │ │ -133 (void)instance; // unused │ │ │ │ │ -134 (void)deviceContext; // unused │ │ │ │ │ -135 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -136 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -137 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ -138 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -139 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ -140 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ -141 /*start = */ 0, │ │ │ │ │ -142 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -_1_7_1 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -172 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -173 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -174 const int * sizes, │ │ │ │ │ -175 const int * offsets, │ │ │ │ │ -176 const int * indices, │ │ │ │ │ -177 const float * weights, │ │ │ │ │ -178 int start, int end); │ │ │ │ │ -179 │ │ │ │ │ -217 template │ │ │ │ │ -_2_1_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -219 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -220 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -221 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -222 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -223 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -224 const _C_u_d_a_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -225 void * deviceContext = NULL) { │ │ │ │ │ -226 │ │ │ │ │ -227 (void)instance; // unused │ │ │ │ │ -228 (void)deviceContext; // unused │ │ │ │ │ -229 │ │ │ │ │ -230 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -231 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -232 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -233 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -234 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ -235 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -236 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ -237 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ -238 (float const *)stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -239 (float const *)stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -240 /*start = */ 0, │ │ │ │ │ -241 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -242 } │ │ │ │ │ -243 │ │ │ │ │ -_2_8_4 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -285 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -286 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -287 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -288 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -289 const int * sizes, │ │ │ │ │ -290 const int * offsets, │ │ │ │ │ -291 const int * indices, │ │ │ │ │ -292 const float * weights, │ │ │ │ │ -293 const float * duWeights, │ │ │ │ │ -294 const float * dvWeights, │ │ │ │ │ -295 int start, int end); │ │ │ │ │ -296 │ │ │ │ │ -352 template │ │ │ │ │ -_3_5_3 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -354 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -355 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -356 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -357 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -358 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -359 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -360 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -361 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -362 const _C_u_d_a_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -363 void * deviceContext = NULL) { │ │ │ │ │ -364 │ │ │ │ │ -365 (void)instance; // unused │ │ │ │ │ -366 (void)deviceContext; // unused │ │ │ │ │ -367 │ │ │ │ │ -368 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -369 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -370 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -371 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -372 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ -373 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ -374 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ -375 (int const *)stencilTable->GetSizesBuffer(), │ │ │ │ │ -376 (int const *)stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -377 (int const *)stencilTable->GetIndicesBuffer(), │ │ │ │ │ -378 (float const *)stencilTable->GetWeightsBuffer(), │ │ │ │ │ -379 (float const *)stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -380 (float const *)stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -381 (float const *)stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ -382 (float const *)stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ -383 (float const *)stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ -384 /*start = */ 0, │ │ │ │ │ -385 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -386 } │ │ │ │ │ -387 │ │ │ │ │ -_4_4_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -450 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -451 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -452 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -453 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -454 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -455 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -456 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -457 const int * sizes, │ │ │ │ │ -458 const int * offsets, │ │ │ │ │ -459 const int * indices, │ │ │ │ │ -460 const float * weights, │ │ │ │ │ -461 const float * duWeights, │ │ │ │ │ -462 const float * dvWeights, │ │ │ │ │ -463 const float * duuWeights, │ │ │ │ │ -464 const float * duvWeights, │ │ │ │ │ -465 const float * dvvWeights, │ │ │ │ │ -466 int start, int end); │ │ │ │ │ -467 │ │ │ │ │ -473 │ │ │ │ │ -502 template │ │ │ │ │ -_5_0_4 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -505 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -506 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -507 int numPatchCoords, │ │ │ │ │ -508 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -509 PATCH_TABLE *patchTable, │ │ │ │ │ -510 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -511 void * deviceContext = NULL) { │ │ │ │ │ -512 │ │ │ │ │ -513 (void)instance; // unused │ │ │ │ │ -514 (void)deviceContext; // unused │ │ │ │ │ -515 │ │ │ │ │ -516 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -517 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -518 numPatchCoords, │ │ │ │ │ -519 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -520 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -521 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -522 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -523 } │ │ │ │ │ -524 │ │ │ │ │ -563 template │ │ │ │ │ -_5_6_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -566 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -567 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -568 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -569 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -570 int numPatchCoords, │ │ │ │ │ -571 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -572 PATCH_TABLE *patchTable, │ │ │ │ │ -573 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -574 void * deviceContext = NULL) { │ │ │ │ │ -575 │ │ │ │ │ -576 (void)instance; // unused │ │ │ │ │ -577 (void)deviceContext; // unused │ │ │ │ │ -578 │ │ │ │ │ -579 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -580 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -581 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -582 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -583 numPatchCoords, │ │ │ │ │ -584 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -585 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -586 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -587 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -588 } │ │ │ │ │ -589 │ │ │ │ │ -646 template │ │ │ │ │ -_6_4_8 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -649 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -650 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -651 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -652 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -653 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -654 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -655 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -656 int numPatchCoords, │ │ │ │ │ -657 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -658 PATCH_TABLE *patchTable, │ │ │ │ │ -659 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -660 void * deviceContext = NULL) { │ │ │ │ │ -661 │ │ │ │ │ -662 (void)instance; // unused │ │ │ │ │ -663 (void)deviceContext; // unused │ │ │ │ │ -664 │ │ │ │ │ -665 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -666 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -667 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -668 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -669 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ -670 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ -671 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ -672 numPatchCoords, │ │ │ │ │ -673 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -674 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -675 (const int *)patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -676 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -677 } │ │ │ │ │ -678 │ │ │ │ │ -_7_0_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -707 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -708 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -709 int numPatchCoords, │ │ │ │ │ -710 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ -711 const _P_a_t_c_h_A_r_r_a_y *patchArrays, │ │ │ │ │ -712 const int *patchIndices, │ │ │ │ │ -713 const _P_a_t_c_h_P_a_r_a_m *patchParams); │ │ │ │ │ -714 │ │ │ │ │ -_7_5_2 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -753 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -754 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -755 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -756 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -757 int numPatchCoords, │ │ │ │ │ -758 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ -759 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ -760 const int *patchIndices, │ │ │ │ │ -761 _P_a_t_c_h_P_a_r_a_m const *patchParams); │ │ │ │ │ -762 │ │ │ │ │ -_8_1_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -816 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -817 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -818 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -819 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -820 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -821 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -822 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -823 int numPatchCoords, │ │ │ │ │ -824 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ -825 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ -826 const int *patchIndices, │ │ │ │ │ -827 _P_a_t_c_h_P_a_r_a_m const *patchParams); │ │ │ │ │ -828 │ │ │ │ │ -857 template │ │ │ │ │ -_8_5_9 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -860 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -861 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -862 int numPatchCoords, │ │ │ │ │ -863 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -864 PATCH_TABLE *patchTable, │ │ │ │ │ -865 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -866 void * deviceContext = NULL) { │ │ │ │ │ -867 │ │ │ │ │ -868 (void)instance; // unused │ │ │ │ │ -869 (void)deviceContext; // unused │ │ │ │ │ -870 │ │ │ │ │ -871 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -872 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -873 numPatchCoords, │ │ │ │ │ -874 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -875 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -876 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -877 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -878 } │ │ │ │ │ -879 │ │ │ │ │ -920 template │ │ │ │ │ -_9_2_2 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -923 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -924 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -925 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -926 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -927 int numPatchCoords, │ │ │ │ │ -928 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -929 PATCH_TABLE *patchTable, │ │ │ │ │ -930 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -931 void * deviceContext = NULL) { │ │ │ │ │ -932 │ │ │ │ │ -933 (void)instance; // unused │ │ │ │ │ -934 (void)deviceContext; // unused │ │ │ │ │ -935 │ │ │ │ │ -936 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -937 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -938 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -939 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -940 numPatchCoords, │ │ │ │ │ -941 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -942 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -943 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -944 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -945 } │ │ │ │ │ -946 │ │ │ │ │ -1005 template │ │ │ │ │ -_1_0_0_7 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1008 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1009 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1010 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1011 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1012 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1013 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1014 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1015 int numPatchCoords, │ │ │ │ │ -1016 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1017 PATCH_TABLE *patchTable, │ │ │ │ │ -1018 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1019 void * deviceContext = NULL) { │ │ │ │ │ -1020 │ │ │ │ │ -1021 (void)instance; // unused │ │ │ │ │ -1022 (void)deviceContext; // unused │ │ │ │ │ -1023 │ │ │ │ │ -1024 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -1025 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -1026 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -1027 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -1028 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ -1029 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ -1030 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ -1031 numPatchCoords, │ │ │ │ │ -1032 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -1033 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -1034 (const int *)patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1035 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1036 } │ │ │ │ │ -1037 │ │ │ │ │ -1068 template │ │ │ │ │ -_1_0_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1071 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1072 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1073 int numPatchCoords, │ │ │ │ │ -1074 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1075 PATCH_TABLE *patchTable, │ │ │ │ │ -1076 int fvarChannel, │ │ │ │ │ -1077 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1078 void * deviceContext = NULL) { │ │ │ │ │ -1079 │ │ │ │ │ -1080 (void)instance; // unused │ │ │ │ │ -1081 (void)deviceContext; // unused │ │ │ │ │ -1082 │ │ │ │ │ -1083 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -1084 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -1085 numPatchCoords, │ │ │ │ │ -1086 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -1087 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1088 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1089 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1090 } │ │ │ │ │ -1091 │ │ │ │ │ -1134 template │ │ │ │ │ -_1_1_3_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1137 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1138 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1139 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1140 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1141 int numPatchCoords, │ │ │ │ │ -1142 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1143 PATCH_TABLE *patchTable, │ │ │ │ │ -1144 int fvarChannel, │ │ │ │ │ -1145 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1146 void * deviceContext = NULL) { │ │ │ │ │ -1147 │ │ │ │ │ -1148 (void)instance; // unused │ │ │ │ │ -1149 (void)deviceContext; // unused │ │ │ │ │ -1150 │ │ │ │ │ -1151 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -1152 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -1153 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -1154 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -1155 numPatchCoords, │ │ │ │ │ -1156 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -1157 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1158 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1159 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1160 } │ │ │ │ │ -1161 │ │ │ │ │ -1222 template │ │ │ │ │ -_1_2_2_4 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1225 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1226 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1227 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1228 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1229 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1230 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1231 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1232 int numPatchCoords, │ │ │ │ │ -1233 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1234 PATCH_TABLE *patchTable, │ │ │ │ │ -1235 int fvarChannel, │ │ │ │ │ -1236 _C_u_d_a_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1237 void * deviceContext = NULL) { │ │ │ │ │ -1238 │ │ │ │ │ -1239 (void)instance; // unused │ │ │ │ │ -1240 (void)deviceContext; // unused │ │ │ │ │ -1241 │ │ │ │ │ -1242 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCudaBuffer(), srcDesc, │ │ │ │ │ -1243 dstBuffer->BindCudaBuffer(), dstDesc, │ │ │ │ │ -1244 duBuffer->BindCudaBuffer(), duDesc, │ │ │ │ │ -1245 dvBuffer->BindCudaBuffer(), dvDesc, │ │ │ │ │ -1246 duuBuffer->BindCudaBuffer(), duuDesc, │ │ │ │ │ -1247 duvBuffer->BindCudaBuffer(), duvDesc, │ │ │ │ │ -1248 dvvBuffer->BindCudaBuffer(), dvvDesc, │ │ │ │ │ -1249 numPatchCoords, │ │ │ │ │ -1250 (const _P_a_t_c_h_C_o_o_r_d *)patchCoords->BindCudaBuffer(), │ │ │ │ │ -1251 (const _P_a_t_c_h_A_r_r_a_y *)patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1252 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1253 (const _P_a_t_c_h_P_a_r_a_m *)patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1254 } │ │ │ │ │ -1255 │ │ │ │ │ -_1_2_6_1 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext = NULL); │ │ │ │ │ -1262}; │ │ │ │ │ -1263 │ │ │ │ │ -1264 │ │ │ │ │ -1265} // end namespace Osd │ │ │ │ │ -1266 │ │ │ │ │ -1267} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -1268using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -1269 │ │ │ │ │ -1270} // end namespace OpenSubdiv │ │ │ │ │ -1271 │ │ │ │ │ -1272 │ │ │ │ │ -1273#endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ +94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +96 │ │ │ │ │ +97} // end namespace OpenSubdiv │ │ │ │ │ +98 │ │ │ │ │ +99#endif // OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -CUDA stencil table. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetDuvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -~CudaStencilTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetDuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetDvvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetOffsetsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -CudaStencilTable(Far::LimitStencilTable const *limitStencilTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetDvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetDuuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -void * GetWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CudaStencilTable * Create(Far::LimitStencilTable const │ │ │ │ │ -*limitStencilTable, void *deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ -void * GetSizesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ -void * GetIndicesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -CudaStencilTable(Far::StencilTable const *stencilTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_9_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const │ │ │ │ │ -PatchCoord *patchCoords, const PatchArray *patchArrays, const int │ │ │ │ │ -*patchIndices, const PatchParam *patchParams) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_9_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_6_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -const CudaEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_3_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, int start, int end) │ │ │ │ │ -Static eval stencils function which takes raw cuda buffers for input and │ │ │ │ │ -output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ -CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_8_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const │ │ │ │ │ -CudaEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_2_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ -BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ -float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord │ │ │ │ │ -const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, │ │ │ │ │ -PatchParam const *patchParams) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const │ │ │ │ │ -*instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_1_3_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ -const *stencilTable, const void *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static compute function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_2_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ -const float *dvWeights, int start, int end) │ │ │ │ │ -Static eval stencils function with derivatives, which takes raw cuda pointers │ │ │ │ │ -for input and output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ -BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ -float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ -const float *dvWeights, const float *duuWeights, const float *duvWeights, const │ │ │ │ │ -float *dvvWeights, int start, int end) │ │ │ │ │ -Static eval stencils function with derivatives, which takes raw cuda pointers │ │ │ │ │ -for input and output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(void *deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, │ │ │ │ │ -PatchCoord const *patchCoords, PatchArray const *patchArrays, const int │ │ │ │ │ -*patchIndices, PatchParam const *patchParams) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const │ │ │ │ │ -*instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_0_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const │ │ │ │ │ -*instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_0_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ -CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_2_2_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_5_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_u_d_a_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_E_v_a_l_u_a_t_o_r_._h_:_1_0_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ -Coordinates set on a patch table. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for OpenCL subdivision. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ +void UpdateData(const float *src, int startVertex, int numVertices, │ │ │ │ │ +DEVICE_CONTEXT context, cl_event *startEvents=NULL, unsigned int │ │ │ │ │ +numStartEvents=0, cl_event *endEvent=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +~CLVertexBuffer() │ │ │ │ │ +Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CLVertexBuffer(int numElements, int numVertices, cl_context clContext) │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ +void UpdateData(const float *src, int startVertex, int numVertices, │ │ │ │ │ +cl_command_queue clQueue, cl_event *startEvents=NULL, unsigned int │ │ │ │ │ +numStartEvents=0, cl_event *endEvent=NULL) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ +int GetNumElements() const │ │ │ │ │ +Returns how many elements defined in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(cl_context clContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumVertices() const │ │ │ │ │ +Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CLVertexBuffer * Create(int numElements, int numVertices, cl_context │ │ │ │ │ +clContext) │ │ │ │ │ +Creator. Returns NULL if error. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CLVertexBuffer * Create(int numElements, int numVertices, DEVICE_CONTEXT │ │ │ │ │ +context) │ │ │ │ │ +DDeeffiinniittiioonn _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_L_B_u_f_f_e_r │ │ │ │ │ +cl_mem BindCLBuffer(cl_command_queue queue) │ │ │ │ │ +Returns the CL memory object. │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │
113
│ │ │ │
114} // end namespace OPENSUBDIV_VERSION
│ │ │ │
115using namespace OPENSUBDIV_VERSION;
│ │ │ │
116
│ │ │ │
117} // end namespace OpenSubdiv
│ │ │ │
118
│ │ │ │
119#endif // OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ + │ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
cl_mem GetPatchParamBuffer() const
Returns the CL memory of the array of Osd::PatchParam buffer.
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ │ Namespaces │ │ │ │
clEvaluator.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../osd/opencl.h"
│ │ │ │ #include "../osd/types.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ @@ -1324,18 +1324,18 @@ │ │ │ │
2630} // end namespace OPENSUBDIV_VERSION
│ │ │ │
2631using namespace OPENSUBDIV_VERSION;
│ │ │ │
2632
│ │ │ │
2633} // end namespace OpenSubdiv
│ │ │ │
2634
│ │ │ │
2635
│ │ │ │
2636#endif // OPENSUBDIV3_OSD_CL_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ │ │ │ │ │ │ │ │
CLStencilTable(Far::StencilTable const *stencilTable, cl_context clContext)
│ │ │ │ │ │ │ │
static CLStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, DEVICE_CONTEXT context)
Definition clEvaluator.h:61
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlCommon.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,25 +90,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mtlCommon.h File Reference
│ │ │ │ +
mtlPatchShaderSource.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include "../version.h"
│ │ │ │ -#include <cstddef>
│ │ │ │ +
import "../version.h"
│ │ │ │ +import "../far/patchDescriptor.h"
│ │ │ │ +import <string>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  CLStencilTable
 OpenCL stencil table. More...
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MTLContext
class  MTLPatchShaderSource
 Provides shader source which can be used by client code. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -117,13 +119,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlCommon.h File Reference │ │ │ │ │ -#include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +mtlPatchShaderSource.h File Reference │ │ │ │ │ +import "../version.h" │ │ │ │ │ +import "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +import │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _M_T_L_C_o_n_t_e_x_t │ │ │ │ │ +class   _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +  Provides shader source which can be used by client code. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ + * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00806.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00806 = [ │ │ │ │ │ - ["MTLContext", "a01285.html", "a01285"] │ │ │ │ │ + ["MTLPatchShaderSource", "a01301.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlCommon.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mtlCommon.h
│ │ │ │ +
mtlPatchShaderSource.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,53 +119,82 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │
27
│ │ │ │ -
28#include "../version.h"
│ │ │ │ +
28#import "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <cstddef>
│ │ │ │ +
30#import "../far/patchDescriptor.h"
│ │ │ │
31
│ │ │ │ -
32@protocol MTLDevice;
│ │ │ │ -
33@protocol MTLCommandQueue;
│ │ │ │ -
34
│ │ │ │ -
35namespace OpenSubdiv {
│ │ │ │ -
36namespace OPENSUBDIV_VERSION {
│ │ │ │ -
37
│ │ │ │ -
38namespace Osd {
│ │ │ │ -
39
│ │ │ │ +
32#import <string>
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Osd {
│ │ │ │ +
38
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
41public:
│ │ │ │ -
42 id<MTLDevice> device = nullptr;
│ │ │ │ -
43 id<MTLCommandQueue> commandQueue = nullptr;
│ │ │ │ -
44};
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46} // end namespace Osd
│ │ │ │ -
47
│ │ │ │ -
48} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
49using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
50
│ │ │ │ -
51} // end namespace OpenSubdiv
│ │ │ │ -
52
│ │ │ │ -
53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
45 static std::string GetPatchBasisShaderSource();
│ │ │ │ +
46
│ │ │ │ +
50 static std::string GetPatchDrawingShaderSource();
│ │ │ │ +
51
│ │ │ │ +
59
│ │ │ │ +
60 static std::string GetCommonShaderSource();
│ │ │ │ +
61
│ │ │ │ + │ │ │ │ +
63
│ │ │ │ + │ │ │ │ +
65
│ │ │ │ + │ │ │ │ +
67
│ │ │ │ +
72 static std::string GetVertexShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
75 static std::string GetHullShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
78 static std::string GetDomainShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
81
│ │ │ │ +
83
│ │ │ │ +
84};
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86} // end namespace Osd
│ │ │ │ +
87
│ │ │ │ +
88} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
89using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
90
│ │ │ │ +
91} // end namespace OpenSubdiv
│ │ │ │ +
92
│ │ │ │ +
93#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Provides shader source which can be used by client code.
│ │ │ │ +
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetPatchDrawingShaderSource()
Returns shader source which can be used while drawing piecewise parametric patches resulting from sub...
│ │ │ │ +
static std::string GetHullShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
│ │ │ │ +
static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
Deprecated.
│ │ │ │ +
static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
│ │ │ │ +
static std::string GetHullShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetPatchBasisShaderSource()
Returns shader source which can be used to evaluate position and first and second derivatives on piec...
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlCommon.h │ │ │ │ │ +mtlPatchShaderSource.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,50 +24,102 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ 27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ +28#import "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ +30#import "../far/patchDescriptor.h" │ │ │ │ │ 31 │ │ │ │ │ -32@protocol MTLDevice; │ │ │ │ │ -33@protocol MTLCommandQueue; │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Osd { │ │ │ │ │ -39 │ │ │ │ │ -_4_0class _M_T_L_C_o_n_t_e_x_t { │ │ │ │ │ +32#import │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_4_0class _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ 41public: │ │ │ │ │ -_4_2 id _d_e_v_i_c_e = nullptr; │ │ │ │ │ -_4_3 id _c_o_m_m_a_n_d_Q_u_e_u_e = nullptr; │ │ │ │ │ -44}; │ │ │ │ │ -45 │ │ │ │ │ -46} // end namespace Osd │ │ │ │ │ -47 │ │ │ │ │ -48} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -49using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -50 │ │ │ │ │ -51} // end namespace OpenSubdiv │ │ │ │ │ -52 │ │ │ │ │ -53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ +_4_5 static std::string _G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +46 │ │ │ │ │ +_5_0 static std::string _G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +51 │ │ │ │ │ +59 │ │ │ │ │ +_6_0 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +61 │ │ │ │ │ +_6_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +63 │ │ │ │ │ +_6_4 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +65 │ │ │ │ │ +_6_6 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +67 │ │ │ │ │ +_7_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +73 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +74 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +_7_5 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +76 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +77 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +_7_8 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +79 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +80 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +81 │ │ │ │ │ +83 │ │ │ │ │ +84}; │ │ │ │ │ +85 │ │ │ │ │ +86} // end namespace Osd │ │ │ │ │ +87 │ │ │ │ │ +88} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +89using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +90 │ │ │ │ │ +91} // end namespace OpenSubdiv │ │ │ │ │ +92 │ │ │ │ │ +93#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t_:_:_c_o_m_m_a_n_d_Q_u_e_u_e │ │ │ │ │ -id< MTLCommandQueue > commandQueue │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t_:_:_d_e_v_i_c_e │ │ │ │ │ -id< MTLDevice > device │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +Provides shader source which can be used by client code. │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetPatchDrawingShaderSource() │ │ │ │ │ +Returns shader source which can be used while drawing piecewise parametric │ │ │ │ │ +patches resulting from sub... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_:_G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetHullShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ +PatchDescriptor::Type fvarType) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ +PatchDescriptor::Type fvarType) │ │ │ │ │ +Deprecated. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ +PatchDescriptor::Type fvarType) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_:_G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetHullShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetPatchBasisShaderSource() │ │ │ │ │ +Returns shader source which can be used to evaluate position and first and │ │ │ │ │ +second derivatives on piec... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetCommonShaderSource() │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ + * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlCommon.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,27 +90,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mtlPatchShaderSource.h File Reference
│ │ │ │ +
mtlCommon.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
import "../version.h"
│ │ │ │ -import "../far/patchDescriptor.h"
│ │ │ │ -import <string>
│ │ │ │ +
#include "../version.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MTLPatchShaderSource
 Provides shader source which can be used by client code. More...
class  MTLContext
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,13 +117,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,23 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlPatchShaderSource.h File Reference │ │ │ │ │ -import "../version.h" │ │ │ │ │ -import "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -import │ │ │ │ │ +mtlCommon.h File Reference │ │ │ │ │ +#include "../version.h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -  Provides shader source which can be used by client code. _M_o_r_e_._._. │ │ │ │ │ +class   _M_T_L_C_o_n_t_e_x_t │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00809.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00809 = [ │ │ │ │ │ - ["MTLPatchShaderSource", "a01301.html", null] │ │ │ │ │ + ["MTLContext", "a01285.html", "a01285"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlCommon.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mtlPatchShaderSource.h
│ │ │ │ +
mtlCommon.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,82 +119,53 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │
27
│ │ │ │ -
28#import "../version.h"
│ │ │ │ +
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#import "../far/patchDescriptor.h"
│ │ │ │ +
30#include <cstddef>
│ │ │ │
31
│ │ │ │ -
32#import <string>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Osd {
│ │ │ │ -
38
│ │ │ │ +
32@protocol MTLDevice;
│ │ │ │ +
33@protocol MTLCommandQueue;
│ │ │ │ +
34
│ │ │ │ +
35namespace OpenSubdiv {
│ │ │ │ +
36namespace OPENSUBDIV_VERSION {
│ │ │ │ +
37
│ │ │ │ +
38namespace Osd {
│ │ │ │ +
39
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
41public:
│ │ │ │ -
45 static std::string GetPatchBasisShaderSource();
│ │ │ │ -
46
│ │ │ │ -
50 static std::string GetPatchDrawingShaderSource();
│ │ │ │ -
51
│ │ │ │ -
59
│ │ │ │ -
60 static std::string GetCommonShaderSource();
│ │ │ │ -
61
│ │ │ │ - │ │ │ │ -
63
│ │ │ │ - │ │ │ │ -
65
│ │ │ │ - │ │ │ │ -
67
│ │ │ │ -
72 static std::string GetVertexShaderSource(
│ │ │ │ - │ │ │ │ - │ │ │ │ -
75 static std::string GetHullShaderSource(
│ │ │ │ - │ │ │ │ - │ │ │ │ -
78 static std::string GetDomainShaderSource(
│ │ │ │ - │ │ │ │ - │ │ │ │ -
81
│ │ │ │ -
83
│ │ │ │ -
84};
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86} // end namespace Osd
│ │ │ │ -
87
│ │ │ │ -
88} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
89using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
90
│ │ │ │ -
91} // end namespace OpenSubdiv
│ │ │ │ -
92
│ │ │ │ -
93#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Provides shader source which can be used by client code.
│ │ │ │ -
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ -
static std::string GetPatchDrawingShaderSource()
Returns shader source which can be used while drawing piecewise parametric patches resulting from sub...
│ │ │ │ -
static std::string GetHullShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
│ │ │ │ -
static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ -
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
Deprecated.
│ │ │ │ -
static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
│ │ │ │ -
static std::string GetHullShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ -
static std::string GetPatchBasisShaderSource()
Returns shader source which can be used to evaluate position and first and second derivatives on piec...
│ │ │ │ - │ │ │ │ +
42 id<MTLDevice> device = nullptr;
│ │ │ │ +
43 id<MTLCommandQueue> commandQueue = nullptr;
│ │ │ │ +
44};
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46} // end namespace Osd
│ │ │ │ +
47
│ │ │ │ +
48} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
49using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
50
│ │ │ │ +
51} // end namespace OpenSubdiv
│ │ │ │ +
52
│ │ │ │ +
53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlPatchShaderSource.h │ │ │ │ │ +mtlCommon.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,102 +24,50 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ 27 │ │ │ │ │ -28#import "../version.h" │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#import "../far/patchDescriptor.h" │ │ │ │ │ +30#include │ │ │ │ │ 31 │ │ │ │ │ -32#import │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ -38 │ │ │ │ │ -_4_0class _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ +32@protocol MTLDevice; │ │ │ │ │ +33@protocol MTLCommandQueue; │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Osd { │ │ │ │ │ +39 │ │ │ │ │ +_4_0class _M_T_L_C_o_n_t_e_x_t { │ │ │ │ │ 41public: │ │ │ │ │ -_4_5 static std::string _G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -46 │ │ │ │ │ -_5_0 static std::string _G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -51 │ │ │ │ │ -59 │ │ │ │ │ -_6_0 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -61 │ │ │ │ │ -_6_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -63 │ │ │ │ │ -_6_4 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -65 │ │ │ │ │ -_6_6 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -67 │ │ │ │ │ -_7_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -73 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -74 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -_7_5 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -76 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -77 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -_7_8 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -79 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -80 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -81 │ │ │ │ │ -83 │ │ │ │ │ -84}; │ │ │ │ │ -85 │ │ │ │ │ -86} // end namespace Osd │ │ │ │ │ -87 │ │ │ │ │ -88} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -89using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -90 │ │ │ │ │ -91} // end namespace OpenSubdiv │ │ │ │ │ -92 │ │ │ │ │ -93#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE │ │ │ │ │ +_4_2 id _d_e_v_i_c_e = nullptr; │ │ │ │ │ +_4_3 id _c_o_m_m_a_n_d_Q_u_e_u_e = nullptr; │ │ │ │ │ +44}; │ │ │ │ │ +45 │ │ │ │ │ +46} // end namespace Osd │ │ │ │ │ +47 │ │ │ │ │ +48} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +49using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +50 │ │ │ │ │ +51} // end namespace OpenSubdiv │ │ │ │ │ +52 │ │ │ │ │ +53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -Provides shader source which can be used by client code. │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetPatchDrawingShaderSource() │ │ │ │ │ -Returns shader source which can be used while drawing piecewise parametric │ │ │ │ │ -patches resulting from sub... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_:_G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetHullShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ -PatchDescriptor::Type fvarType) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ -PatchDescriptor::Type fvarType) │ │ │ │ │ -Deprecated. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type, Far:: │ │ │ │ │ -PatchDescriptor::Type fvarType) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_:_G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetHullShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetPatchBasisShaderSource() │ │ │ │ │ -Returns shader source which can be used to evaluate position and first and │ │ │ │ │ -second derivatives on piec... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetCommonShaderSource() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t_:_:_c_o_m_m_a_n_d_Q_u_e_u_e │ │ │ │ │ +id< MTLCommandQueue > commandQueue │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t_:_:_d_e_v_i_c_e │ │ │ │ │ +id< MTLDevice > device │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_2 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mtlLegacyGregoryPatchTable.h File Reference
│ │ │ │ +
mtlComputeEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchTable.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/mtlCommon.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MTLLegacyGregoryPatchTable
class  MTLStencilTable
 
class  MTLComputeEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,29 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ │ +mtlComputeEvaluator.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ #include "_._._/_o_s_d_/_m_t_l_C_o_m_m_o_n_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  │ │ │ │ │ +class   _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ +  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00812.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00812 = [ │ │ │ │ │ - ["MTLLegacyGregoryPatchTable", "a01297.html", "a01297"] │ │ │ │ │ + ["MTLStencilTable", "a01289.html", "a01289"], │ │ │ │ │ + ["MTLComputeEvaluator", "a01293.html", "a01293"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mtlLegacyGregoryPatchTable.h
│ │ │ │ +
mtlComputeEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,112 +119,1138 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include "../far/patchTable.h"
│ │ │ │ -
30#include "../osd/nonCopyable.h"
│ │ │ │ -
31#include "../osd/mtlCommon.h"
│ │ │ │ -
32
│ │ │ │ -
33@protocol MTLDevice;
│ │ │ │ -
34@protocol MTLBuffer;
│ │ │ │ -
35
│ │ │ │ -
36namespace OpenSubdiv {
│ │ │ │ -
37namespace OPENSUBDIV_VERSION {
│ │ │ │ +
29
│ │ │ │ +
30#include "../osd/types.h"
│ │ │ │ +
31#include "../osd/bufferDescriptor.h"
│ │ │ │ +
32#include "../osd/mtlCommon.h"
│ │ │ │ +
33
│ │ │ │ +
34@protocol MTLDevice;
│ │ │ │ +
35@protocol MTLBuffer;
│ │ │ │ +
36@protocol MTLLibrary;
│ │ │ │ +
37@protocol MTLComputePipelineState;
│ │ │ │
38
│ │ │ │ -
39namespace Osd {
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42: private NonCopyable<MTLLegacyGregoryPatchTable>
│ │ │ │ -
43{
│ │ │ │ -
44public:
│ │ │ │ - │ │ │ │ -
46
│ │ │ │ -
47 template<typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
48 static MTLLegacyGregoryPatchTable* Create(Far::PatchTable const* farPatchTable, DEVICE_CONTEXT context) {
│ │ │ │ -
49 return Create(farPatchTable, context);
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52 static MTLLegacyGregoryPatchTable* Create(Far::PatchTable const* farPatchTable, MTLContext* context);
│ │ │ │ -
53
│ │ │ │ -
54 void UpdateVertexBuffer(id<MTLBuffer> vbo, int numVertices, int numVertexElements, MTLContext* context);
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
56 id<MTLBuffer> GetVertexBuffer() const
│ │ │ │ -
57 {
│ │ │ │ -
58 return _vertexBuffer;
│ │ │ │ -
59 }
│ │ │ │ +
39namespace OpenSubdiv {
│ │ │ │ +
40namespace OPENSUBDIV_VERSION {
│ │ │ │ +
41
│ │ │ │ +
42namespace Far {
│ │ │ │ +
43 class PatchTable;
│ │ │ │ +
44 class StencilTable;
│ │ │ │ +
45 class LimitStencilTable;
│ │ │ │ +
46}
│ │ │ │ +
47
│ │ │ │ +
48namespace Osd {
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51{
│ │ │ │ +
52public:
│ │ │ │ +
53 template<typename STENCIL_TABLE, typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
54 static MTLStencilTable* Create(STENCIL_TABLE* stencilTable,
│ │ │ │ +
55 DEVICE_CONTEXT context)
│ │ │ │ +
56 {
│ │ │ │ +
57 return new MTLStencilTable(stencilTable, context);
│ │ │ │ +
58 }
│ │ │ │
│ │ │ │ +
59
│ │ │ │
60
│ │ │ │ -
│ │ │ │ -
61 id<MTLBuffer> GetVertexValenceBuffer() const
│ │ │ │ -
62 {
│ │ │ │ -
63 return _vertexValenceBuffer;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 id<MTLBuffer> GetQuadOffsetsBuffer() const
│ │ │ │ -
67 {
│ │ │ │ -
68 return _quadOffsetsBuffer;
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
72 {
│ │ │ │ - │ │ │ │ -
74 return _quadOffsetsBase[1];
│ │ │ │ -
75 return _quadOffsetsBase[0];
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78private:
│ │ │ │ -
79 id<MTLBuffer> _vertexBuffer;
│ │ │ │ -
80 id<MTLBuffer> _vertexValenceBuffer;
│ │ │ │ -
81 id<MTLBuffer> _quadOffsetsBuffer;
│ │ │ │ -
82 int _quadOffsetsBase[2];
│ │ │ │ -
83};
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
85} //end namespace Osd
│ │ │ │ -
86
│ │ │ │ -
87} //end namespace OPENSUBDIV_VERSION
│ │ │ │ -
88using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
89
│ │ │ │ -
90} //end namespace OpenSuddiv
│ │ │ │ -
91
│ │ │ │ -
92#endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ -
void UpdateVertexBuffer(id< MTLBuffer > vbo, int numVertices, int numVertexElements, MTLContext *context)
│ │ │ │ - │ │ │ │ - │ │ │ │ +
61 MTLStencilTable(Far::StencilTable const* stencilTable, MTLContext* context);
│ │ │ │ +
62 MTLStencilTable(Far::LimitStencilTable const* stencilTable, MTLContext* context);
│ │ │ │ + │ │ │ │ +
64
│ │ │ │ +
65 id<MTLBuffer> GetSizesBuffer() const { return _sizesBuffer; }
│ │ │ │ +
66 id<MTLBuffer> GetOffsetsBuffer() const { return _offsetsBuffer; }
│ │ │ │ +
67 id<MTLBuffer> GetIndicesBuffer() const { return _indicesBuffer; }
│ │ │ │ +
68 id<MTLBuffer> GetWeightsBuffer() const { return _weightsBuffer; }
│ │ │ │ +
69 id<MTLBuffer> GetDuWeightsBuffer() const { return _duWeightsBuffer; }
│ │ │ │ +
70 id<MTLBuffer> GetDvWeightsBuffer() const { return _dvWeightsBuffer; }
│ │ │ │ +
71 id<MTLBuffer> GetDuuWeightsBuffer() const { return _duuWeightsBuffer; }
│ │ │ │ +
72 id<MTLBuffer> GetDuvWeightsBuffer() const { return _duvWeightsBuffer; }
│ │ │ │ +
73 id<MTLBuffer> GetDvvWeightsBuffer() const { return _dvvWeightsBuffer; }
│ │ │ │ +
74
│ │ │ │ +
75 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
76
│ │ │ │ +
77private:
│ │ │ │ +
78 id<MTLBuffer> _sizesBuffer;
│ │ │ │ +
79 id<MTLBuffer> _offsetsBuffer;
│ │ │ │ +
80 id<MTLBuffer> _indicesBuffer;
│ │ │ │ +
81 id<MTLBuffer> _weightsBuffer;
│ │ │ │ +
82 id<MTLBuffer> _duWeightsBuffer;
│ │ │ │ +
83 id<MTLBuffer> _dvWeightsBuffer;
│ │ │ │ +
84 id<MTLBuffer> _duuWeightsBuffer;
│ │ │ │ +
85 id<MTLBuffer> _duvWeightsBuffer;
│ │ │ │ +
86 id<MTLBuffer> _dvvWeightsBuffer;
│ │ │ │ +
87
│ │ │ │ +
88 int _numStencils;
│ │ │ │ +
89};
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
92{
│ │ │ │ +
93public:
│ │ │ │ +
94 typedef bool Instantiatable;
│ │ │ │ +
95
│ │ │ │ + │ │ │ │ +
97 BufferDescriptor const &dstDesc,
│ │ │ │ +
98 BufferDescriptor const &duDesc,
│ │ │ │ +
99 BufferDescriptor const &dvDesc,
│ │ │ │ +
100 MTLContext* context);
│ │ │ │ +
101
│ │ │ │ + │ │ │ │ +
103 BufferDescriptor const &dstDesc,
│ │ │ │ +
104 BufferDescriptor const &duDesc,
│ │ │ │ +
105 BufferDescriptor const &dvDesc,
│ │ │ │ +
106 BufferDescriptor const &duuDesc,
│ │ │ │ +
107 BufferDescriptor const &duvDesc,
│ │ │ │ +
108 BufferDescriptor const &dvvDesc,
│ │ │ │ +
109 MTLContext* context);
│ │ │ │ +
110
│ │ │ │ + │ │ │ │ + │ │ │ │ +
113
│ │ │ │ +
119
│ │ │ │ +
148 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
149 static bool EvalStencils(
│ │ │ │ +
150 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
151 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
152 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
153 MTLComputeEvaluator const *instance,
│ │ │ │ +
154 MTLContext* context)
│ │ │ │ +
155 {
│ │ │ │ +
156 if (instance) {
│ │ │ │ +
157 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
158 dstBuffer, dstDesc,
│ │ │ │ +
159 stencilTable,
│ │ │ │ +
160 context);
│ │ │ │ +
161 } else {
│ │ │ │ +
162 // Create an instance on demand (slow)
│ │ │ │ +
163 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
166 context);
│ │ │ │ +
167 if (instance) {
│ │ │ │ +
168 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
169 dstBuffer, dstDesc,
│ │ │ │ +
170 stencilTable,
│ │ │ │ +
171 context);
│ │ │ │ +
172 delete instance;
│ │ │ │ +
173 return r;
│ │ │ │ +
174 }
│ │ │ │ +
175 return false;
│ │ │ │ +
176 }
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
219 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
220 static bool EvalStencils(
│ │ │ │ +
221 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
222 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
223 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
224 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
225 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
226 MTLComputeEvaluator const *instance,
│ │ │ │ +
227 MTLContext* context) {
│ │ │ │ +
228
│ │ │ │ +
229 if (instance) {
│ │ │ │ +
230 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
231 dstBuffer, dstDesc,
│ │ │ │ +
232 duBuffer, duDesc,
│ │ │ │ +
233 dvBuffer, dvDesc,
│ │ │ │ +
234 stencilTable,
│ │ │ │ +
235 context);
│ │ │ │ +
236 } else {
│ │ │ │ +
237 // Create an instance on demand (slow)
│ │ │ │ +
238 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, context);
│ │ │ │ +
239 if (instance) {
│ │ │ │ +
240 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
241 dstBuffer, dstDesc,
│ │ │ │ +
242 duBuffer, duDesc,
│ │ │ │ +
243 dvBuffer, dvDesc,
│ │ │ │ +
244 stencilTable,
│ │ │ │ +
245 context);
│ │ │ │ +
246 delete instance;
│ │ │ │ +
247 return r;
│ │ │ │ +
248 }
│ │ │ │ +
249 return false;
│ │ │ │ +
250 }
│ │ │ │ +
251 }
│ │ │ │ +
│ │ │ │ +
252
│ │ │ │ +
311 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
312 static bool EvalStencils(
│ │ │ │ +
313 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
314 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
315 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
316 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
317 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
318 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
319 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
320 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
321 MTLComputeEvaluator const *instance,
│ │ │ │ +
322 MTLContext* context) {
│ │ │ │ +
323
│ │ │ │ +
324 if (instance) {
│ │ │ │ +
325 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
326 dstBuffer, dstDesc,
│ │ │ │ +
327 duBuffer, duDesc,
│ │ │ │ +
328 dvBuffer, dvDesc,
│ │ │ │ +
329 duuBuffer, duuDesc,
│ │ │ │ +
330 duvBuffer, duvDesc,
│ │ │ │ +
331 dvvBuffer, dvvDesc,
│ │ │ │ +
332 stencilTable,
│ │ │ │ +
333 context);
│ │ │ │ +
334 } else {
│ │ │ │ +
335 // Create an instance on demand (slow)
│ │ │ │ +
336 instance = Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ +
337 duuDesc, duvDesc, dvvDesc, context);
│ │ │ │ +
338 if (instance) {
│ │ │ │ +
339 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
340 dstBuffer, dstDesc,
│ │ │ │ +
341 duBuffer, duDesc,
│ │ │ │ +
342 dvBuffer, dvDesc,
│ │ │ │ +
343 duuBuffer, duuDesc,
│ │ │ │ +
344 duvBuffer, duvDesc,
│ │ │ │ +
345 dvvBuffer, dvvDesc,
│ │ │ │ +
346 stencilTable,
│ │ │ │ +
347 context);
│ │ │ │ +
348 delete instance;
│ │ │ │ +
349 return r;
│ │ │ │ +
350 }
│ │ │ │ +
351 return false;
│ │ │ │ +
352 }
│ │ │ │ +
353 }
│ │ │ │ +
│ │ │ │ +
354
│ │ │ │ +
375 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
377 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
378 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
379 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
380 MTLContext* context) const
│ │ │ │ +
381 {
│ │ │ │ +
382 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
383 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
384 0, BufferDescriptor(),
│ │ │ │ +
385 0, BufferDescriptor(),
│ │ │ │ +
386 stencilTable->GetSizesBuffer(),
│ │ │ │ +
387 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
388 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
389 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
390 0,
│ │ │ │ +
391 0,
│ │ │ │ +
392 /* start = */ 0,
│ │ │ │ +
393 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ +
394 context);
│ │ │ │ +
395 }
│ │ │ │ +
│ │ │ │ +
396
│ │ │ │ +
429 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
431 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
432 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
433 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
434 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
435 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
436 MTLContext* context) const
│ │ │ │ +
437 {
│ │ │ │ +
438 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
439 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
440 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ +
441 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ +
442 stencilTable->GetSizesBuffer(),
│ │ │ │ +
443 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
444 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
445 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
446 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
447 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
448 /* start = */ 0,
│ │ │ │ +
449 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ +
450 context);
│ │ │ │ +
451 }
│ │ │ │ +
│ │ │ │ +
452
│ │ │ │ +
503 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
505 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
506 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
507 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
508 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
509 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
510 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
511 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
512 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
513 MTLContext* context) const
│ │ │ │ +
514 {
│ │ │ │ +
515 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
516 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
517 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ +
518 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ +
519 duuBuffer->BindMTLBuffer(context), duuDesc,
│ │ │ │ +
520 duvBuffer->BindMTLBuffer(context), duvDesc,
│ │ │ │ +
521 dvvBuffer->BindMTLBuffer(context), dvvDesc,
│ │ │ │ +
522 stencilTable->GetSizesBuffer(),
│ │ │ │ +
523 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
524 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
525 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
526 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
527 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
528 stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ +
529 stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ +
530 stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ +
531 /* start = */ 0,
│ │ │ │ +
532 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ +
533 context);
│ │ │ │ +
534 }
│ │ │ │ +
│ │ │ │ +
535
│ │ │ │ +
574 bool EvalStencils(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
575 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
576 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
577 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
578 id<MTLBuffer> sizesBuffer,
│ │ │ │ +
579 id<MTLBuffer> offsetsBuffer,
│ │ │ │ +
580 id<MTLBuffer> indicesBuffer,
│ │ │ │ +
581 id<MTLBuffer> weightsBuffer,
│ │ │ │ +
582 id<MTLBuffer> duWeightsBuffer,
│ │ │ │ +
583 id<MTLBuffer> dvWeightsBuffer,
│ │ │ │ +
584 int start,
│ │ │ │ +
585 int end,
│ │ │ │ +
586 MTLContext* context) const;
│ │ │ │ +
587
│ │ │ │ +
644 bool EvalStencils(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
645 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
646 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
647 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
648 id<MTLBuffer> duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
649 id<MTLBuffer> duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
650 id<MTLBuffer> dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
651 id<MTLBuffer> sizesBuffer,
│ │ │ │ +
652 id<MTLBuffer> offsetsBuffer,
│ │ │ │ +
653 id<MTLBuffer> indicesBuffer,
│ │ │ │ +
654 id<MTLBuffer> weightsBuffer,
│ │ │ │ +
655 id<MTLBuffer> duWeightsBuffer,
│ │ │ │ +
656 id<MTLBuffer> dvWeightsBuffer,
│ │ │ │ +
657 id<MTLBuffer> duuWeightsBuffer,
│ │ │ │ +
658 id<MTLBuffer> duvWeightsBuffer,
│ │ │ │ +
659 id<MTLBuffer> dvvWeightsBuffer,
│ │ │ │ +
660 int start,
│ │ │ │ +
661 int end,
│ │ │ │ +
662 MTLContext* context) const;
│ │ │ │ +
663
│ │ │ │ +
669
│ │ │ │ +
703 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
704 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
705 static bool EvalPatches(
│ │ │ │ +
706 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
707 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
708 int numPatchCoords,
│ │ │ │ +
709 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
710 PATCH_TABLE *patchTable,
│ │ │ │ +
711 MTLComputeEvaluator const *instance,
│ │ │ │ +
712 MTLContext* context) {
│ │ │ │ +
713
│ │ │ │ +
714 if (instance) {
│ │ │ │ +
715 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
716 dstBuffer, dstDesc,
│ │ │ │ +
717 numPatchCoords, patchCoords,
│ │ │ │ +
718 patchTable,
│ │ │ │ +
719 context);
│ │ │ │ +
720 } else {
│ │ │ │ +
721 // Create an instance on demand (slow)
│ │ │ │ +
722 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
725 context);
│ │ │ │ +
726 if (instance) {
│ │ │ │ +
727 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
728 dstBuffer, dstDesc,
│ │ │ │ +
729 numPatchCoords, patchCoords,
│ │ │ │ +
730 patchTable,
│ │ │ │ +
731 context);
│ │ │ │ +
732 delete instance;
│ │ │ │ +
733 return r;
│ │ │ │ +
734 }
│ │ │ │ +
735 return false;
│ │ │ │ +
736 }
│ │ │ │ +
737 }
│ │ │ │ +
│ │ │ │ +
738
│ │ │ │ +
784 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
785 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
786 static bool EvalPatches(
│ │ │ │ +
787 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
788 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
789 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
790 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
791 int numPatchCoords,
│ │ │ │ +
792 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
793 PATCH_TABLE *patchTable,
│ │ │ │ +
794 MTLComputeEvaluator* instance,
│ │ │ │ +
795 MTLContext* context) {
│ │ │ │ +
796
│ │ │ │ +
797 if (instance) {
│ │ │ │ +
798 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
799 dstBuffer, dstDesc,
│ │ │ │ +
800 duBuffer, duDesc,
│ │ │ │ +
801 dvBuffer, dvDesc,
│ │ │ │ +
802 numPatchCoords, patchCoords,
│ │ │ │ +
803 patchTable,
│ │ │ │ +
804 context);
│ │ │ │ +
805 } else {
│ │ │ │ +
806 // Create an instance on demand (slow)
│ │ │ │ +
807 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
808 duDesc, dvDesc, context);
│ │ │ │ +
809 if (instance) {
│ │ │ │ +
810 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
811 dstBuffer, dstDesc,
│ │ │ │ +
812 duBuffer, duDesc,
│ │ │ │ +
813 dvBuffer, dvDesc,
│ │ │ │ +
814 numPatchCoords, patchCoords,
│ │ │ │ +
815 patchTable,
│ │ │ │ +
816 context);
│ │ │ │ +
817 delete instance;
│ │ │ │ +
818 return r;
│ │ │ │ +
819 }
│ │ │ │ +
820 return false;
│ │ │ │ +
821 }
│ │ │ │ +
822 }
│ │ │ │ +
│ │ │ │ +
823
│ │ │ │ +
887 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
888 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
889 static bool EvalPatches(
│ │ │ │ +
890 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
891 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
892 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
893 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
894 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
895 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
896 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
897 int numPatchCoords,
│ │ │ │ +
898 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
899 PATCH_TABLE *patchTable,
│ │ │ │ +
900 MTLComputeEvaluator* instance,
│ │ │ │ +
901 MTLContext* context) {
│ │ │ │ +
902
│ │ │ │ +
903 if (instance) {
│ │ │ │ +
904 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
905 dstBuffer, dstDesc,
│ │ │ │ +
906 duBuffer, duDesc,
│ │ │ │ +
907 dvBuffer, dvDesc,
│ │ │ │ +
908 duuBuffer, duuDesc,
│ │ │ │ +
909 duvBuffer, duvDesc,
│ │ │ │ +
910 dvvBuffer, dvvDesc,
│ │ │ │ +
911 numPatchCoords, patchCoords,
│ │ │ │ +
912 patchTable,
│ │ │ │ +
913 context);
│ │ │ │ +
914 } else {
│ │ │ │ +
915 // Create an instance on demand (slow)
│ │ │ │ +
916 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
917 duDesc, dvDesc,
│ │ │ │ +
918 duuDesc, duvDesc, dvvDesc, context);
│ │ │ │ +
919 if (instance) {
│ │ │ │ +
920 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
921 dstBuffer, dstDesc,
│ │ │ │ +
922 duBuffer, duDesc,
│ │ │ │ +
923 dvBuffer, dvDesc,
│ │ │ │ +
924 duuBuffer, duuDesc,
│ │ │ │ +
925 duvBuffer, duvDesc,
│ │ │ │ +
926 dvvBuffer, dvvDesc,
│ │ │ │ +
927 numPatchCoords, patchCoords,
│ │ │ │ +
928 patchTable,
│ │ │ │ +
929 context);
│ │ │ │ +
930 delete instance;
│ │ │ │ +
931 return r;
│ │ │ │ +
932 }
│ │ │ │ +
933 return false;
│ │ │ │ +
934 }
│ │ │ │ +
935 }
│ │ │ │ +
│ │ │ │ +
936
│ │ │ │ +
964 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
965 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
967 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
968 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
969 int numPatchCoords,
│ │ │ │ +
970 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
971 PATCH_TABLE *patchTable,
│ │ │ │ +
972 MTLContext* context) const {
│ │ │ │ +
973
│ │ │ │ +
974 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
975 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
976 0, BufferDescriptor(),
│ │ │ │ +
977 0, BufferDescriptor(),
│ │ │ │ +
978 numPatchCoords,
│ │ │ │ +
979 patchCoords->BindMTLBuffer(context),
│ │ │ │ +
980 patchTable->GetPatchArrays(),
│ │ │ │ +
981 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
982 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
983 context);
│ │ │ │ +
984 }
│ │ │ │ +
│ │ │ │ +
985
│ │ │ │ +
1023 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1024 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1026 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1027 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1028 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1029 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1030 int numPatchCoords,
│ │ │ │ +
1031 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1032 PATCH_TABLE *patchTable,
│ │ │ │ +
1033 MTLContext* context) const {
│ │ │ │ +
1034
│ │ │ │ +
1035 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
1036 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
1037 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ +
1038 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ +
1039 numPatchCoords,
│ │ │ │ +
1040 patchCoords->BindMTLBuffer(context),
│ │ │ │ +
1041 patchTable->GetPatchArrays(),
│ │ │ │ +
1042 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
1043 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
1044 context);
│ │ │ │ +
1045 }
│ │ │ │ +
│ │ │ │ +
1046
│ │ │ │ +
1102 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1103 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1105 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1106 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1107 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1108 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1109 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1110 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1111 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1112 int numPatchCoords,
│ │ │ │ +
1113 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1114 PATCH_TABLE *patchTable,
│ │ │ │ +
1115 MTLContext* context) const {
│ │ │ │ +
1116
│ │ │ │ +
1117 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ +
1118 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ +
1119 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ +
1120 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ +
1121 duuBuffer->BindMTLBuffer(context), duuDesc,
│ │ │ │ +
1122 duvBuffer->BindMTLBuffer(context), duvDesc,
│ │ │ │ +
1123 dvvBuffer->BindMTLBuffer(context), dvvDesc,
│ │ │ │ +
1124 numPatchCoords,
│ │ │ │ +
1125 patchCoords->BindMTLBuffer(context),
│ │ │ │ +
1126 patchTable->GetPatchArrays(),
│ │ │ │ +
1127 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
1128 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
1129 context);
│ │ │ │ +
1130 }
│ │ │ │ +
│ │ │ │ +
1131
│ │ │ │ +
1132 bool EvalPatches(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1133 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1134 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1135 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1136 int numPatchCoords,
│ │ │ │ +
1137 id<MTLBuffer> patchCoordsBuffer,
│ │ │ │ +
1138 const PatchArrayVector &patchArrays,
│ │ │ │ +
1139 id<MTLBuffer> patchIndexBuffer,
│ │ │ │ +
1140 id<MTLBuffer> patchParamsBuffer,
│ │ │ │ +
1141 MTLContext* context) const;
│ │ │ │ +
1142
│ │ │ │ +
1143 bool EvalPatches(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1144 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1145 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1146 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1147 id<MTLBuffer> duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1148 id<MTLBuffer> duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1149 id<MTLBuffer> dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1150 int numPatchCoords,
│ │ │ │ +
1151 id<MTLBuffer> patchCoordsBuffer,
│ │ │ │ +
1152 const PatchArrayVector &patchArrays,
│ │ │ │ +
1153 id<MTLBuffer> patchIndexBuffer,
│ │ │ │ +
1154 id<MTLBuffer> patchParamsBuffer,
│ │ │ │ +
1155 MTLContext* context) const;
│ │ │ │ +
1156
│ │ │ │ +
1190 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1191 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1193 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1194 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1195 int numPatchCoords,
│ │ │ │ +
1196 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1197 PATCH_TABLE *patchTable,
│ │ │ │ +
1198 MTLComputeEvaluator const *instance,
│ │ │ │ +
1199 MTLContext* deviceContext) {
│ │ │ │ +
1200
│ │ │ │ +
1201 if (instance) {
│ │ │ │ +
1202 return instance->EvalPatchesVarying(
│ │ │ │ +
1203 srcBuffer, srcDesc,
│ │ │ │ +
1204 dstBuffer, dstDesc,
│ │ │ │ +
1205 numPatchCoords, patchCoords,
│ │ │ │ +
1206 patchTable,
│ │ │ │ +
1207 deviceContext);
│ │ │ │ +
1208 } else {
│ │ │ │ +
1209 // Create an instance on demand (slow)
│ │ │ │ +
1210 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
1213 deviceContext);
│ │ │ │ +
1214 if (instance) {
│ │ │ │ +
1215 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1216 srcBuffer, srcDesc,
│ │ │ │ +
1217 dstBuffer, dstDesc,
│ │ │ │ +
1218 numPatchCoords, patchCoords,
│ │ │ │ +
1219 patchTable,
│ │ │ │ +
1220 deviceContext);
│ │ │ │ +
1221 delete instance;
│ │ │ │ +
1222 return r;
│ │ │ │ +
1223 }
│ │ │ │ +
1224 return false;
│ │ │ │ +
1225 }
│ │ │ │ +
1226 }
│ │ │ │ +
│ │ │ │ +
1227
│ │ │ │ +
1255 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1256 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1258 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1259 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1260 int numPatchCoords,
│ │ │ │ +
1261 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1262 PATCH_TABLE *patchTable,
│ │ │ │ +
1263 MTLContext* deviceContext) const {
│ │ │ │ +
1264
│ │ │ │ +
1265 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
1266 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
1267 0, BufferDescriptor(),
│ │ │ │ +
1268 0, BufferDescriptor(),
│ │ │ │ +
1269 numPatchCoords,
│ │ │ │ +
1270 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
1271 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1272 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1273 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
1274 deviceContext
│ │ │ │ +
1275 );
│ │ │ │ +
1276 }
│ │ │ │ +
│ │ │ │ +
1277
│ │ │ │ +
1323 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1324 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1326 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1327 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1328 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1329 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1330 int numPatchCoords,
│ │ │ │ +
1331 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1332 PATCH_TABLE *patchTable,
│ │ │ │ +
1333 MTLComputeEvaluator const *instance,
│ │ │ │ +
1334 MTLContext* deviceContext) {
│ │ │ │ +
1335
│ │ │ │ +
1336 if (instance) {
│ │ │ │ +
1337 return instance->EvalPatchesVarying(
│ │ │ │ +
1338 srcBuffer, srcDesc,
│ │ │ │ +
1339 dstBuffer, dstDesc,
│ │ │ │ +
1340 duBuffer, duDesc,
│ │ │ │ +
1341 dvBuffer, dvDesc,
│ │ │ │ +
1342 numPatchCoords, patchCoords,
│ │ │ │ +
1343 patchTable,
│ │ │ │ +
1344 deviceContext);
│ │ │ │ +
1345 } else {
│ │ │ │ +
1346 // Create an instance on demand (slow)
│ │ │ │ +
1347 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1348 duDesc, dvDesc,
│ │ │ │ +
1349 deviceContext);
│ │ │ │ +
1350 if (instance) {
│ │ │ │ +
1351 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1352 srcBuffer, srcDesc,
│ │ │ │ +
1353 dstBuffer, dstDesc,
│ │ │ │ +
1354 duBuffer, duDesc,
│ │ │ │ +
1355 dvBuffer, dvDesc,
│ │ │ │ +
1356 numPatchCoords, patchCoords,
│ │ │ │ +
1357 patchTable,
│ │ │ │ +
1358 deviceContext);
│ │ │ │ +
1359 delete instance;
│ │ │ │ +
1360 return r;
│ │ │ │ +
1361 }
│ │ │ │ +
1362 return false;
│ │ │ │ +
1363 }
│ │ │ │ +
1364 }
│ │ │ │ +
│ │ │ │ +
1365
│ │ │ │ +
1405 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1406 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1408 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1409 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1410 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1411 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1412 int numPatchCoords,
│ │ │ │ +
1413 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1414 PATCH_TABLE *patchTable,
│ │ │ │ +
1415 MTLContext* deviceContext) const {
│ │ │ │ +
1416
│ │ │ │ +
1417 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
1418 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
1419 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ +
1420 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ +
1421 numPatchCoords,
│ │ │ │ +
1422 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
1423 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1424 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1425 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
1426 deviceContext
│ │ │ │ +
1427 );
│ │ │ │ +
1428 }
│ │ │ │ +
│ │ │ │ +
1429
│ │ │ │ +
1430
│ │ │ │ +
1494 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1495 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1497 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1498 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1499 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1500 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1501 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1502 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1503 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1504 int numPatchCoords,
│ │ │ │ +
1505 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1506 PATCH_TABLE *patchTable,
│ │ │ │ +
1507 MTLComputeEvaluator const *instance,
│ │ │ │ +
1508 MTLContext* deviceContext) {
│ │ │ │ +
1509
│ │ │ │ +
1510 if (instance) {
│ │ │ │ +
1511 return instance->EvalPatchesVarying(
│ │ │ │ +
1512 srcBuffer, srcDesc,
│ │ │ │ +
1513 dstBuffer, dstDesc,
│ │ │ │ +
1514 duBuffer, duDesc,
│ │ │ │ +
1515 dvBuffer, dvDesc,
│ │ │ │ +
1516 duuBuffer, duuDesc,
│ │ │ │ +
1517 duvBuffer, duvDesc,
│ │ │ │ +
1518 dvvBuffer, dvvDesc,
│ │ │ │ +
1519 numPatchCoords, patchCoords,
│ │ │ │ +
1520 patchTable,
│ │ │ │ +
1521 deviceContext);
│ │ │ │ +
1522 } else {
│ │ │ │ +
1523 // Create an instance on demand (slow)
│ │ │ │ +
1524 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1525 duDesc, dvDesc,
│ │ │ │ +
1526 duuDesc, duvDesc, dvvDesc,
│ │ │ │ +
1527 deviceContext);
│ │ │ │ +
1528 if (instance) {
│ │ │ │ +
1529 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1530 srcBuffer, srcDesc,
│ │ │ │ +
1531 dstBuffer, dstDesc,
│ │ │ │ +
1532 duBuffer, duDesc,
│ │ │ │ +
1533 dvBuffer, dvDesc,
│ │ │ │ +
1534 duuBuffer, duuDesc,
│ │ │ │ +
1535 duvBuffer, duvDesc,
│ │ │ │ +
1536 dvvBuffer, dvvDesc,
│ │ │ │ +
1537 numPatchCoords, patchCoords,
│ │ │ │ +
1538 patchTable,
│ │ │ │ +
1539 deviceContext);
│ │ │ │ +
1540 delete instance;
│ │ │ │ +
1541 return r;
│ │ │ │ +
1542 }
│ │ │ │ +
1543 return false;
│ │ │ │ +
1544 }
│ │ │ │ +
1545 }
│ │ │ │ +
│ │ │ │ +
1546
│ │ │ │ +
1604 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1605 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1607 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1608 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1609 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1610 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1611 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1612 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1613 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1614 int numPatchCoords,
│ │ │ │ +
1615 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1616 PATCH_TABLE *patchTable,
│ │ │ │ +
1617 MTLContext* deviceContext) const {
│ │ │ │ +
1618
│ │ │ │ +
1619 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
1620 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
1621 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ +
1622 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ +
1623 duuBuffer->BindMTLBuffer(deviceContext), duuDesc,
│ │ │ │ +
1624 duvBuffer->BindMTLBuffer(deviceContext), duvDesc,
│ │ │ │ +
1625 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc,
│ │ │ │ +
1626 numPatchCoords,
│ │ │ │ +
1627 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
1628 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1629 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1630 patchTable->GetPatchParamBuffer(),
│ │ │ │ +
1631 deviceContext
│ │ │ │ +
1632 );
│ │ │ │ +
1633 }
│ │ │ │ +
│ │ │ │ +
1634
│ │ │ │ +
1670 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1671 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1673 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1674 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1675 int numPatchCoords,
│ │ │ │ +
1676 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1677 PATCH_TABLE *patchTable,
│ │ │ │ +
1678 int fvarChannel,
│ │ │ │ +
1679 MTLComputeEvaluator const *instance,
│ │ │ │ +
1680 MTLContext* deviceContext) {
│ │ │ │ +
1681
│ │ │ │ +
1682 if (instance) {
│ │ │ │ +
1683 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
1684 srcBuffer, srcDesc,
│ │ │ │ +
1685 dstBuffer, dstDesc,
│ │ │ │ +
1686 numPatchCoords, patchCoords,
│ │ │ │ +
1687 patchTable,
│ │ │ │ +
1688 fvarChannel,
│ │ │ │ +
1689 deviceContext);
│ │ │ │ +
1690 } else {
│ │ │ │ +
1691 // Create an instance on demand (slow)
│ │ │ │ +
1692 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
1695 deviceContext);
│ │ │ │ +
1696 if (instance) {
│ │ │ │ +
1697 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
1698 srcBuffer, srcDesc,
│ │ │ │ +
1699 dstBuffer, dstDesc,
│ │ │ │ +
1700 numPatchCoords, patchCoords,
│ │ │ │ +
1701 patchTable,
│ │ │ │ +
1702 fvarChannel,
│ │ │ │ +
1703 deviceContext);
│ │ │ │ +
1704 delete instance;
│ │ │ │ +
1705 return r;
│ │ │ │ +
1706 }
│ │ │ │ +
1707 return false;
│ │ │ │ +
1708 }
│ │ │ │ +
1709 }
│ │ │ │ +
│ │ │ │ +
1710
│ │ │ │ +
1740 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1741 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1743 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1744 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1745 int numPatchCoords,
│ │ │ │ +
1746 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1747 PATCH_TABLE *patchTable,
│ │ │ │ +
1748 int fvarChannel,
│ │ │ │ +
1749 MTLContext* deviceContext) const {
│ │ │ │ +
1750
│ │ │ │ +
1751 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
1752 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
1753 0, BufferDescriptor(),
│ │ │ │ +
1754 0, BufferDescriptor(),
│ │ │ │ +
1755 numPatchCoords,
│ │ │ │ +
1756 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
1757 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
1758 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1759 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ +
1760 deviceContext
│ │ │ │ +
1761 );
│ │ │ │ +
1762 }
│ │ │ │ +
│ │ │ │ +
1763
│ │ │ │ +
1811 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1812 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1814 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1815 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1816 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1817 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1818 int numPatchCoords,
│ │ │ │ +
1819 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1820 PATCH_TABLE *patchTable,
│ │ │ │ +
1821 int fvarChannel,
│ │ │ │ +
1822 MTLComputeEvaluator const *instance,
│ │ │ │ +
1823 MTLContext* deviceContext) {
│ │ │ │ +
1824
│ │ │ │ +
1825 if (instance) {
│ │ │ │ +
1826 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
1827 srcBuffer, srcDesc,
│ │ │ │ +
1828 dstBuffer, dstDesc,
│ │ │ │ +
1829 duBuffer, duDesc,
│ │ │ │ +
1830 dvBuffer, dvDesc,
│ │ │ │ +
1831 numPatchCoords, patchCoords,
│ │ │ │ +
1832 patchTable,
│ │ │ │ +
1833 fvarChannel,
│ │ │ │ +
1834 deviceContext);
│ │ │ │ +
1835 } else {
│ │ │ │ +
1836 // Create an instance on demand (slow)
│ │ │ │ +
1837 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1838 duDesc, dvDesc,
│ │ │ │ +
1839 deviceContext);
│ │ │ │ +
1840 if (instance) {
│ │ │ │ +
1841 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
1842 srcBuffer, srcDesc,
│ │ │ │ +
1843 dstBuffer, dstDesc,
│ │ │ │ +
1844 duBuffer, duDesc,
│ │ │ │ +
1845 dvBuffer, dvDesc,
│ │ │ │ +
1846 numPatchCoords, patchCoords,
│ │ │ │ +
1847 patchTable,
│ │ │ │ +
1848 fvarChannel,
│ │ │ │ +
1849 deviceContext);
│ │ │ │ +
1850 delete instance;
│ │ │ │ +
1851 return r;
│ │ │ │ +
1852 }
│ │ │ │ +
1853 return false;
│ │ │ │ +
1854 }
│ │ │ │ +
1855 }
│ │ │ │ +
│ │ │ │ +
1856
│ │ │ │ +
1898 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1899 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1901 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1902 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1903 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1904 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1905 int numPatchCoords,
│ │ │ │ +
1906 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1907 PATCH_TABLE *patchTable,
│ │ │ │ +
1908 int fvarChannel,
│ │ │ │ +
1909 MTLContext* deviceContext) const {
│ │ │ │ +
1910
│ │ │ │ +
1911 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
1912 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
1913 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ +
1914 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ +
1915 numPatchCoords,
│ │ │ │ +
1916 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
1917 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
1918 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1919 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ +
1920 deviceContext
│ │ │ │ +
1921 );
│ │ │ │ +
1922 }
│ │ │ │ +
│ │ │ │ +
1923
│ │ │ │ +
1989 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1990 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1992 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1993 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1994 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1995 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1996 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1997 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1998 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1999 int numPatchCoords,
│ │ │ │ +
2000 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
2001 PATCH_TABLE *patchTable,
│ │ │ │ +
2002 int fvarChannel,
│ │ │ │ +
2003 MTLComputeEvaluator const *instance,
│ │ │ │ +
2004 MTLContext* deviceContext) {
│ │ │ │ +
2005
│ │ │ │ +
2006 if (instance) {
│ │ │ │ +
2007 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
2008 srcBuffer, srcDesc,
│ │ │ │ +
2009 dstBuffer, dstDesc,
│ │ │ │ +
2010 duBuffer, duDesc,
│ │ │ │ +
2011 dvBuffer, dvDesc,
│ │ │ │ +
2012 duuBuffer, duuDesc,
│ │ │ │ +
2013 duvBuffer, duvDesc,
│ │ │ │ +
2014 dvvBuffer, dvvDesc,
│ │ │ │ +
2015 numPatchCoords, patchCoords,
│ │ │ │ +
2016 patchTable,
│ │ │ │ +
2017 fvarChannel,
│ │ │ │ +
2018 deviceContext);
│ │ │ │ +
2019 } else {
│ │ │ │ +
2020 // Create an instance on demand (slow)
│ │ │ │ +
2021 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
2022 duDesc, dvDesc,
│ │ │ │ +
2023 duuDesc, duvDesc, dvvDesc,
│ │ │ │ +
2024 deviceContext);
│ │ │ │ +
2025 if (instance) {
│ │ │ │ +
2026 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
2027 srcBuffer, srcDesc,
│ │ │ │ +
2028 dstBuffer, dstDesc,
│ │ │ │ +
2029 duBuffer, duDesc,
│ │ │ │ +
2030 dvBuffer, dvDesc,
│ │ │ │ +
2031 duuBuffer, duuDesc,
│ │ │ │ +
2032 duvBuffer, duvDesc,
│ │ │ │ +
2033 dvvBuffer, dvvDesc,
│ │ │ │ +
2034 numPatchCoords, patchCoords,
│ │ │ │ +
2035 patchTable,
│ │ │ │ +
2036 fvarChannel,
│ │ │ │ +
2037 deviceContext);
│ │ │ │ +
2038 delete instance;
│ │ │ │ +
2039 return r;
│ │ │ │ +
2040 }
│ │ │ │ +
2041 return false;
│ │ │ │ +
2042 }
│ │ │ │ +
2043 }
│ │ │ │ +
│ │ │ │ +
2044
│ │ │ │ +
2104 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
2105 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
2107 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
2108 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
2109 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
2110 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
2111 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
2112 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
2113 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
2114 int numPatchCoords,
│ │ │ │ +
2115 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
2116 PATCH_TABLE *patchTable,
│ │ │ │ +
2117 int fvarChannel,
│ │ │ │ +
2118 MTLContext* deviceContext) const {
│ │ │ │ +
2119
│ │ │ │ +
2120 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ +
2121 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ +
2122 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ +
2123 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ +
2124 duuBuffer->BindMTLBuffer(deviceContext), duuDesc,
│ │ │ │ +
2125 duvBuffer->BindMTLBuffer(deviceContext), duvDesc,
│ │ │ │ +
2126 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc,
│ │ │ │ +
2127 numPatchCoords,
│ │ │ │ +
2128 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ +
2129 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
2130 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
2131 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ +
2132 fvarChannel,
│ │ │ │ +
2133 deviceContext
│ │ │ │ +
2134 );
│ │ │ │ +
2135 }
│ │ │ │ +
│ │ │ │ +
2136
│ │ │ │ +
2138 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ +
2139 BufferDescriptor const &dstDesc,
│ │ │ │ +
2140 BufferDescriptor const &duDesc,
│ │ │ │ +
2141 BufferDescriptor const &dvDesc,
│ │ │ │ +
2142 BufferDescriptor const &duuDesc,
│ │ │ │ +
2143 BufferDescriptor const &duvDesc,
│ │ │ │ +
2144 BufferDescriptor const &dvvDesc,
│ │ │ │ +
2145 MTLContext* context);
│ │ │ │ +
2146
│ │ │ │ +
2148 static void Synchronize(MTLContext* context);
│ │ │ │ +
2149
│ │ │ │ +
2150 private:
│ │ │ │ +
2151
│ │ │ │ +
2152 id<MTLLibrary> _computeLibrary;
│ │ │ │ +
2153 id<MTLComputePipelineState> _evalStencils;
│ │ │ │ +
2154 id<MTLComputePipelineState> _evalPatches;
│ │ │ │ +
2155 id<MTLBuffer> _parameterBuffer;
│ │ │ │ +
2156
│ │ │ │ +
2157 int _workGroupSize;
│ │ │ │ +
2158};
│ │ │ │ +
│ │ │ │ +
2159
│ │ │ │ +
2160} //end namespace Osd
│ │ │ │ +
2161
│ │ │ │ +
2162} //end namespace OPENSUBDIV_VERSION
│ │ │ │ +
2163using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
2164
│ │ │ │ +
2165} //end namespace OpenSubdiv
│ │ │ │ +
2166
│ │ │ │ +
2167#endif // OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ + │ │ │ │ +
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ + │ │ │ │ +
MTLStencilTable(Far::LimitStencilTable const *stencilTable, MTLContext *context)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
MTLStencilTable(Far::StencilTable const *stencilTable, MTLContext *context)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static MTLStencilTable * Create(STENCIL_TABLE *stencilTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, id< MTLBuffer > duuWeightsBuffer, id< MTLBuffer > duvWeightsBuffer, id< MTLBuffer > dvvWeightsBuffer, int start, int end, MTLContext *context) const
Dispatch the MTL compute kernel on GPU asynchronously returns false if the kernel hasn't been compile...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ + │ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ +
bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, id< MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static void Synchronize(MTLContext *context)
Wait for the dispatched kernel to finish.
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ +
bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, int start, int end, MTLContext *context) const
Dispatch the MTL compute kernel on GPU asynchronously returns false if the kernel hasn't been compile...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, MTLContext *context)
│ │ │ │ +
static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext *context)
│ │ │ │ +
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext *context)
Configure compute pipline state. Returns false if it fails to create the pipeline state.
│ │ │ │ +
bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, id< MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlLegacyGregoryPatchTable.h │ │ │ │ │ +mtlComputeEvaluator.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,127 +24,1382 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../far/patchTable.h" │ │ │ │ │ -30#include "../osd/nonCopyable.h" │ │ │ │ │ -31#include "../osd/mtlCommon.h" │ │ │ │ │ -32 │ │ │ │ │ -33@protocol MTLDevice; │ │ │ │ │ -34@protocol MTLBuffer; │ │ │ │ │ -35 │ │ │ │ │ -36namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -37namespace OPENSUBDIV_VERSION { │ │ │ │ │ +29 │ │ │ │ │ +30#include "../osd/types.h" │ │ │ │ │ +31#include "../osd/bufferDescriptor.h" │ │ │ │ │ +32#include "../osd/mtlCommon.h" │ │ │ │ │ +33 │ │ │ │ │ +34@protocol MTLDevice; │ │ │ │ │ +35@protocol MTLBuffer; │ │ │ │ │ +36@protocol MTLLibrary; │ │ │ │ │ +37@protocol MTLComputePipelineState; │ │ │ │ │ 38 │ │ │ │ │ -39namespace Osd { │ │ │ │ │ -40 │ │ │ │ │ -_4_1class _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -42: private NonCopyable │ │ │ │ │ -43{ │ │ │ │ │ -44public: │ │ │ │ │ -_4_5 _~_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -46 │ │ │ │ │ -47 template │ │ │ │ │ -_4_8 static _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e* _C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const* │ │ │ │ │ -farPatchTable, DEVICE_CONTEXT context) { │ │ │ │ │ -49 return Create(farPatchTable, context); │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -_5_2 static _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e* _C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const* │ │ │ │ │ -farPatchTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -53 │ │ │ │ │ -_5_4 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(id vbo, int numVertices, int │ │ │ │ │ -numVertexElements, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -55 │ │ │ │ │ -_5_6 id _G_e_t_V_e_r_t_e_x_B_u_f_f_e_r() const │ │ │ │ │ -57 { │ │ │ │ │ -58 return _vertexBuffer; │ │ │ │ │ -59 } │ │ │ │ │ +39namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +40namespace OPENSUBDIV_VERSION { │ │ │ │ │ +41 │ │ │ │ │ +42namespace Far { │ │ │ │ │ +43 class PatchTable; │ │ │ │ │ +44 class StencilTable; │ │ │ │ │ +45 class LimitStencilTable; │ │ │ │ │ +46} │ │ │ │ │ +47 │ │ │ │ │ +48namespace Osd { │ │ │ │ │ +49 │ │ │ │ │ +_5_0class _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +51{ │ │ │ │ │ +52public: │ │ │ │ │ +53 template │ │ │ │ │ +_5_4 static _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e* _C_r_e_a_t_e(STENCIL_TABLE* stencilTable, │ │ │ │ │ +55 DEVICE_CONTEXT context) │ │ │ │ │ +56 { │ │ │ │ │ +57 return new _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, context); │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ 60 │ │ │ │ │ -_6_1 id _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_B_u_f_f_e_r() const │ │ │ │ │ -62 { │ │ │ │ │ -63 return _vertexValenceBuffer; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 id _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_u_f_f_e_r() const │ │ │ │ │ -67 { │ │ │ │ │ -68 return _quadOffsetsBuffer; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -_7_1 int _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) │ │ │ │ │ -72 { │ │ │ │ │ -73 if(type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) │ │ │ │ │ -74 return _quadOffsetsBase[1]; │ │ │ │ │ -75 return _quadOffsetsBase[0]; │ │ │ │ │ -76 } │ │ │ │ │ -77 │ │ │ │ │ -78private: │ │ │ │ │ -79 id _vertexBuffer; │ │ │ │ │ -80 id _vertexValenceBuffer; │ │ │ │ │ -81 id _quadOffsetsBuffer; │ │ │ │ │ -82 int _quadOffsetsBase[2]; │ │ │ │ │ -83}; │ │ │ │ │ -84 │ │ │ │ │ -85} //end namespace Osd │ │ │ │ │ -86 │ │ │ │ │ -87} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ -88using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -89 │ │ │ │ │ -90} //end namespace OpenSuddiv │ │ │ │ │ -91 │ │ │ │ │ -92#endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +_6_1 _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const* stencilTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +_6_2 _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const* stencilTable, _M_T_L_C_o_n_t_e_x_t* │ │ │ │ │ +context); │ │ │ │ │ +_6_3 _~_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ +64 │ │ │ │ │ +_6_5 id _G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizesBuffer; } │ │ │ │ │ +_6_6 id _G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsetsBuffer; } │ │ │ │ │ +_6_7 id _G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indicesBuffer; } │ │ │ │ │ +_6_8 id _G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weightsBuffer; } │ │ │ │ │ +_6_9 id _G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeightsBuffer; } │ │ │ │ │ +_7_0 id _G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeightsBuffer; } │ │ │ │ │ +_7_1 id _G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeightsBuffer; } │ │ │ │ │ +_7_2 id _G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeightsBuffer; } │ │ │ │ │ +_7_3 id _G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeightsBuffer; } │ │ │ │ │ +74 │ │ │ │ │ +_7_5 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +76 │ │ │ │ │ +77private: │ │ │ │ │ +78 id _sizesBuffer; │ │ │ │ │ +79 id _offsetsBuffer; │ │ │ │ │ +80 id _indicesBuffer; │ │ │ │ │ +81 id _weightsBuffer; │ │ │ │ │ +82 id _duWeightsBuffer; │ │ │ │ │ +83 id _dvWeightsBuffer; │ │ │ │ │ +84 id _duuWeightsBuffer; │ │ │ │ │ +85 id _duvWeightsBuffer; │ │ │ │ │ +86 id _dvvWeightsBuffer; │ │ │ │ │ +87 │ │ │ │ │ +88 int _numStencils; │ │ │ │ │ +89}; │ │ │ │ │ +90 │ │ │ │ │ +_9_1class _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +92{ │ │ │ │ │ +93public: │ │ │ │ │ +_9_4 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ +95 │ │ │ │ │ +_9_6 static _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +97 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +98 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +99 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +100 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +101 │ │ │ │ │ +_1_0_2 static _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +103 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +104 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +105 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +108 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +109 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +_1_1_2 _~_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +113 │ │ │ │ │ +119 │ │ │ │ │ +148 template │ │ │ │ │ +_1_4_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +150 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +151 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +152 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +153 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +154 _M_T_L_C_o_n_t_e_x_t* context) │ │ │ │ │ +155 { │ │ │ │ │ +156 if (instance) { │ │ │ │ │ +157 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +158 dstBuffer, dstDesc, │ │ │ │ │ +159 stencilTable, │ │ │ │ │ +160 context); │ │ │ │ │ +161 } else { │ │ │ │ │ +162 // Create an instance on demand (slow) │ │ │ │ │ +163 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +164 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +165 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +166 context); │ │ │ │ │ +167 if (instance) { │ │ │ │ │ +168 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +169 dstBuffer, dstDesc, │ │ │ │ │ +170 stencilTable, │ │ │ │ │ +171 context); │ │ │ │ │ +172 delete instance; │ │ │ │ │ +173 return r; │ │ │ │ │ +174 } │ │ │ │ │ +175 return false; │ │ │ │ │ +176 } │ │ │ │ │ +177 } │ │ │ │ │ +178 │ │ │ │ │ +219 template │ │ │ │ │ +_2_2_0 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +221 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +222 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +223 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +224 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +225 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +226 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +227 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ +228 │ │ │ │ │ +229 if (instance) { │ │ │ │ │ +230 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +231 dstBuffer, dstDesc, │ │ │ │ │ +232 duBuffer, duDesc, │ │ │ │ │ +233 dvBuffer, dvDesc, │ │ │ │ │ +234 stencilTable, │ │ │ │ │ +235 context); │ │ │ │ │ +236 } else { │ │ │ │ │ +237 // Create an instance on demand (slow) │ │ │ │ │ +238 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, context); │ │ │ │ │ +239 if (instance) { │ │ │ │ │ +240 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +241 dstBuffer, dstDesc, │ │ │ │ │ +242 duBuffer, duDesc, │ │ │ │ │ +243 dvBuffer, dvDesc, │ │ │ │ │ +244 stencilTable, │ │ │ │ │ +245 context); │ │ │ │ │ +246 delete instance; │ │ │ │ │ +247 return r; │ │ │ │ │ +248 } │ │ │ │ │ +249 return false; │ │ │ │ │ +250 } │ │ │ │ │ +251 } │ │ │ │ │ +252 │ │ │ │ │ +311 template │ │ │ │ │ +_3_1_2 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +313 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +314 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +315 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +316 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +317 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +318 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +319 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +320 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +321 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +322 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ +323 │ │ │ │ │ +324 if (instance) { │ │ │ │ │ +325 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +326 dstBuffer, dstDesc, │ │ │ │ │ +327 duBuffer, duDesc, │ │ │ │ │ +328 dvBuffer, dvDesc, │ │ │ │ │ +329 duuBuffer, duuDesc, │ │ │ │ │ +330 duvBuffer, duvDesc, │ │ │ │ │ +331 dvvBuffer, dvvDesc, │ │ │ │ │ +332 stencilTable, │ │ │ │ │ +333 context); │ │ │ │ │ +334 } else { │ │ │ │ │ +335 // Create an instance on demand (slow) │ │ │ │ │ +336 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ +337 duuDesc, duvDesc, dvvDesc, context); │ │ │ │ │ +338 if (instance) { │ │ │ │ │ +339 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +340 dstBuffer, dstDesc, │ │ │ │ │ +341 duBuffer, duDesc, │ │ │ │ │ +342 dvBuffer, dvDesc, │ │ │ │ │ +343 duuBuffer, duuDesc, │ │ │ │ │ +344 duvBuffer, duvDesc, │ │ │ │ │ +345 dvvBuffer, dvvDesc, │ │ │ │ │ +346 stencilTable, │ │ │ │ │ +347 context); │ │ │ │ │ +348 delete instance; │ │ │ │ │ +349 return r; │ │ │ │ │ +350 } │ │ │ │ │ +351 return false; │ │ │ │ │ +352 } │ │ │ │ │ +353 } │ │ │ │ │ +354 │ │ │ │ │ +375 template │ │ │ │ │ +_3_7_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +377 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +378 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +379 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +380 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ +381 { │ │ │ │ │ +382 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +383 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +384 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +385 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +386 stencilTable->GetSizesBuffer(), │ │ │ │ │ +387 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +388 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +389 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +390 0, │ │ │ │ │ +391 0, │ │ │ │ │ +392 /* start = */ 0, │ │ │ │ │ +393 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ +394 context); │ │ │ │ │ +395 } │ │ │ │ │ +396 │ │ │ │ │ +429 template │ │ │ │ │ +_4_3_0 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +431 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +432 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +433 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +434 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +435 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +436 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ +437 { │ │ │ │ │ +438 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +439 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +440 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ +441 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ +442 stencilTable->GetSizesBuffer(), │ │ │ │ │ +443 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +444 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +445 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +446 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +447 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +448 /* start = */ 0, │ │ │ │ │ +449 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ +450 context); │ │ │ │ │ +451 } │ │ │ │ │ +452 │ │ │ │ │ +503 template │ │ │ │ │ +_5_0_4 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +505 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +506 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +507 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +508 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +509 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +510 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +511 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +512 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +513 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ +514 { │ │ │ │ │ +515 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +516 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +517 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ +518 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ +519 duuBuffer->BindMTLBuffer(context), duuDesc, │ │ │ │ │ +520 duvBuffer->BindMTLBuffer(context), duvDesc, │ │ │ │ │ +521 dvvBuffer->BindMTLBuffer(context), dvvDesc, │ │ │ │ │ +522 stencilTable->GetSizesBuffer(), │ │ │ │ │ +523 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +524 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +525 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +526 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +527 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +528 stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ +529 stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ +530 stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ +531 /* start = */ 0, │ │ │ │ │ +532 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ +533 context); │ │ │ │ │ +534 } │ │ │ │ │ +535 │ │ │ │ │ +_5_7_4 bool _E_v_a_l_S_t_e_n_c_i_l_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +575 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +576 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +577 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +578 id sizesBuffer, │ │ │ │ │ +579 id offsetsBuffer, │ │ │ │ │ +580 id indicesBuffer, │ │ │ │ │ +581 id weightsBuffer, │ │ │ │ │ +582 id duWeightsBuffer, │ │ │ │ │ +583 id dvWeightsBuffer, │ │ │ │ │ +584 int start, │ │ │ │ │ +585 int end, │ │ │ │ │ +586 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ +587 │ │ │ │ │ +_6_4_4 bool _E_v_a_l_S_t_e_n_c_i_l_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +645 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +646 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +647 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +648 id duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +649 id duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +650 id dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +651 id sizesBuffer, │ │ │ │ │ +652 id offsetsBuffer, │ │ │ │ │ +653 id indicesBuffer, │ │ │ │ │ +654 id weightsBuffer, │ │ │ │ │ +655 id duWeightsBuffer, │ │ │ │ │ +656 id dvWeightsBuffer, │ │ │ │ │ +657 id duuWeightsBuffer, │ │ │ │ │ +658 id duvWeightsBuffer, │ │ │ │ │ +659 id dvvWeightsBuffer, │ │ │ │ │ +660 int start, │ │ │ │ │ +661 int end, │ │ │ │ │ +662 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ +663 │ │ │ │ │ +669 │ │ │ │ │ +703 template │ │ │ │ │ +_7_0_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +706 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +707 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +708 int numPatchCoords, │ │ │ │ │ +709 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +710 PATCH_TABLE *patchTable, │ │ │ │ │ +711 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +712 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ +713 │ │ │ │ │ +714 if (instance) { │ │ │ │ │ +715 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +716 dstBuffer, dstDesc, │ │ │ │ │ +717 numPatchCoords, patchCoords, │ │ │ │ │ +718 patchTable, │ │ │ │ │ +719 context); │ │ │ │ │ +720 } else { │ │ │ │ │ +721 // Create an instance on demand (slow) │ │ │ │ │ +722 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +723 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +724 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +725 context); │ │ │ │ │ +726 if (instance) { │ │ │ │ │ +727 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +728 dstBuffer, dstDesc, │ │ │ │ │ +729 numPatchCoords, patchCoords, │ │ │ │ │ +730 patchTable, │ │ │ │ │ +731 context); │ │ │ │ │ +732 delete instance; │ │ │ │ │ +733 return r; │ │ │ │ │ +734 } │ │ │ │ │ +735 return false; │ │ │ │ │ +736 } │ │ │ │ │ +737 } │ │ │ │ │ +738 │ │ │ │ │ +784 template │ │ │ │ │ +_7_8_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +787 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +788 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +789 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +790 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +791 int numPatchCoords, │ │ │ │ │ +792 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +793 PATCH_TABLE *patchTable, │ │ │ │ │ +794 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r* instance, │ │ │ │ │ +795 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ +796 │ │ │ │ │ +797 if (instance) { │ │ │ │ │ +798 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +799 dstBuffer, dstDesc, │ │ │ │ │ +800 duBuffer, duDesc, │ │ │ │ │ +801 dvBuffer, dvDesc, │ │ │ │ │ +802 numPatchCoords, patchCoords, │ │ │ │ │ +803 patchTable, │ │ │ │ │ +804 context); │ │ │ │ │ +805 } else { │ │ │ │ │ +806 // Create an instance on demand (slow) │ │ │ │ │ +807 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +808 duDesc, dvDesc, context); │ │ │ │ │ +809 if (instance) { │ │ │ │ │ +810 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +811 dstBuffer, dstDesc, │ │ │ │ │ +812 duBuffer, duDesc, │ │ │ │ │ +813 dvBuffer, dvDesc, │ │ │ │ │ +814 numPatchCoords, patchCoords, │ │ │ │ │ +815 patchTable, │ │ │ │ │ +816 context); │ │ │ │ │ +817 delete instance; │ │ │ │ │ +818 return r; │ │ │ │ │ +819 } │ │ │ │ │ +820 return false; │ │ │ │ │ +821 } │ │ │ │ │ +822 } │ │ │ │ │ +823 │ │ │ │ │ +887 template │ │ │ │ │ +_8_8_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +890 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +891 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +892 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +893 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +894 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +895 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +896 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +897 int numPatchCoords, │ │ │ │ │ +898 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +899 PATCH_TABLE *patchTable, │ │ │ │ │ +900 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r* instance, │ │ │ │ │ +901 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ +902 │ │ │ │ │ +903 if (instance) { │ │ │ │ │ +904 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +905 dstBuffer, dstDesc, │ │ │ │ │ +906 duBuffer, duDesc, │ │ │ │ │ +907 dvBuffer, dvDesc, │ │ │ │ │ +908 duuBuffer, duuDesc, │ │ │ │ │ +909 duvBuffer, duvDesc, │ │ │ │ │ +910 dvvBuffer, dvvDesc, │ │ │ │ │ +911 numPatchCoords, patchCoords, │ │ │ │ │ +912 patchTable, │ │ │ │ │ +913 context); │ │ │ │ │ +914 } else { │ │ │ │ │ +915 // Create an instance on demand (slow) │ │ │ │ │ +916 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +917 duDesc, dvDesc, │ │ │ │ │ +918 duuDesc, duvDesc, dvvDesc, context); │ │ │ │ │ +919 if (instance) { │ │ │ │ │ +920 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +921 dstBuffer, dstDesc, │ │ │ │ │ +922 duBuffer, duDesc, │ │ │ │ │ +923 dvBuffer, dvDesc, │ │ │ │ │ +924 duuBuffer, duuDesc, │ │ │ │ │ +925 duvBuffer, duvDesc, │ │ │ │ │ +926 dvvBuffer, dvvDesc, │ │ │ │ │ +927 numPatchCoords, patchCoords, │ │ │ │ │ +928 patchTable, │ │ │ │ │ +929 context); │ │ │ │ │ +930 delete instance; │ │ │ │ │ +931 return r; │ │ │ │ │ +932 } │ │ │ │ │ +933 return false; │ │ │ │ │ +934 } │ │ │ │ │ +935 } │ │ │ │ │ +936 │ │ │ │ │ +964 template │ │ │ │ │ +_9_6_6 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +967 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +968 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +969 int numPatchCoords, │ │ │ │ │ +970 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +971 PATCH_TABLE *patchTable, │ │ │ │ │ +972 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ +973 │ │ │ │ │ +974 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +975 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +976 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +977 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +978 numPatchCoords, │ │ │ │ │ +979 patchCoords->BindMTLBuffer(context), │ │ │ │ │ +980 patchTable->GetPatchArrays(), │ │ │ │ │ +981 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +982 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +983 context); │ │ │ │ │ +984 } │ │ │ │ │ +985 │ │ │ │ │ +1023 template │ │ │ │ │ +_1_0_2_5 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +1026 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1027 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1028 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1029 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1030 int numPatchCoords, │ │ │ │ │ +1031 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1032 PATCH_TABLE *patchTable, │ │ │ │ │ +1033 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ +1034 │ │ │ │ │ +1035 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +1036 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +1037 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ +1038 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ +1039 numPatchCoords, │ │ │ │ │ +1040 patchCoords->BindMTLBuffer(context), │ │ │ │ │ +1041 patchTable->GetPatchArrays(), │ │ │ │ │ +1042 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +1043 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +1044 context); │ │ │ │ │ +1045 } │ │ │ │ │ +1046 │ │ │ │ │ +1102 template │ │ │ │ │ +_1_1_0_4 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +1105 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1106 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1107 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1108 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1109 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1110 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1111 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1112 int numPatchCoords, │ │ │ │ │ +1113 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1114 PATCH_TABLE *patchTable, │ │ │ │ │ +1115 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ +1116 │ │ │ │ │ +1117 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ +1118 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ +1119 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ +1120 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ +1121 duuBuffer->BindMTLBuffer(context), duuDesc, │ │ │ │ │ +1122 duvBuffer->BindMTLBuffer(context), duvDesc, │ │ │ │ │ +1123 dvvBuffer->BindMTLBuffer(context), dvvDesc, │ │ │ │ │ +1124 numPatchCoords, │ │ │ │ │ +1125 patchCoords->BindMTLBuffer(context), │ │ │ │ │ +1126 patchTable->GetPatchArrays(), │ │ │ │ │ +1127 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +1128 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +1129 context); │ │ │ │ │ +1130 } │ │ │ │ │ +1131 │ │ │ │ │ +_1_1_3_2 bool _E_v_a_l_P_a_t_c_h_e_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1133 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1134 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1135 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1136 int numPatchCoords, │ │ │ │ │ +1137 id patchCoordsBuffer, │ │ │ │ │ +1138 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ +1139 id patchIndexBuffer, │ │ │ │ │ +1140 id patchParamsBuffer, │ │ │ │ │ +1141 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ +1142 │ │ │ │ │ +_1_1_4_3 bool _E_v_a_l_P_a_t_c_h_e_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1144 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1145 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1146 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1147 id duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1148 id duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1149 id dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1150 int numPatchCoords, │ │ │ │ │ +1151 id patchCoordsBuffer, │ │ │ │ │ +1152 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ +1153 id patchIndexBuffer, │ │ │ │ │ +1154 id patchParamsBuffer, │ │ │ │ │ +1155 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ +1156 │ │ │ │ │ +1190 template │ │ │ │ │ +_1_1_9_2 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1193 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1194 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1195 int numPatchCoords, │ │ │ │ │ +1196 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1197 PATCH_TABLE *patchTable, │ │ │ │ │ +1198 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1199 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +1200 │ │ │ │ │ +1201 if (instance) { │ │ │ │ │ +1202 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1203 srcBuffer, srcDesc, │ │ │ │ │ +1204 dstBuffer, dstDesc, │ │ │ │ │ +1205 numPatchCoords, patchCoords, │ │ │ │ │ +1206 patchTable, │ │ │ │ │ +1207 deviceContext); │ │ │ │ │ +1208 } else { │ │ │ │ │ +1209 // Create an instance on demand (slow) │ │ │ │ │ +1210 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +1211 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1212 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1213 deviceContext); │ │ │ │ │ +1214 if (instance) { │ │ │ │ │ +1215 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1216 srcBuffer, srcDesc, │ │ │ │ │ +1217 dstBuffer, dstDesc, │ │ │ │ │ +1218 numPatchCoords, patchCoords, │ │ │ │ │ +1219 patchTable, │ │ │ │ │ +1220 deviceContext); │ │ │ │ │ +1221 delete instance; │ │ │ │ │ +1222 return r; │ │ │ │ │ +1223 } │ │ │ │ │ +1224 return false; │ │ │ │ │ +1225 } │ │ │ │ │ +1226 } │ │ │ │ │ +1227 │ │ │ │ │ +1255 template │ │ │ │ │ +_1_2_5_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1258 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1259 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1260 int numPatchCoords, │ │ │ │ │ +1261 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1262 PATCH_TABLE *patchTable, │ │ │ │ │ +1263 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +1264 │ │ │ │ │ +1265 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +1266 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +1267 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1268 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1269 numPatchCoords, │ │ │ │ │ +1270 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +1271 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1272 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1273 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +1274 deviceContext │ │ │ │ │ +1275 ); │ │ │ │ │ +1276 } │ │ │ │ │ +1277 │ │ │ │ │ +1323 template │ │ │ │ │ +_1_3_2_5 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1326 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1327 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1328 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1329 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1330 int numPatchCoords, │ │ │ │ │ +1331 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1332 PATCH_TABLE *patchTable, │ │ │ │ │ +1333 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1334 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +1335 │ │ │ │ │ +1336 if (instance) { │ │ │ │ │ +1337 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1338 srcBuffer, srcDesc, │ │ │ │ │ +1339 dstBuffer, dstDesc, │ │ │ │ │ +1340 duBuffer, duDesc, │ │ │ │ │ +1341 dvBuffer, dvDesc, │ │ │ │ │ +1342 numPatchCoords, patchCoords, │ │ │ │ │ +1343 patchTable, │ │ │ │ │ +1344 deviceContext); │ │ │ │ │ +1345 } else { │ │ │ │ │ +1346 // Create an instance on demand (slow) │ │ │ │ │ +1347 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +1348 duDesc, dvDesc, │ │ │ │ │ +1349 deviceContext); │ │ │ │ │ +1350 if (instance) { │ │ │ │ │ +1351 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1352 srcBuffer, srcDesc, │ │ │ │ │ +1353 dstBuffer, dstDesc, │ │ │ │ │ +1354 duBuffer, duDesc, │ │ │ │ │ +1355 dvBuffer, dvDesc, │ │ │ │ │ +1356 numPatchCoords, patchCoords, │ │ │ │ │ +1357 patchTable, │ │ │ │ │ +1358 deviceContext); │ │ │ │ │ +1359 delete instance; │ │ │ │ │ +1360 return r; │ │ │ │ │ +1361 } │ │ │ │ │ +1362 return false; │ │ │ │ │ +1363 } │ │ │ │ │ +1364 } │ │ │ │ │ +1365 │ │ │ │ │ +1405 template │ │ │ │ │ +_1_4_0_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1408 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1409 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1410 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1411 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1412 int numPatchCoords, │ │ │ │ │ +1413 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1414 PATCH_TABLE *patchTable, │ │ │ │ │ +1415 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +1416 │ │ │ │ │ +1417 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +1418 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +1419 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ +1420 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ +1421 numPatchCoords, │ │ │ │ │ +1422 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +1423 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1424 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1425 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +1426 deviceContext │ │ │ │ │ +1427 ); │ │ │ │ │ +1428 } │ │ │ │ │ +1429 │ │ │ │ │ +1430 │ │ │ │ │ +1494 template │ │ │ │ │ +_1_4_9_6 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1497 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1498 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1499 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1500 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1501 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1502 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1503 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1504 int numPatchCoords, │ │ │ │ │ +1505 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1506 PATCH_TABLE *patchTable, │ │ │ │ │ +1507 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1508 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +1509 │ │ │ │ │ +1510 if (instance) { │ │ │ │ │ +1511 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1512 srcBuffer, srcDesc, │ │ │ │ │ +1513 dstBuffer, dstDesc, │ │ │ │ │ +1514 duBuffer, duDesc, │ │ │ │ │ +1515 dvBuffer, dvDesc, │ │ │ │ │ +1516 duuBuffer, duuDesc, │ │ │ │ │ +1517 duvBuffer, duvDesc, │ │ │ │ │ +1518 dvvBuffer, dvvDesc, │ │ │ │ │ +1519 numPatchCoords, patchCoords, │ │ │ │ │ +1520 patchTable, │ │ │ │ │ +1521 deviceContext); │ │ │ │ │ +1522 } else { │ │ │ │ │ +1523 // Create an instance on demand (slow) │ │ │ │ │ +1524 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +1525 duDesc, dvDesc, │ │ │ │ │ +1526 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ +1527 deviceContext); │ │ │ │ │ +1528 if (instance) { │ │ │ │ │ +1529 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1530 srcBuffer, srcDesc, │ │ │ │ │ +1531 dstBuffer, dstDesc, │ │ │ │ │ +1532 duBuffer, duDesc, │ │ │ │ │ +1533 dvBuffer, dvDesc, │ │ │ │ │ +1534 duuBuffer, duuDesc, │ │ │ │ │ +1535 duvBuffer, duvDesc, │ │ │ │ │ +1536 dvvBuffer, dvvDesc, │ │ │ │ │ +1537 numPatchCoords, patchCoords, │ │ │ │ │ +1538 patchTable, │ │ │ │ │ +1539 deviceContext); │ │ │ │ │ +1540 delete instance; │ │ │ │ │ +1541 return r; │ │ │ │ │ +1542 } │ │ │ │ │ +1543 return false; │ │ │ │ │ +1544 } │ │ │ │ │ +1545 } │ │ │ │ │ +1546 │ │ │ │ │ +1604 template │ │ │ │ │ +_1_6_0_6 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1607 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1608 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1609 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1610 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1611 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1612 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1613 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1614 int numPatchCoords, │ │ │ │ │ +1615 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1616 PATCH_TABLE *patchTable, │ │ │ │ │ +1617 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +1618 │ │ │ │ │ +1619 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +1620 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +1621 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ +1622 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ +1623 duuBuffer->BindMTLBuffer(deviceContext), duuDesc, │ │ │ │ │ +1624 duvBuffer->BindMTLBuffer(deviceContext), duvDesc, │ │ │ │ │ +1625 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc, │ │ │ │ │ +1626 numPatchCoords, │ │ │ │ │ +1627 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +1628 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1629 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1630 patchTable->GetPatchParamBuffer(), │ │ │ │ │ +1631 deviceContext │ │ │ │ │ +1632 ); │ │ │ │ │ +1633 } │ │ │ │ │ +1634 │ │ │ │ │ +1670 template │ │ │ │ │ +_1_6_7_2 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1673 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1674 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1675 int numPatchCoords, │ │ │ │ │ +1676 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1677 PATCH_TABLE *patchTable, │ │ │ │ │ +1678 int fvarChannel, │ │ │ │ │ +1679 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1680 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +1681 │ │ │ │ │ +1682 if (instance) { │ │ │ │ │ +1683 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1684 srcBuffer, srcDesc, │ │ │ │ │ +1685 dstBuffer, dstDesc, │ │ │ │ │ +1686 numPatchCoords, patchCoords, │ │ │ │ │ +1687 patchTable, │ │ │ │ │ +1688 fvarChannel, │ │ │ │ │ +1689 deviceContext); │ │ │ │ │ +1690 } else { │ │ │ │ │ +1691 // Create an instance on demand (slow) │ │ │ │ │ +1692 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +1693 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1694 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1695 deviceContext); │ │ │ │ │ +1696 if (instance) { │ │ │ │ │ +1697 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1698 srcBuffer, srcDesc, │ │ │ │ │ +1699 dstBuffer, dstDesc, │ │ │ │ │ +1700 numPatchCoords, patchCoords, │ │ │ │ │ +1701 patchTable, │ │ │ │ │ +1702 fvarChannel, │ │ │ │ │ +1703 deviceContext); │ │ │ │ │ +1704 delete instance; │ │ │ │ │ +1705 return r; │ │ │ │ │ +1706 } │ │ │ │ │ +1707 return false; │ │ │ │ │ +1708 } │ │ │ │ │ +1709 } │ │ │ │ │ +1710 │ │ │ │ │ +1740 template │ │ │ │ │ +_1_7_4_2 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1743 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1744 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1745 int numPatchCoords, │ │ │ │ │ +1746 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1747 PATCH_TABLE *patchTable, │ │ │ │ │ +1748 int fvarChannel, │ │ │ │ │ +1749 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +1750 │ │ │ │ │ +1751 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +1752 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +1753 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1754 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1755 numPatchCoords, │ │ │ │ │ +1756 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +1757 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +1758 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1759 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ +1760 deviceContext │ │ │ │ │ +1761 ); │ │ │ │ │ +1762 } │ │ │ │ │ +1763 │ │ │ │ │ +1811 template │ │ │ │ │ +_1_8_1_3 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1814 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1815 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1816 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1817 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1818 int numPatchCoords, │ │ │ │ │ +1819 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1820 PATCH_TABLE *patchTable, │ │ │ │ │ +1821 int fvarChannel, │ │ │ │ │ +1822 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1823 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +1824 │ │ │ │ │ +1825 if (instance) { │ │ │ │ │ +1826 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1827 srcBuffer, srcDesc, │ │ │ │ │ +1828 dstBuffer, dstDesc, │ │ │ │ │ +1829 duBuffer, duDesc, │ │ │ │ │ +1830 dvBuffer, dvDesc, │ │ │ │ │ +1831 numPatchCoords, patchCoords, │ │ │ │ │ +1832 patchTable, │ │ │ │ │ +1833 fvarChannel, │ │ │ │ │ +1834 deviceContext); │ │ │ │ │ +1835 } else { │ │ │ │ │ +1836 // Create an instance on demand (slow) │ │ │ │ │ +1837 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +1838 duDesc, dvDesc, │ │ │ │ │ +1839 deviceContext); │ │ │ │ │ +1840 if (instance) { │ │ │ │ │ +1841 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1842 srcBuffer, srcDesc, │ │ │ │ │ +1843 dstBuffer, dstDesc, │ │ │ │ │ +1844 duBuffer, duDesc, │ │ │ │ │ +1845 dvBuffer, dvDesc, │ │ │ │ │ +1846 numPatchCoords, patchCoords, │ │ │ │ │ +1847 patchTable, │ │ │ │ │ +1848 fvarChannel, │ │ │ │ │ +1849 deviceContext); │ │ │ │ │ +1850 delete instance; │ │ │ │ │ +1851 return r; │ │ │ │ │ +1852 } │ │ │ │ │ +1853 return false; │ │ │ │ │ +1854 } │ │ │ │ │ +1855 } │ │ │ │ │ +1856 │ │ │ │ │ +1898 template │ │ │ │ │ +_1_9_0_0 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1901 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1902 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1903 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1904 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1905 int numPatchCoords, │ │ │ │ │ +1906 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1907 PATCH_TABLE *patchTable, │ │ │ │ │ +1908 int fvarChannel, │ │ │ │ │ +1909 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +1910 │ │ │ │ │ +1911 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +1912 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +1913 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ +1914 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ +1915 numPatchCoords, │ │ │ │ │ +1916 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +1917 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +1918 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1919 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ +1920 deviceContext │ │ │ │ │ +1921 ); │ │ │ │ │ +1922 } │ │ │ │ │ +1923 │ │ │ │ │ +1989 template │ │ │ │ │ +_1_9_9_1 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1992 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1993 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1994 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1995 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1996 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1997 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1998 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1999 int numPatchCoords, │ │ │ │ │ +2000 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +2001 PATCH_TABLE *patchTable, │ │ │ │ │ +2002 int fvarChannel, │ │ │ │ │ +2003 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +2004 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ +2005 │ │ │ │ │ +2006 if (instance) { │ │ │ │ │ +2007 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +2008 srcBuffer, srcDesc, │ │ │ │ │ +2009 dstBuffer, dstDesc, │ │ │ │ │ +2010 duBuffer, duDesc, │ │ │ │ │ +2011 dvBuffer, dvDesc, │ │ │ │ │ +2012 duuBuffer, duuDesc, │ │ │ │ │ +2013 duvBuffer, duvDesc, │ │ │ │ │ +2014 dvvBuffer, dvvDesc, │ │ │ │ │ +2015 numPatchCoords, patchCoords, │ │ │ │ │ +2016 patchTable, │ │ │ │ │ +2017 fvarChannel, │ │ │ │ │ +2018 deviceContext); │ │ │ │ │ +2019 } else { │ │ │ │ │ +2020 // Create an instance on demand (slow) │ │ │ │ │ +2021 instance = Create(srcDesc, dstDesc, │ │ │ │ │ +2022 duDesc, dvDesc, │ │ │ │ │ +2023 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ +2024 deviceContext); │ │ │ │ │ +2025 if (instance) { │ │ │ │ │ +2026 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +2027 srcBuffer, srcDesc, │ │ │ │ │ +2028 dstBuffer, dstDesc, │ │ │ │ │ +2029 duBuffer, duDesc, │ │ │ │ │ +2030 dvBuffer, dvDesc, │ │ │ │ │ +2031 duuBuffer, duuDesc, │ │ │ │ │ +2032 duvBuffer, duvDesc, │ │ │ │ │ +2033 dvvBuffer, dvvDesc, │ │ │ │ │ +2034 numPatchCoords, patchCoords, │ │ │ │ │ +2035 patchTable, │ │ │ │ │ +2036 fvarChannel, │ │ │ │ │ +2037 deviceContext); │ │ │ │ │ +2038 delete instance; │ │ │ │ │ +2039 return r; │ │ │ │ │ +2040 } │ │ │ │ │ +2041 return false; │ │ │ │ │ +2042 } │ │ │ │ │ +2043 } │ │ │ │ │ +2044 │ │ │ │ │ +2104 template │ │ │ │ │ +_2_1_0_6 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +2107 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2108 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2109 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +2110 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +2111 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +2112 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +2113 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +2114 int numPatchCoords, │ │ │ │ │ +2115 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +2116 PATCH_TABLE *patchTable, │ │ │ │ │ +2117 int fvarChannel, │ │ │ │ │ +2118 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ +2119 │ │ │ │ │ +2120 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ +2121 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ +2122 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ +2123 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ +2124 duuBuffer->BindMTLBuffer(deviceContext), duuDesc, │ │ │ │ │ +2125 duvBuffer->BindMTLBuffer(deviceContext), duvDesc, │ │ │ │ │ +2126 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc, │ │ │ │ │ +2127 numPatchCoords, │ │ │ │ │ +2128 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ +2129 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +2130 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +2131 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ +2132 fvarChannel, │ │ │ │ │ +2133 deviceContext │ │ │ │ │ +2134 ); │ │ │ │ │ +2135 } │ │ │ │ │ +2136 │ │ │ │ │ +_2_1_3_8 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2139 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2140 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +2141 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +2142 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +2143 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +2144 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +2145 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +2146 │ │ │ │ │ +_2_1_4_8 static void _S_y_n_c_h_r_o_n_i_z_e(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +2149 │ │ │ │ │ +2150 private: │ │ │ │ │ +2151 │ │ │ │ │ +2152 id _computeLibrary; │ │ │ │ │ +2153 id _evalStencils; │ │ │ │ │ +2154 id _evalPatches; │ │ │ │ │ +2155 id _parameterBuffer; │ │ │ │ │ +2156 │ │ │ │ │ +2157 int _workGroupSize; │ │ │ │ │ +2158}; │ │ │ │ │ +2159 │ │ │ │ │ +2160} //end namespace Osd │ │ │ │ │ +2161 │ │ │ │ │ +2162} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ +2163using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +2164 │ │ │ │ │ +2165} //end namespace OpenSubdiv │ │ │ │ │ +2166 │ │ │ │ │ +2167#endif // OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ -@ GREGORY_BOUNDARY │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchArray > PatchArrayVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t │ │ │ │ │ DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ -int GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ -*farPatchTable, DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetVertexValenceBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetQuadOffsetsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ -*farPatchTable, MTLContext *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -void UpdateVertexBuffer(id< MTLBuffer > vbo, int numVertices, int │ │ │ │ │ -numVertexElements, MTLContext *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_~_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~MTLLegacyGregoryPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetVertexBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +MTLStencilTable(Far::LimitStencilTable const *stencilTable, MTLContext │ │ │ │ │ +*context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetDuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +~MTLStencilTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetDvvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +MTLStencilTable(Far::StencilTable const *stencilTable, MTLContext *context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetDuuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetDuvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetIndicesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetSizesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetOffsetsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLStencilTable * Create(STENCIL_TABLE *stencilTable, DEVICE_CONTEXT │ │ │ │ │ +context) │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetDvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ +duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor │ │ │ │ │ +const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< │ │ │ │ │ +MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, id< MTLBuffer > │ │ │ │ │ +sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< │ │ │ │ │ +MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > │ │ │ │ │ +dvWeightsBuffer, id< MTLBuffer > duuWeightsBuffer, id< MTLBuffer > │ │ │ │ │ +duvWeightsBuffer, id< MTLBuffer > dvvWeightsBuffer, int start, int end, │ │ │ │ │ +MTLContext *context) const │ │ │ │ │ +Dispatch the MTL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ +kernel hasn't been compile... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, MTLComputeEvaluator *instance, MTLContext *context) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_1_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ +MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_9_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +MTLComputeEvaluator() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_~_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +~MTLComputeEvaluator() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator │ │ │ │ │ +const *instance, MTLContext *context) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ +bool Instantiatable │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_2_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext │ │ │ │ │ +*deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator │ │ │ │ │ +const *instance, MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ +*stencilTable, MTLContext *context) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ +duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor │ │ │ │ │ +const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< │ │ │ │ │ +MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, id< │ │ │ │ │ +MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< │ │ │ │ │ +MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext │ │ │ │ │ +*context) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ +MTLContext *deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_1_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +static void Synchronize(MTLContext *context) │ │ │ │ │ +Wait for the dispatched kernel to finish. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_4_3_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, │ │ │ │ │ +MTLContext *context) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_8_8_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel, MTLContext *deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_7_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ +MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_9_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLContext │ │ │ │ │ +*context) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_0_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ +duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > │ │ │ │ │ +offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, │ │ │ │ │ +id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, int start, │ │ │ │ │ +int end, MTLContext *context) const │ │ │ │ │ +Dispatch the MTL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ +kernel hasn't been compile... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator │ │ │ │ │ +const *instance, MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) │ │ │ │ │ +const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ +const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, │ │ │ │ │ +MTLContext *deviceContext) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_3_2_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_0_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, MTLContext *context) const │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_0_2_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, MTLContext *deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext │ │ │ │ │ +*deviceContext) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, MTLContext *context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ +BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext │ │ │ │ │ +*context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ +bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ +BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ +BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ +BufferDescriptor const &dvvDesc, MTLContext *context) │ │ │ │ │ +Configure compute pipline state. Returns false if it fails to create the │ │ │ │ │ +pipeline state. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ +duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, id< MTLBuffer > │ │ │ │ │ +patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > │ │ │ │ │ +patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │
│ │ │ │ Namespaces | │ │ │ │ Typedefs
│ │ │ │
mtlMesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/mesh.h"
│ │ │ │ -#include "../osd/mtlPatchTable.h"
│ │ │ │ +#include "../osd/mesh.h"
│ │ │ │ +#include "../osd/mtlPatchTable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ @@ -142,17 +142,17 @@ │ │ │ │
41
│ │ │ │
42} // end namespace OPENSUBDIV_VERSION
│ │ │ │
43using namespace OPENSUBDIV_VERSION;
│ │ │ │
44
│ │ │ │
45} // end namespace OpenSubdiv
│ │ │ │
46
│ │ │ │
47#endif // OPENSUBDIV3_OSD_MTL_MESH_H
│ │ │ │ - │ │ │ │ + │ │ │ │
MeshInterface< MTLPatchTable > MTLMeshInterface
Definition mtlMesh.h:38
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mtlComputeEvaluator.h File Reference
│ │ │ │ +
mtlPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ #include "../osd/types.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ -#include "../osd/mtlCommon.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MTLStencilTable
 
class  MTLComputeEvaluator
class  MTLPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,13 +122,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlComputeEvaluator.h File Reference │ │ │ │ │ +mtlPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ #include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ #include "_._._/_o_s_d_/_m_t_l_C_o_m_m_o_n_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  │ │ │ │ │ -class   _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00818 = [ │ │ │ │ │ - ["MTLStencilTable", "a01289.html", "a01289"], │ │ │ │ │ - ["MTLComputeEvaluator", "a01293.html", "a01293"] │ │ │ │ │ + ["MTLPatchTable", "a01305.html", "a01305"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mtlComputeEvaluator.h
│ │ │ │ +
mtlPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,1138 +119,123 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../osd/types.h"
│ │ │ │ -
31#include "../osd/bufferDescriptor.h"
│ │ │ │ +
29#include "../far/patchDescriptor.h"
│ │ │ │ +
30#include "../osd/nonCopyable.h"
│ │ │ │ +
31#include "../osd/types.h"
│ │ │ │
32#include "../osd/mtlCommon.h"
│ │ │ │
33
│ │ │ │
34@protocol MTLDevice;
│ │ │ │
35@protocol MTLBuffer;
│ │ │ │ -
36@protocol MTLLibrary;
│ │ │ │ -
37@protocol MTLComputePipelineState;
│ │ │ │ -
38
│ │ │ │ -
39namespace OpenSubdiv {
│ │ │ │ -
40namespace OPENSUBDIV_VERSION {
│ │ │ │ -
41
│ │ │ │ -
42namespace Far {
│ │ │ │ -
43 class PatchTable;
│ │ │ │ -
44 class StencilTable;
│ │ │ │ -
45 class LimitStencilTable;
│ │ │ │ -
46}
│ │ │ │ -
47
│ │ │ │ -
48namespace Osd {
│ │ │ │ +
36
│ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │ +
39
│ │ │ │ +
40namespace Far {
│ │ │ │ +
41 class PatchTable;
│ │ │ │ +
42};
│ │ │ │ +
43
│ │ │ │ +
44namespace Osd {
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
46class MTLPatchTable : private NonCopyable<MTLPatchTable> {
│ │ │ │ +
47public:
│ │ │ │ +
48 typedef id<MTLBuffer> VertexBufferBinding;
│ │ │ │
49
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51{
│ │ │ │ -
52public:
│ │ │ │ -
53 template<typename STENCIL_TABLE, typename DEVICE_CONTEXT>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
53 template<typename DEVICE_CONTEXT>
│ │ │ │
│ │ │ │ -
54 static MTLStencilTable* Create(STENCIL_TABLE* stencilTable,
│ │ │ │ -
55 DEVICE_CONTEXT context)
│ │ │ │ -
56 {
│ │ │ │ -
57 return new MTLStencilTable(stencilTable, context);
│ │ │ │ -
58 }
│ │ │ │ +
54 static MTLPatchTable *Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ +
55 {
│ │ │ │ +
56 return Create(farPatchTable, context);
│ │ │ │ +
57 }
│ │ │ │
│ │ │ │ -
59
│ │ │ │ +
58
│ │ │ │ +
59 static MTLPatchTable *Create(Far::PatchTable const *farPatchTable, MTLContext* context);
│ │ │ │
60
│ │ │ │ -
61 MTLStencilTable(Far::StencilTable const* stencilTable, MTLContext* context);
│ │ │ │ -
62 MTLStencilTable(Far::LimitStencilTable const* stencilTable, MTLContext* context);
│ │ │ │ - │ │ │ │ +
61 PatchArrayVector const &GetPatchArrays() const { return _patchArrays; }
│ │ │ │ +
62 id<MTLBuffer> GetPatchIndexBuffer() const { return _indexBuffer; }
│ │ │ │ +
63 id<MTLBuffer> GetPatchParamBuffer() const { return _patchParamBuffer; }
│ │ │ │
64
│ │ │ │ -
65 id<MTLBuffer> GetSizesBuffer() const { return _sizesBuffer; }
│ │ │ │ -
66 id<MTLBuffer> GetOffsetsBuffer() const { return _offsetsBuffer; }
│ │ │ │ -
67 id<MTLBuffer> GetIndicesBuffer() const { return _indicesBuffer; }
│ │ │ │ -
68 id<MTLBuffer> GetWeightsBuffer() const { return _weightsBuffer; }
│ │ │ │ -
69 id<MTLBuffer> GetDuWeightsBuffer() const { return _duWeightsBuffer; }
│ │ │ │ -
70 id<MTLBuffer> GetDvWeightsBuffer() const { return _dvWeightsBuffer; }
│ │ │ │ -
71 id<MTLBuffer> GetDuuWeightsBuffer() const { return _duuWeightsBuffer; }
│ │ │ │ -
72 id<MTLBuffer> GetDuvWeightsBuffer() const { return _duvWeightsBuffer; }
│ │ │ │ -
73 id<MTLBuffer> GetDvvWeightsBuffer() const { return _dvvWeightsBuffer; }
│ │ │ │ -
74
│ │ │ │ -
75 int GetNumStencils() const { return _numStencils; }
│ │ │ │ -
76
│ │ │ │ -
77private:
│ │ │ │ -
78 id<MTLBuffer> _sizesBuffer;
│ │ │ │ -
79 id<MTLBuffer> _offsetsBuffer;
│ │ │ │ -
80 id<MTLBuffer> _indicesBuffer;
│ │ │ │ -
81 id<MTLBuffer> _weightsBuffer;
│ │ │ │ -
82 id<MTLBuffer> _duWeightsBuffer;
│ │ │ │ -
83 id<MTLBuffer> _dvWeightsBuffer;
│ │ │ │ -
84 id<MTLBuffer> _duuWeightsBuffer;
│ │ │ │ -
85 id<MTLBuffer> _duvWeightsBuffer;
│ │ │ │ -
86 id<MTLBuffer> _dvvWeightsBuffer;
│ │ │ │ -
87
│ │ │ │ -
88 int _numStencils;
│ │ │ │ -
89};
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
92{
│ │ │ │ -
93public:
│ │ │ │ -
94 typedef bool Instantiatable;
│ │ │ │ -
95
│ │ │ │ - │ │ │ │ -
97 BufferDescriptor const &dstDesc,
│ │ │ │ -
98 BufferDescriptor const &duDesc,
│ │ │ │ -
99 BufferDescriptor const &dvDesc,
│ │ │ │ -
100 MTLContext* context);
│ │ │ │ -
101
│ │ │ │ - │ │ │ │ -
103 BufferDescriptor const &dstDesc,
│ │ │ │ -
104 BufferDescriptor const &duDesc,
│ │ │ │ -
105 BufferDescriptor const &dvDesc,
│ │ │ │ -
106 BufferDescriptor const &duuDesc,
│ │ │ │ -
107 BufferDescriptor const &duvDesc,
│ │ │ │ -
108 BufferDescriptor const &dvvDesc,
│ │ │ │ -
109 MTLContext* context);
│ │ │ │ -
110
│ │ │ │ - │ │ │ │ - │ │ │ │ -
113
│ │ │ │ -
119
│ │ │ │ -
148 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
149 static bool EvalStencils(
│ │ │ │ -
150 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
151 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
152 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
153 MTLComputeEvaluator const *instance,
│ │ │ │ -
154 MTLContext* context)
│ │ │ │ -
155 {
│ │ │ │ -
156 if (instance) {
│ │ │ │ -
157 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
158 dstBuffer, dstDesc,
│ │ │ │ -
159 stencilTable,
│ │ │ │ -
160 context);
│ │ │ │ -
161 } else {
│ │ │ │ -
162 // Create an instance on demand (slow)
│ │ │ │ -
163 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
166 context);
│ │ │ │ -
167 if (instance) {
│ │ │ │ -
168 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
169 dstBuffer, dstDesc,
│ │ │ │ -
170 stencilTable,
│ │ │ │ -
171 context);
│ │ │ │ -
172 delete instance;
│ │ │ │ -
173 return r;
│ │ │ │ -
174 }
│ │ │ │ -
175 return false;
│ │ │ │ -
176 }
│ │ │ │ -
177 }
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
219 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
220 static bool EvalStencils(
│ │ │ │ -
221 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
222 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
223 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
224 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
225 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
226 MTLComputeEvaluator const *instance,
│ │ │ │ -
227 MTLContext* context) {
│ │ │ │ -
228
│ │ │ │ -
229 if (instance) {
│ │ │ │ -
230 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
231 dstBuffer, dstDesc,
│ │ │ │ -
232 duBuffer, duDesc,
│ │ │ │ -
233 dvBuffer, dvDesc,
│ │ │ │ -
234 stencilTable,
│ │ │ │ -
235 context);
│ │ │ │ -
236 } else {
│ │ │ │ -
237 // Create an instance on demand (slow)
│ │ │ │ -
238 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, context);
│ │ │ │ -
239 if (instance) {
│ │ │ │ -
240 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
241 dstBuffer, dstDesc,
│ │ │ │ -
242 duBuffer, duDesc,
│ │ │ │ -
243 dvBuffer, dvDesc,
│ │ │ │ -
244 stencilTable,
│ │ │ │ -
245 context);
│ │ │ │ -
246 delete instance;
│ │ │ │ -
247 return r;
│ │ │ │ -
248 }
│ │ │ │ -
249 return false;
│ │ │ │ -
250 }
│ │ │ │ -
251 }
│ │ │ │ -
│ │ │ │ -
252
│ │ │ │ -
311 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
312 static bool EvalStencils(
│ │ │ │ -
313 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
314 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
315 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
316 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
317 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
318 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
319 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
320 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
321 MTLComputeEvaluator const *instance,
│ │ │ │ -
322 MTLContext* context) {
│ │ │ │ -
323
│ │ │ │ -
324 if (instance) {
│ │ │ │ -
325 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
326 dstBuffer, dstDesc,
│ │ │ │ -
327 duBuffer, duDesc,
│ │ │ │ -
328 dvBuffer, dvDesc,
│ │ │ │ -
329 duuBuffer, duuDesc,
│ │ │ │ -
330 duvBuffer, duvDesc,
│ │ │ │ -
331 dvvBuffer, dvvDesc,
│ │ │ │ -
332 stencilTable,
│ │ │ │ -
333 context);
│ │ │ │ -
334 } else {
│ │ │ │ -
335 // Create an instance on demand (slow)
│ │ │ │ -
336 instance = Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ -
337 duuDesc, duvDesc, dvvDesc, context);
│ │ │ │ -
338 if (instance) {
│ │ │ │ -
339 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
340 dstBuffer, dstDesc,
│ │ │ │ -
341 duBuffer, duDesc,
│ │ │ │ -
342 dvBuffer, dvDesc,
│ │ │ │ -
343 duuBuffer, duuDesc,
│ │ │ │ -
344 duvBuffer, duvDesc,
│ │ │ │ -
345 dvvBuffer, dvvDesc,
│ │ │ │ -
346 stencilTable,
│ │ │ │ -
347 context);
│ │ │ │ -
348 delete instance;
│ │ │ │ -
349 return r;
│ │ │ │ -
350 }
│ │ │ │ -
351 return false;
│ │ │ │ -
352 }
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
375 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
377 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
378 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
379 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
380 MTLContext* context) const
│ │ │ │ -
381 {
│ │ │ │ -
382 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
383 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
384 0, BufferDescriptor(),
│ │ │ │ -
385 0, BufferDescriptor(),
│ │ │ │ -
386 stencilTable->GetSizesBuffer(),
│ │ │ │ -
387 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
388 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
389 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
390 0,
│ │ │ │ -
391 0,
│ │ │ │ -
392 /* start = */ 0,
│ │ │ │ -
393 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ -
394 context);
│ │ │ │ -
395 }
│ │ │ │ -
│ │ │ │ -
396
│ │ │ │ -
429 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
431 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
432 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
433 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
434 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
435 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
436 MTLContext* context) const
│ │ │ │ -
437 {
│ │ │ │ -
438 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
439 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
440 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ -
441 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ -
442 stencilTable->GetSizesBuffer(),
│ │ │ │ -
443 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
444 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
445 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
446 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
447 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
448 /* start = */ 0,
│ │ │ │ -
449 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ -
450 context);
│ │ │ │ -
451 }
│ │ │ │ -
│ │ │ │ -
452
│ │ │ │ -
503 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
505 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
506 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
507 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
508 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
509 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
510 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
511 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
512 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
513 MTLContext* context) const
│ │ │ │ -
514 {
│ │ │ │ -
515 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
516 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
517 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ -
518 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ -
519 duuBuffer->BindMTLBuffer(context), duuDesc,
│ │ │ │ -
520 duvBuffer->BindMTLBuffer(context), duvDesc,
│ │ │ │ -
521 dvvBuffer->BindMTLBuffer(context), dvvDesc,
│ │ │ │ -
522 stencilTable->GetSizesBuffer(),
│ │ │ │ -
523 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
524 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
525 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
526 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
527 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
528 stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ -
529 stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ -
530 stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ -
531 /* start = */ 0,
│ │ │ │ -
532 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ -
533 context);
│ │ │ │ -
534 }
│ │ │ │ -
│ │ │ │ -
535
│ │ │ │ -
574 bool EvalStencils(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
575 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
576 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
577 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
578 id<MTLBuffer> sizesBuffer,
│ │ │ │ -
579 id<MTLBuffer> offsetsBuffer,
│ │ │ │ -
580 id<MTLBuffer> indicesBuffer,
│ │ │ │ -
581 id<MTLBuffer> weightsBuffer,
│ │ │ │ -
582 id<MTLBuffer> duWeightsBuffer,
│ │ │ │ -
583 id<MTLBuffer> dvWeightsBuffer,
│ │ │ │ -
584 int start,
│ │ │ │ -
585 int end,
│ │ │ │ -
586 MTLContext* context) const;
│ │ │ │ -
587
│ │ │ │ -
644 bool EvalStencils(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
645 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
646 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
647 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
648 id<MTLBuffer> duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
649 id<MTLBuffer> duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
650 id<MTLBuffer> dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
651 id<MTLBuffer> sizesBuffer,
│ │ │ │ -
652 id<MTLBuffer> offsetsBuffer,
│ │ │ │ -
653 id<MTLBuffer> indicesBuffer,
│ │ │ │ -
654 id<MTLBuffer> weightsBuffer,
│ │ │ │ -
655 id<MTLBuffer> duWeightsBuffer,
│ │ │ │ -
656 id<MTLBuffer> dvWeightsBuffer,
│ │ │ │ -
657 id<MTLBuffer> duuWeightsBuffer,
│ │ │ │ -
658 id<MTLBuffer> duvWeightsBuffer,
│ │ │ │ -
659 id<MTLBuffer> dvvWeightsBuffer,
│ │ │ │ -
660 int start,
│ │ │ │ -
661 int end,
│ │ │ │ -
662 MTLContext* context) const;
│ │ │ │ -
663
│ │ │ │ -
669
│ │ │ │ -
703 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
704 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
705 static bool EvalPatches(
│ │ │ │ -
706 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
707 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
708 int numPatchCoords,
│ │ │ │ -
709 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
710 PATCH_TABLE *patchTable,
│ │ │ │ -
711 MTLComputeEvaluator const *instance,
│ │ │ │ -
712 MTLContext* context) {
│ │ │ │ -
713
│ │ │ │ -
714 if (instance) {
│ │ │ │ -
715 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
716 dstBuffer, dstDesc,
│ │ │ │ -
717 numPatchCoords, patchCoords,
│ │ │ │ -
718 patchTable,
│ │ │ │ -
719 context);
│ │ │ │ -
720 } else {
│ │ │ │ -
721 // Create an instance on demand (slow)
│ │ │ │ -
722 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
725 context);
│ │ │ │ -
726 if (instance) {
│ │ │ │ -
727 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
728 dstBuffer, dstDesc,
│ │ │ │ -
729 numPatchCoords, patchCoords,
│ │ │ │ -
730 patchTable,
│ │ │ │ -
731 context);
│ │ │ │ -
732 delete instance;
│ │ │ │ -
733 return r;
│ │ │ │ -
734 }
│ │ │ │ -
735 return false;
│ │ │ │ -
736 }
│ │ │ │ -
737 }
│ │ │ │ -
│ │ │ │ -
738
│ │ │ │ -
784 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
785 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
786 static bool EvalPatches(
│ │ │ │ -
787 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
788 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
789 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
790 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
791 int numPatchCoords,
│ │ │ │ -
792 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
793 PATCH_TABLE *patchTable,
│ │ │ │ -
794 MTLComputeEvaluator* instance,
│ │ │ │ -
795 MTLContext* context) {
│ │ │ │ -
796
│ │ │ │ -
797 if (instance) {
│ │ │ │ -
798 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
799 dstBuffer, dstDesc,
│ │ │ │ -
800 duBuffer, duDesc,
│ │ │ │ -
801 dvBuffer, dvDesc,
│ │ │ │ -
802 numPatchCoords, patchCoords,
│ │ │ │ -
803 patchTable,
│ │ │ │ -
804 context);
│ │ │ │ -
805 } else {
│ │ │ │ -
806 // Create an instance on demand (slow)
│ │ │ │ -
807 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
808 duDesc, dvDesc, context);
│ │ │ │ -
809 if (instance) {
│ │ │ │ -
810 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
811 dstBuffer, dstDesc,
│ │ │ │ -
812 duBuffer, duDesc,
│ │ │ │ -
813 dvBuffer, dvDesc,
│ │ │ │ -
814 numPatchCoords, patchCoords,
│ │ │ │ -
815 patchTable,
│ │ │ │ -
816 context);
│ │ │ │ -
817 delete instance;
│ │ │ │ -
818 return r;
│ │ │ │ -
819 }
│ │ │ │ -
820 return false;
│ │ │ │ -
821 }
│ │ │ │ -
822 }
│ │ │ │ -
│ │ │ │ -
823
│ │ │ │ -
887 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
888 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
889 static bool EvalPatches(
│ │ │ │ -
890 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
891 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
892 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
893 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
894 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
895 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
896 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
897 int numPatchCoords,
│ │ │ │ -
898 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
899 PATCH_TABLE *patchTable,
│ │ │ │ -
900 MTLComputeEvaluator* instance,
│ │ │ │ -
901 MTLContext* context) {
│ │ │ │ -
902
│ │ │ │ -
903 if (instance) {
│ │ │ │ -
904 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
905 dstBuffer, dstDesc,
│ │ │ │ -
906 duBuffer, duDesc,
│ │ │ │ -
907 dvBuffer, dvDesc,
│ │ │ │ -
908 duuBuffer, duuDesc,
│ │ │ │ -
909 duvBuffer, duvDesc,
│ │ │ │ -
910 dvvBuffer, dvvDesc,
│ │ │ │ -
911 numPatchCoords, patchCoords,
│ │ │ │ -
912 patchTable,
│ │ │ │ -
913 context);
│ │ │ │ -
914 } else {
│ │ │ │ -
915 // Create an instance on demand (slow)
│ │ │ │ -
916 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
917 duDesc, dvDesc,
│ │ │ │ -
918 duuDesc, duvDesc, dvvDesc, context);
│ │ │ │ -
919 if (instance) {
│ │ │ │ -
920 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
921 dstBuffer, dstDesc,
│ │ │ │ -
922 duBuffer, duDesc,
│ │ │ │ -
923 dvBuffer, dvDesc,
│ │ │ │ -
924 duuBuffer, duuDesc,
│ │ │ │ -
925 duvBuffer, duvDesc,
│ │ │ │ -
926 dvvBuffer, dvvDesc,
│ │ │ │ -
927 numPatchCoords, patchCoords,
│ │ │ │ -
928 patchTable,
│ │ │ │ -
929 context);
│ │ │ │ -
930 delete instance;
│ │ │ │ -
931 return r;
│ │ │ │ -
932 }
│ │ │ │ -
933 return false;
│ │ │ │ -
934 }
│ │ │ │ -
935 }
│ │ │ │ -
│ │ │ │ -
936
│ │ │ │ -
964 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
965 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
967 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
968 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
969 int numPatchCoords,
│ │ │ │ -
970 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
971 PATCH_TABLE *patchTable,
│ │ │ │ -
972 MTLContext* context) const {
│ │ │ │ -
973
│ │ │ │ -
974 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
975 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
976 0, BufferDescriptor(),
│ │ │ │ -
977 0, BufferDescriptor(),
│ │ │ │ -
978 numPatchCoords,
│ │ │ │ -
979 patchCoords->BindMTLBuffer(context),
│ │ │ │ -
980 patchTable->GetPatchArrays(),
│ │ │ │ -
981 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
982 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
983 context);
│ │ │ │ -
984 }
│ │ │ │ -
│ │ │ │ -
985
│ │ │ │ -
1023 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1024 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1026 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1027 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1028 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1029 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1030 int numPatchCoords,
│ │ │ │ -
1031 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1032 PATCH_TABLE *patchTable,
│ │ │ │ -
1033 MTLContext* context) const {
│ │ │ │ -
1034
│ │ │ │ -
1035 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
1036 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
1037 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ -
1038 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ -
1039 numPatchCoords,
│ │ │ │ -
1040 patchCoords->BindMTLBuffer(context),
│ │ │ │ -
1041 patchTable->GetPatchArrays(),
│ │ │ │ -
1042 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
1043 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
1044 context);
│ │ │ │ -
1045 }
│ │ │ │ -
│ │ │ │ -
1046
│ │ │ │ -
1102 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1103 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1105 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1106 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1107 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1108 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1109 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1110 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1111 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1112 int numPatchCoords,
│ │ │ │ -
1113 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1114 PATCH_TABLE *patchTable,
│ │ │ │ -
1115 MTLContext* context) const {
│ │ │ │ -
1116
│ │ │ │ -
1117 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc,
│ │ │ │ -
1118 dstBuffer->BindMTLBuffer(context), dstDesc,
│ │ │ │ -
1119 duBuffer->BindMTLBuffer(context), duDesc,
│ │ │ │ -
1120 dvBuffer->BindMTLBuffer(context), dvDesc,
│ │ │ │ -
1121 duuBuffer->BindMTLBuffer(context), duuDesc,
│ │ │ │ -
1122 duvBuffer->BindMTLBuffer(context), duvDesc,
│ │ │ │ -
1123 dvvBuffer->BindMTLBuffer(context), dvvDesc,
│ │ │ │ -
1124 numPatchCoords,
│ │ │ │ -
1125 patchCoords->BindMTLBuffer(context),
│ │ │ │ -
1126 patchTable->GetPatchArrays(),
│ │ │ │ -
1127 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
1128 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
1129 context);
│ │ │ │ -
1130 }
│ │ │ │ -
│ │ │ │ -
1131
│ │ │ │ -
1132 bool EvalPatches(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1133 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1134 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1135 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1136 int numPatchCoords,
│ │ │ │ -
1137 id<MTLBuffer> patchCoordsBuffer,
│ │ │ │ -
1138 const PatchArrayVector &patchArrays,
│ │ │ │ -
1139 id<MTLBuffer> patchIndexBuffer,
│ │ │ │ -
1140 id<MTLBuffer> patchParamsBuffer,
│ │ │ │ -
1141 MTLContext* context) const;
│ │ │ │ -
1142
│ │ │ │ -
1143 bool EvalPatches(id<MTLBuffer> srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1144 id<MTLBuffer> dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1145 id<MTLBuffer> duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1146 id<MTLBuffer> dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1147 id<MTLBuffer> duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1148 id<MTLBuffer> duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1149 id<MTLBuffer> dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1150 int numPatchCoords,
│ │ │ │ -
1151 id<MTLBuffer> patchCoordsBuffer,
│ │ │ │ -
1152 const PatchArrayVector &patchArrays,
│ │ │ │ -
1153 id<MTLBuffer> patchIndexBuffer,
│ │ │ │ -
1154 id<MTLBuffer> patchParamsBuffer,
│ │ │ │ -
1155 MTLContext* context) const;
│ │ │ │ -
1156
│ │ │ │ -
1190 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1191 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1193 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1194 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1195 int numPatchCoords,
│ │ │ │ -
1196 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1197 PATCH_TABLE *patchTable,
│ │ │ │ -
1198 MTLComputeEvaluator const *instance,
│ │ │ │ -
1199 MTLContext* deviceContext) {
│ │ │ │ -
1200
│ │ │ │ -
1201 if (instance) {
│ │ │ │ -
1202 return instance->EvalPatchesVarying(
│ │ │ │ -
1203 srcBuffer, srcDesc,
│ │ │ │ -
1204 dstBuffer, dstDesc,
│ │ │ │ -
1205 numPatchCoords, patchCoords,
│ │ │ │ -
1206 patchTable,
│ │ │ │ -
1207 deviceContext);
│ │ │ │ -
1208 } else {
│ │ │ │ -
1209 // Create an instance on demand (slow)
│ │ │ │ -
1210 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
1213 deviceContext);
│ │ │ │ -
1214 if (instance) {
│ │ │ │ -
1215 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1216 srcBuffer, srcDesc,
│ │ │ │ -
1217 dstBuffer, dstDesc,
│ │ │ │ -
1218 numPatchCoords, patchCoords,
│ │ │ │ -
1219 patchTable,
│ │ │ │ -
1220 deviceContext);
│ │ │ │ -
1221 delete instance;
│ │ │ │ -
1222 return r;
│ │ │ │ -
1223 }
│ │ │ │ -
1224 return false;
│ │ │ │ -
1225 }
│ │ │ │ -
1226 }
│ │ │ │ -
│ │ │ │ -
1227
│ │ │ │ -
1255 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1256 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1258 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1259 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1260 int numPatchCoords,
│ │ │ │ -
1261 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1262 PATCH_TABLE *patchTable,
│ │ │ │ -
1263 MTLContext* deviceContext) const {
│ │ │ │ -
1264
│ │ │ │ -
1265 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
1266 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
1267 0, BufferDescriptor(),
│ │ │ │ -
1268 0, BufferDescriptor(),
│ │ │ │ -
1269 numPatchCoords,
│ │ │ │ -
1270 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
1271 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1272 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1273 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
1274 deviceContext
│ │ │ │ -
1275 );
│ │ │ │ -
1276 }
│ │ │ │ -
│ │ │ │ -
1277
│ │ │ │ -
1323 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1324 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1326 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1327 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1328 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1329 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1330 int numPatchCoords,
│ │ │ │ -
1331 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1332 PATCH_TABLE *patchTable,
│ │ │ │ -
1333 MTLComputeEvaluator const *instance,
│ │ │ │ -
1334 MTLContext* deviceContext) {
│ │ │ │ -
1335
│ │ │ │ -
1336 if (instance) {
│ │ │ │ -
1337 return instance->EvalPatchesVarying(
│ │ │ │ -
1338 srcBuffer, srcDesc,
│ │ │ │ -
1339 dstBuffer, dstDesc,
│ │ │ │ -
1340 duBuffer, duDesc,
│ │ │ │ -
1341 dvBuffer, dvDesc,
│ │ │ │ -
1342 numPatchCoords, patchCoords,
│ │ │ │ -
1343 patchTable,
│ │ │ │ -
1344 deviceContext);
│ │ │ │ -
1345 } else {
│ │ │ │ -
1346 // Create an instance on demand (slow)
│ │ │ │ -
1347 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1348 duDesc, dvDesc,
│ │ │ │ -
1349 deviceContext);
│ │ │ │ -
1350 if (instance) {
│ │ │ │ -
1351 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1352 srcBuffer, srcDesc,
│ │ │ │ -
1353 dstBuffer, dstDesc,
│ │ │ │ -
1354 duBuffer, duDesc,
│ │ │ │ -
1355 dvBuffer, dvDesc,
│ │ │ │ -
1356 numPatchCoords, patchCoords,
│ │ │ │ -
1357 patchTable,
│ │ │ │ -
1358 deviceContext);
│ │ │ │ -
1359 delete instance;
│ │ │ │ -
1360 return r;
│ │ │ │ -
1361 }
│ │ │ │ -
1362 return false;
│ │ │ │ -
1363 }
│ │ │ │ -
1364 }
│ │ │ │ -
│ │ │ │ -
1365
│ │ │ │ -
1405 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1406 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1408 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1409 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1410 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1411 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1412 int numPatchCoords,
│ │ │ │ -
1413 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1414 PATCH_TABLE *patchTable,
│ │ │ │ -
1415 MTLContext* deviceContext) const {
│ │ │ │ -
1416
│ │ │ │ -
1417 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
1418 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
1419 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ -
1420 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ -
1421 numPatchCoords,
│ │ │ │ -
1422 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
1423 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1424 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1425 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
1426 deviceContext
│ │ │ │ -
1427 );
│ │ │ │ -
1428 }
│ │ │ │ -
│ │ │ │ -
1429
│ │ │ │ -
1430
│ │ │ │ -
1494 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1495 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1497 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1498 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1499 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1500 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1501 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1502 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1503 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1504 int numPatchCoords,
│ │ │ │ -
1505 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1506 PATCH_TABLE *patchTable,
│ │ │ │ -
1507 MTLComputeEvaluator const *instance,
│ │ │ │ -
1508 MTLContext* deviceContext) {
│ │ │ │ -
1509
│ │ │ │ -
1510 if (instance) {
│ │ │ │ -
1511 return instance->EvalPatchesVarying(
│ │ │ │ -
1512 srcBuffer, srcDesc,
│ │ │ │ -
1513 dstBuffer, dstDesc,
│ │ │ │ -
1514 duBuffer, duDesc,
│ │ │ │ -
1515 dvBuffer, dvDesc,
│ │ │ │ -
1516 duuBuffer, duuDesc,
│ │ │ │ -
1517 duvBuffer, duvDesc,
│ │ │ │ -
1518 dvvBuffer, dvvDesc,
│ │ │ │ -
1519 numPatchCoords, patchCoords,
│ │ │ │ -
1520 patchTable,
│ │ │ │ -
1521 deviceContext);
│ │ │ │ -
1522 } else {
│ │ │ │ -
1523 // Create an instance on demand (slow)
│ │ │ │ -
1524 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1525 duDesc, dvDesc,
│ │ │ │ -
1526 duuDesc, duvDesc, dvvDesc,
│ │ │ │ -
1527 deviceContext);
│ │ │ │ -
1528 if (instance) {
│ │ │ │ -
1529 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1530 srcBuffer, srcDesc,
│ │ │ │ -
1531 dstBuffer, dstDesc,
│ │ │ │ -
1532 duBuffer, duDesc,
│ │ │ │ -
1533 dvBuffer, dvDesc,
│ │ │ │ -
1534 duuBuffer, duuDesc,
│ │ │ │ -
1535 duvBuffer, duvDesc,
│ │ │ │ -
1536 dvvBuffer, dvvDesc,
│ │ │ │ -
1537 numPatchCoords, patchCoords,
│ │ │ │ -
1538 patchTable,
│ │ │ │ -
1539 deviceContext);
│ │ │ │ -
1540 delete instance;
│ │ │ │ -
1541 return r;
│ │ │ │ -
1542 }
│ │ │ │ -
1543 return false;
│ │ │ │ -
1544 }
│ │ │ │ -
1545 }
│ │ │ │ -
│ │ │ │ -
1546
│ │ │ │ -
1604 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1605 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1607 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1608 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1609 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1610 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1611 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1612 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1613 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1614 int numPatchCoords,
│ │ │ │ -
1615 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1616 PATCH_TABLE *patchTable,
│ │ │ │ -
1617 MTLContext* deviceContext) const {
│ │ │ │ -
1618
│ │ │ │ -
1619 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
1620 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
1621 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ -
1622 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ -
1623 duuBuffer->BindMTLBuffer(deviceContext), duuDesc,
│ │ │ │ -
1624 duvBuffer->BindMTLBuffer(deviceContext), duvDesc,
│ │ │ │ -
1625 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc,
│ │ │ │ -
1626 numPatchCoords,
│ │ │ │ -
1627 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
1628 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1629 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1630 patchTable->GetPatchParamBuffer(),
│ │ │ │ -
1631 deviceContext
│ │ │ │ -
1632 );
│ │ │ │ -
1633 }
│ │ │ │ -
│ │ │ │ -
1634
│ │ │ │ -
1670 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1671 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1673 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1674 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1675 int numPatchCoords,
│ │ │ │ -
1676 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1677 PATCH_TABLE *patchTable,
│ │ │ │ -
1678 int fvarChannel,
│ │ │ │ -
1679 MTLComputeEvaluator const *instance,
│ │ │ │ -
1680 MTLContext* deviceContext) {
│ │ │ │ -
1681
│ │ │ │ -
1682 if (instance) {
│ │ │ │ -
1683 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
1684 srcBuffer, srcDesc,
│ │ │ │ -
1685 dstBuffer, dstDesc,
│ │ │ │ -
1686 numPatchCoords, patchCoords,
│ │ │ │ -
1687 patchTable,
│ │ │ │ -
1688 fvarChannel,
│ │ │ │ -
1689 deviceContext);
│ │ │ │ -
1690 } else {
│ │ │ │ -
1691 // Create an instance on demand (slow)
│ │ │ │ -
1692 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
1695 deviceContext);
│ │ │ │ -
1696 if (instance) {
│ │ │ │ -
1697 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
1698 srcBuffer, srcDesc,
│ │ │ │ -
1699 dstBuffer, dstDesc,
│ │ │ │ -
1700 numPatchCoords, patchCoords,
│ │ │ │ -
1701 patchTable,
│ │ │ │ -
1702 fvarChannel,
│ │ │ │ -
1703 deviceContext);
│ │ │ │ -
1704 delete instance;
│ │ │ │ -
1705 return r;
│ │ │ │ -
1706 }
│ │ │ │ -
1707 return false;
│ │ │ │ -
1708 }
│ │ │ │ -
1709 }
│ │ │ │ -
│ │ │ │ -
1710
│ │ │ │ -
1740 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1741 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1743 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1744 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1745 int numPatchCoords,
│ │ │ │ -
1746 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1747 PATCH_TABLE *patchTable,
│ │ │ │ -
1748 int fvarChannel,
│ │ │ │ -
1749 MTLContext* deviceContext) const {
│ │ │ │ -
1750
│ │ │ │ -
1751 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
1752 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
1753 0, BufferDescriptor(),
│ │ │ │ -
1754 0, BufferDescriptor(),
│ │ │ │ -
1755 numPatchCoords,
│ │ │ │ -
1756 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
1757 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
1758 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1759 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ -
1760 deviceContext
│ │ │ │ -
1761 );
│ │ │ │ -
1762 }
│ │ │ │ -
│ │ │ │ -
1763
│ │ │ │ -
1811 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1812 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1814 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1815 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1816 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1817 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1818 int numPatchCoords,
│ │ │ │ -
1819 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1820 PATCH_TABLE *patchTable,
│ │ │ │ -
1821 int fvarChannel,
│ │ │ │ -
1822 MTLComputeEvaluator const *instance,
│ │ │ │ -
1823 MTLContext* deviceContext) {
│ │ │ │ -
1824
│ │ │ │ -
1825 if (instance) {
│ │ │ │ -
1826 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
1827 srcBuffer, srcDesc,
│ │ │ │ -
1828 dstBuffer, dstDesc,
│ │ │ │ -
1829 duBuffer, duDesc,
│ │ │ │ -
1830 dvBuffer, dvDesc,
│ │ │ │ -
1831 numPatchCoords, patchCoords,
│ │ │ │ -
1832 patchTable,
│ │ │ │ -
1833 fvarChannel,
│ │ │ │ -
1834 deviceContext);
│ │ │ │ -
1835 } else {
│ │ │ │ -
1836 // Create an instance on demand (slow)
│ │ │ │ -
1837 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1838 duDesc, dvDesc,
│ │ │ │ -
1839 deviceContext);
│ │ │ │ -
1840 if (instance) {
│ │ │ │ -
1841 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
1842 srcBuffer, srcDesc,
│ │ │ │ -
1843 dstBuffer, dstDesc,
│ │ │ │ -
1844 duBuffer, duDesc,
│ │ │ │ -
1845 dvBuffer, dvDesc,
│ │ │ │ -
1846 numPatchCoords, patchCoords,
│ │ │ │ -
1847 patchTable,
│ │ │ │ -
1848 fvarChannel,
│ │ │ │ -
1849 deviceContext);
│ │ │ │ -
1850 delete instance;
│ │ │ │ -
1851 return r;
│ │ │ │ -
1852 }
│ │ │ │ -
1853 return false;
│ │ │ │ -
1854 }
│ │ │ │ -
1855 }
│ │ │ │ -
│ │ │ │ -
1856
│ │ │ │ -
1898 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1899 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1901 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1902 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1903 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1904 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1905 int numPatchCoords,
│ │ │ │ -
1906 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1907 PATCH_TABLE *patchTable,
│ │ │ │ -
1908 int fvarChannel,
│ │ │ │ -
1909 MTLContext* deviceContext) const {
│ │ │ │ -
1910
│ │ │ │ -
1911 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
1912 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
1913 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ -
1914 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ -
1915 numPatchCoords,
│ │ │ │ -
1916 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
1917 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
1918 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1919 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ -
1920 deviceContext
│ │ │ │ -
1921 );
│ │ │ │ -
1922 }
│ │ │ │ -
│ │ │ │ -
1923
│ │ │ │ -
1989 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1990 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1992 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1993 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1994 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1995 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1996 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1997 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1998 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1999 int numPatchCoords,
│ │ │ │ -
2000 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
2001 PATCH_TABLE *patchTable,
│ │ │ │ -
2002 int fvarChannel,
│ │ │ │ -
2003 MTLComputeEvaluator const *instance,
│ │ │ │ -
2004 MTLContext* deviceContext) {
│ │ │ │ -
2005
│ │ │ │ -
2006 if (instance) {
│ │ │ │ -
2007 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
2008 srcBuffer, srcDesc,
│ │ │ │ -
2009 dstBuffer, dstDesc,
│ │ │ │ -
2010 duBuffer, duDesc,
│ │ │ │ -
2011 dvBuffer, dvDesc,
│ │ │ │ -
2012 duuBuffer, duuDesc,
│ │ │ │ -
2013 duvBuffer, duvDesc,
│ │ │ │ -
2014 dvvBuffer, dvvDesc,
│ │ │ │ -
2015 numPatchCoords, patchCoords,
│ │ │ │ -
2016 patchTable,
│ │ │ │ -
2017 fvarChannel,
│ │ │ │ -
2018 deviceContext);
│ │ │ │ -
2019 } else {
│ │ │ │ -
2020 // Create an instance on demand (slow)
│ │ │ │ -
2021 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
2022 duDesc, dvDesc,
│ │ │ │ -
2023 duuDesc, duvDesc, dvvDesc,
│ │ │ │ -
2024 deviceContext);
│ │ │ │ -
2025 if (instance) {
│ │ │ │ -
2026 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
2027 srcBuffer, srcDesc,
│ │ │ │ -
2028 dstBuffer, dstDesc,
│ │ │ │ -
2029 duBuffer, duDesc,
│ │ │ │ -
2030 dvBuffer, dvDesc,
│ │ │ │ -
2031 duuBuffer, duuDesc,
│ │ │ │ -
2032 duvBuffer, duvDesc,
│ │ │ │ -
2033 dvvBuffer, dvvDesc,
│ │ │ │ -
2034 numPatchCoords, patchCoords,
│ │ │ │ -
2035 patchTable,
│ │ │ │ -
2036 fvarChannel,
│ │ │ │ -
2037 deviceContext);
│ │ │ │ -
2038 delete instance;
│ │ │ │ -
2039 return r;
│ │ │ │ -
2040 }
│ │ │ │ -
2041 return false;
│ │ │ │ -
2042 }
│ │ │ │ -
2043 }
│ │ │ │ -
│ │ │ │ -
2044
│ │ │ │ -
2104 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
2105 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
2107 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
2108 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
2109 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
2110 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
2111 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
2112 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
2113 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
2114 int numPatchCoords,
│ │ │ │ -
2115 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
2116 PATCH_TABLE *patchTable,
│ │ │ │ -
2117 int fvarChannel,
│ │ │ │ -
2118 MTLContext* deviceContext) const {
│ │ │ │ -
2119
│ │ │ │ -
2120 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc,
│ │ │ │ -
2121 dstBuffer->BindMTLBuffer(deviceContext), dstDesc,
│ │ │ │ -
2122 duBuffer->BindMTLBuffer(deviceContext), duDesc,
│ │ │ │ -
2123 dvBuffer->BindMTLBuffer(deviceContext), dvDesc,
│ │ │ │ -
2124 duuBuffer->BindMTLBuffer(deviceContext), duuDesc,
│ │ │ │ -
2125 duvBuffer->BindMTLBuffer(deviceContext), duvDesc,
│ │ │ │ -
2126 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc,
│ │ │ │ -
2127 numPatchCoords,
│ │ │ │ -
2128 patchCoords->BindMTLBuffer(deviceContext),
│ │ │ │ -
2129 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
2130 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
2131 patchTable->GetFVarPatchParamBuffer(fvarChannel),
│ │ │ │ -
2132 fvarChannel,
│ │ │ │ -
2133 deviceContext
│ │ │ │ -
2134 );
│ │ │ │ -
2135 }
│ │ │ │ -
│ │ │ │ -
2136
│ │ │ │ -
2138 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ -
2139 BufferDescriptor const &dstDesc,
│ │ │ │ -
2140 BufferDescriptor const &duDesc,
│ │ │ │ -
2141 BufferDescriptor const &dvDesc,
│ │ │ │ -
2142 BufferDescriptor const &duuDesc,
│ │ │ │ -
2143 BufferDescriptor const &duvDesc,
│ │ │ │ -
2144 BufferDescriptor const &dvvDesc,
│ │ │ │ -
2145 MTLContext* context);
│ │ │ │ -
2146
│ │ │ │ -
2148 static void Synchronize(MTLContext* context);
│ │ │ │ -
2149
│ │ │ │ -
2150 private:
│ │ │ │ -
2151
│ │ │ │ -
2152 id<MTLLibrary> _computeLibrary;
│ │ │ │ -
2153 id<MTLComputePipelineState> _evalStencils;
│ │ │ │ -
2154 id<MTLComputePipelineState> _evalPatches;
│ │ │ │ -
2155 id<MTLBuffer> _parameterBuffer;
│ │ │ │ -
2156
│ │ │ │ -
2157 int _workGroupSize;
│ │ │ │ -
2158};
│ │ │ │ -
│ │ │ │ -
2159
│ │ │ │ -
2160} //end namespace Osd
│ │ │ │ -
2161
│ │ │ │ -
2162} //end namespace OPENSUBDIV_VERSION
│ │ │ │ -
2163using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
2164
│ │ │ │ -
2165} //end namespace OpenSubdiv
│ │ │ │ -
2166
│ │ │ │ -
2167#endif // OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ - │ │ │ │ + │ │ │ │ +
66 id<MTLBuffer> GetVaryingPatchIndexBuffer() const { return _varyingPatchIndexBuffer; }
│ │ │ │ +
67
│ │ │ │ +
68 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ +
69 PatchArrayVector const &GetFVarPatchArrays(int fvarChannel = 0) const { return _fvarPatchArrays[fvarChannel]; }
│ │ │ │ +
70 id<MTLBuffer> GetFVarPatchIndexBuffer(int fvarChannel = 0) const { return _fvarIndexBuffers[fvarChannel]; }
│ │ │ │ +
71 id<MTLBuffer> GetFVarPatchParamBuffer(int fvarChannel = 0) const { return _fvarParamBuffers[fvarChannel]; }
│ │ │ │ +
72
│ │ │ │ +
73protected:
│ │ │ │ +
74 bool allocate(Far::PatchTable const *farPatchTable, MTLContext* context);
│ │ │ │ +
75
│ │ │ │ + │ │ │ │ +
77
│ │ │ │ +
78 id<MTLBuffer> _indexBuffer;
│ │ │ │ +
79 id<MTLBuffer> _patchParamBuffer;
│ │ │ │ +
80
│ │ │ │ + │ │ │ │ +
82
│ │ │ │ + │ │ │ │ +
84
│ │ │ │ +
85 std::vector<PatchArrayVector> _fvarPatchArrays;
│ │ │ │ +
86 std::vector<id<MTLBuffer>> _fvarIndexBuffers;
│ │ │ │ +
87 std::vector<id<MTLBuffer>> _fvarParamBuffers;
│ │ │ │ +
88};
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
90} // end namespace Osd
│ │ │ │ +
91
│ │ │ │ +
92} //end namespace OPENSUBDIV_VERSION
│ │ │ │ +
93using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
94
│ │ │ │ +
95} //end namespace OpenSubdiv
│ │ │ │ +
96
│ │ │ │ +
97#endif //end OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ + │ │ │ │
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ - │ │ │ │ -
MTLStencilTable(Far::LimitStencilTable const *stencilTable, MTLContext *context)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
MTLStencilTable(Far::StencilTable const *stencilTable, MTLContext *context)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static MTLStencilTable * Create(STENCIL_TABLE *stencilTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, id< MTLBuffer > duuWeightsBuffer, id< MTLBuffer > duvWeightsBuffer, id< MTLBuffer > dvvWeightsBuffer, int start, int end, MTLContext *context) const
Dispatch the MTL compute kernel on GPU asynchronously returns false if the kernel hasn't been compile...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ - │ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ -
bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, id< MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static void Synchronize(MTLContext *context)
Wait for the dispatched kernel to finish.
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, MTLContext *context)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const
Generic stencil function.
│ │ │ │ -
bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, int start, int end, MTLContext *context) const
Dispatch the MTL compute kernel on GPU asynchronously returns false if the kernel hasn't been compile...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, MTLContext *deviceContext)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, MTLContext *context)
│ │ │ │ -
static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext *context)
│ │ │ │ -
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext *context)
Configure compute pipline state. Returns false if it fails to create the pipeline state.
│ │ │ │ -
bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, id< MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const
│ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ + │ │ │ │ +
PatchArrayVector const & GetPatchArrays() const
│ │ │ │ +
bool allocate(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ +
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ + │ │ │ │ +
std::vector< id< MTLBuffer > > _fvarIndexBuffers
│ │ │ │ +
id< MTLBuffer > GetFVarPatchParamBuffer(int fvarChannel=0) const
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const
│ │ │ │ + │ │ │ │ +
std::vector< id< MTLBuffer > > _fvarParamBuffers
│ │ │ │ +
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ +
id< MTLBuffer > GetFVarPatchIndexBuffer(int fvarChannel=0) const
│ │ │ │ +
PatchArrayVector const & GetVaryingPatchArrays() const
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlComputeEvaluator.h │ │ │ │ │ +mtlPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,1382 +24,170 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../osd/types.h" │ │ │ │ │ -31#include "../osd/bufferDescriptor.h" │ │ │ │ │ +29#include "../far/patchDescriptor.h" │ │ │ │ │ +30#include "../osd/nonCopyable.h" │ │ │ │ │ +31#include "../osd/types.h" │ │ │ │ │ 32#include "../osd/mtlCommon.h" │ │ │ │ │ 33 │ │ │ │ │ 34@protocol MTLDevice; │ │ │ │ │ 35@protocol MTLBuffer; │ │ │ │ │ -36@protocol MTLLibrary; │ │ │ │ │ -37@protocol MTLComputePipelineState; │ │ │ │ │ -38 │ │ │ │ │ -39namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -40namespace OPENSUBDIV_VERSION { │ │ │ │ │ -41 │ │ │ │ │ -42namespace Far { │ │ │ │ │ -43 class PatchTable; │ │ │ │ │ -44 class StencilTable; │ │ │ │ │ -45 class LimitStencilTable; │ │ │ │ │ -46} │ │ │ │ │ -47 │ │ │ │ │ -48namespace Osd { │ │ │ │ │ +36 │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +39 │ │ │ │ │ +40namespace Far { │ │ │ │ │ +41 class PatchTable; │ │ │ │ │ +42}; │ │ │ │ │ +43 │ │ │ │ │ +44namespace Osd { │ │ │ │ │ +45 │ │ │ │ │ +_4_6class _M_T_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ +47public: │ │ │ │ │ +_4_8 typedef id _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ 49 │ │ │ │ │ -_5_0class _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -51{ │ │ │ │ │ -52public: │ │ │ │ │ -53 template │ │ │ │ │ -_5_4 static _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e* _C_r_e_a_t_e(STENCIL_TABLE* stencilTable, │ │ │ │ │ -55 DEVICE_CONTEXT context) │ │ │ │ │ -56 { │ │ │ │ │ -57 return new _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, context); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ +_5_0 _M_T_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +_5_1 _~_M_T_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +52 │ │ │ │ │ +53 template │ │ │ │ │ +_5_4 static _M_T_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +DEVICE_CONTEXT context) │ │ │ │ │ +55 { │ │ │ │ │ +56 return _C_r_e_a_t_e(farPatchTable, context); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_5_9 static _M_T_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ 60 │ │ │ │ │ -_6_1 _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const* stencilTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -_6_2 _M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const* stencilTable, _M_T_L_C_o_n_t_e_x_t* │ │ │ │ │ -context); │ │ │ │ │ -_6_3 _~_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ +_6_1 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { return ___p_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ +_6_2 id _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return ___i_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ +_6_3 id _G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; } │ │ │ │ │ 64 │ │ │ │ │ -_6_5 id _G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizesBuffer; } │ │ │ │ │ -_6_6 id _G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsetsBuffer; } │ │ │ │ │ -_6_7 id _G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indicesBuffer; } │ │ │ │ │ -_6_8 id _G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weightsBuffer; } │ │ │ │ │ -_6_9 id _G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeightsBuffer; } │ │ │ │ │ -_7_0 id _G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeightsBuffer; } │ │ │ │ │ -_7_1 id _G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeightsBuffer; } │ │ │ │ │ -_7_2 id _G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeightsBuffer; } │ │ │ │ │ -_7_3 id _G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeightsBuffer; } │ │ │ │ │ -74 │ │ │ │ │ -_7_5 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ -76 │ │ │ │ │ -77private: │ │ │ │ │ -78 id _sizesBuffer; │ │ │ │ │ -79 id _offsetsBuffer; │ │ │ │ │ -80 id _indicesBuffer; │ │ │ │ │ -81 id _weightsBuffer; │ │ │ │ │ -82 id _duWeightsBuffer; │ │ │ │ │ -83 id _dvWeightsBuffer; │ │ │ │ │ -84 id _duuWeightsBuffer; │ │ │ │ │ -85 id _duvWeightsBuffer; │ │ │ │ │ -86 id _dvvWeightsBuffer; │ │ │ │ │ -87 │ │ │ │ │ -88 int _numStencils; │ │ │ │ │ -89}; │ │ │ │ │ -90 │ │ │ │ │ -_9_1class _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -92{ │ │ │ │ │ -93public: │ │ │ │ │ -_9_4 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ -95 │ │ │ │ │ -_9_6 static _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -97 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -98 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -99 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -100 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -101 │ │ │ │ │ -_1_0_2 static _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -103 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -104 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -105 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -108 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -109 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -_1_1_2 _~_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -113 │ │ │ │ │ -119 │ │ │ │ │ -148 template │ │ │ │ │ -_1_4_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -150 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -151 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -152 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -153 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -154 _M_T_L_C_o_n_t_e_x_t* context) │ │ │ │ │ -155 { │ │ │ │ │ -156 if (instance) { │ │ │ │ │ -157 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -158 dstBuffer, dstDesc, │ │ │ │ │ -159 stencilTable, │ │ │ │ │ -160 context); │ │ │ │ │ -161 } else { │ │ │ │ │ -162 // Create an instance on demand (slow) │ │ │ │ │ -163 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -164 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -165 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -166 context); │ │ │ │ │ -167 if (instance) { │ │ │ │ │ -168 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -169 dstBuffer, dstDesc, │ │ │ │ │ -170 stencilTable, │ │ │ │ │ -171 context); │ │ │ │ │ -172 delete instance; │ │ │ │ │ -173 return r; │ │ │ │ │ -174 } │ │ │ │ │ -175 return false; │ │ │ │ │ -176 } │ │ │ │ │ -177 } │ │ │ │ │ -178 │ │ │ │ │ -219 template │ │ │ │ │ -_2_2_0 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -221 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -222 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -223 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -224 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -225 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -226 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -227 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ -228 │ │ │ │ │ -229 if (instance) { │ │ │ │ │ -230 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -231 dstBuffer, dstDesc, │ │ │ │ │ -232 duBuffer, duDesc, │ │ │ │ │ -233 dvBuffer, dvDesc, │ │ │ │ │ -234 stencilTable, │ │ │ │ │ -235 context); │ │ │ │ │ -236 } else { │ │ │ │ │ -237 // Create an instance on demand (slow) │ │ │ │ │ -238 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, context); │ │ │ │ │ -239 if (instance) { │ │ │ │ │ -240 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -241 dstBuffer, dstDesc, │ │ │ │ │ -242 duBuffer, duDesc, │ │ │ │ │ -243 dvBuffer, dvDesc, │ │ │ │ │ -244 stencilTable, │ │ │ │ │ -245 context); │ │ │ │ │ -246 delete instance; │ │ │ │ │ -247 return r; │ │ │ │ │ -248 } │ │ │ │ │ -249 return false; │ │ │ │ │ -250 } │ │ │ │ │ -251 } │ │ │ │ │ -252 │ │ │ │ │ -311 template │ │ │ │ │ -_3_1_2 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -313 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -314 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -315 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -316 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -317 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -318 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -319 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -320 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -321 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -322 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ -323 │ │ │ │ │ -324 if (instance) { │ │ │ │ │ -325 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -326 dstBuffer, dstDesc, │ │ │ │ │ -327 duBuffer, duDesc, │ │ │ │ │ -328 dvBuffer, dvDesc, │ │ │ │ │ -329 duuBuffer, duuDesc, │ │ │ │ │ -330 duvBuffer, duvDesc, │ │ │ │ │ -331 dvvBuffer, dvvDesc, │ │ │ │ │ -332 stencilTable, │ │ │ │ │ -333 context); │ │ │ │ │ -334 } else { │ │ │ │ │ -335 // Create an instance on demand (slow) │ │ │ │ │ -336 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -337 duuDesc, duvDesc, dvvDesc, context); │ │ │ │ │ -338 if (instance) { │ │ │ │ │ -339 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -340 dstBuffer, dstDesc, │ │ │ │ │ -341 duBuffer, duDesc, │ │ │ │ │ -342 dvBuffer, dvDesc, │ │ │ │ │ -343 duuBuffer, duuDesc, │ │ │ │ │ -344 duvBuffer, duvDesc, │ │ │ │ │ -345 dvvBuffer, dvvDesc, │ │ │ │ │ -346 stencilTable, │ │ │ │ │ -347 context); │ │ │ │ │ -348 delete instance; │ │ │ │ │ -349 return r; │ │ │ │ │ -350 } │ │ │ │ │ -351 return false; │ │ │ │ │ -352 } │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -375 template │ │ │ │ │ -_3_7_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -377 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -378 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -379 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -380 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ -381 { │ │ │ │ │ -382 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -383 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -384 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -385 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -386 stencilTable->GetSizesBuffer(), │ │ │ │ │ -387 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -388 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -389 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -390 0, │ │ │ │ │ -391 0, │ │ │ │ │ -392 /* start = */ 0, │ │ │ │ │ -393 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ -394 context); │ │ │ │ │ -395 } │ │ │ │ │ -396 │ │ │ │ │ -429 template │ │ │ │ │ -_4_3_0 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -431 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -432 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -433 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -434 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -435 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -436 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ -437 { │ │ │ │ │ -438 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -439 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -440 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ -441 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ -442 stencilTable->GetSizesBuffer(), │ │ │ │ │ -443 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -444 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -445 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -446 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -447 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -448 /* start = */ 0, │ │ │ │ │ -449 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ -450 context); │ │ │ │ │ -451 } │ │ │ │ │ -452 │ │ │ │ │ -503 template │ │ │ │ │ -_5_0_4 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -505 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -506 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -507 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -508 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -509 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -510 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -511 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -512 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -513 _M_T_L_C_o_n_t_e_x_t* context) const │ │ │ │ │ -514 { │ │ │ │ │ -515 return EvalStencils(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -516 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -517 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ -518 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ -519 duuBuffer->BindMTLBuffer(context), duuDesc, │ │ │ │ │ -520 duvBuffer->BindMTLBuffer(context), duvDesc, │ │ │ │ │ -521 dvvBuffer->BindMTLBuffer(context), dvvDesc, │ │ │ │ │ -522 stencilTable->GetSizesBuffer(), │ │ │ │ │ -523 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -524 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -525 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -526 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -527 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -528 stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ -529 stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ -530 stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ -531 /* start = */ 0, │ │ │ │ │ -532 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ -533 context); │ │ │ │ │ -534 } │ │ │ │ │ -535 │ │ │ │ │ -_5_7_4 bool _E_v_a_l_S_t_e_n_c_i_l_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -575 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -576 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -577 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -578 id sizesBuffer, │ │ │ │ │ -579 id offsetsBuffer, │ │ │ │ │ -580 id indicesBuffer, │ │ │ │ │ -581 id weightsBuffer, │ │ │ │ │ -582 id duWeightsBuffer, │ │ │ │ │ -583 id dvWeightsBuffer, │ │ │ │ │ -584 int start, │ │ │ │ │ -585 int end, │ │ │ │ │ -586 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ -587 │ │ │ │ │ -_6_4_4 bool _E_v_a_l_S_t_e_n_c_i_l_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -645 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -646 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -647 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -648 id duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -649 id duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -650 id dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -651 id sizesBuffer, │ │ │ │ │ -652 id offsetsBuffer, │ │ │ │ │ -653 id indicesBuffer, │ │ │ │ │ -654 id weightsBuffer, │ │ │ │ │ -655 id duWeightsBuffer, │ │ │ │ │ -656 id dvWeightsBuffer, │ │ │ │ │ -657 id duuWeightsBuffer, │ │ │ │ │ -658 id duvWeightsBuffer, │ │ │ │ │ -659 id dvvWeightsBuffer, │ │ │ │ │ -660 int start, │ │ │ │ │ -661 int end, │ │ │ │ │ -662 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ -663 │ │ │ │ │ -669 │ │ │ │ │ -703 template │ │ │ │ │ -_7_0_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -706 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -707 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -708 int numPatchCoords, │ │ │ │ │ -709 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -710 PATCH_TABLE *patchTable, │ │ │ │ │ -711 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -712 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ -713 │ │ │ │ │ -714 if (instance) { │ │ │ │ │ -715 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -716 dstBuffer, dstDesc, │ │ │ │ │ -717 numPatchCoords, patchCoords, │ │ │ │ │ -718 patchTable, │ │ │ │ │ -719 context); │ │ │ │ │ -720 } else { │ │ │ │ │ -721 // Create an instance on demand (slow) │ │ │ │ │ -722 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -723 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -724 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -725 context); │ │ │ │ │ -726 if (instance) { │ │ │ │ │ -727 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -728 dstBuffer, dstDesc, │ │ │ │ │ -729 numPatchCoords, patchCoords, │ │ │ │ │ -730 patchTable, │ │ │ │ │ -731 context); │ │ │ │ │ -732 delete instance; │ │ │ │ │ -733 return r; │ │ │ │ │ -734 } │ │ │ │ │ -735 return false; │ │ │ │ │ -736 } │ │ │ │ │ -737 } │ │ │ │ │ -738 │ │ │ │ │ -784 template │ │ │ │ │ -_7_8_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -787 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -788 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -789 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -790 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -791 int numPatchCoords, │ │ │ │ │ -792 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -793 PATCH_TABLE *patchTable, │ │ │ │ │ -794 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r* instance, │ │ │ │ │ -795 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ -796 │ │ │ │ │ -797 if (instance) { │ │ │ │ │ -798 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -799 dstBuffer, dstDesc, │ │ │ │ │ -800 duBuffer, duDesc, │ │ │ │ │ -801 dvBuffer, dvDesc, │ │ │ │ │ -802 numPatchCoords, patchCoords, │ │ │ │ │ -803 patchTable, │ │ │ │ │ -804 context); │ │ │ │ │ -805 } else { │ │ │ │ │ -806 // Create an instance on demand (slow) │ │ │ │ │ -807 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -808 duDesc, dvDesc, context); │ │ │ │ │ -809 if (instance) { │ │ │ │ │ -810 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -811 dstBuffer, dstDesc, │ │ │ │ │ -812 duBuffer, duDesc, │ │ │ │ │ -813 dvBuffer, dvDesc, │ │ │ │ │ -814 numPatchCoords, patchCoords, │ │ │ │ │ -815 patchTable, │ │ │ │ │ -816 context); │ │ │ │ │ -817 delete instance; │ │ │ │ │ -818 return r; │ │ │ │ │ -819 } │ │ │ │ │ -820 return false; │ │ │ │ │ -821 } │ │ │ │ │ -822 } │ │ │ │ │ -823 │ │ │ │ │ -887 template │ │ │ │ │ -_8_8_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -890 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -891 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -892 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -893 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -894 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -895 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -896 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -897 int numPatchCoords, │ │ │ │ │ -898 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -899 PATCH_TABLE *patchTable, │ │ │ │ │ -900 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r* instance, │ │ │ │ │ -901 _M_T_L_C_o_n_t_e_x_t* context) { │ │ │ │ │ -902 │ │ │ │ │ -903 if (instance) { │ │ │ │ │ -904 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -905 dstBuffer, dstDesc, │ │ │ │ │ -906 duBuffer, duDesc, │ │ │ │ │ -907 dvBuffer, dvDesc, │ │ │ │ │ -908 duuBuffer, duuDesc, │ │ │ │ │ -909 duvBuffer, duvDesc, │ │ │ │ │ -910 dvvBuffer, dvvDesc, │ │ │ │ │ -911 numPatchCoords, patchCoords, │ │ │ │ │ -912 patchTable, │ │ │ │ │ -913 context); │ │ │ │ │ -914 } else { │ │ │ │ │ -915 // Create an instance on demand (slow) │ │ │ │ │ -916 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -917 duDesc, dvDesc, │ │ │ │ │ -918 duuDesc, duvDesc, dvvDesc, context); │ │ │ │ │ -919 if (instance) { │ │ │ │ │ -920 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -921 dstBuffer, dstDesc, │ │ │ │ │ -922 duBuffer, duDesc, │ │ │ │ │ -923 dvBuffer, dvDesc, │ │ │ │ │ -924 duuBuffer, duuDesc, │ │ │ │ │ -925 duvBuffer, duvDesc, │ │ │ │ │ -926 dvvBuffer, dvvDesc, │ │ │ │ │ -927 numPatchCoords, patchCoords, │ │ │ │ │ -928 patchTable, │ │ │ │ │ -929 context); │ │ │ │ │ -930 delete instance; │ │ │ │ │ -931 return r; │ │ │ │ │ -932 } │ │ │ │ │ -933 return false; │ │ │ │ │ -934 } │ │ │ │ │ -935 } │ │ │ │ │ -936 │ │ │ │ │ -964 template │ │ │ │ │ -_9_6_6 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -967 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -968 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -969 int numPatchCoords, │ │ │ │ │ -970 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -971 PATCH_TABLE *patchTable, │ │ │ │ │ -972 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ -973 │ │ │ │ │ -974 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -975 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -976 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -977 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -978 numPatchCoords, │ │ │ │ │ -979 patchCoords->BindMTLBuffer(context), │ │ │ │ │ -980 patchTable->GetPatchArrays(), │ │ │ │ │ -981 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -982 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -983 context); │ │ │ │ │ -984 } │ │ │ │ │ -985 │ │ │ │ │ -1023 template │ │ │ │ │ -_1_0_2_5 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1026 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1027 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1028 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1029 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1030 int numPatchCoords, │ │ │ │ │ -1031 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1032 PATCH_TABLE *patchTable, │ │ │ │ │ -1033 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ -1034 │ │ │ │ │ -1035 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -1036 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -1037 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ -1038 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ -1039 numPatchCoords, │ │ │ │ │ -1040 patchCoords->BindMTLBuffer(context), │ │ │ │ │ -1041 patchTable->GetPatchArrays(), │ │ │ │ │ -1042 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1043 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1044 context); │ │ │ │ │ -1045 } │ │ │ │ │ -1046 │ │ │ │ │ -1102 template │ │ │ │ │ -_1_1_0_4 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1105 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1106 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1107 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1108 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1109 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1110 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1111 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1112 int numPatchCoords, │ │ │ │ │ -1113 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1114 PATCH_TABLE *patchTable, │ │ │ │ │ -1115 _M_T_L_C_o_n_t_e_x_t* context) const { │ │ │ │ │ -1116 │ │ │ │ │ -1117 return EvalPatches(srcBuffer->BindMTLBuffer(context), srcDesc, │ │ │ │ │ -1118 dstBuffer->BindMTLBuffer(context), dstDesc, │ │ │ │ │ -1119 duBuffer->BindMTLBuffer(context), duDesc, │ │ │ │ │ -1120 dvBuffer->BindMTLBuffer(context), dvDesc, │ │ │ │ │ -1121 duuBuffer->BindMTLBuffer(context), duuDesc, │ │ │ │ │ -1122 duvBuffer->BindMTLBuffer(context), duvDesc, │ │ │ │ │ -1123 dvvBuffer->BindMTLBuffer(context), dvvDesc, │ │ │ │ │ -1124 numPatchCoords, │ │ │ │ │ -1125 patchCoords->BindMTLBuffer(context), │ │ │ │ │ -1126 patchTable->GetPatchArrays(), │ │ │ │ │ -1127 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1128 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1129 context); │ │ │ │ │ -1130 } │ │ │ │ │ -1131 │ │ │ │ │ -_1_1_3_2 bool _E_v_a_l_P_a_t_c_h_e_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1133 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1134 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1135 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1136 int numPatchCoords, │ │ │ │ │ -1137 id patchCoordsBuffer, │ │ │ │ │ -1138 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1139 id patchIndexBuffer, │ │ │ │ │ -1140 id patchParamsBuffer, │ │ │ │ │ -1141 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ -1142 │ │ │ │ │ -_1_1_4_3 bool _E_v_a_l_P_a_t_c_h_e_s(id srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1144 id dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1145 id duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1146 id dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1147 id duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1148 id duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1149 id dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1150 int numPatchCoords, │ │ │ │ │ -1151 id patchCoordsBuffer, │ │ │ │ │ -1152 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1153 id patchIndexBuffer, │ │ │ │ │ -1154 id patchParamsBuffer, │ │ │ │ │ -1155 _M_T_L_C_o_n_t_e_x_t* context) const; │ │ │ │ │ -1156 │ │ │ │ │ -1190 template │ │ │ │ │ -_1_1_9_2 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1193 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1194 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1195 int numPatchCoords, │ │ │ │ │ -1196 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1197 PATCH_TABLE *patchTable, │ │ │ │ │ -1198 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1199 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -1200 │ │ │ │ │ -1201 if (instance) { │ │ │ │ │ -1202 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1203 srcBuffer, srcDesc, │ │ │ │ │ -1204 dstBuffer, dstDesc, │ │ │ │ │ -1205 numPatchCoords, patchCoords, │ │ │ │ │ -1206 patchTable, │ │ │ │ │ -1207 deviceContext); │ │ │ │ │ -1208 } else { │ │ │ │ │ -1209 // Create an instance on demand (slow) │ │ │ │ │ -1210 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -1211 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1212 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1213 deviceContext); │ │ │ │ │ -1214 if (instance) { │ │ │ │ │ -1215 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1216 srcBuffer, srcDesc, │ │ │ │ │ -1217 dstBuffer, dstDesc, │ │ │ │ │ -1218 numPatchCoords, patchCoords, │ │ │ │ │ -1219 patchTable, │ │ │ │ │ -1220 deviceContext); │ │ │ │ │ -1221 delete instance; │ │ │ │ │ -1222 return r; │ │ │ │ │ -1223 } │ │ │ │ │ -1224 return false; │ │ │ │ │ -1225 } │ │ │ │ │ -1226 } │ │ │ │ │ -1227 │ │ │ │ │ -1255 template │ │ │ │ │ -_1_2_5_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1258 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1259 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1260 int numPatchCoords, │ │ │ │ │ -1261 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1262 PATCH_TABLE *patchTable, │ │ │ │ │ -1263 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -1264 │ │ │ │ │ -1265 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -1266 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -1267 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1268 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1269 numPatchCoords, │ │ │ │ │ -1270 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -1271 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1272 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1273 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1274 deviceContext │ │ │ │ │ -1275 ); │ │ │ │ │ -1276 } │ │ │ │ │ -1277 │ │ │ │ │ -1323 template │ │ │ │ │ -_1_3_2_5 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1326 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1327 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1328 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1329 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1330 int numPatchCoords, │ │ │ │ │ -1331 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1332 PATCH_TABLE *patchTable, │ │ │ │ │ -1333 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1334 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -1335 │ │ │ │ │ -1336 if (instance) { │ │ │ │ │ -1337 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1338 srcBuffer, srcDesc, │ │ │ │ │ -1339 dstBuffer, dstDesc, │ │ │ │ │ -1340 duBuffer, duDesc, │ │ │ │ │ -1341 dvBuffer, dvDesc, │ │ │ │ │ -1342 numPatchCoords, patchCoords, │ │ │ │ │ -1343 patchTable, │ │ │ │ │ -1344 deviceContext); │ │ │ │ │ -1345 } else { │ │ │ │ │ -1346 // Create an instance on demand (slow) │ │ │ │ │ -1347 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -1348 duDesc, dvDesc, │ │ │ │ │ -1349 deviceContext); │ │ │ │ │ -1350 if (instance) { │ │ │ │ │ -1351 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1352 srcBuffer, srcDesc, │ │ │ │ │ -1353 dstBuffer, dstDesc, │ │ │ │ │ -1354 duBuffer, duDesc, │ │ │ │ │ -1355 dvBuffer, dvDesc, │ │ │ │ │ -1356 numPatchCoords, patchCoords, │ │ │ │ │ -1357 patchTable, │ │ │ │ │ -1358 deviceContext); │ │ │ │ │ -1359 delete instance; │ │ │ │ │ -1360 return r; │ │ │ │ │ -1361 } │ │ │ │ │ -1362 return false; │ │ │ │ │ -1363 } │ │ │ │ │ -1364 } │ │ │ │ │ -1365 │ │ │ │ │ -1405 template │ │ │ │ │ -_1_4_0_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1408 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1409 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1410 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1411 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1412 int numPatchCoords, │ │ │ │ │ -1413 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1414 PATCH_TABLE *patchTable, │ │ │ │ │ -1415 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -1416 │ │ │ │ │ -1417 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -1418 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -1419 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ -1420 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ -1421 numPatchCoords, │ │ │ │ │ -1422 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -1423 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1424 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1425 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1426 deviceContext │ │ │ │ │ -1427 ); │ │ │ │ │ -1428 } │ │ │ │ │ -1429 │ │ │ │ │ -1430 │ │ │ │ │ -1494 template │ │ │ │ │ -_1_4_9_6 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1497 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1498 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1499 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1500 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1501 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1502 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1503 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1504 int numPatchCoords, │ │ │ │ │ -1505 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1506 PATCH_TABLE *patchTable, │ │ │ │ │ -1507 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1508 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -1509 │ │ │ │ │ -1510 if (instance) { │ │ │ │ │ -1511 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1512 srcBuffer, srcDesc, │ │ │ │ │ -1513 dstBuffer, dstDesc, │ │ │ │ │ -1514 duBuffer, duDesc, │ │ │ │ │ -1515 dvBuffer, dvDesc, │ │ │ │ │ -1516 duuBuffer, duuDesc, │ │ │ │ │ -1517 duvBuffer, duvDesc, │ │ │ │ │ -1518 dvvBuffer, dvvDesc, │ │ │ │ │ -1519 numPatchCoords, patchCoords, │ │ │ │ │ -1520 patchTable, │ │ │ │ │ -1521 deviceContext); │ │ │ │ │ -1522 } else { │ │ │ │ │ -1523 // Create an instance on demand (slow) │ │ │ │ │ -1524 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -1525 duDesc, dvDesc, │ │ │ │ │ -1526 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -1527 deviceContext); │ │ │ │ │ -1528 if (instance) { │ │ │ │ │ -1529 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1530 srcBuffer, srcDesc, │ │ │ │ │ -1531 dstBuffer, dstDesc, │ │ │ │ │ -1532 duBuffer, duDesc, │ │ │ │ │ -1533 dvBuffer, dvDesc, │ │ │ │ │ -1534 duuBuffer, duuDesc, │ │ │ │ │ -1535 duvBuffer, duvDesc, │ │ │ │ │ -1536 dvvBuffer, dvvDesc, │ │ │ │ │ -1537 numPatchCoords, patchCoords, │ │ │ │ │ -1538 patchTable, │ │ │ │ │ -1539 deviceContext); │ │ │ │ │ -1540 delete instance; │ │ │ │ │ -1541 return r; │ │ │ │ │ -1542 } │ │ │ │ │ -1543 return false; │ │ │ │ │ -1544 } │ │ │ │ │ -1545 } │ │ │ │ │ -1546 │ │ │ │ │ -1604 template │ │ │ │ │ -_1_6_0_6 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1607 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1608 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1609 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1610 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1611 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1612 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1613 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1614 int numPatchCoords, │ │ │ │ │ -1615 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1616 PATCH_TABLE *patchTable, │ │ │ │ │ -1617 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -1618 │ │ │ │ │ -1619 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -1620 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -1621 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ -1622 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ -1623 duuBuffer->BindMTLBuffer(deviceContext), duuDesc, │ │ │ │ │ -1624 duvBuffer->BindMTLBuffer(deviceContext), duvDesc, │ │ │ │ │ -1625 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc, │ │ │ │ │ -1626 numPatchCoords, │ │ │ │ │ -1627 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -1628 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1629 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1630 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1631 deviceContext │ │ │ │ │ -1632 ); │ │ │ │ │ -1633 } │ │ │ │ │ -1634 │ │ │ │ │ -1670 template │ │ │ │ │ -_1_6_7_2 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1673 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1674 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1675 int numPatchCoords, │ │ │ │ │ -1676 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1677 PATCH_TABLE *patchTable, │ │ │ │ │ -1678 int fvarChannel, │ │ │ │ │ -1679 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1680 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -1681 │ │ │ │ │ -1682 if (instance) { │ │ │ │ │ -1683 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1684 srcBuffer, srcDesc, │ │ │ │ │ -1685 dstBuffer, dstDesc, │ │ │ │ │ -1686 numPatchCoords, patchCoords, │ │ │ │ │ -1687 patchTable, │ │ │ │ │ -1688 fvarChannel, │ │ │ │ │ -1689 deviceContext); │ │ │ │ │ -1690 } else { │ │ │ │ │ -1691 // Create an instance on demand (slow) │ │ │ │ │ -1692 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -1693 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1694 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1695 deviceContext); │ │ │ │ │ -1696 if (instance) { │ │ │ │ │ -1697 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1698 srcBuffer, srcDesc, │ │ │ │ │ -1699 dstBuffer, dstDesc, │ │ │ │ │ -1700 numPatchCoords, patchCoords, │ │ │ │ │ -1701 patchTable, │ │ │ │ │ -1702 fvarChannel, │ │ │ │ │ -1703 deviceContext); │ │ │ │ │ -1704 delete instance; │ │ │ │ │ -1705 return r; │ │ │ │ │ -1706 } │ │ │ │ │ -1707 return false; │ │ │ │ │ -1708 } │ │ │ │ │ -1709 } │ │ │ │ │ -1710 │ │ │ │ │ -1740 template │ │ │ │ │ -_1_7_4_2 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1743 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1744 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1745 int numPatchCoords, │ │ │ │ │ -1746 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1747 PATCH_TABLE *patchTable, │ │ │ │ │ -1748 int fvarChannel, │ │ │ │ │ -1749 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -1750 │ │ │ │ │ -1751 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -1752 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -1753 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1754 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1755 numPatchCoords, │ │ │ │ │ -1756 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -1757 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1758 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1759 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -1760 deviceContext │ │ │ │ │ -1761 ); │ │ │ │ │ -1762 } │ │ │ │ │ -1763 │ │ │ │ │ -1811 template │ │ │ │ │ -_1_8_1_3 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1814 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1815 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1816 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1817 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1818 int numPatchCoords, │ │ │ │ │ -1819 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1820 PATCH_TABLE *patchTable, │ │ │ │ │ -1821 int fvarChannel, │ │ │ │ │ -1822 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1823 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -1824 │ │ │ │ │ -1825 if (instance) { │ │ │ │ │ -1826 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1827 srcBuffer, srcDesc, │ │ │ │ │ -1828 dstBuffer, dstDesc, │ │ │ │ │ -1829 duBuffer, duDesc, │ │ │ │ │ -1830 dvBuffer, dvDesc, │ │ │ │ │ -1831 numPatchCoords, patchCoords, │ │ │ │ │ -1832 patchTable, │ │ │ │ │ -1833 fvarChannel, │ │ │ │ │ -1834 deviceContext); │ │ │ │ │ -1835 } else { │ │ │ │ │ -1836 // Create an instance on demand (slow) │ │ │ │ │ -1837 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -1838 duDesc, dvDesc, │ │ │ │ │ -1839 deviceContext); │ │ │ │ │ -1840 if (instance) { │ │ │ │ │ -1841 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1842 srcBuffer, srcDesc, │ │ │ │ │ -1843 dstBuffer, dstDesc, │ │ │ │ │ -1844 duBuffer, duDesc, │ │ │ │ │ -1845 dvBuffer, dvDesc, │ │ │ │ │ -1846 numPatchCoords, patchCoords, │ │ │ │ │ -1847 patchTable, │ │ │ │ │ -1848 fvarChannel, │ │ │ │ │ -1849 deviceContext); │ │ │ │ │ -1850 delete instance; │ │ │ │ │ -1851 return r; │ │ │ │ │ -1852 } │ │ │ │ │ -1853 return false; │ │ │ │ │ -1854 } │ │ │ │ │ -1855 } │ │ │ │ │ -1856 │ │ │ │ │ -1898 template │ │ │ │ │ -_1_9_0_0 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1901 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1902 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1903 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1904 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1905 int numPatchCoords, │ │ │ │ │ -1906 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1907 PATCH_TABLE *patchTable, │ │ │ │ │ -1908 int fvarChannel, │ │ │ │ │ -1909 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -1910 │ │ │ │ │ -1911 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -1912 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -1913 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ -1914 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ -1915 numPatchCoords, │ │ │ │ │ -1916 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -1917 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1918 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1919 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -1920 deviceContext │ │ │ │ │ -1921 ); │ │ │ │ │ -1922 } │ │ │ │ │ -1923 │ │ │ │ │ -1989 template │ │ │ │ │ -_1_9_9_1 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1992 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1993 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1994 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1995 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1996 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1997 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1998 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1999 int numPatchCoords, │ │ │ │ │ -2000 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2001 PATCH_TABLE *patchTable, │ │ │ │ │ -2002 int fvarChannel, │ │ │ │ │ -2003 _M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -2004 _M_T_L_C_o_n_t_e_x_t* deviceContext) { │ │ │ │ │ -2005 │ │ │ │ │ -2006 if (instance) { │ │ │ │ │ -2007 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2008 srcBuffer, srcDesc, │ │ │ │ │ -2009 dstBuffer, dstDesc, │ │ │ │ │ -2010 duBuffer, duDesc, │ │ │ │ │ -2011 dvBuffer, dvDesc, │ │ │ │ │ -2012 duuBuffer, duuDesc, │ │ │ │ │ -2013 duvBuffer, duvDesc, │ │ │ │ │ -2014 dvvBuffer, dvvDesc, │ │ │ │ │ -2015 numPatchCoords, patchCoords, │ │ │ │ │ -2016 patchTable, │ │ │ │ │ -2017 fvarChannel, │ │ │ │ │ -2018 deviceContext); │ │ │ │ │ -2019 } else { │ │ │ │ │ -2020 // Create an instance on demand (slow) │ │ │ │ │ -2021 instance = Create(srcDesc, dstDesc, │ │ │ │ │ -2022 duDesc, dvDesc, │ │ │ │ │ -2023 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -2024 deviceContext); │ │ │ │ │ -2025 if (instance) { │ │ │ │ │ -2026 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2027 srcBuffer, srcDesc, │ │ │ │ │ -2028 dstBuffer, dstDesc, │ │ │ │ │ -2029 duBuffer, duDesc, │ │ │ │ │ -2030 dvBuffer, dvDesc, │ │ │ │ │ -2031 duuBuffer, duuDesc, │ │ │ │ │ -2032 duvBuffer, duvDesc, │ │ │ │ │ -2033 dvvBuffer, dvvDesc, │ │ │ │ │ -2034 numPatchCoords, patchCoords, │ │ │ │ │ -2035 patchTable, │ │ │ │ │ -2036 fvarChannel, │ │ │ │ │ -2037 deviceContext); │ │ │ │ │ -2038 delete instance; │ │ │ │ │ -2039 return r; │ │ │ │ │ -2040 } │ │ │ │ │ -2041 return false; │ │ │ │ │ -2042 } │ │ │ │ │ -2043 } │ │ │ │ │ -2044 │ │ │ │ │ -2104 template │ │ │ │ │ -_2_1_0_6 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2107 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2108 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2109 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2110 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2111 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2112 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2113 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2114 int numPatchCoords, │ │ │ │ │ -2115 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2116 PATCH_TABLE *patchTable, │ │ │ │ │ -2117 int fvarChannel, │ │ │ │ │ -2118 _M_T_L_C_o_n_t_e_x_t* deviceContext) const { │ │ │ │ │ -2119 │ │ │ │ │ -2120 return EvalPatches(srcBuffer->BindMTLBuffer(deviceContext), srcDesc, │ │ │ │ │ -2121 dstBuffer->BindMTLBuffer(deviceContext), dstDesc, │ │ │ │ │ -2122 duBuffer->BindMTLBuffer(deviceContext), duDesc, │ │ │ │ │ -2123 dvBuffer->BindMTLBuffer(deviceContext), dvDesc, │ │ │ │ │ -2124 duuBuffer->BindMTLBuffer(deviceContext), duuDesc, │ │ │ │ │ -2125 duvBuffer->BindMTLBuffer(deviceContext), duvDesc, │ │ │ │ │ -2126 dvvBuffer->BindMTLBuffer(deviceContext), dvvDesc, │ │ │ │ │ -2127 numPatchCoords, │ │ │ │ │ -2128 patchCoords->BindMTLBuffer(deviceContext), │ │ │ │ │ -2129 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -2130 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -2131 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -2132 fvarChannel, │ │ │ │ │ -2133 deviceContext │ │ │ │ │ -2134 ); │ │ │ │ │ -2135 } │ │ │ │ │ -2136 │ │ │ │ │ -_2_1_3_8 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2139 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2140 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2141 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2142 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2143 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2144 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2145 _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -2146 │ │ │ │ │ -_2_1_4_8 static void _S_y_n_c_h_r_o_n_i_z_e(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -2149 │ │ │ │ │ -2150 private: │ │ │ │ │ -2151 │ │ │ │ │ -2152 id _computeLibrary; │ │ │ │ │ -2153 id _evalStencils; │ │ │ │ │ -2154 id _evalPatches; │ │ │ │ │ -2155 id _parameterBuffer; │ │ │ │ │ -2156 │ │ │ │ │ -2157 int _workGroupSize; │ │ │ │ │ -2158}; │ │ │ │ │ -2159 │ │ │ │ │ -2160} //end namespace Osd │ │ │ │ │ -2161 │ │ │ │ │ -2162} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ -2163using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -2164 │ │ │ │ │ -2165} //end namespace OpenSubdiv │ │ │ │ │ -2166 │ │ │ │ │ -2167#endif // OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ +_6_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s() const { return │ │ │ │ │ +___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ +_6_6 id _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return │ │ │ │ │ +___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ +_6_9 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s(int fvarChannel = 0) const │ │ │ │ │ +{ return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; } │ │ │ │ │ +_7_0 id _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { return │ │ │ │ │ +___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; } │ │ │ │ │ +_7_1 id _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { return │ │ │ │ │ +___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; } │ │ │ │ │ +72 │ │ │ │ │ +73protected: │ │ │ │ │ +_7_4 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +75 │ │ │ │ │ +_7_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +77 │ │ │ │ │ +_7_8 id ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_7_9 id ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +80 │ │ │ │ │ +_8_1 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +82 │ │ │ │ │ +_8_3 id ___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +84 │ │ │ │ │ +_8_5 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_8_6 std::vector> ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ +_8_7 std::vector> ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ +88}; │ │ │ │ │ +89 │ │ │ │ │ +90} // end namespace Osd │ │ │ │ │ +91 │ │ │ │ │ +92} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ +93using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +94 │ │ │ │ │ +95} //end namespace OpenSubdiv │ │ │ │ │ +96 │ │ │ │ │ +97#endif //end OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ std::vector< PatchArray > PatchArrayVector │ │ │ │ │ DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t │ │ │ │ │ DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -MTLStencilTable(Far::LimitStencilTable const *stencilTable, MTLContext │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(Far::PatchTable const *farPatchTable, MTLContext *context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext │ │ │ │ │ *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetDuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -~MTLStencilTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetDvvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -MTLStencilTable(Far::StencilTable const *stencilTable, MTLContext *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetDuuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetDuvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetIndicesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetSizesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetOffsetsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLStencilTable * Create(STENCIL_TABLE *stencilTable, DEVICE_CONTEXT │ │ │ │ │ -context) │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetDvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ -duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor │ │ │ │ │ -const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< │ │ │ │ │ -MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, id< MTLBuffer > │ │ │ │ │ -sizesBuffer, id< MTLBuffer > offsetsBuffer, id< MTLBuffer > indicesBuffer, id< │ │ │ │ │ -MTLBuffer > weightsBuffer, id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > │ │ │ │ │ -dvWeightsBuffer, id< MTLBuffer > duuWeightsBuffer, id< MTLBuffer > │ │ │ │ │ -duvWeightsBuffer, id< MTLBuffer > dvvWeightsBuffer, int start, int end, │ │ │ │ │ -MTLContext *context) const │ │ │ │ │ -Dispatch the MTL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ -kernel hasn't been compile... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, MTLComputeEvaluator *instance, MTLContext *context) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_1_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ -MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_9_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -MTLComputeEvaluator() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_~_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -~MTLComputeEvaluator() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator │ │ │ │ │ -const *instance, MTLContext *context) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ -bool Instantiatable │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, MTLContext *deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_2_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLContext │ │ │ │ │ -*deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel, MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator │ │ │ │ │ -const *instance, MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ -*stencilTable, MTLContext *context) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ -duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, id< MTLBuffer > duuBuffer, BufferDescriptor │ │ │ │ │ -const &duuDesc, id< MTLBuffer > duvBuffer, BufferDescriptor const &duvDesc, id< │ │ │ │ │ -MTLBuffer > dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, id< │ │ │ │ │ -MTLBuffer > patchCoordsBuffer, const PatchArrayVector &patchArrays, id< │ │ │ │ │ -MTLBuffer > patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext │ │ │ │ │ -*context) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ -MTLContext *deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_1_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(MTLContext *context) │ │ │ │ │ -Wait for the dispatched kernel to finish. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, STENCIL_TABLE const *stencilTable, MTLContext *context) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_4_3_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator *instance, │ │ │ │ │ -MTLContext *context) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_8_8_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel, MTLContext *deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_7_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ -MTLComputeEvaluator const *instance, MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_9_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, MTLContext │ │ │ │ │ -*context) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_0_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ -duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, id< MTLBuffer > sizesBuffer, id< MTLBuffer > │ │ │ │ │ -offsetsBuffer, id< MTLBuffer > indicesBuffer, id< MTLBuffer > weightsBuffer, │ │ │ │ │ -id< MTLBuffer > duWeightsBuffer, id< MTLBuffer > dvWeightsBuffer, int start, │ │ │ │ │ -int end, MTLContext *context) const │ │ │ │ │ -Dispatch the MTL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ -kernel hasn't been compile... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, MTLComputeEvaluator │ │ │ │ │ -const *instance, MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext *context) │ │ │ │ │ -const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ -const *stencilTable, MTLComputeEvaluator const *instance, MTLContext *context) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, MTLComputeEvaluator const *instance, │ │ │ │ │ -MTLContext *deviceContext) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_3_2_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, MTLContext *context) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_0_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, MTLContext *context) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_0_2_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, MTLContext *deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, MTLContext │ │ │ │ │ -*deviceContext) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, MTLContext *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, MTLContext │ │ │ │ │ -*context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ -bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ -BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ -BufferDescriptor const &dvvDesc, MTLContext *context) │ │ │ │ │ -Configure compute pipline state. Returns false if it fails to create the │ │ │ │ │ -pipeline state. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(id< MTLBuffer > srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -id< MTLBuffer > dstBuffer, BufferDescriptor const &dstDesc, id< MTLBuffer > │ │ │ │ │ -duBuffer, BufferDescriptor const &duDesc, id< MTLBuffer > dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, id< MTLBuffer > │ │ │ │ │ -patchCoordsBuffer, const PatchArrayVector &patchArrays, id< MTLBuffer > │ │ │ │ │ -patchIndexBuffer, id< MTLBuffer > patchParamsBuffer, MTLContext *context) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetVaryingPatchIndexBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< id< MTLBuffer > > _fvarIndexBuffers │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +MTLPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetPatchParamBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetPatchIndexBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ +id< MTLBuffer > VertexBufferBinding │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int GetNumFVarChannels() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > _varyingPatchIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< id< MTLBuffer > > _fvarParamBuffers │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _varyingPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ +DEVICE_CONTEXT context) │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_~_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~MTLPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetVaryingPatchArrays() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > _indexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,45 +90,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mtlPatchTable.h File Reference
│ │ │ │ +
mtlLegacyGregoryPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../far/patchTable.h"
│ │ │ │ #include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ -#include "../osd/mtlCommon.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MTLPatchTable
class  MTLLegacyGregoryPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlPatchTable.h File Reference │ │ │ │ │ +mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ #include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ #include "_._._/_o_s_d_/_m_t_l_C_o_m_m_o_n_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00821 = [ │ │ │ │ │ - ["MTLPatchTable", "a01305.html", "a01305"] │ │ │ │ │ + ["MTLLegacyGregoryPatchTable", "a01297.html", "a01297"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mtlPatchTable.h
│ │ │ │ +
mtlLegacyGregoryPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,123 +119,112 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include "../far/patchDescriptor.h"
│ │ │ │ +
29#include "../far/patchTable.h"
│ │ │ │
30#include "../osd/nonCopyable.h"
│ │ │ │ -
31#include "../osd/types.h"
│ │ │ │ -
32#include "../osd/mtlCommon.h"
│ │ │ │ -
33
│ │ │ │ -
34@protocol MTLDevice;
│ │ │ │ -
35@protocol MTLBuffer;
│ │ │ │ -
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ -
39
│ │ │ │ -
40namespace Far {
│ │ │ │ -
41 class PatchTable;
│ │ │ │ -
42};
│ │ │ │ -
43
│ │ │ │ -
44namespace Osd {
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
46class MTLPatchTable : private NonCopyable<MTLPatchTable> {
│ │ │ │ -
47public:
│ │ │ │ -
48 typedef id<MTLBuffer> VertexBufferBinding;
│ │ │ │ -
49
│ │ │ │ - │ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
53 template<typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
54 static MTLPatchTable *Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ -
55 {
│ │ │ │ -
56 return Create(farPatchTable, context);
│ │ │ │ -
57 }
│ │ │ │ +
31#include "../osd/mtlCommon.h"
│ │ │ │ +
32
│ │ │ │ +
33@protocol MTLDevice;
│ │ │ │ +
34@protocol MTLBuffer;
│ │ │ │ +
35
│ │ │ │ +
36namespace OpenSubdiv {
│ │ │ │ +
37namespace OPENSUBDIV_VERSION {
│ │ │ │ +
38
│ │ │ │ +
39namespace Osd {
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
42: private NonCopyable<MTLLegacyGregoryPatchTable>
│ │ │ │ +
43{
│ │ │ │ +
44public:
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ +
47 template<typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
48 static MTLLegacyGregoryPatchTable* Create(Far::PatchTable const* farPatchTable, DEVICE_CONTEXT context) {
│ │ │ │ +
49 return Create(farPatchTable, context);
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 static MTLLegacyGregoryPatchTable* Create(Far::PatchTable const* farPatchTable, MTLContext* context);
│ │ │ │ +
53
│ │ │ │ +
54 void UpdateVertexBuffer(id<MTLBuffer> vbo, int numVertices, int numVertexElements, MTLContext* context);
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
56 id<MTLBuffer> GetVertexBuffer() const
│ │ │ │ +
57 {
│ │ │ │ +
58 return _vertexBuffer;
│ │ │ │ +
59 }
│ │ │ │
│ │ │ │ -
58
│ │ │ │ -
59 static MTLPatchTable *Create(Far::PatchTable const *farPatchTable, MTLContext* context);
│ │ │ │
60
│ │ │ │ -
61 PatchArrayVector const &GetPatchArrays() const { return _patchArrays; }
│ │ │ │ -
62 id<MTLBuffer> GetPatchIndexBuffer() const { return _indexBuffer; }
│ │ │ │ -
63 id<MTLBuffer> GetPatchParamBuffer() const { return _patchParamBuffer; }
│ │ │ │ -
64
│ │ │ │ - │ │ │ │ -
66 id<MTLBuffer> GetVaryingPatchIndexBuffer() const { return _varyingPatchIndexBuffer; }
│ │ │ │ -
67
│ │ │ │ -
68 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ -
69 PatchArrayVector const &GetFVarPatchArrays(int fvarChannel = 0) const { return _fvarPatchArrays[fvarChannel]; }
│ │ │ │ -
70 id<MTLBuffer> GetFVarPatchIndexBuffer(int fvarChannel = 0) const { return _fvarIndexBuffers[fvarChannel]; }
│ │ │ │ -
71 id<MTLBuffer> GetFVarPatchParamBuffer(int fvarChannel = 0) const { return _fvarParamBuffers[fvarChannel]; }
│ │ │ │ -
72
│ │ │ │ -
73protected:
│ │ │ │ -
74 bool allocate(Far::PatchTable const *farPatchTable, MTLContext* context);
│ │ │ │ -
75
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
61 id<MTLBuffer> GetVertexValenceBuffer() const
│ │ │ │ +
62 {
│ │ │ │ +
63 return _vertexValenceBuffer;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
66 id<MTLBuffer> GetQuadOffsetsBuffer() const
│ │ │ │ +
67 {
│ │ │ │ +
68 return _quadOffsetsBuffer;
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
72 {
│ │ │ │ + │ │ │ │ +
74 return _quadOffsetsBase[1];
│ │ │ │ +
75 return _quadOffsetsBase[0];
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │
77
│ │ │ │ -
78 id<MTLBuffer> _indexBuffer;
│ │ │ │ -
79 id<MTLBuffer> _patchParamBuffer;
│ │ │ │ -
80
│ │ │ │ - │ │ │ │ -
82
│ │ │ │ - │ │ │ │ -
84
│ │ │ │ -
85 std::vector<PatchArrayVector> _fvarPatchArrays;
│ │ │ │ -
86 std::vector<id<MTLBuffer>> _fvarIndexBuffers;
│ │ │ │ -
87 std::vector<id<MTLBuffer>> _fvarParamBuffers;
│ │ │ │ -
88};
│ │ │ │ +
78private:
│ │ │ │ +
79 id<MTLBuffer> _vertexBuffer;
│ │ │ │ +
80 id<MTLBuffer> _vertexValenceBuffer;
│ │ │ │ +
81 id<MTLBuffer> _quadOffsetsBuffer;
│ │ │ │ +
82 int _quadOffsetsBase[2];
│ │ │ │ +
83};
│ │ │ │
│ │ │ │ +
84
│ │ │ │ +
85} //end namespace Osd
│ │ │ │ +
86
│ │ │ │ +
87} //end namespace OPENSUBDIV_VERSION
│ │ │ │ +
88using namespace OPENSUBDIV_VERSION;
│ │ │ │
89
│ │ │ │ -
90} // end namespace Osd
│ │ │ │ +
90} //end namespace OpenSuddiv
│ │ │ │
91
│ │ │ │ -
92} //end namespace OPENSUBDIV_VERSION
│ │ │ │ -
93using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
94
│ │ │ │ -
95} //end namespace OpenSubdiv
│ │ │ │ -
96
│ │ │ │ -
97#endif //end OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ -
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ +
92#endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ - │ │ │ │ -
PatchArrayVector const & GetPatchArrays() const
│ │ │ │ -
bool allocate(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ -
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ - │ │ │ │ -
std::vector< id< MTLBuffer > > _fvarIndexBuffers
│ │ │ │ -
id< MTLBuffer > GetFVarPatchParamBuffer(int fvarChannel=0) const
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const
│ │ │ │ - │ │ │ │ -
std::vector< id< MTLBuffer > > _fvarParamBuffers
│ │ │ │ -
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ -
id< MTLBuffer > GetFVarPatchIndexBuffer(int fvarChannel=0) const
│ │ │ │ -
PatchArrayVector const & GetVaryingPatchArrays() const
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext *context)
│ │ │ │ +
void UpdateVertexBuffer(id< MTLBuffer > vbo, int numVertices, int numVertexElements, MTLContext *context)
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlPatchTable.h │ │ │ │ │ +mtlLegacyGregoryPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,170 +24,127 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../far/patchDescriptor.h" │ │ │ │ │ +29#include "../far/patchTable.h" │ │ │ │ │ 30#include "../osd/nonCopyable.h" │ │ │ │ │ -31#include "../osd/types.h" │ │ │ │ │ -32#include "../osd/mtlCommon.h" │ │ │ │ │ -33 │ │ │ │ │ -34@protocol MTLDevice; │ │ │ │ │ -35@protocol MTLBuffer; │ │ │ │ │ -36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ -39 │ │ │ │ │ -40namespace Far { │ │ │ │ │ -41 class PatchTable; │ │ │ │ │ -42}; │ │ │ │ │ -43 │ │ │ │ │ -44namespace Osd { │ │ │ │ │ -45 │ │ │ │ │ -_4_6class _M_T_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ -47public: │ │ │ │ │ -_4_8 typedef id _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ -49 │ │ │ │ │ -_5_0 _M_T_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -_5_1 _~_M_T_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -52 │ │ │ │ │ -53 template │ │ │ │ │ -_5_4 static _M_T_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -DEVICE_CONTEXT context) │ │ │ │ │ -55 { │ │ │ │ │ -56 return _C_r_e_a_t_e(farPatchTable, context); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_5_9 static _M_T_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +31#include "../osd/mtlCommon.h" │ │ │ │ │ +32 │ │ │ │ │ +33@protocol MTLDevice; │ │ │ │ │ +34@protocol MTLBuffer; │ │ │ │ │ +35 │ │ │ │ │ +36namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +37namespace OPENSUBDIV_VERSION { │ │ │ │ │ +38 │ │ │ │ │ +39namespace Osd { │ │ │ │ │ +40 │ │ │ │ │ +_4_1class _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +42: private NonCopyable │ │ │ │ │ +43{ │ │ │ │ │ +44public: │ │ │ │ │ +_4_5 _~_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +46 │ │ │ │ │ +47 template │ │ │ │ │ +_4_8 static _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e* _C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const* │ │ │ │ │ +farPatchTable, DEVICE_CONTEXT context) { │ │ │ │ │ +49 return Create(farPatchTable, context); │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +_5_2 static _M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e* _C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const* │ │ │ │ │ +farPatchTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +53 │ │ │ │ │ +_5_4 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(id vbo, int numVertices, int │ │ │ │ │ +numVertexElements, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +55 │ │ │ │ │ +_5_6 id _G_e_t_V_e_r_t_e_x_B_u_f_f_e_r() const │ │ │ │ │ +57 { │ │ │ │ │ +58 return _vertexBuffer; │ │ │ │ │ +59 } │ │ │ │ │ 60 │ │ │ │ │ -_6_1 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { return ___p_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ -_6_2 id _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return ___i_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ -_6_3 id _G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; } │ │ │ │ │ -64 │ │ │ │ │ -_6_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s() const { return │ │ │ │ │ -___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ -_6_6 id _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { return │ │ │ │ │ -___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ -_6_9 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s(int fvarChannel = 0) const │ │ │ │ │ -{ return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; } │ │ │ │ │ -_7_0 id _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { return │ │ │ │ │ -___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; } │ │ │ │ │ -_7_1 id _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { return │ │ │ │ │ -___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; } │ │ │ │ │ -72 │ │ │ │ │ -73protected: │ │ │ │ │ -_7_4 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, _M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -75 │ │ │ │ │ -_7_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_6_1 id _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_B_u_f_f_e_r() const │ │ │ │ │ +62 { │ │ │ │ │ +63 return _vertexValenceBuffer; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +_6_6 id _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_u_f_f_e_r() const │ │ │ │ │ +67 { │ │ │ │ │ +68 return _quadOffsetsBuffer; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 int _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) │ │ │ │ │ +72 { │ │ │ │ │ +73 if(type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) │ │ │ │ │ +74 return _quadOffsetsBase[1]; │ │ │ │ │ +75 return _quadOffsetsBase[0]; │ │ │ │ │ +76 } │ │ │ │ │ 77 │ │ │ │ │ -_7_8 id ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_7_9 id ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -80 │ │ │ │ │ -_8_1 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -82 │ │ │ │ │ -_8_3 id ___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +78private: │ │ │ │ │ +79 id _vertexBuffer; │ │ │ │ │ +80 id _vertexValenceBuffer; │ │ │ │ │ +81 id _quadOffsetsBuffer; │ │ │ │ │ +82 int _quadOffsetsBase[2]; │ │ │ │ │ +83}; │ │ │ │ │ 84 │ │ │ │ │ -_8_5 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_8_6 std::vector> ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ -_8_7 std::vector> ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ -88}; │ │ │ │ │ +85} //end namespace Osd │ │ │ │ │ +86 │ │ │ │ │ +87} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ +88using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 89 │ │ │ │ │ -90} // end namespace Osd │ │ │ │ │ +90} //end namespace OpenSuddiv │ │ │ │ │ 91 │ │ │ │ │ -92} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ -93using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -94 │ │ │ │ │ -95} //end namespace OpenSubdiv │ │ │ │ │ -96 │ │ │ │ │ -97#endif //end OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ +92#endif // OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchArray > PatchArrayVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ +@ GREGORY_BOUNDARY │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ Container for arrays of parametric patches. │ │ │ │ │ DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_C_o_n_t_e_x_t │ │ │ │ │ DDeeffiinniittiioonn _m_t_l_C_o_m_m_o_n_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(Far::PatchTable const *farPatchTable, MTLContext *context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, MTLContext │ │ │ │ │ -*context) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetVaryingPatchIndexBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< id< MTLBuffer > > _fvarIndexBuffers │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -MTLPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetPatchParamBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetPatchIndexBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ -id< MTLBuffer > VertexBufferBinding │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int GetNumFVarChannels() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > _varyingPatchIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< id< MTLBuffer > > _fvarParamBuffers │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _varyingPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static MTLPatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ -DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_~_M_T_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~MTLPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetVaryingPatchArrays() const │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > _indexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ +int GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ +*farPatchTable, DEVICE_CONTEXT context) │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetVertexValenceBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetQuadOffsetsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static MTLLegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ +*farPatchTable, MTLContext *context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +void UpdateVertexBuffer(id< MTLBuffer > vbo, int numVertices, int │ │ │ │ │ +numVertexElements, MTLContext *context) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_~_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~MTLLegacyGregoryPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > GetVertexBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_6 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_t_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
mtlVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/mtlCommon.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ @@ -186,16 +186,16 @@ │ │ │ │
77
│ │ │ │
78} //end namespace OPENSUBDIV_VERSION
│ │ │ │
79 using namespace OPENSUBDIV_VERSION;
│ │ │ │
80
│ │ │ │
81} //end namespace OpenSubdiv
│ │ │ │
82
│ │ │ │
83#endif // OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │
CPUMTLVertexBuffer(int numElements, int numVertices)
│ │ │ │
static CPUMTLVertexBuffer * Create(int numElements, int numVertices, MTLContext *context)
│ │ │ │ │ │ │ │
void UpdateData(const float *src, int startVertex, int numVertices, MTLContext *context)
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ @@ -160,15 +160,15 @@ │ │ │ │
72
│ │ │ │
73} // end namespace OPENSUBDIV_VERSION
│ │ │ │
74using namespace OPENSUBDIV_VERSION;
│ │ │ │
75
│ │ │ │
76} // end namespace OpenSubdiv
│ │ │ │
77
│ │ │ │
78#endif // OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
Provides shader source which can be used by client code.
│ │ │ │
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │
static std::string GetPatchDrawingShaderSource()
Returns shader source which can be used while drawing piecewise parametric patches resulting from sub...
│ │ │ │
static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │
static std::string GetHullShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │
static std::string GetPatchBasisShaderSource()
Returns shader source which can be used to evaluate position and first and second derivatives on piec...
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │
│ │ │ │ Namespaces | │ │ │ │ Typedefs
│ │ │ │
d3d11Mesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/mesh.h"
│ │ │ │ -#include "../osd/d3d11PatchTable.h"
│ │ │ │ +#include "../osd/mesh.h"
│ │ │ │ +#include "../osd/d3d11PatchTable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  CPUMTLVertexBuffer
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ @@ -143,17 +143,17 @@ │ │ │ │
42
│ │ │ │
43} // end namespace OPENSUBDIV_VERSION
│ │ │ │
44using namespace OPENSUBDIV_VERSION;
│ │ │ │
45
│ │ │ │
46} // end namespace OpenSubdiv
│ │ │ │
47
│ │ │ │
48#endif // OPENSUBDIV3_OSD_D3D11MESH_H
│ │ │ │ - │ │ │ │ + │ │ │ │
MeshInterface< D3D11PatchTable > D3D11MeshInterface
Definition d3d11Mesh.h:38
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
d3d11LegacyGregoryPatchTable.h File Reference
│ │ │ │ +
d3d11PatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchTable.h"
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ #include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  D3D11LegacyGregoryPatchTable
class  D3D11PatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ +d3d11PatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ #include "../osd/nonCopyable.h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ +  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00836.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00836 = [ │ │ │ │ │ - ["D3D11LegacyGregoryPatchTable", "a01205.html", "a01205"] │ │ │ │ │ + ["D3D11PatchTable", "a01209.html", "a01209"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
d3d11LegacyGregoryPatchTable.h
│ │ │ │ +
d3d11PatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,122 +119,118 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../far/patchTable.h"
│ │ │ │ -
31#include "../osd/nonCopyable.h"
│ │ │ │ -
32
│ │ │ │ -
33struct ID3D11Buffer;
│ │ │ │ -
34struct ID3D11ShaderResourceView;
│ │ │ │ -
35struct ID3D11Device;
│ │ │ │ -
36struct ID3D11DeviceContext;
│ │ │ │ -
37
│ │ │ │ -
38namespace OpenSubdiv {
│ │ │ │ -
39namespace OPENSUBDIV_VERSION {
│ │ │ │ -
40
│ │ │ │ -
41namespace Osd {
│ │ │ │ +
30#include <vector>
│ │ │ │ +
31#include "../far/patchDescriptor.h"
│ │ │ │ +
32#include "../osd/nonCopyable.h"
│ │ │ │ +
33#include "../osd/types.h"
│ │ │ │ +
34
│ │ │ │ +
35struct ID3D11Buffer;
│ │ │ │ +
36struct ID3D11ShaderResourceView;
│ │ │ │ +
37struct ID3D11Device;
│ │ │ │ +
38struct ID3D11DeviceContext;
│ │ │ │ +
39
│ │ │ │ +
40namespace OpenSubdiv {
│ │ │ │ +
41namespace OPENSUBDIV_VERSION {
│ │ │ │
42
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 : private NonCopyable<D3D11LegacyGregoryPatchTable> {
│ │ │ │ -
45public:
│ │ │ │ - │ │ │ │ -
47
│ │ │ │ -
48 template<typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context) {
│ │ │ │ -
51 return Create(farPatchTable, context->GetDeviceContext());
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ - │ │ │ │ -
55 Far::PatchTable const *farPatchTable,
│ │ │ │ -
56 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
57
│ │ │ │ -
58 void UpdateVertexBuffer(ID3D11Buffer *vbo,
│ │ │ │ -
59 int numVertices, int numVertexElements,
│ │ │ │ -
60 ID3D11DeviceContext *pd3d11DeviceContext);
│ │ │ │ +
43namespace Far{
│ │ │ │ +
44 class PatchTable;
│ │ │ │ +
45};
│ │ │ │ +
46
│ │ │ │ +
47namespace Osd {
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49class D3D11PatchTable : private NonCopyable<D3D11PatchTable> {
│ │ │ │ +
50public:
│ │ │ │ +
51 typedef ID3D11Buffer * VertexBufferBinding;
│ │ │ │ +
52
│ │ │ │ + │ │ │ │ + │ │ │ │ +
55
│ │ │ │ +
56 template<typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
57 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ +
58 DEVICE_CONTEXT context) {
│ │ │ │ +
59 return Create(farPatchTable, context->GetDeviceContext());
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │
61
│ │ │ │ -
│ │ │ │ -
62 ID3D11ShaderResourceView* GetVertexSRV() const {
│ │ │ │ -
63 return _vertexSRV;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 ID3D11ShaderResourceView* GetVertexValenceSRV() const {
│ │ │ │ -
67 return _vertexValenceSRV;
│ │ │ │ -
68 }
│ │ │ │ +
62 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ +
63 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 return _patchArrays;
│ │ │ │ +
67 }
│ │ │ │
│ │ │ │ -
69
│ │ │ │ +
68
│ │ │ │
│ │ │ │ -
70 ID3D11ShaderResourceView* GetQuadOffsetsSRV() const {
│ │ │ │ -
71 return _quadOffsetsSRV;
│ │ │ │ +
70 ID3D11Buffer* GetPatchIndexBuffer() const {
│ │ │ │ +
71 return _indexBuffer;
│ │ │ │
72 }
│ │ │ │
│ │ │ │
73
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
76 return _quadOffsetsBase[1];
│ │ │ │ -
77 }
│ │ │ │ -
78 return _quadOffsetsBase[0];
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81protected:
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
75 ID3D11ShaderResourceView* GetPatchParamSRV() const {
│ │ │ │ + │ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79protected:
│ │ │ │ +
80 // allocate buffers from patchTable
│ │ │ │ +
81 bool allocate(Far::PatchTable const *farPatchTable,
│ │ │ │ +
82 ID3D11DeviceContext *deviceContext);
│ │ │ │
83
│ │ │ │ -
84private:
│ │ │ │ -
85 ID3D11Buffer* _vertexValenceBuffer;
│ │ │ │ -
86 ID3D11Buffer* _quadOffsetsBuffer;
│ │ │ │ -
87 ID3D11ShaderResourceView* _vertexSRV;
│ │ │ │ -
88 ID3D11ShaderResourceView* _vertexValenceSRV;
│ │ │ │ -
89 ID3D11ShaderResourceView* _quadOffsetsSRV;
│ │ │ │ -
90 int _quadOffsetsBase[2]; // gregory, boundaryGregory
│ │ │ │ -
91};
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ + │ │ │ │ +
85
│ │ │ │ +
86 ID3D11Buffer *_indexBuffer;
│ │ │ │ +
87 ID3D11Buffer *_patchParamBuffer;
│ │ │ │ +
88 ID3D11ShaderResourceView *_patchParamBufferSRV;
│ │ │ │ +
89};
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
91
│ │ │ │ +
92} // end namespace Osd
│ │ │ │
93
│ │ │ │ -
94
│ │ │ │ -
95} // end namespace Osd
│ │ │ │ +
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
95using namespace OPENSUBDIV_VERSION;
│ │ │ │
96
│ │ │ │ -
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
98using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
99
│ │ │ │ -
100} // end namespace OpenSubdiv
│ │ │ │ -
101
│ │ │ │ -
102#endif // OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
97} // end namespace OpenSubdiv
│ │ │ │ +
98
│ │ │ │ +
99#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ +
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ -
void UpdateVertexBuffer(ID3D11Buffer *vbo, int numVertices, int numVertexElements, ID3D11DeviceContext *pd3d11DeviceContext)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ - │ │ │ │ -
static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ +
bool allocate(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
ID3D11Buffer * GetPatchIndexBuffer() const
Returns the index buffer containing the patch control vertices.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
ID3D11ShaderResourceView * GetPatchParamSRV() const
Returns the SRV containing the patch parameter.
│ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11LegacyGregoryPatchTable.h │ │ │ │ │ +d3d11PatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,134 +24,134 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/patchTable.h" │ │ │ │ │ -31#include "../osd/nonCopyable.h" │ │ │ │ │ -32 │ │ │ │ │ -33struct ID3D11Buffer; │ │ │ │ │ -34struct ID3D11ShaderResourceView; │ │ │ │ │ -35struct ID3D11Device; │ │ │ │ │ -36struct ID3D11DeviceContext; │ │ │ │ │ -37 │ │ │ │ │ -38namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -39namespace OPENSUBDIV_VERSION { │ │ │ │ │ -40 │ │ │ │ │ -41namespace Osd { │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../far/patchDescriptor.h" │ │ │ │ │ +32#include "../osd/nonCopyable.h" │ │ │ │ │ +33#include "../osd/types.h" │ │ │ │ │ +34 │ │ │ │ │ +35struct ID3D11Buffer; │ │ │ │ │ +36struct ID3D11ShaderResourceView; │ │ │ │ │ +37struct ID3D11Device; │ │ │ │ │ +38struct ID3D11DeviceContext; │ │ │ │ │ +39 │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -_4_3class _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -44 : private NonCopyable { │ │ │ │ │ -45public: │ │ │ │ │ -_4_6 _~_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -47 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 static _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e( │ │ │ │ │ -50 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, DEVICE_CONTEXT context) { │ │ │ │ │ -51 return _C_r_e_a_t_e(farPatchTable, context->GetDeviceContext()); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_4 static _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e( │ │ │ │ │ -55 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -56 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -57 │ │ │ │ │ -_5_8 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(ID3D11Buffer *vbo, │ │ │ │ │ -59 int numVertices, int numVertexElements, │ │ │ │ │ -60 ID3D11DeviceContext *pd3d11DeviceContext); │ │ │ │ │ +43namespace Far{ │ │ │ │ │ +44 class PatchTable; │ │ │ │ │ +45}; │ │ │ │ │ +46 │ │ │ │ │ +47namespace Osd { │ │ │ │ │ +48 │ │ │ │ │ +_4_9class _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ +50public: │ │ │ │ │ +_5_1 typedef ID3D11Buffer * _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ +52 │ │ │ │ │ +_5_3 _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +_5_4 _~_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +55 │ │ │ │ │ +56 template │ │ │ │ │ +_5_7 static _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +58 DEVICE_CONTEXT context) { │ │ │ │ │ +59 return _C_r_e_a_t_e(farPatchTable, context->GetDeviceContext()); │ │ │ │ │ +60 } │ │ │ │ │ 61 │ │ │ │ │ -_6_2 ID3D11ShaderResourceView* _G_e_t_V_e_r_t_e_x_S_R_V() const { │ │ │ │ │ -63 return _vertexSRV; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_6 ID3D11ShaderResourceView* _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_S_R_V() const { │ │ │ │ │ -67 return _vertexValenceSRV; │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -_7_0 ID3D11ShaderResourceView* _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_S_R_V() const { │ │ │ │ │ -71 return _quadOffsetsSRV; │ │ │ │ │ +_6_2 static _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +63 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +64 │ │ │ │ │ +_6_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ +66 return ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +_7_0 ID3D11Buffer* _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +71 return ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ 72 } │ │ │ │ │ 73 │ │ │ │ │ -_7_4 int _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) { │ │ │ │ │ -75 if (type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) { │ │ │ │ │ -76 return _quadOffsetsBase[1]; │ │ │ │ │ +_7_5 ID3D11ShaderResourceView* _G_e_t_P_a_t_c_h_P_a_r_a_m_S_R_V() const { │ │ │ │ │ +76 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V; │ │ │ │ │ 77 } │ │ │ │ │ -78 return _quadOffsetsBase[0]; │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -81protected: │ │ │ │ │ -_8_2 _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +78 │ │ │ │ │ +79protected: │ │ │ │ │ +80 // allocate buffers from patchTable │ │ │ │ │ +_8_1 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +82 ID3D11DeviceContext *deviceContext); │ │ │ │ │ 83 │ │ │ │ │ -84private: │ │ │ │ │ -85 ID3D11Buffer* _vertexValenceBuffer; │ │ │ │ │ -86 ID3D11Buffer* _quadOffsetsBuffer; │ │ │ │ │ -87 ID3D11ShaderResourceView* _vertexSRV; │ │ │ │ │ -88 ID3D11ShaderResourceView* _vertexValenceSRV; │ │ │ │ │ -89 ID3D11ShaderResourceView* _quadOffsetsSRV; │ │ │ │ │ -90 int _quadOffsetsBase[2]; // gregory, boundaryGregory │ │ │ │ │ -91}; │ │ │ │ │ -92 │ │ │ │ │ +_8_4 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +85 │ │ │ │ │ +_8_6 ID3D11Buffer *___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_8_7 ID3D11Buffer *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +_8_8 ID3D11ShaderResourceView *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V; │ │ │ │ │ +89}; │ │ │ │ │ +90 │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace Osd │ │ │ │ │ 93 │ │ │ │ │ -94 │ │ │ │ │ -95} // end namespace Osd │ │ │ │ │ +94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 96 │ │ │ │ │ -97} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -98using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -99 │ │ │ │ │ -100} // end namespace OpenSubdiv │ │ │ │ │ -101 │ │ │ │ │ -102#endif // OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +97} // end namespace OpenSubdiv │ │ │ │ │ +98 │ │ │ │ │ +99#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ -@ GREGORY_BOUNDARY │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchArray > PatchArrayVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ Container for arrays of parametric patches. │ │ │ │ │ DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -void UpdateVertexBuffer(ID3D11Buffer *vbo, int numVertices, int │ │ │ │ │ -numVertexElements, ID3D11DeviceContext *pd3d11DeviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ -int GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_~_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~D3D11LegacyGregoryPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ -*farPatchTable, ID3D11DeviceContext *deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_e_r_t_e_x_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetVertexSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ -*farPatchTable, DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetVertexValenceSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetQuadOffsetsSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -D3D11LegacyGregoryPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ +DEVICE_CONTEXT context) │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(Far::PatchTable const *farPatchTable, ID3D11DeviceContext │ │ │ │ │ +*deviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ +ID3D11Buffer * VertexBufferBinding │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_~_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~D3D11PatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +ID3D11Buffer * GetPatchIndexBuffer() const │ │ │ │ │ +Returns the index buffer containing the patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +ID3D11Buffer * _indexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ +ID3D11DeviceContext *deviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * _patchParamBufferSRV │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +ID3D11Buffer * _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetPatchParamSRV() const │ │ │ │ │ +Returns the SRV containing the patch parameter. │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +D3D11PatchTable() │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00839.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,45 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
d3d11ComputeEvaluator.h File Reference
│ │ │ │ +
d3d11LegacyGregoryPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../far/patchTable.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  D3D11StencilTable
 D3D11 stencil table. More...
 
class  D3D11ComputeEvaluator
class  D3D11LegacyGregoryPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -d3d11ComputeEvaluator.h File Reference │ │ │ │ │ +d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  D3D11 stencil table. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00839 = [ │ │ │ │ │ - ["D3D11StencilTable", "a01197.html", "a01197"], │ │ │ │ │ - ["D3D11ComputeEvaluator", "a01201.html", "a01201"] │ │ │ │ │ + ["D3D11LegacyGregoryPatchTable", "a01205.html", "a01205"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
d3d11ComputeEvaluator.h
│ │ │ │ +
d3d11LegacyGregoryPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,225 +119,122 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30struct ID3D11DeviceContext;
│ │ │ │ -
31struct ID3D11Buffer;
│ │ │ │ -
32struct ID3D11ComputeShader;
│ │ │ │ -
33struct ID3D11ClassLinkage;
│ │ │ │ -
34struct ID3D11ClassInstance;
│ │ │ │ -
35struct ID3D11ShaderResourceView;
│ │ │ │ -
36struct ID3D11UnorderedAccessView;
│ │ │ │ +
30#include "../far/patchTable.h"
│ │ │ │ +
31#include "../osd/nonCopyable.h"
│ │ │ │ +
32
│ │ │ │ +
33struct ID3D11Buffer;
│ │ │ │ +
34struct ID3D11ShaderResourceView;
│ │ │ │ +
35struct ID3D11Device;
│ │ │ │ +
36struct ID3D11DeviceContext;
│ │ │ │
37
│ │ │ │ -
38#include "../osd/bufferDescriptor.h"
│ │ │ │ -
39
│ │ │ │ -
40namespace OpenSubdiv {
│ │ │ │ -
41namespace OPENSUBDIV_VERSION {
│ │ │ │ +
38namespace OpenSubdiv {
│ │ │ │ +
39namespace OPENSUBDIV_VERSION {
│ │ │ │ +
40
│ │ │ │ +
41namespace Osd {
│ │ │ │
42
│ │ │ │ -
43namespace Far {
│ │ │ │ -
44 class StencilTable;
│ │ │ │ -
45}
│ │ │ │ -
46
│ │ │ │ -
47namespace Osd {
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57public:
│ │ │ │ -
58 template <typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
59 static D3D11StencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ -
60 DEVICE_CONTEXT context) {
│ │ │ │ -
61 return new D3D11StencilTable(stencilTable, context->GetDeviceContext());
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
64 static D3D11StencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ -
65 ID3D11DeviceContext *deviceContext) {
│ │ │ │ -
66 return new D3D11StencilTable(stencilTable, deviceContext);
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ - │ │ │ │ -
70 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
71
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
44 : private NonCopyable<D3D11LegacyGregoryPatchTable> {
│ │ │ │ +
45public:
│ │ │ │ + │ │ │ │ +
47
│ │ │ │ +
48 template<typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50 Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context) {
│ │ │ │ +
51 return Create(farPatchTable, context->GetDeviceContext());
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ + │ │ │ │ +
55 Far::PatchTable const *farPatchTable,
│ │ │ │ +
56 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
57
│ │ │ │ +
58 void UpdateVertexBuffer(ID3D11Buffer *vbo,
│ │ │ │ +
59 int numVertices, int numVertexElements,
│ │ │ │ +
60 ID3D11DeviceContext *pd3d11DeviceContext);
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
62 ID3D11ShaderResourceView* GetVertexSRV() const {
│ │ │ │ +
63 return _vertexSRV;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
66 ID3D11ShaderResourceView* GetVertexValenceSRV() const {
│ │ │ │ +
67 return _vertexValenceSRV;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 ID3D11ShaderResourceView* GetQuadOffsetsSRV() const {
│ │ │ │ +
71 return _quadOffsetsSRV;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │
73
│ │ │ │ -
74 // interfaces needed for D3D11ComputeEvaluator
│ │ │ │ -
75 ID3D11ShaderResourceView *GetSizesSRV() const { return _sizes; }
│ │ │ │ -
76 ID3D11ShaderResourceView *GetOffsetsSRV() const { return _offsets; }
│ │ │ │ -
77 ID3D11ShaderResourceView *GetIndicesSRV() const { return _indices; }
│ │ │ │ -
78 ID3D11ShaderResourceView *GetWeightsSRV() const { return _weights; }
│ │ │ │ -
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
76 return _quadOffsetsBase[1];
│ │ │ │ +
77 }
│ │ │ │ +
78 return _quadOffsetsBase[0];
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │
80
│ │ │ │ -
81private:
│ │ │ │ -
82 ID3D11ShaderResourceView *_sizes;
│ │ │ │ -
83 ID3D11ShaderResourceView *_offsets;
│ │ │ │ -
84 ID3D11ShaderResourceView *_indices;
│ │ │ │ -
85 ID3D11ShaderResourceView *_weights;
│ │ │ │ -
86 ID3D11Buffer *_sizesBuffer;
│ │ │ │ -
87 ID3D11Buffer *_offsetsBuffer;
│ │ │ │ -
88 ID3D11Buffer *_indicesBuffer;
│ │ │ │ -
89 ID3D11Buffer *_weightsBuffer;
│ │ │ │ -
90
│ │ │ │ -
91 int _numStencils;
│ │ │ │ -
92};
│ │ │ │ +
81protected:
│ │ │ │ + │ │ │ │ +
83
│ │ │ │ +
84private:
│ │ │ │ +
85 ID3D11Buffer* _vertexValenceBuffer;
│ │ │ │ +
86 ID3D11Buffer* _quadOffsetsBuffer;
│ │ │ │ +
87 ID3D11ShaderResourceView* _vertexSRV;
│ │ │ │ +
88 ID3D11ShaderResourceView* _vertexValenceSRV;
│ │ │ │ +
89 ID3D11ShaderResourceView* _quadOffsetsSRV;
│ │ │ │ +
90 int _quadOffsetsBase[2]; // gregory, boundaryGregory
│ │ │ │ +
91};
│ │ │ │
│ │ │ │ +
92
│ │ │ │
93
│ │ │ │ -
94// ---------------------------------------------------------------------------
│ │ │ │ -
95
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
97public:
│ │ │ │ -
98 typedef bool Instantiatable;
│ │ │ │ - │ │ │ │ -
100 BufferDescriptor const &dstDesc,
│ │ │ │ -
101 BufferDescriptor const &duDesc,
│ │ │ │ -
102 BufferDescriptor const &dvDesc,
│ │ │ │ -
103 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
104
│ │ │ │ - │ │ │ │ -
106 BufferDescriptor const &dstDesc,
│ │ │ │ -
107 BufferDescriptor const &duDesc,
│ │ │ │ -
108 BufferDescriptor const &dvDesc,
│ │ │ │ -
109 BufferDescriptor const &duuDesc,
│ │ │ │ -
110 BufferDescriptor const &duvDesc,
│ │ │ │ -
111 BufferDescriptor const &dvvDesc,
│ │ │ │ -
112 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
113
│ │ │ │ - │ │ │ │ -
116
│ │ │ │ - │ │ │ │ -
119
│ │ │ │ -
147 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
148 static bool EvalStencils(
│ │ │ │ -
149 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
150 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
151 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
152 D3D11ComputeEvaluator const *instance,
│ │ │ │ -
153 ID3D11DeviceContext * deviceContext) {
│ │ │ │ -
154 if (instance) {
│ │ │ │ -
155 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
156 dstBuffer, dstDesc,
│ │ │ │ -
157 stencilTable,
│ │ │ │ -
158 deviceContext);
│ │ │ │ -
159 } else {
│ │ │ │ -
160 // Create an instance on demand (slow)
│ │ │ │ -
161 (void)deviceContext; // unused
│ │ │ │ -
162 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
165 deviceContext);
│ │ │ │ -
166 if (instance) {
│ │ │ │ -
167 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
168 dstBuffer, dstDesc,
│ │ │ │ -
169 stencilTable,
│ │ │ │ -
170 deviceContext);
│ │ │ │ -
171 delete instance;
│ │ │ │ -
172 return r;
│ │ │ │ -
173 }
│ │ │ │ -
174 return false;
│ │ │ │ -
175 }
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
180 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
182 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
183 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
184 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
185 ID3D11DeviceContext *deviceContext) const {
│ │ │ │ -
186 return EvalStencils(srcBuffer->BindD3D11UAV(deviceContext), srcDesc,
│ │ │ │ -
187 dstBuffer->BindD3D11UAV(deviceContext), dstDesc,
│ │ │ │ -
188 stencilTable->GetSizesSRV(),
│ │ │ │ -
189 stencilTable->GetOffsetsSRV(),
│ │ │ │ -
190 stencilTable->GetIndicesSRV(),
│ │ │ │ -
191 stencilTable->GetWeightsSRV(),
│ │ │ │ -
192 /* start = */ 0,
│ │ │ │ -
193 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ -
194 deviceContext);
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
199 bool EvalStencils(ID3D11UnorderedAccessView *srcSRV,
│ │ │ │ -
200 BufferDescriptor const &srcDesc,
│ │ │ │ -
201 ID3D11UnorderedAccessView *dstUAV,
│ │ │ │ -
202 BufferDescriptor const &dstDesc,
│ │ │ │ -
203 ID3D11ShaderResourceView *sizesSRV,
│ │ │ │ -
204 ID3D11ShaderResourceView *offsetsSRV,
│ │ │ │ -
205 ID3D11ShaderResourceView *indicesSRV,
│ │ │ │ -
206 ID3D11ShaderResourceView *weightsSRV,
│ │ │ │ -
207 int start,
│ │ │ │ -
208 int end,
│ │ │ │ -
209 ID3D11DeviceContext *deviceContext) const;
│ │ │ │ -
210
│ │ │ │ -
212 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ -
213 BufferDescriptor const &dstDesc,
│ │ │ │ -
214 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
215
│ │ │ │ -
217 static void Synchronize(ID3D11DeviceContext *deviceContext);
│ │ │ │ -
218
│ │ │ │ -
219private:
│ │ │ │ -
220 ID3D11ComputeShader * _computeShader;
│ │ │ │ -
221 ID3D11ClassLinkage * _classLinkage;
│ │ │ │ -
222 ID3D11ClassInstance * _singleBufferKernel;
│ │ │ │ -
223 ID3D11ClassInstance * _separateBufferKernel;
│ │ │ │ -
224 ID3D11Buffer * _uniformArgs; // uniform parameters for kernels
│ │ │ │ -
225
│ │ │ │ -
226 int _workGroupSize;
│ │ │ │ -
227};
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
229} // end namespace Osd
│ │ │ │ -
230
│ │ │ │ -
231} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
232using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
233
│ │ │ │ -
234} // end namespace OpenSubdiv
│ │ │ │ -
235
│ │ │ │ -
236
│ │ │ │ -
237#endif // OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ -
static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
D3D11StencilTable(Far::StencilTable const *stencilTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ -
static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext)
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, D3D11ComputeEvaluator const *instance, ID3D11DeviceContext *deviceContext)
Generic static compute function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, ID3D11DeviceContext *deviceContext)
│ │ │ │ - │ │ │ │ -
static void Synchronize(ID3D11DeviceContext *deviceContext)
Wait the dispatched kernel finishes.
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, ID3D11DeviceContext *deviceContext) const
│ │ │ │ -
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, ID3D11DeviceContext *deviceContext)
Configure DX kernel. Returns false if it fails to compile the kernel.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
bool EvalStencils(ID3D11UnorderedAccessView *srcSRV, BufferDescriptor const &srcDesc, ID3D11UnorderedAccessView *dstUAV, BufferDescriptor const &dstDesc, ID3D11ShaderResourceView *sizesSRV, ID3D11ShaderResourceView *offsetsSRV, ID3D11ShaderResourceView *indicesSRV, ID3D11ShaderResourceView *weightsSRV, int start, int end, ID3D11DeviceContext *deviceContext) const
│ │ │ │ +
94
│ │ │ │ +
95} // end namespace Osd
│ │ │ │ +
96
│ │ │ │ +
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
98using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
99
│ │ │ │ +
100} // end namespace OpenSubdiv
│ │ │ │ +
101
│ │ │ │ +
102#endif // OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ +
void UpdateVertexBuffer(ID3D11Buffer *vbo, int numVertices, int numVertexElements, ID3D11DeviceContext *pd3d11DeviceContext)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ + │ │ │ │ +
static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11ComputeEvaluator.h │ │ │ │ │ +d3d11LegacyGregoryPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,272 +24,134 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30struct ID3D11DeviceContext; │ │ │ │ │ -31struct ID3D11Buffer; │ │ │ │ │ -32struct ID3D11ComputeShader; │ │ │ │ │ -33struct ID3D11ClassLinkage; │ │ │ │ │ -34struct ID3D11ClassInstance; │ │ │ │ │ -35struct ID3D11ShaderResourceView; │ │ │ │ │ -36struct ID3D11UnorderedAccessView; │ │ │ │ │ +30#include "../far/patchTable.h" │ │ │ │ │ +31#include "../osd/nonCopyable.h" │ │ │ │ │ +32 │ │ │ │ │ +33struct ID3D11Buffer; │ │ │ │ │ +34struct ID3D11ShaderResourceView; │ │ │ │ │ +35struct ID3D11Device; │ │ │ │ │ +36struct ID3D11DeviceContext; │ │ │ │ │ 37 │ │ │ │ │ -38#include "../osd/bufferDescriptor.h" │ │ │ │ │ -39 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +38namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +39namespace OPENSUBDIV_VERSION { │ │ │ │ │ +40 │ │ │ │ │ +41namespace Osd { │ │ │ │ │ 42 │ │ │ │ │ -43namespace Far { │ │ │ │ │ -44 class StencilTable; │ │ │ │ │ -45} │ │ │ │ │ -46 │ │ │ │ │ -47namespace Osd { │ │ │ │ │ -48 │ │ │ │ │ -_5_6class _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e { │ │ │ │ │ -57public: │ │ │ │ │ -58 template │ │ │ │ │ -_5_9 static _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ -60 DEVICE_CONTEXT context) { │ │ │ │ │ -61 return new _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, context->GetDeviceContext()); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_4 static _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ -65 ID3D11DeviceContext *deviceContext) { │ │ │ │ │ -66 return new _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, deviceContext); │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ -70 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -71 │ │ │ │ │ -_7_2 _~_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ +_4_3class _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +44 : private NonCopyable { │ │ │ │ │ +45public: │ │ │ │ │ +_4_6 _~_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +47 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 static _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e( │ │ │ │ │ +50 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, DEVICE_CONTEXT context) { │ │ │ │ │ +51 return _C_r_e_a_t_e(farPatchTable, context->GetDeviceContext()); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 static _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e( │ │ │ │ │ +55 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +56 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +57 │ │ │ │ │ +_5_8 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(ID3D11Buffer *vbo, │ │ │ │ │ +59 int numVertices, int numVertexElements, │ │ │ │ │ +60 ID3D11DeviceContext *pd3d11DeviceContext); │ │ │ │ │ +61 │ │ │ │ │ +_6_2 ID3D11ShaderResourceView* _G_e_t_V_e_r_t_e_x_S_R_V() const { │ │ │ │ │ +63 return _vertexSRV; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +_6_6 ID3D11ShaderResourceView* _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_S_R_V() const { │ │ │ │ │ +67 return _vertexValenceSRV; │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 ID3D11ShaderResourceView* _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_S_R_V() const { │ │ │ │ │ +71 return _quadOffsetsSRV; │ │ │ │ │ +72 } │ │ │ │ │ 73 │ │ │ │ │ -74 // interfaces needed for D3D11ComputeEvaluator │ │ │ │ │ -_7_5 ID3D11ShaderResourceView *_G_e_t_S_i_z_e_s_S_R_V() const { return _sizes; } │ │ │ │ │ -_7_6 ID3D11ShaderResourceView *_G_e_t_O_f_f_s_e_t_s_S_R_V() const { return _offsets; } │ │ │ │ │ -_7_7 ID3D11ShaderResourceView *_G_e_t_I_n_d_i_c_e_s_S_R_V() const { return _indices; } │ │ │ │ │ -_7_8 ID3D11ShaderResourceView *_G_e_t_W_e_i_g_h_t_s_S_R_V() const { return _weights; } │ │ │ │ │ -_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +_7_4 int _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) { │ │ │ │ │ +75 if (type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) { │ │ │ │ │ +76 return _quadOffsetsBase[1]; │ │ │ │ │ +77 } │ │ │ │ │ +78 return _quadOffsetsBase[0]; │ │ │ │ │ +79 } │ │ │ │ │ 80 │ │ │ │ │ -81private: │ │ │ │ │ -82 ID3D11ShaderResourceView *_sizes; │ │ │ │ │ -83 ID3D11ShaderResourceView *_offsets; │ │ │ │ │ -84 ID3D11ShaderResourceView *_indices; │ │ │ │ │ -85 ID3D11ShaderResourceView *_weights; │ │ │ │ │ -86 ID3D11Buffer *_sizesBuffer; │ │ │ │ │ -87 ID3D11Buffer *_offsetsBuffer; │ │ │ │ │ -88 ID3D11Buffer *_indicesBuffer; │ │ │ │ │ -89 ID3D11Buffer *_weightsBuffer; │ │ │ │ │ -90 │ │ │ │ │ -91 int _numStencils; │ │ │ │ │ -92}; │ │ │ │ │ +81protected: │ │ │ │ │ +_8_2 _D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +83 │ │ │ │ │ +84private: │ │ │ │ │ +85 ID3D11Buffer* _vertexValenceBuffer; │ │ │ │ │ +86 ID3D11Buffer* _quadOffsetsBuffer; │ │ │ │ │ +87 ID3D11ShaderResourceView* _vertexSRV; │ │ │ │ │ +88 ID3D11ShaderResourceView* _vertexValenceSRV; │ │ │ │ │ +89 ID3D11ShaderResourceView* _quadOffsetsSRV; │ │ │ │ │ +90 int _quadOffsetsBase[2]; // gregory, boundaryGregory │ │ │ │ │ +91}; │ │ │ │ │ +92 │ │ │ │ │ 93 │ │ │ │ │ -94// -------------------------------------------------------------------------- │ │ │ │ │ -- │ │ │ │ │ -95 │ │ │ │ │ -_9_6class _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -97public: │ │ │ │ │ -_9_8 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ -_9_9 static _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -100 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -101 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -102 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -103 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -104 │ │ │ │ │ -_1_0_5 static _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -108 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -109 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -110 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -111 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -112 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -113 │ │ │ │ │ -_1_1_5 _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -116 │ │ │ │ │ -_1_1_8 _~_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -119 │ │ │ │ │ -147 template │ │ │ │ │ -_1_4_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -149 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -150 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -151 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -152 _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -153 ID3D11DeviceContext * deviceContext) { │ │ │ │ │ -154 if (instance) { │ │ │ │ │ -155 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -156 dstBuffer, dstDesc, │ │ │ │ │ -157 stencilTable, │ │ │ │ │ -158 deviceContext); │ │ │ │ │ -159 } else { │ │ │ │ │ -160 // Create an instance on demand (slow) │ │ │ │ │ -161 (void)deviceContext; // unused │ │ │ │ │ -162 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -163 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -164 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -165 deviceContext); │ │ │ │ │ -166 if (instance) { │ │ │ │ │ -167 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -168 dstBuffer, dstDesc, │ │ │ │ │ -169 stencilTable, │ │ │ │ │ -170 deviceContext); │ │ │ │ │ -171 delete instance; │ │ │ │ │ -172 return r; │ │ │ │ │ -173 } │ │ │ │ │ -174 return false; │ │ │ │ │ -175 } │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -180 template │ │ │ │ │ -_1_8_1 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -182 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -183 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -184 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -185 ID3D11DeviceContext *deviceContext) const { │ │ │ │ │ -186 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindD3D11UAV(deviceContext), srcDesc, │ │ │ │ │ -187 dstBuffer->BindD3D11UAV(deviceContext), dstDesc, │ │ │ │ │ -188 stencilTable->GetSizesSRV(), │ │ │ │ │ -189 stencilTable->GetOffsetsSRV(), │ │ │ │ │ -190 stencilTable->GetIndicesSRV(), │ │ │ │ │ -191 stencilTable->GetWeightsSRV(), │ │ │ │ │ -192 /* start = */ 0, │ │ │ │ │ -193 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ -194 deviceContext); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -_1_9_9 bool _E_v_a_l_S_t_e_n_c_i_l_s(ID3D11UnorderedAccessView *srcSRV, │ │ │ │ │ -200 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -201 ID3D11UnorderedAccessView *dstUAV, │ │ │ │ │ -202 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -203 ID3D11ShaderResourceView *sizesSRV, │ │ │ │ │ -204 ID3D11ShaderResourceView *offsetsSRV, │ │ │ │ │ -205 ID3D11ShaderResourceView *indicesSRV, │ │ │ │ │ -206 ID3D11ShaderResourceView *weightsSRV, │ │ │ │ │ -207 int start, │ │ │ │ │ -208 int end, │ │ │ │ │ -209 ID3D11DeviceContext *deviceContext) const; │ │ │ │ │ -210 │ │ │ │ │ -_2_1_2 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -213 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -214 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -215 │ │ │ │ │ -_2_1_7 static void _S_y_n_c_h_r_o_n_i_z_e(ID3D11DeviceContext *deviceContext); │ │ │ │ │ -218 │ │ │ │ │ -219private: │ │ │ │ │ -220 ID3D11ComputeShader * _computeShader; │ │ │ │ │ -221 ID3D11ClassLinkage * _classLinkage; │ │ │ │ │ -222 ID3D11ClassInstance * _singleBufferKernel; │ │ │ │ │ -223 ID3D11ClassInstance * _separateBufferKernel; │ │ │ │ │ -224 ID3D11Buffer * _uniformArgs; // uniform parameters for kernels │ │ │ │ │ -225 │ │ │ │ │ -226 int _workGroupSize; │ │ │ │ │ -227}; │ │ │ │ │ -228 │ │ │ │ │ -229} // end namespace Osd │ │ │ │ │ -230 │ │ │ │ │ -231} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -232using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -233 │ │ │ │ │ -234} // end namespace OpenSubdiv │ │ │ │ │ -235 │ │ │ │ │ -236 │ │ │ │ │ -237#endif // OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ +94 │ │ │ │ │ +95} // end namespace Osd │ │ │ │ │ +96 │ │ │ │ │ +97} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +98using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +99 │ │ │ │ │ +100} // end namespace OpenSubdiv │ │ │ │ │ +101 │ │ │ │ │ +102#endif // OPENSUBDIV3_OSD_D3D11_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -D3D11 stencil table. │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, │ │ │ │ │ -DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetOffsetsSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetIndicesSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -~D3D11StencilTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -D3D11StencilTable(Far::StencilTable const *stencilTable, ID3D11DeviceContext │ │ │ │ │ -*deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, │ │ │ │ │ -ID3D11DeviceContext *deviceContext) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetSizesSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetWeightsSRV() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ -const *stencilTable, D3D11ComputeEvaluator const *instance, ID3D11DeviceContext │ │ │ │ │ -*deviceContext) │ │ │ │ │ -Generic static compute function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, │ │ │ │ │ -ID3D11DeviceContext *deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ -bool Instantiatable │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Wait the dispatched kernel finishes. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ -*stencilTable, ID3D11DeviceContext *deviceContext) const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ -bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ -ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Configure DX kernel. Returns false if it fails to compile the kernel. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -D3D11ComputeEvaluator() │ │ │ │ │ -Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ -_~_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -~D3D11ComputeEvaluator() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(ID3D11UnorderedAccessView *srcSRV, BufferDescriptor const │ │ │ │ │ -&srcDesc, ID3D11UnorderedAccessView *dstUAV, BufferDescriptor const &dstDesc, │ │ │ │ │ -ID3D11ShaderResourceView *sizesSRV, ID3D11ShaderResourceView *offsetsSRV, │ │ │ │ │ -ID3D11ShaderResourceView *indicesSRV, ID3D11ShaderResourceView *weightsSRV, int │ │ │ │ │ -start, int end, ID3D11DeviceContext *deviceContext) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ +@ GREGORY_BOUNDARY │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +void UpdateVertexBuffer(ID3D11Buffer *vbo, int numVertices, int │ │ │ │ │ +numVertexElements, ID3D11DeviceContext *pd3d11DeviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ +int GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_~_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~D3D11LegacyGregoryPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ +*farPatchTable, ID3D11DeviceContext *deviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_e_r_t_e_x_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetVertexSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11LegacyGregoryPatchTable * Create(Far::PatchTable const │ │ │ │ │ +*farPatchTable, DEVICE_CONTEXT context) │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetVertexValenceSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetQuadOffsetsSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_D_3_D_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +D3D11LegacyGregoryPatchTable() │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _d_3_d_1_1_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00842.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,28 +90,28 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
d3d11PatchTable.h File Reference
│ │ │ │ +
d3d11ComputeEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <vector>
│ │ │ │ -#include "../far/patchDescriptor.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  D3D11PatchTable
class  D3D11StencilTable
 D3D11 stencil table. More...
 
class  D3D11ComputeEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -122,13 +122,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -d3d11PatchTable.h File Reference │ │ │ │ │ +d3d11ComputeEvaluator.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  D3D11 stencil table. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00842.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00842 = [ │ │ │ │ │ - ["D3D11PatchTable", "a01209.html", "a01209"] │ │ │ │ │ + ["D3D11StencilTable", "a01197.html", "a01197"], │ │ │ │ │ + ["D3D11ComputeEvaluator", "a01201.html", "a01201"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
d3d11PatchTable.h
│ │ │ │ +
d3d11ComputeEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,118 +119,225 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <vector>
│ │ │ │ -
31#include "../far/patchDescriptor.h"
│ │ │ │ -
32#include "../osd/nonCopyable.h"
│ │ │ │ -
33#include "../osd/types.h"
│ │ │ │ -
34
│ │ │ │ -
35struct ID3D11Buffer;
│ │ │ │ -
36struct ID3D11ShaderResourceView;
│ │ │ │ -
37struct ID3D11Device;
│ │ │ │ -
38struct ID3D11DeviceContext;
│ │ │ │ +
30struct ID3D11DeviceContext;
│ │ │ │ +
31struct ID3D11Buffer;
│ │ │ │ +
32struct ID3D11ComputeShader;
│ │ │ │ +
33struct ID3D11ClassLinkage;
│ │ │ │ +
34struct ID3D11ClassInstance;
│ │ │ │ +
35struct ID3D11ShaderResourceView;
│ │ │ │ +
36struct ID3D11UnorderedAccessView;
│ │ │ │ +
37
│ │ │ │ +
38#include "../osd/bufferDescriptor.h"
│ │ │ │
39
│ │ │ │
40namespace OpenSubdiv {
│ │ │ │
41namespace OPENSUBDIV_VERSION {
│ │ │ │
42
│ │ │ │ -
43namespace Far{
│ │ │ │ -
44 class PatchTable;
│ │ │ │ -
45};
│ │ │ │ +
43namespace Far {
│ │ │ │ +
44 class StencilTable;
│ │ │ │ +
45}
│ │ │ │
46
│ │ │ │
47namespace Osd {
│ │ │ │
48
│ │ │ │ -
│ │ │ │ -
49class D3D11PatchTable : private NonCopyable<D3D11PatchTable> {
│ │ │ │ -
50public:
│ │ │ │ -
51 typedef ID3D11Buffer * VertexBufferBinding;
│ │ │ │ -
52
│ │ │ │ - │ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
56 template<typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
57 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ -
58 DEVICE_CONTEXT context) {
│ │ │ │ -
59 return Create(farPatchTable, context->GetDeviceContext());
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ -
63 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
64
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 return _patchArrays;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57public:
│ │ │ │ +
58 template <typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
59 static D3D11StencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ +
60 DEVICE_CONTEXT context) {
│ │ │ │ +
61 return new D3D11StencilTable(stencilTable, context->GetDeviceContext());
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
64 static D3D11StencilTable *Create(Far::StencilTable const *stencilTable,
│ │ │ │ +
65 ID3D11DeviceContext *deviceContext) {
│ │ │ │ +
66 return new D3D11StencilTable(stencilTable, deviceContext);
│ │ │ │
67 }
│ │ │ │
│ │ │ │
68
│ │ │ │ -
│ │ │ │ -
70 ID3D11Buffer* GetPatchIndexBuffer() const {
│ │ │ │ -
71 return _indexBuffer;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
70 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
71
│ │ │ │ + │ │ │ │
73
│ │ │ │ -
│ │ │ │ -
75 ID3D11ShaderResourceView* GetPatchParamSRV() const {
│ │ │ │ - │ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79protected:
│ │ │ │ -
80 // allocate buffers from patchTable
│ │ │ │ -
81 bool allocate(Far::PatchTable const *farPatchTable,
│ │ │ │ -
82 ID3D11DeviceContext *deviceContext);
│ │ │ │ -
83
│ │ │ │ - │ │ │ │ -
85
│ │ │ │ -
86 ID3D11Buffer *_indexBuffer;
│ │ │ │ -
87 ID3D11Buffer *_patchParamBuffer;
│ │ │ │ -
88 ID3D11ShaderResourceView *_patchParamBufferSRV;
│ │ │ │ -
89};
│ │ │ │ -
│ │ │ │ +
74 // interfaces needed for D3D11ComputeEvaluator
│ │ │ │ +
75 ID3D11ShaderResourceView *GetSizesSRV() const { return _sizes; }
│ │ │ │ +
76 ID3D11ShaderResourceView *GetOffsetsSRV() const { return _offsets; }
│ │ │ │ +
77 ID3D11ShaderResourceView *GetIndicesSRV() const { return _indices; }
│ │ │ │ +
78 ID3D11ShaderResourceView *GetWeightsSRV() const { return _weights; }
│ │ │ │ +
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
80
│ │ │ │ +
81private:
│ │ │ │ +
82 ID3D11ShaderResourceView *_sizes;
│ │ │ │ +
83 ID3D11ShaderResourceView *_offsets;
│ │ │ │ +
84 ID3D11ShaderResourceView *_indices;
│ │ │ │ +
85 ID3D11ShaderResourceView *_weights;
│ │ │ │ +
86 ID3D11Buffer *_sizesBuffer;
│ │ │ │ +
87 ID3D11Buffer *_offsetsBuffer;
│ │ │ │ +
88 ID3D11Buffer *_indicesBuffer;
│ │ │ │ +
89 ID3D11Buffer *_weightsBuffer;
│ │ │ │
90
│ │ │ │ -
91
│ │ │ │ -
92} // end namespace Osd
│ │ │ │ +
91 int _numStencils;
│ │ │ │ +
92};
│ │ │ │ +
│ │ │ │
93
│ │ │ │ -
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
95using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
96
│ │ │ │ -
97} // end namespace OpenSubdiv
│ │ │ │ -
98
│ │ │ │ -
99#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ -
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ -
static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
│ │ │ │ - │ │ │ │ -
bool allocate(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
ID3D11Buffer * GetPatchIndexBuffer() const
Returns the index buffer containing the patch control vertices.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
ID3D11ShaderResourceView * GetPatchParamSRV() const
Returns the SRV containing the patch parameter.
│ │ │ │ - │ │ │ │ +
94// ---------------------------------------------------------------------------
│ │ │ │ +
95
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
97public:
│ │ │ │ +
98 typedef bool Instantiatable;
│ │ │ │ + │ │ │ │ +
100 BufferDescriptor const &dstDesc,
│ │ │ │ +
101 BufferDescriptor const &duDesc,
│ │ │ │ +
102 BufferDescriptor const &dvDesc,
│ │ │ │ +
103 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
104
│ │ │ │ + │ │ │ │ +
106 BufferDescriptor const &dstDesc,
│ │ │ │ +
107 BufferDescriptor const &duDesc,
│ │ │ │ +
108 BufferDescriptor const &dvDesc,
│ │ │ │ +
109 BufferDescriptor const &duuDesc,
│ │ │ │ +
110 BufferDescriptor const &duvDesc,
│ │ │ │ +
111 BufferDescriptor const &dvvDesc,
│ │ │ │ +
112 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
113
│ │ │ │ + │ │ │ │ +
116
│ │ │ │ + │ │ │ │ +
119
│ │ │ │ +
147 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
148 static bool EvalStencils(
│ │ │ │ +
149 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
150 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
151 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
152 D3D11ComputeEvaluator const *instance,
│ │ │ │ +
153 ID3D11DeviceContext * deviceContext) {
│ │ │ │ +
154 if (instance) {
│ │ │ │ +
155 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
156 dstBuffer, dstDesc,
│ │ │ │ +
157 stencilTable,
│ │ │ │ +
158 deviceContext);
│ │ │ │ +
159 } else {
│ │ │ │ +
160 // Create an instance on demand (slow)
│ │ │ │ +
161 (void)deviceContext; // unused
│ │ │ │ +
162 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
165 deviceContext);
│ │ │ │ +
166 if (instance) {
│ │ │ │ +
167 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
168 dstBuffer, dstDesc,
│ │ │ │ +
169 stencilTable,
│ │ │ │ +
170 deviceContext);
│ │ │ │ +
171 delete instance;
│ │ │ │ +
172 return r;
│ │ │ │ +
173 }
│ │ │ │ +
174 return false;
│ │ │ │ +
175 }
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
180 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
182 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
183 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
184 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
185 ID3D11DeviceContext *deviceContext) const {
│ │ │ │ +
186 return EvalStencils(srcBuffer->BindD3D11UAV(deviceContext), srcDesc,
│ │ │ │ +
187 dstBuffer->BindD3D11UAV(deviceContext), dstDesc,
│ │ │ │ +
188 stencilTable->GetSizesSRV(),
│ │ │ │ +
189 stencilTable->GetOffsetsSRV(),
│ │ │ │ +
190 stencilTable->GetIndicesSRV(),
│ │ │ │ +
191 stencilTable->GetWeightsSRV(),
│ │ │ │ +
192 /* start = */ 0,
│ │ │ │ +
193 /* end = */ stencilTable->GetNumStencils(),
│ │ │ │ +
194 deviceContext);
│ │ │ │ +
195 }
│ │ │ │ +
│ │ │ │ +
196
│ │ │ │ +
199 bool EvalStencils(ID3D11UnorderedAccessView *srcSRV,
│ │ │ │ +
200 BufferDescriptor const &srcDesc,
│ │ │ │ +
201 ID3D11UnorderedAccessView *dstUAV,
│ │ │ │ +
202 BufferDescriptor const &dstDesc,
│ │ │ │ +
203 ID3D11ShaderResourceView *sizesSRV,
│ │ │ │ +
204 ID3D11ShaderResourceView *offsetsSRV,
│ │ │ │ +
205 ID3D11ShaderResourceView *indicesSRV,
│ │ │ │ +
206 ID3D11ShaderResourceView *weightsSRV,
│ │ │ │ +
207 int start,
│ │ │ │ +
208 int end,
│ │ │ │ +
209 ID3D11DeviceContext *deviceContext) const;
│ │ │ │ +
210
│ │ │ │ +
212 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ +
213 BufferDescriptor const &dstDesc,
│ │ │ │ +
214 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
215
│ │ │ │ +
217 static void Synchronize(ID3D11DeviceContext *deviceContext);
│ │ │ │ +
218
│ │ │ │ +
219private:
│ │ │ │ +
220 ID3D11ComputeShader * _computeShader;
│ │ │ │ +
221 ID3D11ClassLinkage * _classLinkage;
│ │ │ │ +
222 ID3D11ClassInstance * _singleBufferKernel;
│ │ │ │ +
223 ID3D11ClassInstance * _separateBufferKernel;
│ │ │ │ +
224 ID3D11Buffer * _uniformArgs; // uniform parameters for kernels
│ │ │ │ +
225
│ │ │ │ +
226 int _workGroupSize;
│ │ │ │ +
227};
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
229} // end namespace Osd
│ │ │ │ +
230
│ │ │ │ +
231} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
232using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
233
│ │ │ │ +
234} // end namespace OpenSubdiv
│ │ │ │ +
235
│ │ │ │ +
236
│ │ │ │ +
237#endif // OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
│ │ │ │ + │ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, DEVICE_CONTEXT context)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
D3D11StencilTable(Far::StencilTable const *stencilTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ +
static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, ID3D11DeviceContext *deviceContext)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext)
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, D3D11ComputeEvaluator const *instance, ID3D11DeviceContext *deviceContext)
Generic static compute function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, ID3D11DeviceContext *deviceContext)
│ │ │ │ + │ │ │ │ +
static void Synchronize(ID3D11DeviceContext *deviceContext)
Wait the dispatched kernel finishes.
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, ID3D11DeviceContext *deviceContext) const
│ │ │ │ +
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, ID3D11DeviceContext *deviceContext)
Configure DX kernel. Returns false if it fails to compile the kernel.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
bool EvalStencils(ID3D11UnorderedAccessView *srcSRV, BufferDescriptor const &srcDesc, ID3D11UnorderedAccessView *dstUAV, BufferDescriptor const &dstDesc, ID3D11ShaderResourceView *sizesSRV, ID3D11ShaderResourceView *offsetsSRV, ID3D11ShaderResourceView *indicesSRV, ID3D11ShaderResourceView *weightsSRV, int start, int end, ID3D11DeviceContext *deviceContext) const
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11PatchTable.h │ │ │ │ │ +d3d11ComputeEvaluator.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,134 +24,272 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ -31#include "../far/patchDescriptor.h" │ │ │ │ │ -32#include "../osd/nonCopyable.h" │ │ │ │ │ -33#include "../osd/types.h" │ │ │ │ │ -34 │ │ │ │ │ -35struct ID3D11Buffer; │ │ │ │ │ -36struct ID3D11ShaderResourceView; │ │ │ │ │ -37struct ID3D11Device; │ │ │ │ │ -38struct ID3D11DeviceContext; │ │ │ │ │ +30struct ID3D11DeviceContext; │ │ │ │ │ +31struct ID3D11Buffer; │ │ │ │ │ +32struct ID3D11ComputeShader; │ │ │ │ │ +33struct ID3D11ClassLinkage; │ │ │ │ │ +34struct ID3D11ClassInstance; │ │ │ │ │ +35struct ID3D11ShaderResourceView; │ │ │ │ │ +36struct ID3D11UnorderedAccessView; │ │ │ │ │ +37 │ │ │ │ │ +38#include "../osd/bufferDescriptor.h" │ │ │ │ │ 39 │ │ │ │ │ 40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ 41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -43namespace Far{ │ │ │ │ │ -44 class PatchTable; │ │ │ │ │ -45}; │ │ │ │ │ +43namespace Far { │ │ │ │ │ +44 class StencilTable; │ │ │ │ │ +45} │ │ │ │ │ 46 │ │ │ │ │ 47namespace Osd { │ │ │ │ │ 48 │ │ │ │ │ -_4_9class _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ -50public: │ │ │ │ │ -_5_1 typedef ID3D11Buffer * _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ -52 │ │ │ │ │ -_5_3 _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -_5_4 _~_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -55 │ │ │ │ │ -56 template │ │ │ │ │ -_5_7 static _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -58 DEVICE_CONTEXT context) { │ │ │ │ │ -59 return _C_r_e_a_t_e(farPatchTable, context->GetDeviceContext()); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 static _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -63 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -64 │ │ │ │ │ -_6_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ -66 return ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_5_6class _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e { │ │ │ │ │ +57public: │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 static _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ +60 DEVICE_CONTEXT context) { │ │ │ │ │ +61 return new _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, context->GetDeviceContext()); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_4 static _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ +65 ID3D11DeviceContext *deviceContext) { │ │ │ │ │ +66 return new _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, deviceContext); │ │ │ │ │ 67 } │ │ │ │ │ 68 │ │ │ │ │ -_7_0 ID3D11Buffer* _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -71 return ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -72 } │ │ │ │ │ +_6_9 _D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ +70 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +71 │ │ │ │ │ +_7_2 _~_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ 73 │ │ │ │ │ -_7_5 ID3D11ShaderResourceView* _G_e_t_P_a_t_c_h_P_a_r_a_m_S_R_V() const { │ │ │ │ │ -76 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79protected: │ │ │ │ │ -80 // allocate buffers from patchTable │ │ │ │ │ -_8_1 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -82 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -83 │ │ │ │ │ -_8_4 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -85 │ │ │ │ │ -_8_6 ID3D11Buffer *___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_8_7 ID3D11Buffer *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -_8_8 ID3D11ShaderResourceView *___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V; │ │ │ │ │ -89}; │ │ │ │ │ +74 // interfaces needed for D3D11ComputeEvaluator │ │ │ │ │ +_7_5 ID3D11ShaderResourceView *_G_e_t_S_i_z_e_s_S_R_V() const { return _sizes; } │ │ │ │ │ +_7_6 ID3D11ShaderResourceView *_G_e_t_O_f_f_s_e_t_s_S_R_V() const { return _offsets; } │ │ │ │ │ +_7_7 ID3D11ShaderResourceView *_G_e_t_I_n_d_i_c_e_s_S_R_V() const { return _indices; } │ │ │ │ │ +_7_8 ID3D11ShaderResourceView *_G_e_t_W_e_i_g_h_t_s_S_R_V() const { return _weights; } │ │ │ │ │ +_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +80 │ │ │ │ │ +81private: │ │ │ │ │ +82 ID3D11ShaderResourceView *_sizes; │ │ │ │ │ +83 ID3D11ShaderResourceView *_offsets; │ │ │ │ │ +84 ID3D11ShaderResourceView *_indices; │ │ │ │ │ +85 ID3D11ShaderResourceView *_weights; │ │ │ │ │ +86 ID3D11Buffer *_sizesBuffer; │ │ │ │ │ +87 ID3D11Buffer *_offsetsBuffer; │ │ │ │ │ +88 ID3D11Buffer *_indicesBuffer; │ │ │ │ │ +89 ID3D11Buffer *_weightsBuffer; │ │ │ │ │ 90 │ │ │ │ │ -91 │ │ │ │ │ -92} // end namespace Osd │ │ │ │ │ +91 int _numStencils; │ │ │ │ │ +92}; │ │ │ │ │ 93 │ │ │ │ │ -94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -96 │ │ │ │ │ -97} // end namespace OpenSubdiv │ │ │ │ │ -98 │ │ │ │ │ -99#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +94// -------------------------------------------------------------------------- │ │ │ │ │ +- │ │ │ │ │ +95 │ │ │ │ │ +_9_6class _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r { │ │ │ │ │ +97public: │ │ │ │ │ +_9_8 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ +_9_9 static _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +100 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +101 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +102 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +103 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +104 │ │ │ │ │ +_1_0_5 static _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +108 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +109 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +110 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +111 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +112 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +113 │ │ │ │ │ +_1_1_5 _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +116 │ │ │ │ │ +_1_1_8 _~_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +119 │ │ │ │ │ +147 template │ │ │ │ │ +_1_4_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +149 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +150 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +151 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +152 _D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +153 ID3D11DeviceContext * deviceContext) { │ │ │ │ │ +154 if (instance) { │ │ │ │ │ +155 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +156 dstBuffer, dstDesc, │ │ │ │ │ +157 stencilTable, │ │ │ │ │ +158 deviceContext); │ │ │ │ │ +159 } else { │ │ │ │ │ +160 // Create an instance on demand (slow) │ │ │ │ │ +161 (void)deviceContext; // unused │ │ │ │ │ +162 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +163 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +164 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +165 deviceContext); │ │ │ │ │ +166 if (instance) { │ │ │ │ │ +167 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +168 dstBuffer, dstDesc, │ │ │ │ │ +169 stencilTable, │ │ │ │ │ +170 deviceContext); │ │ │ │ │ +171 delete instance; │ │ │ │ │ +172 return r; │ │ │ │ │ +173 } │ │ │ │ │ +174 return false; │ │ │ │ │ +175 } │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +180 template │ │ │ │ │ +_1_8_1 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +182 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +183 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +184 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +185 ID3D11DeviceContext *deviceContext) const { │ │ │ │ │ +186 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindD3D11UAV(deviceContext), srcDesc, │ │ │ │ │ +187 dstBuffer->BindD3D11UAV(deviceContext), dstDesc, │ │ │ │ │ +188 stencilTable->GetSizesSRV(), │ │ │ │ │ +189 stencilTable->GetOffsetsSRV(), │ │ │ │ │ +190 stencilTable->GetIndicesSRV(), │ │ │ │ │ +191 stencilTable->GetWeightsSRV(), │ │ │ │ │ +192 /* start = */ 0, │ │ │ │ │ +193 /* end = */ stencilTable->GetNumStencils(), │ │ │ │ │ +194 deviceContext); │ │ │ │ │ +195 } │ │ │ │ │ +196 │ │ │ │ │ +_1_9_9 bool _E_v_a_l_S_t_e_n_c_i_l_s(ID3D11UnorderedAccessView *srcSRV, │ │ │ │ │ +200 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +201 ID3D11UnorderedAccessView *dstUAV, │ │ │ │ │ +202 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +203 ID3D11ShaderResourceView *sizesSRV, │ │ │ │ │ +204 ID3D11ShaderResourceView *offsetsSRV, │ │ │ │ │ +205 ID3D11ShaderResourceView *indicesSRV, │ │ │ │ │ +206 ID3D11ShaderResourceView *weightsSRV, │ │ │ │ │ +207 int start, │ │ │ │ │ +208 int end, │ │ │ │ │ +209 ID3D11DeviceContext *deviceContext) const; │ │ │ │ │ +210 │ │ │ │ │ +_2_1_2 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +213 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +214 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +215 │ │ │ │ │ +_2_1_7 static void _S_y_n_c_h_r_o_n_i_z_e(ID3D11DeviceContext *deviceContext); │ │ │ │ │ +218 │ │ │ │ │ +219private: │ │ │ │ │ +220 ID3D11ComputeShader * _computeShader; │ │ │ │ │ +221 ID3D11ClassLinkage * _classLinkage; │ │ │ │ │ +222 ID3D11ClassInstance * _singleBufferKernel; │ │ │ │ │ +223 ID3D11ClassInstance * _separateBufferKernel; │ │ │ │ │ +224 ID3D11Buffer * _uniformArgs; // uniform parameters for kernels │ │ │ │ │ +225 │ │ │ │ │ +226 int _workGroupSize; │ │ │ │ │ +227}; │ │ │ │ │ +228 │ │ │ │ │ +229} // end namespace Osd │ │ │ │ │ +230 │ │ │ │ │ +231} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +232using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +233 │ │ │ │ │ +234} // end namespace OpenSubdiv │ │ │ │ │ +235 │ │ │ │ │ +236 │ │ │ │ │ +237#endif // OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchArray > PatchArrayVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +D3D11 stencil table. │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, │ │ │ │ │ DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(Far::PatchTable const *farPatchTable, ID3D11DeviceContext │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_O_f_f_s_e_t_s_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetOffsetsSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_I_n_d_i_c_e_s_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetIndicesSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +~D3D11StencilTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +D3D11StencilTable(Far::StencilTable const *stencilTable, ID3D11DeviceContext │ │ │ │ │ *deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ -ID3D11Buffer * VertexBufferBinding │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_~_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~D3D11PatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -ID3D11Buffer * GetPatchIndexBuffer() const │ │ │ │ │ -Returns the index buffer containing the patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -ID3D11Buffer * _indexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11PatchTable * Create(Far::PatchTable const *farPatchTable, │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11StencilTable * Create(Far::StencilTable const *stencilTable, │ │ │ │ │ ID3D11DeviceContext *deviceContext) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * _patchParamBufferSRV │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -ID3D11Buffer * _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_8_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_S_R_V │ │ │ │ │ -ID3D11ShaderResourceView * GetPatchParamSRV() const │ │ │ │ │ -Returns the SRV containing the patch parameter. │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_:_:_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -D3D11PatchTable() │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_S_i_z_e_s_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetSizesSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_S_t_e_n_c_i_l_T_a_b_l_e_:_:_G_e_t_W_e_i_g_h_t_s_S_R_V │ │ │ │ │ +ID3D11ShaderResourceView * GetWeightsSRV() const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ +const *stencilTable, D3D11ComputeEvaluator const *instance, ID3D11DeviceContext │ │ │ │ │ +*deviceContext) │ │ │ │ │ +Generic static compute function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11ComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ +BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, │ │ │ │ │ +ID3D11DeviceContext *deviceContext) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ +bool Instantiatable │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +static void Synchronize(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Wait the dispatched kernel finishes. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ +*stencilTable, ID3D11DeviceContext *deviceContext) const │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ +bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ +ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Configure DX kernel. Returns false if it fails to compile the kernel. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +D3D11ComputeEvaluator() │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_: │ │ │ │ │ +_~_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +~D3D11ComputeEvaluator() │ │ │ │ │ +Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_D_3_D_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(ID3D11UnorderedAccessView *srcSRV, BufferDescriptor const │ │ │ │ │ +&srcDesc, ID3D11UnorderedAccessView *dstUAV, BufferDescriptor const &dstDesc, │ │ │ │ │ +ID3D11ShaderResourceView *sizesSRV, ID3D11ShaderResourceView *offsetsSRV, │ │ │ │ │ +ID3D11ShaderResourceView *indicesSRV, ID3D11ShaderResourceView *weightsSRV, int │ │ │ │ │ +start, int end, ID3D11DeviceContext *deviceContext) const │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00845_source.html │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │
93
│ │ │ │
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │
95using namespace OPENSUBDIV_VERSION;
│ │ │ │
96
│ │ │ │
97} // end namespace OpenSubdiv
│ │ │ │
98
│ │ │ │
99#endif // OPENSUBDIV3_OSD_CPU_D3D11_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ + │ │ │ │
Concrete vertex buffer class for Cpu subdivision and DirectX drawing.
│ │ │ │
static CpuD3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11DeviceContext *deviceContext)
Creator. Returns NULL if error.
│ │ │ │
CpuD3D11VertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │
ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object.
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,47 +90,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
glComputeEvaluator.h File Reference
│ │ │ │ +
glslPatchShaderSource.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/opengl.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include <string>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  GLStencilTableSSBO
 GL stencil table (Shader Storage buffer) More...
 
class  GLComputeEvaluator
class  GLSLPatchShaderSource
 Provides shader source which can be used by client code. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -glComputeEvaluator.h File Reference │ │ │ │ │ +glslPatchShaderSource.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ -  GL stencil table (Shader Storage buffer) _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +  Provides shader source which can be used by client code. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00848 = [ │ │ │ │ │ - ["GLStencilTableSSBO", "a01217.html", "a01217"], │ │ │ │ │ - ["GLComputeEvaluator", "a01221.html", "a01221"] │ │ │ │ │ + ["GLSLPatchShaderSource", "a01241.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glComputeEvaluator.h
│ │ │ │ +
glslPatchShaderSource.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,1132 +119,71 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../osd/opengl.h"
│ │ │ │ -
31#include "../osd/types.h"
│ │ │ │ -
32#include "../osd/bufferDescriptor.h"
│ │ │ │ +
30#include "../far/patchDescriptor.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <string>
│ │ │ │
33
│ │ │ │
34namespace OpenSubdiv {
│ │ │ │
35namespace OPENSUBDIV_VERSION {
│ │ │ │
36
│ │ │ │ -
37namespace Far {
│ │ │ │ -
38 class PatchTable;
│ │ │ │ -
39 class StencilTable;
│ │ │ │ -
40 class LimitStencilTable;
│ │ │ │ -
41}
│ │ │ │ -
42
│ │ │ │ -
43namespace Osd {
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52public:
│ │ │ │ -
│ │ │ │ -
53 static GLStencilTableSSBO *Create(Far::StencilTable const *stencilTable,
│ │ │ │ -
54 void *deviceContext = NULL) {
│ │ │ │ -
55 (void)deviceContext; // unused
│ │ │ │ -
56 return new GLStencilTableSSBO(stencilTable);
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
59 Far::LimitStencilTable const *limitStencilTable,
│ │ │ │ -
60 void *deviceContext = NULL) {
│ │ │ │ -
61 (void)deviceContext; // unused
│ │ │ │ -
62 return new GLStencilTableSSBO(limitStencilTable);
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ +
37namespace Osd {
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41public:
│ │ │ │ +
45 static std::string GetPatchBasisShaderSource();
│ │ │ │ +
46
│ │ │ │ +
50 static std::string GetPatchDrawingShaderSource();
│ │ │ │ +
51
│ │ │ │ +
59
│ │ │ │ +
60 static std::string GetCommonShaderSource();
│ │ │ │ +
61
│ │ │ │ +
62 static std::string GetVertexShaderSource(
│ │ │ │ + │ │ │ │
64
│ │ │ │ -
65 explicit GLStencilTableSSBO(Far::StencilTable const *stencilTable);
│ │ │ │ -
66 explicit GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable);
│ │ │ │ - │ │ │ │ -
68
│ │ │ │ -
69 // interfaces needed for GLSLComputeKernel
│ │ │ │ -
70 GLuint GetSizesBuffer() const { return _sizes; }
│ │ │ │ -
71 GLuint GetOffsetsBuffer() const { return _offsets; }
│ │ │ │ -
72 GLuint GetIndicesBuffer() const { return _indices; }
│ │ │ │ -
73 GLuint GetWeightsBuffer() const { return _weights; }
│ │ │ │ -
74 GLuint GetDuWeightsBuffer() const { return _duWeights; }
│ │ │ │ -
75 GLuint GetDvWeightsBuffer() const { return _dvWeights; }
│ │ │ │ -
76 GLuint GetDuuWeightsBuffer() const { return _duuWeights; }
│ │ │ │ -
77 GLuint GetDuvWeightsBuffer() const { return _duvWeights; }
│ │ │ │ -
78 GLuint GetDvvWeightsBuffer() const { return _dvvWeights; }
│ │ │ │ -
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
65 static std::string GetTessControlShaderSource(
│ │ │ │ + │ │ │ │ +
67
│ │ │ │ +
68 static std::string GetTessEvalShaderSource(
│ │ │ │ + │ │ │ │ +
70
│ │ │ │ +
72};
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
74} // end namespace Osd
│ │ │ │ +
75
│ │ │ │ +
76} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
77using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
78
│ │ │ │ +
79} // end namespace OpenSubdiv
│ │ │ │
80
│ │ │ │ -
81private:
│ │ │ │ -
82 GLuint _sizes;
│ │ │ │ -
83 GLuint _offsets;
│ │ │ │ -
84 GLuint _indices;
│ │ │ │ -
85 GLuint _weights;
│ │ │ │ -
86 GLuint _duWeights;
│ │ │ │ -
87 GLuint _dvWeights;
│ │ │ │ -
88 GLuint _duuWeights;
│ │ │ │ -
89 GLuint _duvWeights;
│ │ │ │ -
90 GLuint _dvvWeights;
│ │ │ │ -
91 int _numStencils;
│ │ │ │ -
92};
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
94// ---------------------------------------------------------------------------
│ │ │ │ -
95
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
97public:
│ │ │ │ -
98 typedef bool Instantiatable;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
100 BufferDescriptor const &dstDesc,
│ │ │ │ -
101 BufferDescriptor const &duDesc,
│ │ │ │ -
102 BufferDescriptor const &dvDesc,
│ │ │ │ -
103 void * deviceContext = NULL) {
│ │ │ │ -
104 return Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
108 deviceContext);
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
112 BufferDescriptor const &dstDesc,
│ │ │ │ -
113 BufferDescriptor const &duDesc,
│ │ │ │ -
114 BufferDescriptor const &dvDesc,
│ │ │ │ -
115 BufferDescriptor const &duuDesc,
│ │ │ │ -
116 BufferDescriptor const &duvDesc,
│ │ │ │ -
117 BufferDescriptor const &dvvDesc,
│ │ │ │ -
118 void * deviceContext = NULL) {
│ │ │ │ -
119 (void)deviceContext; // not used
│ │ │ │ -
120 GLComputeEvaluator *instance = new GLComputeEvaluator();
│ │ │ │ -
121 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ -
122 duuDesc, duvDesc, dvvDesc))
│ │ │ │ -
123 return instance;
│ │ │ │ -
124 delete instance;
│ │ │ │ -
125 return NULL;
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ - │ │ │ │ -
130
│ │ │ │ - │ │ │ │ -
133
│ │ │ │ -
139
│ │ │ │ -
167 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
168 static bool EvalStencils(
│ │ │ │ -
169 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
170 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
171 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
172 GLComputeEvaluator const *instance,
│ │ │ │ -
173 void * deviceContext = NULL) {
│ │ │ │ -
174
│ │ │ │ -
175 if (instance) {
│ │ │ │ -
176 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
177 dstBuffer, dstDesc,
│ │ │ │ -
178 stencilTable);
│ │ │ │ -
179 } else {
│ │ │ │ -
180 // Create an instance on demand (slow)
│ │ │ │ -
181 (void)deviceContext; // unused
│ │ │ │ -
182 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
185 if (instance) {
│ │ │ │ -
186 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
187 dstBuffer, dstDesc,
│ │ │ │ -
188 stencilTable);
│ │ │ │ -
189 delete instance;
│ │ │ │ -
190 return r;
│ │ │ │ -
191 }
│ │ │ │ -
192 return false;
│ │ │ │ -
193 }
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
235 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
236 static bool EvalStencils(
│ │ │ │ -
237 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
238 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
239 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
240 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
241 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
242 GLComputeEvaluator const *instance,
│ │ │ │ -
243 void * deviceContext = NULL) {
│ │ │ │ -
244
│ │ │ │ -
245 if (instance) {
│ │ │ │ -
246 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
247 dstBuffer, dstDesc,
│ │ │ │ -
248 duBuffer, duDesc,
│ │ │ │ -
249 dvBuffer, dvDesc,
│ │ │ │ -
250 stencilTable);
│ │ │ │ -
251 } else {
│ │ │ │ -
252 // Create an instance on demand (slow)
│ │ │ │ -
253 (void)deviceContext; // unused
│ │ │ │ -
254 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
│ │ │ │ -
255 if (instance) {
│ │ │ │ -
256 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
257 dstBuffer, dstDesc,
│ │ │ │ -
258 duBuffer, duDesc,
│ │ │ │ -
259 dvBuffer, dvDesc,
│ │ │ │ -
260 stencilTable);
│ │ │ │ -
261 delete instance;
│ │ │ │ -
262 return r;
│ │ │ │ -
263 }
│ │ │ │ -
264 return false;
│ │ │ │ -
265 }
│ │ │ │ -
266 }
│ │ │ │ -
│ │ │ │ -
267
│ │ │ │ -
325 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
326 static bool EvalStencils(
│ │ │ │ -
327 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
328 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
329 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
330 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
331 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
332 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
333 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
334 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
335 GLComputeEvaluator const *instance,
│ │ │ │ -
336 void * deviceContext = NULL) {
│ │ │ │ -
337
│ │ │ │ -
338 if (instance) {
│ │ │ │ -
339 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
340 dstBuffer, dstDesc,
│ │ │ │ -
341 duBuffer, duDesc,
│ │ │ │ -
342 dvBuffer, dvDesc,
│ │ │ │ -
343 duuBuffer, duuDesc,
│ │ │ │ -
344 duvBuffer, duvDesc,
│ │ │ │ -
345 dvvBuffer, dvvDesc,
│ │ │ │ -
346 stencilTable);
│ │ │ │ -
347 } else {
│ │ │ │ -
348 // Create an instance on demand (slow)
│ │ │ │ -
349 (void)deviceContext; // unused
│ │ │ │ -
350 instance = Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ -
351 duuDesc, duvDesc, dvvDesc);
│ │ │ │ -
352 if (instance) {
│ │ │ │ -
353 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ -
354 dstBuffer, dstDesc,
│ │ │ │ -
355 duBuffer, duDesc,
│ │ │ │ -
356 dvBuffer, dvDesc,
│ │ │ │ -
357 duuBuffer, duuDesc,
│ │ │ │ -
358 duvBuffer, duvDesc,
│ │ │ │ -
359 dvvBuffer, dvvDesc,
│ │ │ │ -
360 stencilTable);
│ │ │ │ -
361 delete instance;
│ │ │ │ -
362 return r;
│ │ │ │ -
363 }
│ │ │ │ -
364 return false;
│ │ │ │ -
365 }
│ │ │ │ -
366 }
│ │ │ │ -
│ │ │ │ -
367
│ │ │ │ -
385 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
387 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
388 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
389 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ -
390 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
391 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
392 0, BufferDescriptor(),
│ │ │ │ -
393 0, BufferDescriptor(),
│ │ │ │ -
394 stencilTable->GetSizesBuffer(),
│ │ │ │ -
395 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
396 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
397 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
398 0,
│ │ │ │ -
399 0,
│ │ │ │ -
400 /* start = */ 0,
│ │ │ │ -
401 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ -
402 }
│ │ │ │ -
│ │ │ │ -
403
│ │ │ │ -
433 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
435 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
436 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
437 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
438 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
439 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ -
440 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
441 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
442 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
443 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
444 stencilTable->GetSizesBuffer(),
│ │ │ │ -
445 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
446 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
447 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
448 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
449 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
450 /* start = */ 0,
│ │ │ │ -
451 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ -
452 }
│ │ │ │ -
│ │ │ │ -
453
│ │ │ │ -
501 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
503 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
504 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
505 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
506 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
507 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
508 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
509 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
510 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ -
511 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
512 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
513 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
514 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
515 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ -
516 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ -
517 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ -
518 stencilTable->GetSizesBuffer(),
│ │ │ │ -
519 stencilTable->GetOffsetsBuffer(),
│ │ │ │ -
520 stencilTable->GetIndicesBuffer(),
│ │ │ │ -
521 stencilTable->GetWeightsBuffer(),
│ │ │ │ -
522 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ -
523 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ -
524 stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ -
525 stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ -
526 stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ -
527 /* start = */ 0,
│ │ │ │ -
528 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ -
529 }
│ │ │ │ -
│ │ │ │ -
530
│ │ │ │ -
566 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
567 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
568 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
569 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
570 GLuint sizesBuffer,
│ │ │ │ -
571 GLuint offsetsBuffer,
│ │ │ │ -
572 GLuint indicesBuffer,
│ │ │ │ -
573 GLuint weightsBuffer,
│ │ │ │ -
574 GLuint duWeightsBuffer,
│ │ │ │ -
575 GLuint dvWeightsBuffer,
│ │ │ │ -
576 int start,
│ │ │ │ -
577 int end) const;
│ │ │ │ -
578
│ │ │ │ -
632 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
633 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
634 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
635 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
636 GLuint duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
637 GLuint duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
638 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
639 GLuint sizesBuffer,
│ │ │ │ -
640 GLuint offsetsBuffer,
│ │ │ │ -
641 GLuint indicesBuffer,
│ │ │ │ -
642 GLuint weightsBuffer,
│ │ │ │ -
643 GLuint duWeightsBuffer,
│ │ │ │ -
644 GLuint dvWeightsBuffer,
│ │ │ │ -
645 GLuint duuWeightsBuffer,
│ │ │ │ -
646 GLuint duvWeightsBuffer,
│ │ │ │ -
647 GLuint dvvWeightsBuffer,
│ │ │ │ -
648 int start,
│ │ │ │ -
649 int end) const;
│ │ │ │ -
650
│ │ │ │ -
656
│ │ │ │ -
689 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
690 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
691 static bool EvalPatches(
│ │ │ │ -
692 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
693 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
694 int numPatchCoords,
│ │ │ │ -
695 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
696 PATCH_TABLE *patchTable,
│ │ │ │ -
697 GLComputeEvaluator const *instance,
│ │ │ │ -
698 void * deviceContext = NULL) {
│ │ │ │ -
699
│ │ │ │ -
700 if (instance) {
│ │ │ │ -
701 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
702 dstBuffer, dstDesc,
│ │ │ │ -
703 numPatchCoords, patchCoords,
│ │ │ │ -
704 patchTable);
│ │ │ │ -
705 } else {
│ │ │ │ -
706 // Create an instance on demand (slow)
│ │ │ │ -
707 (void)deviceContext; // unused
│ │ │ │ -
708 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
711 if (instance) {
│ │ │ │ -
712 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
713 dstBuffer, dstDesc,
│ │ │ │ -
714 numPatchCoords, patchCoords,
│ │ │ │ -
715 patchTable);
│ │ │ │ -
716 delete instance;
│ │ │ │ -
717 return r;
│ │ │ │ -
718 }
│ │ │ │ -
719 return false;
│ │ │ │ -
720 }
│ │ │ │ -
721 }
│ │ │ │ -
│ │ │ │ -
722
│ │ │ │ -
767 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
768 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
769 static bool EvalPatches(
│ │ │ │ -
770 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
771 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
772 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
773 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
774 int numPatchCoords,
│ │ │ │ -
775 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
776 PATCH_TABLE *patchTable,
│ │ │ │ -
777 GLComputeEvaluator const *instance,
│ │ │ │ -
778 void * deviceContext = NULL) {
│ │ │ │ -
779
│ │ │ │ -
780 if (instance) {
│ │ │ │ -
781 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
782 dstBuffer, dstDesc,
│ │ │ │ -
783 duBuffer, duDesc,
│ │ │ │ -
784 dvBuffer, dvDesc,
│ │ │ │ -
785 numPatchCoords, patchCoords,
│ │ │ │ -
786 patchTable);
│ │ │ │ -
787 } else {
│ │ │ │ -
788 // Create an instance on demand (slow)
│ │ │ │ -
789 (void)deviceContext; // unused
│ │ │ │ -
790 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
791 duDesc, dvDesc);
│ │ │ │ -
792 if (instance) {
│ │ │ │ -
793 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
794 dstBuffer, dstDesc,
│ │ │ │ -
795 duBuffer, duDesc,
│ │ │ │ -
796 dvBuffer, dvDesc,
│ │ │ │ -
797 numPatchCoords, patchCoords,
│ │ │ │ -
798 patchTable);
│ │ │ │ -
799 delete instance;
│ │ │ │ -
800 return r;
│ │ │ │ -
801 }
│ │ │ │ -
802 return false;
│ │ │ │ -
803 }
│ │ │ │ -
804 }
│ │ │ │ -
│ │ │ │ -
805
│ │ │ │ -
868 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
869 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
870 static bool EvalPatches(
│ │ │ │ -
871 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
872 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
873 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
874 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
875 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
876 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
877 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
878 int numPatchCoords,
│ │ │ │ -
879 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
880 PATCH_TABLE *patchTable,
│ │ │ │ -
881 GLComputeEvaluator const *instance,
│ │ │ │ -
882 void * deviceContext = NULL) {
│ │ │ │ -
883
│ │ │ │ -
884 if (instance) {
│ │ │ │ -
885 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
886 dstBuffer, dstDesc,
│ │ │ │ -
887 duBuffer, duDesc,
│ │ │ │ -
888 dvBuffer, dvDesc,
│ │ │ │ -
889 duuBuffer, duuDesc,
│ │ │ │ -
890 duvBuffer, duvDesc,
│ │ │ │ -
891 dvvBuffer, dvvDesc,
│ │ │ │ -
892 numPatchCoords, patchCoords,
│ │ │ │ -
893 patchTable);
│ │ │ │ -
894 } else {
│ │ │ │ -
895 // Create an instance on demand (slow)
│ │ │ │ -
896 (void)deviceContext; // unused
│ │ │ │ -
897 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
898 duDesc, dvDesc,
│ │ │ │ -
899 duuDesc, duvDesc, dvvDesc);
│ │ │ │ -
900 if (instance) {
│ │ │ │ -
901 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ -
902 dstBuffer, dstDesc,
│ │ │ │ -
903 duBuffer, duDesc,
│ │ │ │ -
904 dvBuffer, dvDesc,
│ │ │ │ -
905 duuBuffer, duuDesc,
│ │ │ │ -
906 duvBuffer, duvDesc,
│ │ │ │ -
907 dvvBuffer, dvvDesc,
│ │ │ │ -
908 numPatchCoords, patchCoords,
│ │ │ │ -
909 patchTable);
│ │ │ │ -
910 delete instance;
│ │ │ │ -
911 return r;
│ │ │ │ -
912 }
│ │ │ │ -
913 return false;
│ │ │ │ -
914 }
│ │ │ │ -
915 }
│ │ │ │ -
│ │ │ │ -
916
│ │ │ │ -
941 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
942 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
944 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
945 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
946 int numPatchCoords,
│ │ │ │ -
947 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
948 PATCH_TABLE *patchTable) const {
│ │ │ │ -
949
│ │ │ │ -
950 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
951 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
952 0, BufferDescriptor(),
│ │ │ │ -
953 0, BufferDescriptor(),
│ │ │ │ -
954 numPatchCoords,
│ │ │ │ -
955 patchCoords->BindVBO(),
│ │ │ │ -
956 patchTable->GetPatchArrays(),
│ │ │ │ -
957 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
958 patchTable->GetPatchParamBuffer());
│ │ │ │ -
959 }
│ │ │ │ -
│ │ │ │ -
960
│ │ │ │ -
995 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
996 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
998 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
999 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1000 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1001 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1002 int numPatchCoords,
│ │ │ │ -
1003 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1004 PATCH_TABLE *patchTable) const {
│ │ │ │ -
1005
│ │ │ │ -
1006 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1007 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1008 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
1009 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
1010 numPatchCoords,
│ │ │ │ -
1011 patchCoords->BindVBO(),
│ │ │ │ -
1012 patchTable->GetPatchArrays(),
│ │ │ │ -
1013 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
1014 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1015 }
│ │ │ │ -
│ │ │ │ -
1016
│ │ │ │ -
1069 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1070 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1072 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1073 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1074 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1075 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1076 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1077 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1078 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1079 int numPatchCoords,
│ │ │ │ -
1080 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1081 PATCH_TABLE *patchTable) const {
│ │ │ │ -
1082
│ │ │ │ -
1083 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1084 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1085 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
1086 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
1087 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ -
1088 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ -
1089 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ -
1090 numPatchCoords,
│ │ │ │ -
1091 patchCoords->BindVBO(),
│ │ │ │ -
1092 patchTable->GetPatchArrays(),
│ │ │ │ -
1093 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
1094 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1095 }
│ │ │ │ -
│ │ │ │ -
1096
│ │ │ │ -
1097 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1098 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1099 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1100 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1101 int numPatchCoords,
│ │ │ │ -
1102 GLuint patchCoordsBuffer,
│ │ │ │ -
1103 const PatchArrayVector &patchArrays,
│ │ │ │ -
1104 GLuint patchIndexBuffer,
│ │ │ │ -
1105 GLuint patchParamsBuffer) const;
│ │ │ │ -
1106
│ │ │ │ -
1107 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1108 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1109 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1110 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1111 GLuint duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1112 GLuint duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1113 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1114 int numPatchCoords,
│ │ │ │ -
1115 GLuint patchCoordsBuffer,
│ │ │ │ -
1116 const PatchArrayVector &patchArrays,
│ │ │ │ -
1117 GLuint patchIndexBuffer,
│ │ │ │ -
1118 GLuint patchParamsBuffer) const;
│ │ │ │ -
1119
│ │ │ │ -
1152 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1153 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1155 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1156 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1157 int numPatchCoords,
│ │ │ │ -
1158 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1159 PATCH_TABLE *patchTable,
│ │ │ │ -
1160 GLComputeEvaluator const *instance,
│ │ │ │ -
1161 void * deviceContext = NULL) {
│ │ │ │ -
1162
│ │ │ │ -
1163 if (instance) {
│ │ │ │ -
1164 return instance->EvalPatchesVarying(
│ │ │ │ -
1165 srcBuffer, srcDesc,
│ │ │ │ -
1166 dstBuffer, dstDesc,
│ │ │ │ -
1167 numPatchCoords, patchCoords,
│ │ │ │ -
1168 patchTable);
│ │ │ │ -
1169 } else {
│ │ │ │ -
1170 // Create an instance on demand (slow)
│ │ │ │ -
1171 (void)deviceContext; // unused
│ │ │ │ -
1172 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
1175 if (instance) {
│ │ │ │ -
1176 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1177 srcBuffer, srcDesc,
│ │ │ │ -
1178 dstBuffer, dstDesc,
│ │ │ │ -
1179 numPatchCoords, patchCoords,
│ │ │ │ -
1180 patchTable);
│ │ │ │ -
1181 delete instance;
│ │ │ │ -
1182 return r;
│ │ │ │ -
1183 }
│ │ │ │ -
1184 return false;
│ │ │ │ -
1185 }
│ │ │ │ -
1186 }
│ │ │ │ -
│ │ │ │ -
1187
│ │ │ │ -
1212 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1213 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1215 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1216 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1217 int numPatchCoords,
│ │ │ │ -
1218 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1219 PATCH_TABLE *patchTable) const {
│ │ │ │ -
1220
│ │ │ │ -
1221 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1222 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1223 0, BufferDescriptor(),
│ │ │ │ -
1224 0, BufferDescriptor(),
│ │ │ │ -
1225 numPatchCoords,
│ │ │ │ -
1226 patchCoords->BindVBO(),
│ │ │ │ -
1227 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1228 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1229 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1230 }
│ │ │ │ -
│ │ │ │ -
1231
│ │ │ │ -
1276 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1277 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1279 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1280 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1281 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1282 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1283 int numPatchCoords,
│ │ │ │ -
1284 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1285 PATCH_TABLE *patchTable,
│ │ │ │ -
1286 GLComputeEvaluator const *instance,
│ │ │ │ -
1287 void * deviceContext = NULL) {
│ │ │ │ -
1288
│ │ │ │ -
1289 if (instance) {
│ │ │ │ -
1290 return instance->EvalPatchesVarying(
│ │ │ │ -
1291 srcBuffer, srcDesc,
│ │ │ │ -
1292 dstBuffer, dstDesc,
│ │ │ │ -
1293 duBuffer, duDesc,
│ │ │ │ -
1294 dvBuffer, dvDesc,
│ │ │ │ -
1295 numPatchCoords, patchCoords,
│ │ │ │ -
1296 patchTable);
│ │ │ │ -
1297 } else {
│ │ │ │ -
1298 // Create an instance on demand (slow)
│ │ │ │ -
1299 (void)deviceContext; // unused
│ │ │ │ -
1300 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1301 duDesc, dvDesc);
│ │ │ │ -
1302 if (instance) {
│ │ │ │ -
1303 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1304 srcBuffer, srcDesc,
│ │ │ │ -
1305 dstBuffer, dstDesc,
│ │ │ │ -
1306 duBuffer, duDesc,
│ │ │ │ -
1307 dvBuffer, dvDesc,
│ │ │ │ -
1308 numPatchCoords, patchCoords,
│ │ │ │ -
1309 patchTable);
│ │ │ │ -
1310 delete instance;
│ │ │ │ -
1311 return r;
│ │ │ │ -
1312 }
│ │ │ │ -
1313 return false;
│ │ │ │ -
1314 }
│ │ │ │ -
1315 }
│ │ │ │ -
│ │ │ │ -
1316
│ │ │ │ -
1353 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1354 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1356 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1357 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1358 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1359 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1360 int numPatchCoords,
│ │ │ │ -
1361 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1362 PATCH_TABLE *patchTable) const {
│ │ │ │ -
1363
│ │ │ │ -
1364 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1365 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1366 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
1367 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
1368 numPatchCoords,
│ │ │ │ -
1369 patchCoords->BindVBO(),
│ │ │ │ -
1370 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1371 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1372 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1373 }
│ │ │ │ -
│ │ │ │ -
1374
│ │ │ │ -
1437 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1438 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1440 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1441 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1442 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1443 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1444 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1445 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1446 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1447 int numPatchCoords,
│ │ │ │ -
1448 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1449 PATCH_TABLE *patchTable,
│ │ │ │ -
1450 GLComputeEvaluator const *instance,
│ │ │ │ -
1451 void * deviceContext = NULL) {
│ │ │ │ -
1452
│ │ │ │ -
1453 if (instance) {
│ │ │ │ -
1454 return instance->EvalPatchesVarying(
│ │ │ │ -
1455 srcBuffer, srcDesc,
│ │ │ │ -
1456 dstBuffer, dstDesc,
│ │ │ │ -
1457 duBuffer, duDesc,
│ │ │ │ -
1458 dvBuffer, dvDesc,
│ │ │ │ -
1459 duuBuffer, duuDesc,
│ │ │ │ -
1460 duvBuffer, duvDesc,
│ │ │ │ -
1461 dvvBuffer, dvvDesc,
│ │ │ │ -
1462 numPatchCoords, patchCoords,
│ │ │ │ -
1463 patchTable);
│ │ │ │ -
1464 } else {
│ │ │ │ -
1465 // Create an instance on demand (slow)
│ │ │ │ -
1466 (void)deviceContext; // unused
│ │ │ │ -
1467 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1468 duDesc, dvDesc,
│ │ │ │ -
1469 duuDesc, duvDesc, dvvDesc);
│ │ │ │ -
1470 if (instance) {
│ │ │ │ -
1471 bool r = instance->EvalPatchesVarying(
│ │ │ │ -
1472 srcBuffer, srcDesc,
│ │ │ │ -
1473 dstBuffer, dstDesc,
│ │ │ │ -
1474 duBuffer, duDesc,
│ │ │ │ -
1475 dvBuffer, dvDesc,
│ │ │ │ -
1476 duuBuffer, duuDesc,
│ │ │ │ -
1477 duvBuffer, duvDesc,
│ │ │ │ -
1478 dvvBuffer, dvvDesc,
│ │ │ │ -
1479 numPatchCoords, patchCoords,
│ │ │ │ -
1480 patchTable);
│ │ │ │ -
1481 delete instance;
│ │ │ │ -
1482 return r;
│ │ │ │ -
1483 }
│ │ │ │ -
1484 return false;
│ │ │ │ -
1485 }
│ │ │ │ -
1486 }
│ │ │ │ -
│ │ │ │ -
1487
│ │ │ │ -
1542 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1543 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1545 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1546 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1547 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1548 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1549 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1550 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1551 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1552 int numPatchCoords,
│ │ │ │ -
1553 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1554 PATCH_TABLE *patchTable) const {
│ │ │ │ -
1555
│ │ │ │ -
1556 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1557 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1558 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
1559 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
1560 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ -
1561 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ -
1562 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ -
1563 numPatchCoords,
│ │ │ │ -
1564 patchCoords->BindVBO(),
│ │ │ │ -
1565 patchTable->GetVaryingPatchArrays(),
│ │ │ │ -
1566 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
1567 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1568 }
│ │ │ │ -
│ │ │ │ -
1569
│ │ │ │ -
1604 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1605 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1607 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1608 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1609 int numPatchCoords,
│ │ │ │ -
1610 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1611 PATCH_TABLE *patchTable,
│ │ │ │ -
1612 int fvarChannel,
│ │ │ │ -
1613 GLComputeEvaluator const *instance,
│ │ │ │ -
1614 void * deviceContext = NULL) {
│ │ │ │ -
1615
│ │ │ │ -
1616 if (instance) {
│ │ │ │ -
1617 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
1618 srcBuffer, srcDesc,
│ │ │ │ -
1619 dstBuffer, dstDesc,
│ │ │ │ -
1620 numPatchCoords, patchCoords,
│ │ │ │ -
1621 patchTable, fvarChannel);
│ │ │ │ -
1622 } else {
│ │ │ │ -
1623 // Create an instance on demand (slow)
│ │ │ │ -
1624 (void)deviceContext; // unused
│ │ │ │ -
1625 instance = Create(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
1628 if (instance) {
│ │ │ │ -
1629 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
1630 srcBuffer, srcDesc,
│ │ │ │ -
1631 dstBuffer, dstDesc,
│ │ │ │ -
1632 numPatchCoords, patchCoords,
│ │ │ │ -
1633 patchTable, fvarChannel);
│ │ │ │ -
1634 delete instance;
│ │ │ │ -
1635 return r;
│ │ │ │ -
1636 }
│ │ │ │ -
1637 return false;
│ │ │ │ -
1638 }
│ │ │ │ -
1639 }
│ │ │ │ -
│ │ │ │ -
1640
│ │ │ │ -
1667 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1668 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1670 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1671 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1672 int numPatchCoords,
│ │ │ │ -
1673 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1674 PATCH_TABLE *patchTable,
│ │ │ │ -
1675 int fvarChannel = 0) const {
│ │ │ │ -
1676
│ │ │ │ -
1677 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1678 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1679 0, BufferDescriptor(),
│ │ │ │ -
1680 0, BufferDescriptor(),
│ │ │ │ -
1681 numPatchCoords,
│ │ │ │ -
1682 patchCoords->BindVBO(),
│ │ │ │ -
1683 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
1684 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1685 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1686 }
│ │ │ │ -
│ │ │ │ -
1687
│ │ │ │ -
1734 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1735 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1737 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1738 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1739 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1740 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1741 int numPatchCoords,
│ │ │ │ -
1742 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1743 PATCH_TABLE *patchTable,
│ │ │ │ -
1744 int fvarChannel,
│ │ │ │ -
1745 GLComputeEvaluator const *instance,
│ │ │ │ -
1746 void * deviceContext = NULL) {
│ │ │ │ -
1747
│ │ │ │ -
1748 if (instance) {
│ │ │ │ -
1749 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
1750 srcBuffer, srcDesc,
│ │ │ │ -
1751 dstBuffer, dstDesc,
│ │ │ │ -
1752 duBuffer, duDesc,
│ │ │ │ -
1753 dvBuffer, dvDesc,
│ │ │ │ -
1754 numPatchCoords, patchCoords,
│ │ │ │ -
1755 patchTable, fvarChannel);
│ │ │ │ -
1756 } else {
│ │ │ │ -
1757 // Create an instance on demand (slow)
│ │ │ │ -
1758 (void)deviceContext; // unused
│ │ │ │ -
1759 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1760 duDesc, dvDesc);
│ │ │ │ -
1761 if (instance) {
│ │ │ │ -
1762 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
1763 srcBuffer, srcDesc,
│ │ │ │ -
1764 dstBuffer, dstDesc,
│ │ │ │ -
1765 duBuffer, duDesc,
│ │ │ │ -
1766 dvBuffer, dvDesc,
│ │ │ │ -
1767 numPatchCoords, patchCoords,
│ │ │ │ -
1768 patchTable, fvarChannel);
│ │ │ │ -
1769 delete instance;
│ │ │ │ -
1770 return r;
│ │ │ │ -
1771 }
│ │ │ │ -
1772 return false;
│ │ │ │ -
1773 }
│ │ │ │ -
1774 }
│ │ │ │ -
│ │ │ │ -
1775
│ │ │ │ -
1814 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1815 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1817 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1818 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1819 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1820 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1821 int numPatchCoords,
│ │ │ │ -
1822 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1823 PATCH_TABLE *patchTable,
│ │ │ │ -
1824 int fvarChannel = 0) const {
│ │ │ │ -
1825
│ │ │ │ -
1826 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
1827 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
1828 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
1829 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
1830 numPatchCoords,
│ │ │ │ -
1831 patchCoords->BindVBO(),
│ │ │ │ -
1832 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
1833 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1834 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1835 }
│ │ │ │ -
│ │ │ │ -
1836
│ │ │ │ -
1901 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1902 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1904 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1905 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1906 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1907 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1908 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1909 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1910 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1911 int numPatchCoords,
│ │ │ │ -
1912 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1913 PATCH_TABLE *patchTable,
│ │ │ │ -
1914 int fvarChannel,
│ │ │ │ -
1915 GLComputeEvaluator const *instance,
│ │ │ │ -
1916 void * deviceContext = NULL) {
│ │ │ │ -
1917
│ │ │ │ -
1918 if (instance) {
│ │ │ │ -
1919 return instance->EvalPatchesFaceVarying(
│ │ │ │ -
1920 srcBuffer, srcDesc,
│ │ │ │ -
1921 dstBuffer, dstDesc,
│ │ │ │ -
1922 duBuffer, duDesc,
│ │ │ │ -
1923 dvBuffer, dvDesc,
│ │ │ │ -
1924 duuBuffer, duuDesc,
│ │ │ │ -
1925 duvBuffer, duvDesc,
│ │ │ │ -
1926 dvvBuffer, dvvDesc,
│ │ │ │ -
1927 numPatchCoords, patchCoords,
│ │ │ │ -
1928 patchTable, fvarChannel);
│ │ │ │ -
1929 } else {
│ │ │ │ -
1930 // Create an instance on demand (slow)
│ │ │ │ -
1931 (void)deviceContext; // unused
│ │ │ │ -
1932 instance = Create(srcDesc, dstDesc,
│ │ │ │ -
1933 duDesc, dvDesc,
│ │ │ │ -
1934 duuDesc, duvDesc, dvvDesc);
│ │ │ │ -
1935 if (instance) {
│ │ │ │ -
1936 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ -
1937 srcBuffer, srcDesc,
│ │ │ │ -
1938 dstBuffer, dstDesc,
│ │ │ │ -
1939 duBuffer, duDesc,
│ │ │ │ -
1940 dvBuffer, dvDesc,
│ │ │ │ -
1941 duuBuffer, duuDesc,
│ │ │ │ -
1942 duvBuffer, duvDesc,
│ │ │ │ -
1943 dvvBuffer, dvvDesc,
│ │ │ │ -
1944 numPatchCoords, patchCoords,
│ │ │ │ -
1945 patchTable, fvarChannel);
│ │ │ │ -
1946 delete instance;
│ │ │ │ -
1947 return r;
│ │ │ │ -
1948 }
│ │ │ │ -
1949 return false;
│ │ │ │ -
1950 }
│ │ │ │ -
1951 }
│ │ │ │ -
│ │ │ │ -
1952
│ │ │ │ -
2009 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
2010 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
2012 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
2013 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
2014 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
2015 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
2016 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
2017 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
2018 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
2019 int numPatchCoords,
│ │ │ │ -
2020 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
2021 PATCH_TABLE *patchTable,
│ │ │ │ -
2022 int fvarChannel = 0) const {
│ │ │ │ -
2023
│ │ │ │ -
2024 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ -
2025 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ -
2026 duBuffer->BindVBO(), duDesc,
│ │ │ │ -
2027 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ -
2028 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ -
2029 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ -
2030 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ -
2031 numPatchCoords,
│ │ │ │ -
2032 patchCoords->BindVBO(),
│ │ │ │ -
2033 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ -
2034 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
2035 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
2036 }
│ │ │ │ -
│ │ │ │ -
2037
│ │ │ │ -
2043
│ │ │ │ -
2046 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ -
2047 BufferDescriptor const &dstDesc,
│ │ │ │ -
2048 BufferDescriptor const &duDesc = BufferDescriptor(),
│ │ │ │ -
2049 BufferDescriptor const &dvDesc = BufferDescriptor(),
│ │ │ │ -
2050 BufferDescriptor const &duuDesc = BufferDescriptor(),
│ │ │ │ -
2051 BufferDescriptor const &duvDesc = BufferDescriptor(),
│ │ │ │ -
2052 BufferDescriptor const &dvvDesc = BufferDescriptor());
│ │ │ │ -
2053
│ │ │ │ -
2055 static void Synchronize(void *deviceContext);
│ │ │ │ -
2056
│ │ │ │ -
2057private:
│ │ │ │ -
2058 struct _StencilKernel {
│ │ │ │ -
2059 _StencilKernel();
│ │ │ │ -
2060 ~_StencilKernel();
│ │ │ │ -
2061 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ -
2062 BufferDescriptor const &dstDesc,
│ │ │ │ -
2063 BufferDescriptor const &duDesc,
│ │ │ │ -
2064 BufferDescriptor const &dvDesc,
│ │ │ │ -
2065 BufferDescriptor const &duuDesc,
│ │ │ │ -
2066 BufferDescriptor const &duvDesc,
│ │ │ │ -
2067 BufferDescriptor const &dvvDesc,
│ │ │ │ -
2068 int workGroupSize);
│ │ │ │ -
2069 GLuint program;
│ │ │ │ -
2070 GLuint uniformStart;
│ │ │ │ -
2071 GLuint uniformEnd;
│ │ │ │ -
2072 GLuint uniformSrcOffset;
│ │ │ │ -
2073 GLuint uniformDstOffset;
│ │ │ │ -
2074 GLuint uniformDuDesc;
│ │ │ │ -
2075 GLuint uniformDvDesc;
│ │ │ │ -
2076 GLuint uniformDuuDesc;
│ │ │ │ -
2077 GLuint uniformDuvDesc;
│ │ │ │ -
2078 GLuint uniformDvvDesc;
│ │ │ │ -
2079 } _stencilKernel;
│ │ │ │ -
2080
│ │ │ │ -
2081 struct _PatchKernel {
│ │ │ │ -
2082 _PatchKernel();
│ │ │ │ -
2083 ~_PatchKernel();
│ │ │ │ -
2084 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ -
2085 BufferDescriptor const &dstDesc,
│ │ │ │ -
2086 BufferDescriptor const &duDesc,
│ │ │ │ -
2087 BufferDescriptor const &dvDesc,
│ │ │ │ -
2088 BufferDescriptor const &duuDesc,
│ │ │ │ -
2089 BufferDescriptor const &duvDesc,
│ │ │ │ -
2090 BufferDescriptor const &dvvDesc,
│ │ │ │ -
2091 int workGroupSize);
│ │ │ │ -
2092 GLuint program;
│ │ │ │ -
2093 GLuint uniformSrcOffset;
│ │ │ │ -
2094 GLuint uniformDstOffset;
│ │ │ │ -
2095 GLuint uniformPatchArray;
│ │ │ │ -
2096 GLuint uniformDuDesc;
│ │ │ │ -
2097 GLuint uniformDvDesc;
│ │ │ │ -
2098 GLuint uniformDuuDesc;
│ │ │ │ -
2099 GLuint uniformDuvDesc;
│ │ │ │ -
2100 GLuint uniformDvvDesc;
│ │ │ │ -
2101 } _patchKernel;
│ │ │ │ -
2102
│ │ │ │ -
2103 int _workGroupSize;
│ │ │ │ -
2104 GLuint _patchArraysSSBO;
│ │ │ │ -
2105};
│ │ │ │ -
│ │ │ │ -
2106
│ │ │ │ -
2107} // end namespace Osd
│ │ │ │ -
2108
│ │ │ │ -
2109} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
2110using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
2111
│ │ │ │ -
2112} // end namespace OpenSubdiv
│ │ │ │ -
2113
│ │ │ │ -
2114
│ │ │ │ -
2115#endif // OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
GLStencilTableSSBO(Far::StencilTable const *stencilTable)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static GLStencilTableSSBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
│ │ │ │ - │ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ - │ │ │ │ -
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
│ │ │ │ -
~GLComputeEvaluator()
Destructor. note that the GL context must be made current.
│ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, GLuint duuWeightsBuffer, GLuint duvWeightsBuffer, GLuint dvvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ - │ │ │ │ -
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ -
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext=NULL)
│ │ │ │ -
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ -
static void Synchronize(void *deviceContext)
Wait the dispatched kernel finishes.
│ │ │ │ -
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc=BufferDescriptor(), BufferDescriptor const &dvDesc=BufferDescriptor(), BufferDescriptor const &duuDesc=BufferDescriptor(), BufferDescriptor const &duvDesc=BufferDescriptor(), BufferDescriptor const &dvvDesc=BufferDescriptor())
│ │ │ │ -
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void *deviceContext=NULL)
│ │ │ │ -
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
81#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Provides shader source which can be used by client code.
│ │ │ │ +
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetPatchDrawingShaderSource()
Returns shader source which can be used while drawing piecewise parametric patches resulting from sub...
│ │ │ │ +
static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetPatchBasisShaderSource()
Returns shader source which can be used to evaluate position and first and second derivatives on piec...
│ │ │ │ + │ │ │ │ +
static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glComputeEvaluator.h │ │ │ │ │ +glslPatchShaderSource.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,1359 +24,83 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/opengl.h" │ │ │ │ │ -31#include "../osd/types.h" │ │ │ │ │ -32#include "../osd/bufferDescriptor.h" │ │ │ │ │ +30#include "../far/patchDescriptor.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 33 │ │ │ │ │ 34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ 35namespace OPENSUBDIV_VERSION { │ │ │ │ │ 36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 class PatchTable; │ │ │ │ │ -39 class StencilTable; │ │ │ │ │ -40 class LimitStencilTable; │ │ │ │ │ -41} │ │ │ │ │ -42 │ │ │ │ │ -43namespace Osd { │ │ │ │ │ -44 │ │ │ │ │ -_5_1class _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O { │ │ │ │ │ -52public: │ │ │ │ │ -_5_3 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ -54 void *deviceContext = NULL) { │ │ │ │ │ -55 (void)deviceContext; // unused │ │ │ │ │ -56 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(stencilTable); │ │ │ │ │ -57 } │ │ │ │ │ -_5_8 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O *_C_r_e_a_t_e( │ │ │ │ │ -59 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable, │ │ │ │ │ -60 void *deviceContext = NULL) { │ │ │ │ │ -61 (void)deviceContext; // unused │ │ │ │ │ -62 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(limitStencilTable); │ │ │ │ │ -63 } │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_4_0class _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ +41public: │ │ │ │ │ +_4_5 static std::string _G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +46 │ │ │ │ │ +_5_0 static std::string _G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +51 │ │ │ │ │ +59 │ │ │ │ │ +_6_0 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +61 │ │ │ │ │ +_6_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +63 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ 64 │ │ │ │ │ -_6_5 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable); │ │ │ │ │ -_6_6 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ -*limitStencilTable); │ │ │ │ │ -_6_7 _~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(); │ │ │ │ │ -68 │ │ │ │ │ -69 // interfaces needed for GLSLComputeKernel │ │ │ │ │ -_7_0 GLuint _G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizes; } │ │ │ │ │ -_7_1 GLuint _G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsets; } │ │ │ │ │ -_7_2 GLuint _G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indices; } │ │ │ │ │ -_7_3 GLuint _G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weights; } │ │ │ │ │ -_7_4 GLuint _G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeights; } │ │ │ │ │ -_7_5 GLuint _G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeights; } │ │ │ │ │ -_7_6 GLuint _G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeights; } │ │ │ │ │ -_7_7 GLuint _G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeights; } │ │ │ │ │ -_7_8 GLuint _G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeights; } │ │ │ │ │ -_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +_6_5 static std::string _G_e_t_T_e_s_s_C_o_n_t_r_o_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +66 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +67 │ │ │ │ │ +_6_8 static std::string _G_e_t_T_e_s_s_E_v_a_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +69 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +70 │ │ │ │ │ +72}; │ │ │ │ │ +73 │ │ │ │ │ +74} // end namespace Osd │ │ │ │ │ +75 │ │ │ │ │ +76} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +77using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +78 │ │ │ │ │ +79} // end namespace OpenSubdiv │ │ │ │ │ 80 │ │ │ │ │ -81private: │ │ │ │ │ -82 GLuint _sizes; │ │ │ │ │ -83 GLuint _offsets; │ │ │ │ │ -84 GLuint _indices; │ │ │ │ │ -85 GLuint _weights; │ │ │ │ │ -86 GLuint _duWeights; │ │ │ │ │ -87 GLuint _dvWeights; │ │ │ │ │ -88 GLuint _duuWeights; │ │ │ │ │ -89 GLuint _duvWeights; │ │ │ │ │ -90 GLuint _dvvWeights; │ │ │ │ │ -91 int _numStencils; │ │ │ │ │ -92}; │ │ │ │ │ -93 │ │ │ │ │ -94// -------------------------------------------------------------------------- │ │ │ │ │ -- │ │ │ │ │ -95 │ │ │ │ │ -_9_6class _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -97public: │ │ │ │ │ -_9_8 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ -_9_9 static _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -100 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -101 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -102 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -103 void * deviceContext = NULL) { │ │ │ │ │ -104 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -105 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -108 deviceContext); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 static _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -112 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -113 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -114 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -115 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -116 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -117 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -118 void * deviceContext = NULL) { │ │ │ │ │ -119 (void)deviceContext; // not used │ │ │ │ │ -120 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r *instance = new _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -121 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -122 duuDesc, duvDesc, dvvDesc)) │ │ │ │ │ -123 return instance; │ │ │ │ │ -124 delete instance; │ │ │ │ │ -125 return NULL; │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_9 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -130 │ │ │ │ │ -_1_3_2 _~_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -133 │ │ │ │ │ -139 │ │ │ │ │ -167 template │ │ │ │ │ -_1_6_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -169 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -170 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -171 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -172 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -173 void * deviceContext = NULL) { │ │ │ │ │ -174 │ │ │ │ │ -175 if (instance) { │ │ │ │ │ -176 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -177 dstBuffer, dstDesc, │ │ │ │ │ -178 stencilTable); │ │ │ │ │ -179 } else { │ │ │ │ │ -180 // Create an instance on demand (slow) │ │ │ │ │ -181 (void)deviceContext; // unused │ │ │ │ │ -182 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -183 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -184 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -185 if (instance) { │ │ │ │ │ -186 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -187 dstBuffer, dstDesc, │ │ │ │ │ -188 stencilTable); │ │ │ │ │ -189 delete instance; │ │ │ │ │ -190 return r; │ │ │ │ │ -191 } │ │ │ │ │ -192 return false; │ │ │ │ │ -193 } │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -235 template │ │ │ │ │ -_2_3_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -237 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -238 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -239 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -240 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -241 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -242 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -243 void * deviceContext = NULL) { │ │ │ │ │ -244 │ │ │ │ │ -245 if (instance) { │ │ │ │ │ -246 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -247 dstBuffer, dstDesc, │ │ │ │ │ -248 duBuffer, duDesc, │ │ │ │ │ -249 dvBuffer, dvDesc, │ │ │ │ │ -250 stencilTable); │ │ │ │ │ -251 } else { │ │ │ │ │ -252 // Create an instance on demand (slow) │ │ │ │ │ -253 (void)deviceContext; // unused │ │ │ │ │ -254 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc); │ │ │ │ │ -255 if (instance) { │ │ │ │ │ -256 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -257 dstBuffer, dstDesc, │ │ │ │ │ -258 duBuffer, duDesc, │ │ │ │ │ -259 dvBuffer, dvDesc, │ │ │ │ │ -260 stencilTable); │ │ │ │ │ -261 delete instance; │ │ │ │ │ -262 return r; │ │ │ │ │ -263 } │ │ │ │ │ -264 return false; │ │ │ │ │ -265 } │ │ │ │ │ -266 } │ │ │ │ │ -267 │ │ │ │ │ -325 template │ │ │ │ │ -_3_2_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -327 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -328 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -329 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -330 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -331 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -332 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -333 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -334 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -335 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -336 void * deviceContext = NULL) { │ │ │ │ │ -337 │ │ │ │ │ -338 if (instance) { │ │ │ │ │ -339 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -340 dstBuffer, dstDesc, │ │ │ │ │ -341 duBuffer, duDesc, │ │ │ │ │ -342 dvBuffer, dvDesc, │ │ │ │ │ -343 duuBuffer, duuDesc, │ │ │ │ │ -344 duvBuffer, duvDesc, │ │ │ │ │ -345 dvvBuffer, dvvDesc, │ │ │ │ │ -346 stencilTable); │ │ │ │ │ -347 } else { │ │ │ │ │ -348 // Create an instance on demand (slow) │ │ │ │ │ -349 (void)deviceContext; // unused │ │ │ │ │ -350 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -351 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -352 if (instance) { │ │ │ │ │ -353 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -354 dstBuffer, dstDesc, │ │ │ │ │ -355 duBuffer, duDesc, │ │ │ │ │ -356 dvBuffer, dvDesc, │ │ │ │ │ -357 duuBuffer, duuDesc, │ │ │ │ │ -358 duvBuffer, duvDesc, │ │ │ │ │ -359 dvvBuffer, dvvDesc, │ │ │ │ │ -360 stencilTable); │ │ │ │ │ -361 delete instance; │ │ │ │ │ -362 return r; │ │ │ │ │ -363 } │ │ │ │ │ -364 return false; │ │ │ │ │ -365 } │ │ │ │ │ -366 } │ │ │ │ │ -367 │ │ │ │ │ -385 template │ │ │ │ │ -_3_8_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -387 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -388 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -389 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -390 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -391 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -392 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -393 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -394 stencilTable->GetSizesBuffer(), │ │ │ │ │ -395 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -396 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -397 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -398 0, │ │ │ │ │ -399 0, │ │ │ │ │ -400 /* start = */ 0, │ │ │ │ │ -401 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -402 } │ │ │ │ │ -403 │ │ │ │ │ -433 template │ │ │ │ │ -_4_3_4 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -435 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -436 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -437 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -438 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -439 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -440 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -441 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -442 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -443 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -444 stencilTable->GetSizesBuffer(), │ │ │ │ │ -445 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -446 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -447 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -448 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -449 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -450 /* start = */ 0, │ │ │ │ │ -451 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -452 } │ │ │ │ │ -453 │ │ │ │ │ -501 template │ │ │ │ │ -_5_0_2 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -503 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -504 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -505 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -506 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -507 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -508 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -509 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -510 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -511 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -512 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -513 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -514 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -515 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -516 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -517 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -518 stencilTable->GetSizesBuffer(), │ │ │ │ │ -519 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -520 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -521 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -522 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -523 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -524 stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ -525 stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ -526 stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ -527 /* start = */ 0, │ │ │ │ │ -528 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -529 } │ │ │ │ │ -530 │ │ │ │ │ -_5_6_6 bool _E_v_a_l_S_t_e_n_c_i_l_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -567 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -568 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -569 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -570 GLuint sizesBuffer, │ │ │ │ │ -571 GLuint offsetsBuffer, │ │ │ │ │ -572 GLuint indicesBuffer, │ │ │ │ │ -573 GLuint weightsBuffer, │ │ │ │ │ -574 GLuint duWeightsBuffer, │ │ │ │ │ -575 GLuint dvWeightsBuffer, │ │ │ │ │ -576 int start, │ │ │ │ │ -577 int end) const; │ │ │ │ │ -578 │ │ │ │ │ -_6_3_2 bool _E_v_a_l_S_t_e_n_c_i_l_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -633 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -634 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -635 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -636 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -637 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -638 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -639 GLuint sizesBuffer, │ │ │ │ │ -640 GLuint offsetsBuffer, │ │ │ │ │ -641 GLuint indicesBuffer, │ │ │ │ │ -642 GLuint weightsBuffer, │ │ │ │ │ -643 GLuint duWeightsBuffer, │ │ │ │ │ -644 GLuint dvWeightsBuffer, │ │ │ │ │ -645 GLuint duuWeightsBuffer, │ │ │ │ │ -646 GLuint duvWeightsBuffer, │ │ │ │ │ -647 GLuint dvvWeightsBuffer, │ │ │ │ │ -648 int start, │ │ │ │ │ -649 int end) const; │ │ │ │ │ -650 │ │ │ │ │ -656 │ │ │ │ │ -689 template │ │ │ │ │ -_6_9_1 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -692 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -693 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -694 int numPatchCoords, │ │ │ │ │ -695 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -696 PATCH_TABLE *patchTable, │ │ │ │ │ -697 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -698 void * deviceContext = NULL) { │ │ │ │ │ -699 │ │ │ │ │ -700 if (instance) { │ │ │ │ │ -701 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -702 dstBuffer, dstDesc, │ │ │ │ │ -703 numPatchCoords, patchCoords, │ │ │ │ │ -704 patchTable); │ │ │ │ │ -705 } else { │ │ │ │ │ -706 // Create an instance on demand (slow) │ │ │ │ │ -707 (void)deviceContext; // unused │ │ │ │ │ -708 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -709 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -710 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -711 if (instance) { │ │ │ │ │ -712 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -713 dstBuffer, dstDesc, │ │ │ │ │ -714 numPatchCoords, patchCoords, │ │ │ │ │ -715 patchTable); │ │ │ │ │ -716 delete instance; │ │ │ │ │ -717 return r; │ │ │ │ │ -718 } │ │ │ │ │ -719 return false; │ │ │ │ │ -720 } │ │ │ │ │ -721 } │ │ │ │ │ -722 │ │ │ │ │ -767 template │ │ │ │ │ -_7_6_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -770 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -771 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -772 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -773 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -774 int numPatchCoords, │ │ │ │ │ -775 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -776 PATCH_TABLE *patchTable, │ │ │ │ │ -777 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -778 void * deviceContext = NULL) { │ │ │ │ │ -779 │ │ │ │ │ -780 if (instance) { │ │ │ │ │ -781 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -782 dstBuffer, dstDesc, │ │ │ │ │ -783 duBuffer, duDesc, │ │ │ │ │ -784 dvBuffer, dvDesc, │ │ │ │ │ -785 numPatchCoords, patchCoords, │ │ │ │ │ -786 patchTable); │ │ │ │ │ -787 } else { │ │ │ │ │ -788 // Create an instance on demand (slow) │ │ │ │ │ -789 (void)deviceContext; // unused │ │ │ │ │ -790 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -791 duDesc, dvDesc); │ │ │ │ │ -792 if (instance) { │ │ │ │ │ -793 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -794 dstBuffer, dstDesc, │ │ │ │ │ -795 duBuffer, duDesc, │ │ │ │ │ -796 dvBuffer, dvDesc, │ │ │ │ │ -797 numPatchCoords, patchCoords, │ │ │ │ │ -798 patchTable); │ │ │ │ │ -799 delete instance; │ │ │ │ │ -800 return r; │ │ │ │ │ -801 } │ │ │ │ │ -802 return false; │ │ │ │ │ -803 } │ │ │ │ │ -804 } │ │ │ │ │ -805 │ │ │ │ │ -868 template │ │ │ │ │ -_8_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -871 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -872 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -873 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -874 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -875 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -876 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -877 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -878 int numPatchCoords, │ │ │ │ │ -879 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -880 PATCH_TABLE *patchTable, │ │ │ │ │ -881 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -882 void * deviceContext = NULL) { │ │ │ │ │ -883 │ │ │ │ │ -884 if (instance) { │ │ │ │ │ -885 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -886 dstBuffer, dstDesc, │ │ │ │ │ -887 duBuffer, duDesc, │ │ │ │ │ -888 dvBuffer, dvDesc, │ │ │ │ │ -889 duuBuffer, duuDesc, │ │ │ │ │ -890 duvBuffer, duvDesc, │ │ │ │ │ -891 dvvBuffer, dvvDesc, │ │ │ │ │ -892 numPatchCoords, patchCoords, │ │ │ │ │ -893 patchTable); │ │ │ │ │ -894 } else { │ │ │ │ │ -895 // Create an instance on demand (slow) │ │ │ │ │ -896 (void)deviceContext; // unused │ │ │ │ │ -897 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -898 duDesc, dvDesc, │ │ │ │ │ -899 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -900 if (instance) { │ │ │ │ │ -901 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -902 dstBuffer, dstDesc, │ │ │ │ │ -903 duBuffer, duDesc, │ │ │ │ │ -904 dvBuffer, dvDesc, │ │ │ │ │ -905 duuBuffer, duuDesc, │ │ │ │ │ -906 duvBuffer, duvDesc, │ │ │ │ │ -907 dvvBuffer, dvvDesc, │ │ │ │ │ -908 numPatchCoords, patchCoords, │ │ │ │ │ -909 patchTable); │ │ │ │ │ -910 delete instance; │ │ │ │ │ -911 return r; │ │ │ │ │ -912 } │ │ │ │ │ -913 return false; │ │ │ │ │ -914 } │ │ │ │ │ -915 } │ │ │ │ │ -916 │ │ │ │ │ -941 template │ │ │ │ │ -_9_4_3 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -944 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -945 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -946 int numPatchCoords, │ │ │ │ │ -947 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -948 PATCH_TABLE *patchTable) const { │ │ │ │ │ -949 │ │ │ │ │ -950 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -951 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -952 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -953 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -954 numPatchCoords, │ │ │ │ │ -955 patchCoords->BindVBO(), │ │ │ │ │ -956 patchTable->GetPatchArrays(), │ │ │ │ │ -957 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -958 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -959 } │ │ │ │ │ -960 │ │ │ │ │ -995 template │ │ │ │ │ -_9_9_7 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -998 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -999 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1000 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1001 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1002 int numPatchCoords, │ │ │ │ │ -1003 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1004 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1005 │ │ │ │ │ -1006 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1007 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1008 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1009 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1010 numPatchCoords, │ │ │ │ │ -1011 patchCoords->BindVBO(), │ │ │ │ │ -1012 patchTable->GetPatchArrays(), │ │ │ │ │ -1013 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1014 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1015 } │ │ │ │ │ -1016 │ │ │ │ │ -1069 template │ │ │ │ │ -_1_0_7_1 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1072 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1073 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1074 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1075 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1076 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1077 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1078 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1079 int numPatchCoords, │ │ │ │ │ -1080 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1081 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1082 │ │ │ │ │ -1083 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1084 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1085 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1086 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1087 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -1088 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -1089 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -1090 numPatchCoords, │ │ │ │ │ -1091 patchCoords->BindVBO(), │ │ │ │ │ -1092 patchTable->GetPatchArrays(), │ │ │ │ │ -1093 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1094 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1095 } │ │ │ │ │ -1096 │ │ │ │ │ -_1_0_9_7 bool _E_v_a_l_P_a_t_c_h_e_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1098 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1099 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1100 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1101 int numPatchCoords, │ │ │ │ │ -1102 GLuint patchCoordsBuffer, │ │ │ │ │ -1103 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1104 GLuint patchIndexBuffer, │ │ │ │ │ -1105 GLuint patchParamsBuffer) const; │ │ │ │ │ -1106 │ │ │ │ │ -_1_1_0_7 bool _E_v_a_l_P_a_t_c_h_e_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1108 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1109 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1110 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1111 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1112 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1113 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1114 int numPatchCoords, │ │ │ │ │ -1115 GLuint patchCoordsBuffer, │ │ │ │ │ -1116 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1117 GLuint patchIndexBuffer, │ │ │ │ │ -1118 GLuint patchParamsBuffer) const; │ │ │ │ │ -1119 │ │ │ │ │ -1152 template │ │ │ │ │ -_1_1_5_4 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1155 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1156 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1157 int numPatchCoords, │ │ │ │ │ -1158 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1159 PATCH_TABLE *patchTable, │ │ │ │ │ -1160 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1161 void * deviceContext = NULL) { │ │ │ │ │ -1162 │ │ │ │ │ -1163 if (instance) { │ │ │ │ │ -1164 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1165 srcBuffer, srcDesc, │ │ │ │ │ -1166 dstBuffer, dstDesc, │ │ │ │ │ -1167 numPatchCoords, patchCoords, │ │ │ │ │ -1168 patchTable); │ │ │ │ │ -1169 } else { │ │ │ │ │ -1170 // Create an instance on demand (slow) │ │ │ │ │ -1171 (void)deviceContext; // unused │ │ │ │ │ -1172 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1173 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1174 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -1175 if (instance) { │ │ │ │ │ -1176 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1177 srcBuffer, srcDesc, │ │ │ │ │ -1178 dstBuffer, dstDesc, │ │ │ │ │ -1179 numPatchCoords, patchCoords, │ │ │ │ │ -1180 patchTable); │ │ │ │ │ -1181 delete instance; │ │ │ │ │ -1182 return r; │ │ │ │ │ -1183 } │ │ │ │ │ -1184 return false; │ │ │ │ │ -1185 } │ │ │ │ │ -1186 } │ │ │ │ │ -1187 │ │ │ │ │ -1212 template │ │ │ │ │ -_1_2_1_4 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1215 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1216 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1217 int numPatchCoords, │ │ │ │ │ -1218 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1219 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1220 │ │ │ │ │ -1221 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1222 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1223 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1224 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1225 numPatchCoords, │ │ │ │ │ -1226 patchCoords->BindVBO(), │ │ │ │ │ -1227 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1228 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1229 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1230 } │ │ │ │ │ -1231 │ │ │ │ │ -1276 template │ │ │ │ │ -_1_2_7_8 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1279 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1280 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1281 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1282 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1283 int numPatchCoords, │ │ │ │ │ -1284 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1285 PATCH_TABLE *patchTable, │ │ │ │ │ -1286 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1287 void * deviceContext = NULL) { │ │ │ │ │ -1288 │ │ │ │ │ -1289 if (instance) { │ │ │ │ │ -1290 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1291 srcBuffer, srcDesc, │ │ │ │ │ -1292 dstBuffer, dstDesc, │ │ │ │ │ -1293 duBuffer, duDesc, │ │ │ │ │ -1294 dvBuffer, dvDesc, │ │ │ │ │ -1295 numPatchCoords, patchCoords, │ │ │ │ │ -1296 patchTable); │ │ │ │ │ -1297 } else { │ │ │ │ │ -1298 // Create an instance on demand (slow) │ │ │ │ │ -1299 (void)deviceContext; // unused │ │ │ │ │ -1300 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1301 duDesc, dvDesc); │ │ │ │ │ -1302 if (instance) { │ │ │ │ │ -1303 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1304 srcBuffer, srcDesc, │ │ │ │ │ -1305 dstBuffer, dstDesc, │ │ │ │ │ -1306 duBuffer, duDesc, │ │ │ │ │ -1307 dvBuffer, dvDesc, │ │ │ │ │ -1308 numPatchCoords, patchCoords, │ │ │ │ │ -1309 patchTable); │ │ │ │ │ -1310 delete instance; │ │ │ │ │ -1311 return r; │ │ │ │ │ -1312 } │ │ │ │ │ -1313 return false; │ │ │ │ │ -1314 } │ │ │ │ │ -1315 } │ │ │ │ │ -1316 │ │ │ │ │ -1353 template │ │ │ │ │ -_1_3_5_5 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1356 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1357 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1358 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1359 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1360 int numPatchCoords, │ │ │ │ │ -1361 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1362 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1363 │ │ │ │ │ -1364 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1365 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1366 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1367 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1368 numPatchCoords, │ │ │ │ │ -1369 patchCoords->BindVBO(), │ │ │ │ │ -1370 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1371 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1372 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1373 } │ │ │ │ │ -1374 │ │ │ │ │ -1437 template │ │ │ │ │ -_1_4_3_9 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1440 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1441 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1442 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1443 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1444 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1445 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1446 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1447 int numPatchCoords, │ │ │ │ │ -1448 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1449 PATCH_TABLE *patchTable, │ │ │ │ │ -1450 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1451 void * deviceContext = NULL) { │ │ │ │ │ -1452 │ │ │ │ │ -1453 if (instance) { │ │ │ │ │ -1454 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1455 srcBuffer, srcDesc, │ │ │ │ │ -1456 dstBuffer, dstDesc, │ │ │ │ │ -1457 duBuffer, duDesc, │ │ │ │ │ -1458 dvBuffer, dvDesc, │ │ │ │ │ -1459 duuBuffer, duuDesc, │ │ │ │ │ -1460 duvBuffer, duvDesc, │ │ │ │ │ -1461 dvvBuffer, dvvDesc, │ │ │ │ │ -1462 numPatchCoords, patchCoords, │ │ │ │ │ -1463 patchTable); │ │ │ │ │ -1464 } else { │ │ │ │ │ -1465 // Create an instance on demand (slow) │ │ │ │ │ -1466 (void)deviceContext; // unused │ │ │ │ │ -1467 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1468 duDesc, dvDesc, │ │ │ │ │ -1469 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -1470 if (instance) { │ │ │ │ │ -1471 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1472 srcBuffer, srcDesc, │ │ │ │ │ -1473 dstBuffer, dstDesc, │ │ │ │ │ -1474 duBuffer, duDesc, │ │ │ │ │ -1475 dvBuffer, dvDesc, │ │ │ │ │ -1476 duuBuffer, duuDesc, │ │ │ │ │ -1477 duvBuffer, duvDesc, │ │ │ │ │ -1478 dvvBuffer, dvvDesc, │ │ │ │ │ -1479 numPatchCoords, patchCoords, │ │ │ │ │ -1480 patchTable); │ │ │ │ │ -1481 delete instance; │ │ │ │ │ -1482 return r; │ │ │ │ │ -1483 } │ │ │ │ │ -1484 return false; │ │ │ │ │ -1485 } │ │ │ │ │ -1486 } │ │ │ │ │ -1487 │ │ │ │ │ -1542 template │ │ │ │ │ -_1_5_4_4 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1545 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1546 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1547 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1548 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1549 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1550 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1551 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1552 int numPatchCoords, │ │ │ │ │ -1553 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1554 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1555 │ │ │ │ │ -1556 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1557 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1558 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1559 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1560 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -1561 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -1562 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -1563 numPatchCoords, │ │ │ │ │ -1564 patchCoords->BindVBO(), │ │ │ │ │ -1565 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1566 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1567 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1568 } │ │ │ │ │ -1569 │ │ │ │ │ -1604 template │ │ │ │ │ -_1_6_0_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1607 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1608 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1609 int numPatchCoords, │ │ │ │ │ -1610 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1611 PATCH_TABLE *patchTable, │ │ │ │ │ -1612 int fvarChannel, │ │ │ │ │ -1613 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1614 void * deviceContext = NULL) { │ │ │ │ │ -1615 │ │ │ │ │ -1616 if (instance) { │ │ │ │ │ -1617 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1618 srcBuffer, srcDesc, │ │ │ │ │ -1619 dstBuffer, dstDesc, │ │ │ │ │ -1620 numPatchCoords, patchCoords, │ │ │ │ │ -1621 patchTable, fvarChannel); │ │ │ │ │ -1622 } else { │ │ │ │ │ -1623 // Create an instance on demand (slow) │ │ │ │ │ -1624 (void)deviceContext; // unused │ │ │ │ │ -1625 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1626 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1627 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -1628 if (instance) { │ │ │ │ │ -1629 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1630 srcBuffer, srcDesc, │ │ │ │ │ -1631 dstBuffer, dstDesc, │ │ │ │ │ -1632 numPatchCoords, patchCoords, │ │ │ │ │ -1633 patchTable, fvarChannel); │ │ │ │ │ -1634 delete instance; │ │ │ │ │ -1635 return r; │ │ │ │ │ -1636 } │ │ │ │ │ -1637 return false; │ │ │ │ │ -1638 } │ │ │ │ │ -1639 } │ │ │ │ │ -1640 │ │ │ │ │ -1667 template │ │ │ │ │ -_1_6_6_9 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1670 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1671 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1672 int numPatchCoords, │ │ │ │ │ -1673 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1674 PATCH_TABLE *patchTable, │ │ │ │ │ -1675 int fvarChannel = 0) const { │ │ │ │ │ -1676 │ │ │ │ │ -1677 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1678 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1679 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1680 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1681 numPatchCoords, │ │ │ │ │ -1682 patchCoords->BindVBO(), │ │ │ │ │ -1683 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1684 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1685 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1686 } │ │ │ │ │ -1687 │ │ │ │ │ -1734 template │ │ │ │ │ -_1_7_3_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1737 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1738 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1739 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1740 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1741 int numPatchCoords, │ │ │ │ │ -1742 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1743 PATCH_TABLE *patchTable, │ │ │ │ │ -1744 int fvarChannel, │ │ │ │ │ -1745 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1746 void * deviceContext = NULL) { │ │ │ │ │ -1747 │ │ │ │ │ -1748 if (instance) { │ │ │ │ │ -1749 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1750 srcBuffer, srcDesc, │ │ │ │ │ -1751 dstBuffer, dstDesc, │ │ │ │ │ -1752 duBuffer, duDesc, │ │ │ │ │ -1753 dvBuffer, dvDesc, │ │ │ │ │ -1754 numPatchCoords, patchCoords, │ │ │ │ │ -1755 patchTable, fvarChannel); │ │ │ │ │ -1756 } else { │ │ │ │ │ -1757 // Create an instance on demand (slow) │ │ │ │ │ -1758 (void)deviceContext; // unused │ │ │ │ │ -1759 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1760 duDesc, dvDesc); │ │ │ │ │ -1761 if (instance) { │ │ │ │ │ -1762 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1763 srcBuffer, srcDesc, │ │ │ │ │ -1764 dstBuffer, dstDesc, │ │ │ │ │ -1765 duBuffer, duDesc, │ │ │ │ │ -1766 dvBuffer, dvDesc, │ │ │ │ │ -1767 numPatchCoords, patchCoords, │ │ │ │ │ -1768 patchTable, fvarChannel); │ │ │ │ │ -1769 delete instance; │ │ │ │ │ -1770 return r; │ │ │ │ │ -1771 } │ │ │ │ │ -1772 return false; │ │ │ │ │ -1773 } │ │ │ │ │ -1774 } │ │ │ │ │ -1775 │ │ │ │ │ -1814 template │ │ │ │ │ -_1_8_1_6 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1817 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1818 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1819 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1820 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1821 int numPatchCoords, │ │ │ │ │ -1822 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1823 PATCH_TABLE *patchTable, │ │ │ │ │ -1824 int fvarChannel = 0) const { │ │ │ │ │ -1825 │ │ │ │ │ -1826 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1827 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1828 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1829 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1830 numPatchCoords, │ │ │ │ │ -1831 patchCoords->BindVBO(), │ │ │ │ │ -1832 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1833 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1834 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1835 } │ │ │ │ │ -1836 │ │ │ │ │ -1901 template │ │ │ │ │ -_1_9_0_3 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1904 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1905 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1906 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1907 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1908 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1909 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1910 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1911 int numPatchCoords, │ │ │ │ │ -1912 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1913 PATCH_TABLE *patchTable, │ │ │ │ │ -1914 int fvarChannel, │ │ │ │ │ -1915 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1916 void * deviceContext = NULL) { │ │ │ │ │ -1917 │ │ │ │ │ -1918 if (instance) { │ │ │ │ │ -1919 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1920 srcBuffer, srcDesc, │ │ │ │ │ -1921 dstBuffer, dstDesc, │ │ │ │ │ -1922 duBuffer, duDesc, │ │ │ │ │ -1923 dvBuffer, dvDesc, │ │ │ │ │ -1924 duuBuffer, duuDesc, │ │ │ │ │ -1925 duvBuffer, duvDesc, │ │ │ │ │ -1926 dvvBuffer, dvvDesc, │ │ │ │ │ -1927 numPatchCoords, patchCoords, │ │ │ │ │ -1928 patchTable, fvarChannel); │ │ │ │ │ -1929 } else { │ │ │ │ │ -1930 // Create an instance on demand (slow) │ │ │ │ │ -1931 (void)deviceContext; // unused │ │ │ │ │ -1932 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1933 duDesc, dvDesc, │ │ │ │ │ -1934 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -1935 if (instance) { │ │ │ │ │ -1936 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1937 srcBuffer, srcDesc, │ │ │ │ │ -1938 dstBuffer, dstDesc, │ │ │ │ │ -1939 duBuffer, duDesc, │ │ │ │ │ -1940 dvBuffer, dvDesc, │ │ │ │ │ -1941 duuBuffer, duuDesc, │ │ │ │ │ -1942 duvBuffer, duvDesc, │ │ │ │ │ -1943 dvvBuffer, dvvDesc, │ │ │ │ │ -1944 numPatchCoords, patchCoords, │ │ │ │ │ -1945 patchTable, fvarChannel); │ │ │ │ │ -1946 delete instance; │ │ │ │ │ -1947 return r; │ │ │ │ │ -1948 } │ │ │ │ │ -1949 return false; │ │ │ │ │ -1950 } │ │ │ │ │ -1951 } │ │ │ │ │ -1952 │ │ │ │ │ -2009 template │ │ │ │ │ -_2_0_1_1 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2012 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2013 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2014 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2015 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2016 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2017 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2018 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2019 int numPatchCoords, │ │ │ │ │ -2020 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2021 PATCH_TABLE *patchTable, │ │ │ │ │ -2022 int fvarChannel = 0) const { │ │ │ │ │ -2023 │ │ │ │ │ -2024 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -2025 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -2026 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -2027 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -2028 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -2029 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -2030 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -2031 numPatchCoords, │ │ │ │ │ -2032 patchCoords->BindVBO(), │ │ │ │ │ -2033 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -2034 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -2035 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -2036 } │ │ │ │ │ -2037 │ │ │ │ │ -2043 │ │ │ │ │ -_2_0_4_6 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2047 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2048 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2049 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2050 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2051 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2052 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -2053 │ │ │ │ │ -_2_0_5_5 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext); │ │ │ │ │ -2056 │ │ │ │ │ -2057private: │ │ │ │ │ -2058 struct _StencilKernel { │ │ │ │ │ -2059 _StencilKernel(); │ │ │ │ │ -2060 ~_StencilKernel(); │ │ │ │ │ -2061 bool Compile(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2062 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2063 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2064 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2065 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2066 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2067 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2068 int workGroupSize); │ │ │ │ │ -2069 GLuint program; │ │ │ │ │ -2070 GLuint uniformStart; │ │ │ │ │ -2071 GLuint uniformEnd; │ │ │ │ │ -2072 GLuint uniformSrcOffset; │ │ │ │ │ -2073 GLuint uniformDstOffset; │ │ │ │ │ -2074 GLuint uniformDuDesc; │ │ │ │ │ -2075 GLuint uniformDvDesc; │ │ │ │ │ -2076 GLuint uniformDuuDesc; │ │ │ │ │ -2077 GLuint uniformDuvDesc; │ │ │ │ │ -2078 GLuint uniformDvvDesc; │ │ │ │ │ -2079 } _stencilKernel; │ │ │ │ │ -2080 │ │ │ │ │ -2081 struct _PatchKernel { │ │ │ │ │ -2082 _PatchKernel(); │ │ │ │ │ -2083 ~_PatchKernel(); │ │ │ │ │ -2084 bool Compile(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2085 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2086 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2087 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2088 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2089 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2090 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2091 int workGroupSize); │ │ │ │ │ -2092 GLuint program; │ │ │ │ │ -2093 GLuint uniformSrcOffset; │ │ │ │ │ -2094 GLuint uniformDstOffset; │ │ │ │ │ -2095 GLuint uniformPatchArray; │ │ │ │ │ -2096 GLuint uniformDuDesc; │ │ │ │ │ -2097 GLuint uniformDvDesc; │ │ │ │ │ -2098 GLuint uniformDuuDesc; │ │ │ │ │ -2099 GLuint uniformDuvDesc; │ │ │ │ │ -2100 GLuint uniformDvvDesc; │ │ │ │ │ -2101 } _patchKernel; │ │ │ │ │ -2102 │ │ │ │ │ -2103 int _workGroupSize; │ │ │ │ │ -2104 GLuint _patchArraysSSBO; │ │ │ │ │ -2105}; │ │ │ │ │ -2106 │ │ │ │ │ -2107} // end namespace Osd │ │ │ │ │ -2108 │ │ │ │ │ -2109} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -2110using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -2111 │ │ │ │ │ -2112} // end namespace OpenSubdiv │ │ │ │ │ -2113 │ │ │ │ │ -2114 │ │ │ │ │ -2115#endif // OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ +81#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchArray > PatchArrayVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ -GL stencil table (Shader Storage buffer) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetDuvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ -GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetDuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ -~GLStencilTableSSBO() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetIndicesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetOffsetsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ -GLStencilTableSSBO(Far::StencilTable const *stencilTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetDvvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetSizesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLStencilTableSSBO * Create(Far::LimitStencilTable const │ │ │ │ │ -*limitStencilTable, void *deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetDuuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ -GLuint GetDvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_1_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator │ │ │ │ │ -const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_7_3_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, STENCIL_TABLE const *stencilTable) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_4_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ -GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ -bool Instantiatable │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ -dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ -const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ -duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor │ │ │ │ │ -const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, int │ │ │ │ │ -numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, │ │ │ │ │ -GLuint patchIndexBuffer, GLuint patchParamsBuffer) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_~_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -~GLComputeEvaluator() │ │ │ │ │ -Destructor. note that the GL context must be made current. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_0_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_3_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ -dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ -const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ -duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor │ │ │ │ │ -const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, GLuint │ │ │ │ │ -sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, │ │ │ │ │ -GLuint duWeightsBuffer, GLuint dvWeightsBuffer, GLuint duuWeightsBuffer, GLuint │ │ │ │ │ -duvWeightsBuffer, GLuint dvvWeightsBuffer, int start, int end) const │ │ │ │ │ -Dispatch the GLSL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ -kernel hasn't been compil... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ -const *stencilTable, GLComputeEvaluator const *instance, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator │ │ │ │ │ -const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_3_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ -GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_5_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_4_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ -GLComputeEvaluator() │ │ │ │ │ -Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_9_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator │ │ │ │ │ -const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_9_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ -*stencilTable) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ -dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ -const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, int │ │ │ │ │ -numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, │ │ │ │ │ -GLuint patchIndexBuffer, GLuint patchParamsBuffer) const │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) │ │ │ │ │ -const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_0_1_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, void *deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ -dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ -const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ -sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, │ │ │ │ │ -GLuint duWeightsBuffer, GLuint dvWeightsBuffer, int start, int end) const │ │ │ │ │ -Dispatch the GLSL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ -kernel hasn't been compil... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_2_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(void *deviceContext) │ │ │ │ │ -Wait the dispatched kernel finishes. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ -bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ -BufferDescriptor const &duDesc=BufferDescriptor(), BufferDescriptor const │ │ │ │ │ -&dvDesc=BufferDescriptor(), BufferDescriptor const &duuDesc=BufferDescriptor(), │ │ │ │ │ -BufferDescriptor const &duvDesc=BufferDescriptor(), BufferDescriptor const │ │ │ │ │ -&dvvDesc=BufferDescriptor()) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_3_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel=0) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_6_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_8_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +Provides shader source which can be used by client code. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetPatchDrawingShaderSource() │ │ │ │ │ +Returns shader source which can be used while drawing piecewise parametric │ │ │ │ │ +patches resulting from sub... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_T_e_s_s_E_v_a_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetPatchBasisShaderSource() │ │ │ │ │ +Returns shader source which can be used to evaluate position and first and │ │ │ │ │ +second derivatives on piec... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetCommonShaderSource() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ +_G_e_t_T_e_s_s_C_o_n_t_r_o_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00851.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glMesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,49 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
glMesh.h File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
glComputeEvaluator.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/mesh.h"
│ │ │ │ -#include "../osd/glPatchTable.h"
│ │ │ │ +#include "../osd/opengl.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  GLStencilTableSSBO
 GL stencil table (Shader Storage buffer) More...
 
class  GLComputeEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

typedef MeshInterface< GLPatchTableGLMeshInterface
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,30 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -glMesh.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +glComputeEvaluator.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_g_l_P_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ +  GL stencil table (Shader Storage buffer) _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -typedef _M_e_s_h_I_n_t_e_r_f_a_c_e< _G_L_P_a_t_c_h_T_a_b_l_e >  _G_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_M_e_s_h_._h │ │ │ │ │ + * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00851 = [ │ │ │ │ │ - ["GLMeshInterface", "a00851.html#a7f9cf2b729178bdbb847fc4afd91af9e", null] │ │ │ │ │ + ["GLStencilTableSSBO", "a01217.html", "a01217"], │ │ │ │ │ + ["GLComputeEvaluator", "a01221.html", "a01221"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glMesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glMesh.h
│ │ │ │ +
glComputeEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,45 +119,1132 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../osd/mesh.h"
│ │ │ │ -
31#include "../osd/glPatchTable.h"
│ │ │ │ -
32
│ │ │ │ -
33namespace OpenSubdiv {
│ │ │ │ -
34namespace OPENSUBDIV_VERSION {
│ │ │ │ -
35
│ │ │ │ -
36namespace Osd {
│ │ │ │ -
37
│ │ │ │ - │ │ │ │ -
39
│ │ │ │ -
40
│ │ │ │ -
41} // end namespace Osd
│ │ │ │ +
30#include "../osd/opengl.h"
│ │ │ │ +
31#include "../osd/types.h"
│ │ │ │ +
32#include "../osd/bufferDescriptor.h"
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Far {
│ │ │ │ +
38 class PatchTable;
│ │ │ │ +
39 class StencilTable;
│ │ │ │ +
40 class LimitStencilTable;
│ │ │ │ +
41}
│ │ │ │
42
│ │ │ │ -
43} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
44using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
45
│ │ │ │ -
46} // end namespace OpenSubdiv
│ │ │ │ -
47
│ │ │ │ -
48#endif // OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ - │ │ │ │ -
MeshInterface< GLPatchTable > GLMeshInterface
Definition glMesh.h:38
│ │ │ │ - │ │ │ │ +
43namespace Osd {
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
52public:
│ │ │ │ +
│ │ │ │ +
53 static GLStencilTableSSBO *Create(Far::StencilTable const *stencilTable,
│ │ │ │ +
54 void *deviceContext = NULL) {
│ │ │ │ +
55 (void)deviceContext; // unused
│ │ │ │ +
56 return new GLStencilTableSSBO(stencilTable);
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 Far::LimitStencilTable const *limitStencilTable,
│ │ │ │ +
60 void *deviceContext = NULL) {
│ │ │ │ +
61 (void)deviceContext; // unused
│ │ │ │ +
62 return new GLStencilTableSSBO(limitStencilTable);
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
65 explicit GLStencilTableSSBO(Far::StencilTable const *stencilTable);
│ │ │ │ +
66 explicit GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable);
│ │ │ │ + │ │ │ │ +
68
│ │ │ │ +
69 // interfaces needed for GLSLComputeKernel
│ │ │ │ +
70 GLuint GetSizesBuffer() const { return _sizes; }
│ │ │ │ +
71 GLuint GetOffsetsBuffer() const { return _offsets; }
│ │ │ │ +
72 GLuint GetIndicesBuffer() const { return _indices; }
│ │ │ │ +
73 GLuint GetWeightsBuffer() const { return _weights; }
│ │ │ │ +
74 GLuint GetDuWeightsBuffer() const { return _duWeights; }
│ │ │ │ +
75 GLuint GetDvWeightsBuffer() const { return _dvWeights; }
│ │ │ │ +
76 GLuint GetDuuWeightsBuffer() const { return _duuWeights; }
│ │ │ │ +
77 GLuint GetDuvWeightsBuffer() const { return _duvWeights; }
│ │ │ │ +
78 GLuint GetDvvWeightsBuffer() const { return _dvvWeights; }
│ │ │ │ +
79 int GetNumStencils() const { return _numStencils; }
│ │ │ │ +
80
│ │ │ │ +
81private:
│ │ │ │ +
82 GLuint _sizes;
│ │ │ │ +
83 GLuint _offsets;
│ │ │ │ +
84 GLuint _indices;
│ │ │ │ +
85 GLuint _weights;
│ │ │ │ +
86 GLuint _duWeights;
│ │ │ │ +
87 GLuint _dvWeights;
│ │ │ │ +
88 GLuint _duuWeights;
│ │ │ │ +
89 GLuint _duvWeights;
│ │ │ │ +
90 GLuint _dvvWeights;
│ │ │ │ +
91 int _numStencils;
│ │ │ │ +
92};
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
94// ---------------------------------------------------------------------------
│ │ │ │ +
95
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
97public:
│ │ │ │ +
98 typedef bool Instantiatable;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
100 BufferDescriptor const &dstDesc,
│ │ │ │ +
101 BufferDescriptor const &duDesc,
│ │ │ │ +
102 BufferDescriptor const &dvDesc,
│ │ │ │ +
103 void * deviceContext = NULL) {
│ │ │ │ +
104 return Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
108 deviceContext);
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
112 BufferDescriptor const &dstDesc,
│ │ │ │ +
113 BufferDescriptor const &duDesc,
│ │ │ │ +
114 BufferDescriptor const &dvDesc,
│ │ │ │ +
115 BufferDescriptor const &duuDesc,
│ │ │ │ +
116 BufferDescriptor const &duvDesc,
│ │ │ │ +
117 BufferDescriptor const &dvvDesc,
│ │ │ │ +
118 void * deviceContext = NULL) {
│ │ │ │ +
119 (void)deviceContext; // not used
│ │ │ │ +
120 GLComputeEvaluator *instance = new GLComputeEvaluator();
│ │ │ │ +
121 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ +
122 duuDesc, duvDesc, dvvDesc))
│ │ │ │ +
123 return instance;
│ │ │ │ +
124 delete instance;
│ │ │ │ +
125 return NULL;
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ + │ │ │ │ +
130
│ │ │ │ + │ │ │ │ +
133
│ │ │ │ +
139
│ │ │ │ +
167 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
168 static bool EvalStencils(
│ │ │ │ +
169 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
170 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
171 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
172 GLComputeEvaluator const *instance,
│ │ │ │ +
173 void * deviceContext = NULL) {
│ │ │ │ +
174
│ │ │ │ +
175 if (instance) {
│ │ │ │ +
176 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
177 dstBuffer, dstDesc,
│ │ │ │ +
178 stencilTable);
│ │ │ │ +
179 } else {
│ │ │ │ +
180 // Create an instance on demand (slow)
│ │ │ │ +
181 (void)deviceContext; // unused
│ │ │ │ +
182 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
185 if (instance) {
│ │ │ │ +
186 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
187 dstBuffer, dstDesc,
│ │ │ │ +
188 stencilTable);
│ │ │ │ +
189 delete instance;
│ │ │ │ +
190 return r;
│ │ │ │ +
191 }
│ │ │ │ +
192 return false;
│ │ │ │ +
193 }
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
235 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
236 static bool EvalStencils(
│ │ │ │ +
237 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
238 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
239 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
240 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
241 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
242 GLComputeEvaluator const *instance,
│ │ │ │ +
243 void * deviceContext = NULL) {
│ │ │ │ +
244
│ │ │ │ +
245 if (instance) {
│ │ │ │ +
246 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
247 dstBuffer, dstDesc,
│ │ │ │ +
248 duBuffer, duDesc,
│ │ │ │ +
249 dvBuffer, dvDesc,
│ │ │ │ +
250 stencilTable);
│ │ │ │ +
251 } else {
│ │ │ │ +
252 // Create an instance on demand (slow)
│ │ │ │ +
253 (void)deviceContext; // unused
│ │ │ │ +
254 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
│ │ │ │ +
255 if (instance) {
│ │ │ │ +
256 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
257 dstBuffer, dstDesc,
│ │ │ │ +
258 duBuffer, duDesc,
│ │ │ │ +
259 dvBuffer, dvDesc,
│ │ │ │ +
260 stencilTable);
│ │ │ │ +
261 delete instance;
│ │ │ │ +
262 return r;
│ │ │ │ +
263 }
│ │ │ │ +
264 return false;
│ │ │ │ +
265 }
│ │ │ │ +
266 }
│ │ │ │ +
│ │ │ │ +
267
│ │ │ │ +
325 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
326 static bool EvalStencils(
│ │ │ │ +
327 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
328 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
329 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
330 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
331 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
332 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
333 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
334 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
335 GLComputeEvaluator const *instance,
│ │ │ │ +
336 void * deviceContext = NULL) {
│ │ │ │ +
337
│ │ │ │ +
338 if (instance) {
│ │ │ │ +
339 return instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
340 dstBuffer, dstDesc,
│ │ │ │ +
341 duBuffer, duDesc,
│ │ │ │ +
342 dvBuffer, dvDesc,
│ │ │ │ +
343 duuBuffer, duuDesc,
│ │ │ │ +
344 duvBuffer, duvDesc,
│ │ │ │ +
345 dvvBuffer, dvvDesc,
│ │ │ │ +
346 stencilTable);
│ │ │ │ +
347 } else {
│ │ │ │ +
348 // Create an instance on demand (slow)
│ │ │ │ +
349 (void)deviceContext; // unused
│ │ │ │ +
350 instance = Create(srcDesc, dstDesc, duDesc, dvDesc,
│ │ │ │ +
351 duuDesc, duvDesc, dvvDesc);
│ │ │ │ +
352 if (instance) {
│ │ │ │ +
353 bool r = instance->EvalStencils(srcBuffer, srcDesc,
│ │ │ │ +
354 dstBuffer, dstDesc,
│ │ │ │ +
355 duBuffer, duDesc,
│ │ │ │ +
356 dvBuffer, dvDesc,
│ │ │ │ +
357 duuBuffer, duuDesc,
│ │ │ │ +
358 duvBuffer, duvDesc,
│ │ │ │ +
359 dvvBuffer, dvvDesc,
│ │ │ │ +
360 stencilTable);
│ │ │ │ +
361 delete instance;
│ │ │ │ +
362 return r;
│ │ │ │ +
363 }
│ │ │ │ +
364 return false;
│ │ │ │ +
365 }
│ │ │ │ +
366 }
│ │ │ │ +
│ │ │ │ +
367
│ │ │ │ +
385 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
387 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
388 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
389 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ +
390 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
391 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
392 0, BufferDescriptor(),
│ │ │ │ +
393 0, BufferDescriptor(),
│ │ │ │ +
394 stencilTable->GetSizesBuffer(),
│ │ │ │ +
395 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
396 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
397 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
398 0,
│ │ │ │ +
399 0,
│ │ │ │ +
400 /* start = */ 0,
│ │ │ │ +
401 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ +
402 }
│ │ │ │ +
│ │ │ │ +
403
│ │ │ │ +
433 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
435 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
436 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
437 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
438 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
439 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ +
440 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
441 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
442 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
443 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
444 stencilTable->GetSizesBuffer(),
│ │ │ │ +
445 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
446 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
447 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
448 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
449 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
450 /* start = */ 0,
│ │ │ │ +
451 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ +
452 }
│ │ │ │ +
│ │ │ │ +
453
│ │ │ │ +
501 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
503 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
504 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
505 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
506 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
507 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
508 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
509 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
510 STENCIL_TABLE const *stencilTable) const {
│ │ │ │ +
511 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
512 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
513 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
514 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
515 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ +
516 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ +
517 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ +
518 stencilTable->GetSizesBuffer(),
│ │ │ │ +
519 stencilTable->GetOffsetsBuffer(),
│ │ │ │ +
520 stencilTable->GetIndicesBuffer(),
│ │ │ │ +
521 stencilTable->GetWeightsBuffer(),
│ │ │ │ +
522 stencilTable->GetDuWeightsBuffer(),
│ │ │ │ +
523 stencilTable->GetDvWeightsBuffer(),
│ │ │ │ +
524 stencilTable->GetDuuWeightsBuffer(),
│ │ │ │ +
525 stencilTable->GetDuvWeightsBuffer(),
│ │ │ │ +
526 stencilTable->GetDvvWeightsBuffer(),
│ │ │ │ +
527 /* start = */ 0,
│ │ │ │ +
528 /* end = */ stencilTable->GetNumStencils());
│ │ │ │ +
529 }
│ │ │ │ +
│ │ │ │ +
530
│ │ │ │ +
566 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
567 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
568 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
569 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
570 GLuint sizesBuffer,
│ │ │ │ +
571 GLuint offsetsBuffer,
│ │ │ │ +
572 GLuint indicesBuffer,
│ │ │ │ +
573 GLuint weightsBuffer,
│ │ │ │ +
574 GLuint duWeightsBuffer,
│ │ │ │ +
575 GLuint dvWeightsBuffer,
│ │ │ │ +
576 int start,
│ │ │ │ +
577 int end) const;
│ │ │ │ +
578
│ │ │ │ +
632 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
633 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
634 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
635 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
636 GLuint duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
637 GLuint duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
638 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
639 GLuint sizesBuffer,
│ │ │ │ +
640 GLuint offsetsBuffer,
│ │ │ │ +
641 GLuint indicesBuffer,
│ │ │ │ +
642 GLuint weightsBuffer,
│ │ │ │ +
643 GLuint duWeightsBuffer,
│ │ │ │ +
644 GLuint dvWeightsBuffer,
│ │ │ │ +
645 GLuint duuWeightsBuffer,
│ │ │ │ +
646 GLuint duvWeightsBuffer,
│ │ │ │ +
647 GLuint dvvWeightsBuffer,
│ │ │ │ +
648 int start,
│ │ │ │ +
649 int end) const;
│ │ │ │ +
650
│ │ │ │ +
656
│ │ │ │ +
689 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
690 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
691 static bool EvalPatches(
│ │ │ │ +
692 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
693 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
694 int numPatchCoords,
│ │ │ │ +
695 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
696 PATCH_TABLE *patchTable,
│ │ │ │ +
697 GLComputeEvaluator const *instance,
│ │ │ │ +
698 void * deviceContext = NULL) {
│ │ │ │ +
699
│ │ │ │ +
700 if (instance) {
│ │ │ │ +
701 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
702 dstBuffer, dstDesc,
│ │ │ │ +
703 numPatchCoords, patchCoords,
│ │ │ │ +
704 patchTable);
│ │ │ │ +
705 } else {
│ │ │ │ +
706 // Create an instance on demand (slow)
│ │ │ │ +
707 (void)deviceContext; // unused
│ │ │ │ +
708 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
711 if (instance) {
│ │ │ │ +
712 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
713 dstBuffer, dstDesc,
│ │ │ │ +
714 numPatchCoords, patchCoords,
│ │ │ │ +
715 patchTable);
│ │ │ │ +
716 delete instance;
│ │ │ │ +
717 return r;
│ │ │ │ +
718 }
│ │ │ │ +
719 return false;
│ │ │ │ +
720 }
│ │ │ │ +
721 }
│ │ │ │ +
│ │ │ │ +
722
│ │ │ │ +
767 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
768 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
769 static bool EvalPatches(
│ │ │ │ +
770 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
771 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
772 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
773 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
774 int numPatchCoords,
│ │ │ │ +
775 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
776 PATCH_TABLE *patchTable,
│ │ │ │ +
777 GLComputeEvaluator const *instance,
│ │ │ │ +
778 void * deviceContext = NULL) {
│ │ │ │ +
779
│ │ │ │ +
780 if (instance) {
│ │ │ │ +
781 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
782 dstBuffer, dstDesc,
│ │ │ │ +
783 duBuffer, duDesc,
│ │ │ │ +
784 dvBuffer, dvDesc,
│ │ │ │ +
785 numPatchCoords, patchCoords,
│ │ │ │ +
786 patchTable);
│ │ │ │ +
787 } else {
│ │ │ │ +
788 // Create an instance on demand (slow)
│ │ │ │ +
789 (void)deviceContext; // unused
│ │ │ │ +
790 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
791 duDesc, dvDesc);
│ │ │ │ +
792 if (instance) {
│ │ │ │ +
793 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
794 dstBuffer, dstDesc,
│ │ │ │ +
795 duBuffer, duDesc,
│ │ │ │ +
796 dvBuffer, dvDesc,
│ │ │ │ +
797 numPatchCoords, patchCoords,
│ │ │ │ +
798 patchTable);
│ │ │ │ +
799 delete instance;
│ │ │ │ +
800 return r;
│ │ │ │ +
801 }
│ │ │ │ +
802 return false;
│ │ │ │ +
803 }
│ │ │ │ +
804 }
│ │ │ │ +
│ │ │ │ +
805
│ │ │ │ +
868 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
869 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
870 static bool EvalPatches(
│ │ │ │ +
871 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
872 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
873 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
874 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
875 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
876 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
877 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
878 int numPatchCoords,
│ │ │ │ +
879 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
880 PATCH_TABLE *patchTable,
│ │ │ │ +
881 GLComputeEvaluator const *instance,
│ │ │ │ +
882 void * deviceContext = NULL) {
│ │ │ │ +
883
│ │ │ │ +
884 if (instance) {
│ │ │ │ +
885 return instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
886 dstBuffer, dstDesc,
│ │ │ │ +
887 duBuffer, duDesc,
│ │ │ │ +
888 dvBuffer, dvDesc,
│ │ │ │ +
889 duuBuffer, duuDesc,
│ │ │ │ +
890 duvBuffer, duvDesc,
│ │ │ │ +
891 dvvBuffer, dvvDesc,
│ │ │ │ +
892 numPatchCoords, patchCoords,
│ │ │ │ +
893 patchTable);
│ │ │ │ +
894 } else {
│ │ │ │ +
895 // Create an instance on demand (slow)
│ │ │ │ +
896 (void)deviceContext; // unused
│ │ │ │ +
897 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
898 duDesc, dvDesc,
│ │ │ │ +
899 duuDesc, duvDesc, dvvDesc);
│ │ │ │ +
900 if (instance) {
│ │ │ │ +
901 bool r = instance->EvalPatches(srcBuffer, srcDesc,
│ │ │ │ +
902 dstBuffer, dstDesc,
│ │ │ │ +
903 duBuffer, duDesc,
│ │ │ │ +
904 dvBuffer, dvDesc,
│ │ │ │ +
905 duuBuffer, duuDesc,
│ │ │ │ +
906 duvBuffer, duvDesc,
│ │ │ │ +
907 dvvBuffer, dvvDesc,
│ │ │ │ +
908 numPatchCoords, patchCoords,
│ │ │ │ +
909 patchTable);
│ │ │ │ +
910 delete instance;
│ │ │ │ +
911 return r;
│ │ │ │ +
912 }
│ │ │ │ +
913 return false;
│ │ │ │ +
914 }
│ │ │ │ +
915 }
│ │ │ │ +
│ │ │ │ +
916
│ │ │ │ +
941 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
942 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
944 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
945 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
946 int numPatchCoords,
│ │ │ │ +
947 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
948 PATCH_TABLE *patchTable) const {
│ │ │ │ +
949
│ │ │ │ +
950 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
951 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
952 0, BufferDescriptor(),
│ │ │ │ +
953 0, BufferDescriptor(),
│ │ │ │ +
954 numPatchCoords,
│ │ │ │ +
955 patchCoords->BindVBO(),
│ │ │ │ +
956 patchTable->GetPatchArrays(),
│ │ │ │ +
957 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
958 patchTable->GetPatchParamBuffer());
│ │ │ │ +
959 }
│ │ │ │ +
│ │ │ │ +
960
│ │ │ │ +
995 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
996 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
998 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
999 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1000 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1001 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1002 int numPatchCoords,
│ │ │ │ +
1003 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1004 PATCH_TABLE *patchTable) const {
│ │ │ │ +
1005
│ │ │ │ +
1006 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1007 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1008 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
1009 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
1010 numPatchCoords,
│ │ │ │ +
1011 patchCoords->BindVBO(),
│ │ │ │ +
1012 patchTable->GetPatchArrays(),
│ │ │ │ +
1013 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
1014 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1015 }
│ │ │ │ +
│ │ │ │ +
1016
│ │ │ │ +
1069 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1070 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1072 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1073 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1074 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1075 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1076 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1077 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1078 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1079 int numPatchCoords,
│ │ │ │ +
1080 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1081 PATCH_TABLE *patchTable) const {
│ │ │ │ +
1082
│ │ │ │ +
1083 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1084 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1085 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
1086 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
1087 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ +
1088 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ +
1089 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ +
1090 numPatchCoords,
│ │ │ │ +
1091 patchCoords->BindVBO(),
│ │ │ │ +
1092 patchTable->GetPatchArrays(),
│ │ │ │ +
1093 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
1094 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1095 }
│ │ │ │ +
│ │ │ │ +
1096
│ │ │ │ +
1097 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1098 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1099 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1100 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1101 int numPatchCoords,
│ │ │ │ +
1102 GLuint patchCoordsBuffer,
│ │ │ │ +
1103 const PatchArrayVector &patchArrays,
│ │ │ │ +
1104 GLuint patchIndexBuffer,
│ │ │ │ +
1105 GLuint patchParamsBuffer) const;
│ │ │ │ +
1106
│ │ │ │ +
1107 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1108 GLuint dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1109 GLuint duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1110 GLuint dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1111 GLuint duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1112 GLuint duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1113 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1114 int numPatchCoords,
│ │ │ │ +
1115 GLuint patchCoordsBuffer,
│ │ │ │ +
1116 const PatchArrayVector &patchArrays,
│ │ │ │ +
1117 GLuint patchIndexBuffer,
│ │ │ │ +
1118 GLuint patchParamsBuffer) const;
│ │ │ │ +
1119
│ │ │ │ +
1152 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1153 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1155 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1156 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1157 int numPatchCoords,
│ │ │ │ +
1158 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1159 PATCH_TABLE *patchTable,
│ │ │ │ +
1160 GLComputeEvaluator const *instance,
│ │ │ │ +
1161 void * deviceContext = NULL) {
│ │ │ │ +
1162
│ │ │ │ +
1163 if (instance) {
│ │ │ │ +
1164 return instance->EvalPatchesVarying(
│ │ │ │ +
1165 srcBuffer, srcDesc,
│ │ │ │ +
1166 dstBuffer, dstDesc,
│ │ │ │ +
1167 numPatchCoords, patchCoords,
│ │ │ │ +
1168 patchTable);
│ │ │ │ +
1169 } else {
│ │ │ │ +
1170 // Create an instance on demand (slow)
│ │ │ │ +
1171 (void)deviceContext; // unused
│ │ │ │ +
1172 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
1175 if (instance) {
│ │ │ │ +
1176 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1177 srcBuffer, srcDesc,
│ │ │ │ +
1178 dstBuffer, dstDesc,
│ │ │ │ +
1179 numPatchCoords, patchCoords,
│ │ │ │ +
1180 patchTable);
│ │ │ │ +
1181 delete instance;
│ │ │ │ +
1182 return r;
│ │ │ │ +
1183 }
│ │ │ │ +
1184 return false;
│ │ │ │ +
1185 }
│ │ │ │ +
1186 }
│ │ │ │ +
│ │ │ │ +
1187
│ │ │ │ +
1212 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1213 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1215 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1216 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1217 int numPatchCoords,
│ │ │ │ +
1218 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1219 PATCH_TABLE *patchTable) const {
│ │ │ │ +
1220
│ │ │ │ +
1221 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1222 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1223 0, BufferDescriptor(),
│ │ │ │ +
1224 0, BufferDescriptor(),
│ │ │ │ +
1225 numPatchCoords,
│ │ │ │ +
1226 patchCoords->BindVBO(),
│ │ │ │ +
1227 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1228 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1229 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1230 }
│ │ │ │ +
│ │ │ │ +
1231
│ │ │ │ +
1276 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1277 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1279 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1280 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1281 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1282 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1283 int numPatchCoords,
│ │ │ │ +
1284 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1285 PATCH_TABLE *patchTable,
│ │ │ │ +
1286 GLComputeEvaluator const *instance,
│ │ │ │ +
1287 void * deviceContext = NULL) {
│ │ │ │ +
1288
│ │ │ │ +
1289 if (instance) {
│ │ │ │ +
1290 return instance->EvalPatchesVarying(
│ │ │ │ +
1291 srcBuffer, srcDesc,
│ │ │ │ +
1292 dstBuffer, dstDesc,
│ │ │ │ +
1293 duBuffer, duDesc,
│ │ │ │ +
1294 dvBuffer, dvDesc,
│ │ │ │ +
1295 numPatchCoords, patchCoords,
│ │ │ │ +
1296 patchTable);
│ │ │ │ +
1297 } else {
│ │ │ │ +
1298 // Create an instance on demand (slow)
│ │ │ │ +
1299 (void)deviceContext; // unused
│ │ │ │ +
1300 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1301 duDesc, dvDesc);
│ │ │ │ +
1302 if (instance) {
│ │ │ │ +
1303 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1304 srcBuffer, srcDesc,
│ │ │ │ +
1305 dstBuffer, dstDesc,
│ │ │ │ +
1306 duBuffer, duDesc,
│ │ │ │ +
1307 dvBuffer, dvDesc,
│ │ │ │ +
1308 numPatchCoords, patchCoords,
│ │ │ │ +
1309 patchTable);
│ │ │ │ +
1310 delete instance;
│ │ │ │ +
1311 return r;
│ │ │ │ +
1312 }
│ │ │ │ +
1313 return false;
│ │ │ │ +
1314 }
│ │ │ │ +
1315 }
│ │ │ │ +
│ │ │ │ +
1316
│ │ │ │ +
1353 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1354 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1356 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1357 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1358 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1359 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1360 int numPatchCoords,
│ │ │ │ +
1361 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1362 PATCH_TABLE *patchTable) const {
│ │ │ │ +
1363
│ │ │ │ +
1364 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1365 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1366 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
1367 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
1368 numPatchCoords,
│ │ │ │ +
1369 patchCoords->BindVBO(),
│ │ │ │ +
1370 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1371 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1372 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1373 }
│ │ │ │ +
│ │ │ │ +
1374
│ │ │ │ +
1437 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1438 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1440 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1441 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1442 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1443 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1444 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1445 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1446 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1447 int numPatchCoords,
│ │ │ │ +
1448 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1449 PATCH_TABLE *patchTable,
│ │ │ │ +
1450 GLComputeEvaluator const *instance,
│ │ │ │ +
1451 void * deviceContext = NULL) {
│ │ │ │ +
1452
│ │ │ │ +
1453 if (instance) {
│ │ │ │ +
1454 return instance->EvalPatchesVarying(
│ │ │ │ +
1455 srcBuffer, srcDesc,
│ │ │ │ +
1456 dstBuffer, dstDesc,
│ │ │ │ +
1457 duBuffer, duDesc,
│ │ │ │ +
1458 dvBuffer, dvDesc,
│ │ │ │ +
1459 duuBuffer, duuDesc,
│ │ │ │ +
1460 duvBuffer, duvDesc,
│ │ │ │ +
1461 dvvBuffer, dvvDesc,
│ │ │ │ +
1462 numPatchCoords, patchCoords,
│ │ │ │ +
1463 patchTable);
│ │ │ │ +
1464 } else {
│ │ │ │ +
1465 // Create an instance on demand (slow)
│ │ │ │ +
1466 (void)deviceContext; // unused
│ │ │ │ +
1467 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1468 duDesc, dvDesc,
│ │ │ │ +
1469 duuDesc, duvDesc, dvvDesc);
│ │ │ │ +
1470 if (instance) {
│ │ │ │ +
1471 bool r = instance->EvalPatchesVarying(
│ │ │ │ +
1472 srcBuffer, srcDesc,
│ │ │ │ +
1473 dstBuffer, dstDesc,
│ │ │ │ +
1474 duBuffer, duDesc,
│ │ │ │ +
1475 dvBuffer, dvDesc,
│ │ │ │ +
1476 duuBuffer, duuDesc,
│ │ │ │ +
1477 duvBuffer, duvDesc,
│ │ │ │ +
1478 dvvBuffer, dvvDesc,
│ │ │ │ +
1479 numPatchCoords, patchCoords,
│ │ │ │ +
1480 patchTable);
│ │ │ │ +
1481 delete instance;
│ │ │ │ +
1482 return r;
│ │ │ │ +
1483 }
│ │ │ │ +
1484 return false;
│ │ │ │ +
1485 }
│ │ │ │ +
1486 }
│ │ │ │ +
│ │ │ │ +
1487
│ │ │ │ +
1542 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1543 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1545 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1546 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1547 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1548 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1549 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1550 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1551 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1552 int numPatchCoords,
│ │ │ │ +
1553 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1554 PATCH_TABLE *patchTable) const {
│ │ │ │ +
1555
│ │ │ │ +
1556 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1557 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1558 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
1559 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
1560 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ +
1561 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ +
1562 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ +
1563 numPatchCoords,
│ │ │ │ +
1564 patchCoords->BindVBO(),
│ │ │ │ +
1565 patchTable->GetVaryingPatchArrays(),
│ │ │ │ +
1566 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
1567 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1568 }
│ │ │ │ +
│ │ │ │ +
1569
│ │ │ │ +
1604 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1605 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1607 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1608 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1609 int numPatchCoords,
│ │ │ │ +
1610 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1611 PATCH_TABLE *patchTable,
│ │ │ │ +
1612 int fvarChannel,
│ │ │ │ +
1613 GLComputeEvaluator const *instance,
│ │ │ │ +
1614 void * deviceContext = NULL) {
│ │ │ │ +
1615
│ │ │ │ +
1616 if (instance) {
│ │ │ │ +
1617 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
1618 srcBuffer, srcDesc,
│ │ │ │ +
1619 dstBuffer, dstDesc,
│ │ │ │ +
1620 numPatchCoords, patchCoords,
│ │ │ │ +
1621 patchTable, fvarChannel);
│ │ │ │ +
1622 } else {
│ │ │ │ +
1623 // Create an instance on demand (slow)
│ │ │ │ +
1624 (void)deviceContext; // unused
│ │ │ │ +
1625 instance = Create(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
1628 if (instance) {
│ │ │ │ +
1629 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
1630 srcBuffer, srcDesc,
│ │ │ │ +
1631 dstBuffer, dstDesc,
│ │ │ │ +
1632 numPatchCoords, patchCoords,
│ │ │ │ +
1633 patchTable, fvarChannel);
│ │ │ │ +
1634 delete instance;
│ │ │ │ +
1635 return r;
│ │ │ │ +
1636 }
│ │ │ │ +
1637 return false;
│ │ │ │ +
1638 }
│ │ │ │ +
1639 }
│ │ │ │ +
│ │ │ │ +
1640
│ │ │ │ +
1667 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1668 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1670 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1671 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1672 int numPatchCoords,
│ │ │ │ +
1673 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1674 PATCH_TABLE *patchTable,
│ │ │ │ +
1675 int fvarChannel = 0) const {
│ │ │ │ +
1676
│ │ │ │ +
1677 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1678 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1679 0, BufferDescriptor(),
│ │ │ │ +
1680 0, BufferDescriptor(),
│ │ │ │ +
1681 numPatchCoords,
│ │ │ │ +
1682 patchCoords->BindVBO(),
│ │ │ │ +
1683 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
1684 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1685 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1686 }
│ │ │ │ +
│ │ │ │ +
1687
│ │ │ │ +
1734 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1735 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1737 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1738 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1739 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1740 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1741 int numPatchCoords,
│ │ │ │ +
1742 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1743 PATCH_TABLE *patchTable,
│ │ │ │ +
1744 int fvarChannel,
│ │ │ │ +
1745 GLComputeEvaluator const *instance,
│ │ │ │ +
1746 void * deviceContext = NULL) {
│ │ │ │ +
1747
│ │ │ │ +
1748 if (instance) {
│ │ │ │ +
1749 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
1750 srcBuffer, srcDesc,
│ │ │ │ +
1751 dstBuffer, dstDesc,
│ │ │ │ +
1752 duBuffer, duDesc,
│ │ │ │ +
1753 dvBuffer, dvDesc,
│ │ │ │ +
1754 numPatchCoords, patchCoords,
│ │ │ │ +
1755 patchTable, fvarChannel);
│ │ │ │ +
1756 } else {
│ │ │ │ +
1757 // Create an instance on demand (slow)
│ │ │ │ +
1758 (void)deviceContext; // unused
│ │ │ │ +
1759 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1760 duDesc, dvDesc);
│ │ │ │ +
1761 if (instance) {
│ │ │ │ +
1762 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
1763 srcBuffer, srcDesc,
│ │ │ │ +
1764 dstBuffer, dstDesc,
│ │ │ │ +
1765 duBuffer, duDesc,
│ │ │ │ +
1766 dvBuffer, dvDesc,
│ │ │ │ +
1767 numPatchCoords, patchCoords,
│ │ │ │ +
1768 patchTable, fvarChannel);
│ │ │ │ +
1769 delete instance;
│ │ │ │ +
1770 return r;
│ │ │ │ +
1771 }
│ │ │ │ +
1772 return false;
│ │ │ │ +
1773 }
│ │ │ │ +
1774 }
│ │ │ │ +
│ │ │ │ +
1775
│ │ │ │ +
1814 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1815 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1817 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1818 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1819 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1820 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1821 int numPatchCoords,
│ │ │ │ +
1822 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1823 PATCH_TABLE *patchTable,
│ │ │ │ +
1824 int fvarChannel = 0) const {
│ │ │ │ +
1825
│ │ │ │ +
1826 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
1827 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
1828 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
1829 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
1830 numPatchCoords,
│ │ │ │ +
1831 patchCoords->BindVBO(),
│ │ │ │ +
1832 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
1833 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1834 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1835 }
│ │ │ │ +
│ │ │ │ +
1836
│ │ │ │ +
1901 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1902 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1904 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1905 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1906 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1907 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1908 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1909 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1910 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1911 int numPatchCoords,
│ │ │ │ +
1912 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1913 PATCH_TABLE *patchTable,
│ │ │ │ +
1914 int fvarChannel,
│ │ │ │ +
1915 GLComputeEvaluator const *instance,
│ │ │ │ +
1916 void * deviceContext = NULL) {
│ │ │ │ +
1917
│ │ │ │ +
1918 if (instance) {
│ │ │ │ +
1919 return instance->EvalPatchesFaceVarying(
│ │ │ │ +
1920 srcBuffer, srcDesc,
│ │ │ │ +
1921 dstBuffer, dstDesc,
│ │ │ │ +
1922 duBuffer, duDesc,
│ │ │ │ +
1923 dvBuffer, dvDesc,
│ │ │ │ +
1924 duuBuffer, duuDesc,
│ │ │ │ +
1925 duvBuffer, duvDesc,
│ │ │ │ +
1926 dvvBuffer, dvvDesc,
│ │ │ │ +
1927 numPatchCoords, patchCoords,
│ │ │ │ +
1928 patchTable, fvarChannel);
│ │ │ │ +
1929 } else {
│ │ │ │ +
1930 // Create an instance on demand (slow)
│ │ │ │ +
1931 (void)deviceContext; // unused
│ │ │ │ +
1932 instance = Create(srcDesc, dstDesc,
│ │ │ │ +
1933 duDesc, dvDesc,
│ │ │ │ +
1934 duuDesc, duvDesc, dvvDesc);
│ │ │ │ +
1935 if (instance) {
│ │ │ │ +
1936 bool r = instance->EvalPatchesFaceVarying(
│ │ │ │ +
1937 srcBuffer, srcDesc,
│ │ │ │ +
1938 dstBuffer, dstDesc,
│ │ │ │ +
1939 duBuffer, duDesc,
│ │ │ │ +
1940 dvBuffer, dvDesc,
│ │ │ │ +
1941 duuBuffer, duuDesc,
│ │ │ │ +
1942 duvBuffer, duvDesc,
│ │ │ │ +
1943 dvvBuffer, dvvDesc,
│ │ │ │ +
1944 numPatchCoords, patchCoords,
│ │ │ │ +
1945 patchTable, fvarChannel);
│ │ │ │ +
1946 delete instance;
│ │ │ │ +
1947 return r;
│ │ │ │ +
1948 }
│ │ │ │ +
1949 return false;
│ │ │ │ +
1950 }
│ │ │ │ +
1951 }
│ │ │ │ +
│ │ │ │ +
1952
│ │ │ │ +
2009 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
2010 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
2012 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
2013 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
2014 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
2015 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
2016 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
2017 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
2018 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
2019 int numPatchCoords,
│ │ │ │ +
2020 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
2021 PATCH_TABLE *patchTable,
│ │ │ │ +
2022 int fvarChannel = 0) const {
│ │ │ │ +
2023
│ │ │ │ +
2024 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
│ │ │ │ +
2025 dstBuffer->BindVBO(), dstDesc,
│ │ │ │ +
2026 duBuffer->BindVBO(), duDesc,
│ │ │ │ +
2027 dvBuffer->BindVBO(), dvDesc,
│ │ │ │ +
2028 duuBuffer->BindVBO(), duuDesc,
│ │ │ │ +
2029 duvBuffer->BindVBO(), duvDesc,
│ │ │ │ +
2030 dvvBuffer->BindVBO(), dvvDesc,
│ │ │ │ +
2031 numPatchCoords,
│ │ │ │ +
2032 patchCoords->BindVBO(),
│ │ │ │ +
2033 patchTable->GetFVarPatchArrays(fvarChannel),
│ │ │ │ +
2034 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
2035 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
2036 }
│ │ │ │ +
│ │ │ │ +
2037
│ │ │ │ +
2043
│ │ │ │ +
2046 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ +
2047 BufferDescriptor const &dstDesc,
│ │ │ │ +
2048 BufferDescriptor const &duDesc = BufferDescriptor(),
│ │ │ │ +
2049 BufferDescriptor const &dvDesc = BufferDescriptor(),
│ │ │ │ +
2050 BufferDescriptor const &duuDesc = BufferDescriptor(),
│ │ │ │ +
2051 BufferDescriptor const &duvDesc = BufferDescriptor(),
│ │ │ │ +
2052 BufferDescriptor const &dvvDesc = BufferDescriptor());
│ │ │ │ +
2053
│ │ │ │ +
2055 static void Synchronize(void *deviceContext);
│ │ │ │ +
2056
│ │ │ │ +
2057private:
│ │ │ │ +
2058 struct _StencilKernel {
│ │ │ │ +
2059 _StencilKernel();
│ │ │ │ +
2060 ~_StencilKernel();
│ │ │ │ +
2061 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ +
2062 BufferDescriptor const &dstDesc,
│ │ │ │ +
2063 BufferDescriptor const &duDesc,
│ │ │ │ +
2064 BufferDescriptor const &dvDesc,
│ │ │ │ +
2065 BufferDescriptor const &duuDesc,
│ │ │ │ +
2066 BufferDescriptor const &duvDesc,
│ │ │ │ +
2067 BufferDescriptor const &dvvDesc,
│ │ │ │ +
2068 int workGroupSize);
│ │ │ │ +
2069 GLuint program;
│ │ │ │ +
2070 GLuint uniformStart;
│ │ │ │ +
2071 GLuint uniformEnd;
│ │ │ │ +
2072 GLuint uniformSrcOffset;
│ │ │ │ +
2073 GLuint uniformDstOffset;
│ │ │ │ +
2074 GLuint uniformDuDesc;
│ │ │ │ +
2075 GLuint uniformDvDesc;
│ │ │ │ +
2076 GLuint uniformDuuDesc;
│ │ │ │ +
2077 GLuint uniformDuvDesc;
│ │ │ │ +
2078 GLuint uniformDvvDesc;
│ │ │ │ +
2079 } _stencilKernel;
│ │ │ │ +
2080
│ │ │ │ +
2081 struct _PatchKernel {
│ │ │ │ +
2082 _PatchKernel();
│ │ │ │ +
2083 ~_PatchKernel();
│ │ │ │ +
2084 bool Compile(BufferDescriptor const &srcDesc,
│ │ │ │ +
2085 BufferDescriptor const &dstDesc,
│ │ │ │ +
2086 BufferDescriptor const &duDesc,
│ │ │ │ +
2087 BufferDescriptor const &dvDesc,
│ │ │ │ +
2088 BufferDescriptor const &duuDesc,
│ │ │ │ +
2089 BufferDescriptor const &duvDesc,
│ │ │ │ +
2090 BufferDescriptor const &dvvDesc,
│ │ │ │ +
2091 int workGroupSize);
│ │ │ │ +
2092 GLuint program;
│ │ │ │ +
2093 GLuint uniformSrcOffset;
│ │ │ │ +
2094 GLuint uniformDstOffset;
│ │ │ │ +
2095 GLuint uniformPatchArray;
│ │ │ │ +
2096 GLuint uniformDuDesc;
│ │ │ │ +
2097 GLuint uniformDvDesc;
│ │ │ │ +
2098 GLuint uniformDuuDesc;
│ │ │ │ +
2099 GLuint uniformDuvDesc;
│ │ │ │ +
2100 GLuint uniformDvvDesc;
│ │ │ │ +
2101 } _patchKernel;
│ │ │ │ +
2102
│ │ │ │ +
2103 int _workGroupSize;
│ │ │ │ +
2104 GLuint _patchArraysSSBO;
│ │ │ │ +
2105};
│ │ │ │ +
│ │ │ │ +
2106
│ │ │ │ +
2107} // end namespace Osd
│ │ │ │ +
2108
│ │ │ │ +
2109} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
2110using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
2111
│ │ │ │ +
2112} // end namespace OpenSubdiv
│ │ │ │ +
2113
│ │ │ │ +
2114
│ │ │ │ +
2115#endif // OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
│ │ │ │ + │ │ │ │ +
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
GLStencilTableSSBO(Far::StencilTable const *stencilTable)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static GLStencilTableSSBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
│ │ │ │ + │ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ + │ │ │ │ +
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
│ │ │ │ +
~GLComputeEvaluator()
Destructor. note that the GL context must be made current.
│ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, GLuint duuWeightsBuffer, GLuint duvWeightsBuffer, GLuint dvvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ + │ │ │ │ +
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
│ │ │ │ +
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext=NULL)
│ │ │ │ +
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
│ │ │ │ +
static void Synchronize(void *deviceContext)
Wait the dispatched kernel finishes.
│ │ │ │ +
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc=BufferDescriptor(), BufferDescriptor const &dvDesc=BufferDescriptor(), BufferDescriptor const &duuDesc=BufferDescriptor(), BufferDescriptor const &duvDesc=BufferDescriptor(), BufferDescriptor const &dvvDesc=BufferDescriptor())
│ │ │ │ +
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void *deviceContext=NULL)
│ │ │ │ +
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glMesh.h │ │ │ │ │ +glComputeEvaluator.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,42 +24,1359 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/mesh.h" │ │ │ │ │ -31#include "../osd/glPatchTable.h" │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ -35 │ │ │ │ │ -36namespace Osd { │ │ │ │ │ -37 │ │ │ │ │ -_3_8typedef _M_e_s_h_I_n_t_e_r_f_a_c_e_<_G_L_P_a_t_c_h_T_a_b_l_e_> _G_L_M_e_s_h_I_n_t_e_r_f_a_c_e; │ │ │ │ │ -39 │ │ │ │ │ -40 │ │ │ │ │ -41} // end namespace Osd │ │ │ │ │ +30#include "../osd/opengl.h" │ │ │ │ │ +31#include "../osd/types.h" │ │ │ │ │ +32#include "../osd/bufferDescriptor.h" │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Far { │ │ │ │ │ +38 class PatchTable; │ │ │ │ │ +39 class StencilTable; │ │ │ │ │ +40 class LimitStencilTable; │ │ │ │ │ +41} │ │ │ │ │ 42 │ │ │ │ │ -43} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -44using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -45 │ │ │ │ │ -46} // end namespace OpenSubdiv │ │ │ │ │ -47 │ │ │ │ │ -48#endif // OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ +43namespace Osd { │ │ │ │ │ +44 │ │ │ │ │ +_5_1class _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O { │ │ │ │ │ +52public: │ │ │ │ │ +_5_3 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O *_C_r_e_a_t_e(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, │ │ │ │ │ +54 void *deviceContext = NULL) { │ │ │ │ │ +55 (void)deviceContext; // unused │ │ │ │ │ +56 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(stencilTable); │ │ │ │ │ +57 } │ │ │ │ │ +_5_8 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O *_C_r_e_a_t_e( │ │ │ │ │ +59 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable, │ │ │ │ │ +60 void *deviceContext = NULL) { │ │ │ │ │ +61 (void)deviceContext; // unused │ │ │ │ │ +62 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(limitStencilTable); │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +_6_5 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable); │ │ │ │ │ +_6_6 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ +*limitStencilTable); │ │ │ │ │ +_6_7 _~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O(); │ │ │ │ │ +68 │ │ │ │ │ +69 // interfaces needed for GLSLComputeKernel │ │ │ │ │ +_7_0 GLuint _G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizes; } │ │ │ │ │ +_7_1 GLuint _G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsets; } │ │ │ │ │ +_7_2 GLuint _G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indices; } │ │ │ │ │ +_7_3 GLuint _G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weights; } │ │ │ │ │ +_7_4 GLuint _G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeights; } │ │ │ │ │ +_7_5 GLuint _G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeights; } │ │ │ │ │ +_7_6 GLuint _G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeights; } │ │ │ │ │ +_7_7 GLuint _G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeights; } │ │ │ │ │ +_7_8 GLuint _G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeights; } │ │ │ │ │ +_7_9 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +80 │ │ │ │ │ +81private: │ │ │ │ │ +82 GLuint _sizes; │ │ │ │ │ +83 GLuint _offsets; │ │ │ │ │ +84 GLuint _indices; │ │ │ │ │ +85 GLuint _weights; │ │ │ │ │ +86 GLuint _duWeights; │ │ │ │ │ +87 GLuint _dvWeights; │ │ │ │ │ +88 GLuint _duuWeights; │ │ │ │ │ +89 GLuint _duvWeights; │ │ │ │ │ +90 GLuint _dvvWeights; │ │ │ │ │ +91 int _numStencils; │ │ │ │ │ +92}; │ │ │ │ │ +93 │ │ │ │ │ +94// -------------------------------------------------------------------------- │ │ │ │ │ +- │ │ │ │ │ +95 │ │ │ │ │ +_9_6class _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r { │ │ │ │ │ +97public: │ │ │ │ │ +_9_8 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ +_9_9 static _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +100 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +101 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +102 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +103 void * deviceContext = NULL) { │ │ │ │ │ +104 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ +105 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +108 deviceContext); │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 static _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r * _C_r_e_a_t_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +112 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +113 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +114 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +115 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +116 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +117 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +118 void * deviceContext = NULL) { │ │ │ │ │ +119 (void)deviceContext; // not used │ │ │ │ │ +120 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r *instance = new _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +121 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ +122 duuDesc, duvDesc, dvvDesc)) │ │ │ │ │ +123 return instance; │ │ │ │ │ +124 delete instance; │ │ │ │ │ +125 return NULL; │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_9 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +130 │ │ │ │ │ +_1_3_2 _~_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +133 │ │ │ │ │ +139 │ │ │ │ │ +167 template │ │ │ │ │ +_1_6_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +169 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +170 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +171 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +172 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +173 void * deviceContext = NULL) { │ │ │ │ │ +174 │ │ │ │ │ +175 if (instance) { │ │ │ │ │ +176 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +177 dstBuffer, dstDesc, │ │ │ │ │ +178 stencilTable); │ │ │ │ │ +179 } else { │ │ │ │ │ +180 // Create an instance on demand (slow) │ │ │ │ │ +181 (void)deviceContext; // unused │ │ │ │ │ +182 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +183 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +184 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +185 if (instance) { │ │ │ │ │ +186 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +187 dstBuffer, dstDesc, │ │ │ │ │ +188 stencilTable); │ │ │ │ │ +189 delete instance; │ │ │ │ │ +190 return r; │ │ │ │ │ +191 } │ │ │ │ │ +192 return false; │ │ │ │ │ +193 } │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +235 template │ │ │ │ │ +_2_3_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +237 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +238 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +239 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +240 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +241 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +242 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +243 void * deviceContext = NULL) { │ │ │ │ │ +244 │ │ │ │ │ +245 if (instance) { │ │ │ │ │ +246 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +247 dstBuffer, dstDesc, │ │ │ │ │ +248 duBuffer, duDesc, │ │ │ │ │ +249 dvBuffer, dvDesc, │ │ │ │ │ +250 stencilTable); │ │ │ │ │ +251 } else { │ │ │ │ │ +252 // Create an instance on demand (slow) │ │ │ │ │ +253 (void)deviceContext; // unused │ │ │ │ │ +254 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc); │ │ │ │ │ +255 if (instance) { │ │ │ │ │ +256 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +257 dstBuffer, dstDesc, │ │ │ │ │ +258 duBuffer, duDesc, │ │ │ │ │ +259 dvBuffer, dvDesc, │ │ │ │ │ +260 stencilTable); │ │ │ │ │ +261 delete instance; │ │ │ │ │ +262 return r; │ │ │ │ │ +263 } │ │ │ │ │ +264 return false; │ │ │ │ │ +265 } │ │ │ │ │ +266 } │ │ │ │ │ +267 │ │ │ │ │ +325 template │ │ │ │ │ +_3_2_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +327 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +328 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +329 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +330 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +331 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +332 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +333 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +334 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +335 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +336 void * deviceContext = NULL) { │ │ │ │ │ +337 │ │ │ │ │ +338 if (instance) { │ │ │ │ │ +339 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +340 dstBuffer, dstDesc, │ │ │ │ │ +341 duBuffer, duDesc, │ │ │ │ │ +342 dvBuffer, dvDesc, │ │ │ │ │ +343 duuBuffer, duuDesc, │ │ │ │ │ +344 duvBuffer, duvDesc, │ │ │ │ │ +345 dvvBuffer, dvvDesc, │ │ │ │ │ +346 stencilTable); │ │ │ │ │ +347 } else { │ │ │ │ │ +348 // Create an instance on demand (slow) │ │ │ │ │ +349 (void)deviceContext; // unused │ │ │ │ │ +350 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ +351 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ +352 if (instance) { │ │ │ │ │ +353 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ +354 dstBuffer, dstDesc, │ │ │ │ │ +355 duBuffer, duDesc, │ │ │ │ │ +356 dvBuffer, dvDesc, │ │ │ │ │ +357 duuBuffer, duuDesc, │ │ │ │ │ +358 duvBuffer, duvDesc, │ │ │ │ │ +359 dvvBuffer, dvvDesc, │ │ │ │ │ +360 stencilTable); │ │ │ │ │ +361 delete instance; │ │ │ │ │ +362 return r; │ │ │ │ │ +363 } │ │ │ │ │ +364 return false; │ │ │ │ │ +365 } │ │ │ │ │ +366 } │ │ │ │ │ +367 │ │ │ │ │ +385 template │ │ │ │ │ +_3_8_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +387 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +388 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +389 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ +390 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +391 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +392 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +393 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +394 stencilTable->GetSizesBuffer(), │ │ │ │ │ +395 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +396 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +397 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +398 0, │ │ │ │ │ +399 0, │ │ │ │ │ +400 /* start = */ 0, │ │ │ │ │ +401 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +402 } │ │ │ │ │ +403 │ │ │ │ │ +433 template │ │ │ │ │ +_4_3_4 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +435 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +436 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +437 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +438 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +439 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ +440 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +441 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +442 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +443 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +444 stencilTable->GetSizesBuffer(), │ │ │ │ │ +445 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +446 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +447 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +448 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +449 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +450 /* start = */ 0, │ │ │ │ │ +451 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +452 } │ │ │ │ │ +453 │ │ │ │ │ +501 template │ │ │ │ │ +_5_0_2 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +503 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +504 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +505 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +506 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +507 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +508 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +509 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +510 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ +511 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +512 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +513 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +514 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +515 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ +516 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ +517 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ +518 stencilTable->GetSizesBuffer(), │ │ │ │ │ +519 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ +520 stencilTable->GetIndicesBuffer(), │ │ │ │ │ +521 stencilTable->GetWeightsBuffer(), │ │ │ │ │ +522 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ +523 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ +524 stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ +525 stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ +526 stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ +527 /* start = */ 0, │ │ │ │ │ +528 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +529 } │ │ │ │ │ +530 │ │ │ │ │ +_5_6_6 bool _E_v_a_l_S_t_e_n_c_i_l_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +567 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +568 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +569 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +570 GLuint sizesBuffer, │ │ │ │ │ +571 GLuint offsetsBuffer, │ │ │ │ │ +572 GLuint indicesBuffer, │ │ │ │ │ +573 GLuint weightsBuffer, │ │ │ │ │ +574 GLuint duWeightsBuffer, │ │ │ │ │ +575 GLuint dvWeightsBuffer, │ │ │ │ │ +576 int start, │ │ │ │ │ +577 int end) const; │ │ │ │ │ +578 │ │ │ │ │ +_6_3_2 bool _E_v_a_l_S_t_e_n_c_i_l_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +633 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +634 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +635 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +636 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +637 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +638 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +639 GLuint sizesBuffer, │ │ │ │ │ +640 GLuint offsetsBuffer, │ │ │ │ │ +641 GLuint indicesBuffer, │ │ │ │ │ +642 GLuint weightsBuffer, │ │ │ │ │ +643 GLuint duWeightsBuffer, │ │ │ │ │ +644 GLuint dvWeightsBuffer, │ │ │ │ │ +645 GLuint duuWeightsBuffer, │ │ │ │ │ +646 GLuint duvWeightsBuffer, │ │ │ │ │ +647 GLuint dvvWeightsBuffer, │ │ │ │ │ +648 int start, │ │ │ │ │ +649 int end) const; │ │ │ │ │ +650 │ │ │ │ │ +656 │ │ │ │ │ +689 template │ │ │ │ │ +_6_9_1 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +692 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +693 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +694 int numPatchCoords, │ │ │ │ │ +695 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +696 PATCH_TABLE *patchTable, │ │ │ │ │ +697 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +698 void * deviceContext = NULL) { │ │ │ │ │ +699 │ │ │ │ │ +700 if (instance) { │ │ │ │ │ +701 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +702 dstBuffer, dstDesc, │ │ │ │ │ +703 numPatchCoords, patchCoords, │ │ │ │ │ +704 patchTable); │ │ │ │ │ +705 } else { │ │ │ │ │ +706 // Create an instance on demand (slow) │ │ │ │ │ +707 (void)deviceContext; // unused │ │ │ │ │ +708 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +709 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +710 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +711 if (instance) { │ │ │ │ │ +712 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +713 dstBuffer, dstDesc, │ │ │ │ │ +714 numPatchCoords, patchCoords, │ │ │ │ │ +715 patchTable); │ │ │ │ │ +716 delete instance; │ │ │ │ │ +717 return r; │ │ │ │ │ +718 } │ │ │ │ │ +719 return false; │ │ │ │ │ +720 } │ │ │ │ │ +721 } │ │ │ │ │ +722 │ │ │ │ │ +767 template │ │ │ │ │ +_7_6_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +770 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +771 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +772 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +773 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +774 int numPatchCoords, │ │ │ │ │ +775 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +776 PATCH_TABLE *patchTable, │ │ │ │ │ +777 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +778 void * deviceContext = NULL) { │ │ │ │ │ +779 │ │ │ │ │ +780 if (instance) { │ │ │ │ │ +781 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +782 dstBuffer, dstDesc, │ │ │ │ │ +783 duBuffer, duDesc, │ │ │ │ │ +784 dvBuffer, dvDesc, │ │ │ │ │ +785 numPatchCoords, patchCoords, │ │ │ │ │ +786 patchTable); │ │ │ │ │ +787 } else { │ │ │ │ │ +788 // Create an instance on demand (slow) │ │ │ │ │ +789 (void)deviceContext; // unused │ │ │ │ │ +790 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +791 duDesc, dvDesc); │ │ │ │ │ +792 if (instance) { │ │ │ │ │ +793 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +794 dstBuffer, dstDesc, │ │ │ │ │ +795 duBuffer, duDesc, │ │ │ │ │ +796 dvBuffer, dvDesc, │ │ │ │ │ +797 numPatchCoords, patchCoords, │ │ │ │ │ +798 patchTable); │ │ │ │ │ +799 delete instance; │ │ │ │ │ +800 return r; │ │ │ │ │ +801 } │ │ │ │ │ +802 return false; │ │ │ │ │ +803 } │ │ │ │ │ +804 } │ │ │ │ │ +805 │ │ │ │ │ +868 template │ │ │ │ │ +_8_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +871 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +872 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +873 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +874 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +875 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +876 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +877 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +878 int numPatchCoords, │ │ │ │ │ +879 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +880 PATCH_TABLE *patchTable, │ │ │ │ │ +881 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +882 void * deviceContext = NULL) { │ │ │ │ │ +883 │ │ │ │ │ +884 if (instance) { │ │ │ │ │ +885 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +886 dstBuffer, dstDesc, │ │ │ │ │ +887 duBuffer, duDesc, │ │ │ │ │ +888 dvBuffer, dvDesc, │ │ │ │ │ +889 duuBuffer, duuDesc, │ │ │ │ │ +890 duvBuffer, duvDesc, │ │ │ │ │ +891 dvvBuffer, dvvDesc, │ │ │ │ │ +892 numPatchCoords, patchCoords, │ │ │ │ │ +893 patchTable); │ │ │ │ │ +894 } else { │ │ │ │ │ +895 // Create an instance on demand (slow) │ │ │ │ │ +896 (void)deviceContext; // unused │ │ │ │ │ +897 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +898 duDesc, dvDesc, │ │ │ │ │ +899 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ +900 if (instance) { │ │ │ │ │ +901 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ +902 dstBuffer, dstDesc, │ │ │ │ │ +903 duBuffer, duDesc, │ │ │ │ │ +904 dvBuffer, dvDesc, │ │ │ │ │ +905 duuBuffer, duuDesc, │ │ │ │ │ +906 duvBuffer, duvDesc, │ │ │ │ │ +907 dvvBuffer, dvvDesc, │ │ │ │ │ +908 numPatchCoords, patchCoords, │ │ │ │ │ +909 patchTable); │ │ │ │ │ +910 delete instance; │ │ │ │ │ +911 return r; │ │ │ │ │ +912 } │ │ │ │ │ +913 return false; │ │ │ │ │ +914 } │ │ │ │ │ +915 } │ │ │ │ │ +916 │ │ │ │ │ +941 template │ │ │ │ │ +_9_4_3 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +944 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +945 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +946 int numPatchCoords, │ │ │ │ │ +947 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +948 PATCH_TABLE *patchTable) const { │ │ │ │ │ +949 │ │ │ │ │ +950 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +951 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +952 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +953 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +954 numPatchCoords, │ │ │ │ │ +955 patchCoords->BindVBO(), │ │ │ │ │ +956 patchTable->GetPatchArrays(), │ │ │ │ │ +957 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +958 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +959 } │ │ │ │ │ +960 │ │ │ │ │ +995 template │ │ │ │ │ +_9_9_7 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +998 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +999 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1000 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1001 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1002 int numPatchCoords, │ │ │ │ │ +1003 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1004 PATCH_TABLE *patchTable) const { │ │ │ │ │ +1005 │ │ │ │ │ +1006 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1007 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1008 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +1009 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +1010 numPatchCoords, │ │ │ │ │ +1011 patchCoords->BindVBO(), │ │ │ │ │ +1012 patchTable->GetPatchArrays(), │ │ │ │ │ +1013 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +1014 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1015 } │ │ │ │ │ +1016 │ │ │ │ │ +1069 template │ │ │ │ │ +_1_0_7_1 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +1072 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1073 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1074 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1075 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1076 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1077 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1078 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1079 int numPatchCoords, │ │ │ │ │ +1080 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1081 PATCH_TABLE *patchTable) const { │ │ │ │ │ +1082 │ │ │ │ │ +1083 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1084 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1085 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +1086 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +1087 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ +1088 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ +1089 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ +1090 numPatchCoords, │ │ │ │ │ +1091 patchCoords->BindVBO(), │ │ │ │ │ +1092 patchTable->GetPatchArrays(), │ │ │ │ │ +1093 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +1094 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1095 } │ │ │ │ │ +1096 │ │ │ │ │ +_1_0_9_7 bool _E_v_a_l_P_a_t_c_h_e_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1098 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1099 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1100 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1101 int numPatchCoords, │ │ │ │ │ +1102 GLuint patchCoordsBuffer, │ │ │ │ │ +1103 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ +1104 GLuint patchIndexBuffer, │ │ │ │ │ +1105 GLuint patchParamsBuffer) const; │ │ │ │ │ +1106 │ │ │ │ │ +_1_1_0_7 bool _E_v_a_l_P_a_t_c_h_e_s(GLuint srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1108 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1109 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1110 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1111 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1112 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1113 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1114 int numPatchCoords, │ │ │ │ │ +1115 GLuint patchCoordsBuffer, │ │ │ │ │ +1116 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ +1117 GLuint patchIndexBuffer, │ │ │ │ │ +1118 GLuint patchParamsBuffer) const; │ │ │ │ │ +1119 │ │ │ │ │ +1152 template │ │ │ │ │ +_1_1_5_4 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1155 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1156 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1157 int numPatchCoords, │ │ │ │ │ +1158 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1159 PATCH_TABLE *patchTable, │ │ │ │ │ +1160 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1161 void * deviceContext = NULL) { │ │ │ │ │ +1162 │ │ │ │ │ +1163 if (instance) { │ │ │ │ │ +1164 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1165 srcBuffer, srcDesc, │ │ │ │ │ +1166 dstBuffer, dstDesc, │ │ │ │ │ +1167 numPatchCoords, patchCoords, │ │ │ │ │ +1168 patchTable); │ │ │ │ │ +1169 } else { │ │ │ │ │ +1170 // Create an instance on demand (slow) │ │ │ │ │ +1171 (void)deviceContext; // unused │ │ │ │ │ +1172 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1173 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1174 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +1175 if (instance) { │ │ │ │ │ +1176 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1177 srcBuffer, srcDesc, │ │ │ │ │ +1178 dstBuffer, dstDesc, │ │ │ │ │ +1179 numPatchCoords, patchCoords, │ │ │ │ │ +1180 patchTable); │ │ │ │ │ +1181 delete instance; │ │ │ │ │ +1182 return r; │ │ │ │ │ +1183 } │ │ │ │ │ +1184 return false; │ │ │ │ │ +1185 } │ │ │ │ │ +1186 } │ │ │ │ │ +1187 │ │ │ │ │ +1212 template │ │ │ │ │ +_1_2_1_4 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1215 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1216 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1217 int numPatchCoords, │ │ │ │ │ +1218 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1219 PATCH_TABLE *patchTable) const { │ │ │ │ │ +1220 │ │ │ │ │ +1221 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1222 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1223 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1224 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1225 numPatchCoords, │ │ │ │ │ +1226 patchCoords->BindVBO(), │ │ │ │ │ +1227 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1228 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1229 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1230 } │ │ │ │ │ +1231 │ │ │ │ │ +1276 template │ │ │ │ │ +_1_2_7_8 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1279 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1280 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1281 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1282 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1283 int numPatchCoords, │ │ │ │ │ +1284 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1285 PATCH_TABLE *patchTable, │ │ │ │ │ +1286 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1287 void * deviceContext = NULL) { │ │ │ │ │ +1288 │ │ │ │ │ +1289 if (instance) { │ │ │ │ │ +1290 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1291 srcBuffer, srcDesc, │ │ │ │ │ +1292 dstBuffer, dstDesc, │ │ │ │ │ +1293 duBuffer, duDesc, │ │ │ │ │ +1294 dvBuffer, dvDesc, │ │ │ │ │ +1295 numPatchCoords, patchCoords, │ │ │ │ │ +1296 patchTable); │ │ │ │ │ +1297 } else { │ │ │ │ │ +1298 // Create an instance on demand (slow) │ │ │ │ │ +1299 (void)deviceContext; // unused │ │ │ │ │ +1300 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1301 duDesc, dvDesc); │ │ │ │ │ +1302 if (instance) { │ │ │ │ │ +1303 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1304 srcBuffer, srcDesc, │ │ │ │ │ +1305 dstBuffer, dstDesc, │ │ │ │ │ +1306 duBuffer, duDesc, │ │ │ │ │ +1307 dvBuffer, dvDesc, │ │ │ │ │ +1308 numPatchCoords, patchCoords, │ │ │ │ │ +1309 patchTable); │ │ │ │ │ +1310 delete instance; │ │ │ │ │ +1311 return r; │ │ │ │ │ +1312 } │ │ │ │ │ +1313 return false; │ │ │ │ │ +1314 } │ │ │ │ │ +1315 } │ │ │ │ │ +1316 │ │ │ │ │ +1353 template │ │ │ │ │ +_1_3_5_5 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1356 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1357 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1358 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1359 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1360 int numPatchCoords, │ │ │ │ │ +1361 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1362 PATCH_TABLE *patchTable) const { │ │ │ │ │ +1363 │ │ │ │ │ +1364 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1365 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1366 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +1367 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +1368 numPatchCoords, │ │ │ │ │ +1369 patchCoords->BindVBO(), │ │ │ │ │ +1370 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1371 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1372 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1373 } │ │ │ │ │ +1374 │ │ │ │ │ +1437 template │ │ │ │ │ +_1_4_3_9 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1440 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1441 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1442 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1443 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1444 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1445 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1446 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1447 int numPatchCoords, │ │ │ │ │ +1448 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1449 PATCH_TABLE *patchTable, │ │ │ │ │ +1450 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1451 void * deviceContext = NULL) { │ │ │ │ │ +1452 │ │ │ │ │ +1453 if (instance) { │ │ │ │ │ +1454 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1455 srcBuffer, srcDesc, │ │ │ │ │ +1456 dstBuffer, dstDesc, │ │ │ │ │ +1457 duBuffer, duDesc, │ │ │ │ │ +1458 dvBuffer, dvDesc, │ │ │ │ │ +1459 duuBuffer, duuDesc, │ │ │ │ │ +1460 duvBuffer, duvDesc, │ │ │ │ │ +1461 dvvBuffer, dvvDesc, │ │ │ │ │ +1462 numPatchCoords, patchCoords, │ │ │ │ │ +1463 patchTable); │ │ │ │ │ +1464 } else { │ │ │ │ │ +1465 // Create an instance on demand (slow) │ │ │ │ │ +1466 (void)deviceContext; // unused │ │ │ │ │ +1467 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1468 duDesc, dvDesc, │ │ │ │ │ +1469 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ +1470 if (instance) { │ │ │ │ │ +1471 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1472 srcBuffer, srcDesc, │ │ │ │ │ +1473 dstBuffer, dstDesc, │ │ │ │ │ +1474 duBuffer, duDesc, │ │ │ │ │ +1475 dvBuffer, dvDesc, │ │ │ │ │ +1476 duuBuffer, duuDesc, │ │ │ │ │ +1477 duvBuffer, duvDesc, │ │ │ │ │ +1478 dvvBuffer, dvvDesc, │ │ │ │ │ +1479 numPatchCoords, patchCoords, │ │ │ │ │ +1480 patchTable); │ │ │ │ │ +1481 delete instance; │ │ │ │ │ +1482 return r; │ │ │ │ │ +1483 } │ │ │ │ │ +1484 return false; │ │ │ │ │ +1485 } │ │ │ │ │ +1486 } │ │ │ │ │ +1487 │ │ │ │ │ +1542 template │ │ │ │ │ +_1_5_4_4 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +1545 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1546 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1547 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1548 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1549 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1550 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1551 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1552 int numPatchCoords, │ │ │ │ │ +1553 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1554 PATCH_TABLE *patchTable) const { │ │ │ │ │ +1555 │ │ │ │ │ +1556 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1557 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1558 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +1559 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +1560 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ +1561 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ +1562 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ +1563 numPatchCoords, │ │ │ │ │ +1564 patchCoords->BindVBO(), │ │ │ │ │ +1565 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ +1566 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +1567 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1568 } │ │ │ │ │ +1569 │ │ │ │ │ +1604 template │ │ │ │ │ +_1_6_0_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1607 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1608 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1609 int numPatchCoords, │ │ │ │ │ +1610 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1611 PATCH_TABLE *patchTable, │ │ │ │ │ +1612 int fvarChannel, │ │ │ │ │ +1613 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1614 void * deviceContext = NULL) { │ │ │ │ │ +1615 │ │ │ │ │ +1616 if (instance) { │ │ │ │ │ +1617 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1618 srcBuffer, srcDesc, │ │ │ │ │ +1619 dstBuffer, dstDesc, │ │ │ │ │ +1620 numPatchCoords, patchCoords, │ │ │ │ │ +1621 patchTable, fvarChannel); │ │ │ │ │ +1622 } else { │ │ │ │ │ +1623 // Create an instance on demand (slow) │ │ │ │ │ +1624 (void)deviceContext; // unused │ │ │ │ │ +1625 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1626 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1627 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +1628 if (instance) { │ │ │ │ │ +1629 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1630 srcBuffer, srcDesc, │ │ │ │ │ +1631 dstBuffer, dstDesc, │ │ │ │ │ +1632 numPatchCoords, patchCoords, │ │ │ │ │ +1633 patchTable, fvarChannel); │ │ │ │ │ +1634 delete instance; │ │ │ │ │ +1635 return r; │ │ │ │ │ +1636 } │ │ │ │ │ +1637 return false; │ │ │ │ │ +1638 } │ │ │ │ │ +1639 } │ │ │ │ │ +1640 │ │ │ │ │ +1667 template │ │ │ │ │ +_1_6_6_9 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1670 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1671 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1672 int numPatchCoords, │ │ │ │ │ +1673 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1674 PATCH_TABLE *patchTable, │ │ │ │ │ +1675 int fvarChannel = 0) const { │ │ │ │ │ +1676 │ │ │ │ │ +1677 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1678 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1679 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1680 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +1681 numPatchCoords, │ │ │ │ │ +1682 patchCoords->BindVBO(), │ │ │ │ │ +1683 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +1684 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1685 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1686 } │ │ │ │ │ +1687 │ │ │ │ │ +1734 template │ │ │ │ │ +_1_7_3_6 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1737 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1738 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1739 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1740 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1741 int numPatchCoords, │ │ │ │ │ +1742 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1743 PATCH_TABLE *patchTable, │ │ │ │ │ +1744 int fvarChannel, │ │ │ │ │ +1745 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1746 void * deviceContext = NULL) { │ │ │ │ │ +1747 │ │ │ │ │ +1748 if (instance) { │ │ │ │ │ +1749 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1750 srcBuffer, srcDesc, │ │ │ │ │ +1751 dstBuffer, dstDesc, │ │ │ │ │ +1752 duBuffer, duDesc, │ │ │ │ │ +1753 dvBuffer, dvDesc, │ │ │ │ │ +1754 numPatchCoords, patchCoords, │ │ │ │ │ +1755 patchTable, fvarChannel); │ │ │ │ │ +1756 } else { │ │ │ │ │ +1757 // Create an instance on demand (slow) │ │ │ │ │ +1758 (void)deviceContext; // unused │ │ │ │ │ +1759 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1760 duDesc, dvDesc); │ │ │ │ │ +1761 if (instance) { │ │ │ │ │ +1762 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1763 srcBuffer, srcDesc, │ │ │ │ │ +1764 dstBuffer, dstDesc, │ │ │ │ │ +1765 duBuffer, duDesc, │ │ │ │ │ +1766 dvBuffer, dvDesc, │ │ │ │ │ +1767 numPatchCoords, patchCoords, │ │ │ │ │ +1768 patchTable, fvarChannel); │ │ │ │ │ +1769 delete instance; │ │ │ │ │ +1770 return r; │ │ │ │ │ +1771 } │ │ │ │ │ +1772 return false; │ │ │ │ │ +1773 } │ │ │ │ │ +1774 } │ │ │ │ │ +1775 │ │ │ │ │ +1814 template │ │ │ │ │ +_1_8_1_6 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1817 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1818 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1819 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1820 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1821 int numPatchCoords, │ │ │ │ │ +1822 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1823 PATCH_TABLE *patchTable, │ │ │ │ │ +1824 int fvarChannel = 0) const { │ │ │ │ │ +1825 │ │ │ │ │ +1826 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +1827 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +1828 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +1829 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +1830 numPatchCoords, │ │ │ │ │ +1831 patchCoords->BindVBO(), │ │ │ │ │ +1832 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +1833 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1834 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1835 } │ │ │ │ │ +1836 │ │ │ │ │ +1901 template │ │ │ │ │ +_1_9_0_3 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1904 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1905 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1906 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1907 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1908 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1909 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1910 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1911 int numPatchCoords, │ │ │ │ │ +1912 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1913 PATCH_TABLE *patchTable, │ │ │ │ │ +1914 int fvarChannel, │ │ │ │ │ +1915 _G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +1916 void * deviceContext = NULL) { │ │ │ │ │ +1917 │ │ │ │ │ +1918 if (instance) { │ │ │ │ │ +1919 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1920 srcBuffer, srcDesc, │ │ │ │ │ +1921 dstBuffer, dstDesc, │ │ │ │ │ +1922 duBuffer, duDesc, │ │ │ │ │ +1923 dvBuffer, dvDesc, │ │ │ │ │ +1924 duuBuffer, duuDesc, │ │ │ │ │ +1925 duvBuffer, duvDesc, │ │ │ │ │ +1926 dvvBuffer, dvvDesc, │ │ │ │ │ +1927 numPatchCoords, patchCoords, │ │ │ │ │ +1928 patchTable, fvarChannel); │ │ │ │ │ +1929 } else { │ │ │ │ │ +1930 // Create an instance on demand (slow) │ │ │ │ │ +1931 (void)deviceContext; // unused │ │ │ │ │ +1932 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ +1933 duDesc, dvDesc, │ │ │ │ │ +1934 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ +1935 if (instance) { │ │ │ │ │ +1936 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1937 srcBuffer, srcDesc, │ │ │ │ │ +1938 dstBuffer, dstDesc, │ │ │ │ │ +1939 duBuffer, duDesc, │ │ │ │ │ +1940 dvBuffer, dvDesc, │ │ │ │ │ +1941 duuBuffer, duuDesc, │ │ │ │ │ +1942 duvBuffer, duvDesc, │ │ │ │ │ +1943 dvvBuffer, dvvDesc, │ │ │ │ │ +1944 numPatchCoords, patchCoords, │ │ │ │ │ +1945 patchTable, fvarChannel); │ │ │ │ │ +1946 delete instance; │ │ │ │ │ +1947 return r; │ │ │ │ │ +1948 } │ │ │ │ │ +1949 return false; │ │ │ │ │ +1950 } │ │ │ │ │ +1951 } │ │ │ │ │ +1952 │ │ │ │ │ +2009 template │ │ │ │ │ +_2_0_1_1 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +2012 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2013 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2014 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +2015 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +2016 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +2017 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +2018 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +2019 int numPatchCoords, │ │ │ │ │ +2020 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +2021 PATCH_TABLE *patchTable, │ │ │ │ │ +2022 int fvarChannel = 0) const { │ │ │ │ │ +2023 │ │ │ │ │ +2024 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ +2025 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ +2026 duBuffer->BindVBO(), duDesc, │ │ │ │ │ +2027 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ +2028 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ +2029 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ +2030 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ +2031 numPatchCoords, │ │ │ │ │ +2032 patchCoords->BindVBO(), │ │ │ │ │ +2033 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ +2034 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +2035 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +2036 } │ │ │ │ │ +2037 │ │ │ │ │ +2043 │ │ │ │ │ +_2_0_4_6 bool _C_o_m_p_i_l_e(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2047 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2048 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +2049 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +2050 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +2051 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +2052 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +2053 │ │ │ │ │ +_2_0_5_5 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext); │ │ │ │ │ +2056 │ │ │ │ │ +2057private: │ │ │ │ │ +2058 struct _StencilKernel { │ │ │ │ │ +2059 _StencilKernel(); │ │ │ │ │ +2060 ~_StencilKernel(); │ │ │ │ │ +2061 bool Compile(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2062 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2063 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +2064 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +2065 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +2066 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +2067 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +2068 int workGroupSize); │ │ │ │ │ +2069 GLuint program; │ │ │ │ │ +2070 GLuint uniformStart; │ │ │ │ │ +2071 GLuint uniformEnd; │ │ │ │ │ +2072 GLuint uniformSrcOffset; │ │ │ │ │ +2073 GLuint uniformDstOffset; │ │ │ │ │ +2074 GLuint uniformDuDesc; │ │ │ │ │ +2075 GLuint uniformDvDesc; │ │ │ │ │ +2076 GLuint uniformDuuDesc; │ │ │ │ │ +2077 GLuint uniformDuvDesc; │ │ │ │ │ +2078 GLuint uniformDvvDesc; │ │ │ │ │ +2079 } _stencilKernel; │ │ │ │ │ +2080 │ │ │ │ │ +2081 struct _PatchKernel { │ │ │ │ │ +2082 _PatchKernel(); │ │ │ │ │ +2083 ~_PatchKernel(); │ │ │ │ │ +2084 bool Compile(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +2085 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +2086 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +2087 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +2088 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +2089 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +2090 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +2091 int workGroupSize); │ │ │ │ │ +2092 GLuint program; │ │ │ │ │ +2093 GLuint uniformSrcOffset; │ │ │ │ │ +2094 GLuint uniformDstOffset; │ │ │ │ │ +2095 GLuint uniformPatchArray; │ │ │ │ │ +2096 GLuint uniformDuDesc; │ │ │ │ │ +2097 GLuint uniformDvDesc; │ │ │ │ │ +2098 GLuint uniformDuuDesc; │ │ │ │ │ +2099 GLuint uniformDuvDesc; │ │ │ │ │ +2100 GLuint uniformDvvDesc; │ │ │ │ │ +2101 } _patchKernel; │ │ │ │ │ +2102 │ │ │ │ │ +2103 int _workGroupSize; │ │ │ │ │ +2104 GLuint _patchArraysSSBO; │ │ │ │ │ +2105}; │ │ │ │ │ +2106 │ │ │ │ │ +2107} // end namespace Osd │ │ │ │ │ +2108 │ │ │ │ │ +2109} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +2110using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +2111 │ │ │ │ │ +2112} // end namespace OpenSubdiv │ │ │ │ │ +2113 │ │ │ │ │ +2114 │ │ │ │ │ +2115#endif // OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -MeshInterface< GLPatchTable > GLMeshInterface │ │ │ │ │ -DDeeffiinniittiioonn _g_l_M_e_s_h_._h_:_3_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchArray > PatchArrayVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ +GL stencil table (Shader Storage buffer) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetDuvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ +GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetDuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ +~GLStencilTableSSBO() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetIndicesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetOffsetsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O │ │ │ │ │ +GLStencilTableSSBO(Far::StencilTable const *stencilTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetDvvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_S_i_z_e_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetSizesBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLStencilTableSSBO * Create(Far::LimitStencilTable const │ │ │ │ │ +*limitStencilTable, void *deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetDuuWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r │ │ │ │ │ +GLuint GetDvWeightsBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_S_S_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_1_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator │ │ │ │ │ +const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_7_3_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, STENCIL_TABLE const *stencilTable) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_4_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ +GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_5_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_2_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ +bool Instantiatable │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ +dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ +const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ +duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor │ │ │ │ │ +const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, int │ │ │ │ │ +numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, │ │ │ │ │ +GLuint patchIndexBuffer, GLuint patchParamsBuffer) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_~_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +~GLComputeEvaluator() │ │ │ │ │ +Destructor. note that the GL context must be made current. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_0_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_3_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ +dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ +const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ +duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor │ │ │ │ │ +const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, GLuint │ │ │ │ │ +sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, │ │ │ │ │ +GLuint duWeightsBuffer, GLuint dvWeightsBuffer, GLuint duuWeightsBuffer, GLuint │ │ │ │ │ +duvWeightsBuffer, GLuint dvvWeightsBuffer, int start, int end) const │ │ │ │ │ +Dispatch the GLSL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ +kernel hasn't been compil... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ +const *stencilTable, GLComputeEvaluator const *instance, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator │ │ │ │ │ +const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_4_3_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_7_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ +GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_9_0_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_5_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_8_1_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_4_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r │ │ │ │ │ +GLComputeEvaluator() │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable) const │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_9_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator │ │ │ │ │ +const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_6_9_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const │ │ │ │ │ +*stencilTable) const │ │ │ │ │ +Generic stencil function. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ +dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ +const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, int │ │ │ │ │ +numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, │ │ │ │ │ +GLuint patchIndexBuffer, GLuint patchParamsBuffer) const │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) │ │ │ │ │ +const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_2_0_1_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, void *deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_9_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint │ │ │ │ │ +dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor │ │ │ │ │ +const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint │ │ │ │ │ +sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, │ │ │ │ │ +GLuint duWeightsBuffer, GLuint dvWeightsBuffer, int start, int end) const │ │ │ │ │ +Dispatch the GLSL compute kernel on GPU asynchronously returns false if the │ │ │ │ │ +kernel hasn't been compil... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +GLComputeEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +Generic static stencil function. This function has a same signature as other │ │ │ │ │ +device kernels have so t... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_3_2_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +static void Synchronize(void *deviceContext) │ │ │ │ │ +Wait the dispatched kernel finishes. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ +bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, │ │ │ │ │ +BufferDescriptor const &duDesc=BufferDescriptor(), BufferDescriptor const │ │ │ │ │ +&dvDesc=BufferDescriptor(), BufferDescriptor const &duuDesc=BufferDescriptor(), │ │ │ │ │ +BufferDescriptor const &duvDesc=BufferDescriptor(), BufferDescriptor const │ │ │ │ │ +&dvvDesc=BufferDescriptor()) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_3_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ +BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ +BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ +BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_1_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel=0) const │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_1_6_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h_:_8_7_0 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_M_e_s_h_._h │ │ │ │ │ + * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00854.html │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ │ Namespaces │ │ │ │
glXFBEvaluator.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ #include "../osd/opengl.h"
│ │ │ │ #include "../osd/types.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00854_source.html │ │ │ │ @@ -1245,19 +1245,19 @@ │ │ │ │
2187} // end namespace OPENSUBDIV_VERSION
│ │ │ │
2188using namespace OPENSUBDIV_VERSION;
│ │ │ │
2189
│ │ │ │
2190} // end namespace OpenSubdiv
│ │ │ │
2191
│ │ │ │
2192
│ │ │ │
2193#endif // OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
│ │ │ │ - │ │ │ │ + │ │ │ │
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ │ │ │ │ │ │ │ │
static GLStencilTableTBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,27 +90,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
glslPatchShaderSource.h File Reference
│ │ │ │ +
glVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchDescriptor.h"
│ │ │ │ -#include <string>
│ │ │ │ +#include "../osd/opengl.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  GLStencilTableTBO
 GL TextureBuffer stencil table. More...
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  GLSLPatchShaderSource
 Provides shader source which can be used by client code. More...
class  GLVertexBuffer
 Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,13 +119,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -glslPatchShaderSource.h File Reference │ │ │ │ │ +glVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -  Provides shader source which can be used by client code. _M_o_r_e_._._. │ │ │ │ │ +class   _G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00857.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00857 = [ │ │ │ │ │ - ["GLSLPatchShaderSource", "a01241.html", null] │ │ │ │ │ + ["GLVertexBuffer", "a01245.html", "a01245"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glslPatchShaderSource.h
│ │ │ │ +
glVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,71 +119,78 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../far/patchDescriptor.h"
│ │ │ │ -
31
│ │ │ │ -
32#include <string>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Osd {
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41public:
│ │ │ │ -
45 static std::string GetPatchBasisShaderSource();
│ │ │ │ -
46
│ │ │ │ -
50 static std::string GetPatchDrawingShaderSource();
│ │ │ │ -
51
│ │ │ │ -
59
│ │ │ │ -
60 static std::string GetCommonShaderSource();
│ │ │ │ -
61
│ │ │ │ -
62 static std::string GetVertexShaderSource(
│ │ │ │ - │ │ │ │ -
64
│ │ │ │ -
65 static std::string GetTessControlShaderSource(
│ │ │ │ - │ │ │ │ -
67
│ │ │ │ -
68 static std::string GetTessEvalShaderSource(
│ │ │ │ - │ │ │ │ +
30#include "../osd/opengl.h"
│ │ │ │ +
31#include <cstddef>
│ │ │ │ +
32
│ │ │ │ +
33namespace OpenSubdiv {
│ │ │ │ +
34namespace OPENSUBDIV_VERSION {
│ │ │ │ +
35
│ │ │ │ +
36namespace Osd {
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45public:
│ │ │ │ +
47 static GLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
48 void *deviceContext = NULL);
│ │ │ │ +
49
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
55 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
56 void *deviceContext = NULL);
│ │ │ │ +
57
│ │ │ │ +
59 int GetNumElements() const;
│ │ │ │ +
60
│ │ │ │ +
62 int GetNumVertices() const;
│ │ │ │ +
63
│ │ │ │ +
65 GLuint BindVBO(void *deviceContext = NULL);
│ │ │ │ +
66
│ │ │ │ +
67protected:
│ │ │ │ +
69 GLVertexBuffer(int numElements, int numVertices);
│ │ │ │
70
│ │ │ │ -
72};
│ │ │ │ +
73 bool allocate();
│ │ │ │ +
74
│ │ │ │ +
75private:
│ │ │ │ +
76 int _numElements;
│ │ │ │ +
77 int _numVertices;
│ │ │ │ +
78 GLuint _vbo;
│ │ │ │ +
79};
│ │ │ │
│ │ │ │ -
73
│ │ │ │ -
74} // end namespace Osd
│ │ │ │ -
75
│ │ │ │ -
76} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
77using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
78
│ │ │ │ -
79} // end namespace OpenSubdiv
│ │ │ │
80
│ │ │ │ -
81#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Provides shader source which can be used by client code.
│ │ │ │ -
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ -
static std::string GetPatchDrawingShaderSource()
Returns shader source which can be used while drawing piecewise parametric patches resulting from sub...
│ │ │ │ -
static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ -
static std::string GetPatchBasisShaderSource()
Returns shader source which can be used to evaluate position and first and second derivatives on piec...
│ │ │ │ - │ │ │ │ -
static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
81} // end namespace Osd
│ │ │ │ +
82
│ │ │ │ +
83} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
84using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
85
│ │ │ │ +
86} // end namespace OpenSubdiv
│ │ │ │ +
87
│ │ │ │ +
88#endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │ + │ │ │ │ +
Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.
│ │ │ │ + │ │ │ │ +
GLuint BindVBO(void *deviceContext=NULL)
Returns the GL buffer object.
│ │ │ │ +
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ +
GLVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ +
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ +
static GLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glslPatchShaderSource.h │ │ │ │ │ +glVertexBuffer.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,83 +24,88 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/patchDescriptor.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ -38 │ │ │ │ │ -_4_0class _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ -41public: │ │ │ │ │ -_4_5 static std::string _G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -46 │ │ │ │ │ -_5_0 static std::string _G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -51 │ │ │ │ │ -59 │ │ │ │ │ -_6_0 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -61 │ │ │ │ │ -_6_2 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -63 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -64 │ │ │ │ │ -_6_5 static std::string _G_e_t_T_e_s_s_C_o_n_t_r_o_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -66 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -67 │ │ │ │ │ -_6_8 static std::string _G_e_t_T_e_s_s_E_v_a_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -69 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +30#include "../osd/opengl.h" │ │ │ │ │ +31#include │ │ │ │ │ +32 │ │ │ │ │ +33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +35 │ │ │ │ │ +36namespace Osd { │ │ │ │ │ +37 │ │ │ │ │ +_4_4class _G_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +45public: │ │ │ │ │ +_4_7 static _G_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +48 void *deviceContext = NULL); │ │ │ │ │ +49 │ │ │ │ │ +_5_1 _~_G_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ +52 │ │ │ │ │ +_5_5 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +56 void *deviceContext = NULL); │ │ │ │ │ +57 │ │ │ │ │ +_5_9 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +60 │ │ │ │ │ +_6_2 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +63 │ │ │ │ │ +_6_5 GLuint _B_i_n_d_V_B_O(void *deviceContext = NULL); │ │ │ │ │ +66 │ │ │ │ │ +67protected: │ │ │ │ │ +_6_9 _G_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ 70 │ │ │ │ │ -72}; │ │ │ │ │ -73 │ │ │ │ │ -74} // end namespace Osd │ │ │ │ │ -75 │ │ │ │ │ -76} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -77using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -78 │ │ │ │ │ -79} // end namespace OpenSubdiv │ │ │ │ │ +_7_3 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ +74 │ │ │ │ │ +75private: │ │ │ │ │ +76 int _numElements; │ │ │ │ │ +77 int _numVertices; │ │ │ │ │ +78 GLuint _vbo; │ │ │ │ │ +79}; │ │ │ │ │ 80 │ │ │ │ │ -81#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE │ │ │ │ │ +81} // end namespace Osd │ │ │ │ │ +82 │ │ │ │ │ +83} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +84using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +85 │ │ │ │ │ +86} // end namespace OpenSubdiv │ │ │ │ │ +87 │ │ │ │ │ +88#endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -Provides shader source which can be used by client code. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_P_a_t_c_h_D_r_a_w_i_n_g_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetPatchDrawingShaderSource() │ │ │ │ │ -Returns shader source which can be used while drawing piecewise parametric │ │ │ │ │ -patches resulting from sub... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_T_e_s_s_E_v_a_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_P_a_t_c_h_B_a_s_i_s_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetPatchBasisShaderSource() │ │ │ │ │ -Returns shader source which can be used to evaluate position and first and │ │ │ │ │ -second derivatives on piec... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetCommonShaderSource() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_:_: │ │ │ │ │ -_G_e_t_T_e_s_s_C_o_n_t_r_o_l_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +~GLVertexBuffer() │ │ │ │ │ +Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ +GLuint BindVBO(void *deviceContext=NULL) │ │ │ │ │ +Returns the GL buffer object. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ +int GetNumElements() const │ │ │ │ │ +Returns how many elements defined in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ +void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +GLVertexBuffer(int numElements, int numVertices) │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumVertices() const │ │ │ │ │ +Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Creator. Returns NULL if error. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate() │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00860.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
glVertexBuffer.h File Reference
│ │ │ │ +
glPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ #include "../osd/opengl.h"
│ │ │ │ -#include <cstddef>
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  GLVertexBuffer
 Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. More...
class  GLPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -glVertexBuffer.h File Reference │ │ │ │ │ +glPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ #include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ +  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00860.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00860 = [ │ │ │ │ │ - ["GLVertexBuffer", "a01245.html", "a01245"] │ │ │ │ │ + ["GLPatchTable", "a01237.html", "a01237"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glVertexBuffer.h
│ │ │ │ +
glPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,78 +119,200 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../osd/opengl.h"
│ │ │ │ -
31#include <cstddef>
│ │ │ │ -
32
│ │ │ │ -
33namespace OpenSubdiv {
│ │ │ │ -
34namespace OPENSUBDIV_VERSION {
│ │ │ │ +
30#include "../osd/nonCopyable.h"
│ │ │ │ +
31#include "../osd/opengl.h"
│ │ │ │ +
32#include "../osd/types.h"
│ │ │ │ +
33
│ │ │ │ +
34#include <vector>
│ │ │ │
35
│ │ │ │ -
36namespace Osd {
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45public:
│ │ │ │ -
47 static GLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ -
48 void *deviceContext = NULL);
│ │ │ │ -
49
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
55 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ -
56 void *deviceContext = NULL);
│ │ │ │ -
57
│ │ │ │ -
59 int GetNumElements() const;
│ │ │ │ -
60
│ │ │ │ -
62 int GetNumVertices() const;
│ │ │ │ +
36namespace OpenSubdiv {
│ │ │ │ +
37namespace OPENSUBDIV_VERSION {
│ │ │ │ +
38
│ │ │ │ +
39namespace Far{
│ │ │ │ +
40 class PatchTable;
│ │ │ │ +
41};
│ │ │ │ +
42
│ │ │ │ +
43namespace Osd {
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
45class GLPatchTable : private NonCopyable<GLPatchTable> {
│ │ │ │ +
46public:
│ │ │ │ +
47 typedef GLuint VertexBufferBinding;
│ │ │ │ +
48
│ │ │ │ + │ │ │ │ +
50
│ │ │ │ +
51 static GLPatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ +
52 void *deviceContext = NULL);
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 return _patchArrays;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 GLuint GetPatchIndexBuffer() const {
│ │ │ │ +
61 return _patchIndexBuffer;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │
63
│ │ │ │ -
65 GLuint BindVBO(void *deviceContext = NULL);
│ │ │ │ -
66
│ │ │ │ -
67protected:
│ │ │ │ -
69 GLVertexBuffer(int numElements, int numVertices);
│ │ │ │ -
70
│ │ │ │ -
73 bool allocate();
│ │ │ │ -
74
│ │ │ │ -
75private:
│ │ │ │ -
76 int _numElements;
│ │ │ │ -
77 int _numVertices;
│ │ │ │ -
78 GLuint _vbo;
│ │ │ │ -
79};
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81} // end namespace Osd
│ │ │ │ -
82
│ │ │ │ -
83} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
84using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
85
│ │ │ │ -
86} // end namespace OpenSubdiv
│ │ │ │ -
87
│ │ │ │ -
88#endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ -
Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.
│ │ │ │ - │ │ │ │ -
GLuint BindVBO(void *deviceContext=NULL)
Returns the GL buffer object.
│ │ │ │ -
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ -
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ -
GLVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ -
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ -
static GLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
65 GLuint GetPatchParamBuffer() const {
│ │ │ │ +
66 return _patchParamBuffer;
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 return _patchIndexTexture;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
76 return _patchParamTexture;
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
95 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
98 PatchArrayVector const &GetFVarPatchArrays(int fvarChannel = 0) const {
│ │ │ │ +
99 return _fvarPatchArrays[fvarChannel];
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101
│ │ │ │ +
│ │ │ │ +
103 GLuint GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ +
104 return _fvarIndexBuffers[fvarChannel];
│ │ │ │ +
105 }
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
│ │ │ │ +
108 GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel = 0) const {
│ │ │ │ +
109 return _fvarIndexTextures[fvarChannel];
│ │ │ │ +
110 }
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
│ │ │ │ +
113 GLuint GetFVarPatchParamBuffer(int fvarChannel = 0) const {
│ │ │ │ +
114 return _fvarParamBuffers[fvarChannel];
│ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
118 GLuint GetFVarPatchParamTextureBuffer(int fvarChannel = 0) const {
│ │ │ │ +
119 return _fvarParamTextures[fvarChannel];
│ │ │ │ +
120 }
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
122protected:
│ │ │ │ + │ │ │ │ +
124
│ │ │ │ +
125 // allocate buffers from patchTable
│ │ │ │ +
126 bool allocate(Far::PatchTable const *farPatchTable);
│ │ │ │ +
127
│ │ │ │ + │ │ │ │ +
129
│ │ │ │ + │ │ │ │ + │ │ │ │ +
132
│ │ │ │ + │ │ │ │ + │ │ │ │ +
135
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
139
│ │ │ │ +
140 std::vector<PatchArrayVector> _fvarPatchArrays;
│ │ │ │ +
141 std::vector<GLuint> _fvarIndexBuffers;
│ │ │ │ +
142 std::vector<GLuint> _fvarIndexTextures;
│ │ │ │ +
143
│ │ │ │ +
144 std::vector<GLuint> _fvarParamBuffers;
│ │ │ │ +
145 std::vector<GLuint> _fvarParamTextures;
│ │ │ │ +
146};
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
148
│ │ │ │ +
149} // end namespace Osd
│ │ │ │ +
150
│ │ │ │ +
151} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
152using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
153
│ │ │ │ +
154} // end namespace OpenSubdiv
│ │ │ │ +
155
│ │ │ │ +
156#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ +
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
PatchArrayVector const & GetPatchArrays() const
Returns the patch arrays for vertex index buffer data.
│ │ │ │ +
GLuint GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the GL index buffer containing face-varying control vertices.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
GLuint GetPatchParamTextureBuffer() const
Returns the GL texture buffer containing the patch parameter.
│ │ │ │ + │ │ │ │ +
bool allocate(Far::PatchTable const *farPatchTable)
│ │ │ │ +
static GLPatchTable * Create(Far::PatchTable const *farPatchTable, void *deviceContext=NULL)
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
GLuint GetPatchParamBuffer() const
Returns the GL index buffer containing the patch parameter.
│ │ │ │ +
GLuint GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the GL index buffer containing face-varying patch params.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel=0) const
Returns the GL texture buffer containing face-varying control vertices.
│ │ │ │ +
GLuint GetFVarPatchParamTextureBuffer(int fvarChannel=0) const
Returns the GL texture buffer containing face-varying patch params.
│ │ │ │ +
GLuint GetPatchIndexBuffer() const
Returns the GL index buffer containing the patch control vertices.
│ │ │ │ +
int GetNumFVarChannels() const
Returns the number of face-varying channel buffers.
│ │ │ │ +
PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const
Returns the patch arrays for face-varying index buffer data.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ +
GLuint GetPatchIndexTextureBuffer() const
Returns the GL texture buffer containing the patch control vertices.
│ │ │ │ +
GLuint GetVaryingPatchIndexTextureBuffer() const
Returns the GL texture buffer containing the varying control vertices.
│ │ │ │ + │ │ │ │ +
GLuint GetVaryingPatchIndexBuffer() const
Returns the GL index buffer containing the varying control vertices.
│ │ │ │ +
PatchArrayVector const & GetVaryingPatchArrays() const
Returns the patch arrays for varying index buffer data.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glVertexBuffer.h │ │ │ │ │ +glPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,88 +24,249 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/opengl.h" │ │ │ │ │ -31#include │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +30#include "../osd/nonCopyable.h" │ │ │ │ │ +31#include "../osd/opengl.h" │ │ │ │ │ +32#include "../osd/types.h" │ │ │ │ │ +33 │ │ │ │ │ +34#include │ │ │ │ │ 35 │ │ │ │ │ -36namespace Osd { │ │ │ │ │ -37 │ │ │ │ │ -_4_4class _G_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -45public: │ │ │ │ │ -_4_7 static _G_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -48 void *deviceContext = NULL); │ │ │ │ │ -49 │ │ │ │ │ -_5_1 _~_G_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ -52 │ │ │ │ │ -_5_5 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -56 void *deviceContext = NULL); │ │ │ │ │ -57 │ │ │ │ │ -_5_9 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -60 │ │ │ │ │ -_6_2 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +36namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +37namespace OPENSUBDIV_VERSION { │ │ │ │ │ +38 │ │ │ │ │ +39namespace Far{ │ │ │ │ │ +40 class PatchTable; │ │ │ │ │ +41}; │ │ │ │ │ +42 │ │ │ │ │ +43namespace Osd { │ │ │ │ │ +44 │ │ │ │ │ +_4_5class _G_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ +46public: │ │ │ │ │ +_4_7 typedef GLuint _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ +48 │ │ │ │ │ +_4_9 _~_G_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +50 │ │ │ │ │ +_5_1 static _G_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ +52 void *deviceContext = NULL); │ │ │ │ │ +53 │ │ │ │ │ +_5_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ +56 return ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 GLuint _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +61 return ___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +62 } │ │ │ │ │ 63 │ │ │ │ │ -_6_5 GLuint _B_i_n_d_V_B_O(void *deviceContext = NULL); │ │ │ │ │ -66 │ │ │ │ │ -67protected: │ │ │ │ │ -_6_9 _G_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -70 │ │ │ │ │ -_7_3 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ -74 │ │ │ │ │ -75private: │ │ │ │ │ -76 int _numElements; │ │ │ │ │ -77 int _numVertices; │ │ │ │ │ -78 GLuint _vbo; │ │ │ │ │ -79}; │ │ │ │ │ -80 │ │ │ │ │ -81} // end namespace Osd │ │ │ │ │ -82 │ │ │ │ │ -83} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -84using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -85 │ │ │ │ │ -86} // end namespace OpenSubdiv │ │ │ │ │ -87 │ │ │ │ │ -88#endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ +_6_5 GLuint _G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { │ │ │ │ │ +66 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +_7_0 GLuint _G_e_t_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +71 return ___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_5 GLuint _G_e_t_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +76 return ___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +_8_0 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ +81 return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +_8_5 GLuint _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +86 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +87 } │ │ │ │ │ +88 │ │ │ │ │ +_9_0 GLuint _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +91 return ___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +_9_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s(int fvarChannel = 0) const { │ │ │ │ │ +99 return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +_1_0_3 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +104 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +_1_0_8 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +109 return ___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s[fvarChannel]; │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +_1_1_3 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +114 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ +115 } │ │ │ │ │ +116 │ │ │ │ │ +_1_1_8 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +119 return ___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s[fvarChannel]; │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +122protected: │ │ │ │ │ +_1_2_3 _G_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +124 │ │ │ │ │ +125 // allocate buffers from patchTable │ │ │ │ │ +_1_2_6 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable); │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 GLuint ___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_1_3_1 GLuint ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +132 │ │ │ │ │ +_1_3_3 GLuint ___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ +_1_3_4 GLuint ___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e; │ │ │ │ │ +135 │ │ │ │ │ +_1_3_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_3_7 GLuint ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_1_3_8 GLuint ___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ +139 │ │ │ │ │ +_1_4_0 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_4_1 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ +_1_4_2 std::vector ___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s; │ │ │ │ │ +143 │ │ │ │ │ +_1_4_4 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ +_1_4_5 std::vector ___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s; │ │ │ │ │ +146}; │ │ │ │ │ +147 │ │ │ │ │ +148 │ │ │ │ │ +149} // end namespace Osd │ │ │ │ │ +150 │ │ │ │ │ +151} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +152using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +153 │ │ │ │ │ +154} // end namespace OpenSubdiv │ │ │ │ │ +155 │ │ │ │ │ +156#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -~GLVertexBuffer() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ -GLuint BindVBO(void *deviceContext=NULL) │ │ │ │ │ -Returns the GL buffer object. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ -int GetNumElements() const │ │ │ │ │ -Returns how many elements defined in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ -void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchArray > PatchArrayVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ +GLuint VertexBufferBinding │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< GLuint > _fvarIndexBuffers │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ +Returns the patch arrays for vertex index buffer data. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +GLuint GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the GL index buffer containing face-varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_~_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~GLPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< GLuint > _fvarParamBuffers │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetPatchParamTextureBuffer() const │ │ │ │ │ +Returns the GL texture buffer containing the patch parameter. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +GLuint _varyingIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(Far::PatchTable const *farPatchTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLPatchTable * Create(Far::PatchTable const *farPatchTable, void │ │ │ │ │ *deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -GLVertexBuffer(int numElements, int numVertices) │ │ │ │ │ -Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumVertices() const │ │ │ │ │ -Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Creator. Returns NULL if error. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e │ │ │ │ │ +GLuint _varyingIndexTexture │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s │ │ │ │ │ +std::vector< GLuint > _fvarParamTextures │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +GLuint _patchIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +GLuint GetPatchParamBuffer() const │ │ │ │ │ +Returns the GL index buffer containing the patch parameter. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +GLuint GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the GL index buffer containing face-varying patch params. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e │ │ │ │ │ +GLuint _patchParamTexture │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +GLPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the GL texture buffer containing face-varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetFVarPatchParamTextureBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the GL texture buffer containing face-varying patch params. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +GLuint GetPatchIndexBuffer() const │ │ │ │ │ +Returns the GL index buffer containing the patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int GetNumFVarChannels() const │ │ │ │ │ +Returns the number of face-varying channel buffers. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const │ │ │ │ │ +Returns the patch arrays for face-varying index buffer data. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s │ │ │ │ │ +std::vector< GLuint > _fvarIndexTextures │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e │ │ │ │ │ +GLuint _patchIndexTexture │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetPatchIndexTextureBuffer() const │ │ │ │ │ +Returns the GL texture buffer containing the patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetVaryingPatchIndexTextureBuffer() const │ │ │ │ │ +Returns the GL texture buffer containing the varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _varyingPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +GLuint GetVaryingPatchIndexBuffer() const │ │ │ │ │ +Returns the GL index buffer containing the varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector const & GetVaryingPatchArrays() const │ │ │ │ │ +Returns the patch arrays for varying index buffer data. │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +GLuint _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_1 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00863.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glMesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,44 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
cpuGLVertexBuffer.h File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
glMesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include "../osd/opengl.h"
│ │ │ │ +#include "../osd/mesh.h"
│ │ │ │ +#include "../osd/glPatchTable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  CpuGLVertexBuffer
 Concrete vertex buffer class for cpu subdivision and OpenGL drawing. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

typedef MeshInterface< GLPatchTableGLMeshInterface
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cpuGLVertexBuffer.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +glMesh.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_g_l_P_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for cpu subdivision and OpenGL drawing. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +typedef _M_e_s_h_I_n_t_e_r_f_a_c_e< _G_L_P_a_t_c_h_T_a_b_l_e >  _G_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _g_l_M_e_s_h_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00863 = [ │ │ │ │ │ - ["CpuGLVertexBuffer", "a01169.html", "a01169"] │ │ │ │ │ + ["GLMeshInterface", "a00863.html#a7f9cf2b729178bdbb847fc4afd91af9e", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glMesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cpuGLVertexBuffer.h
│ │ │ │ +
glMesh.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,83 +119,45 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <cstddef>
│ │ │ │ -
31#include "../osd/opengl.h"
│ │ │ │ +
30#include "../osd/mesh.h"
│ │ │ │ +
31#include "../osd/glPatchTable.h"
│ │ │ │
32
│ │ │ │
33namespace OpenSubdiv {
│ │ │ │
34namespace OPENSUBDIV_VERSION {
│ │ │ │
35
│ │ │ │
36namespace Osd {
│ │ │ │
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48public:
│ │ │ │ -
50 static CpuGLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ -
51 void *deviceContext = NULL);
│ │ │ │ -
52
│ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
58 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ -
59 void *deviceContext = NULL);
│ │ │ │ -
60
│ │ │ │ -
62 int GetNumElements() const;
│ │ │ │ -
63
│ │ │ │ -
65 int GetNumVertices() const;
│ │ │ │ -
66
│ │ │ │ -
69 float * BindCpuBuffer();
│ │ │ │ -
70
│ │ │ │ -
73 GLuint BindVBO(void *deviceContext = NULL);
│ │ │ │ -
74
│ │ │ │ -
75protected:
│ │ │ │ -
77 CpuGLVertexBuffer(int numElements, int numVertices);
│ │ │ │ -
78
│ │ │ │ -
80 bool allocate();
│ │ │ │ -
81
│ │ │ │ -
82private:
│ │ │ │ -
83 int _numElements;
│ │ │ │ -
84 int _numVertices;
│ │ │ │ -
85 GLuint _vbo;
│ │ │ │ -
86 float *_cpuBuffer;
│ │ │ │ -
87 bool _dataDirty;
│ │ │ │ -
88};
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
90} // end namespace Osd
│ │ │ │ -
91
│ │ │ │ -
92} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
93using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
94
│ │ │ │ -
95} // end namespace OpenSubdiv
│ │ │ │ -
96
│ │ │ │ -
97#endif // OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ -
Concrete vertex buffer class for cpu subdivision and OpenGL drawing.
│ │ │ │ -
CpuGLVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ - │ │ │ │ -
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ -
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ -
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ -
static CpuGLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ -
bool allocate()
Allocates VBO for this buffer. Returns true if success.
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
39
│ │ │ │ +
40
│ │ │ │ +
41} // end namespace Osd
│ │ │ │ +
42
│ │ │ │ +
43} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
44using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
45
│ │ │ │ +
46} // end namespace OpenSubdiv
│ │ │ │ +
47
│ │ │ │ +
48#endif // OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ + │ │ │ │ +
MeshInterface< GLPatchTable > GLMeshInterface
Definition glMesh.h:38
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuGLVertexBuffer.h │ │ │ │ │ +glMesh.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,94 +24,42 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ -31#include "../osd/opengl.h" │ │ │ │ │ +30#include "../osd/mesh.h" │ │ │ │ │ +31#include "../osd/glPatchTable.h" │ │ │ │ │ 32 │ │ │ │ │ 33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ 34namespace OPENSUBDIV_VERSION { │ │ │ │ │ 35 │ │ │ │ │ 36namespace Osd { │ │ │ │ │ 37 │ │ │ │ │ -_4_7class _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -48public: │ │ │ │ │ -_5_0 static _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -51 void *deviceContext = NULL); │ │ │ │ │ -52 │ │ │ │ │ -_5_4 _~_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ -55 │ │ │ │ │ -_5_8 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -59 void *deviceContext = NULL); │ │ │ │ │ -60 │ │ │ │ │ -_6_2 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -63 │ │ │ │ │ -_6_5 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ -66 │ │ │ │ │ -_6_9 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ -70 │ │ │ │ │ -_7_3 GLuint _B_i_n_d_V_B_O(void *deviceContext = NULL); │ │ │ │ │ -74 │ │ │ │ │ -75protected: │ │ │ │ │ -_7_7 _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -78 │ │ │ │ │ -_8_0 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ -81 │ │ │ │ │ -82private: │ │ │ │ │ -83 int _numElements; │ │ │ │ │ -84 int _numVertices; │ │ │ │ │ -85 GLuint _vbo; │ │ │ │ │ -86 float *_cpuBuffer; │ │ │ │ │ -87 bool _dataDirty; │ │ │ │ │ -88}; │ │ │ │ │ -89 │ │ │ │ │ -90} // end namespace Osd │ │ │ │ │ -91 │ │ │ │ │ -92} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -93using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -94 │ │ │ │ │ -95} // end namespace OpenSubdiv │ │ │ │ │ -96 │ │ │ │ │ -97#endif // OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ +_3_8typedef _M_e_s_h_I_n_t_e_r_f_a_c_e_<_G_L_P_a_t_c_h_T_a_b_l_e_> _G_L_M_e_s_h_I_n_t_e_r_f_a_c_e; │ │ │ │ │ +39 │ │ │ │ │ +40 │ │ │ │ │ +41} // end namespace Osd │ │ │ │ │ +42 │ │ │ │ │ +43} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +44using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +45 │ │ │ │ │ +46} // end namespace OpenSubdiv │ │ │ │ │ +47 │ │ │ │ │ +48#endif // OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for cpu subdivision and OpenGL drawing. │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CpuGLVertexBuffer(int numElements, int numVertices) │ │ │ │ │ -Constructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ -GLuint BindVBO(void *deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ -int GetNumElements() const │ │ │ │ │ -Returns how many elements defined in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ -void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumVertices() const │ │ │ │ │ -Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CpuGLVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Creator. Returns NULL if error. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate() │ │ │ │ │ -Allocates VBO for this buffer. Returns true if success. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_p_u_B_u_f_f_e_r │ │ │ │ │ -float * BindCpuBuffer() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -~CpuGLVertexBuffer() │ │ │ │ │ -Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +MeshInterface< GLPatchTable > GLMeshInterface │ │ │ │ │ +DDeeffiinniittiioonn _g_l_M_e_s_h_._h_:_3_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_6_8 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _g_l_M_e_s_h_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00866.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbKernel.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,51 +88,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
tbbKernel.h File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
glLegacyGregoryPatchTable.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchDescriptor.h"
│ │ │ │ -#include "../far/patchParam.h"
│ │ │ │ +#include "../far/patchTable.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/opengl.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  GLLegacyGregoryPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, int start, int end)
 
void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, float const *duWeights, float const *dvWeights, int start, int end)
 
void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, float *dstDuu, BufferDescriptor const &dstDuuDesc, float *dstDuv, BufferDescriptor const &dstDuvDesc, float *dstDvv, BufferDescriptor const &dstDvvDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, float const *duWeights, float const *dvWeights, float const *duuWeights, float const *duvWeights, float const *dvvWeights, int start, int end)
 
void TbbEvalPatches (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 
void TbbEvalPatches (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, float *dstDuu, BufferDescriptor const &dstDuuDesc, float *dstDuv, BufferDescriptor const &dstDuvDesc, float *dstDvv, BufferDescriptor const &dstDvvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,59 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -tbbKernel.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +glLegacyGregoryPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_P_a_r_a_m_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ +#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ - *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, int const *sizes, int const │ │ │ │ │ - *offsets, int const *indices, float const *weights, int start, int end) │ │ │ │ │ -  │ │ │ │ │ -void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ - *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ - const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, int │ │ │ │ │ - const *sizes, int const *offsets, int const *indices, float const │ │ │ │ │ - *weights, float const *duWeights, float const *dvWeights, int start, int │ │ │ │ │ - end) │ │ │ │ │ -  │ │ │ │ │ -void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ - *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ - const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, float │ │ │ │ │ - *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, float *dstDuv, │ │ │ │ │ - _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const │ │ │ │ │ - &dstDvvDesc, int const *sizes, int const *offsets, int const *indices, │ │ │ │ │ - float const *weights, float const *duWeights, float const *dvWeights, │ │ │ │ │ - float const *duuWeights, float const *duvWeights, float const │ │ │ │ │ - *dvvWeights, int start, int end) │ │ │ │ │ -  │ │ │ │ │ -void  _T_b_b_E_v_a_l_P_a_t_c_h_e_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ - *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ - const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, int │ │ │ │ │ - numPatchCoords, const _P_a_t_c_h_C_o_o_r_d *patchCoords, const _P_a_t_c_h_A_r_r_a_y │ │ │ │ │ - *patchArrayBuffer, const int *patchIndexBuffer, const _P_a_t_c_h_P_a_r_a_m │ │ │ │ │ - *patchParamBuffer) │ │ │ │ │ -  │ │ │ │ │ -void  _T_b_b_E_v_a_l_P_a_t_c_h_e_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ - *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ - const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, float │ │ │ │ │ - *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, float *dstDuv, │ │ │ │ │ - _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const │ │ │ │ │ - &dstDvvDesc, int numPatchCoords, const _P_a_t_c_h_C_o_o_r_d *patchCoords, const │ │ │ │ │ - _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, const int *patchIndexBuffer, const │ │ │ │ │ - _P_a_t_c_h_P_a_r_a_m *patchParamBuffer) │ │ │ │ │ -  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ + * _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,7 +1,3 @@ │ │ │ │ │ var a00866 = [ │ │ │ │ │ - ["TbbEvalPatches", "a00866.html#aa0c3c264a43eeddc5cb3a58b006d3d32", null], │ │ │ │ │ - ["TbbEvalPatches", "a00866.html#a20e08be34d6183b6943ed7a1586eca4a", null], │ │ │ │ │ - ["TbbEvalStencils", "a00866.html#aa65ed860a2fa5935d99129a898a8f0b6", null], │ │ │ │ │ - ["TbbEvalStencils", "a00866.html#af23c35537952bfdd493441e5c42ff2ed", null], │ │ │ │ │ - ["TbbEvalStencils", "a00866.html#a4a6a0fcc01638f2a0316b32ad158b485", null] │ │ │ │ │ + ["GLLegacyGregoryPatchTable", "a01233.html", "a01233"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbKernel.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
tbbKernel.h
│ │ │ │ +
glLegacyGregoryPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,116 +119,103 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include "../far/patchDescriptor.h"
│ │ │ │ -
30#include "../far/patchParam.h"
│ │ │ │ -
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ -
34
│ │ │ │ -
35namespace Osd {
│ │ │ │ +
29
│ │ │ │ +
30#include "../far/patchTable.h"
│ │ │ │ +
31#include "../osd/nonCopyable.h"
│ │ │ │ +
32#include "../osd/opengl.h"
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │
36
│ │ │ │ -
37struct PatchArray;
│ │ │ │ -
38struct PatchCoord;
│ │ │ │ -
39struct PatchParam;
│ │ │ │ -
40struct BufferDescriptor;
│ │ │ │ -
41
│ │ │ │ -
42void
│ │ │ │ -
43TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ -
44 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
45 int const * sizes,
│ │ │ │ -
46 int const * offsets,
│ │ │ │ -
47 int const * indices,
│ │ │ │ -
48 float const * weights,
│ │ │ │ -
49 int start, int end);
│ │ │ │ -
50
│ │ │ │ -
51void
│ │ │ │ -
52TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ -
53 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
54 float * dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ -
55 float * dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ -
56 int const * sizes,
│ │ │ │ -
57 int const * offsets,
│ │ │ │ -
58 int const * indices,
│ │ │ │ -
59 float const * weights,
│ │ │ │ -
60 float const * duWeights,
│ │ │ │ -
61 float const * dvWeights,
│ │ │ │ -
62 int start, int end);
│ │ │ │ -
63
│ │ │ │ -
64void
│ │ │ │ -
65TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ -
66 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
67 float * dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ -
68 float * dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ -
69 float * dstDuu, BufferDescriptor const &dstDuuDesc,
│ │ │ │ -
70 float * dstDuv, BufferDescriptor const &dstDuvDesc,
│ │ │ │ -
71 float * dstDvv, BufferDescriptor const &dstDvvDesc,
│ │ │ │ -
72 int const * sizes,
│ │ │ │ -
73 int const * offsets,
│ │ │ │ -
74 int const * indices,
│ │ │ │ -
75 float const * weights,
│ │ │ │ -
76 float const * duWeights,
│ │ │ │ -
77 float const * dvWeights,
│ │ │ │ -
78 float const * duuWeights,
│ │ │ │ -
79 float const * duvWeights,
│ │ │ │ -
80 float const * dvvWeights,
│ │ │ │ -
81 int start, int end);
│ │ │ │ -
82
│ │ │ │ -
83void
│ │ │ │ -
84TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
85 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
86 float *dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ -
87 float *dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ -
88 int numPatchCoords,
│ │ │ │ -
89 const PatchCoord *patchCoords,
│ │ │ │ -
90 const PatchArray *patchArrayBuffer,
│ │ │ │ -
91 const int *patchIndexBuffer,
│ │ │ │ -
92 const PatchParam *patchParamBuffer);
│ │ │ │ -
93
│ │ │ │ -
94void
│ │ │ │ -
95TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
96 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
97 float *dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ -
98 float *dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ -
99 float *dstDuu, BufferDescriptor const &dstDuuDesc,
│ │ │ │ -
100 float *dstDuv, BufferDescriptor const &dstDuvDesc,
│ │ │ │ -
101 float *dstDvv, BufferDescriptor const &dstDvvDesc,
│ │ │ │ -
102 int numPatchCoords,
│ │ │ │ -
103 const PatchCoord *patchCoords,
│ │ │ │ -
104 const PatchArray *patchArrayBuffer,
│ │ │ │ -
105 const int *patchIndexBuffer,
│ │ │ │ -
106 const PatchParam *patchParamBuffer);
│ │ │ │ -
107
│ │ │ │ -
108} // end namespace Osd
│ │ │ │ -
109
│ │ │ │ -
110} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
111using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
112
│ │ │ │ -
113} // end namespace OpenSubdiv
│ │ │ │ -
114
│ │ │ │ -
115#endif // OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │ - │ │ │ │ -
void TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
│ │ │ │ -
void TbbEvalStencils(float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, int start, int end)
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ -
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ - │ │ │ │ - │ │ │ │ +
37namespace Osd {
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40 : private NonCopyable<GLLegacyGregoryPatchTable> {
│ │ │ │ +
41public:
│ │ │ │ + │ │ │ │ +
43
│ │ │ │ + │ │ │ │ +
45
│ │ │ │ +
46 void UpdateVertexBuffer(GLuint vbo);
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 GLuint GetVertexTextureBuffer() const {
│ │ │ │ +
49 return _vertexTextureBuffer;
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53 return _vertexValenceTextureBuffer;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 return _quadOffsetsTextureBuffer;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
62 return _quadOffsetsBase[1];
│ │ │ │ +
63 }
│ │ │ │ +
64 return _quadOffsetsBase[0];
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67protected:
│ │ │ │ + │ │ │ │ +
69
│ │ │ │ +
70private:
│ │ │ │ +
71 GLuint _vertexTextureBuffer;
│ │ │ │ +
72 GLuint _vertexValenceTextureBuffer;
│ │ │ │ +
73 GLuint _quadOffsetsTextureBuffer;
│ │ │ │ +
74 GLuint _quadOffsetsBase[2]; // gregory, boundaryGregory
│ │ │ │ +
75};
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
77
│ │ │ │ +
78
│ │ │ │ +
79} // end namespace Osd
│ │ │ │ +
80
│ │ │ │ +
81} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
82using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
83
│ │ │ │ +
84} // end namespace OpenSubdiv
│ │ │ │ +
85
│ │ │ │ +
86#endif // OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static GLLegacyGregoryPatchTable * Create(Far::PatchTable const *patchTable)
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -tbbKernel.h │ │ │ │ │ +glLegacyGregoryPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,126 +24,113 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../far/patchDescriptor.h" │ │ │ │ │ -30#include "../far/patchParam.h" │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ +29 │ │ │ │ │ +30#include "../far/patchTable.h" │ │ │ │ │ +31#include "../osd/nonCopyable.h" │ │ │ │ │ +32#include "../osd/opengl.h" │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ 36 │ │ │ │ │ -37struct PatchArray; │ │ │ │ │ -38struct PatchCoord; │ │ │ │ │ -39struct PatchParam; │ │ │ │ │ -40struct BufferDescriptor; │ │ │ │ │ -41 │ │ │ │ │ -42void │ │ │ │ │ -_4_3_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -44 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -45 int const * sizes, │ │ │ │ │ -46 int const * offsets, │ │ │ │ │ -47 int const * indices, │ │ │ │ │ -48 float const * weights, │ │ │ │ │ -49 int start, int end); │ │ │ │ │ -50 │ │ │ │ │ -51void │ │ │ │ │ -_5_2_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -53 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -54 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -55 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -56 int const * sizes, │ │ │ │ │ -57 int const * offsets, │ │ │ │ │ -58 int const * indices, │ │ │ │ │ -59 float const * weights, │ │ │ │ │ -60 float const * duWeights, │ │ │ │ │ -61 float const * dvWeights, │ │ │ │ │ -62 int start, int end); │ │ │ │ │ -63 │ │ │ │ │ -64void │ │ │ │ │ -_6_5_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -66 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -67 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -68 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -69 float * dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ -70 float * dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ -71 float * dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ -72 int const * sizes, │ │ │ │ │ -73 int const * offsets, │ │ │ │ │ -74 int const * indices, │ │ │ │ │ -75 float const * weights, │ │ │ │ │ -76 float const * duWeights, │ │ │ │ │ -77 float const * dvWeights, │ │ │ │ │ -78 float const * duuWeights, │ │ │ │ │ -79 float const * duvWeights, │ │ │ │ │ -80 float const * dvvWeights, │ │ │ │ │ -81 int start, int end); │ │ │ │ │ -82 │ │ │ │ │ -83void │ │ │ │ │ -_8_4_T_b_b_E_v_a_l_P_a_t_c_h_e_s(float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -85 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -86 float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -87 float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -88 int numPatchCoords, │ │ │ │ │ -89 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ -90 const _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, │ │ │ │ │ -91 const int *patchIndexBuffer, │ │ │ │ │ -92 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ -93 │ │ │ │ │ -94void │ │ │ │ │ -_9_5_T_b_b_E_v_a_l_P_a_t_c_h_e_s(float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -96 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -97 float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -98 float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -99 float *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ -100 float *dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ -101 float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ -102 int numPatchCoords, │ │ │ │ │ -103 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ -104 const _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, │ │ │ │ │ -105 const int *patchIndexBuffer, │ │ │ │ │ -106 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ -107 │ │ │ │ │ -108} // end namespace Osd │ │ │ │ │ -109 │ │ │ │ │ -110} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -111using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -112 │ │ │ │ │ -113} // end namespace OpenSubdiv │ │ │ │ │ -114 │ │ │ │ │ -115#endif // OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_3_9class _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +40 : private NonCopyable { │ │ │ │ │ +41public: │ │ │ │ │ +_4_2 _~_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +43 │ │ │ │ │ +_4_4 static _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable); │ │ │ │ │ +45 │ │ │ │ │ +_4_6 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(GLuint vbo); │ │ │ │ │ +47 │ │ │ │ │ +_4_8 GLuint _G_e_t_V_e_r_t_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +49 return _vertexTextureBuffer; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +_5_2 GLuint _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +53 return _vertexValenceTextureBuffer; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +_5_6 GLuint _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ +57 return _quadOffsetsTextureBuffer; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_0 GLuint _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) { │ │ │ │ │ +61 if (type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) { │ │ │ │ │ +62 return _quadOffsetsBase[1]; │ │ │ │ │ +63 } │ │ │ │ │ +64 return _quadOffsetsBase[0]; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +67protected: │ │ │ │ │ +_6_8 _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +69 │ │ │ │ │ +70private: │ │ │ │ │ +71 GLuint _vertexTextureBuffer; │ │ │ │ │ +72 GLuint _vertexValenceTextureBuffer; │ │ │ │ │ +73 GLuint _quadOffsetsTextureBuffer; │ │ │ │ │ +74 GLuint _quadOffsetsBase[2]; // gregory, boundaryGregory │ │ │ │ │ +75}; │ │ │ │ │ +76 │ │ │ │ │ +77 │ │ │ │ │ +78 │ │ │ │ │ +79} // end namespace Osd │ │ │ │ │ +80 │ │ │ │ │ +81} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +82using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +83 │ │ │ │ │ +84} // end namespace OpenSubdiv │ │ │ │ │ +85 │ │ │ │ │ +86#endif // OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_T_b_b_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -void TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc, float │ │ │ │ │ -*dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const │ │ │ │ │ -&dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int │ │ │ │ │ -numPatchCoords, const PatchCoord *patchCoords, const PatchArray │ │ │ │ │ -*patchArrayBuffer, const int *patchIndexBuffer, const PatchParam │ │ │ │ │ -*patchParamBuffer) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -void TbbEvalStencils(float const *src, BufferDescriptor const &srcDesc, float │ │ │ │ │ -*dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, │ │ │ │ │ -int const *indices, float const *weights, int start, int end) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ -Coordinates set on a patch table. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ +Type │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ +@ GREGORY_BOUNDARY │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Container for arrays of parametric patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetVertexValenceTextureBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetQuadOffsetsTextureBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_~_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~GLLegacyGregoryPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +GLLegacyGregoryPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +void UpdateVertexBuffer(GLuint vbo) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ +GLuint GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ +DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_V_e_r_t_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ +GLuint GetVertexTextureBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static GLLegacyGregoryPatchTable * Create(Far::PatchTable const *patchTable) │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ + * _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00869.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,27 +90,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
glLegacyGregoryPatchTable.h File Reference
│ │ │ │ +
cpuGLVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/patchTable.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ +#include <cstddef>
│ │ │ │ #include "../osd/opengl.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  GLLegacyGregoryPatchTable
class  CpuGLVertexBuffer
 Concrete vertex buffer class for cpu subdivision and OpenGL drawing. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,13 +119,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -glLegacyGregoryPatchTable.h File Reference │ │ │ │ │ +cpuGLVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ +#include │ │ │ │ │ #include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for cpu subdivision and OpenGL drawing. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00869 = [ │ │ │ │ │ - ["GLLegacyGregoryPatchTable", "a01233.html", "a01233"] │ │ │ │ │ + ["CpuGLVertexBuffer", "a01169.html", "a01169"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glLegacyGregoryPatchTable.h
│ │ │ │ +
cpuGLVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,103 +119,83 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../far/patchTable.h"
│ │ │ │ -
31#include "../osd/nonCopyable.h"
│ │ │ │ -
32#include "../osd/opengl.h"
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ -
36
│ │ │ │ -
37namespace Osd {
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 : private NonCopyable<GLLegacyGregoryPatchTable> {
│ │ │ │ -
41public:
│ │ │ │ - │ │ │ │ -
43
│ │ │ │ - │ │ │ │ -
45
│ │ │ │ -
46 void UpdateVertexBuffer(GLuint vbo);
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 GLuint GetVertexTextureBuffer() const {
│ │ │ │ -
49 return _vertexTextureBuffer;
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53 return _vertexValenceTextureBuffer;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ +
30#include <cstddef>
│ │ │ │ +
31#include "../osd/opengl.h"
│ │ │ │ +
32
│ │ │ │ +
33namespace OpenSubdiv {
│ │ │ │ +
34namespace OPENSUBDIV_VERSION {
│ │ │ │ +
35
│ │ │ │ +
36namespace Osd {
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
48public:
│ │ │ │ +
50 static CpuGLVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
51 void *deviceContext = NULL);
│ │ │ │ +
52
│ │ │ │ + │ │ │ │
55
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 return _quadOffsetsTextureBuffer;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
62 return _quadOffsetsBase[1];
│ │ │ │ -
63 }
│ │ │ │ -
64 return _quadOffsetsBase[0];
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ +
58 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
59 void *deviceContext = NULL);
│ │ │ │ +
60
│ │ │ │ +
62 int GetNumElements() const;
│ │ │ │ +
63
│ │ │ │ +
65 int GetNumVertices() const;
│ │ │ │
66
│ │ │ │ -
67protected:
│ │ │ │ - │ │ │ │ -
69
│ │ │ │ -
70private:
│ │ │ │ -
71 GLuint _vertexTextureBuffer;
│ │ │ │ -
72 GLuint _vertexValenceTextureBuffer;
│ │ │ │ -
73 GLuint _quadOffsetsTextureBuffer;
│ │ │ │ -
74 GLuint _quadOffsetsBase[2]; // gregory, boundaryGregory
│ │ │ │ -
75};
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ +
69 float * BindCpuBuffer();
│ │ │ │ +
70
│ │ │ │ +
73 GLuint BindVBO(void *deviceContext = NULL);
│ │ │ │ +
74
│ │ │ │ +
75protected:
│ │ │ │ +
77 CpuGLVertexBuffer(int numElements, int numVertices);
│ │ │ │
78
│ │ │ │ -
79} // end namespace Osd
│ │ │ │ -
80
│ │ │ │ -
81} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
82using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
83
│ │ │ │ -
84} // end namespace OpenSubdiv
│ │ │ │ -
85
│ │ │ │ -
86#endif // OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static GLLegacyGregoryPatchTable * Create(Far::PatchTable const *patchTable)
│ │ │ │ +
80 bool allocate();
│ │ │ │ +
81
│ │ │ │ +
82private:
│ │ │ │ +
83 int _numElements;
│ │ │ │ +
84 int _numVertices;
│ │ │ │ +
85 GLuint _vbo;
│ │ │ │ +
86 float *_cpuBuffer;
│ │ │ │ +
87 bool _dataDirty;
│ │ │ │ +
88};
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
90} // end namespace Osd
│ │ │ │ +
91
│ │ │ │ +
92} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
93using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
94
│ │ │ │ +
95} // end namespace OpenSubdiv
│ │ │ │ +
96
│ │ │ │ +
97#endif // OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
│ │ │ │ + │ │ │ │ +
Concrete vertex buffer class for cpu subdivision and OpenGL drawing.
│ │ │ │ +
CpuGLVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ + │ │ │ │ +
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ +
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ +
static CpuGLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ +
bool allocate()
Allocates VBO for this buffer. Returns true if success.
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glLegacyGregoryPatchTable.h │ │ │ │ │ +cpuGLVertexBuffer.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,113 +24,94 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/patchTable.h" │ │ │ │ │ -31#include "../osd/nonCopyable.h" │ │ │ │ │ -32#include "../osd/opengl.h" │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ -38 │ │ │ │ │ -_3_9class _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -40 : private NonCopyable { │ │ │ │ │ -41public: │ │ │ │ │ -_4_2 _~_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -43 │ │ │ │ │ -_4_4 static _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable); │ │ │ │ │ -45 │ │ │ │ │ -_4_6 void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(GLuint vbo); │ │ │ │ │ -47 │ │ │ │ │ -_4_8 GLuint _G_e_t_V_e_r_t_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -49 return _vertexTextureBuffer; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -_5_2 GLuint _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -53 return _vertexValenceTextureBuffer; │ │ │ │ │ -54 } │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../osd/opengl.h" │ │ │ │ │ +32 │ │ │ │ │ +33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +35 │ │ │ │ │ +36namespace Osd { │ │ │ │ │ +37 │ │ │ │ │ +_4_7class _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +48public: │ │ │ │ │ +_5_0 static _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +51 void *deviceContext = NULL); │ │ │ │ │ +52 │ │ │ │ │ +_5_4 _~_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ 55 │ │ │ │ │ -_5_6 GLuint _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -57 return _quadOffsetsTextureBuffer; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -_6_0 GLuint _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e(_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type) { │ │ │ │ │ -61 if (type == _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y) { │ │ │ │ │ -62 return _quadOffsetsBase[1]; │ │ │ │ │ -63 } │ │ │ │ │ -64 return _quadOffsetsBase[0]; │ │ │ │ │ -65 } │ │ │ │ │ +_5_8 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +59 void *deviceContext = NULL); │ │ │ │ │ +60 │ │ │ │ │ +_6_2 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +63 │ │ │ │ │ +_6_5 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ 66 │ │ │ │ │ -67protected: │ │ │ │ │ -_6_8 _G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -69 │ │ │ │ │ -70private: │ │ │ │ │ -71 GLuint _vertexTextureBuffer; │ │ │ │ │ -72 GLuint _vertexValenceTextureBuffer; │ │ │ │ │ -73 GLuint _quadOffsetsTextureBuffer; │ │ │ │ │ -74 GLuint _quadOffsetsBase[2]; // gregory, boundaryGregory │ │ │ │ │ -75}; │ │ │ │ │ -76 │ │ │ │ │ -77 │ │ │ │ │ +_6_9 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ +70 │ │ │ │ │ +_7_3 GLuint _B_i_n_d_V_B_O(void *deviceContext = NULL); │ │ │ │ │ +74 │ │ │ │ │ +75protected: │ │ │ │ │ +_7_7 _C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ 78 │ │ │ │ │ -79} // end namespace Osd │ │ │ │ │ -80 │ │ │ │ │ -81} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -82using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -83 │ │ │ │ │ -84} // end namespace OpenSubdiv │ │ │ │ │ -85 │ │ │ │ │ -86#endif // OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +_8_0 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ +81 │ │ │ │ │ +82private: │ │ │ │ │ +83 int _numElements; │ │ │ │ │ +84 int _numVertices; │ │ │ │ │ +85 GLuint _vbo; │ │ │ │ │ +86 float *_cpuBuffer; │ │ │ │ │ +87 bool _dataDirty; │ │ │ │ │ +88}; │ │ │ │ │ +89 │ │ │ │ │ +90} // end namespace Osd │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +93using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +94 │ │ │ │ │ +95} // end namespace OpenSubdiv │ │ │ │ │ +96 │ │ │ │ │ +97#endif // OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e │ │ │ │ │ -Type │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y │ │ │ │ │ -@ GREGORY_BOUNDARY │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetVertexValenceTextureBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetQuadOffsetsTextureBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_~_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~GLLegacyGregoryPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -GLLegacyGregoryPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -void UpdateVertexBuffer(GLuint vbo) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_Q_u_a_d_O_f_f_s_e_t_s_B_a_s_e │ │ │ │ │ -GLuint GetQuadOffsetsBase(Far::PatchDescriptor::Type type) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_e_r_t_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetVertexTextureBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h_:_4_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLLegacyGregoryPatchTable * Create(Far::PatchTable const *patchTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for cpu subdivision and OpenGL drawing. │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CpuGLVertexBuffer(int numElements, int numVertices) │ │ │ │ │ +Constructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ +GLuint BindVBO(void *deviceContext=NULL) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ +int GetNumElements() const │ │ │ │ │ +Returns how many elements defined in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ +void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumVertices() const │ │ │ │ │ +Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CpuGLVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Creator. Returns NULL if error. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate() │ │ │ │ │ +Allocates VBO for this buffer. Returns true if success. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_p_u_B_u_f_f_e_r │ │ │ │ │ +float * BindCpuBuffer() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +~CpuGLVertexBuffer() │ │ │ │ │ +Destructor. │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_L_e_g_a_c_y_G_r_e_g_o_r_y_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00872.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbKernel.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,47 +88,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
glPatchTable.h File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
tbbKernel.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/opengl.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ -#include <vector>
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../far/patchParam.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  GLPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, int start, int end)
 
void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, float const *duWeights, float const *dvWeights, int start, int end)
 
void TbbEvalStencils (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, float *dstDuu, BufferDescriptor const &dstDuuDesc, float *dstDuv, BufferDescriptor const &dstDuvDesc, float *dstDvv, BufferDescriptor const &dstDvvDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, float const *duWeights, float const *dvWeights, float const *duuWeights, float const *duvWeights, float const *dvvWeights, int start, int end)
 
void TbbEvalPatches (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 
void TbbEvalPatches (float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, float *dstDuu, BufferDescriptor const &dstDuuDesc, float *dstDuv, BufferDescriptor const &dstDuvDesc, float *dstDvv, BufferDescriptor const &dstDvvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,59 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -glPatchTable.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +tbbKernel.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_g_l_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_P_a_r_a_m_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ + *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, int const *sizes, int const │ │ │ │ │ + *offsets, int const *indices, float const *weights, int start, int end) │ │ │ │ │ +  │ │ │ │ │ +void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ + *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ + const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, int │ │ │ │ │ + const *sizes, int const *offsets, int const *indices, float const │ │ │ │ │ + *weights, float const *duWeights, float const *dvWeights, int start, int │ │ │ │ │ + end) │ │ │ │ │ +  │ │ │ │ │ +void  _T_b_b_E_v_a_l_S_t_e_n_c_i_l_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ + *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ + const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, float │ │ │ │ │ + *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, float *dstDuv, │ │ │ │ │ + _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const │ │ │ │ │ + &dstDvvDesc, int const *sizes, int const *offsets, int const *indices, │ │ │ │ │ + float const *weights, float const *duWeights, float const *dvWeights, │ │ │ │ │ + float const *duuWeights, float const *duvWeights, float const │ │ │ │ │ + *dvvWeights, int start, int end) │ │ │ │ │ +  │ │ │ │ │ +void  _T_b_b_E_v_a_l_P_a_t_c_h_e_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ + *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ + const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, int │ │ │ │ │ + numPatchCoords, const _P_a_t_c_h_C_o_o_r_d *patchCoords, const _P_a_t_c_h_A_r_r_a_y │ │ │ │ │ + *patchArrayBuffer, const int *patchIndexBuffer, const _P_a_t_c_h_P_a_r_a_m │ │ │ │ │ + *patchParamBuffer) │ │ │ │ │ +  │ │ │ │ │ +void  _T_b_b_E_v_a_l_P_a_t_c_h_e_s (float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, float │ │ │ │ │ + *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ + const &dstDuDesc, float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, float │ │ │ │ │ + *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, float *dstDuv, │ │ │ │ │ + _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const │ │ │ │ │ + &dstDvvDesc, int numPatchCoords, const _P_a_t_c_h_C_o_o_r_d *patchCoords, const │ │ │ │ │ + _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, const int *patchIndexBuffer, const │ │ │ │ │ + _P_a_t_c_h_P_a_r_a_m *patchParamBuffer) │ │ │ │ │ +  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,7 @@ │ │ │ │ │ var a00872 = [ │ │ │ │ │ - ["GLPatchTable", "a01237.html", "a01237"] │ │ │ │ │ + ["TbbEvalPatches", "a00872.html#aa0c3c264a43eeddc5cb3a58b006d3d32", null], │ │ │ │ │ + ["TbbEvalPatches", "a00872.html#a20e08be34d6183b6943ed7a1586eca4a", null], │ │ │ │ │ + ["TbbEvalStencils", "a00872.html#aa65ed860a2fa5935d99129a898a8f0b6", null], │ │ │ │ │ + ["TbbEvalStencils", "a00872.html#af23c35537952bfdd493441e5c42ff2ed", null], │ │ │ │ │ + ["TbbEvalStencils", "a00872.html#a4a6a0fcc01638f2a0316b32ad158b485", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbKernel.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
glPatchTable.h
│ │ │ │ +
tbbKernel.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,200 +119,116 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../osd/nonCopyable.h"
│ │ │ │ -
31#include "../osd/opengl.h"
│ │ │ │ -
32#include "../osd/types.h"
│ │ │ │ -
33
│ │ │ │ -
34#include <vector>
│ │ │ │ -
35
│ │ │ │ -
36namespace OpenSubdiv {
│ │ │ │ -
37namespace OPENSUBDIV_VERSION {
│ │ │ │ -
38
│ │ │ │ -
39namespace Far{
│ │ │ │ -
40 class PatchTable;
│ │ │ │ -
41};
│ │ │ │ -
42
│ │ │ │ -
43namespace Osd {
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
45class GLPatchTable : private NonCopyable<GLPatchTable> {
│ │ │ │ -
46public:
│ │ │ │ -
47 typedef GLuint VertexBufferBinding;
│ │ │ │ -
48
│ │ │ │ - │ │ │ │ +
29#include "../far/patchDescriptor.h"
│ │ │ │ +
30#include "../far/patchParam.h"
│ │ │ │ +
31
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
34
│ │ │ │ +
35namespace Osd {
│ │ │ │ +
36
│ │ │ │ +
37struct PatchArray;
│ │ │ │ +
38struct PatchCoord;
│ │ │ │ +
39struct PatchParam;
│ │ │ │ +
40struct BufferDescriptor;
│ │ │ │ +
41
│ │ │ │ +
42void
│ │ │ │ +
43TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ +
44 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
45 int const * sizes,
│ │ │ │ +
46 int const * offsets,
│ │ │ │ +
47 int const * indices,
│ │ │ │ +
48 float const * weights,
│ │ │ │ +
49 int start, int end);
│ │ │ │
50
│ │ │ │ -
51 static GLPatchTable *Create(Far::PatchTable const *farPatchTable,
│ │ │ │ -
52 void *deviceContext = NULL);
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 return _patchArrays;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 GLuint GetPatchIndexBuffer() const {
│ │ │ │ -
61 return _patchIndexBuffer;
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ +
51void
│ │ │ │ +
52TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ +
53 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
54 float * dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ +
55 float * dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ +
56 int const * sizes,
│ │ │ │ +
57 int const * offsets,
│ │ │ │ +
58 int const * indices,
│ │ │ │ +
59 float const * weights,
│ │ │ │ +
60 float const * duWeights,
│ │ │ │ +
61 float const * dvWeights,
│ │ │ │ +
62 int start, int end);
│ │ │ │
63
│ │ │ │ -
│ │ │ │ -
65 GLuint GetPatchParamBuffer() const {
│ │ │ │ -
66 return _patchParamBuffer;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 return _patchIndexTexture;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
76 return _patchParamTexture;
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
92 }
│ │ │ │ -
│ │ │ │ +
64void
│ │ │ │ +
65TbbEvalStencils(float const * src, BufferDescriptor const &srcDesc,
│ │ │ │ +
66 float * dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
67 float * dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ +
68 float * dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ +
69 float * dstDuu, BufferDescriptor const &dstDuuDesc,
│ │ │ │ +
70 float * dstDuv, BufferDescriptor const &dstDuvDesc,
│ │ │ │ +
71 float * dstDvv, BufferDescriptor const &dstDvvDesc,
│ │ │ │ +
72 int const * sizes,
│ │ │ │ +
73 int const * offsets,
│ │ │ │ +
74 int const * indices,
│ │ │ │ +
75 float const * weights,
│ │ │ │ +
76 float const * duWeights,
│ │ │ │ +
77 float const * dvWeights,
│ │ │ │ +
78 float const * duuWeights,
│ │ │ │ +
79 float const * duvWeights,
│ │ │ │ +
80 float const * dvvWeights,
│ │ │ │ +
81 int start, int end);
│ │ │ │ +
82
│ │ │ │ +
83void
│ │ │ │ +
84TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
85 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
86 float *dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ +
87 float *dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ +
88 int numPatchCoords,
│ │ │ │ +
89 const PatchCoord *patchCoords,
│ │ │ │ +
90 const PatchArray *patchArrayBuffer,
│ │ │ │ +
91 const int *patchIndexBuffer,
│ │ │ │ +
92 const PatchParam *patchParamBuffer);
│ │ │ │
93
│ │ │ │ -
95 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ -
98 PatchArrayVector const &GetFVarPatchArrays(int fvarChannel = 0) const {
│ │ │ │ -
99 return _fvarPatchArrays[fvarChannel];
│ │ │ │ -
100 }
│ │ │ │ -
│ │ │ │ -
101
│ │ │ │ -
│ │ │ │ -
103 GLuint GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ -
104 return _fvarIndexBuffers[fvarChannel];
│ │ │ │ -
105 }
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
│ │ │ │ -
108 GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel = 0) const {
│ │ │ │ -
109 return _fvarIndexTextures[fvarChannel];
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
│ │ │ │ -
113 GLuint GetFVarPatchParamBuffer(int fvarChannel = 0) const {
│ │ │ │ -
114 return _fvarParamBuffers[fvarChannel];
│ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
118 GLuint GetFVarPatchParamTextureBuffer(int fvarChannel = 0) const {
│ │ │ │ -
119 return _fvarParamTextures[fvarChannel];
│ │ │ │ -
120 }
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
122protected:
│ │ │ │ - │ │ │ │ -
124
│ │ │ │ -
125 // allocate buffers from patchTable
│ │ │ │ -
126 bool allocate(Far::PatchTable const *farPatchTable);
│ │ │ │ -
127
│ │ │ │ - │ │ │ │ -
129
│ │ │ │ - │ │ │ │ - │ │ │ │ -
132
│ │ │ │ - │ │ │ │ - │ │ │ │ -
135
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
139
│ │ │ │ -
140 std::vector<PatchArrayVector> _fvarPatchArrays;
│ │ │ │ -
141 std::vector<GLuint> _fvarIndexBuffers;
│ │ │ │ -
142 std::vector<GLuint> _fvarIndexTextures;
│ │ │ │ -
143
│ │ │ │ -
144 std::vector<GLuint> _fvarParamBuffers;
│ │ │ │ -
145 std::vector<GLuint> _fvarParamTextures;
│ │ │ │ -
146};
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
148
│ │ │ │ -
149} // end namespace Osd
│ │ │ │ -
150
│ │ │ │ -
151} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
152using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
153
│ │ │ │ -
154} // end namespace OpenSubdiv
│ │ │ │ -
155
│ │ │ │ -
156#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ -
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ -
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
PatchArrayVector const & GetPatchArrays() const
Returns the patch arrays for vertex index buffer data.
│ │ │ │ -
GLuint GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the GL index buffer containing face-varying control vertices.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
GLuint GetPatchParamTextureBuffer() const
Returns the GL texture buffer containing the patch parameter.
│ │ │ │ - │ │ │ │ -
bool allocate(Far::PatchTable const *farPatchTable)
│ │ │ │ -
static GLPatchTable * Create(Far::PatchTable const *farPatchTable, void *deviceContext=NULL)
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
GLuint GetPatchParamBuffer() const
Returns the GL index buffer containing the patch parameter.
│ │ │ │ -
GLuint GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the GL index buffer containing face-varying patch params.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel=0) const
Returns the GL texture buffer containing face-varying control vertices.
│ │ │ │ -
GLuint GetFVarPatchParamTextureBuffer(int fvarChannel=0) const
Returns the GL texture buffer containing face-varying patch params.
│ │ │ │ -
GLuint GetPatchIndexBuffer() const
Returns the GL index buffer containing the patch control vertices.
│ │ │ │ -
int GetNumFVarChannels() const
Returns the number of face-varying channel buffers.
│ │ │ │ -
PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const
Returns the patch arrays for face-varying index buffer data.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ -
GLuint GetPatchIndexTextureBuffer() const
Returns the GL texture buffer containing the patch control vertices.
│ │ │ │ -
GLuint GetVaryingPatchIndexTextureBuffer() const
Returns the GL texture buffer containing the varying control vertices.
│ │ │ │ - │ │ │ │ -
GLuint GetVaryingPatchIndexBuffer() const
Returns the GL index buffer containing the varying control vertices.
│ │ │ │ -
PatchArrayVector const & GetVaryingPatchArrays() const
Returns the patch arrays for varying index buffer data.
│ │ │ │ - │ │ │ │ +
94void
│ │ │ │ +
95TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
96 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
97 float *dstDu, BufferDescriptor const &dstDuDesc,
│ │ │ │ +
98 float *dstDv, BufferDescriptor const &dstDvDesc,
│ │ │ │ +
99 float *dstDuu, BufferDescriptor const &dstDuuDesc,
│ │ │ │ +
100 float *dstDuv, BufferDescriptor const &dstDuvDesc,
│ │ │ │ +
101 float *dstDvv, BufferDescriptor const &dstDvvDesc,
│ │ │ │ +
102 int numPatchCoords,
│ │ │ │ +
103 const PatchCoord *patchCoords,
│ │ │ │ +
104 const PatchArray *patchArrayBuffer,
│ │ │ │ +
105 const int *patchIndexBuffer,
│ │ │ │ +
106 const PatchParam *patchParamBuffer);
│ │ │ │ +
107
│ │ │ │ +
108} // end namespace Osd
│ │ │ │ +
109
│ │ │ │ +
110} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
111using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
112
│ │ │ │ +
113} // end namespace OpenSubdiv
│ │ │ │ +
114
│ │ │ │ +
115#endif // OPENSUBDIV3_OSD_TBB_KERNEL_H
│ │ │ │ + │ │ │ │ +
void TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const &dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrayBuffer, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
│ │ │ │ +
void TbbEvalStencils(float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, int start, int end)
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ +
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glPatchTable.h │ │ │ │ │ +tbbKernel.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,249 +24,126 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../osd/nonCopyable.h" │ │ │ │ │ -31#include "../osd/opengl.h" │ │ │ │ │ -32#include "../osd/types.h" │ │ │ │ │ -33 │ │ │ │ │ -34#include │ │ │ │ │ -35 │ │ │ │ │ -36namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -37namespace OPENSUBDIV_VERSION { │ │ │ │ │ -38 │ │ │ │ │ -39namespace Far{ │ │ │ │ │ -40 class PatchTable; │ │ │ │ │ -41}; │ │ │ │ │ -42 │ │ │ │ │ -43namespace Osd { │ │ │ │ │ -44 │ │ │ │ │ -_4_5class _G_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ -46public: │ │ │ │ │ -_4_7 typedef GLuint _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ -48 │ │ │ │ │ -_4_9 _~_G_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +29#include "../far/patchDescriptor.h" │ │ │ │ │ +30#include "../far/patchParam.h" │ │ │ │ │ +31 │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +35namespace Osd { │ │ │ │ │ +36 │ │ │ │ │ +37struct PatchArray; │ │ │ │ │ +38struct PatchCoord; │ │ │ │ │ +39struct PatchParam; │ │ │ │ │ +40struct BufferDescriptor; │ │ │ │ │ +41 │ │ │ │ │ +42void │ │ │ │ │ +_4_3_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +44 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +45 int const * sizes, │ │ │ │ │ +46 int const * offsets, │ │ │ │ │ +47 int const * indices, │ │ │ │ │ +48 float const * weights, │ │ │ │ │ +49 int start, int end); │ │ │ │ │ 50 │ │ │ │ │ -_5_1 static _G_L_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable, │ │ │ │ │ -52 void *deviceContext = NULL); │ │ │ │ │ -53 │ │ │ │ │ -_5_5 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ -56 return ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 GLuint _G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -61 return ___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -62 } │ │ │ │ │ +51void │ │ │ │ │ +_5_2_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +53 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +54 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +55 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +56 int const * sizes, │ │ │ │ │ +57 int const * offsets, │ │ │ │ │ +58 int const * indices, │ │ │ │ │ +59 float const * weights, │ │ │ │ │ +60 float const * duWeights, │ │ │ │ │ +61 float const * dvWeights, │ │ │ │ │ +62 int start, int end); │ │ │ │ │ 63 │ │ │ │ │ -_6_5 GLuint _G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { │ │ │ │ │ -66 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_7_0 GLuint _G_e_t_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -71 return ___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_5 GLuint _G_e_t_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -76 return ___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -_8_0 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ -81 return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -_8_5 GLuint _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -86 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -87 } │ │ │ │ │ -88 │ │ │ │ │ -_9_0 GLuint _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r() const { │ │ │ │ │ -91 return ___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ -92 } │ │ │ │ │ +64void │ │ │ │ │ +_6_5_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s(float const * src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +66 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +67 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +68 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +69 float * dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ +70 float * dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ +71 float * dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ +72 int const * sizes, │ │ │ │ │ +73 int const * offsets, │ │ │ │ │ +74 int const * indices, │ │ │ │ │ +75 float const * weights, │ │ │ │ │ +76 float const * duWeights, │ │ │ │ │ +77 float const * dvWeights, │ │ │ │ │ +78 float const * duuWeights, │ │ │ │ │ +79 float const * duvWeights, │ │ │ │ │ +80 float const * dvvWeights, │ │ │ │ │ +81 int start, int end); │ │ │ │ │ +82 │ │ │ │ │ +83void │ │ │ │ │ +_8_4_T_b_b_E_v_a_l_P_a_t_c_h_e_s(float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +85 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +86 float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +87 float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +88 int numPatchCoords, │ │ │ │ │ +89 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ +90 const _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, │ │ │ │ │ +91 const int *patchIndexBuffer, │ │ │ │ │ +92 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ 93 │ │ │ │ │ -_9_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); } │ │ │ │ │ -96 │ │ │ │ │ -_9_8 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r const &_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s(int fvarChannel = 0) const { │ │ │ │ │ -99 return ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; │ │ │ │ │ -100 } │ │ │ │ │ -101 │ │ │ │ │ -_1_0_3 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -104 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ -105 } │ │ │ │ │ -106 │ │ │ │ │ -_1_0_8 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -109 return ___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s[fvarChannel]; │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -_1_1_3 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -114 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel]; │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -_1_1_8 GLuint _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -119 return ___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s[fvarChannel]; │ │ │ │ │ -120 } │ │ │ │ │ -121 │ │ │ │ │ -122protected: │ │ │ │ │ -_1_2_3 _G_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -124 │ │ │ │ │ -125 // allocate buffers from patchTable │ │ │ │ │ -_1_2_6 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *farPatchTable); │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 GLuint ___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_1_3_1 GLuint ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -132 │ │ │ │ │ -_1_3_3 GLuint ___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ -_1_3_4 GLuint ___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e; │ │ │ │ │ -135 │ │ │ │ │ -_1_3_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_3_7 GLuint ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_1_3_8 GLuint ___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e; │ │ │ │ │ -139 │ │ │ │ │ -_1_4_0 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_4_1 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ -_1_4_2 std::vector ___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s; │ │ │ │ │ -143 │ │ │ │ │ -_1_4_4 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ -_1_4_5 std::vector ___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s; │ │ │ │ │ -146}; │ │ │ │ │ -147 │ │ │ │ │ -148 │ │ │ │ │ -149} // end namespace Osd │ │ │ │ │ -150 │ │ │ │ │ -151} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -152using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -153 │ │ │ │ │ -154} // end namespace OpenSubdiv │ │ │ │ │ -155 │ │ │ │ │ -156#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +94void │ │ │ │ │ +_9_5_T_b_b_E_v_a_l_P_a_t_c_h_e_s(float const *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +96 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +97 float *dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +98 float *dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +99 float *dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ +100 float *dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ +101 float *dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ +102 int numPatchCoords, │ │ │ │ │ +103 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ +104 const _P_a_t_c_h_A_r_r_a_y *patchArrayBuffer, │ │ │ │ │ +105 const int *patchIndexBuffer, │ │ │ │ │ +106 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ +107 │ │ │ │ │ +108} // end namespace Osd │ │ │ │ │ +109 │ │ │ │ │ +110} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +111using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +112 │ │ │ │ │ +113} // end namespace OpenSubdiv │ │ │ │ │ +114 │ │ │ │ │ +115#endif // OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchArray > PatchArrayVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Container for arrays of parametric patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ -GLuint VertexBufferBinding │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_4_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< GLuint > _fvarIndexBuffers │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetPatchArrays() const │ │ │ │ │ -Returns the patch arrays for vertex index buffer data. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -GLuint GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the GL index buffer containing face-varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_~_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~GLPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< GLuint > _fvarParamBuffers │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetPatchParamTextureBuffer() const │ │ │ │ │ -Returns the GL texture buffer containing the patch parameter. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -GLuint _varyingIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(Far::PatchTable const *farPatchTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLPatchTable * Create(Far::PatchTable const *farPatchTable, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_T_e_x_t_u_r_e │ │ │ │ │ -GLuint _varyingIndexTexture │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_T_e_x_t_u_r_e_s │ │ │ │ │ -std::vector< GLuint > _fvarParamTextures │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -GLuint _patchIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -GLuint GetPatchParamBuffer() const │ │ │ │ │ -Returns the GL index buffer containing the patch parameter. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -GLuint GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the GL index buffer containing face-varying patch params. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e │ │ │ │ │ -GLuint _patchParamTexture │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -GLPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetFVarPatchIndexTextureBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the GL texture buffer containing face-varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetFVarPatchParamTextureBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the GL texture buffer containing face-varying patch params. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -GLuint GetPatchIndexBuffer() const │ │ │ │ │ -Returns the GL index buffer containing the patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int GetNumFVarChannels() const │ │ │ │ │ -Returns the number of face-varying channel buffers. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetFVarPatchArrays(int fvarChannel=0) const │ │ │ │ │ -Returns the patch arrays for face-varying index buffer data. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_T_e_x_t_u_r_e_s │ │ │ │ │ -std::vector< GLuint > _fvarIndexTextures │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e │ │ │ │ │ -GLuint _patchIndexTexture │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_4_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetPatchIndexTextureBuffer() const │ │ │ │ │ -Returns the GL texture buffer containing the patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_T_e_x_t_u_r_e_B_u_f_f_e_r │ │ │ │ │ -GLuint GetVaryingPatchIndexTextureBuffer() const │ │ │ │ │ -Returns the GL texture buffer containing the varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_9_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _varyingPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -GLuint GetVaryingPatchIndexBuffer() const │ │ │ │ │ -Returns the GL index buffer containing the varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector const & GetVaryingPatchArrays() const │ │ │ │ │ -Returns the patch arrays for varying index buffer data. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_G_L_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -GLuint _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _g_l_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_T_b_b_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +void TbbEvalPatches(float const *src, BufferDescriptor const &srcDesc, float │ │ │ │ │ +*dst, BufferDescriptor const &dstDesc, float *dstDu, BufferDescriptor const │ │ │ │ │ +&dstDuDesc, float *dstDv, BufferDescriptor const &dstDvDesc, int │ │ │ │ │ +numPatchCoords, const PatchCoord *patchCoords, const PatchArray │ │ │ │ │ +*patchArrayBuffer, const int *patchIndexBuffer, const PatchParam │ │ │ │ │ +*patchParamBuffer) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_T_b_b_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +void TbbEvalStencils(float const *src, BufferDescriptor const &srcDesc, float │ │ │ │ │ +*dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, │ │ │ │ │ +int const *indices, float const *weights, int start, int end) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ +Coordinates set on a patch table. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00875.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
tbbEvaluator.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ #include "../osd/types.h"
│ │ │ │ #include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00875_source.html │ │ │ │ @@ -603,16 +603,16 @@ │ │ │ │
1239} // end namespace OPENSUBDIV_VERSION
│ │ │ │
1240using namespace OPENSUBDIV_VERSION;
│ │ │ │
1241
│ │ │ │
1242} // end namespace OpenSubdiv
│ │ │ │
1243
│ │ │ │
1244
│ │ │ │
1245#endif // OPENSUBDIV3_OSD_TBB_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ │ │ │ │
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function. This function has a same signature as other device kernels hav...
│ │ │ │
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const TbbEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw CPU pointers for input and output.
│ │ │ │
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00878_source.html │ │ │ │ @@ -180,17 +180,17 @@ │ │ │ │
79
│ │ │ │
80} // end namespace OPENSUBDIV_VERSION
│ │ │ │
81using namespace OPENSUBDIV_VERSION;
│ │ │ │
82
│ │ │ │
83} // end namespace OpenSubdiv
│ │ │ │
84
│ │ │ │
85#endif // OPENSUBDIV3_OSD_OMP_KERNEL_H
│ │ │ │ - │ │ │ │ + │ │ │ │
void OmpEvalStencils(float const *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int const *sizes, int const *offsets, int const *indices, float const *weights, int start, int end)
│ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ #include "../osd/types.h"
│ │ │ │ #include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00881_source.html │ │ │ │ @@ -603,16 +603,16 @@ │ │ │ │
1235} // end namespace OPENSUBDIV_VERSION
│ │ │ │
1236using namespace OPENSUBDIV_VERSION;
│ │ │ │
1237
│ │ │ │
1238} // end namespace OpenSubdiv
│ │ │ │
1239
│ │ │ │
1240
│ │ │ │
1241#endif // OPENSUBDIV3_OSD_OMP_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ │ │ │ │
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw CPU pointers for input and output.
│ │ │ │
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const OmpEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.
│ │ │ │
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,47 +89,108 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
cpuPatchTable.h File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
mesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <cassert>
│ │ │ │ +#include <cstring>
│ │ │ │ #include <vector>
│ │ │ │ -#include "../far/patchDescriptor.h"
│ │ │ │ -#include "../osd/nonCopyable.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ +#include "../far/topologyRefiner.h"
│ │ │ │ +#include "../far/patchTableFactory.h"
│ │ │ │ +#include "../far/stencilTable.h"
│ │ │ │ +#include "../far/stencilTableFactory.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CpuPatchTable
 Cpu patch table. More...
class  MeshInterface< PATCH_TABLE >
 
class  EvaluatorCacheT< EVALUATOR >
 
struct  EvaluatorCacheT< EVALUATOR >::Entry
 
class  Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Typedefs

typedef std::bitset< NUM_MESH_BITSMeshBitset
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Enumerations

enum  MeshBits {
│ │ │ │ +  MeshAdaptive = 0 │ │ │ │ +,
│ │ │ │ +  MeshInterleaveVarying = 1 │ │ │ │ +,
│ │ │ │ +  MeshFVarData = 2 │ │ │ │ +,
│ │ │ │ +  MeshFVarAdaptive = 3 │ │ │ │ +,
│ │ │ │ +  MeshUseSmoothCornerPatch = 4 │ │ │ │ +,
│ │ │ │ +  MeshUseSingleCreasePatch = 5 │ │ │ │ +,
│ │ │ │ +  MeshUseInfSharpPatch = 6 │ │ │ │ +,
│ │ │ │ +  MeshEndCapBilinearBasis = 7 │ │ │ │ +,
│ │ │ │ +  MeshEndCapBSplineBasis = 8 │ │ │ │ +,
│ │ │ │ +  MeshEndCapGregoryBasis = 9 │ │ │ │ +,
│ │ │ │ +  MeshEndCapLegacyGregory = 10 │ │ │ │ +,
│ │ │ │ +  NUM_MESH_BITS = 11 │ │ │ │ +
│ │ │ │ + }
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<typename STENCIL_TABLE , typename SRC_STENCIL_TABLE , typename DEVICE_CONTEXT >
STENCIL_TABLE const * convertToCompatibleStencilTable (SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context)
 
template<>
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void > (Far::StencilTable const *table, void *)
 
template<>
Far::LimitStencilTable const * convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void > (Far::LimitStencilTable const *table, void *)
 
template<>
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext > (Far::StencilTable const *table, ID3D11DeviceContext *)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,80 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cpuPatchTable.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +mesh.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_s_t_e_n_c_i_l_T_a_b_l_e_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  Cpu patch table. _M_o_r_e_._._. │ │ │ │ │ + class   _M_e_s_h_I_n_t_e_r_f_a_c_e_<_ _P_A_T_C_H___T_A_B_L_E_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_ _E_V_A_L_U_A_T_O_R_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_ _E_V_A_L_U_A_T_O_R_ _>_:_:_E_n_t_r_y │ │ │ │ │ +  │ │ │ │ │ + class   _M_e_s_h_<_ _V_E_R_T_E_X___B_U_F_F_E_R_,_ _S_T_E_N_C_I_L___T_A_B_L_E_,_ _E_V_A_L_U_A_T_O_R_,_ _P_A_T_C_H___T_A_B_L_E_, │ │ │ │ │ + _D_E_V_I_C_E___C_O_N_T_E_X_T_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │ -  │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +typedef std::bitset< _N_U_M___M_E_S_H___B_I_T_S >  _M_e_s_h_B_i_t_s_e_t │ │ │ │ │ +  │ │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ │ +enum   _M_e_s_h_B_i_t_s { │ │ │ │ │ +   _M_e_s_h_A_d_a_p_t_i_v_e = 0 , │ │ │ │ │ +   _M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g = 1 , │ │ │ │ │ +   _M_e_s_h_F_V_a_r_D_a_t_a = 2 , │ │ │ │ │ +   _M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e = 3 , │ │ │ │ │ +   _M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h = 4 , │ │ │ │ │ +   _M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = 5 , │ │ │ │ │ +   _M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = 6 , │ │ │ │ │ +   _M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s = 7 , │ │ │ │ │ +   _M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s = 8 , │ │ │ │ │ +   _M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s = 9 , │ │ │ │ │ +   _M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y = 10 , │ │ │ │ │ +   _N_U_M___M_E_S_H___B_I_T_S = 11 │ │ │ │ │ + } │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ + STENCIL_TABLE const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ + (SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT │ │ │ │ │ + *context) │ │ │ │ │ +  │ │ │ │ │ + template<> │ │ │ │ │ + _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ + _S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> (_F_a_r_:_: │ │ │ │ │ + _S_t_e_n_c_i_l_T_a_b_l_e const *table, void *) │ │ │ │ │ +  │ │ │ │ │ + template<> │ │ │ │ │ +_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ + _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d │ │ │ │ │ + _> (_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *table, void *) │ │ │ │ │ +  │ │ │ │ │ + template<> │ │ │ │ │ + _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ + _S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_, │ │ │ │ │ + _I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_ _> (_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ + *table, ID3D11DeviceContext *) │ │ │ │ │ +  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_e_s_h_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,25 @@ │ │ │ │ │ var a00887 = [ │ │ │ │ │ - ["CpuPatchTable", "a01173.html", "a01173"] │ │ │ │ │ + ["MeshInterface< PATCH_TABLE >", "a01269.html", "a01269"], │ │ │ │ │ + ["EvaluatorCacheT< EVALUATOR >", "a01273.html", "a01273"], │ │ │ │ │ + ["Entry", "a01277.html", "a01277"], │ │ │ │ │ + ["Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >", "a01281.html", "a01281"], │ │ │ │ │ + ["MeshBitset", "a00887.html#a85ba9df501aea9af1ec9da1558c255bc", null], │ │ │ │ │ + ["MeshBits", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492", [ │ │ │ │ │ + ["MeshAdaptive", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492adef344bcbdd50a1a93136eb53183c718", null], │ │ │ │ │ + ["MeshInterleaveVarying", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9313c644b9b2a998bcb55cfcc4582b1a", null], │ │ │ │ │ + ["MeshFVarData", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ac10e41fef659f3b3a1b730319bdedb45", null], │ │ │ │ │ + ["MeshFVarAdaptive", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9b8a23ab039e120012bc7c622308d603", null], │ │ │ │ │ + ["MeshUseSmoothCornerPatch", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ab32b8ef595539e14041e2fb0e619e3f9", null], │ │ │ │ │ + ["MeshUseSingleCreasePatch", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9058d69e1089fc77f1974a76c34e2071", null], │ │ │ │ │ + ["MeshUseInfSharpPatch", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a8fab1b3018f94b5b2432c7435e795925", null], │ │ │ │ │ + ["MeshEndCapBilinearBasis", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a4124233e4f787f999c7975afceab34f3", null], │ │ │ │ │ + ["MeshEndCapBSplineBasis", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2f41b6ba0393698bb3af283283737f7", null], │ │ │ │ │ + ["MeshEndCapGregoryBasis", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2878e1a215530f5f6fb89f1e06f91ee", null], │ │ │ │ │ + ["MeshEndCapLegacyGregory", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aad7b3fb2be609abdbfafaf5b1c834158", null], │ │ │ │ │ + ["NUM_MESH_BITS", "a00887.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a5676712c77d29cfdd330e2802db1c464", null] │ │ │ │ │ + ]], │ │ │ │ │ + ["convertToCompatibleStencilTable", "a00887.html#a06ceddf21c024b341a5b946049cd701a", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >", "a00887.html#a4c2520cc1a8a5a03e3f53584629d7318", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >", "a00887.html#ab5753a2b0a0995c8e2259d2c4765f7df", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >", "a00887.html#a33f9830228f847fae1c30c9dffe02b5a", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cpuPatchTable.h
│ │ │ │ +
mesh.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,193 +119,885 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MESH_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MESH_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <vector>
│ │ │ │ -
31#include "../far/patchDescriptor.h"
│ │ │ │ -
32#include "../osd/nonCopyable.h"
│ │ │ │ -
33#include "../osd/types.h"
│ │ │ │ +
30#include <bitset>
│ │ │ │ +
31#include <cassert>
│ │ │ │ +
32#include <cstring>
│ │ │ │ +
33#include <vector>
│ │ │ │
34
│ │ │ │ -
35#include <vector>
│ │ │ │ -
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ +
35#include "../far/topologyRefiner.h"
│ │ │ │ +
36#include "../far/patchTableFactory.h"
│ │ │ │ +
37#include "../far/stencilTable.h"
│ │ │ │ +
38#include "../far/stencilTableFactory.h"
│ │ │ │
39
│ │ │ │ -
40namespace Far{
│ │ │ │ -
41 class PatchTable;
│ │ │ │ -
42};
│ │ │ │ +
40#include "../osd/bufferDescriptor.h"
│ │ │ │ +
41
│ │ │ │ +
42struct ID3D11DeviceContext;
│ │ │ │
43
│ │ │ │ -
44namespace Osd {
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
60public:
│ │ │ │ -
│ │ │ │ -
61 static CpuPatchTable *Create(const Far::PatchTable *patchTable,
│ │ │ │ -
62 void *deviceContext = NULL) {
│ │ │ │ -
63 (void)deviceContext; // unused
│ │ │ │ -
64 return new CpuPatchTable(patchTable);
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ +
44namespace OpenSubdiv {
│ │ │ │ +
45namespace OPENSUBDIV_VERSION {
│ │ │ │ +
46
│ │ │ │ +
47namespace Osd {
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
57 MeshEndCapBilinearBasis = 7, // exclusive
│ │ │ │ +
58 MeshEndCapBSplineBasis = 8, // exclusive
│ │ │ │ +
59 MeshEndCapGregoryBasis = 9, // exclusive
│ │ │ │ +
60 MeshEndCapLegacyGregory = 10, // exclusive
│ │ │ │ + │ │ │ │ +
62};
│ │ │ │ +
│ │ │ │ +
63typedef std::bitset<NUM_MESH_BITS> MeshBitset;
│ │ │ │ +
64
│ │ │ │ +
65// ---------------------------------------------------------------------------
│ │ │ │
66
│ │ │ │ -
67 explicit CpuPatchTable(const Far::PatchTable *patchTable);
│ │ │ │ - │ │ │ │ -
69
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 return &_patchArrays[0];
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
73 const int *GetPatchIndexBuffer() const {
│ │ │ │ -
74 return &_indexBuffer[0];
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
77 return &_patchParamBuffer[0];
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ +
67template <class PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69public:
│ │ │ │ +
70 typedef PATCH_TABLE PatchTable;
│ │ │ │ +
71 typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
│ │ │ │ +
72
│ │ │ │ +
73public:
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ +
76 virtual ~MeshInterface() { }
│ │ │ │ +
77
│ │ │ │ +
78 virtual int GetNumVertices() const = 0;
│ │ │ │
79
│ │ │ │ -
│ │ │ │ -
80 size_t GetNumPatchArrays() const {
│ │ │ │ -
81 return _patchArrays.size();
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
83 size_t GetPatchIndexSize() const {
│ │ │ │ -
84 return _indexBuffer.size();
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
86 size_t GetPatchParamSize() const {
│ │ │ │ -
87 return _patchParamBuffer.size();
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ +
80 virtual int GetMaxValence() const = 0;
│ │ │ │ +
81
│ │ │ │ +
82 virtual void UpdateVertexBuffer(float const *vertexData,
│ │ │ │ +
83 int startVertex, int numVerts) = 0;
│ │ │ │ +
84
│ │ │ │ +
85 virtual void UpdateVaryingBuffer(float const *varyingData,
│ │ │ │ +
86 int startVertex, int numVerts) = 0;
│ │ │ │ +
87
│ │ │ │ +
88 virtual void Refine() = 0;
│ │ │ │
89
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 if (_varyingPatchArrays.empty()) {
│ │ │ │ -
92 return NULL;
│ │ │ │ -
93 }
│ │ │ │ -
94 return &_varyingPatchArrays[0];
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
96 const int *GetVaryingPatchIndexBuffer() const {
│ │ │ │ -
97 if (_varyingIndexBuffer.empty()) {
│ │ │ │ -
98 return NULL;
│ │ │ │ -
99 }
│ │ │ │ -
100 return &_varyingIndexBuffer[0];
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103 return _varyingIndexBuffer.size();
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
106 int GetNumFVarChannels() const {
│ │ │ │ -
107 return (int)_fvarPatchArrays.size();
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
109 const PatchArray *GetFVarPatchArrayBuffer(int fvarChannel = 0) const {
│ │ │ │ -
110 return &_fvarPatchArrays[fvarChannel][0];
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
112 const int *GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ -
113 return &_fvarIndexBuffers[fvarChannel][0];
│ │ │ │ -
114 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
115 size_t GetFVarPatchIndexSize(int fvarChannel = 0) const {
│ │ │ │ -
116 return _fvarIndexBuffers[fvarChannel].size();
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
118 const PatchParam *GetFVarPatchParamBuffer(int fvarChannel= 0) const {
│ │ │ │ -
119 return &_fvarParamBuffers[fvarChannel][0];
│ │ │ │ -
120 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
121 size_t GetFVarPatchParamSize(int fvarChannel = 0) const {
│ │ │ │ -
122 return _fvarParamBuffers[fvarChannel].size();
│ │ │ │ -
123 }
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
125protected:
│ │ │ │ - │ │ │ │ -
127 std::vector<int> _indexBuffer;
│ │ │ │ - │ │ │ │ -
129
│ │ │ │ - │ │ │ │ -
131 std::vector<int> _varyingIndexBuffer;
│ │ │ │ -
132
│ │ │ │ -
133 std::vector< PatchArrayVector > _fvarPatchArrays;
│ │ │ │ -
134 std::vector< std::vector<int> > _fvarIndexBuffers;
│ │ │ │ -
135 std::vector< PatchParamVector > _fvarParamBuffers;
│ │ │ │ -
136};
│ │ │ │ +
90 virtual void Synchronize() = 0;
│ │ │ │ +
91
│ │ │ │ +
92 virtual PatchTable * GetPatchTable() const = 0;
│ │ │ │ +
93
│ │ │ │ +
94 virtual Far::PatchTable const *GetFarPatchTable() const = 0;
│ │ │ │ +
95
│ │ │ │ + │ │ │ │ +
97
│ │ │ │ + │ │ │ │ +
99
│ │ │ │ +
100protected:
│ │ │ │ +
│ │ │ │ +
101 static inline void refineMesh(Far::TopologyRefiner & refiner,
│ │ │ │ +
102 int level, bool adaptive,
│ │ │ │ +
103 bool singleCreasePatch) {
│ │ │ │ +
104 if (adaptive) {
│ │ │ │ + │ │ │ │ +
106 options.useSingleCreasePatch = singleCreasePatch;
│ │ │ │ +
107 refiner.RefineAdaptive(options);
│ │ │ │ +
108 } else {
│ │ │ │ +
109 // This dependency on FVar channels should not be necessary
│ │ │ │ +
110 bool fullTopologyInLastLevel = refiner.GetNumFVarChannels()>0;
│ │ │ │ +
111
│ │ │ │ + │ │ │ │ +
113 options.fullTopologyInLastLevel = fullTopologyInLastLevel;
│ │ │ │ +
114 refiner.RefineUniform(options);
│ │ │ │ +
115 }
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
117 static inline void refineMesh(Far::TopologyRefiner & refiner,
│ │ │ │ +
118 int level, MeshBitset bits) {
│ │ │ │ +
119 if (bits.test(MeshAdaptive)) {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
122 options.useInfSharpPatch = bits.test(MeshUseInfSharpPatch);
│ │ │ │ +
123 options.considerFVarChannels = bits.test(MeshFVarAdaptive);
│ │ │ │ +
124 refiner.RefineAdaptive(options);
│ │ │ │ +
125 } else {
│ │ │ │ +
126 // This dependency on FVar channels should not be necessary
│ │ │ │ +
127 bool fullTopologyInLastLevel = refiner.GetNumFVarChannels()>0;
│ │ │ │ +
128
│ │ │ │ + │ │ │ │ +
130 options.fullTopologyInLastLevel = fullTopologyInLastLevel;
│ │ │ │ +
131 refiner.RefineUniform(options);
│ │ │ │ +
132 }
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134};
│ │ │ │
│ │ │ │ +
135
│ │ │ │ +
136// ---------------------------------------------------------------------------
│ │ │ │
137
│ │ │ │ -
138} // end namespace Osd
│ │ │ │ -
139
│ │ │ │ -
140} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
141using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
142
│ │ │ │ -
143} // end namespace OpenSubdiv
│ │ │ │ -
144
│ │ │ │ -
145#endif // OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │ - │ │ │ │ -
std::vector< PatchParam > PatchParamVector
Definition types.h:133
│ │ │ │ -
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ +
138template <typename STENCIL_TABLE, typename SRC_STENCIL_TABLE,
│ │ │ │ +
139 typename DEVICE_CONTEXT>
│ │ │ │ +
140STENCIL_TABLE const *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
142 SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context) {
│ │ │ │ +
143 if (! table) return NULL;
│ │ │ │ +
144 return STENCIL_TABLE::Create(table, context);
│ │ │ │ +
145}
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147template <>
│ │ │ │ +
│ │ │ │ +
148inline Far::StencilTable const *
│ │ │ │ + │ │ │ │ +
150 Far::StencilTable const *table, void * /*context*/) {
│ │ │ │ +
151 // no need for conversion
│ │ │ │ +
152 // XXX: We don't want to even copy.
│ │ │ │ +
153 if (! table) return NULL;
│ │ │ │ +
154 return new Far::StencilTable(*table);
│ │ │ │ +
155}
│ │ │ │ +
│ │ │ │ +
156
│ │ │ │ +
157template <>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
160 Far::LimitStencilTable const *table, void * /*context*/) {
│ │ │ │ +
161 // no need for conversion
│ │ │ │ +
162 // XXX: We don't want to even copy.
│ │ │ │ +
163 if (! table) return NULL;
│ │ │ │ +
164 return new Far::LimitStencilTable(*table);
│ │ │ │ +
165}
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
167template <>
│ │ │ │ +
│ │ │ │ +
168inline Far::StencilTable const *
│ │ │ │ + │ │ │ │ +
170 Far::StencilTable const *table, ID3D11DeviceContext * /*context*/) {
│ │ │ │ +
171 // no need for conversion
│ │ │ │ +
172 // XXX: We don't want to even copy.
│ │ │ │ +
173 if (! table) return NULL;
│ │ │ │ +
174 return new Far::StencilTable(*table);
│ │ │ │ +
175}
│ │ │ │ +
│ │ │ │ +
176
│ │ │ │ +
177// ---------------------------------------------------------------------------
│ │ │ │ +
178
│ │ │ │ +
179// Osd evaluator cache: for the GPU backends require compiled instance
│ │ │ │ +
180// (GLXFB, GLCompute, CL)
│ │ │ │ +
181//
│ │ │ │ +
182// note: this is just an example usage and client applications are supposed
│ │ │ │ +
183// to implement their own structure for Evaluator instance.
│ │ │ │ +
184//
│ │ │ │ +
185template <typename EVALUATOR>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
187public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
189 for(typename Evaluators::iterator it = _evaluators.begin();
│ │ │ │ +
190 it != _evaluators.end(); ++it) {
│ │ │ │ +
191 delete it->evaluator;
│ │ │ │ +
192 }
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
195 // XXX: FIXME, linear search
│ │ │ │ +
│ │ │ │ +
196 struct Entry {
│ │ │ │ +
│ │ │ │ +
197 Entry(BufferDescriptor const &srcDescArg,
│ │ │ │ +
198 BufferDescriptor const &dstDescArg,
│ │ │ │ +
199 BufferDescriptor const &duDescArg,
│ │ │ │ +
200 BufferDescriptor const &dvDescArg,
│ │ │ │ +
201 EVALUATOR *evalArg) : srcDesc(srcDescArg), dstDesc(dstDescArg),
│ │ │ │ +
202 duDesc(duDescArg), dvDesc(dvDescArg),
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
206 evaluator(evalArg) {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
207 Entry(BufferDescriptor const &srcDescArg,
│ │ │ │ +
208 BufferDescriptor const &dstDescArg,
│ │ │ │ +
209 BufferDescriptor const &duDescArg,
│ │ │ │ +
210 BufferDescriptor const &dvDescArg,
│ │ │ │ +
211 BufferDescriptor const &duuDescArg,
│ │ │ │ +
212 BufferDescriptor const &duvDescArg,
│ │ │ │ +
213 BufferDescriptor const &dvvDescArg,
│ │ │ │ +
214 EVALUATOR *evalArg) : srcDesc(srcDescArg), dstDesc(dstDescArg),
│ │ │ │ +
215 duDesc(duDescArg), dvDesc(dvDescArg),
│ │ │ │ +
216 duuDesc(duuDescArg),
│ │ │ │ +
217 duvDesc(duvDescArg),
│ │ │ │ +
218 dvvDesc(dvvDescArg),
│ │ │ │ +
219 evaluator(evalArg) {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
223 EVALUATOR *evaluator;
│ │ │ │ +
224 };
│ │ │ │ +
│ │ │ │ +
225 typedef std::vector<Entry> Evaluators;
│ │ │ │ +
226
│ │ │ │ +
227 template <typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
228 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ +
229 BufferDescriptor const &dstDesc,
│ │ │ │ +
230 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ +
231 return GetEvaluator(srcDesc, dstDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
237 deviceContext);
│ │ │ │ +
238 }
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
240 template <typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
241 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ +
242 BufferDescriptor const &dstDesc,
│ │ │ │ +
243 BufferDescriptor const &duDesc,
│ │ │ │ +
244 BufferDescriptor const &dvDesc,
│ │ │ │ +
245 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ +
246 return GetEvaluator(srcDesc, dstDesc,
│ │ │ │ +
247 duDesc, dvDesc,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
251 deviceContext);
│ │ │ │ +
252 }
│ │ │ │ +
│ │ │ │ +
253
│ │ │ │ +
254 template <typename DEVICE_CONTEXT>
│ │ │ │ +
│ │ │ │ +
255 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ +
256 BufferDescriptor const &dstDesc,
│ │ │ │ +
257 BufferDescriptor const &duDesc,
│ │ │ │ +
258 BufferDescriptor const &dvDesc,
│ │ │ │ +
259 BufferDescriptor const &duuDesc,
│ │ │ │ +
260 BufferDescriptor const &duvDesc,
│ │ │ │ +
261 BufferDescriptor const &dvvDesc,
│ │ │ │ +
262 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ +
263
│ │ │ │ +
264 for(typename Evaluators::iterator it = _evaluators.begin();
│ │ │ │ +
265 it != _evaluators.end(); ++it) {
│ │ │ │ +
266 if (isEqual(srcDesc, it->srcDesc) &&
│ │ │ │ +
267 isEqual(dstDesc, it->dstDesc) &&
│ │ │ │ +
268 isEqual(duDesc, it->duDesc) &&
│ │ │ │ +
269 isEqual(dvDesc, it->dvDesc) &&
│ │ │ │ +
270 isEqual(duuDesc, it->duuDesc) &&
│ │ │ │ +
271 isEqual(duvDesc, it->duvDesc) &&
│ │ │ │ +
272 isEqual(dvvDesc, it->dvvDesc)) {
│ │ │ │ +
273 return it->evaluator;
│ │ │ │ +
274 }
│ │ │ │ +
275 }
│ │ │ │ +
276 EVALUATOR *e = EVALUATOR::Create(srcDesc, dstDesc,
│ │ │ │ +
277 duDesc, dvDesc,
│ │ │ │ +
278 duuDesc, duvDesc, dvvDesc,
│ │ │ │ +
279 deviceContext);
│ │ │ │ +
280 _evaluators.push_back(Entry(srcDesc, dstDesc,
│ │ │ │ +
281 duDesc, dvDesc,
│ │ │ │ +
282 duuDesc, duvDesc, dvvDesc, e));
│ │ │ │ +
283 return e;
│ │ │ │ +
284 }
│ │ │ │ +
│ │ │ │ +
285
│ │ │ │ +
286private:
│ │ │ │ +
287 static bool isEqual(BufferDescriptor const &a,
│ │ │ │ +
288 BufferDescriptor const &b) {
│ │ │ │ +
289 int offsetA = a.stride ? (a.offset % a.stride) : 0;
│ │ │ │ +
290 int offsetB = b.stride ? (b.offset % b.stride) : 0;
│ │ │ │ +
291
│ │ │ │ +
292 // Note: XFB kernel needs to be configured with the local offset
│ │ │ │ +
293 // of the dstDesc to skip preceding primvars.
│ │ │ │ +
294 return (offsetA == offsetB &&
│ │ │ │ +
295 a.length == b.length &&
│ │ │ │ +
296 a.stride == b.stride);
│ │ │ │ +
297 }
│ │ │ │ +
298
│ │ │ │ +
299 Evaluators _evaluators;
│ │ │ │ +
300};
│ │ │ │ +
│ │ │ │ +
301
│ │ │ │ +
303
│ │ │ │ +
304// template helpers to see if the evaluator is instantiatable or not.
│ │ │ │ +
305template <typename EVALUATOR>
│ │ │ │ +
306struct instantiatable
│ │ │ │ +
307{
│ │ │ │ +
308 typedef char yes[1];
│ │ │ │ +
309 typedef char no[2];
│ │ │ │ +
310 template <typename C> static yes &chk(typename C::Instantiatable *t=0);
│ │ │ │ +
311 template <typename C> static no &chk(...);
│ │ │ │ +
312 static bool const value = sizeof(chk<EVALUATOR>(0)) == sizeof(yes);
│ │ │ │ +
313};
│ │ │ │ +
314template <bool C, typename T=void>
│ │ │ │ +
315struct enable_if { typedef T type; };
│ │ │ │ +
316template <typename T>
│ │ │ │ +
317struct enable_if<false, T> { };
│ │ │ │ +
318
│ │ │ │ +
320
│ │ │ │ +
321// extract a kernel from cache if available
│ │ │ │ +
322template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
323static EVALUATOR *GetEvaluator(
│ │ │ │ +
324 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ +
325 BufferDescriptor const &srcDesc,
│ │ │ │ +
326 BufferDescriptor const &dstDesc,
│ │ │ │ +
327 BufferDescriptor const &duDesc,
│ │ │ │ +
328 BufferDescriptor const &dvDesc,
│ │ │ │ +
329 BufferDescriptor const &duuDesc,
│ │ │ │ +
330 BufferDescriptor const &duvDesc,
│ │ │ │ +
331 BufferDescriptor const &dvvDesc,
│ │ │ │ +
332 DEVICE_CONTEXT deviceContext,
│ │ │ │ +
333 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
334 (void)t;
│ │ │ │ +
335 if (cache == NULL) return NULL;
│ │ │ │ +
336 return cache->GetEvaluator(srcDesc, dstDesc,
│ │ │ │ +
337 duDesc, dvDesc, duuDesc, duvDesc, dvvDesc,
│ │ │ │ +
338 deviceContext);
│ │ │ │ +
339}
│ │ │ │ +
340
│ │ │ │ +
341template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
342static EVALUATOR *GetEvaluator(
│ │ │ │ +
343 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ +
344 BufferDescriptor const &srcDesc,
│ │ │ │ +
345 BufferDescriptor const &dstDesc,
│ │ │ │ +
346 BufferDescriptor const &duDesc,
│ │ │ │ +
347 BufferDescriptor const &dvDesc,
│ │ │ │ +
348 DEVICE_CONTEXT deviceContext,
│ │ │ │ +
349 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
350 (void)t;
│ │ │ │ +
351 if (cache == NULL) return NULL;
│ │ │ │ +
352 return cache->GetEvaluator(srcDesc, dstDesc, duDesc, dvDesc, deviceContext);
│ │ │ │ +
353}
│ │ │ │ +
354
│ │ │ │ +
355template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
356static EVALUATOR *GetEvaluator(
│ │ │ │ +
357 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ +
358 BufferDescriptor const &srcDesc,
│ │ │ │ +
359 BufferDescriptor const &dstDesc,
│ │ │ │ +
360 DEVICE_CONTEXT deviceContext,
│ │ │ │ +
361 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
362 (void)t;
│ │ │ │ +
363 if (cache == NULL) return NULL;
│ │ │ │ +
364 return cache->GetEvaluator(srcDesc, dstDesc,
│ │ │ │ +
365 BufferDescriptor(),
│ │ │ │ +
366 BufferDescriptor(),
│ │ │ │ +
367 deviceContext);
│ │ │ │ +
368}
│ │ │ │ +
369
│ │ │ │ +
370// fallback
│ │ │ │ +
371template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
372static EVALUATOR *GetEvaluator(
│ │ │ │ +
373 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ +
374 BufferDescriptor const &,
│ │ │ │ +
375 BufferDescriptor const &,
│ │ │ │ +
376 BufferDescriptor const &,
│ │ │ │ +
377 BufferDescriptor const &,
│ │ │ │ +
378 BufferDescriptor const &,
│ │ │ │ +
379 BufferDescriptor const &,
│ │ │ │ +
380 BufferDescriptor const &,
│ │ │ │ +
381 DEVICE_CONTEXT,
│ │ │ │ +
382 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
383 (void)t;
│ │ │ │ +
384 return NULL;
│ │ │ │ +
385}
│ │ │ │ +
386
│ │ │ │ +
387template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
388static EVALUATOR *GetEvaluator(
│ │ │ │ +
389 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ +
390 BufferDescriptor const &,
│ │ │ │ +
391 BufferDescriptor const &,
│ │ │ │ +
392 BufferDescriptor const &,
│ │ │ │ +
393 BufferDescriptor const &,
│ │ │ │ +
394 DEVICE_CONTEXT,
│ │ │ │ +
395 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
396 (void)t;
│ │ │ │ +
397 return NULL;
│ │ │ │ +
398}
│ │ │ │ +
399
│ │ │ │ +
400template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ +
401static EVALUATOR *GetEvaluator(
│ │ │ │ +
402 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ +
403 BufferDescriptor const &,
│ │ │ │ +
404 BufferDescriptor const &,
│ │ │ │ +
405 DEVICE_CONTEXT,
│ │ │ │ +
406 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ +
407 (void)t;
│ │ │ │ +
408 return NULL;
│ │ │ │ +
409}
│ │ │ │ +
410
│ │ │ │ +
411// ---------------------------------------------------------------------------
│ │ │ │ +
412
│ │ │ │ +
413template <typename VERTEX_BUFFER,
│ │ │ │ +
414 typename STENCIL_TABLE,
│ │ │ │ +
415 typename EVALUATOR,
│ │ │ │ +
416 typename PATCH_TABLE,
│ │ │ │ +
417 typename DEVICE_CONTEXT = void>
│ │ │ │ +
│ │ │ │ +
418class Mesh : public MeshInterface<PATCH_TABLE> {
│ │ │ │ +
419public:
│ │ │ │ +
420 typedef VERTEX_BUFFER VertexBuffer;
│ │ │ │ +
421 typedef EVALUATOR Evaluator;
│ │ │ │ +
422 typedef STENCIL_TABLE StencilTable;
│ │ │ │ +
423 typedef PATCH_TABLE PatchTable;
│ │ │ │ +
424 typedef DEVICE_CONTEXT DeviceContext;
│ │ │ │ + │ │ │ │ +
426 typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
│ │ │ │ +
427
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
429 int numVertexElements,
│ │ │ │ +
430 int numVaryingElements,
│ │ │ │ +
431 int level,
│ │ │ │ +
432 MeshBitset bits = MeshBitset(),
│ │ │ │ +
433 EvaluatorCache * evaluatorCache = NULL,
│ │ │ │ +
434 DeviceContext * deviceContext = NULL) :
│ │ │ │ +
435
│ │ │ │ +
436 _refiner(refiner),
│ │ │ │ +
437 _farPatchTable(NULL),
│ │ │ │ +
438 _numVertices(0),
│ │ │ │ +
439 _maxValence(0),
│ │ │ │ +
440 _vertexBuffer(NULL),
│ │ │ │ +
441 _varyingBuffer(NULL),
│ │ │ │ +
442 _vertexStencilTable(NULL),
│ │ │ │ +
443 _varyingStencilTable(NULL),
│ │ │ │ +
444 _evaluatorCache(evaluatorCache),
│ │ │ │ +
445 _patchTable(NULL),
│ │ │ │ +
446 _deviceContext(deviceContext) {
│ │ │ │ +
447
│ │ │ │ +
448 assert(_refiner);
│ │ │ │ +
449
│ │ │ │ + │ │ │ │ +
451 *_refiner, level, bits);
│ │ │ │ +
452
│ │ │ │ +
453 int vertexBufferStride = numVertexElements +
│ │ │ │ +
454 (bits.test(MeshInterleaveVarying) ? numVaryingElements : 0);
│ │ │ │ +
455 int varyingBufferStride =
│ │ │ │ +
456 (bits.test(MeshInterleaveVarying) ? 0 : numVaryingElements);
│ │ │ │ +
457
│ │ │ │ +
458 initializeContext(numVertexElements,
│ │ │ │ +
459 numVaryingElements,
│ │ │ │ +
460 level, bits);
│ │ │ │ +
461
│ │ │ │ +
462 initializeVertexBuffers(_numVertices,
│ │ │ │ +
463 vertexBufferStride,
│ │ │ │ +
464 varyingBufferStride);
│ │ │ │ +
465
│ │ │ │ +
466 // configure vertex buffer descriptor
│ │ │ │ +
467 _vertexDesc =
│ │ │ │ +
468 BufferDescriptor(0, numVertexElements, vertexBufferStride);
│ │ │ │ +
469 if (bits.test(MeshInterleaveVarying)) {
│ │ │ │ +
470 _varyingDesc = BufferDescriptor(
│ │ │ │ +
471 numVertexElements, numVaryingElements, vertexBufferStride);
│ │ │ │ +
472 } else {
│ │ │ │ +
473 _varyingDesc = BufferDescriptor(
│ │ │ │ +
474 0, numVaryingElements, varyingBufferStride);
│ │ │ │ +
475 }
│ │ │ │ +
476 }
│ │ │ │ +
│ │ │ │ +
477
│ │ │ │ +
│ │ │ │ +
478 virtual ~Mesh() {
│ │ │ │ +
479 delete _refiner;
│ │ │ │ +
480 delete _farPatchTable;
│ │ │ │ +
481 delete _vertexBuffer;
│ │ │ │ +
482 delete _varyingBuffer;
│ │ │ │ +
483 delete _vertexStencilTable;
│ │ │ │ +
484 delete _varyingStencilTable;
│ │ │ │ +
485 delete _patchTable;
│ │ │ │ +
486 // deviceContext and evaluatorCache are not owned by this class.
│ │ │ │ +
487 }
│ │ │ │ +
│ │ │ │ +
488
│ │ │ │ +
│ │ │ │ +
489 virtual void UpdateVertexBuffer(float const *vertexData,
│ │ │ │ +
490 int startVertex, int numVerts) {
│ │ │ │ +
491 _vertexBuffer->UpdateData(vertexData, startVertex, numVerts,
│ │ │ │ +
492 _deviceContext);
│ │ │ │ +
493 }
│ │ │ │ +
│ │ │ │ +
494
│ │ │ │ +
│ │ │ │ +
495 virtual void UpdateVaryingBuffer(float const *varyingData,
│ │ │ │ +
496 int startVertex, int numVerts) {
│ │ │ │ +
497 _varyingBuffer->UpdateData(varyingData, startVertex, numVerts,
│ │ │ │ +
498 _deviceContext);
│ │ │ │ +
499 }
│ │ │ │ +
│ │ │ │ +
500
│ │ │ │ +
│ │ │ │ +
501 virtual void Refine() {
│ │ │ │ +
502
│ │ │ │ +
503 int numControlVertices = _refiner->GetLevel(0).GetNumVertices();
│ │ │ │ +
504
│ │ │ │ +
505 BufferDescriptor srcDesc = _vertexDesc;
│ │ │ │ +
506 BufferDescriptor dstDesc(srcDesc);
│ │ │ │ +
507 dstDesc.offset += numControlVertices * dstDesc.stride;
│ │ │ │ +
508
│ │ │ │ +
509 // note that the _evaluatorCache can be NULL and thus
│ │ │ │ +
510 // the evaluatorInstance can be NULL
│ │ │ │ +
511 // (for uninstantiatable kernels CPU,TBB etc)
│ │ │ │ +
512 Evaluator const *instance = GetEvaluator<Evaluator>(
│ │ │ │ +
513 _evaluatorCache, srcDesc, dstDesc,
│ │ │ │ +
514 _deviceContext);
│ │ │ │ +
515
│ │ │ │ +
516 Evaluator::EvalStencils(_vertexBuffer, srcDesc,
│ │ │ │ +
517 _vertexBuffer, dstDesc,
│ │ │ │ +
518 _vertexStencilTable,
│ │ │ │ +
519 instance, _deviceContext);
│ │ │ │ +
520
│ │ │ │ +
521 if (_varyingDesc.length > 0) {
│ │ │ │ +
522 BufferDescriptor vSrcDesc = _varyingDesc;
│ │ │ │ +
523 BufferDescriptor vDstDesc(vSrcDesc);
│ │ │ │ +
524 vDstDesc.offset += numControlVertices * vDstDesc.stride;
│ │ │ │ +
525
│ │ │ │ +
526 instance = GetEvaluator<Evaluator>(
│ │ │ │ +
527 _evaluatorCache, vSrcDesc, vDstDesc,
│ │ │ │ +
528 _deviceContext);
│ │ │ │ +
529
│ │ │ │ +
530 if (_varyingBuffer) {
│ │ │ │ +
531 // non-interleaved
│ │ │ │ +
532 Evaluator::EvalStencils(_varyingBuffer, vSrcDesc,
│ │ │ │ +
533 _varyingBuffer, vDstDesc,
│ │ │ │ +
534 _varyingStencilTable,
│ │ │ │ +
535 instance, _deviceContext);
│ │ │ │ +
536 } else {
│ │ │ │ +
537 // interleaved
│ │ │ │ +
538 Evaluator::EvalStencils(_vertexBuffer, vSrcDesc,
│ │ │ │ +
539 _vertexBuffer, vDstDesc,
│ │ │ │ +
540 _varyingStencilTable,
│ │ │ │ +
541 instance, _deviceContext);
│ │ │ │ +
542 }
│ │ │ │ +
543 }
│ │ │ │ +
544 }
│ │ │ │ +
│ │ │ │ +
545
│ │ │ │ +
│ │ │ │ +
546 virtual void Synchronize() {
│ │ │ │ +
547 Evaluator::Synchronize(_deviceContext);
│ │ │ │ +
548 }
│ │ │ │ +
│ │ │ │ +
549
│ │ │ │ +
│ │ │ │ +
550 virtual PatchTable * GetPatchTable() const {
│ │ │ │ +
551 return _patchTable;
│ │ │ │ +
552 }
│ │ │ │ +
│ │ │ │ +
553
│ │ │ │ +
│ │ │ │ +
554 virtual Far::PatchTable const *GetFarPatchTable() const {
│ │ │ │ +
555 return _farPatchTable;
│ │ │ │ +
556 }
│ │ │ │ +
│ │ │ │ +
557
│ │ │ │ +
558 virtual int GetNumVertices() const { return _numVertices; }
│ │ │ │ +
559
│ │ │ │ +
560 virtual int GetMaxValence() const { return _maxValence; }
│ │ │ │ +
561
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
563 return _vertexBuffer->BindVBO(_deviceContext);
│ │ │ │ +
564 }
│ │ │ │ +
│ │ │ │ +
565
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
567 return _varyingBuffer->BindVBO(_deviceContext);
│ │ │ │ +
568 }
│ │ │ │ +
│ │ │ │ +
569
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
571 return _vertexBuffer;
│ │ │ │ +
572 }
│ │ │ │ +
│ │ │ │ +
573
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
575 return _varyingBuffer;
│ │ │ │ +
576 }
│ │ │ │ +
│ │ │ │ +
577
│ │ │ │ +
│ │ │ │ +
578 virtual Far::TopologyRefiner const * GetTopologyRefiner() const {
│ │ │ │ +
579 return _refiner;
│ │ │ │ +
580 }
│ │ │ │ +
│ │ │ │ +
581
│ │ │ │ +
582private:
│ │ │ │ +
583 void initializeContext(int numVertexElements,
│ │ │ │ +
584 int numVaryingElements,
│ │ │ │ +
585 int level, MeshBitset bits) {
│ │ │ │ +
586 assert(_refiner);
│ │ │ │ +
587
│ │ │ │ +
588 Far::StencilTableFactory::Options options;
│ │ │ │ +
589 options.generateOffsets = true;
│ │ │ │ +
590 options.generateIntermediateLevels =
│ │ │ │ +
591 _refiner->IsUniform() ? false : true;
│ │ │ │ +
592
│ │ │ │ +
593 Far::StencilTable const * vertexStencils = NULL;
│ │ │ │ +
594 Far::StencilTable const * varyingStencils = NULL;
│ │ │ │ +
595
│ │ │ │ +
596 if (numVertexElements>0) {
│ │ │ │ +
597
│ │ │ │ +
598 vertexStencils = Far::StencilTableFactory::Create(*_refiner,
│ │ │ │ +
599 options);
│ │ │ │ +
600 }
│ │ │ │ +
601
│ │ │ │ +
602 if (numVaryingElements>0) {
│ │ │ │ +
603
│ │ │ │ +
604 options.interpolationMode =
│ │ │ │ + │ │ │ │ +
606
│ │ │ │ +
607 varyingStencils = Far::StencilTableFactory::Create(*_refiner,
│ │ │ │ +
608 options);
│ │ │ │ +
609 }
│ │ │ │ +
610
│ │ │ │ +
611 Far::PatchTableFactory::Options poptions(level);
│ │ │ │ +
612 poptions.generateFVarTables = bits.test(MeshFVarData);
│ │ │ │ +
613 poptions.generateFVarLegacyLinearPatches = !bits.test(MeshFVarAdaptive);
│ │ │ │ +
614 poptions.generateLegacySharpCornerPatches = !bits.test(MeshUseSmoothCornerPatch);
│ │ │ │ +
615 poptions.useSingleCreasePatch = bits.test(MeshUseSingleCreasePatch);
│ │ │ │ +
616 poptions.useInfSharpPatch = bits.test(MeshUseInfSharpPatch);
│ │ │ │ +
617
│ │ │ │ +
618 // points on bilinear and gregory basis endcap boundaries can be
│ │ │ │ +
619 // shared among adjacent patches to save some stencils.
│ │ │ │ +
620 if (bits.test(MeshEndCapBilinearBasis)) {
│ │ │ │ +
621 poptions.SetEndCapType(
│ │ │ │ + │ │ │ │ +
623 poptions.shareEndCapPatchPoints = true;
│ │ │ │ +
624 } else if (bits.test(MeshEndCapBSplineBasis)) {
│ │ │ │ +
625 poptions.SetEndCapType(
│ │ │ │ + │ │ │ │ +
627 } else if (bits.test(MeshEndCapGregoryBasis)) {
│ │ │ │ +
628 poptions.SetEndCapType(
│ │ │ │ + │ │ │ │ +
630 poptions.shareEndCapPatchPoints = true;
│ │ │ │ +
631 } else if (bits.test(MeshEndCapLegacyGregory)) {
│ │ │ │ +
632 poptions.SetEndCapType(
│ │ │ │ + │ │ │ │ +
634 }
│ │ │ │ +
635
│ │ │ │ +
636 _farPatchTable = Far::PatchTableFactory::Create(*_refiner, poptions);
│ │ │ │ +
637
│ │ │ │ +
638 // if there's endcap stencils, merge it into regular stencils.
│ │ │ │ +
639 if (_farPatchTable->GetLocalPointStencilTable()) {
│ │ │ │ +
640 // append stencils
│ │ │ │ +
641 if (Far::StencilTable const *vertexStencilsWithLocalPoints =
│ │ │ │ + │ │ │ │ +
643 *_refiner,
│ │ │ │ +
644 vertexStencils,
│ │ │ │ +
645 _farPatchTable->GetLocalPointStencilTable())) {
│ │ │ │ +
646 delete vertexStencils;
│ │ │ │ +
647 vertexStencils = vertexStencilsWithLocalPoints;
│ │ │ │ +
648 }
│ │ │ │ +
649 if (varyingStencils) {
│ │ │ │ +
650 if (Far::StencilTable const *varyingStencilsWithLocalPoints =
│ │ │ │ + │ │ │ │ +
652 *_refiner,
│ │ │ │ +
653 varyingStencils,
│ │ │ │ +
654 _farPatchTable->GetLocalPointVaryingStencilTable())) {
│ │ │ │ +
655 delete varyingStencils;
│ │ │ │ +
656 varyingStencils = varyingStencilsWithLocalPoints;
│ │ │ │ +
657 }
│ │ │ │ +
658 }
│ │ │ │ +
659 }
│ │ │ │ +
660
│ │ │ │ +
661 _maxValence = _farPatchTable->GetMaxValence();
│ │ │ │ +
662 _patchTable = PatchTable::Create(_farPatchTable, _deviceContext);
│ │ │ │ +
663
│ │ │ │ +
664 // numvertices = coarse verts + refined verts + gregory basis verts
│ │ │ │ +
665 _numVertices = vertexStencils->GetNumControlVertices()
│ │ │ │ +
666 + vertexStencils->GetNumStencils();
│ │ │ │ +
667
│ │ │ │ +
668 // convert to device stenciltable if necessary.
│ │ │ │ +
669 _vertexStencilTable =
│ │ │ │ +
670 convertToCompatibleStencilTable<StencilTable>(
│ │ │ │ +
671 vertexStencils, _deviceContext);
│ │ │ │ +
672 _varyingStencilTable =
│ │ │ │ +
673 convertToCompatibleStencilTable<StencilTable>(
│ │ │ │ +
674 varyingStencils, _deviceContext);
│ │ │ │ +
675
│ │ │ │ +
676 // FIXME: we do extra copyings for Far::Stencils.
│ │ │ │ +
677 delete vertexStencils;
│ │ │ │ +
678 delete varyingStencils;
│ │ │ │ +
679 }
│ │ │ │ +
680
│ │ │ │ +
681 void initializeVertexBuffers(int numVertices,
│ │ │ │ +
682 int numVertexElements,
│ │ │ │ +
683 int numVaryingElements) {
│ │ │ │ +
684
│ │ │ │ +
685 if (numVertexElements) {
│ │ │ │ +
686 _vertexBuffer = VertexBuffer::Create(numVertexElements,
│ │ │ │ +
687 numVertices, _deviceContext);
│ │ │ │ +
688 }
│ │ │ │ +
689
│ │ │ │ +
690 if (numVaryingElements) {
│ │ │ │ +
691 _varyingBuffer = VertexBuffer::Create(numVaryingElements,
│ │ │ │ +
692 numVertices, _deviceContext);
│ │ │ │ +
693 }
│ │ │ │ +
694 }
│ │ │ │ +
695
│ │ │ │ +
696 Far::TopologyRefiner * _refiner;
│ │ │ │ +
697 Far::PatchTable * _farPatchTable;
│ │ │ │ +
698
│ │ │ │ +
699 int _numVertices;
│ │ │ │ +
700 int _maxValence;
│ │ │ │ +
701
│ │ │ │ +
702 VertexBuffer * _vertexBuffer;
│ │ │ │ +
703 VertexBuffer * _varyingBuffer;
│ │ │ │ +
704
│ │ │ │ +
705 BufferDescriptor _vertexDesc;
│ │ │ │ +
706 BufferDescriptor _varyingDesc;
│ │ │ │ +
707
│ │ │ │ +
708 StencilTable const * _vertexStencilTable;
│ │ │ │ +
709 StencilTable const * _varyingStencilTable;
│ │ │ │ +
710 EvaluatorCache * _evaluatorCache;
│ │ │ │ +
711
│ │ │ │ +
712 PatchTable *_patchTable;
│ │ │ │ +
713 DeviceContext *_deviceContext;
│ │ │ │ +
714};
│ │ │ │ +
│ │ │ │ +
715
│ │ │ │ +
716} // end namespace Osd
│ │ │ │ +
717
│ │ │ │ +
718} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
719using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
720
│ │ │ │ +
721} // end namespace OpenSubdiv
│ │ │ │ +
722
│ │ │ │ +
723#endif // OPENSUBDIV3_OSD_MESH_H
│ │ │ │ + │ │ │ │ +
STENCIL_TABLE const * convertToCompatibleStencilTable(SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context)
Definition mesh.h:141
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >(Far::StencilTable const *table, void *)
Definition mesh.h:149
│ │ │ │ +
Far::LimitStencilTable const * convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >(Far::LimitStencilTable const *table, void *)
Definition mesh.h:159
│ │ │ │ +
std::bitset< NUM_MESH_BITS > MeshBitset
Definition mesh.h:63
│ │ │ │ +
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >(Far::StencilTable const *table, ID3D11DeviceContext *)
Definition mesh.h:169
│ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ - │ │ │ │ -
const PatchArray * GetFVarPatchArrayBuffer(int fvarChannel=0) const
│ │ │ │ - │ │ │ │ - │ │ │ │ -
size_t GetFVarPatchParamSize(int fvarChannel=0) const
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static CpuPatchTable * Create(const Far::PatchTable *patchTable, void *deviceContext=NULL)
│ │ │ │ -
std::vector< PatchParamVector > _fvarParamBuffers
│ │ │ │ -
CpuPatchTable(const Far::PatchTable *patchTable)
│ │ │ │ -
std::vector< std::vector< int > > _fvarIndexBuffers
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
size_t GetFVarPatchIndexSize(int fvarChannel=0) const
│ │ │ │ -
const int * GetFVarPatchIndexBuffer(int fvarChannel=0) const
│ │ │ │ -
const PatchParam * GetFVarPatchParamBuffer(int fvarChannel=0) const
│ │ │ │ - │ │ │ │ - │ │ │ │ -
const PatchArray * GetVaryingPatchArrayBuffer() const
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ - │ │ │ │ - │ │ │ │ +
int GetMaxValence() const
Returns max vertex valence.
Definition patchTable.h:92
│ │ │ │ +
StencilTable const * GetLocalPointStencilTable() const
Returns the stencil table to compute local point vertex values.
Definition patchTable.h:778
│ │ │ │ +
StencilTable const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
Definition patchTable.h:783
│ │ │ │ +
static PatchTable * Create(TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
Instantiates a PatchTable from a client-provided TopologyRefiner.
│ │ │ │ + │ │ │ │ +
@ ENDCAP_LEGACY_GREGORY
legacy option for 2.x style Gregory patches (Catmark only)
│ │ │ │ +
@ ENDCAP_GREGORY_BASIS
use Gregory patches (highest quality, recommended default)
│ │ │ │ +
@ ENDCAP_BILINEAR_BASIS
use linear patches (simple quads or tris)
│ │ │ │ +
@ ENDCAP_BSPLINE_BASIS
use BSpline-like patches (same patch type as regular)
│ │ │ │ + │ │ │ │ +
int GetNumControlVertices() const
Returns the number of control vertices indexed in the table.
│ │ │ │ +
int GetNumStencils() const
Returns the number of stencils in the table.
│ │ │ │ +
Stencil table class wrapping the template for compatibility.
│ │ │ │ +
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ +
static StencilTable const * Create(TopologyRefiner const &refiner, Options options=Options())
│ │ │ │ +
static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ +
int GetNumVertices() const
Return the number of vertices in this level.
│ │ │ │ +
Stores topology data for a specified set of refinement options.
│ │ │ │ +
bool IsUniform() const
Returns true if uniform refinement has been applied.
│ │ │ │ +
int GetNumFVarChannels() const
Returns the number of face-varying channels in the tables.
│ │ │ │ +
void RefineUniform(UniformOptions options)
Refine the topology uniformly.
│ │ │ │ +
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
│ │ │ │ +
void RefineAdaptive(AdaptiveOptions options, ConstIndexArray selectedFaces=ConstIndexArray())
Feature Adaptive topology refinement.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
virtual Far::PatchTable const * GetFarPatchTable() const =0
│ │ │ │ +
static void refineMesh(Far::TopologyRefiner &refiner, int level, MeshBitset bits)
Definition mesh.h:117
│ │ │ │ + │ │ │ │ + │ │ │ │ +
virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int numVerts)=0
│ │ │ │ +
static void refineMesh(Far::TopologyRefiner &refiner, int level, bool adaptive, bool singleCreasePatch)
Definition mesh.h:101
│ │ │ │ +
virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int numVerts)=0
│ │ │ │ +
virtual PatchTable * GetPatchTable() const =0
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
PatchTable::VertexBufferBinding VertexBufferBinding
Definition mesh.h:71
│ │ │ │ +
virtual VertexBufferBinding BindVertexBuffer()=0
│ │ │ │ +
virtual VertexBufferBinding BindVaryingBuffer()=0
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:241
│ │ │ │ +
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:255
│ │ │ │ +
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:228
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, BufferDescriptor const &duuDescArg, BufferDescriptor const &duvDescArg, BufferDescriptor const &dvvDescArg, EVALUATOR *evalArg)
Definition mesh.h:207
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, EVALUATOR *evalArg)
Definition mesh.h:197
│ │ │ │ + │ │ │ │ + │ │ │ │ +
virtual Far::TopologyRefiner const * GetTopologyRefiner() const
Definition mesh.h:578
│ │ │ │ +
virtual VertexBuffer * GetVertexBuffer()
Definition mesh.h:570
│ │ │ │ +
virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int numVerts)
Definition mesh.h:495
│ │ │ │ +
virtual VertexBuffer * GetVaryingBuffer()
Definition mesh.h:574
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
virtual VertexBufferBinding BindVertexBuffer()
Definition mesh.h:562
│ │ │ │ +
virtual int GetNumVertices() const
Definition mesh.h:558
│ │ │ │ +
Mesh(Far::TopologyRefiner *refiner, int numVertexElements, int numVaryingElements, int level, MeshBitset bits=MeshBitset(), EvaluatorCache *evaluatorCache=NULL, DeviceContext *deviceContext=NULL)
Definition mesh.h:428
│ │ │ │ + │ │ │ │ + │ │ │ │ +
EvaluatorCacheT< Evaluator > EvaluatorCache
Definition mesh.h:425
│ │ │ │ +
virtual VertexBufferBinding BindVaryingBuffer()
Definition mesh.h:566
│ │ │ │ + │ │ │ │ +
PatchTable::VertexBufferBinding VertexBufferBinding
Definition mesh.h:426
│ │ │ │ +
virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int numVerts)
Definition mesh.h:489
│ │ │ │ + │ │ │ │ +
virtual PatchTable * GetPatchTable() const
Definition mesh.h:550
│ │ │ │ +
virtual Far::PatchTable const * GetFarPatchTable() const
Definition mesh.h:554
│ │ │ │ + │ │ │ │ +
virtual int GetMaxValence() const
Definition mesh.h:560
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuPatchTable.h │ │ │ │ │ +mesh.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,215 +24,1093 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ -31#include "../far/patchDescriptor.h" │ │ │ │ │ -32#include "../osd/nonCopyable.h" │ │ │ │ │ -33#include "../osd/types.h" │ │ │ │ │ +30#include │ │ │ │ │ +31#include │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ 34 │ │ │ │ │ -35#include │ │ │ │ │ -36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +35#include "../far/topologyRefiner.h" │ │ │ │ │ +36#include "../far/patchTableFactory.h" │ │ │ │ │ +37#include "../far/stencilTable.h" │ │ │ │ │ +38#include "../far/stencilTableFactory.h" │ │ │ │ │ 39 │ │ │ │ │ -40namespace Far{ │ │ │ │ │ -41 class PatchTable; │ │ │ │ │ -42}; │ │ │ │ │ +40#include "../osd/bufferDescriptor.h" │ │ │ │ │ +41 │ │ │ │ │ +42struct ID3D11DeviceContext; │ │ │ │ │ 43 │ │ │ │ │ -44namespace Osd { │ │ │ │ │ -45 │ │ │ │ │ -_5_9class _C_p_u_P_a_t_c_h_T_a_b_l_e { │ │ │ │ │ -60public: │ │ │ │ │ -_6_1 static _C_p_u_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(const _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e *patchTable, │ │ │ │ │ -62 void *deviceContext = NULL) { │ │ │ │ │ -63 (void)deviceContext; // unused │ │ │ │ │ -64 return new _C_p_u_P_a_t_c_h_T_a_b_l_e(patchTable); │ │ │ │ │ -65 } │ │ │ │ │ +44namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +45namespace OPENSUBDIV_VERSION { │ │ │ │ │ +46 │ │ │ │ │ +47namespace Osd { │ │ │ │ │ +48 │ │ │ │ │ +_4_9enum _M_e_s_h_B_i_t_s { │ │ │ │ │ +_5_0 _M_e_s_h_A_d_a_p_t_i_v_e = 0, │ │ │ │ │ +_5_1 _M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g = 1, │ │ │ │ │ +_5_2 _M_e_s_h_F_V_a_r_D_a_t_a = 2, │ │ │ │ │ +_5_3 _M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e = 3, │ │ │ │ │ +_5_4 _M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h = 4, │ │ │ │ │ +_5_5 _M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = 5, │ │ │ │ │ +_5_6 _M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = 6, │ │ │ │ │ +_5_7 _M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s = 7, // exclusive │ │ │ │ │ +_5_8 _M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s = 8, // exclusive │ │ │ │ │ +_5_9 _M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s = 9, // exclusive │ │ │ │ │ +_6_0 _M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y = 10, // exclusive │ │ │ │ │ +_6_1 _N_U_M___M_E_S_H___B_I_T_S = 11, │ │ │ │ │ +62}; │ │ │ │ │ +_6_3typedef std::bitset _M_e_s_h_B_i_t_s_e_t; │ │ │ │ │ +64 │ │ │ │ │ +65// -------------------------------------------------------------------------- │ │ │ │ │ +- │ │ │ │ │ 66 │ │ │ │ │ -_6_7 explicit _C_p_u_P_a_t_c_h_T_a_b_l_e(const _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e *patchTable); │ │ │ │ │ -_6_8 _~_C_p_u_P_a_t_c_h_T_a_b_l_e() {} │ │ │ │ │ -69 │ │ │ │ │ -_7_0 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ -71 return &___p_a_t_c_h_A_r_r_a_y_s[0]; │ │ │ │ │ -72 } │ │ │ │ │ -_7_3 const int *_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -74 return &___i_n_d_e_x_B_u_f_f_e_r[0]; │ │ │ │ │ -75 } │ │ │ │ │ -_7_6 const _P_a_t_c_h_P_a_r_a_m *_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { │ │ │ │ │ -77 return &___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r[0]; │ │ │ │ │ -78 } │ │ │ │ │ +67template │ │ │ │ │ +_6_8class _M_e_s_h_I_n_t_e_r_f_a_c_e { │ │ │ │ │ +69public: │ │ │ │ │ +_7_0 typedef PATCH_TABLE _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ +_7_1 typedef typename PatchTable::VertexBufferBinding _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ +72 │ │ │ │ │ +73public: │ │ │ │ │ +_7_4 _M_e_s_h_I_n_t_e_r_f_a_c_e() { } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 virtual _~_M_e_s_h_I_n_t_e_r_f_a_c_e() { } │ │ │ │ │ +77 │ │ │ │ │ +_7_8 virtual int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const = 0; │ │ │ │ │ 79 │ │ │ │ │ -_8_0 size_t _G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ -81 return ___p_a_t_c_h_A_r_r_a_y_s.size(); │ │ │ │ │ -82 } │ │ │ │ │ -_8_3 size_t _G_e_t_P_a_t_c_h_I_n_d_e_x_S_i_z_e() const { │ │ │ │ │ -84 return ___i_n_d_e_x_B_u_f_f_e_r.size(); │ │ │ │ │ -85 } │ │ │ │ │ -_8_6 size_t _G_e_t_P_a_t_c_h_P_a_r_a_m_S_i_z_e() const { │ │ │ │ │ -87 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r.size(); │ │ │ │ │ -88 } │ │ │ │ │ +_8_0 virtual int _G_e_t_M_a_x_V_a_l_e_n_c_e() const = 0; │ │ │ │ │ +81 │ │ │ │ │ +_8_2 virtual void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(float const *vertexData, │ │ │ │ │ +83 int startVertex, int numVerts) = 0; │ │ │ │ │ +84 │ │ │ │ │ +_8_5 virtual void _U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r(float const *varyingData, │ │ │ │ │ +86 int startVertex, int numVerts) = 0; │ │ │ │ │ +87 │ │ │ │ │ +_8_8 virtual void _R_e_f_i_n_e() = 0; │ │ │ │ │ 89 │ │ │ │ │ -_9_0 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ -91 if (___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s.empty()) { │ │ │ │ │ -92 return NULL; │ │ │ │ │ -93 } │ │ │ │ │ -94 return &___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s[0]; │ │ │ │ │ -95 } │ │ │ │ │ -_9_6 const int *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ -97 if (___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r.empty()) { │ │ │ │ │ -98 return NULL; │ │ │ │ │ -99 } │ │ │ │ │ -100 return &___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r[0]; │ │ │ │ │ -101 } │ │ │ │ │ -_1_0_2 size_t _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_S_i_z_e() const { │ │ │ │ │ -103 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r.size(); │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { │ │ │ │ │ -107 return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); │ │ │ │ │ -108 } │ │ │ │ │ -_1_0_9 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -110 return &___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel][0]; │ │ │ │ │ -111 } │ │ │ │ │ -_1_1_2 const int *_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ -113 return &___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel][0]; │ │ │ │ │ -114 } │ │ │ │ │ -_1_1_5 size_t _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_S_i_z_e(int fvarChannel = 0) const { │ │ │ │ │ -116 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel].size(); │ │ │ │ │ -117 } │ │ │ │ │ -_1_1_8 const _P_a_t_c_h_P_a_r_a_m *_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel= 0) const { │ │ │ │ │ -119 return &___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel][0]; │ │ │ │ │ -120 } │ │ │ │ │ -_1_2_1 size_t _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_S_i_z_e(int fvarChannel = 0) const { │ │ │ │ │ -122 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel].size(); │ │ │ │ │ -123 } │ │ │ │ │ -124 │ │ │ │ │ -125protected: │ │ │ │ │ -_1_2_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_2_7 std::vector ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_1_2_8 _P_a_t_c_h_P_a_r_a_m_V_e_c_t_o_r ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -129 │ │ │ │ │ -_1_3_0 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_3_1 std::vector ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -132 │ │ │ │ │ -_1_3_3 std::vector< PatchArrayVector > ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_3_4 std::vector< std::vector > ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ -_1_3_5 std::vector< PatchParamVector > ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ -136}; │ │ │ │ │ +_9_0 virtual void _S_y_n_c_h_r_o_n_i_z_e() = 0; │ │ │ │ │ +91 │ │ │ │ │ +_9_2 virtual _P_a_t_c_h_T_a_b_l_e * _G_e_t_P_a_t_c_h_T_a_b_l_e() const = 0; │ │ │ │ │ +93 │ │ │ │ │ +_9_4 virtual _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e() const = 0; │ │ │ │ │ +95 │ │ │ │ │ +_9_6 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r() = 0; │ │ │ │ │ +97 │ │ │ │ │ +_9_8 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r() = 0; │ │ │ │ │ +99 │ │ │ │ │ +100protected: │ │ │ │ │ +_1_0_1 static inline void _r_e_f_i_n_e_M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, │ │ │ │ │ +102 int level, bool adaptive, │ │ │ │ │ +103 bool singleCreasePatch) { │ │ │ │ │ +104 if (adaptive) { │ │ │ │ │ +105 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options(level); │ │ │ │ │ +106 options._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = singleCreasePatch; │ │ │ │ │ +107 refiner._R_e_f_i_n_e_A_d_a_p_t_i_v_e(options); │ │ │ │ │ +108 } else { │ │ │ │ │ +109 // This dependency on FVar channels should not be necessary │ │ │ │ │ +110 bool fullTopologyInLastLevel = refiner._G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s()>0; │ │ │ │ │ +111 │ │ │ │ │ +112 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s options(level); │ │ │ │ │ +113 options._f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l = fullTopologyInLastLevel; │ │ │ │ │ +114 refiner._R_e_f_i_n_e_U_n_i_f_o_r_m(options); │ │ │ │ │ +115 } │ │ │ │ │ +116 } │ │ │ │ │ +_1_1_7 static inline void _r_e_f_i_n_e_M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, │ │ │ │ │ +118 int level, _M_e_s_h_B_i_t_s_e_t bits) { │ │ │ │ │ +119 if (bits.test(_M_e_s_h_A_d_a_p_t_i_v_e)) { │ │ │ │ │ +120 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options(level); │ │ │ │ │ +121 options._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = bits.test(_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h); │ │ │ │ │ +122 options._u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = bits.test(_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h); │ │ │ │ │ +123 options._c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s = bits.test(_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e); │ │ │ │ │ +124 refiner._R_e_f_i_n_e_A_d_a_p_t_i_v_e(options); │ │ │ │ │ +125 } else { │ │ │ │ │ +126 // This dependency on FVar channels should not be necessary │ │ │ │ │ +127 bool fullTopologyInLastLevel = refiner._G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s()>0; │ │ │ │ │ +128 │ │ │ │ │ +129 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s options(level); │ │ │ │ │ +130 options._f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l = fullTopologyInLastLevel; │ │ │ │ │ +131 refiner._R_e_f_i_n_e_U_n_i_f_o_r_m(options); │ │ │ │ │ +132 } │ │ │ │ │ +133 } │ │ │ │ │ +134}; │ │ │ │ │ +135 │ │ │ │ │ +136// ------------------------------------------------------------------------- │ │ │ │ │ +-- │ │ │ │ │ 137 │ │ │ │ │ -138} // end namespace Osd │ │ │ │ │ -139 │ │ │ │ │ -140} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -141using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -142 │ │ │ │ │ -143} // end namespace OpenSubdiv │ │ │ │ │ -144 │ │ │ │ │ -145#endif // OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ +138template │ │ │ │ │ +140STENCIL_TABLE const * │ │ │ │ │ +_1_4_1_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +142 SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context) { │ │ │ │ │ +143 if (! table) return NULL; │ │ │ │ │ +144 return STENCIL_TABLE::Create(table, context); │ │ │ │ │ +145} │ │ │ │ │ +146 │ │ │ │ │ +147template <> │ │ │ │ │ +_1_4_8inline _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +149_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_>( │ │ │ │ │ +150 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *table, void * /*context*/) { │ │ │ │ │ +151 // no need for conversion │ │ │ │ │ +152 // XXX: We don't want to even copy. │ │ │ │ │ +153 if (! table) return NULL; │ │ │ │ │ +154 return new _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ +155} │ │ │ │ │ +156 │ │ │ │ │ +157template <> │ │ │ │ │ +_1_5_8inline _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +159_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_: │ │ │ │ │ +_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_>( │ │ │ │ │ +160 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *table, void * /*context*/) { │ │ │ │ │ +161 // no need for conversion │ │ │ │ │ +162 // XXX: We don't want to even copy. │ │ │ │ │ +163 if (! table) return NULL; │ │ │ │ │ +164 return new _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ +165} │ │ │ │ │ +166 │ │ │ │ │ +167template <> │ │ │ │ │ +_1_6_8inline _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +169_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_, │ │ │ │ │ +_I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_>( │ │ │ │ │ +170 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *table, ID3D11DeviceContext * /*context*/) { │ │ │ │ │ +171 // no need for conversion │ │ │ │ │ +172 // XXX: We don't want to even copy. │ │ │ │ │ +173 if (! table) return NULL; │ │ │ │ │ +174 return new _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ +175} │ │ │ │ │ +176 │ │ │ │ │ +177// ------------------------------------------------------------------------- │ │ │ │ │ +-- │ │ │ │ │ +178 │ │ │ │ │ +179// Osd evaluator cache: for the GPU backends require compiled instance │ │ │ │ │ +180// (GLXFB, GLCompute, CL) │ │ │ │ │ +181// │ │ │ │ │ +182// note: this is just an example usage and client applications are supposed │ │ │ │ │ +183// to implement their own structure for Evaluator instance. │ │ │ │ │ +184// │ │ │ │ │ +185template │ │ │ │ │ +_1_8_6class _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T { │ │ │ │ │ +187public: │ │ │ │ │ +_1_8_8 _~_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T() { │ │ │ │ │ +189 for(typename Evaluators::iterator it = _evaluators.begin(); │ │ │ │ │ +190 it != _evaluators.end(); ++it) { │ │ │ │ │ +191 delete it->evaluator; │ │ │ │ │ +192 } │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +195 // XXX: FIXME, linear search │ │ │ │ │ +_1_9_6 struct _E_n_t_r_y { │ │ │ │ │ +_1_9_7 _E_n_t_r_y(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDescArg, │ │ │ │ │ +198 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDescArg, │ │ │ │ │ +199 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDescArg, │ │ │ │ │ +200 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDescArg, │ │ │ │ │ +201 EVALUATOR *evalArg) : _s_r_c_D_e_s_c(srcDescArg), _d_s_t_D_e_s_c(dstDescArg), │ │ │ │ │ +202 _d_u_D_e_s_c(duDescArg), _d_v_D_e_s_c(dvDescArg), │ │ │ │ │ +203 _d_u_u_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ +204 _d_u_v_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ +205 _d_v_v_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ +206 _e_v_a_l_u_a_t_o_r(evalArg) {} │ │ │ │ │ +_2_0_7 _E_n_t_r_y(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDescArg, │ │ │ │ │ +208 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDescArg, │ │ │ │ │ +209 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDescArg, │ │ │ │ │ +210 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDescArg, │ │ │ │ │ +211 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDescArg, │ │ │ │ │ +212 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDescArg, │ │ │ │ │ +213 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDescArg, │ │ │ │ │ +214 EVALUATOR *evalArg) : _s_r_c_D_e_s_c(srcDescArg), _d_s_t_D_e_s_c(dstDescArg), │ │ │ │ │ +215 _d_u_D_e_s_c(duDescArg), _d_v_D_e_s_c(dvDescArg), │ │ │ │ │ +216 _d_u_u_D_e_s_c(duuDescArg), │ │ │ │ │ +217 _d_u_v_D_e_s_c(duvDescArg), │ │ │ │ │ +218 _d_v_v_D_e_s_c(dvvDescArg), │ │ │ │ │ +219 _e_v_a_l_u_a_t_o_r(evalArg) {} │ │ │ │ │ +_2_2_0 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _s_r_c_D_e_s_c, _d_s_t_D_e_s_c; │ │ │ │ │ +_2_2_1 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _d_u_D_e_s_c, _d_v_D_e_s_c; │ │ │ │ │ +_2_2_2 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _d_u_u_D_e_s_c, _d_u_v_D_e_s_c, _d_v_v_D_e_s_c; │ │ │ │ │ +_2_2_3 EVALUATOR *_e_v_a_l_u_a_t_o_r; │ │ │ │ │ +224 }; │ │ │ │ │ +_2_2_5 typedef std::vector _E_v_a_l_u_a_t_o_r_s; │ │ │ │ │ +226 │ │ │ │ │ +227 template │ │ │ │ │ +_2_2_8 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +229 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +230 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ +231 return _G_e_t_E_v_a_l_u_a_t_o_r(srcDesc, dstDesc, │ │ │ │ │ +232 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +233 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +234 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +235 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +236 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +237 deviceContext); │ │ │ │ │ +238 } │ │ │ │ │ +239 │ │ │ │ │ +240 template │ │ │ │ │ +_2_4_1 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +242 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +243 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +244 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +245 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ +246 return _G_e_t_E_v_a_l_u_a_t_o_r(srcDesc, dstDesc, │ │ │ │ │ +247 duDesc, dvDesc, │ │ │ │ │ +248 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +249 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +250 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ +251 deviceContext); │ │ │ │ │ +252 } │ │ │ │ │ +253 │ │ │ │ │ +254 template │ │ │ │ │ +_2_5_5 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +256 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +257 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +258 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +259 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +260 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +261 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +262 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ +263 │ │ │ │ │ +264 for(typename Evaluators::iterator it = _evaluators.begin(); │ │ │ │ │ +265 it != _evaluators.end(); ++it) { │ │ │ │ │ +266 if (isEqual(srcDesc, it->srcDesc) && │ │ │ │ │ +267 isEqual(dstDesc, it->dstDesc) && │ │ │ │ │ +268 isEqual(duDesc, it->duDesc) && │ │ │ │ │ +269 isEqual(dvDesc, it->dvDesc) && │ │ │ │ │ +270 isEqual(duuDesc, it->duuDesc) && │ │ │ │ │ +271 isEqual(duvDesc, it->duvDesc) && │ │ │ │ │ +272 isEqual(dvvDesc, it->dvvDesc)) { │ │ │ │ │ +273 return it->evaluator; │ │ │ │ │ +274 } │ │ │ │ │ +275 } │ │ │ │ │ +276 EVALUATOR *e = EVALUATOR::Create(srcDesc, dstDesc, │ │ │ │ │ +277 duDesc, dvDesc, │ │ │ │ │ +278 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ +279 deviceContext); │ │ │ │ │ +280 _evaluators.push_back(_E_n_t_r_y(srcDesc, dstDesc, │ │ │ │ │ +281 duDesc, dvDesc, │ │ │ │ │ +282 duuDesc, duvDesc, dvvDesc, e)); │ │ │ │ │ +283 return e; │ │ │ │ │ +284 } │ │ │ │ │ +285 │ │ │ │ │ +286private: │ │ │ │ │ +287 static bool isEqual(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &a, │ │ │ │ │ +288 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &b) { │ │ │ │ │ +289 int offsetA = a._s_t_r_i_d_e ? (a._o_f_f_s_e_t % a._s_t_r_i_d_e) : 0; │ │ │ │ │ +290 int offsetB = b._s_t_r_i_d_e ? (b._o_f_f_s_e_t % b._s_t_r_i_d_e) : 0; │ │ │ │ │ +291 │ │ │ │ │ +292 // Note: XFB kernel needs to be configured with the local offset │ │ │ │ │ +293 // of the dstDesc to skip preceding primvars. │ │ │ │ │ +294 return (offsetA == offsetB && │ │ │ │ │ +295 a._l_e_n_g_t_h == b._l_e_n_g_t_h && │ │ │ │ │ +296 a._s_t_r_i_d_e == b._s_t_r_i_d_e); │ │ │ │ │ +297 } │ │ │ │ │ +298 │ │ │ │ │ +299 _E_v_a_l_u_a_t_o_r_s _evaluators; │ │ │ │ │ +300}; │ │ │ │ │ +301 │ │ │ │ │ +303 │ │ │ │ │ +304// template helpers to see if the evaluator is instantiatable or not. │ │ │ │ │ +305template │ │ │ │ │ +306struct instantiatable │ │ │ │ │ +307{ │ │ │ │ │ +308 typedef char yes[1]; │ │ │ │ │ +309 typedef char no[2]; │ │ │ │ │ +310 template static yes &chk(typename C::Instantiatable *t=0); │ │ │ │ │ +311 template static no &chk(...); │ │ │ │ │ +312 static bool const value = sizeof(chk(0)) == sizeof(yes); │ │ │ │ │ +313}; │ │ │ │ │ +314template │ │ │ │ │ +315struct enable_if { typedef T type; }; │ │ │ │ │ +316template │ │ │ │ │ +317struct enable_if { }; │ │ │ │ │ +318 │ │ │ │ │ +320 │ │ │ │ │ +321// extract a kernel from cache if available │ │ │ │ │ +322template │ │ │ │ │ +323static EVALUATOR *GetEvaluator( │ │ │ │ │ +324 EvaluatorCacheT *cache, │ │ │ │ │ +325 BufferDescriptor const &srcDesc, │ │ │ │ │ +326 BufferDescriptor const &dstDesc, │ │ │ │ │ +327 BufferDescriptor const &duDesc, │ │ │ │ │ +328 BufferDescriptor const &dvDesc, │ │ │ │ │ +329 BufferDescriptor const &duuDesc, │ │ │ │ │ +330 BufferDescriptor const &duvDesc, │ │ │ │ │ +331 BufferDescriptor const &dvvDesc, │ │ │ │ │ +332 DEVICE_CONTEXT deviceContext, │ │ │ │ │ +333 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +334 (void)t; │ │ │ │ │ +335 if (cache == NULL) return NULL; │ │ │ │ │ +336 return cache->GetEvaluator(srcDesc, dstDesc, │ │ │ │ │ +337 duDesc, dvDesc, duuDesc, duvDesc, dvvDesc, │ │ │ │ │ +338 deviceContext); │ │ │ │ │ +339} │ │ │ │ │ +340 │ │ │ │ │ +341template │ │ │ │ │ +342static EVALUATOR *GetEvaluator( │ │ │ │ │ +343 EvaluatorCacheT *cache, │ │ │ │ │ +344 BufferDescriptor const &srcDesc, │ │ │ │ │ +345 BufferDescriptor const &dstDesc, │ │ │ │ │ +346 BufferDescriptor const &duDesc, │ │ │ │ │ +347 BufferDescriptor const &dvDesc, │ │ │ │ │ +348 DEVICE_CONTEXT deviceContext, │ │ │ │ │ +349 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +350 (void)t; │ │ │ │ │ +351 if (cache == NULL) return NULL; │ │ │ │ │ +352 return cache->GetEvaluator(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ +deviceContext); │ │ │ │ │ +353} │ │ │ │ │ +354 │ │ │ │ │ +355template │ │ │ │ │ +356static EVALUATOR *GetEvaluator( │ │ │ │ │ +357 EvaluatorCacheT *cache, │ │ │ │ │ +358 BufferDescriptor const &srcDesc, │ │ │ │ │ +359 BufferDescriptor const &dstDesc, │ │ │ │ │ +360 DEVICE_CONTEXT deviceContext, │ │ │ │ │ +361 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +362 (void)t; │ │ │ │ │ +363 if (cache == NULL) return NULL; │ │ │ │ │ +364 return cache->GetEvaluator(srcDesc, dstDesc, │ │ │ │ │ +365 BufferDescriptor(), │ │ │ │ │ +366 BufferDescriptor(), │ │ │ │ │ +367 deviceContext); │ │ │ │ │ +368} │ │ │ │ │ +369 │ │ │ │ │ +370// fallback │ │ │ │ │ +371template │ │ │ │ │ +372static EVALUATOR *GetEvaluator( │ │ │ │ │ +373 EvaluatorCacheT *, │ │ │ │ │ +374 BufferDescriptor const &, │ │ │ │ │ +375 BufferDescriptor const &, │ │ │ │ │ +376 BufferDescriptor const &, │ │ │ │ │ +377 BufferDescriptor const &, │ │ │ │ │ +378 BufferDescriptor const &, │ │ │ │ │ +379 BufferDescriptor const &, │ │ │ │ │ +380 BufferDescriptor const &, │ │ │ │ │ +381 DEVICE_CONTEXT, │ │ │ │ │ +382 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +383 (void)t; │ │ │ │ │ +384 return NULL; │ │ │ │ │ +385} │ │ │ │ │ +386 │ │ │ │ │ +387template │ │ │ │ │ +388static EVALUATOR *GetEvaluator( │ │ │ │ │ +389 EvaluatorCacheT *, │ │ │ │ │ +390 BufferDescriptor const &, │ │ │ │ │ +391 BufferDescriptor const &, │ │ │ │ │ +392 BufferDescriptor const &, │ │ │ │ │ +393 BufferDescriptor const &, │ │ │ │ │ +394 DEVICE_CONTEXT, │ │ │ │ │ +395 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +396 (void)t; │ │ │ │ │ +397 return NULL; │ │ │ │ │ +398} │ │ │ │ │ +399 │ │ │ │ │ +400template │ │ │ │ │ +401static EVALUATOR *GetEvaluator( │ │ │ │ │ +402 EvaluatorCacheT *, │ │ │ │ │ +403 BufferDescriptor const &, │ │ │ │ │ +404 BufferDescriptor const &, │ │ │ │ │ +405 DEVICE_CONTEXT, │ │ │ │ │ +406 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ +407 (void)t; │ │ │ │ │ +408 return NULL; │ │ │ │ │ +409} │ │ │ │ │ +410 │ │ │ │ │ +411// ------------------------------------------------------------------------- │ │ │ │ │ +-- │ │ │ │ │ +412 │ │ │ │ │ +413template │ │ │ │ │ +_4_1_8class _M_e_s_h : public _M_e_s_h_I_n_t_e_r_f_a_c_e { │ │ │ │ │ +419public: │ │ │ │ │ +_4_2_0 typedef VERTEX_BUFFER _V_e_r_t_e_x_B_u_f_f_e_r; │ │ │ │ │ +_4_2_1 typedef EVALUATOR _E_v_a_l_u_a_t_o_r; │ │ │ │ │ +_4_2_2 typedef STENCIL_TABLE _S_t_e_n_c_i_l_T_a_b_l_e; │ │ │ │ │ +_4_2_3 typedef PATCH_TABLE _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ +_4_2_4 typedef DEVICE_CONTEXT _D_e_v_i_c_e_C_o_n_t_e_x_t; │ │ │ │ │ +_4_2_5 typedef _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_E_v_a_l_u_a_t_o_r_> _E_v_a_l_u_a_t_o_r_C_a_c_h_e; │ │ │ │ │ +_4_2_6 typedef typename PatchTable::VertexBufferBinding _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ +427 │ │ │ │ │ +_4_2_8 _M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r * refiner, │ │ │ │ │ +429 int numVertexElements, │ │ │ │ │ +430 int numVaryingElements, │ │ │ │ │ +431 int level, │ │ │ │ │ +432 _M_e_s_h_B_i_t_s_e_t bits = _M_e_s_h_B_i_t_s_e_t(), │ │ │ │ │ +433 _E_v_a_l_u_a_t_o_r_C_a_c_h_e * evaluatorCache = NULL, │ │ │ │ │ +434 _D_e_v_i_c_e_C_o_n_t_e_x_t * deviceContext = NULL) : │ │ │ │ │ +435 │ │ │ │ │ +436 _refiner(refiner), │ │ │ │ │ +437 _farPatchTable(NULL), │ │ │ │ │ +438 _numVertices(0), │ │ │ │ │ +439 _maxValence(0), │ │ │ │ │ +440 _vertexBuffer(NULL), │ │ │ │ │ +441 _varyingBuffer(NULL), │ │ │ │ │ +442 _vertexStencilTable(NULL), │ │ │ │ │ +443 _varyingStencilTable(NULL), │ │ │ │ │ +444 _evaluatorCache(evaluatorCache), │ │ │ │ │ +445 _patchTable(NULL), │ │ │ │ │ +446 _deviceContext(deviceContext) { │ │ │ │ │ +447 │ │ │ │ │ +448 assert(_refiner); │ │ │ │ │ +449 │ │ │ │ │ +450 _M_e_s_h_I_n_t_e_r_f_a_c_e_<_P_A_T_C_H___T_A_B_L_E_>_:_:_r_e_f_i_n_e_M_e_s_h( │ │ │ │ │ +451 *_refiner, level, bits); │ │ │ │ │ +452 │ │ │ │ │ +453 int vertexBufferStride = numVertexElements + │ │ │ │ │ +454 (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g) ? numVaryingElements : 0); │ │ │ │ │ +455 int varyingBufferStride = │ │ │ │ │ +456 (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g) ? 0 : numVaryingElements); │ │ │ │ │ +457 │ │ │ │ │ +458 initializeContext(numVertexElements, │ │ │ │ │ +459 numVaryingElements, │ │ │ │ │ +460 level, bits); │ │ │ │ │ +461 │ │ │ │ │ +462 initializeVertexBuffers(_numVertices, │ │ │ │ │ +463 vertexBufferStride, │ │ │ │ │ +464 varyingBufferStride); │ │ │ │ │ +465 │ │ │ │ │ +466 // configure vertex buffer descriptor │ │ │ │ │ +467 _vertexDesc = │ │ │ │ │ +468 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(0, numVertexElements, vertexBufferStride); │ │ │ │ │ +469 if (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g)) { │ │ │ │ │ +470 _varyingDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ +471 numVertexElements, numVaryingElements, vertexBufferStride); │ │ │ │ │ +472 } else { │ │ │ │ │ +473 _varyingDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ +474 0, numVaryingElements, varyingBufferStride); │ │ │ │ │ +475 } │ │ │ │ │ +476 } │ │ │ │ │ +477 │ │ │ │ │ +_4_7_8 virtual _~_M_e_s_h() { │ │ │ │ │ +479 delete _refiner; │ │ │ │ │ +480 delete _farPatchTable; │ │ │ │ │ +481 delete _vertexBuffer; │ │ │ │ │ +482 delete _varyingBuffer; │ │ │ │ │ +483 delete _vertexStencilTable; │ │ │ │ │ +484 delete _varyingStencilTable; │ │ │ │ │ +485 delete _patchTable; │ │ │ │ │ +486 // deviceContext and evaluatorCache are not owned by this class. │ │ │ │ │ +487 } │ │ │ │ │ +488 │ │ │ │ │ +_4_8_9 virtual void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(float const *vertexData, │ │ │ │ │ +490 int startVertex, int numVerts) { │ │ │ │ │ +491 _vertexBuffer->UpdateData(vertexData, startVertex, numVerts, │ │ │ │ │ +492 _deviceContext); │ │ │ │ │ +493 } │ │ │ │ │ +494 │ │ │ │ │ +_4_9_5 virtual void _U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r(float const *varyingData, │ │ │ │ │ +496 int startVertex, int numVerts) { │ │ │ │ │ +497 _varyingBuffer->UpdateData(varyingData, startVertex, numVerts, │ │ │ │ │ +498 _deviceContext); │ │ │ │ │ +499 } │ │ │ │ │ +500 │ │ │ │ │ +_5_0_1 virtual void _R_e_f_i_n_e() { │ │ │ │ │ +502 │ │ │ │ │ +503 int numControlVertices = _refiner->_G_e_t_L_e_v_e_l(0)._G_e_t_N_u_m_V_e_r_t_i_c_e_s(); │ │ │ │ │ +504 │ │ │ │ │ +505 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r srcDesc = _vertexDesc; │ │ │ │ │ +506 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r dstDesc(srcDesc); │ │ │ │ │ +507 dstDesc._o_f_f_s_e_t += numControlVertices * dstDesc._s_t_r_i_d_e; │ │ │ │ │ +508 │ │ │ │ │ +509 // note that the _evaluatorCache can be NULL and thus │ │ │ │ │ +510 // the evaluatorInstance can be NULL │ │ │ │ │ +511 // (for uninstantiatable kernels CPU,TBB etc) │ │ │ │ │ +512 _E_v_a_l_u_a_t_o_r const *instance = GetEvaluator( │ │ │ │ │ +513 _evaluatorCache, srcDesc, dstDesc, │ │ │ │ │ +514 _deviceContext); │ │ │ │ │ +515 │ │ │ │ │ +516 Evaluator::EvalStencils(_vertexBuffer, srcDesc, │ │ │ │ │ +517 _vertexBuffer, dstDesc, │ │ │ │ │ +518 _vertexStencilTable, │ │ │ │ │ +519 instance, _deviceContext); │ │ │ │ │ +520 │ │ │ │ │ +521 if (_varyingDesc._l_e_n_g_t_h > 0) { │ │ │ │ │ +522 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r vSrcDesc = _varyingDesc; │ │ │ │ │ +523 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r vDstDesc(vSrcDesc); │ │ │ │ │ +524 vDstDesc._o_f_f_s_e_t += numControlVertices * vDstDesc._s_t_r_i_d_e; │ │ │ │ │ +525 │ │ │ │ │ +526 instance = GetEvaluator( │ │ │ │ │ +527 _evaluatorCache, vSrcDesc, vDstDesc, │ │ │ │ │ +528 _deviceContext); │ │ │ │ │ +529 │ │ │ │ │ +530 if (_varyingBuffer) { │ │ │ │ │ +531 // non-interleaved │ │ │ │ │ +532 Evaluator::EvalStencils(_varyingBuffer, vSrcDesc, │ │ │ │ │ +533 _varyingBuffer, vDstDesc, │ │ │ │ │ +534 _varyingStencilTable, │ │ │ │ │ +535 instance, _deviceContext); │ │ │ │ │ +536 } else { │ │ │ │ │ +537 // interleaved │ │ │ │ │ +538 Evaluator::EvalStencils(_vertexBuffer, vSrcDesc, │ │ │ │ │ +539 _vertexBuffer, vDstDesc, │ │ │ │ │ +540 _varyingStencilTable, │ │ │ │ │ +541 instance, _deviceContext); │ │ │ │ │ +542 } │ │ │ │ │ +543 } │ │ │ │ │ +544 } │ │ │ │ │ +545 │ │ │ │ │ +_5_4_6 virtual void _S_y_n_c_h_r_o_n_i_z_e() { │ │ │ │ │ +547 Evaluator::Synchronize(_deviceContext); │ │ │ │ │ +548 } │ │ │ │ │ +549 │ │ │ │ │ +_5_5_0 virtual _P_a_t_c_h_T_a_b_l_e * _G_e_t_P_a_t_c_h_T_a_b_l_e() const { │ │ │ │ │ +551 return _patchTable; │ │ │ │ │ +552 } │ │ │ │ │ +553 │ │ │ │ │ +_5_5_4 virtual _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e() const { │ │ │ │ │ +555 return _farPatchTable; │ │ │ │ │ +556 } │ │ │ │ │ +557 │ │ │ │ │ +_5_5_8 virtual int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const { return _numVertices; } │ │ │ │ │ +559 │ │ │ │ │ +_5_6_0 virtual int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ +561 │ │ │ │ │ +_5_6_2 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r() { │ │ │ │ │ +563 return _vertexBuffer->BindVBO(_deviceContext); │ │ │ │ │ +564 } │ │ │ │ │ +565 │ │ │ │ │ +_5_6_6 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r() { │ │ │ │ │ +567 return _varyingBuffer->BindVBO(_deviceContext); │ │ │ │ │ +568 } │ │ │ │ │ +569 │ │ │ │ │ +_5_7_0 virtual _V_e_r_t_e_x_B_u_f_f_e_r * _G_e_t_V_e_r_t_e_x_B_u_f_f_e_r() { │ │ │ │ │ +571 return _vertexBuffer; │ │ │ │ │ +572 } │ │ │ │ │ +573 │ │ │ │ │ +_5_7_4 virtual _V_e_r_t_e_x_B_u_f_f_e_r * _G_e_t_V_a_r_y_i_n_g_B_u_f_f_e_r() { │ │ │ │ │ +575 return _varyingBuffer; │ │ │ │ │ +576 } │ │ │ │ │ +577 │ │ │ │ │ +_5_7_8 virtual _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const * _G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() const { │ │ │ │ │ +579 return _refiner; │ │ │ │ │ +580 } │ │ │ │ │ +581 │ │ │ │ │ +582private: │ │ │ │ │ +583 void initializeContext(int numVertexElements, │ │ │ │ │ +584 int numVaryingElements, │ │ │ │ │ +585 int level, _M_e_s_h_B_i_t_s_e_t bits) { │ │ │ │ │ +586 assert(_refiner); │ │ │ │ │ +587 │ │ │ │ │ +588 Far::StencilTableFactory::Options options; │ │ │ │ │ +589 options.generateOffsets = true; │ │ │ │ │ +590 options.generateIntermediateLevels = │ │ │ │ │ +591 _refiner->_I_s_U_n_i_f_o_r_m() ? false : true; │ │ │ │ │ +592 │ │ │ │ │ +593 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * vertexStencils = NULL; │ │ │ │ │ +594 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * varyingStencils = NULL; │ │ │ │ │ +595 │ │ │ │ │ +596 if (numVertexElements>0) { │ │ │ │ │ +597 │ │ │ │ │ +598 vertexStencils = _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, │ │ │ │ │ +599 options); │ │ │ │ │ +600 } │ │ │ │ │ +601 │ │ │ │ │ +602 if (numVaryingElements>0) { │ │ │ │ │ +603 │ │ │ │ │ +604 options.interpolationMode = │ │ │ │ │ +605 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G; │ │ │ │ │ +606 │ │ │ │ │ +607 varyingStencils = _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, │ │ │ │ │ +608 options); │ │ │ │ │ +609 } │ │ │ │ │ +610 │ │ │ │ │ +611 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s poptions(level); │ │ │ │ │ +612 poptions.generateFVarTables = bits.test(_M_e_s_h_F_V_a_r_D_a_t_a); │ │ │ │ │ +613 poptions.generateFVarLegacyLinearPatches = !bits.test(_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e); │ │ │ │ │ +614 poptions.generateLegacySharpCornerPatches = !bits.test │ │ │ │ │ +(_M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h); │ │ │ │ │ +615 poptions.useSingleCreasePatch = bits.test(_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h); │ │ │ │ │ +616 poptions.useInfSharpPatch = bits.test(_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h); │ │ │ │ │ +617 │ │ │ │ │ +618 // points on bilinear and gregory basis endcap boundaries can be │ │ │ │ │ +619 // shared among adjacent patches to save some stencils. │ │ │ │ │ +620 if (bits.test(_M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s)) { │ │ │ │ │ +621 poptions.SetEndCapType( │ │ │ │ │ +622 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S); │ │ │ │ │ +623 poptions.shareEndCapPatchPoints = true; │ │ │ │ │ +624 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s)) { │ │ │ │ │ +625 poptions.SetEndCapType( │ │ │ │ │ +626 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S); │ │ │ │ │ +627 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s)) { │ │ │ │ │ +628 poptions.SetEndCapType( │ │ │ │ │ +629 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S); │ │ │ │ │ +630 poptions.shareEndCapPatchPoints = true; │ │ │ │ │ +631 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y)) { │ │ │ │ │ +632 poptions.SetEndCapType( │ │ │ │ │ +633 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y); │ │ │ │ │ +634 } │ │ │ │ │ +635 │ │ │ │ │ +636 _farPatchTable = _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, poptions); │ │ │ │ │ +637 │ │ │ │ │ +638 // if there's endcap stencils, merge it into regular stencils. │ │ │ │ │ +639 if (_farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e()) { │ │ │ │ │ +640 // append stencils │ │ │ │ │ +641 if (Far::StencilTable const *vertexStencilsWithLocalPoints = │ │ │ │ │ +642 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +643 *_refiner, │ │ │ │ │ +644 vertexStencils, │ │ │ │ │ +645 _farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e())) { │ │ │ │ │ +646 delete vertexStencils; │ │ │ │ │ +647 vertexStencils = vertexStencilsWithLocalPoints; │ │ │ │ │ +648 } │ │ │ │ │ +649 if (varyingStencils) { │ │ │ │ │ +650 if (Far::StencilTable const *varyingStencilsWithLocalPoints = │ │ │ │ │ +651 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ +652 *_refiner, │ │ │ │ │ +653 varyingStencils, │ │ │ │ │ +654 _farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e())) { │ │ │ │ │ +655 delete varyingStencils; │ │ │ │ │ +656 varyingStencils = varyingStencilsWithLocalPoints; │ │ │ │ │ +657 } │ │ │ │ │ +658 } │ │ │ │ │ +659 } │ │ │ │ │ +660 │ │ │ │ │ +661 _maxValence = _farPatchTable->_G_e_t_M_a_x_V_a_l_e_n_c_e(); │ │ │ │ │ +662 _patchTable = PatchTable::Create(_farPatchTable, _deviceContext); │ │ │ │ │ +663 │ │ │ │ │ +664 // numvertices = coarse verts + refined verts + gregory basis verts │ │ │ │ │ +665 _numVertices = vertexStencils->_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() │ │ │ │ │ +666 + vertexStencils->_G_e_t_N_u_m_S_t_e_n_c_i_l_s(); │ │ │ │ │ +667 │ │ │ │ │ +668 // convert to device stenciltable if necessary. │ │ │ │ │ +669 _vertexStencilTable = │ │ │ │ │ +670 convertToCompatibleStencilTable( │ │ │ │ │ +671 vertexStencils, _deviceContext); │ │ │ │ │ +672 _varyingStencilTable = │ │ │ │ │ +673 convertToCompatibleStencilTable( │ │ │ │ │ +674 varyingStencils, _deviceContext); │ │ │ │ │ +675 │ │ │ │ │ +676 // FIXME: we do extra copyings for Far::Stencils. │ │ │ │ │ +677 delete vertexStencils; │ │ │ │ │ +678 delete varyingStencils; │ │ │ │ │ +679 } │ │ │ │ │ +680 │ │ │ │ │ +681 void initializeVertexBuffers(int numVertices, │ │ │ │ │ +682 int numVertexElements, │ │ │ │ │ +683 int numVaryingElements) { │ │ │ │ │ +684 │ │ │ │ │ +685 if (numVertexElements) { │ │ │ │ │ +686 _vertexBuffer = VertexBuffer::Create(numVertexElements, │ │ │ │ │ +687 numVertices, _deviceContext); │ │ │ │ │ +688 } │ │ │ │ │ +689 │ │ │ │ │ +690 if (numVaryingElements) { │ │ │ │ │ +691 _varyingBuffer = VertexBuffer::Create(numVaryingElements, │ │ │ │ │ +692 numVertices, _deviceContext); │ │ │ │ │ +693 } │ │ │ │ │ +694 } │ │ │ │ │ +695 │ │ │ │ │ +696 Far::TopologyRefiner * _refiner; │ │ │ │ │ +697 Far::PatchTable * _farPatchTable; │ │ │ │ │ +698 │ │ │ │ │ +699 int _numVertices; │ │ │ │ │ +700 int _maxValence; │ │ │ │ │ +701 │ │ │ │ │ +702 _V_e_r_t_e_x_B_u_f_f_e_r * _vertexBuffer; │ │ │ │ │ +703 _V_e_r_t_e_x_B_u_f_f_e_r * _varyingBuffer; │ │ │ │ │ +704 │ │ │ │ │ +705 BufferDescriptor _vertexDesc; │ │ │ │ │ +706 BufferDescriptor _varyingDesc; │ │ │ │ │ +707 │ │ │ │ │ +708 _S_t_e_n_c_i_l_T_a_b_l_e const * _vertexStencilTable; │ │ │ │ │ +709 _S_t_e_n_c_i_l_T_a_b_l_e const * _varyingStencilTable; │ │ │ │ │ +710 _E_v_a_l_u_a_t_o_r_C_a_c_h_e * _evaluatorCache; │ │ │ │ │ +711 │ │ │ │ │ +712 _P_a_t_c_h_T_a_b_l_e *_patchTable; │ │ │ │ │ +713 _D_e_v_i_c_e_C_o_n_t_e_x_t *_deviceContext; │ │ │ │ │ +714}; │ │ │ │ │ +715 │ │ │ │ │ +716} // end namespace Osd │ │ │ │ │ +717 │ │ │ │ │ +718} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +719using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +720 │ │ │ │ │ +721} // end namespace OpenSubdiv │ │ │ │ │ +722 │ │ │ │ │ +723#endif // OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchParam > PatchParamVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchArray > PatchArrayVector │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +STENCIL_TABLE const * convertToCompatibleStencilTable(SRC_STENCIL_TABLE const │ │ │ │ │ +*table, DEVICE_CONTEXT *context) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_B_i_t_s │ │ │ │ │ +MeshBits │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s │ │ │ │ │ +@ MeshEndCapBilinearBasis │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_N_U_M___M_E_S_H___B_I_T_S │ │ │ │ │ +@ NUM_MESH_BITS │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ +@ MeshUseInfSharpPatch │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ +@ MeshUseSingleCreasePatch │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g │ │ │ │ │ +@ MeshInterleaveVarying │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e │ │ │ │ │ +@ MeshFVarAdaptive │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s │ │ │ │ │ +@ MeshEndCapGregoryBasis │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s │ │ │ │ │ +@ MeshEndCapBSplineBasis │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y │ │ │ │ │ +@ MeshEndCapLegacyGregory │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h │ │ │ │ │ +@ MeshUseSmoothCornerPatch │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_F_V_a_r_D_a_t_a │ │ │ │ │ +@ MeshFVarData │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_A_d_a_p_t_i_v_e │ │ │ │ │ +@ MeshAdaptive │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ +_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> │ │ │ │ │ +Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, │ │ │ │ │ +Far::StencilTable, void >(Far::StencilTable const *table, void *) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_4_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ +_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> │ │ │ │ │ +Far::LimitStencilTable const * convertToCompatibleStencilTable< Far:: │ │ │ │ │ +LimitStencilTable, Far::LimitStencilTable, void >(Far::LimitStencilTable const │ │ │ │ │ +*table, void *) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_B_i_t_s_e_t │ │ │ │ │ +std::bitset< NUM_MESH_BITS > MeshBitset │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_6_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ +_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_ _> │ │ │ │ │ +Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, │ │ │ │ │ +Far::StencilTable, ID3D11DeviceContext >(Far::StencilTable const *table, │ │ │ │ │ +ID3D11DeviceContext *) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_6_9 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ Container for arrays of parametric patches. │ │ │ │ │ DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -Cpu patch table. │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -const PatchArray * GetFVarPatchArrayBuffer(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -const int * GetVaryingPatchIndexBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -std::vector< int > _varyingIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_S_i_z_e │ │ │ │ │ -size_t GetFVarPatchParamSize(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_~_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~CpuPatchTable() │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -PatchParamVector _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -const int * GetPatchIndexBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CpuPatchTable * Create(const Far::PatchTable *patchTable, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< PatchParamVector > _fvarParamBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -CpuPatchTable(const Far::PatchTable *patchTable) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ -std::vector< std::vector< int > > _fvarIndexBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ -size_t GetPatchIndexSize() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -const PatchParam * GetPatchParamBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -std::vector< int > _indexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ -size_t GetFVarPatchIndexSize(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -const int * GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ -const PatchParam * GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_S_i_z_e │ │ │ │ │ -size_t GetPatchParamSize() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ -size_t GetVaryingPatchIndexSize() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -const PatchArray * GetVaryingPatchArrayBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_9_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ +int GetMaxValence() const │ │ │ │ │ +Returns max vertex valence. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_9_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable const * GetLocalPointStencilTable() const │ │ │ │ │ +Returns the stencil table to compute local point vertex values. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable const * GetLocalPointVaryingStencilTable() const │ │ │ │ │ +Returns the stencil table to compute local point varying values. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ +static PatchTable * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ +options=Options(), ConstIndexArray selectedFaces=ConstIndexArray()) │ │ │ │ │ +Instantiates a PatchTable from a client-provided TopologyRefiner. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Public options for the PatchTable factory. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_4_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y │ │ │ │ │ +@ ENDCAP_LEGACY_GREGORY │ │ │ │ │ +legacy option for 2.x style Gregory patches (Catmark only) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S │ │ │ │ │ +@ ENDCAP_GREGORY_BASIS │ │ │ │ │ +use Gregory patches (highest quality, recommended default) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S │ │ │ │ │ +@ ENDCAP_BILINEAR_BASIS │ │ │ │ │ +use linear patches (simple quads or tris) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S │ │ │ │ │ +@ ENDCAP_BSPLINE_BASIS │ │ │ │ │ +use BSpline-like patches (same patch type as regular) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _f_l_o_a_t_ _>_:_: │ │ │ │ │ +_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ +@ INTERPOLATE_VARYING │ │ │ │ │ +varying primvar stencils │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumControlVertices() const │ │ │ │ │ +Returns the number of control vertices indexed in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ +int GetNumStencils() const │ │ │ │ │ +Returns the number of stencils in the table. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ +static StencilTable const * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ +options=Options()) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const │ │ │ │ │ +&refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ +*localPointStencilTable, bool factorize=true) │ │ │ │ │ +DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumVertices() const │ │ │ │ │ +Return the number of vertices in this level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +Stores topology data for a specified set of refinement options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ +bool IsUniform() const │ │ │ │ │ +Returns true if uniform refinement has been applied. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ int GetNumFVarChannels() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -size_t GetNumPatchArrays() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ -const PatchArray * GetPatchArrayBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -PatchArrayVector _varyingPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ +Returns the number of face-varying channels in the tables. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_R_e_f_i_n_e_U_n_i_f_o_r_m │ │ │ │ │ +void RefineUniform(UniformOptions options) │ │ │ │ │ +Refine the topology uniformly. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_L_e_v_e_l │ │ │ │ │ +TopologyLevel const & GetLevel(int level) const │ │ │ │ │ +Returns a handle to access data specific to a particular level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_9_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_R_e_f_i_n_e_A_d_a_p_t_i_v_e │ │ │ │ │ +void RefineAdaptive(AdaptiveOptions options, ConstIndexArray │ │ │ │ │ +selectedFaces=ConstIndexArray()) │ │ │ │ │ +Feature Adaptive topology refinement. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ +Uniform refinement options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l │ │ │ │ │ +unsigned int fullTopologyInLastLevel │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ +Adaptive refinement options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_5_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ +unsigned int useSingleCreasePatch │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ +unsigned int useInfSharpPatch │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +unsigned int considerFVarChannels │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ +int stride │ │ │ │ │ +stride to the next element │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_l_e_n_g_t_h │ │ │ │ │ +int length │ │ │ │ │ +number or length of the data │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_f_f_s_e_t │ │ │ │ │ +int offset │ │ │ │ │ +offset to desired element data │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +virtual Far::PatchTable const * GetFarPatchTable() const =0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_r_e_f_i_n_e_M_e_s_h │ │ │ │ │ +static void refineMesh(Far::TopologyRefiner &refiner, int level, MeshBitset │ │ │ │ │ +bits) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_1_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ +virtual int GetMaxValence() const =0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +virtual int GetNumVertices() const =0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ +virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int │ │ │ │ │ +numVerts)=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_r_e_f_i_n_e_M_e_s_h │ │ │ │ │ +static void refineMesh(Far::TopologyRefiner &refiner, int level, bool adaptive, │ │ │ │ │ +bool singleCreasePatch) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_0_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int │ │ │ │ │ +numVerts)=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +virtual PatchTable * GetPatchTable() const =0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_~_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +virtual ~MeshInterface() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +MeshInterface() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_R_e_f_i_n_e │ │ │ │ │ +virtual void Refine()=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ +PatchTable::VertexBufferBinding VertexBufferBinding │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBufferBinding BindVertexBuffer()=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBufferBinding BindVaryingBuffer()=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +PATCH_TABLE PatchTable │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +virtual void Synchronize()=0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ +EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ +const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ +DEVICE_CONTEXT *deviceContext) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_4_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ +EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ +const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ +BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ +BufferDescriptor const &dvvDesc, DEVICE_CONTEXT *deviceContext) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_5_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ +EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ +const &dstDesc, DEVICE_CONTEXT *deviceContext) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_~_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T │ │ │ │ │ +~EvaluatorCacheT() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_v_a_l_u_a_t_o_r_s │ │ │ │ │ +std::vector< Entry > Evaluators │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_E_n_t_r_y │ │ │ │ │ +Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, │ │ │ │ │ +BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, │ │ │ │ │ +BufferDescriptor const &duuDescArg, BufferDescriptor const &duvDescArg, │ │ │ │ │ +BufferDescriptor const &dvvDescArg, EVALUATOR *evalArg) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_v_v_D_e_s_c │ │ │ │ │ +BufferDescriptor dvvDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_v_D_e_s_c │ │ │ │ │ +BufferDescriptor duvDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_s_t_D_e_s_c │ │ │ │ │ +BufferDescriptor dstDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_D_e_s_c │ │ │ │ │ +BufferDescriptor duDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_s_r_c_D_e_s_c │ │ │ │ │ +BufferDescriptor srcDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_u_D_e_s_c │ │ │ │ │ +BufferDescriptor duuDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_e_v_a_l_u_a_t_o_r │ │ │ │ │ +EVALUATOR * evaluator │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_E_n_t_r_y │ │ │ │ │ +Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, │ │ │ │ │ +BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, EVALUATOR │ │ │ │ │ +*evalArg) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_1_9_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_v_D_e_s_c │ │ │ │ │ +BufferDescriptor dvDesc │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +virtual Far::TopologyRefiner const * GetTopologyRefiner() const │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBuffer * GetVertexBuffer() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ +virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int │ │ │ │ │ +numVerts) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_9_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBuffer * GetVaryingBuffer() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_R_e_f_i_n_e │ │ │ │ │ +virtual void Refine() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_0_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_D_e_v_i_c_e_C_o_n_t_e_x_t │ │ │ │ │ +DEVICE_CONTEXT DeviceContext │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_E_v_a_l_u_a_t_o_r │ │ │ │ │ +EVALUATOR Evaluator │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBufferBinding BindVertexBuffer() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +virtual int GetNumVertices() const │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_M_e_s_h │ │ │ │ │ +Mesh(Far::TopologyRefiner *refiner, int numVertexElements, int │ │ │ │ │ +numVaryingElements, int level, MeshBitset bits=MeshBitset(), EvaluatorCache │ │ │ │ │ +*evaluatorCache=NULL, DeviceContext *deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +STENCIL_TABLE StencilTable │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +VERTEX_BUFFER VertexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e │ │ │ │ │ +EvaluatorCacheT< Evaluator > EvaluatorCache │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ +virtual VertexBufferBinding BindVaryingBuffer() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_~_M_e_s_h │ │ │ │ │ +virtual ~Mesh() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_7_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ +PatchTable::VertexBufferBinding VertexBufferBinding │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int │ │ │ │ │ +numVerts) │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_8_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +virtual void Synchronize() │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_4_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +virtual PatchTable * GetPatchTable() const │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +virtual Far::PatchTable const * GetFarPatchTable() const │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +PATCH_TABLE PatchTable │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ +virtual int GetMaxValence() const │ │ │ │ │ +DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_0 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _m_e_s_h_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00890.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,27 +90,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cpuEvaluator.h File Reference
│ │ │ │ +
cpuVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ -#include "../osd/types.h"
│ │ │ │ #include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CpuEvaluator
class  CpuVertexBuffer
 Concrete vertex buffer class for CPU subdivision. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cpuEvaluator.h File Reference │ │ │ │ │ +cpuVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ #include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_p_u_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for CPU subdivision. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00890 = [ │ │ │ │ │ - ["CpuEvaluator", "a01165.html", null] │ │ │ │ │ + ["CpuVertexBuffer", "a01177.html", "a01177"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cpuEvaluator.h
│ │ │ │ +
cpuVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 Pixar
│ │ │ │ +
2// Copyright 2013 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,529 +119,75 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include "../osd/bufferDescriptor.h"
│ │ │ │ -
30#include "../osd/types.h"
│ │ │ │ +
29
│ │ │ │ +
30#include <cstddef>
│ │ │ │
31
│ │ │ │ -
32#include <cstddef>
│ │ │ │ -
33
│ │ │ │ -
34namespace OpenSubdiv {
│ │ │ │ -
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
34
│ │ │ │ +
35namespace Osd {
│ │ │ │
36
│ │ │ │ -
37namespace Osd {
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40public:
│ │ │ │ -
46
│ │ │ │ -
71 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
72 static bool EvalStencils(
│ │ │ │ -
73 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
74 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
75 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
76 const CpuEvaluator *instance = NULL,
│ │ │ │ -
77 void * deviceContext = NULL) {
│ │ │ │ -
78
│ │ │ │ -
79 (void)instance; // unused
│ │ │ │ -
80 (void)deviceContext; // unused
│ │ │ │ -
81
│ │ │ │ -
82 if (stencilTable->GetNumStencils() == 0)
│ │ │ │ -
83 return false;
│ │ │ │ -
84
│ │ │ │ -
85 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
86 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
87 &stencilTable->GetSizes()[0],
│ │ │ │ -
88 &stencilTable->GetOffsets()[0],
│ │ │ │ -
89 &stencilTable->GetControlIndices()[0],
│ │ │ │ -
90 &stencilTable->GetWeights()[0],
│ │ │ │ -
91 /*start = */ 0,
│ │ │ │ -
92 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
121 static bool EvalStencils(
│ │ │ │ -
122 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
123 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
124 const int * sizes,
│ │ │ │ -
125 const int * offsets,
│ │ │ │ -
126 const int * indices,
│ │ │ │ -
127 const float * weights,
│ │ │ │ -
128 int start, int end);
│ │ │ │ -
129
│ │ │ │ -
167 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
168 static bool EvalStencils(
│ │ │ │ -
169 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
170 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
171 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
172 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
173 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
174 const CpuEvaluator *instance = NULL,
│ │ │ │ -
175 void * deviceContext = NULL) {
│ │ │ │ -
176
│ │ │ │ -
177 (void)instance; // unused
│ │ │ │ -
178 (void)deviceContext; // unused
│ │ │ │ -
179
│ │ │ │ -
180 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
181 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
182 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
183 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
184 &stencilTable->GetSizes()[0],
│ │ │ │ -
185 &stencilTable->GetOffsets()[0],
│ │ │ │ -
186 &stencilTable->GetControlIndices()[0],
│ │ │ │ -
187 &stencilTable->GetWeights()[0],
│ │ │ │ -
188 &stencilTable->GetDuWeights()[0],
│ │ │ │ -
189 &stencilTable->GetDvWeights()[0],
│ │ │ │ -
190 /*start = */ 0,
│ │ │ │ -
191 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
234 static bool EvalStencils(
│ │ │ │ -
235 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
236 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
237 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
238 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
239 const int * sizes,
│ │ │ │ -
240 const int * offsets,
│ │ │ │ -
241 const int * indices,
│ │ │ │ -
242 const float * weights,
│ │ │ │ -
243 const float * duWeights,
│ │ │ │ -
244 const float * dvWeights,
│ │ │ │ -
245 int start, int end);
│ │ │ │ -
246
│ │ │ │ -
302 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ -
│ │ │ │ -
303 static bool EvalStencils(
│ │ │ │ -
304 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
305 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
306 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
307 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
308 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
309 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
310 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
311 STENCIL_TABLE const *stencilTable,
│ │ │ │ -
312 const CpuEvaluator *instance = NULL,
│ │ │ │ -
313 void * deviceContext = NULL) {
│ │ │ │ -
314
│ │ │ │ -
315 (void)instance; // unused
│ │ │ │ -
316 (void)deviceContext; // unused
│ │ │ │ -
317
│ │ │ │ -
318 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
319 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
320 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
321 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
322 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ -
323 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ -
324 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ -
325 &stencilTable->GetSizes()[0],
│ │ │ │ -
326 &stencilTable->GetOffsets()[0],
│ │ │ │ -
327 &stencilTable->GetControlIndices()[0],
│ │ │ │ -
328 &stencilTable->GetWeights()[0],
│ │ │ │ -
329 &stencilTable->GetDuWeights()[0],
│ │ │ │ -
330 &stencilTable->GetDvWeights()[0],
│ │ │ │ -
331 &stencilTable->GetDuuWeights()[0],
│ │ │ │ -
332 &stencilTable->GetDuvWeights()[0],
│ │ │ │ -
333 &stencilTable->GetDvvWeights()[0],
│ │ │ │ -
334 /*start = */ 0,
│ │ │ │ -
335 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ -
336 }
│ │ │ │ -
│ │ │ │ -
337
│ │ │ │ -
399 static bool EvalStencils(
│ │ │ │ -
400 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
401 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
402 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
403 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
404 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ -
405 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ -
406 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ -
407 const int * sizes,
│ │ │ │ -
408 const int * offsets,
│ │ │ │ -
409 const int * indices,
│ │ │ │ -
410 const float * weights,
│ │ │ │ -
411 const float * duWeights,
│ │ │ │ -
412 const float * dvWeights,
│ │ │ │ -
413 const float * duuWeights,
│ │ │ │ -
414 const float * duvWeights,
│ │ │ │ -
415 const float * dvvWeights,
│ │ │ │ -
416 int start, int end);
│ │ │ │ -
417
│ │ │ │ -
423
│ │ │ │ -
452 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
453 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
454 static bool EvalPatches(
│ │ │ │ -
455 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
456 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
457 int numPatchCoords,
│ │ │ │ -
458 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
459 PATCH_TABLE *patchTable,
│ │ │ │ -
460 CpuEvaluator const *instance = NULL,
│ │ │ │ -
461 void * deviceContext = NULL) {
│ │ │ │ -
462
│ │ │ │ -
463 (void)instance; // unused
│ │ │ │ -
464 (void)deviceContext; // unused
│ │ │ │ -
465
│ │ │ │ -
466 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
467 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
468 numPatchCoords,
│ │ │ │ -
469 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
470 patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
471 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
472 patchTable->GetPatchParamBuffer());
│ │ │ │ -
473 }
│ │ │ │ -
│ │ │ │ -
474
│ │ │ │ -
515 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
516 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
517 static bool EvalPatches(
│ │ │ │ -
518 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
519 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
520 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
521 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
522 int numPatchCoords,
│ │ │ │ -
523 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
524 PATCH_TABLE *patchTable,
│ │ │ │ -
525 CpuEvaluator const *instance = NULL,
│ │ │ │ -
526 void * deviceContext = NULL) {
│ │ │ │ -
527
│ │ │ │ -
528 (void)instance; // unused
│ │ │ │ -
529 (void)deviceContext; // unused
│ │ │ │ -
530
│ │ │ │ -
531 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop.
│ │ │ │ -
532 // ideally all buffer classes should have templated by datatype
│ │ │ │ -
533 // so that downcast isn't needed there.
│ │ │ │ -
534 // (e.g. Osd::CpuBuffer<PatchCoord> )
│ │ │ │ -
535 //
│ │ │ │ -
536 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
537 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
538 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
539 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
540 numPatchCoords,
│ │ │ │ -
541 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
542 patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
543 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
544 patchTable->GetPatchParamBuffer());
│ │ │ │ -
545 }
│ │ │ │ -
│ │ │ │ -
546
│ │ │ │ -
605 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
606 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ -
607 static bool EvalPatches(
│ │ │ │ -
608 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
609 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
610 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
611 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
612 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
613 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
614 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
615 int numPatchCoords,
│ │ │ │ -
616 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
617 PATCH_TABLE *patchTable,
│ │ │ │ -
618 CpuEvaluator const *instance = NULL,
│ │ │ │ -
619 void * deviceContext = NULL) {
│ │ │ │ -
620
│ │ │ │ -
621 (void)instance; // unused
│ │ │ │ -
622 (void)deviceContext; // unused
│ │ │ │ -
623
│ │ │ │ -
624 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop.
│ │ │ │ -
625 // ideally all buffer classes should have templated by datatype
│ │ │ │ -
626 // so that downcast isn't needed there.
│ │ │ │ -
627 // (e.g. Osd::CpuBuffer<PatchCoord> )
│ │ │ │ -
628 //
│ │ │ │ -
629 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
630 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
631 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
632 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
633 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ -
634 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ -
635 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ -
636 numPatchCoords,
│ │ │ │ -
637 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
638 patchTable->GetPatchArrayBuffer(),
│ │ │ │ -
639 patchTable->GetPatchIndexBuffer(),
│ │ │ │ -
640 patchTable->GetPatchParamBuffer());
│ │ │ │ -
641 }
│ │ │ │ -
│ │ │ │ -
642
│ │ │ │ -
670 static bool EvalPatches(
│ │ │ │ -
671 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
672 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
673 int numPatchCoords,
│ │ │ │ -
674 const PatchCoord *patchCoords,
│ │ │ │ -
675 const PatchArray *patchArrays,
│ │ │ │ -
676 const int *patchIndexBuffer,
│ │ │ │ -
677 const PatchParam *patchParamBuffer);
│ │ │ │ -
678
│ │ │ │ -
716 static bool EvalPatches(
│ │ │ │ -
717 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
718 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
719 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
720 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
721 int numPatchCoords,
│ │ │ │ -
722 PatchCoord const *patchCoords,
│ │ │ │ -
723 PatchArray const *patchArrays,
│ │ │ │ -
724 const int *patchIndexBuffer,
│ │ │ │ -
725 PatchParam const *patchParamBuffer);
│ │ │ │ -
726
│ │ │ │ -
779 static bool EvalPatches(
│ │ │ │ -
780 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ -
781 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ -
782 float *du, BufferDescriptor const &duDesc,
│ │ │ │ -
783 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ -
784 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ -
785 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ -
786 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ -
787 int numPatchCoords,
│ │ │ │ -
788 PatchCoord const *patchCoords,
│ │ │ │ -
789 PatchArray const *patchArrays,
│ │ │ │ -
790 const int *patchIndexBuffer,
│ │ │ │ -
791 PatchParam const *patchParamBuffer);
│ │ │ │ -
792
│ │ │ │ -
821 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
822 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
824 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
825 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
826 int numPatchCoords,
│ │ │ │ -
827 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
828 PATCH_TABLE *patchTable,
│ │ │ │ -
829 CpuEvaluator const *instance = NULL,
│ │ │ │ -
830 void * deviceContext = NULL) {
│ │ │ │ -
831
│ │ │ │ -
832 (void)instance; // unused
│ │ │ │ -
833 (void)deviceContext; // unused
│ │ │ │ -
834
│ │ │ │ -
835 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
836 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
837 numPatchCoords,
│ │ │ │ -
838 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
839 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
840 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
841 patchTable->GetPatchParamBuffer());
│ │ │ │ -
842 }
│ │ │ │ -
│ │ │ │ -
843
│ │ │ │ -
884 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
885 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
887 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
888 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
889 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
890 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
891 int numPatchCoords,
│ │ │ │ -
892 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
893 PATCH_TABLE *patchTable,
│ │ │ │ -
894 CpuEvaluator const *instance = NULL,
│ │ │ │ -
895 void * deviceContext = NULL) {
│ │ │ │ -
896
│ │ │ │ -
897 (void)instance; // unused
│ │ │ │ -
898 (void)deviceContext; // unused
│ │ │ │ -
899
│ │ │ │ -
900 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
901 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
902 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
903 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
904 numPatchCoords,
│ │ │ │ -
905 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
906 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
907 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
908 patchTable->GetPatchParamBuffer());
│ │ │ │ -
909 }
│ │ │ │ -
│ │ │ │ -
910
│ │ │ │ -
969 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
970 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
972 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
973 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
974 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
975 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
976 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
977 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
978 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
979 int numPatchCoords,
│ │ │ │ -
980 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
981 PATCH_TABLE *patchTable,
│ │ │ │ -
982 CpuEvaluator const *instance = NULL,
│ │ │ │ -
983 void * deviceContext = NULL) {
│ │ │ │ -
984
│ │ │ │ -
985 (void)instance; // unused
│ │ │ │ -
986 (void)deviceContext; // unused
│ │ │ │ -
987
│ │ │ │ -
988 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
989 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
990 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
991 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
992 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ -
993 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ -
994 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ -
995 numPatchCoords,
│ │ │ │ -
996 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
997 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ -
998 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ -
999 patchTable->GetPatchParamBuffer());
│ │ │ │ -
1000 }
│ │ │ │ -
│ │ │ │ -
1001
│ │ │ │ -
1032 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1033 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1035 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1036 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1037 int numPatchCoords,
│ │ │ │ -
1038 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1039 PATCH_TABLE *patchTable,
│ │ │ │ -
1040 int fvarChannel,
│ │ │ │ -
1041 CpuEvaluator const *instance = NULL,
│ │ │ │ -
1042 void * deviceContext = NULL) {
│ │ │ │ -
1043
│ │ │ │ -
1044 (void)instance; // unused
│ │ │ │ -
1045 (void)deviceContext; // unused
│ │ │ │ -
1046
│ │ │ │ -
1047 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
1048 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
1049 numPatchCoords,
│ │ │ │ -
1050 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
1051 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1052 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1053 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1054 }
│ │ │ │ -
│ │ │ │ -
1055
│ │ │ │ -
1098 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1099 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1101 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1102 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1103 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1104 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1105 int numPatchCoords,
│ │ │ │ -
1106 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1107 PATCH_TABLE *patchTable,
│ │ │ │ -
1108 int fvarChannel,
│ │ │ │ -
1109 CpuEvaluator const *instance = NULL,
│ │ │ │ -
1110 void * deviceContext = NULL) {
│ │ │ │ -
1111
│ │ │ │ -
1112 (void)instance; // unused
│ │ │ │ -
1113 (void)deviceContext; // unused
│ │ │ │ -
1114
│ │ │ │ -
1115 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
1116 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
1117 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
1118 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
1119 numPatchCoords,
│ │ │ │ -
1120 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
1121 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1122 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1123 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1124 }
│ │ │ │ -
│ │ │ │ -
1125
│ │ │ │ -
1186 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ -
1187 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1189 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ -
1190 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ -
1191 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ -
1192 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ -
1193 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ -
1194 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ -
1195 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ -
1196 int numPatchCoords,
│ │ │ │ -
1197 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ -
1198 PATCH_TABLE *patchTable,
│ │ │ │ -
1199 int fvarChannel,
│ │ │ │ -
1200 CpuEvaluator const *instance = NULL,
│ │ │ │ -
1201 void * deviceContext = NULL) {
│ │ │ │ -
1202
│ │ │ │ -
1203 (void)instance; // unused
│ │ │ │ -
1204 (void)deviceContext; // unused
│ │ │ │ -
1205
│ │ │ │ -
1206 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ -
1207 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ -
1208 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ -
1209 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ -
1210 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ -
1211 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ -
1212 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ -
1213 numPatchCoords,
│ │ │ │ -
1214 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ -
1215 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ -
1216 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ -
1217 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ -
1218 }
│ │ │ │ -
│ │ │ │ -
1219
│ │ │ │ -
1225
│ │ │ │ -
│ │ │ │ -
1227 static void Synchronize(void * /*deviceContext = NULL*/) {
│ │ │ │ -
1228 // nothing.
│ │ │ │ -
1229 }
│ │ │ │ -
│ │ │ │ -
1230};
│ │ │ │ -
│ │ │ │ -
1231
│ │ │ │ -
1232
│ │ │ │ -
1233} // end namespace Osd
│ │ │ │ -
1234
│ │ │ │ -
1235} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
1236using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
1237
│ │ │ │ -
1238} // end namespace OpenSubdiv
│ │ │ │ -
1239
│ │ │ │ -
1240
│ │ │ │ -
1241#endif // OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ - │ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw CPU pointers for input and output.
│ │ │ │ -
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.
│ │ │ │ -
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, const float *duuWeights, const float *duvWeights, const float *dvvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.
│ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, PatchParam const *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, PatchParam const *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ -
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ -
static void Synchronize(void *)
synchronize all asynchronous computation invoked on this device.
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function. This function has a same signature as other device kernels hav...
│ │ │ │ -
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ -
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ -
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
43public:
│ │ │ │ +
45 static CpuVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
46 void *deviceContext = NULL);
│ │ │ │ +
47
│ │ │ │ + │ │ │ │ +
50
│ │ │ │ +
53 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
54 void *deviceContext = NULL);
│ │ │ │ +
55
│ │ │ │ +
57 int GetNumElements() const;
│ │ │ │ +
58
│ │ │ │ +
60 int GetNumVertices() const;
│ │ │ │ +
61
│ │ │ │ +
63 float * BindCpuBuffer();
│ │ │ │ +
64
│ │ │ │ +
65protected:
│ │ │ │ +
67 CpuVertexBuffer(int numElements, int numVertices);
│ │ │ │ +
68
│ │ │ │ +
69private:
│ │ │ │ +
70 int _numElements;
│ │ │ │ +
71 int _numVertices;
│ │ │ │ +
72 float *_cpuBuffer;
│ │ │ │ +
73};
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75
│ │ │ │ +
76} // end namespace Osd
│ │ │ │ +
77
│ │ │ │ +
78} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
79using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
80
│ │ │ │ +
81} // end namespace OpenSubdiv
│ │ │ │ +
82
│ │ │ │ +
83#endif // OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ + │ │ │ │ +
Concrete vertex buffer class for CPU subdivision.
│ │ │ │ +
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ +
static CpuVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ +
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ + │ │ │ │ +
float * BindCpuBuffer()
Returns the address of CPU buffer.
│ │ │ │ +
CpuVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuEvaluator.h │ │ │ │ │ +cpuVertexBuffer.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2015 Pixar │ │ │ │ │ +2// Copyright 2013 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,655 +24,84 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../osd/bufferDescriptor.h" │ │ │ │ │ -30#include "../osd/types.h" │ │ │ │ │ +29 │ │ │ │ │ +30#include │ │ │ │ │ 31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +35namespace Osd { │ │ │ │ │ 36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ -38 │ │ │ │ │ -_3_9class _C_p_u_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -40public: │ │ │ │ │ -46 │ │ │ │ │ -71 template │ │ │ │ │ -_7_2 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -73 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -74 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -75 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -76 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -77 void * deviceContext = NULL) { │ │ │ │ │ -78 │ │ │ │ │ -79 (void)instance; // unused │ │ │ │ │ -80 (void)deviceContext; // unused │ │ │ │ │ -81 │ │ │ │ │ -82 if (stencilTable->GetNumStencils() == 0) │ │ │ │ │ -83 return false; │ │ │ │ │ -84 │ │ │ │ │ -85 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -86 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -87 &stencilTable->GetSizes()[0], │ │ │ │ │ -88 &stencilTable->GetOffsets()[0], │ │ │ │ │ -89 &stencilTable->GetControlIndices()[0], │ │ │ │ │ -90 &stencilTable->GetWeights()[0], │ │ │ │ │ -91 /*start = */ 0, │ │ │ │ │ -92 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -_1_2_1 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -122 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -123 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -124 const int * sizes, │ │ │ │ │ -125 const int * offsets, │ │ │ │ │ -126 const int * indices, │ │ │ │ │ -127 const float * weights, │ │ │ │ │ -128 int start, int end); │ │ │ │ │ -129 │ │ │ │ │ -167 template │ │ │ │ │ -_1_6_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -169 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -170 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -171 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -172 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -173 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -174 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -175 void * deviceContext = NULL) { │ │ │ │ │ -176 │ │ │ │ │ -177 (void)instance; // unused │ │ │ │ │ -178 (void)deviceContext; // unused │ │ │ │ │ -179 │ │ │ │ │ -180 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -181 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -182 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -183 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -184 &stencilTable->GetSizes()[0], │ │ │ │ │ -185 &stencilTable->GetOffsets()[0], │ │ │ │ │ -186 &stencilTable->GetControlIndices()[0], │ │ │ │ │ -187 &stencilTable->GetWeights()[0], │ │ │ │ │ -188 &stencilTable->GetDuWeights()[0], │ │ │ │ │ -189 &stencilTable->GetDvWeights()[0], │ │ │ │ │ -190 /*start = */ 0, │ │ │ │ │ -191 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -_2_3_4 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -235 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -236 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -237 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -238 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -239 const int * sizes, │ │ │ │ │ -240 const int * offsets, │ │ │ │ │ -241 const int * indices, │ │ │ │ │ -242 const float * weights, │ │ │ │ │ -243 const float * duWeights, │ │ │ │ │ -244 const float * dvWeights, │ │ │ │ │ -245 int start, int end); │ │ │ │ │ -246 │ │ │ │ │ -302 template │ │ │ │ │ -_3_0_3 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -304 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -305 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -306 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -307 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -308 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -309 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -310 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -311 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -312 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -313 void * deviceContext = NULL) { │ │ │ │ │ -314 │ │ │ │ │ -315 (void)instance; // unused │ │ │ │ │ -316 (void)deviceContext; // unused │ │ │ │ │ -317 │ │ │ │ │ -318 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -319 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -320 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -321 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -322 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ -323 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ -324 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ -325 &stencilTable->GetSizes()[0], │ │ │ │ │ -326 &stencilTable->GetOffsets()[0], │ │ │ │ │ -327 &stencilTable->GetControlIndices()[0], │ │ │ │ │ -328 &stencilTable->GetWeights()[0], │ │ │ │ │ -329 &stencilTable->GetDuWeights()[0], │ │ │ │ │ -330 &stencilTable->GetDvWeights()[0], │ │ │ │ │ -331 &stencilTable->GetDuuWeights()[0], │ │ │ │ │ -332 &stencilTable->GetDuvWeights()[0], │ │ │ │ │ -333 &stencilTable->GetDvvWeights()[0], │ │ │ │ │ -334 /*start = */ 0, │ │ │ │ │ -335 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -336 } │ │ │ │ │ -337 │ │ │ │ │ -_3_9_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -400 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -401 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -402 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -403 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -404 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -405 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -406 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -407 const int * sizes, │ │ │ │ │ -408 const int * offsets, │ │ │ │ │ -409 const int * indices, │ │ │ │ │ -410 const float * weights, │ │ │ │ │ -411 const float * duWeights, │ │ │ │ │ -412 const float * dvWeights, │ │ │ │ │ -413 const float * duuWeights, │ │ │ │ │ -414 const float * duvWeights, │ │ │ │ │ -415 const float * dvvWeights, │ │ │ │ │ -416 int start, int end); │ │ │ │ │ -417 │ │ │ │ │ -423 │ │ │ │ │ -452 template │ │ │ │ │ -_4_5_4 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -455 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -456 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -457 int numPatchCoords, │ │ │ │ │ -458 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -459 PATCH_TABLE *patchTable, │ │ │ │ │ -460 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -461 void * deviceContext = NULL) { │ │ │ │ │ -462 │ │ │ │ │ -463 (void)instance; // unused │ │ │ │ │ -464 (void)deviceContext; // unused │ │ │ │ │ -465 │ │ │ │ │ -466 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -467 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -468 numPatchCoords, │ │ │ │ │ -469 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -470 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -471 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -472 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -473 } │ │ │ │ │ -474 │ │ │ │ │ -515 template │ │ │ │ │ -_5_1_7 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -518 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -519 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -520 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -521 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -522 int numPatchCoords, │ │ │ │ │ -523 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -524 PATCH_TABLE *patchTable, │ │ │ │ │ -525 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -526 void * deviceContext = NULL) { │ │ │ │ │ -527 │ │ │ │ │ -528 (void)instance; // unused │ │ │ │ │ -529 (void)deviceContext; // unused │ │ │ │ │ -530 │ │ │ │ │ -531 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop. │ │ │ │ │ -532 // ideally all buffer classes should have templated by datatype │ │ │ │ │ -533 // so that downcast isn't needed there. │ │ │ │ │ -534 // (e.g. Osd::CpuBuffer ) │ │ │ │ │ -535 // │ │ │ │ │ -536 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -537 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -538 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -539 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -540 numPatchCoords, │ │ │ │ │ -541 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -542 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -543 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -544 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -545 } │ │ │ │ │ -546 │ │ │ │ │ -605 template │ │ │ │ │ -_6_0_7 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -608 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -609 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -610 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -611 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -612 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -613 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -614 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -615 int numPatchCoords, │ │ │ │ │ -616 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -617 PATCH_TABLE *patchTable, │ │ │ │ │ -618 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -619 void * deviceContext = NULL) { │ │ │ │ │ -620 │ │ │ │ │ -621 (void)instance; // unused │ │ │ │ │ -622 (void)deviceContext; // unused │ │ │ │ │ -623 │ │ │ │ │ -624 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop. │ │ │ │ │ -625 // ideally all buffer classes should have templated by datatype │ │ │ │ │ -626 // so that downcast isn't needed there. │ │ │ │ │ -627 // (e.g. Osd::CpuBuffer ) │ │ │ │ │ -628 // │ │ │ │ │ -629 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -630 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -631 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -632 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -633 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ -634 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ -635 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ -636 numPatchCoords, │ │ │ │ │ -637 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -638 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -639 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -640 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -641 } │ │ │ │ │ -642 │ │ │ │ │ -_6_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -671 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -672 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -673 int numPatchCoords, │ │ │ │ │ -674 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ -675 const _P_a_t_c_h_A_r_r_a_y *patchArrays, │ │ │ │ │ -676 const int *patchIndexBuffer, │ │ │ │ │ -677 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ -678 │ │ │ │ │ -_7_1_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -717 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -718 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -719 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -720 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -721 int numPatchCoords, │ │ │ │ │ -722 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ -723 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ -724 const int *patchIndexBuffer, │ │ │ │ │ -725 _P_a_t_c_h_P_a_r_a_m const *patchParamBuffer); │ │ │ │ │ -726 │ │ │ │ │ -_7_7_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -780 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -781 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -782 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -783 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -784 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -785 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -786 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -787 int numPatchCoords, │ │ │ │ │ -788 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ -789 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ -790 const int *patchIndexBuffer, │ │ │ │ │ -791 _P_a_t_c_h_P_a_r_a_m const *patchParamBuffer); │ │ │ │ │ -792 │ │ │ │ │ -821 template │ │ │ │ │ -_8_2_3 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -824 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -825 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -826 int numPatchCoords, │ │ │ │ │ -827 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -828 PATCH_TABLE *patchTable, │ │ │ │ │ -829 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -830 void * deviceContext = NULL) { │ │ │ │ │ -831 │ │ │ │ │ -832 (void)instance; // unused │ │ │ │ │ -833 (void)deviceContext; // unused │ │ │ │ │ -834 │ │ │ │ │ -835 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -836 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -837 numPatchCoords, │ │ │ │ │ -838 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -839 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -840 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -841 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -842 } │ │ │ │ │ -843 │ │ │ │ │ -884 template │ │ │ │ │ -_8_8_6 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -887 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -888 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -889 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -890 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -891 int numPatchCoords, │ │ │ │ │ -892 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -893 PATCH_TABLE *patchTable, │ │ │ │ │ -894 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -895 void * deviceContext = NULL) { │ │ │ │ │ -896 │ │ │ │ │ -897 (void)instance; // unused │ │ │ │ │ -898 (void)deviceContext; // unused │ │ │ │ │ -899 │ │ │ │ │ -900 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -901 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -902 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -903 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -904 numPatchCoords, │ │ │ │ │ -905 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -906 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -907 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -908 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -909 } │ │ │ │ │ -910 │ │ │ │ │ -969 template │ │ │ │ │ -_9_7_1 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -972 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -973 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -974 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -975 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -976 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -977 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -978 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -979 int numPatchCoords, │ │ │ │ │ -980 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -981 PATCH_TABLE *patchTable, │ │ │ │ │ -982 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -983 void * deviceContext = NULL) { │ │ │ │ │ -984 │ │ │ │ │ -985 (void)instance; // unused │ │ │ │ │ -986 (void)deviceContext; // unused │ │ │ │ │ -987 │ │ │ │ │ -988 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -989 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -990 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -991 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -992 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ -993 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ -994 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ -995 numPatchCoords, │ │ │ │ │ -996 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -997 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -998 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -999 patchTable->GetPatchParamBuffer()); │ │ │ │ │ -1000 } │ │ │ │ │ -1001 │ │ │ │ │ -1032 template │ │ │ │ │ -_1_0_3_4 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1035 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1036 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1037 int numPatchCoords, │ │ │ │ │ -1038 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1039 PATCH_TABLE *patchTable, │ │ │ │ │ -1040 int fvarChannel, │ │ │ │ │ -1041 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -1042 void * deviceContext = NULL) { │ │ │ │ │ -1043 │ │ │ │ │ -1044 (void)instance; // unused │ │ │ │ │ -1045 (void)deviceContext; // unused │ │ │ │ │ -1046 │ │ │ │ │ -1047 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -1048 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -1049 numPatchCoords, │ │ │ │ │ -1050 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -1051 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1052 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1053 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1054 } │ │ │ │ │ -1055 │ │ │ │ │ -1098 template │ │ │ │ │ -_1_1_0_0 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1101 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1102 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1103 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1104 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1105 int numPatchCoords, │ │ │ │ │ -1106 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1107 PATCH_TABLE *patchTable, │ │ │ │ │ -1108 int fvarChannel, │ │ │ │ │ -1109 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -1110 void * deviceContext = NULL) { │ │ │ │ │ -1111 │ │ │ │ │ -1112 (void)instance; // unused │ │ │ │ │ -1113 (void)deviceContext; // unused │ │ │ │ │ -1114 │ │ │ │ │ -1115 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -1116 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -1117 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -1118 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -1119 numPatchCoords, │ │ │ │ │ -1120 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -1121 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1122 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1123 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1124 } │ │ │ │ │ -1125 │ │ │ │ │ -1186 template │ │ │ │ │ -_1_1_8_8 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1189 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1190 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1191 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1192 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1193 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1194 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1195 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1196 int numPatchCoords, │ │ │ │ │ -1197 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1198 PATCH_TABLE *patchTable, │ │ │ │ │ -1199 int fvarChannel, │ │ │ │ │ -1200 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ -1201 void * deviceContext = NULL) { │ │ │ │ │ -1202 │ │ │ │ │ -1203 (void)instance; // unused │ │ │ │ │ -1204 (void)deviceContext; // unused │ │ │ │ │ -1205 │ │ │ │ │ -1206 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ -1207 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ -1208 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ -1209 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ -1210 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ -1211 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ -1212 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ -1213 numPatchCoords, │ │ │ │ │ -1214 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ -1215 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -1216 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -1217 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ -1218 } │ │ │ │ │ -1219 │ │ │ │ │ -1225 │ │ │ │ │ -_1_2_2_7 static void _S_y_n_c_h_r_o_n_i_z_e(void * /*deviceContext = NULL*/) { │ │ │ │ │ -1228 // nothing. │ │ │ │ │ -1229 } │ │ │ │ │ -1230}; │ │ │ │ │ -1231 │ │ │ │ │ -1232 │ │ │ │ │ -1233} // end namespace Osd │ │ │ │ │ -1234 │ │ │ │ │ -1235} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -1236using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -1237 │ │ │ │ │ -1238} // end namespace OpenSubdiv │ │ │ │ │ -1239 │ │ │ │ │ -1240 │ │ │ │ │ -1241#endif // OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ +_4_2class _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +43public: │ │ │ │ │ +_4_5 static _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +46 void *deviceContext = NULL); │ │ │ │ │ +47 │ │ │ │ │ +_4_9 _~_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ +50 │ │ │ │ │ +_5_3 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +54 void *deviceContext = NULL); │ │ │ │ │ +55 │ │ │ │ │ +_5_7 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +58 │ │ │ │ │ +_6_0 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +61 │ │ │ │ │ +_6_3 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ +64 │ │ │ │ │ +65protected: │ │ │ │ │ +_6_7 _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +68 │ │ │ │ │ +69private: │ │ │ │ │ +70 int _numElements; │ │ │ │ │ +71 int _numVertices; │ │ │ │ │ +72 float *_cpuBuffer; │ │ │ │ │ +73}; │ │ │ │ │ +74 │ │ │ │ │ +75 │ │ │ │ │ +76} // end namespace Osd │ │ │ │ │ +77 │ │ │ │ │ +78} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +79using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +80 │ │ │ │ │ +81} // end namespace OpenSubdiv │ │ │ │ │ +82 │ │ │ │ │ +83#endif // OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_3_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ -fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_0_3_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_1_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, int start, int end) │ │ │ │ │ -Static eval stencils function which takes raw CPU pointers for input and │ │ │ │ │ -output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ -const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ -DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ -CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_1_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_9_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ -const float *dvWeights, int start, int end) │ │ │ │ │ -Static eval stencils function with derivatives, which takes raw CPU pointers │ │ │ │ │ -for input and output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ -BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ -float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int │ │ │ │ │ -*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ -const float *dvWeights, const float *duuWeights, const float *duvWeights, const │ │ │ │ │ -float *dvvWeights, int start, int end) │ │ │ │ │ -Static eval stencils function with derivatives, which takes raw CPU pointers │ │ │ │ │ -for input and output. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ -BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ -float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord │ │ │ │ │ -const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, │ │ │ │ │ -PatchParam const *patchParamBuffer) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ -PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_4_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ -*patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_5_1_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ -&duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, │ │ │ │ │ -PatchCoord const *patchCoords, PatchArray const *patchArrays, const int │ │ │ │ │ -*patchIndexBuffer, PatchParam const *patchParamBuffer) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ -&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ -*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ -const CpuEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_3_0_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ -float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const │ │ │ │ │ -PatchCoord *patchCoords, const PatchArray *patchArrays, const int │ │ │ │ │ -*patchIndexBuffer, const PatchParam *patchParamBuffer) │ │ │ │ │ -Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ -values on given PatchT... │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for CPU subdivision. │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ +int GetNumElements() const │ │ │ │ │ +Returns how many elements defined in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CpuVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_8_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ -static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ -numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ -CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_8_2_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(void *) │ │ │ │ │ -synchronize all asynchronous computation invoked on this device. │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_2_2_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ -const *stencilTable, const CpuEvaluator *instance=NULL, void │ │ │ │ │ +Creator. Returns NULL if error. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ +void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function. This function has a same signature as │ │ │ │ │ -other device kernels hav... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ -DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ -BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ -&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ -*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_6_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ -&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ -*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ -BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const │ │ │ │ │ -CpuEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ -Coordinates set on a patch table. │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumVertices() const │ │ │ │ │ +Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +~CpuVertexBuffer() │ │ │ │ │ +Destructor. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_p_u_B_u_f_f_e_r │ │ │ │ │ +float * BindCpuBuffer() │ │ │ │ │ +Returns the address of CPU buffer. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CpuVertexBuffer(int numElements, int numVertices) │ │ │ │ │ +Constructor. │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00893.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,108 +89,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
mesh.h File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
cpuPatchTable.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │ #include <vector>
│ │ │ │ -#include "../far/topologyRefiner.h"
│ │ │ │ -#include "../far/patchTableFactory.h"
│ │ │ │ -#include "../far/stencilTable.h"
│ │ │ │ -#include "../far/stencilTableFactory.h"
│ │ │ │ -#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  MeshInterface< PATCH_TABLE >
 
class  EvaluatorCacheT< EVALUATOR >
 
struct  EvaluatorCacheT< EVALUATOR >::Entry
 
class  Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >
class  CpuPatchTable
 Cpu patch table. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Typedefs

typedef std::bitset< NUM_MESH_BITSMeshBitset
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Enumerations

enum  MeshBits {
│ │ │ │ -  MeshAdaptive = 0 │ │ │ │ -,
│ │ │ │ -  MeshInterleaveVarying = 1 │ │ │ │ -,
│ │ │ │ -  MeshFVarData = 2 │ │ │ │ -,
│ │ │ │ -  MeshFVarAdaptive = 3 │ │ │ │ -,
│ │ │ │ -  MeshUseSmoothCornerPatch = 4 │ │ │ │ -,
│ │ │ │ -  MeshUseSingleCreasePatch = 5 │ │ │ │ -,
│ │ │ │ -  MeshUseInfSharpPatch = 6 │ │ │ │ -,
│ │ │ │ -  MeshEndCapBilinearBasis = 7 │ │ │ │ -,
│ │ │ │ -  MeshEndCapBSplineBasis = 8 │ │ │ │ -,
│ │ │ │ -  MeshEndCapGregoryBasis = 9 │ │ │ │ -,
│ │ │ │ -  MeshEndCapLegacyGregory = 10 │ │ │ │ -,
│ │ │ │ -  NUM_MESH_BITS = 11 │ │ │ │ -
│ │ │ │ - }
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<typename STENCIL_TABLE , typename SRC_STENCIL_TABLE , typename DEVICE_CONTEXT >
STENCIL_TABLE const * convertToCompatibleStencilTable (SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context)
 
template<>
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void > (Far::StencilTable const *table, void *)
 
template<>
Far::LimitStencilTable const * convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void > (Far::LimitStencilTable const *table, void *)
 
template<>
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext > (Far::StencilTable const *table, ID3D11DeviceContext *)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,80 +1,29 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -mesh.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cpuPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_s_t_e_n_c_i_l_T_a_b_l_e_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "../osd/nonCopyable.h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _M_e_s_h_I_n_t_e_r_f_a_c_e_<_ _P_A_T_C_H___T_A_B_L_E_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_ _E_V_A_L_U_A_T_O_R_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_ _E_V_A_L_U_A_T_O_R_ _>_:_:_E_n_t_r_y │ │ │ │ │ -  │ │ │ │ │ - class   _M_e_s_h_<_ _V_E_R_T_E_X___B_U_F_F_E_R_,_ _S_T_E_N_C_I_L___T_A_B_L_E_,_ _E_V_A_L_U_A_T_O_R_,_ _P_A_T_C_H___T_A_B_L_E_, │ │ │ │ │ - _D_E_V_I_C_E___C_O_N_T_E_X_T_ _> │ │ │ │ │ +class   _C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +  Cpu patch table. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ -namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │ -  │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -typedef std::bitset< _N_U_M___M_E_S_H___B_I_T_S >  _M_e_s_h_B_i_t_s_e_t │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ -enum   _M_e_s_h_B_i_t_s { │ │ │ │ │ -   _M_e_s_h_A_d_a_p_t_i_v_e = 0 , │ │ │ │ │ -   _M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g = 1 , │ │ │ │ │ -   _M_e_s_h_F_V_a_r_D_a_t_a = 2 , │ │ │ │ │ -   _M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e = 3 , │ │ │ │ │ -   _M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h = 4 , │ │ │ │ │ -   _M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = 5 , │ │ │ │ │ -   _M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = 6 , │ │ │ │ │ -   _M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s = 7 , │ │ │ │ │ -   _M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s = 8 , │ │ │ │ │ -   _M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s = 9 , │ │ │ │ │ -   _M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y = 10 , │ │ │ │ │ -   _N_U_M___M_E_S_H___B_I_T_S = 11 │ │ │ │ │ - } │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ - STENCIL_TABLE const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ - (SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT │ │ │ │ │ - *context) │ │ │ │ │ -  │ │ │ │ │ - template<> │ │ │ │ │ - _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ - _S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> (_F_a_r_:_: │ │ │ │ │ - _S_t_e_n_c_i_l_T_a_b_l_e const *table, void *) │ │ │ │ │ -  │ │ │ │ │ - template<> │ │ │ │ │ -_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ - _L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d │ │ │ │ │ - _> (_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *table, void *) │ │ │ │ │ -  │ │ │ │ │ - template<> │ │ │ │ │ - _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *  _c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ - _S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_, │ │ │ │ │ - _I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_ _> (_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const │ │ │ │ │ - *table, ID3D11DeviceContext *) │ │ │ │ │ +namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_e_s_h_._h │ │ │ │ │ + * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,25 +1,3 @@ │ │ │ │ │ var a00893 = [ │ │ │ │ │ - ["MeshInterface< PATCH_TABLE >", "a01269.html", "a01269"], │ │ │ │ │ - ["EvaluatorCacheT< EVALUATOR >", "a01273.html", "a01273"], │ │ │ │ │ - ["Entry", "a01277.html", "a01277"], │ │ │ │ │ - ["Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >", "a01281.html", "a01281"], │ │ │ │ │ - ["MeshBitset", "a00893.html#a85ba9df501aea9af1ec9da1558c255bc", null], │ │ │ │ │ - ["MeshBits", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492", [ │ │ │ │ │ - ["MeshAdaptive", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492adef344bcbdd50a1a93136eb53183c718", null], │ │ │ │ │ - ["MeshInterleaveVarying", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9313c644b9b2a998bcb55cfcc4582b1a", null], │ │ │ │ │ - ["MeshFVarData", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ac10e41fef659f3b3a1b730319bdedb45", null], │ │ │ │ │ - ["MeshFVarAdaptive", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9b8a23ab039e120012bc7c622308d603", null], │ │ │ │ │ - ["MeshUseSmoothCornerPatch", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ab32b8ef595539e14041e2fb0e619e3f9", null], │ │ │ │ │ - ["MeshUseSingleCreasePatch", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9058d69e1089fc77f1974a76c34e2071", null], │ │ │ │ │ - ["MeshUseInfSharpPatch", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a8fab1b3018f94b5b2432c7435e795925", null], │ │ │ │ │ - ["MeshEndCapBilinearBasis", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a4124233e4f787f999c7975afceab34f3", null], │ │ │ │ │ - ["MeshEndCapBSplineBasis", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2f41b6ba0393698bb3af283283737f7", null], │ │ │ │ │ - ["MeshEndCapGregoryBasis", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2878e1a215530f5f6fb89f1e06f91ee", null], │ │ │ │ │ - ["MeshEndCapLegacyGregory", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aad7b3fb2be609abdbfafaf5b1c834158", null], │ │ │ │ │ - ["NUM_MESH_BITS", "a00893.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a5676712c77d29cfdd330e2802db1c464", null] │ │ │ │ │ - ]], │ │ │ │ │ - ["convertToCompatibleStencilTable", "a00893.html#a06ceddf21c024b341a5b946049cd701a", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >", "a00893.html#a4c2520cc1a8a5a03e3f53584629d7318", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >", "a00893.html#ab5753a2b0a0995c8e2259d2c4765f7df", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >", "a00893.html#a33f9830228f847fae1c30c9dffe02b5a", null] │ │ │ │ │ + ["CpuPatchTable", "a01173.html", "a01173"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mesh.h
│ │ │ │ +
cpuPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,885 +119,193 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_MESH_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_MESH_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include <bitset>
│ │ │ │ -
31#include <cassert>
│ │ │ │ -
32#include <cstring>
│ │ │ │ -
33#include <vector>
│ │ │ │ +
30#include <vector>
│ │ │ │ +
31#include "../far/patchDescriptor.h"
│ │ │ │ +
32#include "../osd/nonCopyable.h"
│ │ │ │ +
33#include "../osd/types.h"
│ │ │ │
34
│ │ │ │ -
35#include "../far/topologyRefiner.h"
│ │ │ │ -
36#include "../far/patchTableFactory.h"
│ │ │ │ -
37#include "../far/stencilTable.h"
│ │ │ │ -
38#include "../far/stencilTableFactory.h"
│ │ │ │ +
35#include <vector>
│ │ │ │ +
36
│ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │
39
│ │ │ │ -
40#include "../osd/bufferDescriptor.h"
│ │ │ │ -
41
│ │ │ │ -
42struct ID3D11DeviceContext;
│ │ │ │ +
40namespace Far{
│ │ │ │ +
41 class PatchTable;
│ │ │ │ +
42};
│ │ │ │
43
│ │ │ │ -
44namespace OpenSubdiv {
│ │ │ │ -
45namespace OPENSUBDIV_VERSION {
│ │ │ │ -
46
│ │ │ │ -
47namespace Osd {
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
57 MeshEndCapBilinearBasis = 7, // exclusive
│ │ │ │ -
58 MeshEndCapBSplineBasis = 8, // exclusive
│ │ │ │ -
59 MeshEndCapGregoryBasis = 9, // exclusive
│ │ │ │ -
60 MeshEndCapLegacyGregory = 10, // exclusive
│ │ │ │ - │ │ │ │ -
62};
│ │ │ │ -
│ │ │ │ -
63typedef std::bitset<NUM_MESH_BITS> MeshBitset;
│ │ │ │ -
64
│ │ │ │ -
65// ---------------------------------------------------------------------------
│ │ │ │ +
44namespace Osd {
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60public:
│ │ │ │ +
│ │ │ │ +
61 static CpuPatchTable *Create(const Far::PatchTable *patchTable,
│ │ │ │ +
62 void *deviceContext = NULL) {
│ │ │ │ +
63 (void)deviceContext; // unused
│ │ │ │ +
64 return new CpuPatchTable(patchTable);
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │
66
│ │ │ │ -
67template <class PATCH_TABLE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69public:
│ │ │ │ -
70 typedef PATCH_TABLE PatchTable;
│ │ │ │ -
71 typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
│ │ │ │ -
72
│ │ │ │ -
73public:
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ -
76 virtual ~MeshInterface() { }
│ │ │ │ -
77
│ │ │ │ -
78 virtual int GetNumVertices() const = 0;
│ │ │ │ +
67 explicit CpuPatchTable(const Far::PatchTable *patchTable);
│ │ │ │ + │ │ │ │ +
69
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 return &_patchArrays[0];
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
73 const int *GetPatchIndexBuffer() const {
│ │ │ │ +
74 return &_indexBuffer[0];
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
77 return &_patchParamBuffer[0];
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │
79
│ │ │ │ -
80 virtual int GetMaxValence() const = 0;
│ │ │ │ -
81
│ │ │ │ -
82 virtual void UpdateVertexBuffer(float const *vertexData,
│ │ │ │ -
83 int startVertex, int numVerts) = 0;
│ │ │ │ -
84
│ │ │ │ -
85 virtual void UpdateVaryingBuffer(float const *varyingData,
│ │ │ │ -
86 int startVertex, int numVerts) = 0;
│ │ │ │ -
87
│ │ │ │ -
88 virtual void Refine() = 0;
│ │ │ │ -
89
│ │ │ │ -
90 virtual void Synchronize() = 0;
│ │ │ │ -
91
│ │ │ │ -
92 virtual PatchTable * GetPatchTable() const = 0;
│ │ │ │ -
93
│ │ │ │ -
94 virtual Far::PatchTable const *GetFarPatchTable() const = 0;
│ │ │ │ -
95
│ │ │ │ - │ │ │ │ -
97
│ │ │ │ - │ │ │ │ -
99
│ │ │ │ -
100protected:
│ │ │ │ -
│ │ │ │ -
101 static inline void refineMesh(Far::TopologyRefiner & refiner,
│ │ │ │ -
102 int level, bool adaptive,
│ │ │ │ -
103 bool singleCreasePatch) {
│ │ │ │ -
104 if (adaptive) {
│ │ │ │ - │ │ │ │ -
106 options.useSingleCreasePatch = singleCreasePatch;
│ │ │ │ -
107 refiner.RefineAdaptive(options);
│ │ │ │ -
108 } else {
│ │ │ │ -
109 // This dependency on FVar channels should not be necessary
│ │ │ │ -
110 bool fullTopologyInLastLevel = refiner.GetNumFVarChannels()>0;
│ │ │ │ -
111
│ │ │ │ - │ │ │ │ -
113 options.fullTopologyInLastLevel = fullTopologyInLastLevel;
│ │ │ │ -
114 refiner.RefineUniform(options);
│ │ │ │ -
115 }
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
117 static inline void refineMesh(Far::TopologyRefiner & refiner,
│ │ │ │ -
118 int level, MeshBitset bits) {
│ │ │ │ -
119 if (bits.test(MeshAdaptive)) {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
122 options.useInfSharpPatch = bits.test(MeshUseInfSharpPatch);
│ │ │ │ -
123 options.considerFVarChannels = bits.test(MeshFVarAdaptive);
│ │ │ │ -
124 refiner.RefineAdaptive(options);
│ │ │ │ -
125 } else {
│ │ │ │ -
126 // This dependency on FVar channels should not be necessary
│ │ │ │ -
127 bool fullTopologyInLastLevel = refiner.GetNumFVarChannels()>0;
│ │ │ │ -
128
│ │ │ │ - │ │ │ │ -
130 options.fullTopologyInLastLevel = fullTopologyInLastLevel;
│ │ │ │ -
131 refiner.RefineUniform(options);
│ │ │ │ -
132 }
│ │ │ │ -
133 }
│ │ │ │ +
│ │ │ │ +
80 size_t GetNumPatchArrays() const {
│ │ │ │ +
81 return _patchArrays.size();
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
83 size_t GetPatchIndexSize() const {
│ │ │ │ +
84 return _indexBuffer.size();
│ │ │ │ +
85 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
86 size_t GetPatchParamSize() const {
│ │ │ │ +
87 return _patchParamBuffer.size();
│ │ │ │ +
88 }
│ │ │ │
│ │ │ │ -
134};
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 if (_varyingPatchArrays.empty()) {
│ │ │ │ +
92 return NULL;
│ │ │ │ +
93 }
│ │ │ │ +
94 return &_varyingPatchArrays[0];
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
96 const int *GetVaryingPatchIndexBuffer() const {
│ │ │ │ +
97 if (_varyingIndexBuffer.empty()) {
│ │ │ │ +
98 return NULL;
│ │ │ │ +
99 }
│ │ │ │ +
100 return &_varyingIndexBuffer[0];
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103 return _varyingIndexBuffer.size();
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 int GetNumFVarChannels() const {
│ │ │ │ +
107 return (int)_fvarPatchArrays.size();
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
109 const PatchArray *GetFVarPatchArrayBuffer(int fvarChannel = 0) const {
│ │ │ │ +
110 return &_fvarPatchArrays[fvarChannel][0];
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
112 const int *GetFVarPatchIndexBuffer(int fvarChannel = 0) const {
│ │ │ │ +
113 return &_fvarIndexBuffers[fvarChannel][0];
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
115 size_t GetFVarPatchIndexSize(int fvarChannel = 0) const {
│ │ │ │ +
116 return _fvarIndexBuffers[fvarChannel].size();
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
118 const PatchParam *GetFVarPatchParamBuffer(int fvarChannel= 0) const {
│ │ │ │ +
119 return &_fvarParamBuffers[fvarChannel][0];
│ │ │ │ +
120 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
121 size_t GetFVarPatchParamSize(int fvarChannel = 0) const {
│ │ │ │ +
122 return _fvarParamBuffers[fvarChannel].size();
│ │ │ │ +
123 }
│ │ │ │ +
│ │ │ │ +
124
│ │ │ │ +
125protected:
│ │ │ │ + │ │ │ │ +
127 std::vector<int> _indexBuffer;
│ │ │ │ + │ │ │ │ +
129
│ │ │ │ + │ │ │ │ +
131 std::vector<int> _varyingIndexBuffer;
│ │ │ │ +
132
│ │ │ │ +
133 std::vector< PatchArrayVector > _fvarPatchArrays;
│ │ │ │ +
134 std::vector< std::vector<int> > _fvarIndexBuffers;
│ │ │ │ +
135 std::vector< PatchParamVector > _fvarParamBuffers;
│ │ │ │ +
136};
│ │ │ │
│ │ │ │ -
135
│ │ │ │ -
136// ---------------------------------------------------------------------------
│ │ │ │
137
│ │ │ │ -
138template <typename STENCIL_TABLE, typename SRC_STENCIL_TABLE,
│ │ │ │ -
139 typename DEVICE_CONTEXT>
│ │ │ │ -
140STENCIL_TABLE const *
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
142 SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context) {
│ │ │ │ -
143 if (! table) return NULL;
│ │ │ │ -
144 return STENCIL_TABLE::Create(table, context);
│ │ │ │ -
145}
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
147template <>
│ │ │ │ -
│ │ │ │ -
148inline Far::StencilTable const *
│ │ │ │ - │ │ │ │ -
150 Far::StencilTable const *table, void * /*context*/) {
│ │ │ │ -
151 // no need for conversion
│ │ │ │ -
152 // XXX: We don't want to even copy.
│ │ │ │ -
153 if (! table) return NULL;
│ │ │ │ -
154 return new Far::StencilTable(*table);
│ │ │ │ -
155}
│ │ │ │ -
│ │ │ │ -
156
│ │ │ │ -
157template <>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
160 Far::LimitStencilTable const *table, void * /*context*/) {
│ │ │ │ -
161 // no need for conversion
│ │ │ │ -
162 // XXX: We don't want to even copy.
│ │ │ │ -
163 if (! table) return NULL;
│ │ │ │ -
164 return new Far::LimitStencilTable(*table);
│ │ │ │ -
165}
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
167template <>
│ │ │ │ -
│ │ │ │ -
168inline Far::StencilTable const *
│ │ │ │ - │ │ │ │ -
170 Far::StencilTable const *table, ID3D11DeviceContext * /*context*/) {
│ │ │ │ -
171 // no need for conversion
│ │ │ │ -
172 // XXX: We don't want to even copy.
│ │ │ │ -
173 if (! table) return NULL;
│ │ │ │ -
174 return new Far::StencilTable(*table);
│ │ │ │ -
175}
│ │ │ │ -
│ │ │ │ -
176
│ │ │ │ -
177// ---------------------------------------------------------------------------
│ │ │ │ -
178
│ │ │ │ -
179// Osd evaluator cache: for the GPU backends require compiled instance
│ │ │ │ -
180// (GLXFB, GLCompute, CL)
│ │ │ │ -
181//
│ │ │ │ -
182// note: this is just an example usage and client applications are supposed
│ │ │ │ -
183// to implement their own structure for Evaluator instance.
│ │ │ │ -
184//
│ │ │ │ -
185template <typename EVALUATOR>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
187public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
189 for(typename Evaluators::iterator it = _evaluators.begin();
│ │ │ │ -
190 it != _evaluators.end(); ++it) {
│ │ │ │ -
191 delete it->evaluator;
│ │ │ │ -
192 }
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
195 // XXX: FIXME, linear search
│ │ │ │ -
│ │ │ │ -
196 struct Entry {
│ │ │ │ -
│ │ │ │ -
197 Entry(BufferDescriptor const &srcDescArg,
│ │ │ │ -
198 BufferDescriptor const &dstDescArg,
│ │ │ │ -
199 BufferDescriptor const &duDescArg,
│ │ │ │ -
200 BufferDescriptor const &dvDescArg,
│ │ │ │ -
201 EVALUATOR *evalArg) : srcDesc(srcDescArg), dstDesc(dstDescArg),
│ │ │ │ -
202 duDesc(duDescArg), dvDesc(dvDescArg),
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
206 evaluator(evalArg) {}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
207 Entry(BufferDescriptor const &srcDescArg,
│ │ │ │ -
208 BufferDescriptor const &dstDescArg,
│ │ │ │ -
209 BufferDescriptor const &duDescArg,
│ │ │ │ -
210 BufferDescriptor const &dvDescArg,
│ │ │ │ -
211 BufferDescriptor const &duuDescArg,
│ │ │ │ -
212 BufferDescriptor const &duvDescArg,
│ │ │ │ -
213 BufferDescriptor const &dvvDescArg,
│ │ │ │ -
214 EVALUATOR *evalArg) : srcDesc(srcDescArg), dstDesc(dstDescArg),
│ │ │ │ -
215 duDesc(duDescArg), dvDesc(dvDescArg),
│ │ │ │ -
216 duuDesc(duuDescArg),
│ │ │ │ -
217 duvDesc(duvDescArg),
│ │ │ │ -
218 dvvDesc(dvvDescArg),
│ │ │ │ -
219 evaluator(evalArg) {}
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
223 EVALUATOR *evaluator;
│ │ │ │ -
224 };
│ │ │ │ -
│ │ │ │ -
225 typedef std::vector<Entry> Evaluators;
│ │ │ │ -
226
│ │ │ │ -
227 template <typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
228 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ -
229 BufferDescriptor const &dstDesc,
│ │ │ │ -
230 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ -
231 return GetEvaluator(srcDesc, dstDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
237 deviceContext);
│ │ │ │ -
238 }
│ │ │ │ -
│ │ │ │ -
239
│ │ │ │ -
240 template <typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
241 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ -
242 BufferDescriptor const &dstDesc,
│ │ │ │ -
243 BufferDescriptor const &duDesc,
│ │ │ │ -
244 BufferDescriptor const &dvDesc,
│ │ │ │ -
245 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ -
246 return GetEvaluator(srcDesc, dstDesc,
│ │ │ │ -
247 duDesc, dvDesc,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
251 deviceContext);
│ │ │ │ -
252 }
│ │ │ │ -
│ │ │ │ -
253
│ │ │ │ -
254 template <typename DEVICE_CONTEXT>
│ │ │ │ -
│ │ │ │ -
255 EVALUATOR *GetEvaluator(BufferDescriptor const &srcDesc,
│ │ │ │ -
256 BufferDescriptor const &dstDesc,
│ │ │ │ -
257 BufferDescriptor const &duDesc,
│ │ │ │ -
258 BufferDescriptor const &dvDesc,
│ │ │ │ -
259 BufferDescriptor const &duuDesc,
│ │ │ │ -
260 BufferDescriptor const &duvDesc,
│ │ │ │ -
261 BufferDescriptor const &dvvDesc,
│ │ │ │ -
262 DEVICE_CONTEXT *deviceContext) {
│ │ │ │ -
263
│ │ │ │ -
264 for(typename Evaluators::iterator it = _evaluators.begin();
│ │ │ │ -
265 it != _evaluators.end(); ++it) {
│ │ │ │ -
266 if (isEqual(srcDesc, it->srcDesc) &&
│ │ │ │ -
267 isEqual(dstDesc, it->dstDesc) &&
│ │ │ │ -
268 isEqual(duDesc, it->duDesc) &&
│ │ │ │ -
269 isEqual(dvDesc, it->dvDesc) &&
│ │ │ │ -
270 isEqual(duuDesc, it->duuDesc) &&
│ │ │ │ -
271 isEqual(duvDesc, it->duvDesc) &&
│ │ │ │ -
272 isEqual(dvvDesc, it->dvvDesc)) {
│ │ │ │ -
273 return it->evaluator;
│ │ │ │ -
274 }
│ │ │ │ -
275 }
│ │ │ │ -
276 EVALUATOR *e = EVALUATOR::Create(srcDesc, dstDesc,
│ │ │ │ -
277 duDesc, dvDesc,
│ │ │ │ -
278 duuDesc, duvDesc, dvvDesc,
│ │ │ │ -
279 deviceContext);
│ │ │ │ -
280 _evaluators.push_back(Entry(srcDesc, dstDesc,
│ │ │ │ -
281 duDesc, dvDesc,
│ │ │ │ -
282 duuDesc, duvDesc, dvvDesc, e));
│ │ │ │ -
283 return e;
│ │ │ │ -
284 }
│ │ │ │ -
│ │ │ │ -
285
│ │ │ │ -
286private:
│ │ │ │ -
287 static bool isEqual(BufferDescriptor const &a,
│ │ │ │ -
288 BufferDescriptor const &b) {
│ │ │ │ -
289 int offsetA = a.stride ? (a.offset % a.stride) : 0;
│ │ │ │ -
290 int offsetB = b.stride ? (b.offset % b.stride) : 0;
│ │ │ │ -
291
│ │ │ │ -
292 // Note: XFB kernel needs to be configured with the local offset
│ │ │ │ -
293 // of the dstDesc to skip preceding primvars.
│ │ │ │ -
294 return (offsetA == offsetB &&
│ │ │ │ -
295 a.length == b.length &&
│ │ │ │ -
296 a.stride == b.stride);
│ │ │ │ -
297 }
│ │ │ │ -
298
│ │ │ │ -
299 Evaluators _evaluators;
│ │ │ │ -
300};
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
303
│ │ │ │ -
304// template helpers to see if the evaluator is instantiatable or not.
│ │ │ │ -
305template <typename EVALUATOR>
│ │ │ │ -
306struct instantiatable
│ │ │ │ -
307{
│ │ │ │ -
308 typedef char yes[1];
│ │ │ │ -
309 typedef char no[2];
│ │ │ │ -
310 template <typename C> static yes &chk(typename C::Instantiatable *t=0);
│ │ │ │ -
311 template <typename C> static no &chk(...);
│ │ │ │ -
312 static bool const value = sizeof(chk<EVALUATOR>(0)) == sizeof(yes);
│ │ │ │ -
313};
│ │ │ │ -
314template <bool C, typename T=void>
│ │ │ │ -
315struct enable_if { typedef T type; };
│ │ │ │ -
316template <typename T>
│ │ │ │ -
317struct enable_if<false, T> { };
│ │ │ │ -
318
│ │ │ │ -
320
│ │ │ │ -
321// extract a kernel from cache if available
│ │ │ │ -
322template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
323static EVALUATOR *GetEvaluator(
│ │ │ │ -
324 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ -
325 BufferDescriptor const &srcDesc,
│ │ │ │ -
326 BufferDescriptor const &dstDesc,
│ │ │ │ -
327 BufferDescriptor const &duDesc,
│ │ │ │ -
328 BufferDescriptor const &dvDesc,
│ │ │ │ -
329 BufferDescriptor const &duuDesc,
│ │ │ │ -
330 BufferDescriptor const &duvDesc,
│ │ │ │ -
331 BufferDescriptor const &dvvDesc,
│ │ │ │ -
332 DEVICE_CONTEXT deviceContext,
│ │ │ │ -
333 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
334 (void)t;
│ │ │ │ -
335 if (cache == NULL) return NULL;
│ │ │ │ -
336 return cache->GetEvaluator(srcDesc, dstDesc,
│ │ │ │ -
337 duDesc, dvDesc, duuDesc, duvDesc, dvvDesc,
│ │ │ │ -
338 deviceContext);
│ │ │ │ -
339}
│ │ │ │ -
340
│ │ │ │ -
341template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
342static EVALUATOR *GetEvaluator(
│ │ │ │ -
343 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ -
344 BufferDescriptor const &srcDesc,
│ │ │ │ -
345 BufferDescriptor const &dstDesc,
│ │ │ │ -
346 BufferDescriptor const &duDesc,
│ │ │ │ -
347 BufferDescriptor const &dvDesc,
│ │ │ │ -
348 DEVICE_CONTEXT deviceContext,
│ │ │ │ -
349 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
350 (void)t;
│ │ │ │ -
351 if (cache == NULL) return NULL;
│ │ │ │ -
352 return cache->GetEvaluator(srcDesc, dstDesc, duDesc, dvDesc, deviceContext);
│ │ │ │ -
353}
│ │ │ │ -
354
│ │ │ │ -
355template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
356static EVALUATOR *GetEvaluator(
│ │ │ │ -
357 EvaluatorCacheT<EVALUATOR> *cache,
│ │ │ │ -
358 BufferDescriptor const &srcDesc,
│ │ │ │ -
359 BufferDescriptor const &dstDesc,
│ │ │ │ -
360 DEVICE_CONTEXT deviceContext,
│ │ │ │ -
361 typename enable_if<instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
362 (void)t;
│ │ │ │ -
363 if (cache == NULL) return NULL;
│ │ │ │ -
364 return cache->GetEvaluator(srcDesc, dstDesc,
│ │ │ │ -
365 BufferDescriptor(),
│ │ │ │ -
366 BufferDescriptor(),
│ │ │ │ -
367 deviceContext);
│ │ │ │ -
368}
│ │ │ │ -
369
│ │ │ │ -
370// fallback
│ │ │ │ -
371template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
372static EVALUATOR *GetEvaluator(
│ │ │ │ -
373 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ -
374 BufferDescriptor const &,
│ │ │ │ -
375 BufferDescriptor const &,
│ │ │ │ -
376 BufferDescriptor const &,
│ │ │ │ -
377 BufferDescriptor const &,
│ │ │ │ -
378 BufferDescriptor const &,
│ │ │ │ -
379 BufferDescriptor const &,
│ │ │ │ -
380 BufferDescriptor const &,
│ │ │ │ -
381 DEVICE_CONTEXT,
│ │ │ │ -
382 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
383 (void)t;
│ │ │ │ -
384 return NULL;
│ │ │ │ -
385}
│ │ │ │ -
386
│ │ │ │ -
387template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
388static EVALUATOR *GetEvaluator(
│ │ │ │ -
389 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ -
390 BufferDescriptor const &,
│ │ │ │ -
391 BufferDescriptor const &,
│ │ │ │ -
392 BufferDescriptor const &,
│ │ │ │ -
393 BufferDescriptor const &,
│ │ │ │ -
394 DEVICE_CONTEXT,
│ │ │ │ -
395 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
396 (void)t;
│ │ │ │ -
397 return NULL;
│ │ │ │ -
398}
│ │ │ │ -
399
│ │ │ │ -
400template <typename EVALUATOR, typename DEVICE_CONTEXT>
│ │ │ │ -
401static EVALUATOR *GetEvaluator(
│ │ │ │ -
402 EvaluatorCacheT<EVALUATOR> *,
│ │ │ │ -
403 BufferDescriptor const &,
│ │ │ │ -
404 BufferDescriptor const &,
│ │ │ │ -
405 DEVICE_CONTEXT,
│ │ │ │ -
406 typename enable_if<!instantiatable<EVALUATOR>::value, void>::type*t=0) {
│ │ │ │ -
407 (void)t;
│ │ │ │ -
408 return NULL;
│ │ │ │ -
409}
│ │ │ │ -
410
│ │ │ │ -
411// ---------------------------------------------------------------------------
│ │ │ │ -
412
│ │ │ │ -
413template <typename VERTEX_BUFFER,
│ │ │ │ -
414 typename STENCIL_TABLE,
│ │ │ │ -
415 typename EVALUATOR,
│ │ │ │ -
416 typename PATCH_TABLE,
│ │ │ │ -
417 typename DEVICE_CONTEXT = void>
│ │ │ │ -
│ │ │ │ -
418class Mesh : public MeshInterface<PATCH_TABLE> {
│ │ │ │ -
419public:
│ │ │ │ -
420 typedef VERTEX_BUFFER VertexBuffer;
│ │ │ │ -
421 typedef EVALUATOR Evaluator;
│ │ │ │ -
422 typedef STENCIL_TABLE StencilTable;
│ │ │ │ -
423 typedef PATCH_TABLE PatchTable;
│ │ │ │ -
424 typedef DEVICE_CONTEXT DeviceContext;
│ │ │ │ - │ │ │ │ -
426 typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
│ │ │ │ -
427
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
429 int numVertexElements,
│ │ │ │ -
430 int numVaryingElements,
│ │ │ │ -
431 int level,
│ │ │ │ -
432 MeshBitset bits = MeshBitset(),
│ │ │ │ -
433 EvaluatorCache * evaluatorCache = NULL,
│ │ │ │ -
434 DeviceContext * deviceContext = NULL) :
│ │ │ │ -
435
│ │ │ │ -
436 _refiner(refiner),
│ │ │ │ -
437 _farPatchTable(NULL),
│ │ │ │ -
438 _numVertices(0),
│ │ │ │ -
439 _maxValence(0),
│ │ │ │ -
440 _vertexBuffer(NULL),
│ │ │ │ -
441 _varyingBuffer(NULL),
│ │ │ │ -
442 _vertexStencilTable(NULL),
│ │ │ │ -
443 _varyingStencilTable(NULL),
│ │ │ │ -
444 _evaluatorCache(evaluatorCache),
│ │ │ │ -
445 _patchTable(NULL),
│ │ │ │ -
446 _deviceContext(deviceContext) {
│ │ │ │ -
447
│ │ │ │ -
448 assert(_refiner);
│ │ │ │ -
449
│ │ │ │ - │ │ │ │ -
451 *_refiner, level, bits);
│ │ │ │ -
452
│ │ │ │ -
453 int vertexBufferStride = numVertexElements +
│ │ │ │ -
454 (bits.test(MeshInterleaveVarying) ? numVaryingElements : 0);
│ │ │ │ -
455 int varyingBufferStride =
│ │ │ │ -
456 (bits.test(MeshInterleaveVarying) ? 0 : numVaryingElements);
│ │ │ │ -
457
│ │ │ │ -
458 initializeContext(numVertexElements,
│ │ │ │ -
459 numVaryingElements,
│ │ │ │ -
460 level, bits);
│ │ │ │ -
461
│ │ │ │ -
462 initializeVertexBuffers(_numVertices,
│ │ │ │ -
463 vertexBufferStride,
│ │ │ │ -
464 varyingBufferStride);
│ │ │ │ -
465
│ │ │ │ -
466 // configure vertex buffer descriptor
│ │ │ │ -
467 _vertexDesc =
│ │ │ │ -
468 BufferDescriptor(0, numVertexElements, vertexBufferStride);
│ │ │ │ -
469 if (bits.test(MeshInterleaveVarying)) {
│ │ │ │ -
470 _varyingDesc = BufferDescriptor(
│ │ │ │ -
471 numVertexElements, numVaryingElements, vertexBufferStride);
│ │ │ │ -
472 } else {
│ │ │ │ -
473 _varyingDesc = BufferDescriptor(
│ │ │ │ -
474 0, numVaryingElements, varyingBufferStride);
│ │ │ │ -
475 }
│ │ │ │ -
476 }
│ │ │ │ -
│ │ │ │ -
477
│ │ │ │ -
│ │ │ │ -
478 virtual ~Mesh() {
│ │ │ │ -
479 delete _refiner;
│ │ │ │ -
480 delete _farPatchTable;
│ │ │ │ -
481 delete _vertexBuffer;
│ │ │ │ -
482 delete _varyingBuffer;
│ │ │ │ -
483 delete _vertexStencilTable;
│ │ │ │ -
484 delete _varyingStencilTable;
│ │ │ │ -
485 delete _patchTable;
│ │ │ │ -
486 // deviceContext and evaluatorCache are not owned by this class.
│ │ │ │ -
487 }
│ │ │ │ -
│ │ │ │ -
488
│ │ │ │ -
│ │ │ │ -
489 virtual void UpdateVertexBuffer(float const *vertexData,
│ │ │ │ -
490 int startVertex, int numVerts) {
│ │ │ │ -
491 _vertexBuffer->UpdateData(vertexData, startVertex, numVerts,
│ │ │ │ -
492 _deviceContext);
│ │ │ │ -
493 }
│ │ │ │ -
│ │ │ │ -
494
│ │ │ │ -
│ │ │ │ -
495 virtual void UpdateVaryingBuffer(float const *varyingData,
│ │ │ │ -
496 int startVertex, int numVerts) {
│ │ │ │ -
497 _varyingBuffer->UpdateData(varyingData, startVertex, numVerts,
│ │ │ │ -
498 _deviceContext);
│ │ │ │ -
499 }
│ │ │ │ -
│ │ │ │ -
500
│ │ │ │ -
│ │ │ │ -
501 virtual void Refine() {
│ │ │ │ -
502
│ │ │ │ -
503 int numControlVertices = _refiner->GetLevel(0).GetNumVertices();
│ │ │ │ -
504
│ │ │ │ -
505 BufferDescriptor srcDesc = _vertexDesc;
│ │ │ │ -
506 BufferDescriptor dstDesc(srcDesc);
│ │ │ │ -
507 dstDesc.offset += numControlVertices * dstDesc.stride;
│ │ │ │ -
508
│ │ │ │ -
509 // note that the _evaluatorCache can be NULL and thus
│ │ │ │ -
510 // the evaluatorInstance can be NULL
│ │ │ │ -
511 // (for uninstantiatable kernels CPU,TBB etc)
│ │ │ │ -
512 Evaluator const *instance = GetEvaluator<Evaluator>(
│ │ │ │ -
513 _evaluatorCache, srcDesc, dstDesc,
│ │ │ │ -
514 _deviceContext);
│ │ │ │ -
515
│ │ │ │ -
516 Evaluator::EvalStencils(_vertexBuffer, srcDesc,
│ │ │ │ -
517 _vertexBuffer, dstDesc,
│ │ │ │ -
518 _vertexStencilTable,
│ │ │ │ -
519 instance, _deviceContext);
│ │ │ │ -
520
│ │ │ │ -
521 if (_varyingDesc.length > 0) {
│ │ │ │ -
522 BufferDescriptor vSrcDesc = _varyingDesc;
│ │ │ │ -
523 BufferDescriptor vDstDesc(vSrcDesc);
│ │ │ │ -
524 vDstDesc.offset += numControlVertices * vDstDesc.stride;
│ │ │ │ -
525
│ │ │ │ -
526 instance = GetEvaluator<Evaluator>(
│ │ │ │ -
527 _evaluatorCache, vSrcDesc, vDstDesc,
│ │ │ │ -
528 _deviceContext);
│ │ │ │ -
529
│ │ │ │ -
530 if (_varyingBuffer) {
│ │ │ │ -
531 // non-interleaved
│ │ │ │ -
532 Evaluator::EvalStencils(_varyingBuffer, vSrcDesc,
│ │ │ │ -
533 _varyingBuffer, vDstDesc,
│ │ │ │ -
534 _varyingStencilTable,
│ │ │ │ -
535 instance, _deviceContext);
│ │ │ │ -
536 } else {
│ │ │ │ -
537 // interleaved
│ │ │ │ -
538 Evaluator::EvalStencils(_vertexBuffer, vSrcDesc,
│ │ │ │ -
539 _vertexBuffer, vDstDesc,
│ │ │ │ -
540 _varyingStencilTable,
│ │ │ │ -
541 instance, _deviceContext);
│ │ │ │ -
542 }
│ │ │ │ -
543 }
│ │ │ │ -
544 }
│ │ │ │ -
│ │ │ │ -
545
│ │ │ │ -
│ │ │ │ -
546 virtual void Synchronize() {
│ │ │ │ -
547 Evaluator::Synchronize(_deviceContext);
│ │ │ │ -
548 }
│ │ │ │ -
│ │ │ │ -
549
│ │ │ │ -
│ │ │ │ -
550 virtual PatchTable * GetPatchTable() const {
│ │ │ │ -
551 return _patchTable;
│ │ │ │ -
552 }
│ │ │ │ -
│ │ │ │ -
553
│ │ │ │ -
│ │ │ │ -
554 virtual Far::PatchTable const *GetFarPatchTable() const {
│ │ │ │ -
555 return _farPatchTable;
│ │ │ │ -
556 }
│ │ │ │ -
│ │ │ │ -
557
│ │ │ │ -
558 virtual int GetNumVertices() const { return _numVertices; }
│ │ │ │ -
559
│ │ │ │ -
560 virtual int GetMaxValence() const { return _maxValence; }
│ │ │ │ -
561
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
563 return _vertexBuffer->BindVBO(_deviceContext);
│ │ │ │ -
564 }
│ │ │ │ -
│ │ │ │ -
565
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
567 return _varyingBuffer->BindVBO(_deviceContext);
│ │ │ │ -
568 }
│ │ │ │ -
│ │ │ │ -
569
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
571 return _vertexBuffer;
│ │ │ │ -
572 }
│ │ │ │ -
│ │ │ │ -
573
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
575 return _varyingBuffer;
│ │ │ │ -
576 }
│ │ │ │ -
│ │ │ │ -
577
│ │ │ │ -
│ │ │ │ -
578 virtual Far::TopologyRefiner const * GetTopologyRefiner() const {
│ │ │ │ -
579 return _refiner;
│ │ │ │ -
580 }
│ │ │ │ -
│ │ │ │ -
581
│ │ │ │ -
582private:
│ │ │ │ -
583 void initializeContext(int numVertexElements,
│ │ │ │ -
584 int numVaryingElements,
│ │ │ │ -
585 int level, MeshBitset bits) {
│ │ │ │ -
586 assert(_refiner);
│ │ │ │ -
587
│ │ │ │ -
588 Far::StencilTableFactory::Options options;
│ │ │ │ -
589 options.generateOffsets = true;
│ │ │ │ -
590 options.generateIntermediateLevels =
│ │ │ │ -
591 _refiner->IsUniform() ? false : true;
│ │ │ │ -
592
│ │ │ │ -
593 Far::StencilTable const * vertexStencils = NULL;
│ │ │ │ -
594 Far::StencilTable const * varyingStencils = NULL;
│ │ │ │ -
595
│ │ │ │ -
596 if (numVertexElements>0) {
│ │ │ │ -
597
│ │ │ │ -
598 vertexStencils = Far::StencilTableFactory::Create(*_refiner,
│ │ │ │ -
599 options);
│ │ │ │ -
600 }
│ │ │ │ -
601
│ │ │ │ -
602 if (numVaryingElements>0) {
│ │ │ │ -
603
│ │ │ │ -
604 options.interpolationMode =
│ │ │ │ - │ │ │ │ -
606
│ │ │ │ -
607 varyingStencils = Far::StencilTableFactory::Create(*_refiner,
│ │ │ │ -
608 options);
│ │ │ │ -
609 }
│ │ │ │ -
610
│ │ │ │ -
611 Far::PatchTableFactory::Options poptions(level);
│ │ │ │ -
612 poptions.generateFVarTables = bits.test(MeshFVarData);
│ │ │ │ -
613 poptions.generateFVarLegacyLinearPatches = !bits.test(MeshFVarAdaptive);
│ │ │ │ -
614 poptions.generateLegacySharpCornerPatches = !bits.test(MeshUseSmoothCornerPatch);
│ │ │ │ -
615 poptions.useSingleCreasePatch = bits.test(MeshUseSingleCreasePatch);
│ │ │ │ -
616 poptions.useInfSharpPatch = bits.test(MeshUseInfSharpPatch);
│ │ │ │ -
617
│ │ │ │ -
618 // points on bilinear and gregory basis endcap boundaries can be
│ │ │ │ -
619 // shared among adjacent patches to save some stencils.
│ │ │ │ -
620 if (bits.test(MeshEndCapBilinearBasis)) {
│ │ │ │ -
621 poptions.SetEndCapType(
│ │ │ │ - │ │ │ │ -
623 poptions.shareEndCapPatchPoints = true;
│ │ │ │ -
624 } else if (bits.test(MeshEndCapBSplineBasis)) {
│ │ │ │ -
625 poptions.SetEndCapType(
│ │ │ │ - │ │ │ │ -
627 } else if (bits.test(MeshEndCapGregoryBasis)) {
│ │ │ │ -
628 poptions.SetEndCapType(
│ │ │ │ - │ │ │ │ -
630 poptions.shareEndCapPatchPoints = true;
│ │ │ │ -
631 } else if (bits.test(MeshEndCapLegacyGregory)) {
│ │ │ │ -
632 poptions.SetEndCapType(
│ │ │ │ - │ │ │ │ -
634 }
│ │ │ │ -
635
│ │ │ │ -
636 _farPatchTable = Far::PatchTableFactory::Create(*_refiner, poptions);
│ │ │ │ -
637
│ │ │ │ -
638 // if there's endcap stencils, merge it into regular stencils.
│ │ │ │ -
639 if (_farPatchTable->GetLocalPointStencilTable()) {
│ │ │ │ -
640 // append stencils
│ │ │ │ -
641 if (Far::StencilTable const *vertexStencilsWithLocalPoints =
│ │ │ │ - │ │ │ │ -
643 *_refiner,
│ │ │ │ -
644 vertexStencils,
│ │ │ │ -
645 _farPatchTable->GetLocalPointStencilTable())) {
│ │ │ │ -
646 delete vertexStencils;
│ │ │ │ -
647 vertexStencils = vertexStencilsWithLocalPoints;
│ │ │ │ -
648 }
│ │ │ │ -
649 if (varyingStencils) {
│ │ │ │ -
650 if (Far::StencilTable const *varyingStencilsWithLocalPoints =
│ │ │ │ - │ │ │ │ -
652 *_refiner,
│ │ │ │ -
653 varyingStencils,
│ │ │ │ -
654 _farPatchTable->GetLocalPointVaryingStencilTable())) {
│ │ │ │ -
655 delete varyingStencils;
│ │ │ │ -
656 varyingStencils = varyingStencilsWithLocalPoints;
│ │ │ │ -
657 }
│ │ │ │ -
658 }
│ │ │ │ -
659 }
│ │ │ │ -
660
│ │ │ │ -
661 _maxValence = _farPatchTable->GetMaxValence();
│ │ │ │ -
662 _patchTable = PatchTable::Create(_farPatchTable, _deviceContext);
│ │ │ │ -
663
│ │ │ │ -
664 // numvertices = coarse verts + refined verts + gregory basis verts
│ │ │ │ -
665 _numVertices = vertexStencils->GetNumControlVertices()
│ │ │ │ -
666 + vertexStencils->GetNumStencils();
│ │ │ │ -
667
│ │ │ │ -
668 // convert to device stenciltable if necessary.
│ │ │ │ -
669 _vertexStencilTable =
│ │ │ │ -
670 convertToCompatibleStencilTable<StencilTable>(
│ │ │ │ -
671 vertexStencils, _deviceContext);
│ │ │ │ -
672 _varyingStencilTable =
│ │ │ │ -
673 convertToCompatibleStencilTable<StencilTable>(
│ │ │ │ -
674 varyingStencils, _deviceContext);
│ │ │ │ -
675
│ │ │ │ -
676 // FIXME: we do extra copyings for Far::Stencils.
│ │ │ │ -
677 delete vertexStencils;
│ │ │ │ -
678 delete varyingStencils;
│ │ │ │ -
679 }
│ │ │ │ -
680
│ │ │ │ -
681 void initializeVertexBuffers(int numVertices,
│ │ │ │ -
682 int numVertexElements,
│ │ │ │ -
683 int numVaryingElements) {
│ │ │ │ -
684
│ │ │ │ -
685 if (numVertexElements) {
│ │ │ │ -
686 _vertexBuffer = VertexBuffer::Create(numVertexElements,
│ │ │ │ -
687 numVertices, _deviceContext);
│ │ │ │ -
688 }
│ │ │ │ -
689
│ │ │ │ -
690 if (numVaryingElements) {
│ │ │ │ -
691 _varyingBuffer = VertexBuffer::Create(numVaryingElements,
│ │ │ │ -
692 numVertices, _deviceContext);
│ │ │ │ -
693 }
│ │ │ │ -
694 }
│ │ │ │ -
695
│ │ │ │ -
696 Far::TopologyRefiner * _refiner;
│ │ │ │ -
697 Far::PatchTable * _farPatchTable;
│ │ │ │ -
698
│ │ │ │ -
699 int _numVertices;
│ │ │ │ -
700 int _maxValence;
│ │ │ │ -
701
│ │ │ │ -
702 VertexBuffer * _vertexBuffer;
│ │ │ │ -
703 VertexBuffer * _varyingBuffer;
│ │ │ │ -
704
│ │ │ │ -
705 BufferDescriptor _vertexDesc;
│ │ │ │ -
706 BufferDescriptor _varyingDesc;
│ │ │ │ -
707
│ │ │ │ -
708 StencilTable const * _vertexStencilTable;
│ │ │ │ -
709 StencilTable const * _varyingStencilTable;
│ │ │ │ -
710 EvaluatorCache * _evaluatorCache;
│ │ │ │ -
711
│ │ │ │ -
712 PatchTable *_patchTable;
│ │ │ │ -
713 DeviceContext *_deviceContext;
│ │ │ │ -
714};
│ │ │ │ -
│ │ │ │ -
715
│ │ │ │ -
716} // end namespace Osd
│ │ │ │ -
717
│ │ │ │ -
718} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
719using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
720
│ │ │ │ -
721} // end namespace OpenSubdiv
│ │ │ │ -
722
│ │ │ │ -
723#endif // OPENSUBDIV3_OSD_MESH_H
│ │ │ │ - │ │ │ │ -
STENCIL_TABLE const * convertToCompatibleStencilTable(SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context)
Definition mesh.h:141
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >(Far::StencilTable const *table, void *)
Definition mesh.h:149
│ │ │ │ -
Far::LimitStencilTable const * convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >(Far::LimitStencilTable const *table, void *)
Definition mesh.h:159
│ │ │ │ -
std::bitset< NUM_MESH_BITS > MeshBitset
Definition mesh.h:63
│ │ │ │ -
Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >(Far::StencilTable const *table, ID3D11DeviceContext *)
Definition mesh.h:169
│ │ │ │ +
138} // end namespace Osd
│ │ │ │ +
139
│ │ │ │ +
140} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
141using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
142
│ │ │ │ +
143} // end namespace OpenSubdiv
│ │ │ │ +
144
│ │ │ │ +
145#endif // OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
│ │ │ │ + │ │ │ │ +
std::vector< PatchParam > PatchParamVector
Definition types.h:133
│ │ │ │ +
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │
Container for arrays of parametric patches.
Definition patchTable.h:55
│ │ │ │ -
int GetMaxValence() const
Returns max vertex valence.
Definition patchTable.h:92
│ │ │ │ -
StencilTable const * GetLocalPointStencilTable() const
Returns the stencil table to compute local point vertex values.
Definition patchTable.h:778
│ │ │ │ -
StencilTable const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
Definition patchTable.h:783
│ │ │ │ -
static PatchTable * Create(TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
Instantiates a PatchTable from a client-provided TopologyRefiner.
│ │ │ │ - │ │ │ │ -
@ ENDCAP_LEGACY_GREGORY
legacy option for 2.x style Gregory patches (Catmark only)
│ │ │ │ -
@ ENDCAP_GREGORY_BASIS
use Gregory patches (highest quality, recommended default)
│ │ │ │ -
@ ENDCAP_BILINEAR_BASIS
use linear patches (simple quads or tris)
│ │ │ │ -
@ ENDCAP_BSPLINE_BASIS
use BSpline-like patches (same patch type as regular)
│ │ │ │ - │ │ │ │ -
int GetNumControlVertices() const
Returns the number of control vertices indexed in the table.
│ │ │ │ -
int GetNumStencils() const
Returns the number of stencils in the table.
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
Limit stencil table class wrapping the template for compatibility.
│ │ │ │ -
static StencilTable const * Create(TopologyRefiner const &refiner, Options options=Options())
│ │ │ │ -
static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
│ │ │ │ -
int GetNumVertices() const
Return the number of vertices in this level.
│ │ │ │ -
Stores topology data for a specified set of refinement options.
│ │ │ │ -
bool IsUniform() const
Returns true if uniform refinement has been applied.
│ │ │ │ -
int GetNumFVarChannels() const
Returns the number of face-varying channels in the tables.
│ │ │ │ -
void RefineUniform(UniformOptions options)
Refine the topology uniformly.
│ │ │ │ -
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
│ │ │ │ -
void RefineAdaptive(AdaptiveOptions options, ConstIndexArray selectedFaces=ConstIndexArray())
Feature Adaptive topology refinement.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
virtual Far::PatchTable const * GetFarPatchTable() const =0
│ │ │ │ -
static void refineMesh(Far::TopologyRefiner &refiner, int level, MeshBitset bits)
Definition mesh.h:117
│ │ │ │ - │ │ │ │ - │ │ │ │ -
virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int numVerts)=0
│ │ │ │ -
static void refineMesh(Far::TopologyRefiner &refiner, int level, bool adaptive, bool singleCreasePatch)
Definition mesh.h:101
│ │ │ │ -
virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int numVerts)=0
│ │ │ │ -
virtual PatchTable * GetPatchTable() const =0
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
PatchTable::VertexBufferBinding VertexBufferBinding
Definition mesh.h:71
│ │ │ │ -
virtual VertexBufferBinding BindVertexBuffer()=0
│ │ │ │ -
virtual VertexBufferBinding BindVaryingBuffer()=0
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:241
│ │ │ │ -
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:255
│ │ │ │ -
EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, DEVICE_CONTEXT *deviceContext)
Definition mesh.h:228
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, BufferDescriptor const &duuDescArg, BufferDescriptor const &duvDescArg, BufferDescriptor const &dvvDescArg, EVALUATOR *evalArg)
Definition mesh.h:207
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, EVALUATOR *evalArg)
Definition mesh.h:197
│ │ │ │ - │ │ │ │ - │ │ │ │ -
virtual Far::TopologyRefiner const * GetTopologyRefiner() const
Definition mesh.h:578
│ │ │ │ -
virtual VertexBuffer * GetVertexBuffer()
Definition mesh.h:570
│ │ │ │ -
virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int numVerts)
Definition mesh.h:495
│ │ │ │ -
virtual VertexBuffer * GetVaryingBuffer()
Definition mesh.h:574
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
virtual VertexBufferBinding BindVertexBuffer()
Definition mesh.h:562
│ │ │ │ -
virtual int GetNumVertices() const
Definition mesh.h:558
│ │ │ │ -
Mesh(Far::TopologyRefiner *refiner, int numVertexElements, int numVaryingElements, int level, MeshBitset bits=MeshBitset(), EvaluatorCache *evaluatorCache=NULL, DeviceContext *deviceContext=NULL)
Definition mesh.h:428
│ │ │ │ - │ │ │ │ - │ │ │ │ -
EvaluatorCacheT< Evaluator > EvaluatorCache
Definition mesh.h:425
│ │ │ │ -
virtual VertexBufferBinding BindVaryingBuffer()
Definition mesh.h:566
│ │ │ │ - │ │ │ │ -
PatchTable::VertexBufferBinding VertexBufferBinding
Definition mesh.h:426
│ │ │ │ -
virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int numVerts)
Definition mesh.h:489
│ │ │ │ - │ │ │ │ -
virtual PatchTable * GetPatchTable() const
Definition mesh.h:550
│ │ │ │ -
virtual Far::PatchTable const * GetFarPatchTable() const
Definition mesh.h:554
│ │ │ │ - │ │ │ │ -
virtual int GetMaxValence() const
Definition mesh.h:560
│ │ │ │ + │ │ │ │ +
const PatchArray * GetFVarPatchArrayBuffer(int fvarChannel=0) const
│ │ │ │ + │ │ │ │ + │ │ │ │ +
size_t GetFVarPatchParamSize(int fvarChannel=0) const
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static CpuPatchTable * Create(const Far::PatchTable *patchTable, void *deviceContext=NULL)
│ │ │ │ +
std::vector< PatchParamVector > _fvarParamBuffers
│ │ │ │ +
CpuPatchTable(const Far::PatchTable *patchTable)
│ │ │ │ +
std::vector< std::vector< int > > _fvarIndexBuffers
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
size_t GetFVarPatchIndexSize(int fvarChannel=0) const
│ │ │ │ +
const int * GetFVarPatchIndexBuffer(int fvarChannel=0) const
│ │ │ │ +
const PatchParam * GetFVarPatchParamBuffer(int fvarChannel=0) const
│ │ │ │ + │ │ │ │ + │ │ │ │ +
const PatchArray * GetVaryingPatchArrayBuffer() const
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
std::vector< PatchArrayVector > _fvarPatchArrays
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mesh.h │ │ │ │ │ +cpuPatchTable.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,1093 +24,215 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include │ │ │ │ │ -31#include │ │ │ │ │ -32#include │ │ │ │ │ -33#include │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../far/patchDescriptor.h" │ │ │ │ │ +32#include "../osd/nonCopyable.h" │ │ │ │ │ +33#include "../osd/types.h" │ │ │ │ │ 34 │ │ │ │ │ -35#include "../far/topologyRefiner.h" │ │ │ │ │ -36#include "../far/patchTableFactory.h" │ │ │ │ │ -37#include "../far/stencilTable.h" │ │ │ │ │ -38#include "../far/stencilTableFactory.h" │ │ │ │ │ +35#include │ │ │ │ │ +36 │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ 39 │ │ │ │ │ -40#include "../osd/bufferDescriptor.h" │ │ │ │ │ -41 │ │ │ │ │ -42struct ID3D11DeviceContext; │ │ │ │ │ +40namespace Far{ │ │ │ │ │ +41 class PatchTable; │ │ │ │ │ +42}; │ │ │ │ │ 43 │ │ │ │ │ -44namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -45namespace OPENSUBDIV_VERSION { │ │ │ │ │ -46 │ │ │ │ │ -47namespace Osd { │ │ │ │ │ -48 │ │ │ │ │ -_4_9enum _M_e_s_h_B_i_t_s { │ │ │ │ │ -_5_0 _M_e_s_h_A_d_a_p_t_i_v_e = 0, │ │ │ │ │ -_5_1 _M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g = 1, │ │ │ │ │ -_5_2 _M_e_s_h_F_V_a_r_D_a_t_a = 2, │ │ │ │ │ -_5_3 _M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e = 3, │ │ │ │ │ -_5_4 _M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h = 4, │ │ │ │ │ -_5_5 _M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = 5, │ │ │ │ │ -_5_6 _M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = 6, │ │ │ │ │ -_5_7 _M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s = 7, // exclusive │ │ │ │ │ -_5_8 _M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s = 8, // exclusive │ │ │ │ │ -_5_9 _M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s = 9, // exclusive │ │ │ │ │ -_6_0 _M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y = 10, // exclusive │ │ │ │ │ -_6_1 _N_U_M___M_E_S_H___B_I_T_S = 11, │ │ │ │ │ -62}; │ │ │ │ │ -_6_3typedef std::bitset _M_e_s_h_B_i_t_s_e_t; │ │ │ │ │ -64 │ │ │ │ │ -65// -------------------------------------------------------------------------- │ │ │ │ │ -- │ │ │ │ │ +44namespace Osd { │ │ │ │ │ +45 │ │ │ │ │ +_5_9class _C_p_u_P_a_t_c_h_T_a_b_l_e { │ │ │ │ │ +60public: │ │ │ │ │ +_6_1 static _C_p_u_P_a_t_c_h_T_a_b_l_e *_C_r_e_a_t_e(const _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e *patchTable, │ │ │ │ │ +62 void *deviceContext = NULL) { │ │ │ │ │ +63 (void)deviceContext; // unused │ │ │ │ │ +64 return new _C_p_u_P_a_t_c_h_T_a_b_l_e(patchTable); │ │ │ │ │ +65 } │ │ │ │ │ 66 │ │ │ │ │ -67template │ │ │ │ │ -_6_8class _M_e_s_h_I_n_t_e_r_f_a_c_e { │ │ │ │ │ -69public: │ │ │ │ │ -_7_0 typedef PATCH_TABLE _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ -_7_1 typedef typename PatchTable::VertexBufferBinding _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ -72 │ │ │ │ │ -73public: │ │ │ │ │ -_7_4 _M_e_s_h_I_n_t_e_r_f_a_c_e() { } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 virtual _~_M_e_s_h_I_n_t_e_r_f_a_c_e() { } │ │ │ │ │ -77 │ │ │ │ │ -_7_8 virtual int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const = 0; │ │ │ │ │ +_6_7 explicit _C_p_u_P_a_t_c_h_T_a_b_l_e(const _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e *patchTable); │ │ │ │ │ +_6_8 _~_C_p_u_P_a_t_c_h_T_a_b_l_e() {} │ │ │ │ │ +69 │ │ │ │ │ +_7_0 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ +71 return &___p_a_t_c_h_A_r_r_a_y_s[0]; │ │ │ │ │ +72 } │ │ │ │ │ +_7_3 const int *_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +74 return &___i_n_d_e_x_B_u_f_f_e_r[0]; │ │ │ │ │ +75 } │ │ │ │ │ +_7_6 const _P_a_t_c_h_P_a_r_a_m *_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r() const { │ │ │ │ │ +77 return &___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r[0]; │ │ │ │ │ +78 } │ │ │ │ │ 79 │ │ │ │ │ -_8_0 virtual int _G_e_t_M_a_x_V_a_l_e_n_c_e() const = 0; │ │ │ │ │ -81 │ │ │ │ │ -_8_2 virtual void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(float const *vertexData, │ │ │ │ │ -83 int startVertex, int numVerts) = 0; │ │ │ │ │ -84 │ │ │ │ │ -_8_5 virtual void _U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r(float const *varyingData, │ │ │ │ │ -86 int startVertex, int numVerts) = 0; │ │ │ │ │ -87 │ │ │ │ │ -_8_8 virtual void _R_e_f_i_n_e() = 0; │ │ │ │ │ +_8_0 size_t _G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s() const { │ │ │ │ │ +81 return ___p_a_t_c_h_A_r_r_a_y_s.size(); │ │ │ │ │ +82 } │ │ │ │ │ +_8_3 size_t _G_e_t_P_a_t_c_h_I_n_d_e_x_S_i_z_e() const { │ │ │ │ │ +84 return ___i_n_d_e_x_B_u_f_f_e_r.size(); │ │ │ │ │ +85 } │ │ │ │ │ +_8_6 size_t _G_e_t_P_a_t_c_h_P_a_r_a_m_S_i_z_e() const { │ │ │ │ │ +87 return ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r.size(); │ │ │ │ │ +88 } │ │ │ │ │ 89 │ │ │ │ │ -_9_0 virtual void _S_y_n_c_h_r_o_n_i_z_e() = 0; │ │ │ │ │ -91 │ │ │ │ │ -_9_2 virtual _P_a_t_c_h_T_a_b_l_e * _G_e_t_P_a_t_c_h_T_a_b_l_e() const = 0; │ │ │ │ │ -93 │ │ │ │ │ -_9_4 virtual _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e() const = 0; │ │ │ │ │ -95 │ │ │ │ │ -_9_6 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r() = 0; │ │ │ │ │ -97 │ │ │ │ │ -_9_8 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r() = 0; │ │ │ │ │ -99 │ │ │ │ │ -100protected: │ │ │ │ │ -_1_0_1 static inline void _r_e_f_i_n_e_M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, │ │ │ │ │ -102 int level, bool adaptive, │ │ │ │ │ -103 bool singleCreasePatch) { │ │ │ │ │ -104 if (adaptive) { │ │ │ │ │ -105 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options(level); │ │ │ │ │ -106 options._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = singleCreasePatch; │ │ │ │ │ -107 refiner._R_e_f_i_n_e_A_d_a_p_t_i_v_e(options); │ │ │ │ │ -108 } else { │ │ │ │ │ -109 // This dependency on FVar channels should not be necessary │ │ │ │ │ -110 bool fullTopologyInLastLevel = refiner._G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s()>0; │ │ │ │ │ -111 │ │ │ │ │ -112 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s options(level); │ │ │ │ │ -113 options._f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l = fullTopologyInLastLevel; │ │ │ │ │ -114 refiner._R_e_f_i_n_e_U_n_i_f_o_r_m(options); │ │ │ │ │ -115 } │ │ │ │ │ -116 } │ │ │ │ │ -_1_1_7 static inline void _r_e_f_i_n_e_M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & refiner, │ │ │ │ │ -118 int level, _M_e_s_h_B_i_t_s_e_t bits) { │ │ │ │ │ -119 if (bits.test(_M_e_s_h_A_d_a_p_t_i_v_e)) { │ │ │ │ │ -120 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options(level); │ │ │ │ │ -121 options._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = bits.test(_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h); │ │ │ │ │ -122 options._u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = bits.test(_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h); │ │ │ │ │ -123 options._c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s = bits.test(_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e); │ │ │ │ │ -124 refiner._R_e_f_i_n_e_A_d_a_p_t_i_v_e(options); │ │ │ │ │ -125 } else { │ │ │ │ │ -126 // This dependency on FVar channels should not be necessary │ │ │ │ │ -127 bool fullTopologyInLastLevel = refiner._G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s()>0; │ │ │ │ │ -128 │ │ │ │ │ -129 _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s options(level); │ │ │ │ │ -130 options._f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l = fullTopologyInLastLevel; │ │ │ │ │ -131 refiner._R_e_f_i_n_e_U_n_i_f_o_r_m(options); │ │ │ │ │ -132 } │ │ │ │ │ -133 } │ │ │ │ │ -134}; │ │ │ │ │ -135 │ │ │ │ │ -136// ------------------------------------------------------------------------- │ │ │ │ │ --- │ │ │ │ │ +_9_0 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r() const { │ │ │ │ │ +91 if (___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s.empty()) { │ │ │ │ │ +92 return NULL; │ │ │ │ │ +93 } │ │ │ │ │ +94 return &___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s[0]; │ │ │ │ │ +95 } │ │ │ │ │ +_9_6 const int *_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r() const { │ │ │ │ │ +97 if (___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r.empty()) { │ │ │ │ │ +98 return NULL; │ │ │ │ │ +99 } │ │ │ │ │ +100 return &___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r[0]; │ │ │ │ │ +101 } │ │ │ │ │ +_1_0_2 size_t _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_S_i_z_e() const { │ │ │ │ │ +103 return ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r.size(); │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { │ │ │ │ │ +107 return (int)___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s.size(); │ │ │ │ │ +108 } │ │ │ │ │ +_1_0_9 const _P_a_t_c_h_A_r_r_a_y *_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +110 return &___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel][0]; │ │ │ │ │ +111 } │ │ │ │ │ +_1_1_2 const int *_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r(int fvarChannel = 0) const { │ │ │ │ │ +113 return &___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel][0]; │ │ │ │ │ +114 } │ │ │ │ │ +_1_1_5 size_t _G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_S_i_z_e(int fvarChannel = 0) const { │ │ │ │ │ +116 return ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s[fvarChannel].size(); │ │ │ │ │ +117 } │ │ │ │ │ +_1_1_8 const _P_a_t_c_h_P_a_r_a_m *_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r(int fvarChannel= 0) const { │ │ │ │ │ +119 return &___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel][0]; │ │ │ │ │ +120 } │ │ │ │ │ +_1_2_1 size_t _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_S_i_z_e(int fvarChannel = 0) const { │ │ │ │ │ +122 return ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s[fvarChannel].size(); │ │ │ │ │ +123 } │ │ │ │ │ +124 │ │ │ │ │ +125protected: │ │ │ │ │ +_1_2_6 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_2_7 std::vector ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_1_2_8 _P_a_t_c_h_P_a_r_a_m_V_e_c_t_o_r ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +129 │ │ │ │ │ +_1_3_0 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_3_1 std::vector ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +132 │ │ │ │ │ +_1_3_3 std::vector< PatchArrayVector > ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_3_4 std::vector< std::vector > ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ +_1_3_5 std::vector< PatchParamVector > ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ +136}; │ │ │ │ │ 137 │ │ │ │ │ -138template │ │ │ │ │ -140STENCIL_TABLE const * │ │ │ │ │ -_1_4_1_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -142 SRC_STENCIL_TABLE const *table, DEVICE_CONTEXT *context) { │ │ │ │ │ -143 if (! table) return NULL; │ │ │ │ │ -144 return STENCIL_TABLE::Create(table, context); │ │ │ │ │ -145} │ │ │ │ │ -146 │ │ │ │ │ -147template <> │ │ │ │ │ -_1_4_8inline _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -149_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_>( │ │ │ │ │ -150 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *table, void * /*context*/) { │ │ │ │ │ -151 // no need for conversion │ │ │ │ │ -152 // XXX: We don't want to even copy. │ │ │ │ │ -153 if (! table) return NULL; │ │ │ │ │ -154 return new _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ -155} │ │ │ │ │ -156 │ │ │ │ │ -157template <> │ │ │ │ │ -_1_5_8inline _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -159_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_: │ │ │ │ │ -_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_>( │ │ │ │ │ -160 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *table, void * /*context*/) { │ │ │ │ │ -161 // no need for conversion │ │ │ │ │ -162 // XXX: We don't want to even copy. │ │ │ │ │ -163 if (! table) return NULL; │ │ │ │ │ -164 return new _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ -165} │ │ │ │ │ -166 │ │ │ │ │ -167template <> │ │ │ │ │ -_1_6_8inline _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -169_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_, │ │ │ │ │ -_I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_>( │ │ │ │ │ -170 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *table, ID3D11DeviceContext * /*context*/) { │ │ │ │ │ -171 // no need for conversion │ │ │ │ │ -172 // XXX: We don't want to even copy. │ │ │ │ │ -173 if (! table) return NULL; │ │ │ │ │ -174 return new _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e(*table); │ │ │ │ │ -175} │ │ │ │ │ -176 │ │ │ │ │ -177// ------------------------------------------------------------------------- │ │ │ │ │ --- │ │ │ │ │ -178 │ │ │ │ │ -179// Osd evaluator cache: for the GPU backends require compiled instance │ │ │ │ │ -180// (GLXFB, GLCompute, CL) │ │ │ │ │ -181// │ │ │ │ │ -182// note: this is just an example usage and client applications are supposed │ │ │ │ │ -183// to implement their own structure for Evaluator instance. │ │ │ │ │ -184// │ │ │ │ │ -185template │ │ │ │ │ -_1_8_6class _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T { │ │ │ │ │ -187public: │ │ │ │ │ -_1_8_8 _~_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T() { │ │ │ │ │ -189 for(typename Evaluators::iterator it = _evaluators.begin(); │ │ │ │ │ -190 it != _evaluators.end(); ++it) { │ │ │ │ │ -191 delete it->evaluator; │ │ │ │ │ -192 } │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -195 // XXX: FIXME, linear search │ │ │ │ │ -_1_9_6 struct _E_n_t_r_y { │ │ │ │ │ -_1_9_7 _E_n_t_r_y(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDescArg, │ │ │ │ │ -198 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDescArg, │ │ │ │ │ -199 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDescArg, │ │ │ │ │ -200 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDescArg, │ │ │ │ │ -201 EVALUATOR *evalArg) : _s_r_c_D_e_s_c(srcDescArg), _d_s_t_D_e_s_c(dstDescArg), │ │ │ │ │ -202 _d_u_D_e_s_c(duDescArg), _d_v_D_e_s_c(dvDescArg), │ │ │ │ │ -203 _d_u_u_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ -204 _d_u_v_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ -205 _d_v_v_D_e_s_c(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()), │ │ │ │ │ -206 _e_v_a_l_u_a_t_o_r(evalArg) {} │ │ │ │ │ -_2_0_7 _E_n_t_r_y(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDescArg, │ │ │ │ │ -208 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDescArg, │ │ │ │ │ -209 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDescArg, │ │ │ │ │ -210 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDescArg, │ │ │ │ │ -211 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDescArg, │ │ │ │ │ -212 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDescArg, │ │ │ │ │ -213 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDescArg, │ │ │ │ │ -214 EVALUATOR *evalArg) : _s_r_c_D_e_s_c(srcDescArg), _d_s_t_D_e_s_c(dstDescArg), │ │ │ │ │ -215 _d_u_D_e_s_c(duDescArg), _d_v_D_e_s_c(dvDescArg), │ │ │ │ │ -216 _d_u_u_D_e_s_c(duuDescArg), │ │ │ │ │ -217 _d_u_v_D_e_s_c(duvDescArg), │ │ │ │ │ -218 _d_v_v_D_e_s_c(dvvDescArg), │ │ │ │ │ -219 _e_v_a_l_u_a_t_o_r(evalArg) {} │ │ │ │ │ -_2_2_0 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _s_r_c_D_e_s_c, _d_s_t_D_e_s_c; │ │ │ │ │ -_2_2_1 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _d_u_D_e_s_c, _d_v_D_e_s_c; │ │ │ │ │ -_2_2_2 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r _d_u_u_D_e_s_c, _d_u_v_D_e_s_c, _d_v_v_D_e_s_c; │ │ │ │ │ -_2_2_3 EVALUATOR *_e_v_a_l_u_a_t_o_r; │ │ │ │ │ -224 }; │ │ │ │ │ -_2_2_5 typedef std::vector _E_v_a_l_u_a_t_o_r_s; │ │ │ │ │ -226 │ │ │ │ │ -227 template │ │ │ │ │ -_2_2_8 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -229 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -230 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ -231 return _G_e_t_E_v_a_l_u_a_t_o_r(srcDesc, dstDesc, │ │ │ │ │ -232 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -233 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -234 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -235 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -236 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -237 deviceContext); │ │ │ │ │ -238 } │ │ │ │ │ -239 │ │ │ │ │ -240 template │ │ │ │ │ -_2_4_1 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -242 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -243 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -244 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -245 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ -246 return _G_e_t_E_v_a_l_u_a_t_o_r(srcDesc, dstDesc, │ │ │ │ │ -247 duDesc, dvDesc, │ │ │ │ │ -248 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -249 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -250 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -251 deviceContext); │ │ │ │ │ -252 } │ │ │ │ │ -253 │ │ │ │ │ -254 template │ │ │ │ │ -_2_5_5 EVALUATOR *_G_e_t_E_v_a_l_u_a_t_o_r(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -256 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -257 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -258 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -259 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -260 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -261 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -262 DEVICE_CONTEXT *deviceContext) { │ │ │ │ │ -263 │ │ │ │ │ -264 for(typename Evaluators::iterator it = _evaluators.begin(); │ │ │ │ │ -265 it != _evaluators.end(); ++it) { │ │ │ │ │ -266 if (isEqual(srcDesc, it->srcDesc) && │ │ │ │ │ -267 isEqual(dstDesc, it->dstDesc) && │ │ │ │ │ -268 isEqual(duDesc, it->duDesc) && │ │ │ │ │ -269 isEqual(dvDesc, it->dvDesc) && │ │ │ │ │ -270 isEqual(duuDesc, it->duuDesc) && │ │ │ │ │ -271 isEqual(duvDesc, it->duvDesc) && │ │ │ │ │ -272 isEqual(dvvDesc, it->dvvDesc)) { │ │ │ │ │ -273 return it->evaluator; │ │ │ │ │ -274 } │ │ │ │ │ -275 } │ │ │ │ │ -276 EVALUATOR *e = EVALUATOR::Create(srcDesc, dstDesc, │ │ │ │ │ -277 duDesc, dvDesc, │ │ │ │ │ -278 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -279 deviceContext); │ │ │ │ │ -280 _evaluators.push_back(_E_n_t_r_y(srcDesc, dstDesc, │ │ │ │ │ -281 duDesc, dvDesc, │ │ │ │ │ -282 duuDesc, duvDesc, dvvDesc, e)); │ │ │ │ │ -283 return e; │ │ │ │ │ -284 } │ │ │ │ │ -285 │ │ │ │ │ -286private: │ │ │ │ │ -287 static bool isEqual(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &a, │ │ │ │ │ -288 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &b) { │ │ │ │ │ -289 int offsetA = a._s_t_r_i_d_e ? (a._o_f_f_s_e_t % a._s_t_r_i_d_e) : 0; │ │ │ │ │ -290 int offsetB = b._s_t_r_i_d_e ? (b._o_f_f_s_e_t % b._s_t_r_i_d_e) : 0; │ │ │ │ │ -291 │ │ │ │ │ -292 // Note: XFB kernel needs to be configured with the local offset │ │ │ │ │ -293 // of the dstDesc to skip preceding primvars. │ │ │ │ │ -294 return (offsetA == offsetB && │ │ │ │ │ -295 a._l_e_n_g_t_h == b._l_e_n_g_t_h && │ │ │ │ │ -296 a._s_t_r_i_d_e == b._s_t_r_i_d_e); │ │ │ │ │ -297 } │ │ │ │ │ -298 │ │ │ │ │ -299 _E_v_a_l_u_a_t_o_r_s _evaluators; │ │ │ │ │ -300}; │ │ │ │ │ -301 │ │ │ │ │ -303 │ │ │ │ │ -304// template helpers to see if the evaluator is instantiatable or not. │ │ │ │ │ -305template │ │ │ │ │ -306struct instantiatable │ │ │ │ │ -307{ │ │ │ │ │ -308 typedef char yes[1]; │ │ │ │ │ -309 typedef char no[2]; │ │ │ │ │ -310 template static yes &chk(typename C::Instantiatable *t=0); │ │ │ │ │ -311 template static no &chk(...); │ │ │ │ │ -312 static bool const value = sizeof(chk(0)) == sizeof(yes); │ │ │ │ │ -313}; │ │ │ │ │ -314template │ │ │ │ │ -315struct enable_if { typedef T type; }; │ │ │ │ │ -316template │ │ │ │ │ -317struct enable_if { }; │ │ │ │ │ -318 │ │ │ │ │ -320 │ │ │ │ │ -321// extract a kernel from cache if available │ │ │ │ │ -322template │ │ │ │ │ -323static EVALUATOR *GetEvaluator( │ │ │ │ │ -324 EvaluatorCacheT *cache, │ │ │ │ │ -325 BufferDescriptor const &srcDesc, │ │ │ │ │ -326 BufferDescriptor const &dstDesc, │ │ │ │ │ -327 BufferDescriptor const &duDesc, │ │ │ │ │ -328 BufferDescriptor const &dvDesc, │ │ │ │ │ -329 BufferDescriptor const &duuDesc, │ │ │ │ │ -330 BufferDescriptor const &duvDesc, │ │ │ │ │ -331 BufferDescriptor const &dvvDesc, │ │ │ │ │ -332 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -333 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -334 (void)t; │ │ │ │ │ -335 if (cache == NULL) return NULL; │ │ │ │ │ -336 return cache->GetEvaluator(srcDesc, dstDesc, │ │ │ │ │ -337 duDesc, dvDesc, duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -338 deviceContext); │ │ │ │ │ -339} │ │ │ │ │ -340 │ │ │ │ │ -341template │ │ │ │ │ -342static EVALUATOR *GetEvaluator( │ │ │ │ │ -343 EvaluatorCacheT *cache, │ │ │ │ │ -344 BufferDescriptor const &srcDesc, │ │ │ │ │ -345 BufferDescriptor const &dstDesc, │ │ │ │ │ -346 BufferDescriptor const &duDesc, │ │ │ │ │ -347 BufferDescriptor const &dvDesc, │ │ │ │ │ -348 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -349 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -350 (void)t; │ │ │ │ │ -351 if (cache == NULL) return NULL; │ │ │ │ │ -352 return cache->GetEvaluator(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -deviceContext); │ │ │ │ │ -353} │ │ │ │ │ -354 │ │ │ │ │ -355template │ │ │ │ │ -356static EVALUATOR *GetEvaluator( │ │ │ │ │ -357 EvaluatorCacheT *cache, │ │ │ │ │ -358 BufferDescriptor const &srcDesc, │ │ │ │ │ -359 BufferDescriptor const &dstDesc, │ │ │ │ │ -360 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -361 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -362 (void)t; │ │ │ │ │ -363 if (cache == NULL) return NULL; │ │ │ │ │ -364 return cache->GetEvaluator(srcDesc, dstDesc, │ │ │ │ │ -365 BufferDescriptor(), │ │ │ │ │ -366 BufferDescriptor(), │ │ │ │ │ -367 deviceContext); │ │ │ │ │ -368} │ │ │ │ │ -369 │ │ │ │ │ -370// fallback │ │ │ │ │ -371template │ │ │ │ │ -372static EVALUATOR *GetEvaluator( │ │ │ │ │ -373 EvaluatorCacheT *, │ │ │ │ │ -374 BufferDescriptor const &, │ │ │ │ │ -375 BufferDescriptor const &, │ │ │ │ │ -376 BufferDescriptor const &, │ │ │ │ │ -377 BufferDescriptor const &, │ │ │ │ │ -378 BufferDescriptor const &, │ │ │ │ │ -379 BufferDescriptor const &, │ │ │ │ │ -380 BufferDescriptor const &, │ │ │ │ │ -381 DEVICE_CONTEXT, │ │ │ │ │ -382 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -383 (void)t; │ │ │ │ │ -384 return NULL; │ │ │ │ │ -385} │ │ │ │ │ -386 │ │ │ │ │ -387template │ │ │ │ │ -388static EVALUATOR *GetEvaluator( │ │ │ │ │ -389 EvaluatorCacheT *, │ │ │ │ │ -390 BufferDescriptor const &, │ │ │ │ │ -391 BufferDescriptor const &, │ │ │ │ │ -392 BufferDescriptor const &, │ │ │ │ │ -393 BufferDescriptor const &, │ │ │ │ │ -394 DEVICE_CONTEXT, │ │ │ │ │ -395 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -396 (void)t; │ │ │ │ │ -397 return NULL; │ │ │ │ │ -398} │ │ │ │ │ -399 │ │ │ │ │ -400template │ │ │ │ │ -401static EVALUATOR *GetEvaluator( │ │ │ │ │ -402 EvaluatorCacheT *, │ │ │ │ │ -403 BufferDescriptor const &, │ │ │ │ │ -404 BufferDescriptor const &, │ │ │ │ │ -405 DEVICE_CONTEXT, │ │ │ │ │ -406 typename enable_if::value, void>::type*t=0) { │ │ │ │ │ -407 (void)t; │ │ │ │ │ -408 return NULL; │ │ │ │ │ -409} │ │ │ │ │ -410 │ │ │ │ │ -411// ------------------------------------------------------------------------- │ │ │ │ │ --- │ │ │ │ │ -412 │ │ │ │ │ -413template │ │ │ │ │ -_4_1_8class _M_e_s_h : public _M_e_s_h_I_n_t_e_r_f_a_c_e { │ │ │ │ │ -419public: │ │ │ │ │ -_4_2_0 typedef VERTEX_BUFFER _V_e_r_t_e_x_B_u_f_f_e_r; │ │ │ │ │ -_4_2_1 typedef EVALUATOR _E_v_a_l_u_a_t_o_r; │ │ │ │ │ -_4_2_2 typedef STENCIL_TABLE _S_t_e_n_c_i_l_T_a_b_l_e; │ │ │ │ │ -_4_2_3 typedef PATCH_TABLE _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ -_4_2_4 typedef DEVICE_CONTEXT _D_e_v_i_c_e_C_o_n_t_e_x_t; │ │ │ │ │ -_4_2_5 typedef _E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_<_E_v_a_l_u_a_t_o_r_> _E_v_a_l_u_a_t_o_r_C_a_c_h_e; │ │ │ │ │ -_4_2_6 typedef typename PatchTable::VertexBufferBinding _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g; │ │ │ │ │ -427 │ │ │ │ │ -_4_2_8 _M_e_s_h(_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r * refiner, │ │ │ │ │ -429 int numVertexElements, │ │ │ │ │ -430 int numVaryingElements, │ │ │ │ │ -431 int level, │ │ │ │ │ -432 _M_e_s_h_B_i_t_s_e_t bits = _M_e_s_h_B_i_t_s_e_t(), │ │ │ │ │ -433 _E_v_a_l_u_a_t_o_r_C_a_c_h_e * evaluatorCache = NULL, │ │ │ │ │ -434 _D_e_v_i_c_e_C_o_n_t_e_x_t * deviceContext = NULL) : │ │ │ │ │ -435 │ │ │ │ │ -436 _refiner(refiner), │ │ │ │ │ -437 _farPatchTable(NULL), │ │ │ │ │ -438 _numVertices(0), │ │ │ │ │ -439 _maxValence(0), │ │ │ │ │ -440 _vertexBuffer(NULL), │ │ │ │ │ -441 _varyingBuffer(NULL), │ │ │ │ │ -442 _vertexStencilTable(NULL), │ │ │ │ │ -443 _varyingStencilTable(NULL), │ │ │ │ │ -444 _evaluatorCache(evaluatorCache), │ │ │ │ │ -445 _patchTable(NULL), │ │ │ │ │ -446 _deviceContext(deviceContext) { │ │ │ │ │ -447 │ │ │ │ │ -448 assert(_refiner); │ │ │ │ │ -449 │ │ │ │ │ -450 _M_e_s_h_I_n_t_e_r_f_a_c_e_<_P_A_T_C_H___T_A_B_L_E_>_:_:_r_e_f_i_n_e_M_e_s_h( │ │ │ │ │ -451 *_refiner, level, bits); │ │ │ │ │ -452 │ │ │ │ │ -453 int vertexBufferStride = numVertexElements + │ │ │ │ │ -454 (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g) ? numVaryingElements : 0); │ │ │ │ │ -455 int varyingBufferStride = │ │ │ │ │ -456 (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g) ? 0 : numVaryingElements); │ │ │ │ │ -457 │ │ │ │ │ -458 initializeContext(numVertexElements, │ │ │ │ │ -459 numVaryingElements, │ │ │ │ │ -460 level, bits); │ │ │ │ │ -461 │ │ │ │ │ -462 initializeVertexBuffers(_numVertices, │ │ │ │ │ -463 vertexBufferStride, │ │ │ │ │ -464 varyingBufferStride); │ │ │ │ │ -465 │ │ │ │ │ -466 // configure vertex buffer descriptor │ │ │ │ │ -467 _vertexDesc = │ │ │ │ │ -468 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(0, numVertexElements, vertexBufferStride); │ │ │ │ │ -469 if (bits.test(_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g)) { │ │ │ │ │ -470 _varyingDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ -471 numVertexElements, numVaryingElements, vertexBufferStride); │ │ │ │ │ -472 } else { │ │ │ │ │ -473 _varyingDesc = _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r( │ │ │ │ │ -474 0, numVaryingElements, varyingBufferStride); │ │ │ │ │ -475 } │ │ │ │ │ -476 } │ │ │ │ │ -477 │ │ │ │ │ -_4_7_8 virtual _~_M_e_s_h() { │ │ │ │ │ -479 delete _refiner; │ │ │ │ │ -480 delete _farPatchTable; │ │ │ │ │ -481 delete _vertexBuffer; │ │ │ │ │ -482 delete _varyingBuffer; │ │ │ │ │ -483 delete _vertexStencilTable; │ │ │ │ │ -484 delete _varyingStencilTable; │ │ │ │ │ -485 delete _patchTable; │ │ │ │ │ -486 // deviceContext and evaluatorCache are not owned by this class. │ │ │ │ │ -487 } │ │ │ │ │ -488 │ │ │ │ │ -_4_8_9 virtual void _U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r(float const *vertexData, │ │ │ │ │ -490 int startVertex, int numVerts) { │ │ │ │ │ -491 _vertexBuffer->UpdateData(vertexData, startVertex, numVerts, │ │ │ │ │ -492 _deviceContext); │ │ │ │ │ -493 } │ │ │ │ │ -494 │ │ │ │ │ -_4_9_5 virtual void _U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r(float const *varyingData, │ │ │ │ │ -496 int startVertex, int numVerts) { │ │ │ │ │ -497 _varyingBuffer->UpdateData(varyingData, startVertex, numVerts, │ │ │ │ │ -498 _deviceContext); │ │ │ │ │ -499 } │ │ │ │ │ -500 │ │ │ │ │ -_5_0_1 virtual void _R_e_f_i_n_e() { │ │ │ │ │ -502 │ │ │ │ │ -503 int numControlVertices = _refiner->_G_e_t_L_e_v_e_l(0)._G_e_t_N_u_m_V_e_r_t_i_c_e_s(); │ │ │ │ │ -504 │ │ │ │ │ -505 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r srcDesc = _vertexDesc; │ │ │ │ │ -506 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r dstDesc(srcDesc); │ │ │ │ │ -507 dstDesc._o_f_f_s_e_t += numControlVertices * dstDesc._s_t_r_i_d_e; │ │ │ │ │ -508 │ │ │ │ │ -509 // note that the _evaluatorCache can be NULL and thus │ │ │ │ │ -510 // the evaluatorInstance can be NULL │ │ │ │ │ -511 // (for uninstantiatable kernels CPU,TBB etc) │ │ │ │ │ -512 _E_v_a_l_u_a_t_o_r const *instance = GetEvaluator( │ │ │ │ │ -513 _evaluatorCache, srcDesc, dstDesc, │ │ │ │ │ -514 _deviceContext); │ │ │ │ │ -515 │ │ │ │ │ -516 Evaluator::EvalStencils(_vertexBuffer, srcDesc, │ │ │ │ │ -517 _vertexBuffer, dstDesc, │ │ │ │ │ -518 _vertexStencilTable, │ │ │ │ │ -519 instance, _deviceContext); │ │ │ │ │ -520 │ │ │ │ │ -521 if (_varyingDesc._l_e_n_g_t_h > 0) { │ │ │ │ │ -522 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r vSrcDesc = _varyingDesc; │ │ │ │ │ -523 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r vDstDesc(vSrcDesc); │ │ │ │ │ -524 vDstDesc._o_f_f_s_e_t += numControlVertices * vDstDesc._s_t_r_i_d_e; │ │ │ │ │ -525 │ │ │ │ │ -526 instance = GetEvaluator( │ │ │ │ │ -527 _evaluatorCache, vSrcDesc, vDstDesc, │ │ │ │ │ -528 _deviceContext); │ │ │ │ │ -529 │ │ │ │ │ -530 if (_varyingBuffer) { │ │ │ │ │ -531 // non-interleaved │ │ │ │ │ -532 Evaluator::EvalStencils(_varyingBuffer, vSrcDesc, │ │ │ │ │ -533 _varyingBuffer, vDstDesc, │ │ │ │ │ -534 _varyingStencilTable, │ │ │ │ │ -535 instance, _deviceContext); │ │ │ │ │ -536 } else { │ │ │ │ │ -537 // interleaved │ │ │ │ │ -538 Evaluator::EvalStencils(_vertexBuffer, vSrcDesc, │ │ │ │ │ -539 _vertexBuffer, vDstDesc, │ │ │ │ │ -540 _varyingStencilTable, │ │ │ │ │ -541 instance, _deviceContext); │ │ │ │ │ -542 } │ │ │ │ │ -543 } │ │ │ │ │ -544 } │ │ │ │ │ -545 │ │ │ │ │ -_5_4_6 virtual void _S_y_n_c_h_r_o_n_i_z_e() { │ │ │ │ │ -547 Evaluator::Synchronize(_deviceContext); │ │ │ │ │ -548 } │ │ │ │ │ -549 │ │ │ │ │ -_5_5_0 virtual _P_a_t_c_h_T_a_b_l_e * _G_e_t_P_a_t_c_h_T_a_b_l_e() const { │ │ │ │ │ -551 return _patchTable; │ │ │ │ │ -552 } │ │ │ │ │ -553 │ │ │ │ │ -_5_5_4 virtual _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e() const { │ │ │ │ │ -555 return _farPatchTable; │ │ │ │ │ -556 } │ │ │ │ │ -557 │ │ │ │ │ -_5_5_8 virtual int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const { return _numVertices; } │ │ │ │ │ -559 │ │ │ │ │ -_5_6_0 virtual int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ -561 │ │ │ │ │ -_5_6_2 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r() { │ │ │ │ │ -563 return _vertexBuffer->BindVBO(_deviceContext); │ │ │ │ │ -564 } │ │ │ │ │ -565 │ │ │ │ │ -_5_6_6 virtual _V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g _B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r() { │ │ │ │ │ -567 return _varyingBuffer->BindVBO(_deviceContext); │ │ │ │ │ -568 } │ │ │ │ │ -569 │ │ │ │ │ -_5_7_0 virtual _V_e_r_t_e_x_B_u_f_f_e_r * _G_e_t_V_e_r_t_e_x_B_u_f_f_e_r() { │ │ │ │ │ -571 return _vertexBuffer; │ │ │ │ │ -572 } │ │ │ │ │ -573 │ │ │ │ │ -_5_7_4 virtual _V_e_r_t_e_x_B_u_f_f_e_r * _G_e_t_V_a_r_y_i_n_g_B_u_f_f_e_r() { │ │ │ │ │ -575 return _varyingBuffer; │ │ │ │ │ -576 } │ │ │ │ │ -577 │ │ │ │ │ -_5_7_8 virtual _F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const * _G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() const { │ │ │ │ │ -579 return _refiner; │ │ │ │ │ -580 } │ │ │ │ │ -581 │ │ │ │ │ -582private: │ │ │ │ │ -583 void initializeContext(int numVertexElements, │ │ │ │ │ -584 int numVaryingElements, │ │ │ │ │ -585 int level, _M_e_s_h_B_i_t_s_e_t bits) { │ │ │ │ │ -586 assert(_refiner); │ │ │ │ │ -587 │ │ │ │ │ -588 Far::StencilTableFactory::Options options; │ │ │ │ │ -589 options.generateOffsets = true; │ │ │ │ │ -590 options.generateIntermediateLevels = │ │ │ │ │ -591 _refiner->_I_s_U_n_i_f_o_r_m() ? false : true; │ │ │ │ │ -592 │ │ │ │ │ -593 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * vertexStencils = NULL; │ │ │ │ │ -594 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const * varyingStencils = NULL; │ │ │ │ │ -595 │ │ │ │ │ -596 if (numVertexElements>0) { │ │ │ │ │ -597 │ │ │ │ │ -598 vertexStencils = _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, │ │ │ │ │ -599 options); │ │ │ │ │ -600 } │ │ │ │ │ -601 │ │ │ │ │ -602 if (numVaryingElements>0) { │ │ │ │ │ -603 │ │ │ │ │ -604 options.interpolationMode = │ │ │ │ │ -605 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G; │ │ │ │ │ -606 │ │ │ │ │ -607 varyingStencils = _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, │ │ │ │ │ -608 options); │ │ │ │ │ -609 } │ │ │ │ │ -610 │ │ │ │ │ -611 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s poptions(level); │ │ │ │ │ -612 poptions.generateFVarTables = bits.test(_M_e_s_h_F_V_a_r_D_a_t_a); │ │ │ │ │ -613 poptions.generateFVarLegacyLinearPatches = !bits.test(_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e); │ │ │ │ │ -614 poptions.generateLegacySharpCornerPatches = !bits.test │ │ │ │ │ -(_M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h); │ │ │ │ │ -615 poptions.useSingleCreasePatch = bits.test(_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h); │ │ │ │ │ -616 poptions.useInfSharpPatch = bits.test(_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h); │ │ │ │ │ -617 │ │ │ │ │ -618 // points on bilinear and gregory basis endcap boundaries can be │ │ │ │ │ -619 // shared among adjacent patches to save some stencils. │ │ │ │ │ -620 if (bits.test(_M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s)) { │ │ │ │ │ -621 poptions.SetEndCapType( │ │ │ │ │ -622 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S); │ │ │ │ │ -623 poptions.shareEndCapPatchPoints = true; │ │ │ │ │ -624 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s)) { │ │ │ │ │ -625 poptions.SetEndCapType( │ │ │ │ │ -626 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S); │ │ │ │ │ -627 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s)) { │ │ │ │ │ -628 poptions.SetEndCapType( │ │ │ │ │ -629 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S); │ │ │ │ │ -630 poptions.shareEndCapPatchPoints = true; │ │ │ │ │ -631 } else if (bits.test(_M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y)) { │ │ │ │ │ -632 poptions.SetEndCapType( │ │ │ │ │ -633 _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y); │ │ │ │ │ -634 } │ │ │ │ │ -635 │ │ │ │ │ -636 _farPatchTable = _F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e(*_refiner, poptions); │ │ │ │ │ -637 │ │ │ │ │ -638 // if there's endcap stencils, merge it into regular stencils. │ │ │ │ │ -639 if (_farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e()) { │ │ │ │ │ -640 // append stencils │ │ │ │ │ -641 if (Far::StencilTable const *vertexStencilsWithLocalPoints = │ │ │ │ │ -642 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -643 *_refiner, │ │ │ │ │ -644 vertexStencils, │ │ │ │ │ -645 _farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e())) { │ │ │ │ │ -646 delete vertexStencils; │ │ │ │ │ -647 vertexStencils = vertexStencilsWithLocalPoints; │ │ │ │ │ -648 } │ │ │ │ │ -649 if (varyingStencils) { │ │ │ │ │ -650 if (Far::StencilTable const *varyingStencilsWithLocalPoints = │ │ │ │ │ -651 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e( │ │ │ │ │ -652 *_refiner, │ │ │ │ │ -653 varyingStencils, │ │ │ │ │ -654 _farPatchTable->_G_e_t_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e())) { │ │ │ │ │ -655 delete varyingStencils; │ │ │ │ │ -656 varyingStencils = varyingStencilsWithLocalPoints; │ │ │ │ │ -657 } │ │ │ │ │ -658 } │ │ │ │ │ -659 } │ │ │ │ │ -660 │ │ │ │ │ -661 _maxValence = _farPatchTable->_G_e_t_M_a_x_V_a_l_e_n_c_e(); │ │ │ │ │ -662 _patchTable = PatchTable::Create(_farPatchTable, _deviceContext); │ │ │ │ │ -663 │ │ │ │ │ -664 // numvertices = coarse verts + refined verts + gregory basis verts │ │ │ │ │ -665 _numVertices = vertexStencils->_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() │ │ │ │ │ -666 + vertexStencils->_G_e_t_N_u_m_S_t_e_n_c_i_l_s(); │ │ │ │ │ -667 │ │ │ │ │ -668 // convert to device stenciltable if necessary. │ │ │ │ │ -669 _vertexStencilTable = │ │ │ │ │ -670 convertToCompatibleStencilTable( │ │ │ │ │ -671 vertexStencils, _deviceContext); │ │ │ │ │ -672 _varyingStencilTable = │ │ │ │ │ -673 convertToCompatibleStencilTable( │ │ │ │ │ -674 varyingStencils, _deviceContext); │ │ │ │ │ -675 │ │ │ │ │ -676 // FIXME: we do extra copyings for Far::Stencils. │ │ │ │ │ -677 delete vertexStencils; │ │ │ │ │ -678 delete varyingStencils; │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -681 void initializeVertexBuffers(int numVertices, │ │ │ │ │ -682 int numVertexElements, │ │ │ │ │ -683 int numVaryingElements) { │ │ │ │ │ -684 │ │ │ │ │ -685 if (numVertexElements) { │ │ │ │ │ -686 _vertexBuffer = VertexBuffer::Create(numVertexElements, │ │ │ │ │ -687 numVertices, _deviceContext); │ │ │ │ │ -688 } │ │ │ │ │ -689 │ │ │ │ │ -690 if (numVaryingElements) { │ │ │ │ │ -691 _varyingBuffer = VertexBuffer::Create(numVaryingElements, │ │ │ │ │ -692 numVertices, _deviceContext); │ │ │ │ │ -693 } │ │ │ │ │ -694 } │ │ │ │ │ -695 │ │ │ │ │ -696 Far::TopologyRefiner * _refiner; │ │ │ │ │ -697 Far::PatchTable * _farPatchTable; │ │ │ │ │ -698 │ │ │ │ │ -699 int _numVertices; │ │ │ │ │ -700 int _maxValence; │ │ │ │ │ -701 │ │ │ │ │ -702 _V_e_r_t_e_x_B_u_f_f_e_r * _vertexBuffer; │ │ │ │ │ -703 _V_e_r_t_e_x_B_u_f_f_e_r * _varyingBuffer; │ │ │ │ │ -704 │ │ │ │ │ -705 BufferDescriptor _vertexDesc; │ │ │ │ │ -706 BufferDescriptor _varyingDesc; │ │ │ │ │ -707 │ │ │ │ │ -708 _S_t_e_n_c_i_l_T_a_b_l_e const * _vertexStencilTable; │ │ │ │ │ -709 _S_t_e_n_c_i_l_T_a_b_l_e const * _varyingStencilTable; │ │ │ │ │ -710 _E_v_a_l_u_a_t_o_r_C_a_c_h_e * _evaluatorCache; │ │ │ │ │ -711 │ │ │ │ │ -712 _P_a_t_c_h_T_a_b_l_e *_patchTable; │ │ │ │ │ -713 _D_e_v_i_c_e_C_o_n_t_e_x_t *_deviceContext; │ │ │ │ │ -714}; │ │ │ │ │ -715 │ │ │ │ │ -716} // end namespace Osd │ │ │ │ │ -717 │ │ │ │ │ -718} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -719using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -720 │ │ │ │ │ -721} // end namespace OpenSubdiv │ │ │ │ │ -722 │ │ │ │ │ -723#endif // OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ +138} // end namespace Osd │ │ │ │ │ +139 │ │ │ │ │ +140} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +141using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +142 │ │ │ │ │ +143} // end namespace OpenSubdiv │ │ │ │ │ +144 │ │ │ │ │ +145#endif // OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -STENCIL_TABLE const * convertToCompatibleStencilTable(SRC_STENCIL_TABLE const │ │ │ │ │ -*table, DEVICE_CONTEXT *context) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_B_i_t_s │ │ │ │ │ -MeshBits │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_B_i_l_i_n_e_a_r_B_a_s_i_s │ │ │ │ │ -@ MeshEndCapBilinearBasis │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_N_U_M___M_E_S_H___B_I_T_S │ │ │ │ │ -@ NUM_MESH_BITS │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ -@ MeshUseInfSharpPatch │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ -@ MeshUseSingleCreasePatch │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_l_e_a_v_e_V_a_r_y_i_n_g │ │ │ │ │ -@ MeshInterleaveVarying │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_F_V_a_r_A_d_a_p_t_i_v_e │ │ │ │ │ -@ MeshFVarAdaptive │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_G_r_e_g_o_r_y_B_a_s_i_s │ │ │ │ │ -@ MeshEndCapGregoryBasis │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_B_S_p_l_i_n_e_B_a_s_i_s │ │ │ │ │ -@ MeshEndCapBSplineBasis │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_E_n_d_C_a_p_L_e_g_a_c_y_G_r_e_g_o_r_y │ │ │ │ │ -@ MeshEndCapLegacyGregory │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_U_s_e_S_m_o_o_t_h_C_o_r_n_e_r_P_a_t_c_h │ │ │ │ │ -@ MeshUseSmoothCornerPatch │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_F_V_a_r_D_a_t_a │ │ │ │ │ -@ MeshFVarData │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_A_d_a_p_t_i_v_e │ │ │ │ │ -@ MeshAdaptive │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ -_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> │ │ │ │ │ -Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, │ │ │ │ │ -Far::StencilTable, void >(Far::StencilTable const *table, void *) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_4_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ -_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e_,_ _v_o_i_d_ _> │ │ │ │ │ -Far::LimitStencilTable const * convertToCompatibleStencilTable< Far:: │ │ │ │ │ -LimitStencilTable, Far::LimitStencilTable, void >(Far::LimitStencilTable const │ │ │ │ │ -*table, void *) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_B_i_t_s_e_t │ │ │ │ │ -std::bitset< NUM_MESH_BITS > MeshBitset │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_6_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_c_o_n_v_e_r_t_T_o_C_o_m_p_a_t_i_b_l_e_S_t_e_n_c_i_l_T_a_b_l_e_<_ _F_a_r_:_: │ │ │ │ │ -_S_t_e_n_c_i_l_T_a_b_l_e_,_ _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_,_ _I_D_3_D_1_1_D_e_v_i_c_e_C_o_n_t_e_x_t_ _> │ │ │ │ │ -Far::StencilTable const * convertToCompatibleStencilTable< Far::StencilTable, │ │ │ │ │ -Far::StencilTable, ID3D11DeviceContext >(Far::StencilTable const *table, │ │ │ │ │ -ID3D11DeviceContext *) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_6_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchParam > PatchParamVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchArray > PatchArrayVector │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ Container for arrays of parametric patches. │ │ │ │ │ DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ -int GetMaxValence() const │ │ │ │ │ -Returns max vertex valence. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_9_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable const * GetLocalPointStencilTable() const │ │ │ │ │ -Returns the stencil table to compute local point vertex values. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable const * GetLocalPointVaryingStencilTable() const │ │ │ │ │ -Returns the stencil table to compute local point varying values. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ -static PatchTable * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ -options=Options(), ConstIndexArray selectedFaces=ConstIndexArray()) │ │ │ │ │ -Instantiates a PatchTable from a client-provided TopologyRefiner. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Public options for the PatchTable factory. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_4_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y │ │ │ │ │ -@ ENDCAP_LEGACY_GREGORY │ │ │ │ │ -legacy option for 2.x style Gregory patches (Catmark only) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_6_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S │ │ │ │ │ -@ ENDCAP_GREGORY_BASIS │ │ │ │ │ -use Gregory patches (highest quality, recommended default) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S │ │ │ │ │ -@ ENDCAP_BILINEAR_BASIS │ │ │ │ │ -use linear patches (simple quads or tris) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S │ │ │ │ │ -@ ENDCAP_BSPLINE_BASIS │ │ │ │ │ -use BSpline-like patches (same patch type as regular) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_R_e_a_l_<_ _f_l_o_a_t_ _>_:_: │ │ │ │ │ -_I_N_T_E_R_P_O_L_A_T_E___V_A_R_Y_I_N_G │ │ │ │ │ -@ INTERPOLATE_VARYING │ │ │ │ │ -varying primvar stencils │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_5_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumControlVertices() const │ │ │ │ │ -Returns the number of control vertices indexed in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_:_:_G_e_t_N_u_m_S_t_e_n_c_i_l_s │ │ │ │ │ -int GetNumStencils() const │ │ │ │ │ -Returns the number of stencils in the table. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_1_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_2_7_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -Limit stencil table class wrapping the template for compatibility. │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_._h_:_5_8_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_:_C_r_e_a_t_e │ │ │ │ │ -static StencilTable const * Create(TopologyRefiner const &refiner, Options │ │ │ │ │ -options=Options()) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_A_p_p_e_n_d_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const │ │ │ │ │ -&refiner, StencilTable const *baseStencilTable, StencilTable const │ │ │ │ │ -*localPointStencilTable, bool factorize=true) │ │ │ │ │ -DDeeffiinniittiioonn _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_3_0_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumVertices() const │ │ │ │ │ -Return the number of vertices in this level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -Stores topology data for a specified set of refinement options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_5_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ -bool IsUniform() const │ │ │ │ │ -Returns true if uniform refinement has been applied. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +Cpu patch table. │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_5_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +const PatchArray * GetFVarPatchArrayBuffer(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +const int * GetVaryingPatchIndexBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_9_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +std::vector< int > _varyingIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_S_i_z_e │ │ │ │ │ +size_t GetFVarPatchParamSize(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_~_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~CpuPatchTable() │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +PatchParamVector _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +const int * GetPatchIndexBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CpuPatchTable * Create(const Far::PatchTable *patchTable, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< PatchParamVector > _fvarParamBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +CpuPatchTable(const Far::PatchTable *patchTable) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s │ │ │ │ │ +std::vector< std::vector< int > > _fvarIndexBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ +size_t GetPatchIndexSize() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +const PatchParam * GetPatchParamBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +std::vector< int > _indexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ +size_t GetFVarPatchIndexSize(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_I_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +const int * GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r │ │ │ │ │ +const PatchParam * GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_1_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m_S_i_z_e │ │ │ │ │ +size_t GetPatchParamSize() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_I_n_d_e_x_S_i_z_e │ │ │ │ │ +size_t GetVaryingPatchIndexSize() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +const PatchArray * GetVaryingPatchArrayBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_9_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ int GetNumFVarChannels() const │ │ │ │ │ -Returns the number of face-varying channels in the tables. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_R_e_f_i_n_e_U_n_i_f_o_r_m │ │ │ │ │ -void RefineUniform(UniformOptions options) │ │ │ │ │ -Refine the topology uniformly. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_L_e_v_e_l │ │ │ │ │ -TopologyLevel const & GetLevel(int level) const │ │ │ │ │ -Returns a handle to access data specific to a particular level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_9_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_R_e_f_i_n_e_A_d_a_p_t_i_v_e │ │ │ │ │ -void RefineAdaptive(AdaptiveOptions options, ConstIndexArray │ │ │ │ │ -selectedFaces=ConstIndexArray()) │ │ │ │ │ -Feature Adaptive topology refinement. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ -Uniform refinement options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l │ │ │ │ │ -unsigned int fullTopologyInLastLevel │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_3_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ -Adaptive refinement options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_5_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ -unsigned int useSingleCreasePatch │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ -unsigned int useInfSharpPatch │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -unsigned int considerFVarChannels │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_8_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ -data buffers.... │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ -int stride │ │ │ │ │ -stride to the next element │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_l_e_n_g_t_h │ │ │ │ │ -int length │ │ │ │ │ -number or length of the data │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_f_f_s_e_t │ │ │ │ │ -int offset │ │ │ │ │ -offset to desired element data │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_6_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -virtual Far::PatchTable const * GetFarPatchTable() const =0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_r_e_f_i_n_e_M_e_s_h │ │ │ │ │ -static void refineMesh(Far::TopologyRefiner &refiner, int level, MeshBitset │ │ │ │ │ -bits) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_1_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ -virtual int GetMaxValence() const =0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -virtual int GetNumVertices() const =0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ -virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int │ │ │ │ │ -numVerts)=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_r_e_f_i_n_e_M_e_s_h │ │ │ │ │ -static void refineMesh(Far::TopologyRefiner &refiner, int level, bool adaptive, │ │ │ │ │ -bool singleCreasePatch) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_0_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int │ │ │ │ │ -numVerts)=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_G_e_t_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -virtual PatchTable * GetPatchTable() const =0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_~_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -virtual ~MeshInterface() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_7_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -MeshInterface() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_R_e_f_i_n_e │ │ │ │ │ -virtual void Refine()=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ -PatchTable::VertexBufferBinding VertexBufferBinding │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_7_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBufferBinding BindVertexBuffer()=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBufferBinding BindVaryingBuffer()=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -PATCH_TABLE PatchTable │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_I_n_t_e_r_f_a_c_e_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -virtual void Synchronize()=0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ -EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -DEVICE_CONTEXT *deviceContext) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_4_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ -EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ -BufferDescriptor const &dvvDesc, DEVICE_CONTEXT *deviceContext) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_5_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_G_e_t_E_v_a_l_u_a_t_o_r │ │ │ │ │ -EVALUATOR * GetEvaluator(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, DEVICE_CONTEXT *deviceContext) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_~_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T │ │ │ │ │ -~EvaluatorCacheT() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_8_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_v_a_l_u_a_t_o_r_s │ │ │ │ │ -std::vector< Entry > Evaluators │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_9_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_E_n_t_r_y │ │ │ │ │ -Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, │ │ │ │ │ -BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, │ │ │ │ │ -BufferDescriptor const &duuDescArg, BufferDescriptor const &duvDescArg, │ │ │ │ │ -BufferDescriptor const &dvvDescArg, EVALUATOR *evalArg) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_0_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_v_v_D_e_s_c │ │ │ │ │ -BufferDescriptor dvvDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_v_D_e_s_c │ │ │ │ │ -BufferDescriptor duvDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_s_t_D_e_s_c │ │ │ │ │ -BufferDescriptor dstDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_D_e_s_c │ │ │ │ │ -BufferDescriptor duDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_s_r_c_D_e_s_c │ │ │ │ │ -BufferDescriptor srcDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_u_u_D_e_s_c │ │ │ │ │ -BufferDescriptor duuDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_e_v_a_l_u_a_t_o_r │ │ │ │ │ -EVALUATOR * evaluator │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_E_n_t_r_y │ │ │ │ │ -Entry(BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, │ │ │ │ │ -BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, EVALUATOR │ │ │ │ │ -*evalArg) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_1_9_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e_T_:_:_E_n_t_r_y_:_:_d_v_D_e_s_c │ │ │ │ │ -BufferDescriptor dvDesc │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_2_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_1_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -virtual Far::TopologyRefiner const * GetTopologyRefiner() const │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBuffer * GetVertexBuffer() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_U_p_d_a_t_e_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ -virtual void UpdateVaryingBuffer(float const *varyingData, int startVertex, int │ │ │ │ │ -numVerts) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_9_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBuffer * GetVaryingBuffer() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_7_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_R_e_f_i_n_e │ │ │ │ │ -virtual void Refine() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_0_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_D_e_v_i_c_e_C_o_n_t_e_x_t │ │ │ │ │ -DEVICE_CONTEXT DeviceContext │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_E_v_a_l_u_a_t_o_r │ │ │ │ │ -EVALUATOR Evaluator │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_B_i_n_d_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBufferBinding BindVertexBuffer() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -virtual int GetNumVertices() const │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_M_e_s_h │ │ │ │ │ -Mesh(Far::TopologyRefiner *refiner, int numVertexElements, int │ │ │ │ │ -numVaryingElements, int level, MeshBitset bits=MeshBitset(), EvaluatorCache │ │ │ │ │ -*evaluatorCache=NULL, DeviceContext *deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -STENCIL_TABLE StencilTable │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -VERTEX_BUFFER VertexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_E_v_a_l_u_a_t_o_r_C_a_c_h_e │ │ │ │ │ -EvaluatorCacheT< Evaluator > EvaluatorCache │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_B_i_n_d_V_a_r_y_i_n_g_B_u_f_f_e_r │ │ │ │ │ -virtual VertexBufferBinding BindVaryingBuffer() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_~_M_e_s_h │ │ │ │ │ -virtual ~Mesh() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_7_8 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_V_e_r_t_e_x_B_u_f_f_e_r_B_i_n_d_i_n_g │ │ │ │ │ -PatchTable::VertexBufferBinding VertexBufferBinding │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_U_p_d_a_t_e_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual void UpdateVertexBuffer(float const *vertexData, int startVertex, int │ │ │ │ │ -numVerts) │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_8_9 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -virtual void Synchronize() │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_4_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -virtual PatchTable * GetPatchTable() const │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_F_a_r_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -virtual Far::PatchTable const * GetFarPatchTable() const │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_5_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -PATCH_TABLE PatchTable │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_4_2_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_e_s_h_:_:_G_e_t_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ -virtual int GetMaxValence() const │ │ │ │ │ -DDeeffiinniittiioonn _m_e_s_h_._h_:_5_6_0 │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_0_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +size_t GetNumPatchArrays() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_8_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_B_u_f_f_e_r │ │ │ │ │ +const PatchArray * GetPatchArrayBuffer() const │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +PatchArrayVector _varyingPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_P_a_t_c_h_T_a_b_l_e_:_:___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +std::vector< PatchArrayVector > _fvarPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_P_a_t_c_h_T_a_b_l_e_._h_:_1_3_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_e_s_h_._h │ │ │ │ │ + * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00896.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/bufferDescriptor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,26 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cpuVertexBuffer.h File Reference
│ │ │ │ +
bufferDescriptor.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <cstddef>
│ │ │ │ +#include <string.h>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  CpuVertexBuffer
 Concrete vertex buffer class for CPU subdivision. More...
struct  BufferDescriptor
 BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +118,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cpuVertexBuffer.h File Reference │ │ │ │ │ +bufferDescriptor.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for CPU subdivision. _M_o_r_e_._._. │ │ │ │ │ +struct   _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ + _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r is a struct which describes buffer elements in │ │ │ │ │ +  interleaved data buffers. Almost all _O_s_d Evaluator APIs take │ │ │ │ │ + BufferDescriptors along with device-specific buffer objects. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00896 = [ │ │ │ │ │ - ["CpuVertexBuffer", "a01177.html", "a01177"] │ │ │ │ │ + ["BufferDescriptor", "a01141.html", "a01141"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/bufferDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cpuVertexBuffer.h
│ │ │ │ +
bufferDescriptor.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2013 Pixar
│ │ │ │ +
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │
9// 6. Trademarks. This License does not grant permission to use the trade
│ │ │ │ @@ -119,75 +119,112 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include <cstddef>
│ │ │ │ -
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ -
34
│ │ │ │ -
35namespace Osd {
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
43public:
│ │ │ │ -
45 static CpuVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ -
46 void *deviceContext = NULL);
│ │ │ │ -
47
│ │ │ │ - │ │ │ │ -
50
│ │ │ │ -
53 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ -
54 void *deviceContext = NULL);
│ │ │ │ -
55
│ │ │ │ -
57 int GetNumElements() const;
│ │ │ │ -
58
│ │ │ │ -
60 int GetNumVertices() const;
│ │ │ │ -
61
│ │ │ │ -
63 float * BindCpuBuffer();
│ │ │ │ -
64
│ │ │ │ -
65protected:
│ │ │ │ -
67 CpuVertexBuffer(int numElements, int numVertices);
│ │ │ │ +
29#include <string.h>
│ │ │ │ +
30
│ │ │ │ +
31namespace OpenSubdiv {
│ │ │ │ +
32namespace OPENSUBDIV_VERSION {
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
34namespace Osd {
│ │ │ │ +
35
│ │ │ │ +
46
│ │ │ │ +
47// example:
│ │ │ │ +
48// n
│ │ │ │ +
49// -----+----------------------------------------+-------------------------
│ │ │ │ +
50// | vertex 0 |
│ │ │ │ +
51// -----+----------------------------------------+-------------------------
│ │ │ │ +
52// | X Y Z R G B A Xu Yu Zu Xv Yv Zv |
│ │ │ │ +
53// -----+----------------------------------------+-------------------------
│ │ │ │ +
54// <------------- stride = 13 -------------->
│ │ │ │ +
55//
│ │ │ │ +
56// - XYZ (offset = n+0, length = 3, stride = 13)
│ │ │ │ +
57// - RGBA (offset = n+3, length = 4, stride = 13)
│ │ │ │ +
58// - uTangent (offset = n+7, length = 3, stride = 13)
│ │ │ │ +
59// - vTangent (offset = n+10, length = 3, stride = 13)
│ │ │ │ +
60//
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62
│ │ │ │ + │ │ │ │ +
65
│ │ │ │ +
67 BufferDescriptor(int o, int l, int s) : offset(o), length(l), stride(s) { }
│ │ │ │
68
│ │ │ │ -
69private:
│ │ │ │ -
70 int _numElements;
│ │ │ │ -
71 int _numVertices;
│ │ │ │ -
72 float *_cpuBuffer;
│ │ │ │ -
73};
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75
│ │ │ │ -
76} // end namespace Osd
│ │ │ │ -
77
│ │ │ │ -
78} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
79using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
80
│ │ │ │ -
81} // end namespace OpenSubdiv
│ │ │ │ -
82
│ │ │ │ -
83#endif // OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ -
Concrete vertex buffer class for CPU subdivision.
│ │ │ │ -
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ -
static CpuVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ │ -
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │ -
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ - │ │ │ │ -
float * BindCpuBuffer()
Returns the address of CPU buffer.
│ │ │ │ -
CpuVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ +
│ │ │ │ +
70 int GetLocalOffset() const {
│ │ │ │ +
71 return stride > 0 ? offset % stride : 0;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
75 bool IsValid() const {
│ │ │ │ +
76 return ((length > 0) &&
│ │ │ │ + │ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
81 void Reset() {
│ │ │ │ +
82 offset = length = stride = 0;
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
│ │ │ │ +
86 bool operator == (BufferDescriptor const &other) const {
│ │ │ │ +
87 return (offset == other.offset &&
│ │ │ │ +
88 length == other.length &&
│ │ │ │ +
89 stride == other.stride);
│ │ │ │ +
90 }
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
│ │ │ │ +
93 bool operator != (BufferDescriptor const &other) const {
│ │ │ │ +
94 return !(this->operator==(other));
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
98 int offset;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
103};
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
105} // end namespace Osd
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
107} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
108using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
109
│ │ │ │ +
110} // end namespace OpenSubdiv
│ │ │ │ +
111
│ │ │ │ +
112#endif // OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ + │ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
void Reset()
Resets the descriptor to default.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
bool operator!=(BufferDescriptor const &other) const
True if the descriptors are not identical.
│ │ │ │ +
bool operator==(BufferDescriptor const &other) const
True if the descriptors are identical.
│ │ │ │ +
bool IsValid() const
True if the descriptor values are internally consistent.
│ │ │ │ +
int GetLocalOffset() const
Returns the relative offset within a stride.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuVertexBuffer.h │ │ │ │ │ +bufferDescriptor.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ -2// Copyright 2013 Pixar │ │ │ │ │ +2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,84 +24,125 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ -36 │ │ │ │ │ -_4_2class _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -43public: │ │ │ │ │ -_4_5 static _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -46 void *deviceContext = NULL); │ │ │ │ │ -47 │ │ │ │ │ -_4_9 _~_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ -50 │ │ │ │ │ -_5_3 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -54 void *deviceContext = NULL); │ │ │ │ │ -55 │ │ │ │ │ -_5_7 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -58 │ │ │ │ │ -_6_0 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ -61 │ │ │ │ │ -_6_3 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ -64 │ │ │ │ │ -65protected: │ │ │ │ │ -_6_7 _C_p_u_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +29#include │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +33 │ │ │ │ │ +_3_4namespace Osd { │ │ │ │ │ +35 │ │ │ │ │ +46 │ │ │ │ │ +47// example: │ │ │ │ │ +48// n │ │ │ │ │ +49// -----+----------------------------------------+------------------------- │ │ │ │ │ +50// | vertex 0 | │ │ │ │ │ +51// -----+----------------------------------------+------------------------- │ │ │ │ │ +52// | X Y Z R G B A Xu Yu Zu Xv Yv Zv | │ │ │ │ │ +53// -----+----------------------------------------+------------------------- │ │ │ │ │ +54// <------------- stride = 13 --------------> │ │ │ │ │ +55// │ │ │ │ │ +56// - XYZ (offset = n+0, length = 3, stride = 13) │ │ │ │ │ +57// - RGBA (offset = n+3, length = 4, stride = 13) │ │ │ │ │ +58// - uTangent (offset = n+7, length = 3, stride = 13) │ │ │ │ │ +59// - vTangent (offset = n+10, length = 3, stride = 13) │ │ │ │ │ +60// │ │ │ │ │ +_6_1struct _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ +62 │ │ │ │ │ +_6_4 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r() : _o_f_f_s_e_t(0), _l_e_n_g_t_h(0), _s_t_r_i_d_e(0) { } │ │ │ │ │ +65 │ │ │ │ │ +_6_7 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(int o, int l, int s) : _o_f_f_s_e_t(o), _l_e_n_g_t_h(l), _s_t_r_i_d_e(s) { } │ │ │ │ │ 68 │ │ │ │ │ -69private: │ │ │ │ │ -70 int _numElements; │ │ │ │ │ -71 int _numVertices; │ │ │ │ │ -72 float *_cpuBuffer; │ │ │ │ │ -73}; │ │ │ │ │ -74 │ │ │ │ │ -75 │ │ │ │ │ -76} // end namespace Osd │ │ │ │ │ -77 │ │ │ │ │ -78} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -79using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -80 │ │ │ │ │ -81} // end namespace OpenSubdiv │ │ │ │ │ -82 │ │ │ │ │ -83#endif // OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ +_7_0 int _G_e_t_L_o_c_a_l_O_f_f_s_e_t() const { │ │ │ │ │ +71 return _s_t_r_i_d_e > 0 ? _o_f_f_s_e_t % _s_t_r_i_d_e : 0; │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_5 bool _I_s_V_a_l_i_d() const { │ │ │ │ │ +76 return ((_l_e_n_g_t_h > 0) && │ │ │ │ │ +77 (_l_e_n_g_t_h <= _s_t_r_i_d_e - _G_e_t_L_o_c_a_l_O_f_f_s_e_t())); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +_8_1 void _R_e_s_e_t() { │ │ │ │ │ +82 _o_f_f_s_e_t = _l_e_n_g_t_h = _s_t_r_i_d_e = 0; │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +_8_6 bool _o_p_e_r_a_t_o_r_ _=_=_ (_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &other) const { │ │ │ │ │ +87 return (_o_f_f_s_e_t == other._o_f_f_s_e_t && │ │ │ │ │ +88 _l_e_n_g_t_h == other._l_e_n_g_t_h && │ │ │ │ │ +89 _s_t_r_i_d_e == other._s_t_r_i_d_e); │ │ │ │ │ +90 } │ │ │ │ │ +91 │ │ │ │ │ +_9_3 bool _o_p_e_r_a_t_o_r_ _!_=_ (_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &other) const { │ │ │ │ │ +94 return !(this->_o_p_e_r_a_t_o_r_=_=(other)); │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 int _o_f_f_s_e_t; │ │ │ │ │ +_1_0_0 int _l_e_n_g_t_h; │ │ │ │ │ +_1_0_2 int _s_t_r_i_d_e; │ │ │ │ │ +103}; │ │ │ │ │ +104 │ │ │ │ │ +105} // end namespace Osd │ │ │ │ │ +106 │ │ │ │ │ +107} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +108using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +109 │ │ │ │ │ +110} // end namespace OpenSubdiv │ │ │ │ │ +111 │ │ │ │ │ +112#endif // OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for CPU subdivision. │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_4_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_E_l_e_m_e_n_t_s │ │ │ │ │ -int GetNumElements() const │ │ │ │ │ -Returns how many elements defined in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CpuVertexBuffer * Create(int numElements, int numVertices, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Creator. Returns NULL if error. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_U_p_d_a_t_e_D_a_t_a │ │ │ │ │ -void UpdateData(const float *src, int startVertex, int numVertices, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumVertices() const │ │ │ │ │ -Returns how many vertices allocated in this vertex buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -~CpuVertexBuffer() │ │ │ │ │ -Destructor. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_p_u_B_u_f_f_e_r │ │ │ │ │ -float * BindCpuBuffer() │ │ │ │ │ -Returns the address of CPU buffer. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CpuVertexBuffer(int numElements, int numVertices) │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ +data buffers.... │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ +int stride │ │ │ │ │ +stride to the next element │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_R_e_s_e_t │ │ │ │ │ +void Reset() │ │ │ │ │ +Resets the descriptor to default. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_8_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor() │ │ │ │ │ +Default Constructor. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +BufferDescriptor(int o, int l, int s) │ │ │ │ │ Constructor. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_l_e_n_g_t_h │ │ │ │ │ +int length │ │ │ │ │ +number or length of the data │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ +bool operator!=(BufferDescriptor const &other) const │ │ │ │ │ +True if the descriptors are not identical. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(BufferDescriptor const &other) const │ │ │ │ │ +True if the descriptors are identical. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d │ │ │ │ │ +bool IsValid() const │ │ │ │ │ +True if the descriptor values are internally consistent. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_7_5 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_L_o_c_a_l_O_f_f_s_e_t │ │ │ │ │ +int GetLocalOffset() const │ │ │ │ │ +Returns the relative offset within a stride. │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_7_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_f_f_s_e_t │ │ │ │ │ +int offset │ │ │ │ │ +offset to desired element data │ │ │ │ │ +DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_8 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00899.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/bufferDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
bufferDescriptor.h File Reference
│ │ │ │ +
cpuEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <string.h>
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  BufferDescriptor
 BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects. More...
class  CpuEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +119,13 @@ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -bufferDescriptor.h File Reference │ │ │ │ │ +cpuEvaluator.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_o_s_d_/_b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ - _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r is a struct which describes buffer elements in │ │ │ │ │ -  interleaved data buffers. Almost all _O_s_d Evaluator APIs take │ │ │ │ │ - BufferDescriptors along with device-specific buffer objects. _M_o_r_e_._._. │ │ │ │ │ +class   _C_p_u_E_v_a_l_u_a_t_o_r │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N │ │ │ │ │   │ │ │ │ │ namespace   _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00899 = [ │ │ │ │ │ - ["BufferDescriptor", "a01141.html", "a01141"] │ │ │ │ │ + ["CpuEvaluator", "a01165.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/bufferDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
bufferDescriptor.h
│ │ │ │ +
cpuEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 Pixar
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │ @@ -119,112 +119,529 @@ │ │ │ │
18// Unless required by applicable law or agreed to in writing, software
│ │ │ │
19// distributed under the Apache License with the above modification is
│ │ │ │
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
│ │ │ │
21// KIND, either express or implied. See the Apache License for the specific
│ │ │ │
22// language governing permissions and limitations under the Apache License.
│ │ │ │
23//
│ │ │ │
24
│ │ │ │ -
25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ -
26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29#include <string.h>
│ │ │ │ -
30
│ │ │ │ -
31namespace OpenSubdiv {
│ │ │ │ -
32namespace OPENSUBDIV_VERSION {
│ │ │ │ +
29#include "../osd/bufferDescriptor.h"
│ │ │ │ +
30#include "../osd/types.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <cstddef>
│ │ │ │
33
│ │ │ │ -
│ │ │ │ -
34namespace Osd {
│ │ │ │ -
35
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Osd {
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40public:
│ │ │ │
46
│ │ │ │ -
47// example:
│ │ │ │ -
48// n
│ │ │ │ -
49// -----+----------------------------------------+-------------------------
│ │ │ │ -
50// | vertex 0 |
│ │ │ │ -
51// -----+----------------------------------------+-------------------------
│ │ │ │ -
52// | X Y Z R G B A Xu Yu Zu Xv Yv Zv |
│ │ │ │ -
53// -----+----------------------------------------+-------------------------
│ │ │ │ -
54// <------------- stride = 13 -------------->
│ │ │ │ -
55//
│ │ │ │ -
56// - XYZ (offset = n+0, length = 3, stride = 13)
│ │ │ │ -
57// - RGBA (offset = n+3, length = 4, stride = 13)
│ │ │ │ -
58// - uTangent (offset = n+7, length = 3, stride = 13)
│ │ │ │ -
59// - vTangent (offset = n+10, length = 3, stride = 13)
│ │ │ │ -
60//
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
62
│ │ │ │ - │ │ │ │ -
65
│ │ │ │ -
67 BufferDescriptor(int o, int l, int s) : offset(o), length(l), stride(s) { }
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
70 int GetLocalOffset() const {
│ │ │ │ -
71 return stride > 0 ? offset % stride : 0;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
75 bool IsValid() const {
│ │ │ │ -
76 return ((length > 0) &&
│ │ │ │ - │ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 void Reset() {
│ │ │ │ -
82 offset = length = stride = 0;
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ +
71 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
72 static bool EvalStencils(
│ │ │ │ +
73 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
74 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
75 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
76 const CpuEvaluator *instance = NULL,
│ │ │ │ +
77 void * deviceContext = NULL) {
│ │ │ │ +
78
│ │ │ │ +
79 (void)instance; // unused
│ │ │ │ +
80 (void)deviceContext; // unused
│ │ │ │ +
81
│ │ │ │ +
82 if (stencilTable->GetNumStencils() == 0)
│ │ │ │ +
83 return false;
│ │ │ │
84
│ │ │ │ -
│ │ │ │ -
86 bool operator == (BufferDescriptor const &other) const {
│ │ │ │ -
87 return (offset == other.offset &&
│ │ │ │ -
88 length == other.length &&
│ │ │ │ -
89 stride == other.stride);
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
│ │ │ │ -
93 bool operator != (BufferDescriptor const &other) const {
│ │ │ │ -
94 return !(this->operator==(other));
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
98 int offset;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
103};
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105} // end namespace Osd
│ │ │ │ -
│ │ │ │ -
106
│ │ │ │ -
107} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
108using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
109
│ │ │ │ -
110} // end namespace OpenSubdiv
│ │ │ │ -
111
│ │ │ │ -
112#endif // OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ - │ │ │ │ -
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ - │ │ │ │ -
void Reset()
Resets the descriptor to default.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
bool operator!=(BufferDescriptor const &other) const
True if the descriptors are not identical.
│ │ │ │ -
bool operator==(BufferDescriptor const &other) const
True if the descriptors are identical.
│ │ │ │ -
bool IsValid() const
True if the descriptor values are internally consistent.
│ │ │ │ -
int GetLocalOffset() const
Returns the relative offset within a stride.
│ │ │ │ - │ │ │ │ +
85 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
86 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
87 &stencilTable->GetSizes()[0],
│ │ │ │ +
88 &stencilTable->GetOffsets()[0],
│ │ │ │ +
89 &stencilTable->GetControlIndices()[0],
│ │ │ │ +
90 &stencilTable->GetWeights()[0],
│ │ │ │ +
91 /*start = */ 0,
│ │ │ │ +
92 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
121 static bool EvalStencils(
│ │ │ │ +
122 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
123 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
124 const int * sizes,
│ │ │ │ +
125 const int * offsets,
│ │ │ │ +
126 const int * indices,
│ │ │ │ +
127 const float * weights,
│ │ │ │ +
128 int start, int end);
│ │ │ │ +
129
│ │ │ │ +
167 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
168 static bool EvalStencils(
│ │ │ │ +
169 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
170 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
171 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
172 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
173 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
174 const CpuEvaluator *instance = NULL,
│ │ │ │ +
175 void * deviceContext = NULL) {
│ │ │ │ +
176
│ │ │ │ +
177 (void)instance; // unused
│ │ │ │ +
178 (void)deviceContext; // unused
│ │ │ │ +
179
│ │ │ │ +
180 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
181 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
182 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
183 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
184 &stencilTable->GetSizes()[0],
│ │ │ │ +
185 &stencilTable->GetOffsets()[0],
│ │ │ │ +
186 &stencilTable->GetControlIndices()[0],
│ │ │ │ +
187 &stencilTable->GetWeights()[0],
│ │ │ │ +
188 &stencilTable->GetDuWeights()[0],
│ │ │ │ +
189 &stencilTable->GetDvWeights()[0],
│ │ │ │ +
190 /*start = */ 0,
│ │ │ │ +
191 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
234 static bool EvalStencils(
│ │ │ │ +
235 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
236 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
237 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
238 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
239 const int * sizes,
│ │ │ │ +
240 const int * offsets,
│ │ │ │ +
241 const int * indices,
│ │ │ │ +
242 const float * weights,
│ │ │ │ +
243 const float * duWeights,
│ │ │ │ +
244 const float * dvWeights,
│ │ │ │ +
245 int start, int end);
│ │ │ │ +
246
│ │ │ │ +
302 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
│ │ │ │ +
│ │ │ │ +
303 static bool EvalStencils(
│ │ │ │ +
304 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
305 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
306 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
307 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
308 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
309 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
310 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
311 STENCIL_TABLE const *stencilTable,
│ │ │ │ +
312 const CpuEvaluator *instance = NULL,
│ │ │ │ +
313 void * deviceContext = NULL) {
│ │ │ │ +
314
│ │ │ │ +
315 (void)instance; // unused
│ │ │ │ +
316 (void)deviceContext; // unused
│ │ │ │ +
317
│ │ │ │ +
318 return EvalStencils(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
319 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
320 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
321 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
322 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ +
323 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ +
324 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ +
325 &stencilTable->GetSizes()[0],
│ │ │ │ +
326 &stencilTable->GetOffsets()[0],
│ │ │ │ +
327 &stencilTable->GetControlIndices()[0],
│ │ │ │ +
328 &stencilTable->GetWeights()[0],
│ │ │ │ +
329 &stencilTable->GetDuWeights()[0],
│ │ │ │ +
330 &stencilTable->GetDvWeights()[0],
│ │ │ │ +
331 &stencilTable->GetDuuWeights()[0],
│ │ │ │ +
332 &stencilTable->GetDuvWeights()[0],
│ │ │ │ +
333 &stencilTable->GetDvvWeights()[0],
│ │ │ │ +
334 /*start = */ 0,
│ │ │ │ +
335 /*end = */ stencilTable->GetNumStencils());
│ │ │ │ +
336 }
│ │ │ │ +
│ │ │ │ +
337
│ │ │ │ +
399 static bool EvalStencils(
│ │ │ │ +
400 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
401 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
402 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
403 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
404 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ +
405 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ +
406 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ +
407 const int * sizes,
│ │ │ │ +
408 const int * offsets,
│ │ │ │ +
409 const int * indices,
│ │ │ │ +
410 const float * weights,
│ │ │ │ +
411 const float * duWeights,
│ │ │ │ +
412 const float * dvWeights,
│ │ │ │ +
413 const float * duuWeights,
│ │ │ │ +
414 const float * duvWeights,
│ │ │ │ +
415 const float * dvvWeights,
│ │ │ │ +
416 int start, int end);
│ │ │ │ +
417
│ │ │ │ +
423
│ │ │ │ +
452 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
453 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
454 static bool EvalPatches(
│ │ │ │ +
455 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
456 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
457 int numPatchCoords,
│ │ │ │ +
458 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
459 PATCH_TABLE *patchTable,
│ │ │ │ +
460 CpuEvaluator const *instance = NULL,
│ │ │ │ +
461 void * deviceContext = NULL) {
│ │ │ │ +
462
│ │ │ │ +
463 (void)instance; // unused
│ │ │ │ +
464 (void)deviceContext; // unused
│ │ │ │ +
465
│ │ │ │ +
466 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
467 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
468 numPatchCoords,
│ │ │ │ +
469 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
470 patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
471 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
472 patchTable->GetPatchParamBuffer());
│ │ │ │ +
473 }
│ │ │ │ +
│ │ │ │ +
474
│ │ │ │ +
515 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
516 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
517 static bool EvalPatches(
│ │ │ │ +
518 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
519 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
520 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
521 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
522 int numPatchCoords,
│ │ │ │ +
523 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
524 PATCH_TABLE *patchTable,
│ │ │ │ +
525 CpuEvaluator const *instance = NULL,
│ │ │ │ +
526 void * deviceContext = NULL) {
│ │ │ │ +
527
│ │ │ │ +
528 (void)instance; // unused
│ │ │ │ +
529 (void)deviceContext; // unused
│ │ │ │ +
530
│ │ │ │ +
531 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop.
│ │ │ │ +
532 // ideally all buffer classes should have templated by datatype
│ │ │ │ +
533 // so that downcast isn't needed there.
│ │ │ │ +
534 // (e.g. Osd::CpuBuffer<PatchCoord> )
│ │ │ │ +
535 //
│ │ │ │ +
536 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
537 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
538 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
539 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
540 numPatchCoords,
│ │ │ │ +
541 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
542 patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
543 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
544 patchTable->GetPatchParamBuffer());
│ │ │ │ +
545 }
│ │ │ │ +
│ │ │ │ +
546
│ │ │ │ +
605 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
606 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ +
607 static bool EvalPatches(
│ │ │ │ +
608 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
609 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
610 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
611 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
612 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
613 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
614 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
615 int numPatchCoords,
│ │ │ │ +
616 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
617 PATCH_TABLE *patchTable,
│ │ │ │ +
618 CpuEvaluator const *instance = NULL,
│ │ │ │ +
619 void * deviceContext = NULL) {
│ │ │ │ +
620
│ │ │ │ +
621 (void)instance; // unused
│ │ │ │ +
622 (void)deviceContext; // unused
│ │ │ │ +
623
│ │ │ │ +
624 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop.
│ │ │ │ +
625 // ideally all buffer classes should have templated by datatype
│ │ │ │ +
626 // so that downcast isn't needed there.
│ │ │ │ +
627 // (e.g. Osd::CpuBuffer<PatchCoord> )
│ │ │ │ +
628 //
│ │ │ │ +
629 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
630 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
631 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
632 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
633 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ +
634 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ +
635 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ +
636 numPatchCoords,
│ │ │ │ +
637 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
638 patchTable->GetPatchArrayBuffer(),
│ │ │ │ +
639 patchTable->GetPatchIndexBuffer(),
│ │ │ │ +
640 patchTable->GetPatchParamBuffer());
│ │ │ │ +
641 }
│ │ │ │ +
│ │ │ │ +
642
│ │ │ │ +
670 static bool EvalPatches(
│ │ │ │ +
671 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
672 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
673 int numPatchCoords,
│ │ │ │ +
674 const PatchCoord *patchCoords,
│ │ │ │ +
675 const PatchArray *patchArrays,
│ │ │ │ +
676 const int *patchIndexBuffer,
│ │ │ │ +
677 const PatchParam *patchParamBuffer);
│ │ │ │ +
678
│ │ │ │ +
716 static bool EvalPatches(
│ │ │ │ +
717 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
718 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
719 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
720 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
721 int numPatchCoords,
│ │ │ │ +
722 PatchCoord const *patchCoords,
│ │ │ │ +
723 PatchArray const *patchArrays,
│ │ │ │ +
724 const int *patchIndexBuffer,
│ │ │ │ +
725 PatchParam const *patchParamBuffer);
│ │ │ │ +
726
│ │ │ │ +
779 static bool EvalPatches(
│ │ │ │ +
780 const float *src, BufferDescriptor const &srcDesc,
│ │ │ │ +
781 float *dst, BufferDescriptor const &dstDesc,
│ │ │ │ +
782 float *du, BufferDescriptor const &duDesc,
│ │ │ │ +
783 float *dv, BufferDescriptor const &dvDesc,
│ │ │ │ +
784 float *duu, BufferDescriptor const &duuDesc,
│ │ │ │ +
785 float *duv, BufferDescriptor const &duvDesc,
│ │ │ │ +
786 float *dvv, BufferDescriptor const &dvvDesc,
│ │ │ │ +
787 int numPatchCoords,
│ │ │ │ +
788 PatchCoord const *patchCoords,
│ │ │ │ +
789 PatchArray const *patchArrays,
│ │ │ │ +
790 const int *patchIndexBuffer,
│ │ │ │ +
791 PatchParam const *patchParamBuffer);
│ │ │ │ +
792
│ │ │ │ +
821 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
822 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
824 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
825 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
826 int numPatchCoords,
│ │ │ │ +
827 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
828 PATCH_TABLE *patchTable,
│ │ │ │ +
829 CpuEvaluator const *instance = NULL,
│ │ │ │ +
830 void * deviceContext = NULL) {
│ │ │ │ +
831
│ │ │ │ +
832 (void)instance; // unused
│ │ │ │ +
833 (void)deviceContext; // unused
│ │ │ │ +
834
│ │ │ │ +
835 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
836 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
837 numPatchCoords,
│ │ │ │ +
838 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
839 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
840 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
841 patchTable->GetPatchParamBuffer());
│ │ │ │ +
842 }
│ │ │ │ +
│ │ │ │ +
843
│ │ │ │ +
884 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
885 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
887 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
888 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
889 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
890 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
891 int numPatchCoords,
│ │ │ │ +
892 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
893 PATCH_TABLE *patchTable,
│ │ │ │ +
894 CpuEvaluator const *instance = NULL,
│ │ │ │ +
895 void * deviceContext = NULL) {
│ │ │ │ +
896
│ │ │ │ +
897 (void)instance; // unused
│ │ │ │ +
898 (void)deviceContext; // unused
│ │ │ │ +
899
│ │ │ │ +
900 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
901 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
902 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
903 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
904 numPatchCoords,
│ │ │ │ +
905 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
906 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
907 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
908 patchTable->GetPatchParamBuffer());
│ │ │ │ +
909 }
│ │ │ │ +
│ │ │ │ +
910
│ │ │ │ +
969 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
970 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
972 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
973 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
974 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
975 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
976 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
977 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
978 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
979 int numPatchCoords,
│ │ │ │ +
980 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
981 PATCH_TABLE *patchTable,
│ │ │ │ +
982 CpuEvaluator const *instance = NULL,
│ │ │ │ +
983 void * deviceContext = NULL) {
│ │ │ │ +
984
│ │ │ │ +
985 (void)instance; // unused
│ │ │ │ +
986 (void)deviceContext; // unused
│ │ │ │ +
987
│ │ │ │ +
988 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
989 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
990 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
991 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
992 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ +
993 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ +
994 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ +
995 numPatchCoords,
│ │ │ │ +
996 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
997 patchTable->GetVaryingPatchArrayBuffer(),
│ │ │ │ +
998 patchTable->GetVaryingPatchIndexBuffer(),
│ │ │ │ +
999 patchTable->GetPatchParamBuffer());
│ │ │ │ +
1000 }
│ │ │ │ +
│ │ │ │ +
1001
│ │ │ │ +
1032 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1033 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1035 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1036 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1037 int numPatchCoords,
│ │ │ │ +
1038 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1039 PATCH_TABLE *patchTable,
│ │ │ │ +
1040 int fvarChannel,
│ │ │ │ +
1041 CpuEvaluator const *instance = NULL,
│ │ │ │ +
1042 void * deviceContext = NULL) {
│ │ │ │ +
1043
│ │ │ │ +
1044 (void)instance; // unused
│ │ │ │ +
1045 (void)deviceContext; // unused
│ │ │ │ +
1046
│ │ │ │ +
1047 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
1048 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
1049 numPatchCoords,
│ │ │ │ +
1050 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
1051 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1052 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1053 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1054 }
│ │ │ │ +
│ │ │ │ +
1055
│ │ │ │ +
1098 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1099 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1101 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1102 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1103 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1104 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1105 int numPatchCoords,
│ │ │ │ +
1106 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1107 PATCH_TABLE *patchTable,
│ │ │ │ +
1108 int fvarChannel,
│ │ │ │ +
1109 CpuEvaluator const *instance = NULL,
│ │ │ │ +
1110 void * deviceContext = NULL) {
│ │ │ │ +
1111
│ │ │ │ +
1112 (void)instance; // unused
│ │ │ │ +
1113 (void)deviceContext; // unused
│ │ │ │ +
1114
│ │ │ │ +
1115 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
1116 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
1117 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
1118 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
1119 numPatchCoords,
│ │ │ │ +
1120 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
1121 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1122 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1123 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1124 }
│ │ │ │ +
│ │ │ │ +
1125
│ │ │ │ +
1186 template <typename SRC_BUFFER, typename DST_BUFFER,
│ │ │ │ +
1187 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1189 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
│ │ │ │ +
1190 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
│ │ │ │ +
1191 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
│ │ │ │ +
1192 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
│ │ │ │ +
1193 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
│ │ │ │ +
1194 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
│ │ │ │ +
1195 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
│ │ │ │ +
1196 int numPatchCoords,
│ │ │ │ +
1197 PATCHCOORD_BUFFER *patchCoords,
│ │ │ │ +
1198 PATCH_TABLE *patchTable,
│ │ │ │ +
1199 int fvarChannel,
│ │ │ │ +
1200 CpuEvaluator const *instance = NULL,
│ │ │ │ +
1201 void * deviceContext = NULL) {
│ │ │ │ +
1202
│ │ │ │ +
1203 (void)instance; // unused
│ │ │ │ +
1204 (void)deviceContext; // unused
│ │ │ │ +
1205
│ │ │ │ +
1206 return EvalPatches(srcBuffer->BindCpuBuffer(), srcDesc,
│ │ │ │ +
1207 dstBuffer->BindCpuBuffer(), dstDesc,
│ │ │ │ +
1208 duBuffer->BindCpuBuffer(), duDesc,
│ │ │ │ +
1209 dvBuffer->BindCpuBuffer(), dvDesc,
│ │ │ │ +
1210 duuBuffer->BindCpuBuffer(), duuDesc,
│ │ │ │ +
1211 duvBuffer->BindCpuBuffer(), duvDesc,
│ │ │ │ +
1212 dvvBuffer->BindCpuBuffer(), dvvDesc,
│ │ │ │ +
1213 numPatchCoords,
│ │ │ │ +
1214 (const PatchCoord*)patchCoords->BindCpuBuffer(),
│ │ │ │ +
1215 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
│ │ │ │ +
1216 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
│ │ │ │ +
1217 patchTable->GetFVarPatchParamBuffer(fvarChannel));
│ │ │ │ +
1218 }
│ │ │ │ +
│ │ │ │ +
1219
│ │ │ │ +
1225
│ │ │ │ +
│ │ │ │ +
1227 static void Synchronize(void * /*deviceContext = NULL*/) {
│ │ │ │ +
1228 // nothing.
│ │ │ │ +
1229 }
│ │ │ │ +
│ │ │ │ +
1230};
│ │ │ │ +
│ │ │ │ +
1231
│ │ │ │ +
1232
│ │ │ │ +
1233} // end namespace Osd
│ │ │ │ +
1234
│ │ │ │ +
1235} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
1236using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
1237
│ │ │ │ +
1238} // end namespace OpenSubdiv
│ │ │ │ +
1239
│ │ │ │ +
1240
│ │ │ │ +
1241#endif // OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ + │ │ │ │ +
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
│ │ │ │ + │ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw CPU pointers for input and output.
│ │ │ │ +
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.
│ │ │ │ +
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, const float *duuWeights, const float *duvWeights, const float *dvvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.
│ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, PatchParam const *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, PatchParam const *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ +
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
│ │ │ │ +
static void Synchronize(void *)
synchronize all asynchronous computation invoked on this device.
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function. This function has a same signature as other device kernels hav...
│ │ │ │ +
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ +
Coordinates set on a patch table.
Definition types.h:42
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -bufferDescriptor.h │ │ │ │ │ +cpuEvaluator.h │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// │ │ │ │ │ 2// Copyright 2015 Pixar │ │ │ │ │ 3// │ │ │ │ │ 4// Licensed under the Apache License, Version 2.0 (the "Apache License") │ │ │ │ │ 5// with the following modification; you may not use this file except in │ │ │ │ │ 6// compliance with the Apache License and the following modification to it: │ │ │ │ │ @@ -24,125 +24,655 @@ │ │ │ │ │ 18// Unless required by applicable law or agreed to in writing, software │ │ │ │ │ 19// distributed under the Apache License with the above modification is │ │ │ │ │ 20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY │ │ │ │ │ 21// KIND, either express or implied. See the Apache License for the specific │ │ │ │ │ 22// language governing permissions and limitations under the Apache License. │ │ │ │ │ 23// │ │ │ │ │ 24 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include │ │ │ │ │ -30 │ │ │ │ │ -31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +29#include "../osd/bufferDescriptor.h" │ │ │ │ │ +30#include "../osd/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 33 │ │ │ │ │ -_3_4namespace Osd { │ │ │ │ │ -35 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_3_9class _C_p_u_E_v_a_l_u_a_t_o_r { │ │ │ │ │ +40public: │ │ │ │ │ 46 │ │ │ │ │ -47// example: │ │ │ │ │ -48// n │ │ │ │ │ -49// -----+----------------------------------------+------------------------- │ │ │ │ │ -50// | vertex 0 | │ │ │ │ │ -51// -----+----------------------------------------+------------------------- │ │ │ │ │ -52// | X Y Z R G B A Xu Yu Zu Xv Yv Zv | │ │ │ │ │ -53// -----+----------------------------------------+------------------------- │ │ │ │ │ -54// <------------- stride = 13 --------------> │ │ │ │ │ -55// │ │ │ │ │ -56// - XYZ (offset = n+0, length = 3, stride = 13) │ │ │ │ │ -57// - RGBA (offset = n+3, length = 4, stride = 13) │ │ │ │ │ -58// - uTangent (offset = n+7, length = 3, stride = 13) │ │ │ │ │ -59// - vTangent (offset = n+10, length = 3, stride = 13) │ │ │ │ │ -60// │ │ │ │ │ -_6_1struct _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ -62 │ │ │ │ │ -_6_4 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r() : _o_f_f_s_e_t(0), _l_e_n_g_t_h(0), _s_t_r_i_d_e(0) { } │ │ │ │ │ -65 │ │ │ │ │ -_6_7 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(int o, int l, int s) : _o_f_f_s_e_t(o), _l_e_n_g_t_h(l), _s_t_r_i_d_e(s) { } │ │ │ │ │ -68 │ │ │ │ │ -_7_0 int _G_e_t_L_o_c_a_l_O_f_f_s_e_t() const { │ │ │ │ │ -71 return _s_t_r_i_d_e > 0 ? _o_f_f_s_e_t % _s_t_r_i_d_e : 0; │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_5 bool _I_s_V_a_l_i_d() const { │ │ │ │ │ -76 return ((_l_e_n_g_t_h > 0) && │ │ │ │ │ -77 (_l_e_n_g_t_h <= _s_t_r_i_d_e - _G_e_t_L_o_c_a_l_O_f_f_s_e_t())); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 void _R_e_s_e_t() { │ │ │ │ │ -82 _o_f_f_s_e_t = _l_e_n_g_t_h = _s_t_r_i_d_e = 0; │ │ │ │ │ -83 } │ │ │ │ │ +71 template │ │ │ │ │ +_7_2 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +73 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +74 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +75 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +76 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ +77 void * deviceContext = NULL) { │ │ │ │ │ +78 │ │ │ │ │ +79 (void)instance; // unused │ │ │ │ │ +80 (void)deviceContext; // unused │ │ │ │ │ +81 │ │ │ │ │ +82 if (stencilTable->GetNumStencils() == 0) │ │ │ │ │ +83 return false; │ │ │ │ │ 84 │ │ │ │ │ -_8_6 bool _o_p_e_r_a_t_o_r_ _=_=_ (_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &other) const { │ │ │ │ │ -87 return (_o_f_f_s_e_t == other._o_f_f_s_e_t && │ │ │ │ │ -88 _l_e_n_g_t_h == other._l_e_n_g_t_h && │ │ │ │ │ -89 _s_t_r_i_d_e == other._s_t_r_i_d_e); │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -_9_3 bool _o_p_e_r_a_t_o_r_ _!_=_ (_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &other) const { │ │ │ │ │ -94 return !(this->_o_p_e_r_a_t_o_r_=_=(other)); │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -_9_8 int _o_f_f_s_e_t; │ │ │ │ │ -_1_0_0 int _l_e_n_g_t_h; │ │ │ │ │ -_1_0_2 int _s_t_r_i_d_e; │ │ │ │ │ -103}; │ │ │ │ │ -104 │ │ │ │ │ -105} // end namespace Osd │ │ │ │ │ -106 │ │ │ │ │ -107} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -108using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -109 │ │ │ │ │ -110} // end namespace OpenSubdiv │ │ │ │ │ -111 │ │ │ │ │ -112#endif // OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +85 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +86 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +87 &stencilTable->GetSizes()[0], │ │ │ │ │ +88 &stencilTable->GetOffsets()[0], │ │ │ │ │ +89 &stencilTable->GetControlIndices()[0], │ │ │ │ │ +90 &stencilTable->GetWeights()[0], │ │ │ │ │ +91 /*start = */ 0, │ │ │ │ │ +92 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +_1_2_1 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +122 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +123 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +124 const int * sizes, │ │ │ │ │ +125 const int * offsets, │ │ │ │ │ +126 const int * indices, │ │ │ │ │ +127 const float * weights, │ │ │ │ │ +128 int start, int end); │ │ │ │ │ +129 │ │ │ │ │ +167 template │ │ │ │ │ +_1_6_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +169 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +170 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +171 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +172 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +173 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +174 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ +175 void * deviceContext = NULL) { │ │ │ │ │ +176 │ │ │ │ │ +177 (void)instance; // unused │ │ │ │ │ +178 (void)deviceContext; // unused │ │ │ │ │ +179 │ │ │ │ │ +180 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +181 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +182 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +183 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +184 &stencilTable->GetSizes()[0], │ │ │ │ │ +185 &stencilTable->GetOffsets()[0], │ │ │ │ │ +186 &stencilTable->GetControlIndices()[0], │ │ │ │ │ +187 &stencilTable->GetWeights()[0], │ │ │ │ │ +188 &stencilTable->GetDuWeights()[0], │ │ │ │ │ +189 &stencilTable->GetDvWeights()[0], │ │ │ │ │ +190 /*start = */ 0, │ │ │ │ │ +191 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +_2_3_4 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +235 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +236 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +237 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +238 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +239 const int * sizes, │ │ │ │ │ +240 const int * offsets, │ │ │ │ │ +241 const int * indices, │ │ │ │ │ +242 const float * weights, │ │ │ │ │ +243 const float * duWeights, │ │ │ │ │ +244 const float * dvWeights, │ │ │ │ │ +245 int start, int end); │ │ │ │ │ +246 │ │ │ │ │ +302 template │ │ │ │ │ +_3_0_3 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +304 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +305 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +306 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +307 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +308 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +309 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +310 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +311 STENCIL_TABLE const *stencilTable, │ │ │ │ │ +312 const _C_p_u_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ +313 void * deviceContext = NULL) { │ │ │ │ │ +314 │ │ │ │ │ +315 (void)instance; // unused │ │ │ │ │ +316 (void)deviceContext; // unused │ │ │ │ │ +317 │ │ │ │ │ +318 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +319 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +320 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +321 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +322 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ +323 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ +324 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ +325 &stencilTable->GetSizes()[0], │ │ │ │ │ +326 &stencilTable->GetOffsets()[0], │ │ │ │ │ +327 &stencilTable->GetControlIndices()[0], │ │ │ │ │ +328 &stencilTable->GetWeights()[0], │ │ │ │ │ +329 &stencilTable->GetDuWeights()[0], │ │ │ │ │ +330 &stencilTable->GetDvWeights()[0], │ │ │ │ │ +331 &stencilTable->GetDuuWeights()[0], │ │ │ │ │ +332 &stencilTable->GetDuvWeights()[0], │ │ │ │ │ +333 &stencilTable->GetDvvWeights()[0], │ │ │ │ │ +334 /*start = */ 0, │ │ │ │ │ +335 /*end = */ stencilTable->GetNumStencils()); │ │ │ │ │ +336 } │ │ │ │ │ +337 │ │ │ │ │ +_3_9_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ +400 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +401 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +402 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +403 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +404 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +405 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +406 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +407 const int * sizes, │ │ │ │ │ +408 const int * offsets, │ │ │ │ │ +409 const int * indices, │ │ │ │ │ +410 const float * weights, │ │ │ │ │ +411 const float * duWeights, │ │ │ │ │ +412 const float * dvWeights, │ │ │ │ │ +413 const float * duuWeights, │ │ │ │ │ +414 const float * duvWeights, │ │ │ │ │ +415 const float * dvvWeights, │ │ │ │ │ +416 int start, int end); │ │ │ │ │ +417 │ │ │ │ │ +423 │ │ │ │ │ +452 template │ │ │ │ │ +_4_5_4 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +455 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +456 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +457 int numPatchCoords, │ │ │ │ │ +458 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +459 PATCH_TABLE *patchTable, │ │ │ │ │ +460 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +461 void * deviceContext = NULL) { │ │ │ │ │ +462 │ │ │ │ │ +463 (void)instance; // unused │ │ │ │ │ +464 (void)deviceContext; // unused │ │ │ │ │ +465 │ │ │ │ │ +466 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +467 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +468 numPatchCoords, │ │ │ │ │ +469 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +470 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +471 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +472 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +473 } │ │ │ │ │ +474 │ │ │ │ │ +515 template │ │ │ │ │ +_5_1_7 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +518 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +519 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +520 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +521 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +522 int numPatchCoords, │ │ │ │ │ +523 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +524 PATCH_TABLE *patchTable, │ │ │ │ │ +525 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +526 void * deviceContext = NULL) { │ │ │ │ │ +527 │ │ │ │ │ +528 (void)instance; // unused │ │ │ │ │ +529 (void)deviceContext; // unused │ │ │ │ │ +530 │ │ │ │ │ +531 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop. │ │ │ │ │ +532 // ideally all buffer classes should have templated by datatype │ │ │ │ │ +533 // so that downcast isn't needed there. │ │ │ │ │ +534 // (e.g. Osd::CpuBuffer ) │ │ │ │ │ +535 // │ │ │ │ │ +536 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +537 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +538 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +539 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +540 numPatchCoords, │ │ │ │ │ +541 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +542 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +543 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +544 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +545 } │ │ │ │ │ +546 │ │ │ │ │ +605 template │ │ │ │ │ +_6_0_7 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +608 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +609 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +610 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +611 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +612 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +613 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +614 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +615 int numPatchCoords, │ │ │ │ │ +616 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +617 PATCH_TABLE *patchTable, │ │ │ │ │ +618 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +619 void * deviceContext = NULL) { │ │ │ │ │ +620 │ │ │ │ │ +621 (void)instance; // unused │ │ │ │ │ +622 (void)deviceContext; // unused │ │ │ │ │ +623 │ │ │ │ │ +624 // XXX: PatchCoords is somewhat abusing vertex primvar buffer interop. │ │ │ │ │ +625 // ideally all buffer classes should have templated by datatype │ │ │ │ │ +626 // so that downcast isn't needed there. │ │ │ │ │ +627 // (e.g. Osd::CpuBuffer ) │ │ │ │ │ +628 // │ │ │ │ │ +629 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +630 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +631 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +632 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +633 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ +634 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ +635 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ +636 numPatchCoords, │ │ │ │ │ +637 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +638 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ +639 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ +640 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +641 } │ │ │ │ │ +642 │ │ │ │ │ +_6_7_0 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +671 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +672 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +673 int numPatchCoords, │ │ │ │ │ +674 const _P_a_t_c_h_C_o_o_r_d *patchCoords, │ │ │ │ │ +675 const _P_a_t_c_h_A_r_r_a_y *patchArrays, │ │ │ │ │ +676 const int *patchIndexBuffer, │ │ │ │ │ +677 const _P_a_t_c_h_P_a_r_a_m *patchParamBuffer); │ │ │ │ │ +678 │ │ │ │ │ +_7_1_6 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +717 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +718 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +719 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +720 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +721 int numPatchCoords, │ │ │ │ │ +722 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ +723 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ +724 const int *patchIndexBuffer, │ │ │ │ │ +725 _P_a_t_c_h_P_a_r_a_m const *patchParamBuffer); │ │ │ │ │ +726 │ │ │ │ │ +_7_7_9 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +780 const float *src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +781 float *dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +782 float *du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +783 float *dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +784 float *duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +785 float *duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +786 float *dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +787 int numPatchCoords, │ │ │ │ │ +788 _P_a_t_c_h_C_o_o_r_d const *patchCoords, │ │ │ │ │ +789 _P_a_t_c_h_A_r_r_a_y const *patchArrays, │ │ │ │ │ +790 const int *patchIndexBuffer, │ │ │ │ │ +791 _P_a_t_c_h_P_a_r_a_m const *patchParamBuffer); │ │ │ │ │ +792 │ │ │ │ │ +821 template │ │ │ │ │ +_8_2_3 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +824 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +825 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +826 int numPatchCoords, │ │ │ │ │ +827 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +828 PATCH_TABLE *patchTable, │ │ │ │ │ +829 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +830 void * deviceContext = NULL) { │ │ │ │ │ +831 │ │ │ │ │ +832 (void)instance; // unused │ │ │ │ │ +833 (void)deviceContext; // unused │ │ │ │ │ +834 │ │ │ │ │ +835 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +836 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +837 numPatchCoords, │ │ │ │ │ +838 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +839 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +840 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +841 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +842 } │ │ │ │ │ +843 │ │ │ │ │ +884 template │ │ │ │ │ +_8_8_6 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +887 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +888 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +889 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +890 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +891 int numPatchCoords, │ │ │ │ │ +892 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +893 PATCH_TABLE *patchTable, │ │ │ │ │ +894 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +895 void * deviceContext = NULL) { │ │ │ │ │ +896 │ │ │ │ │ +897 (void)instance; // unused │ │ │ │ │ +898 (void)deviceContext; // unused │ │ │ │ │ +899 │ │ │ │ │ +900 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +901 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +902 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +903 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +904 numPatchCoords, │ │ │ │ │ +905 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +906 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +907 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +908 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +909 } │ │ │ │ │ +910 │ │ │ │ │ +969 template │ │ │ │ │ +_9_7_1 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ +972 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +973 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +974 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +975 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +976 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +977 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +978 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +979 int numPatchCoords, │ │ │ │ │ +980 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +981 PATCH_TABLE *patchTable, │ │ │ │ │ +982 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +983 void * deviceContext = NULL) { │ │ │ │ │ +984 │ │ │ │ │ +985 (void)instance; // unused │ │ │ │ │ +986 (void)deviceContext; // unused │ │ │ │ │ +987 │ │ │ │ │ +988 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +989 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +990 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +991 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +992 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ +993 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ +994 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ +995 numPatchCoords, │ │ │ │ │ +996 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +997 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ +998 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ +999 patchTable->GetPatchParamBuffer()); │ │ │ │ │ +1000 } │ │ │ │ │ +1001 │ │ │ │ │ +1032 template │ │ │ │ │ +_1_0_3_4 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1035 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1036 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1037 int numPatchCoords, │ │ │ │ │ +1038 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1039 PATCH_TABLE *patchTable, │ │ │ │ │ +1040 int fvarChannel, │ │ │ │ │ +1041 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +1042 void * deviceContext = NULL) { │ │ │ │ │ +1043 │ │ │ │ │ +1044 (void)instance; // unused │ │ │ │ │ +1045 (void)deviceContext; // unused │ │ │ │ │ +1046 │ │ │ │ │ +1047 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +1048 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +1049 numPatchCoords, │ │ │ │ │ +1050 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +1051 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1052 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1053 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1054 } │ │ │ │ │ +1055 │ │ │ │ │ +1098 template │ │ │ │ │ +_1_1_0_0 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1101 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1102 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1103 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1104 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1105 int numPatchCoords, │ │ │ │ │ +1106 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1107 PATCH_TABLE *patchTable, │ │ │ │ │ +1108 int fvarChannel, │ │ │ │ │ +1109 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +1110 void * deviceContext = NULL) { │ │ │ │ │ +1111 │ │ │ │ │ +1112 (void)instance; // unused │ │ │ │ │ +1113 (void)deviceContext; // unused │ │ │ │ │ +1114 │ │ │ │ │ +1115 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +1116 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +1117 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +1118 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +1119 numPatchCoords, │ │ │ │ │ +1120 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +1121 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1122 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1123 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1124 } │ │ │ │ │ +1125 │ │ │ │ │ +1186 template │ │ │ │ │ +_1_1_8_8 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ +1189 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ +1190 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +1191 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ +1192 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ +1193 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ +1194 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ +1195 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ +1196 int numPatchCoords, │ │ │ │ │ +1197 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ +1198 PATCH_TABLE *patchTable, │ │ │ │ │ +1199 int fvarChannel, │ │ │ │ │ +1200 _C_p_u_E_v_a_l_u_a_t_o_r const *instance = NULL, │ │ │ │ │ +1201 void * deviceContext = NULL) { │ │ │ │ │ +1202 │ │ │ │ │ +1203 (void)instance; // unused │ │ │ │ │ +1204 (void)deviceContext; // unused │ │ │ │ │ +1205 │ │ │ │ │ +1206 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCpuBuffer(), srcDesc, │ │ │ │ │ +1207 dstBuffer->BindCpuBuffer(), dstDesc, │ │ │ │ │ +1208 duBuffer->BindCpuBuffer(), duDesc, │ │ │ │ │ +1209 dvBuffer->BindCpuBuffer(), dvDesc, │ │ │ │ │ +1210 duuBuffer->BindCpuBuffer(), duuDesc, │ │ │ │ │ +1211 duvBuffer->BindCpuBuffer(), duvDesc, │ │ │ │ │ +1212 dvvBuffer->BindCpuBuffer(), dvvDesc, │ │ │ │ │ +1213 numPatchCoords, │ │ │ │ │ +1214 (const _P_a_t_c_h_C_o_o_r_d*)patchCoords->BindCpuBuffer(), │ │ │ │ │ +1215 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ +1216 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ +1217 patchTable->GetFVarPatchParamBuffer(fvarChannel)); │ │ │ │ │ +1218 } │ │ │ │ │ +1219 │ │ │ │ │ +1225 │ │ │ │ │ +_1_2_2_7 static void _S_y_n_c_h_r_o_n_i_z_e(void * /*deviceContext = NULL*/) { │ │ │ │ │ +1228 // nothing. │ │ │ │ │ +1229 } │ │ │ │ │ +1230}; │ │ │ │ │ +1231 │ │ │ │ │ +1232 │ │ │ │ │ +1233} // end namespace Osd │ │ │ │ │ +1234 │ │ │ │ │ +1235} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +1236using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +1237 │ │ │ │ │ +1238} // end namespace OpenSubdiv │ │ │ │ │ +1239 │ │ │ │ │ +1240 │ │ │ │ │ +1241#endif // OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v │ │ │ │ │ DDeeffiinniittiioonn _l_i_m_i_t_s_._h_:_3_2 │ │ │ │ │ _O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ BufferDescriptor is a struct which describes buffer elements in interleaved │ │ │ │ │ data buffers.... │ │ │ │ │ DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_s_t_r_i_d_e │ │ │ │ │ -int stride │ │ │ │ │ -stride to the next element │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_2 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_R_e_s_e_t │ │ │ │ │ -void Reset() │ │ │ │ │ -Resets the descriptor to default. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_8_1 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor() │ │ │ │ │ -Default Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_4 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -BufferDescriptor(int o, int l, int s) │ │ │ │ │ -Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_6_7 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_l_e_n_g_t_h │ │ │ │ │ -int length │ │ │ │ │ -number or length of the data │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_1_0_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ │ -bool operator!=(BufferDescriptor const &other) const │ │ │ │ │ -True if the descriptors are not identical. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_3 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(BufferDescriptor const &other) const │ │ │ │ │ -True if the descriptors are identical. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_8_6 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d │ │ │ │ │ -bool IsValid() const │ │ │ │ │ -True if the descriptor values are internally consistent. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_7_5 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_L_o_c_a_l_O_f_f_s_e_t │ │ │ │ │ -int GetLocalOffset() const │ │ │ │ │ -Returns the relative offset within a stride. │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_7_0 │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_:_:_o_f_f_s_e_t │ │ │ │ │ -int offset │ │ │ │ │ -offset to desired element data │ │ │ │ │ -DDeeffiinniittiioonn _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h_:_9_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_3_9 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int │ │ │ │ │ +fvarChannel, CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_0_3_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CpuEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_1_0_0 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, int start, int end) │ │ │ │ │ +Static eval stencils function which takes raw CPU pointers for input and │ │ │ │ │ +output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor │ │ │ │ │ +const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, │ │ │ │ │ +DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, │ │ │ │ │ +CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_1_8_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_9_7_1 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ +const float *dvWeights, int start, int end) │ │ │ │ │ +Static eval stencils function with derivatives, which takes raw CPU pointers │ │ │ │ │ +for input and output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ +BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ +float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int │ │ │ │ │ +*offsets, const int *indices, const float *weights, const float *duWeights, │ │ │ │ │ +const float *dvWeights, const float *duuWeights, const float *duvWeights, const │ │ │ │ │ +float *dvvWeights, int start, int end) │ │ │ │ │ +Static eval stencils function with derivatives, which takes raw CPU pointers │ │ │ │ │ +for input and output. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, │ │ │ │ │ +BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, │ │ │ │ │ +float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord │ │ │ │ │ +const *patchCoords, PatchArray const *patchArrays, const int *patchIndexBuffer, │ │ │ │ │ +PatchParam const *patchParamBuffer) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, │ │ │ │ │ +PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_4_5_4 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE │ │ │ │ │ +*patchTable, CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_5_1_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const │ │ │ │ │ +&duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, │ │ │ │ │ +PatchCoord const *patchCoords, PatchArray const *patchArrays, const int │ │ │ │ │ +*patchIndexBuffer, PatchParam const *patchParamBuffer) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const │ │ │ │ │ +&duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER │ │ │ │ │ +*dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, │ │ │ │ │ +const CpuEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_3_0_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, │ │ │ │ │ +float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const │ │ │ │ │ +PatchCoord *patchCoords, const PatchArray *patchArrays, const int │ │ │ │ │ +*patchIndexBuffer, const PatchParam *patchParamBuffer) │ │ │ │ │ +Static limit eval function. It takes an array of PatchCoord and evaluate limit │ │ │ │ │ +values on given PatchT... │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_8_8_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int │ │ │ │ │ +numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, │ │ │ │ │ +CpuEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_8_2_3 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ +static void Synchronize(void *) │ │ │ │ │ +synchronize all asynchronous computation invoked on this device. │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_2_2_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE │ │ │ │ │ +const *stencilTable, const CpuEvaluator *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function. This function has a same signature as │ │ │ │ │ +other device kernels hav... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_7_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, │ │ │ │ │ +DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, │ │ │ │ │ +BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const │ │ │ │ │ +&dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER │ │ │ │ │ +*duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, │ │ │ │ │ +BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ +*patchCoords, PATCH_TABLE *patchTable, CpuEvaluator const *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_6_0_7 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_p_u_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const │ │ │ │ │ +&srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER │ │ │ │ │ +*duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, │ │ │ │ │ +BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const │ │ │ │ │ +CpuEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_E_v_a_l_u_a_t_o_r_._h_:_1_6_8 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_C_o_o_r_d │ │ │ │ │ +Coordinates set on a patch table. │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_4_2 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_6_6 │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_s_._h_:_1_2_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Mon Jun 17 2024 18:57:37 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00902_source.html │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │
82
│ │ │ │
83} // end namespace OPENSUBDIV_VERSION
│ │ │ │
84using namespace OPENSUBDIV_VERSION;
│ │ │ │
85
│ │ │ │
86} // end namespace OpenSubdiv
│ │ │ │
87
│ │ │ │
88#endif // OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H
│ │ │ │ - │ │ │ │ + │ │ │ │
Concrete vertex buffer class for Cuda subdivision.
│ │ │ │ │ │ │ │ │ │ │ │
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
│ │ │ │
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │
static CudaVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00912.html │ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef MeshInterface<GLPatchTable> GLMeshInterface
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 38 of file glMesh.h.

│ │ │ │ +

Definition at line 38 of file glMesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ MeshBitset

│ │ │ │ │ │ │ │
│ │ │ │ @@ -326,15 +326,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef std::bitset<NUM_MESH_BITS> MeshBitset
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 63 of file mesh.h.

│ │ │ │ +

Definition at line 63 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ MTLMeshInterface

│ │ │ │ │ │ │ │
│ │ │ │ @@ -405,15 +405,15 @@ │ │ │ │

MeshEndCapBilinearBasis 
MeshEndCapBSplineBasis 
MeshEndCapGregoryBasis 
MeshEndCapLegacyGregory 
NUM_MESH_BITS 
│ │ │ │ │ │ │ │ -

Definition at line 49 of file mesh.h.

│ │ │ │ +

Definition at line 49 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Function Documentation

│ │ │ │ │ │ │ │

◆ convertToCompatibleStencilTable()

│ │ │ │ │ │ │ │ @@ -438,15 +438,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 141 of file mesh.h.

│ │ │ │ +

Definition at line 141 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -478,15 +478,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 158 of file mesh.h.

│ │ │ │ +

Definition at line 158 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -518,15 +518,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 168 of file mesh.h.

│ │ │ │ +

Definition at line 168 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -558,15 +558,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 148 of file mesh.h.

│ │ │ │ +

Definition at line 148 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ OmpEvalStencils() [1/3]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00917.html │ │ │ │ @@ -97,29 +97,29 @@ │ │ │ │
Limits Struct Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Simple struct with limits related to topology. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <limits.h>

│ │ │ │ +

#include <limits.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static int MaxValence ()
 Returns the maximum allowable valence for a vertex.
 
static int MaxFaceSize ()
 Returns the maximum allowable size for a face (number of vertices)
 
│ │ │ │

Detailed Description

│ │ │ │

Simple struct with limits related to topology.

│ │ │ │ │ │ │ │ -

Definition at line 40 of file limits.h.

│ │ │ │ +

Definition at line 40 of file limits.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ MaxFaceSize()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -138,15 +138,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Returns the maximum allowable size for a face (number of vertices)

│ │ │ │ │ │ │ │ -

Definition at line 46 of file limits.h.

│ │ │ │ +

Definition at line 46 of file limits.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ MaxValence()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -167,20 +167,20 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the maximum allowable valence for a vertex.

│ │ │ │ │ │ │ │ -

Definition at line 42 of file limits.h.

│ │ │ │ +

Definition at line 42 of file limits.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file:
    │ │ │ │ -
  • opensubdiv/bfr/limits.h
  • │ │ │ │ +
  • opensubdiv/bfr/limits.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Simple class defining the 2D parameterization of a face. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <parameterization.h>

│ │ │ │ +

#include <parameterization.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

enum  Type {
│ │ │ │   QUAD │ │ │ │ ,
│ │ │ │   TRI │ │ │ │ @@ -192,15 +192,15 @@ │ │ │ │
 
│ │ │ │

Detailed Description

│ │ │ │

Simple class defining the 2D parameterization of a face.

│ │ │ │

Parameterization is a simple class that provides information about the parameterization of a face in a local (u,v) coordinate system. It is defined by the size of a face (i.e. its number of vertices) and the subdivision scheme that determines its limit surface.

│ │ │ │

As an example of how the subdivision scheme is essential in determining the Parameterization, consider the case of a triangle. A triangle is regular for the Loop scheme and so has a very simple parameterization as a triangular patch. But for the Catmull-Clark scheme, a triangle is an irregular face that must first be subdivided – making its limit surface a piecewise collection of quadrilateral patches.

│ │ │ │ │ │ │ │ -

Definition at line 52 of file parameterization.h.

│ │ │ │ +

Definition at line 52 of file parameterization.h.

│ │ │ │

Member Enumeration Documentation

│ │ │ │ │ │ │ │

◆ Type

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -217,15 +217,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
TRI 

Triangle.

│ │ │ │
QUAD_SUBFACES 

Partitioned into quadrilateral sub-faces.

│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 62 of file parameterization.h.

│ │ │ │ +

Definition at line 62 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Parameterization() [1/3]

│ │ │ │ │ │ │ │ @@ -277,15 +277,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Default construction produces an invalid instance.

│ │ │ │ │ │ │ │ -

Definition at line 84 of file parameterization.h.

│ │ │ │ +

Definition at line 84 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Parameterization() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -371,15 +371,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert (u,v) to a sub-face (return value) and its normalized (u,v) coordinate.

│ │ │ │ │ │ │ │ -

Definition at line 229 of file parameterization.h.

│ │ │ │ +

Definition at line 229 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ConvertCoordToSubFace()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -413,15 +413,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert (u,v) to a sub-face (return value) and its local (u,v) coordinate.

│ │ │ │ │ │ │ │ -

Definition at line 215 of file parameterization.h.

│ │ │ │ +

Definition at line 215 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ConvertNormalizedSubFaceToCoord()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -461,15 +461,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert a sub-face and its normalized (u,v) coordinate to (u,v)

│ │ │ │ │ │ │ │ -

Definition at line 235 of file parameterization.h.

│ │ │ │ +

Definition at line 235 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ConvertSubFaceToCoord()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -509,15 +509,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Convert a sub-face and its local (u,v) coordinate to (u,v)

│ │ │ │ │ │ │ │ -

Definition at line 221 of file parameterization.h.

│ │ │ │ +

Definition at line 221 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetCenterCoord()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -598,15 +598,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the size (number of vertices) of the corresponding face.

│ │ │ │ │ │ │ │ -

Definition at line 101 of file parameterization.h.

│ │ │ │ +

Definition at line 101 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSubFace()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -630,15 +630,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the integer sub-face containing the given (u,v)

│ │ │ │ │ │ │ │ -

Definition at line 202 of file parameterization.h.

│ │ │ │ +

Definition at line 202 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetType()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -659,15 +659,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the type of parameterization assigned.

│ │ │ │ │ │ │ │ -

Definition at line 98 of file parameterization.h.

│ │ │ │ +

Definition at line 98 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexCoord()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -720,15 +720,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns if Parameterization has been partitioned into sub-faces.

│ │ │ │ │ │ │ │ -

Definition at line 196 of file parameterization.h.

│ │ │ │ +

Definition at line 196 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsValid()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -749,15 +749,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns true if correctly initialized.

│ │ │ │ │ │ │ │ -

Definition at line 81 of file parameterization.h.

│ │ │ │ +

Definition at line 81 of file parameterization.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator=()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -780,15 +780,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <refinerSurfaceFactory.h>

│ │ │ │ +

#include <refinerSurfaceFactory.h>

│ │ │ │
│ │ │ │ Inheritance diagram for RefinerSurfaceFactoryBase:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ SurfaceFactory │ │ │ │ @@ -236,15 +236,15 @@ │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh.

│ │ │ │

RefinerSurfaceFactoryBase is an intermediate subclass of SurfaceFactory using Far::TopologyRefiner as the connected mesh representation.

│ │ │ │

The SurfaceFactoryMeshAdapter interface for TopologyRefiner is provided in full, along with some public extensions specific to TopologyRefiner.

│ │ │ │

Additional caching expectations of SurfaceFactory are NOT specified here. These are deferred to subclasses to implement different behaviors of the factory's internal caching. A template for such subclasses is additionally provided – allowing clients desiring a thread-safe cache to simply declare a subclass for a preferred thread-safe type.

│ │ │ │ │ │ │ │ -

Definition at line 58 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 58 of file refinerSurfaceFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ RefinerSurfaceFactoryBase()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -317,15 +317,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Return the instance of the mesh.

│ │ │ │ │ │ │ │ -

Definition at line 79 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 79 of file refinerSurfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetNumFaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -346,15 +346,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of faces.

│ │ │ │ │ │ │ │ -

Definition at line 82 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 82 of file refinerSurfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -375,20 +375,20 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of face-varying channels.

│ │ │ │ │ │ │ │ -

Definition at line 85 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 85 of file refinerSurfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Template for concrete subclasses of RefinerSurfaceFactoryBase. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <refinerSurfaceFactory.h>

│ │ │ │ +

#include <refinerSurfaceFactory.h>

│ │ │ │
│ │ │ │ Inheritance diagram for RefinerSurfaceFactory< CACHE_TYPE >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ RefinerSurfaceFactoryBase │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
CACHE_TYPEA subclass of SurfaceFactoryCache
│ │ │ │ │ │ │ │ │ │ │ │

Note a default template parameter uses the base SurfaceFactoryCache for convenience, but which is not thread-safe.

│ │ │ │ │ │ │ │ -

Definition at line 157 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 157 of file refinerSurfaceFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ RefinerSurfaceFactory()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 159 of file refinerSurfaceFactory.h.

│ │ │ │ +

Definition at line 159 of file refinerSurfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~RefinerSurfaceFactory()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -311,15 +311,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Encapsulates the limit surface for a face of a mesh. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surface.h>

│ │ │ │ +

#include <surface.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  PointDescriptor
 Simple struct defining the size and stride of points in arrays. More...
 
│ │ │ │ @@ -228,15 +228,15 @@ │ │ │ │ │ │ │ │
REALFloating point precision (float or double only)
│ │ │ │ │ │ │ │ │ │ │ │

Instances of Surface are created or initialized by a subclass of the SurfaceFactory. Since existing instances can be re-initialized, they should be tested for validity after such re-initialization.

│ │ │ │

All Surfaces are assigned a Parameterization based on the subdivision scheme and the size of the face, which can then be used for evaluation and tessellation of the surface.

│ │ │ │ │ │ │ │ -

Definition at line 59 of file surface.h.

│ │ │ │ +

Definition at line 59 of file surface.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ Index

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -246,15 +246,15 @@ │ │ │ │ typedef int Index │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Integer type representing a mesh index.

│ │ │ │ │ │ │ │ -

Definition at line 72 of file surface.h.

│ │ │ │ +

Definition at line 72 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Surface() [1/2]

│ │ │ │ │ │ │ │ @@ -531,15 +531,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Clear a previously initialized Surface.

│ │ │ │ │ │ │ │ -

Definition at line 89 of file surface.h.

│ │ │ │ +

Definition at line 89 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ComputePatchPoints()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -581,15 +581,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
patchPointsArray of patch point data to be modified
patchPointDescThe size and stride of patch point data
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 331 of file surface.h.

│ │ │ │ +

Definition at line 331 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Evaluate() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -635,15 +635,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Evaluation of position.

│ │ │ │ │ │ │ │ -

Definition at line 372 of file surface.h.

│ │ │ │ +

Definition at line 372 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Evaluate() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -701,15 +701,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Overload of evaluation for 1st derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 382 of file surface.h.

│ │ │ │ +

Definition at line 382 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Evaluate() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -785,15 +785,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Overload of evaluation for 2nd derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 392 of file surface.h.

│ │ │ │ +

Definition at line 392 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvaluateStencil() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -827,15 +827,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Evaluation of the limit stencil for position.

│ │ │ │ │ │ │ │ -

Definition at line 416 of file surface.h.

│ │ │ │ +

Definition at line 416 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvaluateStencil() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -881,15 +881,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Overload of limit stencil evaluation for 1st derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 423 of file surface.h.

│ │ │ │ +

Definition at line 423 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvaluateStencil() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -953,15 +953,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Overload of limit stencil evaluation for 2nd derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 431 of file surface.h.

│ │ │ │ +

Definition at line 431 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GatherControlPoints()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1067,15 +1067,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the size of the face.

│ │ │ │ │ │ │ │ -

Definition at line 109 of file surface.h.

│ │ │ │ +

Definition at line 109 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumControlPoints()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1098,15 +1098,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of control points affecting the Surface.

│ │ │ │ │ │ │ │ -

Definition at line 137 of file surface.h.

│ │ │ │ +

Definition at line 137 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumPatchPoints()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1150,15 +1150,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the Parameterization.

│ │ │ │ │ │ │ │ -

Definition at line 106 of file surface.h.

│ │ │ │ +

Definition at line 106 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsLinear()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1181,15 +1181,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the Surface is linear.

│ │ │ │ │ │ │ │ -

Definition at line 115 of file surface.h.

│ │ │ │ +

Definition at line 115 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsRegular()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1212,15 +1212,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the Surface is a single regular patch.

│ │ │ │ │ │ │ │ -

Definition at line 112 of file surface.h.

│ │ │ │ +

Definition at line 112 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsValid()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1243,15 +1243,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return true if successfully initialized.

│ │ │ │ │ │ │ │ -

Definition at line 86 of file surface.h.

│ │ │ │ +

Definition at line 86 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator=()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1336,15 +1336,15 @@ │ │ │ │ patchPointsOutput array of patch point data │ │ │ │ patchPointDescThe size and stride of patch point data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

Note that this method requires the mesh data be in a contiguous array. If a large data set is fragmented into blocks or pages, this method cannot be used. The control points will need to be gathered explicitly as the subset of patch points, after which the method to compute the remaining patch points can be used.

│ │ │ │ │ │ │ │ -

Definition at line 345 of file surface.h.

│ │ │ │ +

Definition at line 345 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ SurfaceFactory

│ │ │ │ │ │ │ │ @@ -1363,20 +1363,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 315 of file surface.h.

│ │ │ │ +

Definition at line 315 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • opensubdiv/bfr/surface.h
  • │ │ │ │ +
  • opensubdiv/bfr/surface.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Simple struct defining the size and stride of points in arrays. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surface.h>

│ │ │ │ +

#include <surface.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 PointDescriptor ()
 
 PointDescriptor (int n)
 
int stride
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Bfr::Surface< REAL >::PointDescriptor

Simple struct defining the size and stride of points in arrays.

│ │ │ │ │ │ │ │ -

Definition at line 63 of file surface.h.

│ │ │ │ +

Definition at line 63 of file surface.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PointDescriptor() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 64 of file surface.h.

│ │ │ │ +

Definition at line 64 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PointDescriptor() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file surface.h.

│ │ │ │ +

Definition at line 65 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PointDescriptor() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -217,15 +217,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file surface.h.

│ │ │ │ +

Definition at line 66 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ size

│ │ │ │ │ │ │ │ @@ -236,15 +236,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int size
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file surface.h.

│ │ │ │ +

Definition at line 68 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ stride

│ │ │ │ │ │ │ │
│ │ │ │ @@ -254,20 +254,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int stride
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file surface.h.

│ │ │ │ +

Definition at line 68 of file surface.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file:
    │ │ │ │ -
  • opensubdiv/bfr/surface.h
  • │ │ │ │ +
  • opensubdiv/bfr/surface.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Base class providing initialization of a Surface for each face of a mesh. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surfaceFactory.h>

│ │ │ │ +

#include <surfaceFactory.h>

│ │ │ │
│ │ │ │ Inheritance diagram for SurfaceFactory:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ SurfaceFactoryMeshAdapter │ │ │ │ @@ -245,15 +245,15 @@ │ │ │ │

A subclass of SurfaceFactory is written to support a specific type of connected mesh. The public interface of SurfaceFactory is both inherited by and extended by the subclasses. Expected extensions to the interface include one or more constructors (i.e. given a specific instance of the subclass' mesh type) as well as other methods that may involve the mesh's data types (primvars) in their native form.

│ │ │ │

By inheriting the SurfaceFactoryMeshAdapter interface, SurfaceFactory requires its subclasses to implement the small suite of pure virtual methods to complete the factory's implementation for the subclass' mesh type. These methods provide the base factory with topological information about faces of that mesh – from which it creates instances of Surface defining their limit surface.

│ │ │ │

The SurfaceFactory inherits rather than contains SurfaceFactoryMeshAdapter as instances of SurfaceFactoryMeshAdapter serve no purpose on their own, and the interface between the two is designed with the specific needs of the SurfaceFactory. When customizing a subclass of SurfaceFactory for a particular mesh type, this inheritance also avoids the need to coordinate the subclass of SurfaceFactory with the separate subclass of SurfaceFactoryMeshAdapter.

│ │ │ │

It must be emphasized that a subclass of SurfaceFactory is written to support a specific type of "connected" mesh – not simply a container of data defining a mesh. The SurfaceFactoryMeshAdapter interface describes the complete topological neighborhood around a specific face, and without any connectivity between mesh components (e.g. given a vertex, what are its incident faces?), satisfying these methods will be impossible, or, at best, extremely inefficient.

│ │ │ │

Ultimately a subclass of SurfaceFactory is expected to be a lightweight interface to a connected mesh – lightweight in terms of both time and memory usage. It's construction is expected to be trivial, after which it can quickly and efficiently provide a Surface for one or more faces of a mesh for immediate evaluation. So construction of an instance of a subclass should involve no heavy pre-processing – the greater the overhead of a subclass constructor, the more it violates the intention of the base class as a lightweight interface.

│ │ │ │

Instances of SurfaceFactory are initialized with a set of Options that form part of the state of the factory and remain fixed for its lifetime. Such options are intended to ensure that the instances of Surface that it creates are consistent, as well as to enable/disable or otherwise manage caching for construction efficiency – either internally or between itself and other factories (advanced).

│ │ │ │ │ │ │ │ -

Definition at line 103 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 103 of file surfaceFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~SurfaceFactory()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Construct a Surface for the default face-varying data.

│ │ │ │ │ │ │ │ -

Definition at line 551 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 551 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ CreateFaceVaryingSurface() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -414,15 +414,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Construct a Surface for specified face-varying data.

│ │ │ │ │ │ │ │ -

Definition at line 543 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 543 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ CreateVaryingSurface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -446,15 +446,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Construct a Surface for varying data.

│ │ │ │ │ │ │ │ -

Definition at line 535 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 535 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ CreateVertexSurface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -478,15 +478,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Construct a Surface for vertex data.

│ │ │ │ │ │ │ │ -

Definition at line 527 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 527 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ FaceHasLimitSurface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -549,15 +549,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the set of subdivision options.

│ │ │ │ │ │ │ │ -

Definition at line 173 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 173 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSchemeType()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -578,15 +578,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the subdivision scheme.

│ │ │ │ │ │ │ │ -

Definition at line 170 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 170 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InitFaceVaryingSurface() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -629,15 +629,15 @@ │ │ │ │ faceIndexIndex of face with limit surface of interest │ │ │ │ surfaceSurface to initialize for face-varying data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
True if the face has a limit surface, the default face-varying ID was valid, and its Surface was successfully constructed
│ │ │ │ │ │ │ │ -

Definition at line 500 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 500 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InitFaceVaryingSurface() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -686,15 +686,15 @@ │ │ │ │ surfaceSurface to initialize for face-varying data │ │ │ │ fvarIDIdentifier of a specific set of face-varying data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
True if the face has a limit surface, the given face-varying ID was valid, and its Surface was successfully constructed
│ │ │ │ │ │ │ │ -

Definition at line 494 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 494 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InitSurfaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -766,15 +766,15 @@ │ │ │ │ fvarCountSize of array of face-varying Surfaces (optional) │ │ │ │ varSurfaceSurface to initialize for varying data (optional) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
True if the face has a limit surface, any given face-varying IDs were valid, and all Surfaces were successfully constructed.
│ │ │ │ │ │ │ │ -

Definition at line 507 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 507 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InitVaryingSurface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -816,15 +816,15 @@ │ │ │ │ faceIndexIndex of face with limit surface of interest │ │ │ │ surfaceSurface to initialize for varying data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
True if the face has a limit surface and it was successfully constructed
│ │ │ │ │ │ │ │ -

Definition at line 488 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 488 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InitVertexSurface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -866,15 +866,15 @@ │ │ │ │ faceIndexIndex of face with limit surface of interest │ │ │ │ surfaceSurface to initialize for vertex data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Returns
True if the face has a limit surface and it was successfully constructed
│ │ │ │ │ │ │ │ -

Definition at line 482 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 482 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator=()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -925,15 +925,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Subclass to identify an internal cache for use by base class.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Simple set of options assigned to instances of SurfaceFactory. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surfaceFactory.h>

│ │ │ │ +

#include <surfaceFactory.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Options ()
 
OptionsSetDefaultFVarID (FVarID id)
 Assign the default face-varying ID (none assigned by default)
 
│ │ │ │

Detailed Description

│ │ │ │

Simple set of options assigned to instances of SurfaceFactory.

│ │ │ │

The Options class is a simple container specifying options for the construction of the SurfaceFactory to be applied during its lifetime.

│ │ │ │

These options currently include choices to identify a default face-varying ID, to control caching behavior (on or off, use of external vs internal cache), and to control the accuracy of the resulting limit surface representations.

│ │ │ │ │ │ │ │ -

Definition at line 116 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 116 of file surfaceFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Options()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -164,15 +164,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 118 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 118 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ EnableCaching()

│ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Enable or disable caching (default is true):

│ │ │ │ │ │ │ │ -

Definition at line 457 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 457 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetApproxLevelSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -224,15 +224,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return maximum refinement level for sharp features.

│ │ │ │ │ │ │ │ -

Definition at line 147 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 147 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetApproxLevelSmooth()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -253,15 +253,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return maximum refinement level for smooth features.

│ │ │ │ │ │ │ │ -

Definition at line 142 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 142 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDefaultFVarID()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -282,15 +282,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the default face-varying ID.

│ │ │ │ │ │ │ │ -

Definition at line 125 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 125 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetExternalCache()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -311,15 +311,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return any assigned external cache.

│ │ │ │ │ │ │ │ -

Definition at line 135 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 135 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsCachingEnabled()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if caching is enable.

│ │ │ │ │ │ │ │ -

Definition at line 130 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 130 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetApproxLevelSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -370,15 +370,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Assign maximum refinement level for sharp features.

│ │ │ │ │ │ │ │ -

Definition at line 472 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 472 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetApproxLevelSmooth()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -400,15 +400,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Assign maximum refinement level for smooth features.

│ │ │ │ │ │ │ │ -

Definition at line 467 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 467 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetDefaultFVarID()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -430,15 +430,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Assign the default face-varying ID (none assigned by default)

│ │ │ │ │ │ │ │ -

Definition at line 452 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 452 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetExternalCache()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -460,20 +460,20 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Assign an external cache to override the internal.

│ │ │ │ │ │ │ │ -

Definition at line 462 of file surfaceFactory.h.

│ │ │ │ +

Definition at line 462 of file surfaceFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Container used internally by SurfaceFactory to store reusable information. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surfaceFactoryCache.h>

│ │ │ │ +

#include <surfaceFactoryCache.h>

│ │ │ │
│ │ │ │ Inheritance diagram for SurfaceFactoryCache:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE > │ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Container used internally by SurfaceFactory to store reusable information.

│ │ │ │

SurfaceFactoryCache is a container for storing/caching instances of the internal representation of complex patches used by SurfaceFactory so that they can be quickly identified and retrieved for reuse.

│ │ │ │

It is intended for internal use by SurfaceFactory. Public access is available but limited to construction only – allowing an instance to be reused by assigning it to more than one SurfaceFactory.

│ │ │ │ │ │ │ │ -

Definition at line 59 of file surfaceFactoryCache.h.

│ │ │ │ +

Definition at line 59 of file surfaceFactoryCache.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ SurfaceFactoryCache() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -222,15 +222,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Template for declaring thread-safe subclasses of SurfaceFactoryCache. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surfaceFactoryCache.h>

│ │ │ │ +

#include <surfaceFactoryCache.h>

│ │ │ │
│ │ │ │ Inheritance diagram for SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ SurfaceFactoryCache │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │ MUTEX_TYPEA mutex type with supported lock guards │ │ │ │ READ_LOCK_GUARD_TYPEA scoped lock guard allowing potentially shared access for read operations. │ │ │ │ WRITE_LOCK_GUARD_TYPEA scoped lock guard allowing exclusive access for write operations. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 118 of file surfaceFactoryCache.h.

│ │ │ │ +

Definition at line 118 of file surfaceFactoryCache.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ SurfaceFactoryCacheThreaded()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -164,15 +164,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 120 of file surfaceFactoryCache.h.

│ │ │ │ +

Definition at line 120 of file surfaceFactoryCache.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~SurfaceFactoryCacheThreaded()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Abstract interface adapting SurfaceFactory to a connected mesh representation. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <surfaceFactoryMeshAdapter.h>

│ │ │ │ +

#include <surfaceFactoryMeshAdapter.h>

│ │ │ │
│ │ │ │ Inheritance diagram for SurfaceFactoryMeshAdapter:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ SurfaceFactory │ │ │ │ @@ -171,15 +171,15 @@ │ │ │ │   │ │ │ │ virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular (Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Abstract interface adapting SurfaceFactory to a connected mesh representation.

│ │ │ │ │ │ │ │ -

Definition at line 65 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ +

Definition at line 65 of file surfaceFactoryMeshAdapter.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ FVarID

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Type used to identify and specify face-varying primvars.

│ │ │ │

A face-varying ID is used to specify face-varying primvars for evaluation so that they can be identified by the subclass for the mesh. It can be assigned as either a positive integer ID or pointer, with the subclass determining its interpretation.

│ │ │ │

Often only one face-varying primvar is of interest, so a default can be assigned to the factory to avoid repeated specification.

│ │ │ │ │ │ │ │ -

Definition at line 80 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ +

Definition at line 80 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Index

│ │ │ │ │ │ │ │
│ │ │ │ @@ -207,15 +207,15 @@ │ │ │ │ typedef int Index │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Integer type representing a mesh index.

│ │ │ │ │ │ │ │ -

Definition at line 68 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ +

Definition at line 68 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ getFaceFVarValueIndices()

│ │ │ │ │ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotectedvirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 224 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ +

Definition at line 224 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ getFaceNeighborhoodVertexIndicesIfRegular()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -334,15 +334,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotectedvirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 218 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ +

Definition at line 218 of file surfaceFactoryMeshAdapter.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ getFaceSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -571,15 +571,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Describe the topology of incident faces around a face-vertex.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Applies refinement operations to generic primvar data. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <primvarRefiner.h>

│ │ │ │ +

#include <primvarRefiner.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -159,15 +159,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 PrimvarRefinerReal (TopologyRefiner const &refiner)
 
 ~PrimvarRefinerReal ()
 
void LimitFaceVarying (T const &src, U &dst, int channel=0) const
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::PrimvarRefinerReal< REAL >

Applies refinement operations to generic primvar data.

│ │ │ │ │ │ │ │ -

Definition at line 56 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 56 of file primvarRefiner.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PrimvarRefinerReal()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -187,15 +187,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 59 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 59 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~PrimvarRefinerReal()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -216,15 +216,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 60 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 60 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetTopologyRefiner()

│ │ │ │ │ │ │ │ @@ -246,15 +246,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 62 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 62 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Interpolate()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -305,15 +305,15 @@ │ │ │ │ levelThe refinement level │ │ │ │ srcSource primvar buffer (templating control vertex data) │ │ │ │ dstDestination primvar buffer (templating refined vertex data) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 267 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 267 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InterpolateFaceUniform()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -365,15 +365,15 @@ │ │ │ │ levelThe refinement level │ │ │ │ srcSource primvar buffer │ │ │ │ dstDestination primvar buffer │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 394 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 394 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InterpolateFaceVarying()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -423,15 +423,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Apply face-varying interpolation weights to a primvar buffer associated with a particular face-varying channel.

│ │ │ │

Unlike vertex and varying primvar buffers, there is not a 1-to-1 correspondence between vertices and face-varying values – typically there are more face-varying values than vertices. Each face-varying channel is also independent in how its values relate to the vertices.

│ │ │ │

The destination buffer must allocate an array of data for all the refined values, i.e. at least refiner.GetLevel(level).GetNumFVarValues(channel).

│ │ │ │ │ │ │ │ -

Definition at line 293 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 293 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ InterpolateVarying()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -483,15 +483,15 @@ │ │ │ │ levelThe refinement level │ │ │ │ srcSource primvar buffer (templating control vertex data) │ │ │ │ dstDestination primvar buffer (templating refined vertex data) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 412 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 412 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Limit() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -535,15 +535,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
srcSource primvar buffer (refined data) for last level
dstPosDestination primvar buffer (data at the limit)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 319 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 319 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Limit() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -589,15 +589,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 344 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 344 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ LimitFaceVarying()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -637,20 +637,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 369 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 369 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <primvarRefiner.h>

│ │ │ │ +

#include <primvarRefiner.h>

│ │ │ │
│ │ │ │ Inheritance diagram for PrimvarRefiner:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ PrimvarRefinerReal< float > │ │ │ │ @@ -138,15 +138,15 @@ │ │ │ │ void Limit (T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const │ │ │ │   │ │ │ │ void LimitFaceVarying (T const &src, U &dst, int channel=0) const │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 1265 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 1265 of file primvarRefiner.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PrimvarRefiner()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -164,20 +164,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 1267 of file primvarRefiner.h.

│ │ │ │ +

Definition at line 1267 of file primvarRefiner.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Object used to compute and query ptex face indices. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <ptexIndices.h>

│ │ │ │ +

#include <ptexIndices.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 PtexIndices (TopologyRefiner const &refiner)
 Constructor.
 
 ~PtexIndices ()
 Returns ptex face adjacency information for a given coarse face.
 
│ │ │ │

Detailed Description

│ │ │ │

Object used to compute and query ptex face indices.

│ │ │ │

Given a refiner, constructing a PtexIndices object builds the mapping from coarse faces to ptex ids. Once built, the object can be used to query the mapping.

│ │ │ │ │ │ │ │ -

Definition at line 46 of file ptexIndices.h.

│ │ │ │ +

Definition at line 46 of file ptexIndices.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ PtexIndices()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -262,15 +262,15 @@ │ │ │ │ │ │ │ │

Returns the number of ptex faces in the mesh.

│ │ │ │

Ptex

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A specialized factory for StencilTable. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Options
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │

 Utility function for stencil splicing for local point face-varying stencils.
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTableFactoryReal< REAL >

A specialized factory for StencilTable.

│ │ │ │ │ │ │ │ -

Definition at line 51 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 51 of file stencilTableFactory.h.

│ │ │ │

Member Enumeration Documentation

│ │ │ │ │ │ │ │

◆ Mode

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -164,15 +164,15 @@ │ │ │ │ │ │ │ │ INTERPOLATE_VARYING 

varying primvar stencils

│ │ │ │ │ │ │ │ INTERPOLATE_FACE_VARYING 

face-varying primvar stencils

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 55 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 55 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ AppendLocalPointStencilTable()

│ │ │ │ │ │ │ │ @@ -357,15 +357,15 @@ │ │ │ │ baseStencilTableInput StencilTable for refined vertices │ │ │ │ localPointStencilTableStencilTable for the change of basis patch points. │ │ │ │ factorizeIf factorize is set to true, endcap stencils will be factorized with supporting vertices from baseStencil table so that the endcap points can be computed directly from control vertices. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 148 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 148 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -458,16 +458,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A specialized factory for LimitStencilTable. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -135,15 +135,15 @@ │ │ │ │

│ │ │ │ Classes

struct  LocationArray
 Descriptor for limit surface locations. More...
 
struct  Options
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTableFactoryReal< REAL >

A specialized factory for LimitStencilTable.

│ │ │ │

The LimitStencilTableFactory creates a table of limit stencils. Limit stencils can interpolate any arbitrary location on the limit surface. The stencils will be bilinear if the surface is refined uniformly, and bicubic if feature adaptive isolation is used instead.

│ │ │ │

Surface locations are expressed as a combination of ptex face index and normalized (s,t) patch coordinates. The factory exposes the LocationArray struct as a container for these location descriptors.

│ │ │ │ │ │ │ │ -

Definition at line 209 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 209 of file stencilTableFactory.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ LocationArrayVec

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef std::vector<LocationArray> LocationArrayVec
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 244 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 244 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Enumeration Documentation

│ │ │ │ │ │ │ │

◆ Mode

│ │ │ │ │ │ │ │ @@ -178,15 +178,15 @@ │ │ │ │ │ │ │ │ INTERPOLATE_VARYING 

varying primvar stencils

│ │ │ │ │ │ │ │ INTERPOLATE_FACE_VARYING 

face-varying primvar stencils

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 213 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 213 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ Create()

│ │ │ │ │ │ │ │ @@ -252,16 +252,16 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Vertex stencil descriptor. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for StencilReal< REAL >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ LimitStencilReal< float > │ │ │ │ @@ -160,15 +160,15 @@ │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilReal< REAL >

Vertex stencil descriptor.

│ │ │ │

Allows access and manipulation of a single stencil in a StencilTable.

│ │ │ │ │ │ │ │ -

Definition at line 53 of file stencilTable.h.

│ │ │ │ +

Definition at line 53 of file stencilTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ StencilReal() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Default constructor.

│ │ │ │ │ │ │ │ -

Definition at line 57 of file stencilTable.h.

│ │ │ │ +

Definition at line 57 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilReal() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -245,15 +245,15 @@ │ │ │ │ sizeTable pointer to the size of the stencil │ │ │ │ indicesTable pointer to the vertex indices of the stencil │ │ │ │ weightsTable pointer to the vertex weights of the stencil │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 67 of file stencilTable.h.

│ │ │ │ +

Definition at line 67 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilReal() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -277,15 +277,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Copy constructor.

│ │ │ │ │ │ │ │ -

Definition at line 71 of file stencilTable.h.

│ │ │ │ +

Definition at line 71 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetSize()

│ │ │ │ │ │ │ │ @@ -309,15 +309,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the size of the stencil.

│ │ │ │ │ │ │ │ -

Definition at line 78 of file stencilTable.h.

│ │ │ │ +

Definition at line 78 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetSizePtr()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the size of the stencil as a pointer.

│ │ │ │ │ │ │ │ -

Definition at line 83 of file stencilTable.h.

│ │ │ │ +

Definition at line 83 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexIndices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -371,15 +371,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the control vertices' indices.

│ │ │ │ │ │ │ │ -

Definition at line 88 of file stencilTable.h.

│ │ │ │ +

Definition at line 88 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -402,15 +402,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 93 of file stencilTable.h.

│ │ │ │ +

Definition at line 93 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Next()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -433,15 +433,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Advance to the next stencil in the table.

│ │ │ │ │ │ │ │ -

Definition at line 98 of file stencilTable.h.

│ │ │ │ +

Definition at line 98 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │ @@ -460,15 +460,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 98 of file stencilTable.h.

│ │ │ │ +

Definition at line 98 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ StencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │
│ │ │ │ @@ -486,15 +486,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 98 of file stencilTable.h.

│ │ │ │ +

Definition at line 98 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _indices

│ │ │ │ │ │ │ │ @@ -513,15 +513,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 110 of file stencilTable.h.

│ │ │ │ +

Definition at line 110 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _size

│ │ │ │ │ │ │ │
│ │ │ │ @@ -539,15 +539,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 109 of file stencilTable.h.

│ │ │ │ +

Definition at line 109 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _weights

│ │ │ │ │ │ │ │
│ │ │ │ @@ -565,20 +565,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 111 of file stencilTable.h.

│ │ │ │ +

Definition at line 111 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Vertex stencil class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for Stencil:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ StencilReal< float > │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │   │ │ │ │ float * _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Vertex stencil class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 116 of file stencilTable.h.

│ │ │ │ +

Definition at line 116 of file stencilTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ BaseStencil

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -183,15 +183,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ protected
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 118 of file stencilTable.h.

│ │ │ │ +

Definition at line 118 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Stencil() [1/3]

│ │ │ │ │ │ │ │ @@ -211,15 +211,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 121 of file stencilTable.h.

│ │ │ │ +

Definition at line 121 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Stencil() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -239,15 +239,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 122 of file stencilTable.h.

│ │ │ │ +

Definition at line 122 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Stencil() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -283,20 +283,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 123 of file stencilTable.h.

│ │ │ │ +

Definition at line 123 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Table of subdivision stencils. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for StencilTableReal< REAL >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ LimitStencilTableReal< float > │ │ │ │ @@ -209,15 +209,15 @@ │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTableReal< REAL >

Table of subdivision stencils.

│ │ │ │

Stencils are the most direct method of evaluation of locations on the limit of a surface. Every point of a limit surface can be computed by linearly blending a collection of coarse control vertices.

│ │ │ │

A stencil assigns a series of control vertex indices with a blending weight that corresponds to a unique parametric location of the limit surface. When the control vertices move in space, the limit location can be very efficiently recomputed simply by applying the blending weights to the series of coarse control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 141 of file stencilTable.h.

│ │ │ │ +

Definition at line 141 of file stencilTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ StencilTableReal() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -304,15 +304,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 153 of file stencilTable.h.

│ │ │ │ +

Definition at line 153 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilTableReal() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -333,15 +333,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 255 of file stencilTable.h.

│ │ │ │ +

Definition at line 255 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilTableReal() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -363,15 +363,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 256 of file stencilTable.h.

│ │ │ │ +

Definition at line 256 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ Clear()

│ │ │ │ │ │ │ │ @@ -414,15 +414,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 714 of file stencilTable.h.

│ │ │ │ +

Definition at line 714 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ generateOffsets()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -443,15 +443,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 678 of file stencilTable.h.

│ │ │ │ +

Definition at line 678 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetControlIndices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -474,15 +474,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the indices of the control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 179 of file stencilTable.h.

│ │ │ │ +

Definition at line 179 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumControlVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -505,15 +505,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the number of control vertices indexed in the table.

│ │ │ │ │ │ │ │ -

Definition at line 161 of file stencilTable.h.

│ │ │ │ +

Definition at line 161 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumStencils()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -536,15 +536,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the number of stencils in the table.

│ │ │ │ │ │ │ │ -

Definition at line 156 of file stencilTable.h.

│ │ │ │ +

Definition at line 156 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetOffsets()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -567,15 +567,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the offset to a given stencil (factory may leave empty)

│ │ │ │ │ │ │ │ -

Definition at line 174 of file stencilTable.h.

│ │ │ │ +

Definition at line 174 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSizes()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -598,15 +598,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the number of control vertices of each stencil in the table.

│ │ │ │ │ │ │ │ -

Definition at line 169 of file stencilTable.h.

│ │ │ │ +

Definition at line 169 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetStencil()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -630,15 +630,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns a Stencil at index i in the table.

│ │ │ │ │ │ │ │ -

Definition at line 722 of file stencilTable.h.

│ │ │ │ +

Definition at line 722 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -661,15 +661,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 184 of file stencilTable.h.

│ │ │ │ +

Definition at line 184 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator[]()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -693,15 +693,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the stencil at index i in the table.

│ │ │ │ │ │ │ │ -

Definition at line 734 of file stencilTable.h.

│ │ │ │ +

Definition at line 734 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ reserve()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -733,15 +733,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 698 of file stencilTable.h.

│ │ │ │ +

Definition at line 698 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ resize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -773,15 +773,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 690 of file stencilTable.h.

│ │ │ │ +

Definition at line 690 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ shrinkToFit()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -802,15 +802,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 706 of file stencilTable.h.

│ │ │ │ +

Definition at line 706 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ update() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -862,15 +862,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 650 of file stencilTable.h.

│ │ │ │ +

Definition at line 650 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ update() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -934,15 +934,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 618 of file stencilTable.h.

│ │ │ │ +

Definition at line 618 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateValues() [1/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1000,15 +1000,15 @@ │ │ │ │ dstValuesDestination buffer for the interpolated primvar data │ │ │ │ startIndex of first destination value to update │ │ │ │ endIndex of last destination value to update │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 205 of file stencilTable.h.

│ │ │ │ +

Definition at line 205 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateValues() [2/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1054,15 +1054,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 217 of file stencilTable.h.

│ │ │ │ +

Definition at line 217 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateValues() [3/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1120,15 +1120,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 210 of file stencilTable.h.

│ │ │ │ +

Definition at line 210 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateValues() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1186,15 +1186,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 221 of file stencilTable.h.

│ │ │ │ +

Definition at line 221 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ Far::PatchTableBuilder

│ │ │ │ │ │ │ │ @@ -1213,15 +1213,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 261 of file stencilTable.h.

│ │ │ │ +

Definition at line 261 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ StencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1239,15 +1239,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 256 of file stencilTable.h.

│ │ │ │ +

Definition at line 256 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _indices

│ │ │ │ │ │ │ │ @@ -1266,15 +1266,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 267 of file stencilTable.h.

│ │ │ │ +

Definition at line 267 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _numControlVertices

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1292,15 +1292,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 263 of file stencilTable.h.

│ │ │ │ +

Definition at line 263 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _offsets

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1318,15 +1318,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 266 of file stencilTable.h.

│ │ │ │ +

Definition at line 266 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _sizes

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1344,15 +1344,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 265 of file stencilTable.h.

│ │ │ │ +

Definition at line 265 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _weights

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1370,20 +1370,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 268 of file stencilTable.h.

│ │ │ │ +

Definition at line 268 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stencil table class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for StencilTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ StencilTableReal< float > │ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │   │ │ │ │ std::vector< float > _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Stencil table class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 273 of file stencilTable.h.

│ │ │ │ +

Definition at line 273 of file stencilTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ BaseTable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -230,15 +230,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ protected
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 275 of file stencilTable.h.

│ │ │ │ +

Definition at line 275 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ StencilTable() [1/3]

│ │ │ │ │ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 286 of file stencilTable.h.

│ │ │ │ +

Definition at line 286 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilTable() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 287 of file stencilTable.h.

│ │ │ │ +

Definition at line 287 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilTable() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 288 of file stencilTable.h.

│ │ │ │ +

Definition at line 288 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetStencil()

│ │ │ │ │ │ │ │ @@ -383,15 +383,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 278 of file stencilTable.h.

│ │ │ │ +

Definition at line 278 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator[]()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -411,20 +411,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 281 of file stencilTable.h.

│ │ │ │ +

Definition at line 281 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Limit point stencil descriptor. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for LimitStencilReal< REAL >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ StencilReal< REAL > │ │ │ │ @@ -179,15 +179,15 @@ │ │ │ │ REAL * _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilReal< REAL >

Limit point stencil descriptor.

│ │ │ │ │ │ │ │ -

Definition at line 303 of file stencilTable.h.

│ │ │ │ +

Definition at line 303 of file stencilTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilReal()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -268,15 +268,15 @@ │ │ │ │ duuWeightsTable pointer to the 'uu' derivative weights │ │ │ │ duvWeightsTable pointer to the 'uv' derivative weights │ │ │ │ dvvWeightsTable pointer to the 'vv' derivative weights │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 324 of file stencilTable.h.

│ │ │ │ +

Definition at line 324 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetDuuWeights()

│ │ │ │ │ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the uu derivative weights.

│ │ │ │ │ │ │ │ -

Definition at line 351 of file stencilTable.h.

│ │ │ │ +

Definition at line 351 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -331,15 +331,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the uv derivative weights.

│ │ │ │ │ │ │ │ -

Definition at line 356 of file stencilTable.h.

│ │ │ │ +

Definition at line 356 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -362,15 +362,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the u derivative weights.

│ │ │ │ │ │ │ │ -

Definition at line 341 of file stencilTable.h.

│ │ │ │ +

Definition at line 341 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDvvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -393,15 +393,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the vv derivative weights.

│ │ │ │ │ │ │ │ -

Definition at line 361 of file stencilTable.h.

│ │ │ │ +

Definition at line 361 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -424,15 +424,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the v derivative weights.

│ │ │ │ │ │ │ │ -

Definition at line 346 of file stencilTable.h.

│ │ │ │ +

Definition at line 346 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Next()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -455,15 +455,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Advance to the next stencil in the table.

│ │ │ │ │ │ │ │ -

Definition at line 366 of file stencilTable.h.

│ │ │ │ +

Definition at line 366 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │ @@ -482,15 +482,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 366 of file stencilTable.h.

│ │ │ │ +

Definition at line 366 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ StencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │
│ │ │ │ @@ -508,20 +508,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 366 of file stencilTable.h.

│ │ │ │ +

Definition at line 366 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Limit point stencil class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for LimitStencil:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ LimitStencilReal< float > │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │   │ │ │ │ REAL * _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Limit point stencil class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 392 of file stencilTable.h.

│ │ │ │ +

Definition at line 392 of file stencilTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ BaseStencil

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -204,15 +204,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ protected
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 394 of file stencilTable.h.

│ │ │ │ +

Definition at line 394 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ LimitStencil() [1/2]

│ │ │ │ │ │ │ │ @@ -233,15 +233,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 397 of file stencilTable.h.

│ │ │ │ +

Definition at line 397 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ LimitStencil() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -307,20 +307,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 398 of file stencilTable.h.

│ │ │ │ +

Definition at line 398 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Table of limit subdivision stencils. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for LimitStencilTableReal< REAL >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ StencilTableReal< REAL > │ │ │ │ @@ -257,15 +257,15 @@ │ │ │ │ std::vector< REAL > _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTableReal< REAL >

Table of limit subdivision stencils.

│ │ │ │ │ │ │ │ -

Definition at line 409 of file stencilTable.h.

│ │ │ │ +

Definition at line 409 of file stencilTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilTableReal()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -406,15 +406,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the 'uu' derivative stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 444 of file stencilTable.h.

│ │ │ │ +

Definition at line 444 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -437,15 +437,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the 'uv' derivative stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 449 of file stencilTable.h.

│ │ │ │ +

Definition at line 449 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -468,15 +468,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the 'u' derivative stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 434 of file stencilTable.h.

│ │ │ │ +

Definition at line 434 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDvvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -499,15 +499,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the 'vv' derivative stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 454 of file stencilTable.h.

│ │ │ │ +

Definition at line 454 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDvWeights()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -530,15 +530,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the 'v' derivative stencil interpolation weights.

│ │ │ │ │ │ │ │ -

Definition at line 439 of file stencilTable.h.

│ │ │ │ +

Definition at line 439 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetLimitStencil()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -562,15 +562,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns a LimitStencil at index i in the table.

│ │ │ │ │ │ │ │ -

Definition at line 749 of file stencilTable.h.

│ │ │ │ +

Definition at line 749 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator[]()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -594,15 +594,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the limit stencil at index i in the table.

│ │ │ │ │ │ │ │ -

Definition at line 782 of file stencilTable.h.

│ │ │ │ +

Definition at line 782 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Update2ndDerivs() [1/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -674,15 +674,15 @@ │ │ │ │ vvderivsDestination buffer for the interpolated 'vv' derivative primvar data │ │ │ │ startIndex of first destination derivative to update │ │ │ │ endIndex of last destination derivative to update │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 528 of file stencilTable.h.

│ │ │ │ +

Definition at line 528 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Update2ndDerivs() [2/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -740,15 +740,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 548 of file stencilTable.h.

│ │ │ │ +

Definition at line 548 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Update2ndDerivs() [3/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -818,15 +818,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 538 of file stencilTable.h.

│ │ │ │ +

Definition at line 538 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Update2ndDerivs() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -896,15 +896,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 556 of file stencilTable.h.

│ │ │ │ +

Definition at line 556 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateDerivs() [1/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -969,15 +969,15 @@ │ │ │ │ vderivsDestination buffer for the interpolated 'v' derivative primvar data │ │ │ │ startIndex of first destination derivative to update │ │ │ │ endIndex of last destination derivative to update │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 476 of file stencilTable.h.

│ │ │ │ +

Definition at line 476 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateDerivs() [2/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1029,15 +1029,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 493 of file stencilTable.h.

│ │ │ │ +

Definition at line 493 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateDerivs() [3/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1101,15 +1101,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 484 of file stencilTable.h.

│ │ │ │ +

Definition at line 484 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateDerivs() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1173,15 +1173,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 500 of file stencilTable.h.

│ │ │ │ +

Definition at line 500 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilTableFactoryReal< REAL >

│ │ │ │ │ │ │ │ @@ -1200,20 +1200,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 565 of file stencilTable.h.

│ │ │ │ +

Definition at line 565 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Limit stencil table class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTable.h>

│ │ │ │ +

#include <stencilTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for LimitStencilTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ LimitStencilTableReal< float > │ │ │ │ @@ -257,15 +257,15 @@ │ │ │ │   │ │ │ │ std::vector< REAL > _weights │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Limit stencil table class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 583 of file stencilTable.h.

│ │ │ │ +

Definition at line 583 of file stencilTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ BaseTable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ protected
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 585 of file stencilTable.h.

│ │ │ │ +

Definition at line 585 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ LimitStencilTable()

│ │ │ │ │ │ │ │ @@ -378,15 +378,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 596 of file stencilTable.h.

│ │ │ │ +

Definition at line 596 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetLimitStencil()

│ │ │ │ │ │ │ │ @@ -407,15 +407,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 588 of file stencilTable.h.

│ │ │ │ +

Definition at line 588 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator[]()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -435,20 +435,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 591 of file stencilTable.h.

│ │ │ │ +

Definition at line 591 of file stencilTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
StencilTableFactoryReal< REAL >::Options Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Options ()
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -127,15 +127,15 @@ │ │ │ │

 
unsigned int fvarChannel
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTableFactoryReal< REAL >::Options
│ │ │ │ -

Definition at line 61 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 61 of file stencilTableFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Options()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -154,15 +154,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 63 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 63 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ factorizeIntermediateLevels

│ │ │ │ │ │ │ │ @@ -174,15 +174,15 @@ │ │ │ │ │ │ │ │ unsigned int factorizeIntermediateLevels │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

accumulate stencil weights from control vertices or from the stencils of the previous level

│ │ │ │ │ │ │ │ -

Definition at line 75 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 75 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ fvarChannel

│ │ │ │ │ │ │ │
│ │ │ │ @@ -193,15 +193,15 @@ │ │ │ │ │ │ │ │ unsigned int fvarChannel │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

face-varying channel to use when generating face-varying stencils

│ │ │ │ │ │ │ │ -

Definition at line 79 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 79 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ generateControlVerts

│ │ │ │ │ │ │ │
│ │ │ │ @@ -213,15 +213,15 @@ │ │ │ │ unsigned int generateControlVerts │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

generate stencils for control-vertices

│ │ │ │ │ │ │ │ -

Definition at line 73 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 73 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ generateIntermediateLevels

│ │ │ │ │ │ │ │
│ │ │ │ @@ -233,15 +233,15 @@ │ │ │ │ unsigned int generateIntermediateLevels │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

vertices at all levels or highest only

│ │ │ │ │ │ │ │ -

Definition at line 74 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 74 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ generateOffsets

│ │ │ │ │ │ │ │
│ │ │ │ @@ -253,15 +253,15 @@ │ │ │ │ unsigned int generateOffsets │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

populate optional "_offsets" field

│ │ │ │ │ │ │ │ -

Definition at line 72 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 72 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ interpolationMode

│ │ │ │ │ │ │ │
│ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ unsigned int interpolationMode │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

interpolation mode

│ │ │ │ │ │ │ │ -

Definition at line 71 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 71 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ maxLevel

│ │ │ │ │ │ │ │
│ │ │ │ @@ -293,20 +293,20 @@ │ │ │ │ unsigned int maxLevel │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

generate stencils up to 'maxLevel'

│ │ │ │ │ │ │ │ -

Definition at line 78 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 78 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
LimitStencilTableFactoryReal< REAL >::Options Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Options ()
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │

unsigned int fvarChannel
 face-varying channel to use
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTableFactoryReal< REAL >::Options
│ │ │ │ -

Definition at line 219 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 219 of file stencilTableFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Options()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 221 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 221 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ fvarChannel

│ │ │ │ │ │ │ │ @@ -168,15 +168,15 @@ │ │ │ │ unsigned int fvarChannel │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

face-varying channel to use

│ │ │ │ │ │ │ │ -

Definition at line 229 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 229 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ generate1stDerivatives

│ │ │ │ │ │ │ │
│ │ │ │ @@ -188,15 +188,15 @@ │ │ │ │ unsigned int generate1stDerivatives │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Generate weights for 1st derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 227 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 227 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ generate2ndDerivatives

│ │ │ │ │ │ │ │
│ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │ unsigned int generate2ndDerivatives │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Generate weights for 2nd derivatives.

│ │ │ │ │ │ │ │ -

Definition at line 228 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 228 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ interpolationMode

│ │ │ │ │ │ │ │
│ │ │ │ @@ -228,20 +228,20 @@ │ │ │ │ unsigned int interpolationMode │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

interpolation mode

│ │ │ │ │ │ │ │ -

Definition at line 226 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 226 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Descriptor for limit surface locations. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 LocationArray ()
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -124,15 +124,15 @@ │ │ │ │

 array of v coordinates
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename REAL>
│ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTableFactoryReal< REAL >::LocationArray

Descriptor for limit surface locations.

│ │ │ │ │ │ │ │ -

Definition at line 233 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 233 of file stencilTableFactory.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ LocationArray()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 235 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 235 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ numLocations

│ │ │ │ │ │ │ │ @@ -172,15 +172,15 @@ │ │ │ │ int numLocations │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

number of (u,v) coordinates in the array

│ │ │ │ │ │ │ │ -

Definition at line 238 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 238 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ptexIdx

│ │ │ │ │ │ │ │
│ │ │ │ @@ -192,15 +192,15 @@ │ │ │ │ int ptexIdx │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

ptex face index

│ │ │ │ │ │ │ │ -

Definition at line 237 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 237 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ s

│ │ │ │ │ │ │ │
│ │ │ │ @@ -212,15 +212,15 @@ │ │ │ │ REAL const* s │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

array of u coordinates

│ │ │ │ │ │ │ │ -

Definition at line 240 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 240 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ t

│ │ │ │ │ │ │ │
│ │ │ │ @@ -232,20 +232,20 @@ │ │ │ │ REAL const * t │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

array of v coordinates

│ │ │ │ │ │ │ │ -

Definition at line 241 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 241 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stencil table factory class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │
│ │ │ │ Inheritance diagram for StencilTableFactory:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ StencilTableFactoryReal< float > │ │ │ │ @@ -146,15 +146,15 @@ │ │ │ │ - Public Types inherited from StencilTableFactoryReal< float > │ │ │ │ enum  Mode │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Stencil table factory class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 287 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 287 of file stencilTableFactory.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ AppendLocalPointStencilTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -194,15 +194,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 308 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 308 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ AppendLocalPointStencilTableFaceVarying()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -250,15 +250,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 334 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 334 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ AppendLocalPointStencilTableVarying()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 321 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 321 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -338,15 +338,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 300 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 300 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -376,20 +376,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 293 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 293 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Stencil table factory class wrapping the template for compatibility. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <stencilTableFactory.h>

│ │ │ │ +

#include <stencilTableFactory.h>

│ │ │ │
│ │ │ │ Inheritance diagram for LimitStencilTableFactory:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ LimitStencilTableFactoryReal< float > │ │ │ │ @@ -128,15 +128,15 @@ │ │ │ │   │ │ │ │ typedef std::vector< LocationArray > LocationArrayVec │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │

Stencil table factory class wrapping the template for compatibility.

│ │ │ │ │ │ │ │ -

Definition at line 354 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 354 of file stencilTableFactory.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ Create()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -182,20 +182,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 360 of file stencilTableFactory.h.

│ │ │ │ +

Definition at line 360 of file stencilTableFactory.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A simple reference to raw topology data for use with TopologyRefinerFactory. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <topologyDescriptor.h>

│ │ │ │ +

#include <topologyDescriptor.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  FVarChannel
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -148,15 +148,15 @@ │ │ │ │

FVarChannel const * fvarChannels
 
│ │ │ │

Detailed Description

│ │ │ │

A simple reference to raw topology data for use with TopologyRefinerFactory.

│ │ │ │

TopologyDescriptor is a simple struct containing references to raw topology data used to construct a TopologyRefiner. It is not a requirement but a convenience for use with TopologyRefinerFactory when mesh topology is not available in an existing mesh data structure. It should be functionally complete and simple to use, but for more demanding situations, writing a custom Factory is usually warranted.

│ │ │ │ │ │ │ │ -

Definition at line 49 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 49 of file topologyDescriptor.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ TopologyDescriptor()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Index const* cornerVertexIndices
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 62 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 62 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ cornerWeights

│ │ │ │ │ │ │ │
│ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
float const* cornerWeights
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 63 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 63 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ creaseVertexIndexPairs

│ │ │ │ │ │ │ │
│ │ │ │ @@ -212,15 +212,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Index const* creaseVertexIndexPairs
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 58 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 58 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ creaseWeights

│ │ │ │ │ │ │ │
│ │ │ │ @@ -228,15 +228,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
float const* creaseWeights
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 59 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 59 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ fvarChannels

│ │ │ │ │ │ │ │
│ │ │ │ @@ -244,15 +244,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
FVarChannel const* fvarChannels
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 82 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 82 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ holeIndices

│ │ │ │ │ │ │ │
│ │ │ │ @@ -260,15 +260,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Index const* holeIndices
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 66 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ isLeftHanded

│ │ │ │ │ │ │ │
│ │ │ │ @@ -276,15 +276,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
bool isLeftHanded
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 68 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numCorners

│ │ │ │ │ │ │ │
│ │ │ │ @@ -292,15 +292,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numCorners
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 61 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 61 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numCreases

│ │ │ │ │ │ │ │
│ │ │ │ @@ -308,15 +308,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numCreases
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 57 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 57 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numFaces

│ │ │ │ │ │ │ │
│ │ │ │ @@ -324,15 +324,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numFaces
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 52 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 52 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numFVarChannels

│ │ │ │ │ │ │ │
│ │ │ │ @@ -340,15 +340,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numFVarChannels
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 81 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 81 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numHoles

│ │ │ │ │ │ │ │
│ │ │ │ @@ -356,15 +356,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numHoles
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 65 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numVertices

│ │ │ │ │ │ │ │
│ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numVertices
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 51 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 51 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ numVertsPerFace

│ │ │ │ │ │ │ │
│ │ │ │ @@ -388,15 +388,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int const* numVertsPerFace
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 54 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ vertIndicesPerFace

│ │ │ │ │ │ │ │
│ │ │ │ @@ -404,20 +404,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Index const* vertIndicesPerFace
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 55 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 55 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
TopologyDescriptor::FVarChannel Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <topologyDescriptor.h>

│ │ │ │ +

#include <topologyDescriptor.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 FVarChannel ()
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -111,15 +111,15 @@ │ │ │ │

int numValues
 
Index const * valueIndices
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 73 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 73 of file topologyDescriptor.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ FVarChannel()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -136,15 +136,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 78 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 78 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ numValues

│ │ │ │ │ │ │ │ @@ -153,15 +153,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
int numValues
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 75 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 75 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ valueIndices

│ │ │ │ │ │ │ │
│ │ │ │ @@ -169,20 +169,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Index const* valueIndices
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file topologyDescriptor.h.

│ │ │ │ +

Definition at line 76 of file topologyDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

An interface for accessing data in a specific level of a refined topology hierarchy. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <topologyLevel.h>

│ │ │ │ +

#include <topologyLevel.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

Methods to inspect the overall inventory of components:

All three main component types are indexed locally within each level. For some topological relationships – notably face-vertices, which is often the only relationship of interest – the total number of entries is also made available.

│ │ │ │
int GetNumVertices () const
 ~TopologyLevel ()
 
│ │ │ │

Detailed Description

│ │ │ │

An interface for accessing data in a specific level of a refined topology hierarchy.

│ │ │ │

TopologyLevel provides an interface to data in a specific level of a topology hierarchy. Instances of TopologyLevel are created and owned by a TopologyRefiner, which will return const-references to them. Such references are only valid during the lifetime of the TopologyRefiner that created and returned them, and only for a given refinement, i.e. if the TopologyRefiner is re-refined, any references to TopoologyLevels are invalidated.

│ │ │ │ │ │ │ │ -

Definition at line 49 of file topologyLevel.h.

│ │ │ │ +

Definition at line 49 of file topologyLevel.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ TopologyLevel()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -283,15 +283,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 300 of file topologyLevel.h.

│ │ │ │ +

Definition at line 300 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~TopologyLevel()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 301 of file topologyLevel.h.

│ │ │ │ +

Definition at line 301 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ DoesEdgeFVarTopologyMatch()

│ │ │ │ │ │ │ │ @@ -351,15 +351,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if face-varying topology across the edge only matches.

│ │ │ │ │ │ │ │ -

Definition at line 247 of file topologyLevel.h.

│ │ │ │ +

Definition at line 247 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ DoesFaceFVarTopologyMatch()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -391,15 +391,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if face-varying topology around a face matches.

│ │ │ │ │ │ │ │ -

Definition at line 252 of file topologyLevel.h.

│ │ │ │ +

Definition at line 252 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ DoesVertexFVarTopologyMatch()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -431,15 +431,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if face-varying topology around a vertex matches.

│ │ │ │ │ │ │ │ -

Definition at line 242 of file topologyLevel.h.

│ │ │ │ +

Definition at line 242 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ FindEdge()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -471,15 +471,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Identify the edge matching the given vertex pair.

│ │ │ │ │ │ │ │ -

Definition at line 120 of file topologyLevel.h.

│ │ │ │ +

Definition at line 120 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeChildEdges()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -501,15 +501,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the child edges (in the next level) of a given edge.

│ │ │ │ │ │ │ │ -

Definition at line 268 of file topologyLevel.h.

│ │ │ │ +

Definition at line 268 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeChildVertex()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -531,15 +531,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the child vertex (in the next level) of a given edge.

│ │ │ │ │ │ │ │ -

Definition at line 274 of file topologyLevel.h.

│ │ │ │ +

Definition at line 274 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeFaceLocalIndices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -561,15 +561,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the local indices of an edge with respect to its incident faces.

│ │ │ │ │ │ │ │ -

Definition at line 117 of file topologyLevel.h.

│ │ │ │ +

Definition at line 117 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeFaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -591,15 +591,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the faces incident a given edge.

│ │ │ │ │ │ │ │ -

Definition at line 102 of file topologyLevel.h.

│ │ │ │ +

Definition at line 102 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeSharpness()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -621,15 +621,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the sharpness assigned a given edge.

│ │ │ │ │ │ │ │ -

Definition at line 173 of file topologyLevel.h.

│ │ │ │ +

Definition at line 173 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEdgeVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -651,15 +651,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the vertices incident a given edge.

│ │ │ │ │ │ │ │ -

Definition at line 99 of file topologyLevel.h.

│ │ │ │ +

Definition at line 99 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceChildEdges()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -681,15 +681,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the child edges (in the next level) of a given face.

│ │ │ │ │ │ │ │ -

Definition at line 265 of file topologyLevel.h.

│ │ │ │ +

Definition at line 265 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceChildFaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -711,15 +711,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the child faces (in the next level) of a given face.

│ │ │ │ │ │ │ │ -

Definition at line 262 of file topologyLevel.h.

│ │ │ │ +

Definition at line 262 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceChildVertex()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -741,15 +741,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the child vertex (in the next level) of a given face.

│ │ │ │ │ │ │ │ -

Definition at line 271 of file topologyLevel.h.

│ │ │ │ +

Definition at line 271 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceEdges()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -771,15 +771,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the edges incident a given face.

│ │ │ │ │ │ │ │ -

Definition at line 96 of file topologyLevel.h.

│ │ │ │ +

Definition at line 96 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceFVarValues()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -811,15 +811,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the face-varying values associated with a particular face.

│ │ │ │ │ │ │ │ -

Definition at line 237 of file topologyLevel.h.

│ │ │ │ +

Definition at line 237 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceParentFace()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -841,15 +841,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the parent face (in the previous level) of a given face.

│ │ │ │ │ │ │ │ -

Definition at line 280 of file topologyLevel.h.

│ │ │ │ +

Definition at line 280 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFaceVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -871,15 +871,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the vertices incident a given face.

│ │ │ │ │ │ │ │ -

Definition at line 93 of file topologyLevel.h.

│ │ │ │ +

Definition at line 93 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumEdges()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -900,15 +900,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of edges in this level.

│ │ │ │ │ │ │ │ -

Definition at line 68 of file topologyLevel.h.

│ │ │ │ +

Definition at line 68 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -929,15 +929,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of faces in this level.

│ │ │ │ │ │ │ │ -

Definition at line 65 of file topologyLevel.h.

│ │ │ │ +

Definition at line 65 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFaceVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -958,15 +958,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the total number of face-vertices, i.e. the sum of all vertices for all faces.

│ │ │ │ │ │ │ │ -

Definition at line 71 of file topologyLevel.h.

│ │ │ │ +

Definition at line 71 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -987,15 +987,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of face-varying channels (should be same for all levels)

│ │ │ │ │ │ │ │ -

Definition at line 230 of file topologyLevel.h.

│ │ │ │ +

Definition at line 230 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarValues()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1017,15 +1017,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the total number of face-varying values in a particular channel (the upper bound of a face-varying value index)

│ │ │ │ │ │ │ │ -

Definition at line 234 of file topologyLevel.h.

│ │ │ │ +

Definition at line 234 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1046,15 +1046,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the number of vertices in this level.

│ │ │ │ │ │ │ │ -

Definition at line 62 of file topologyLevel.h.

│ │ │ │ +

Definition at line 62 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexChildVertex()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1076,15 +1076,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the child vertex (in the next level) of a given vertex.

│ │ │ │ │ │ │ │ -

Definition at line 277 of file topologyLevel.h.

│ │ │ │ +

Definition at line 277 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexEdgeLocalIndices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1106,15 +1106,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the local indices of a vertex with respect to its incident edges.

│ │ │ │ │ │ │ │ -

Definition at line 114 of file topologyLevel.h.

│ │ │ │ +

Definition at line 114 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexEdges()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1136,15 +1136,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the edges incident a given vertex.

│ │ │ │ │ │ │ │ -

Definition at line 108 of file topologyLevel.h.

│ │ │ │ +

Definition at line 108 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexFaceLocalIndices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1166,15 +1166,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the local indices of a vertex with respect to its incident faces.

│ │ │ │ │ │ │ │ -

Definition at line 111 of file topologyLevel.h.

│ │ │ │ +

Definition at line 111 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexFaces()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1196,15 +1196,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Access the faces incident a given vertex.

│ │ │ │ │ │ │ │ -

Definition at line 105 of file topologyLevel.h.

│ │ │ │ +

Definition at line 105 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexRule()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1226,15 +1226,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the subdivision rule assigned a given vertex specific to this level.

│ │ │ │ │ │ │ │ -

Definition at line 194 of file topologyLevel.h.

│ │ │ │ +

Definition at line 194 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexSharpness()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1256,15 +1256,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return the sharpness assigned a given vertex.

│ │ │ │ │ │ │ │ -

Definition at line 176 of file topologyLevel.h.

│ │ │ │ +

Definition at line 176 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsEdgeBoundary()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1286,15 +1286,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the edge is a boundary (only one incident face)

│ │ │ │ │ │ │ │ -

Definition at line 134 of file topologyLevel.h.

│ │ │ │ +

Definition at line 134 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsEdgeInfSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1316,15 +1316,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the edge is infinitely-sharp.

│ │ │ │ │ │ │ │ -

Definition at line 179 of file topologyLevel.h.

│ │ │ │ +

Definition at line 179 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsEdgeNonManifold()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1346,15 +1346,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the edge is non-manifold.

│ │ │ │ │ │ │ │ -

Definition at line 128 of file topologyLevel.h.

│ │ │ │ +

Definition at line 128 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsEdgeSemiSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1376,15 +1376,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the edge is semi-sharp.

│ │ │ │ │ │ │ │ -

Definition at line 185 of file topologyLevel.h.

│ │ │ │ +

Definition at line 185 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsFaceHole()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1406,15 +1406,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if a given face has been tagged as a hole.

│ │ │ │ │ │ │ │ -

Definition at line 191 of file topologyLevel.h.

│ │ │ │ +

Definition at line 191 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexBoundary()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1436,15 +1436,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the vertex is on a boundary (at least one incident boundary edge)

│ │ │ │ │ │ │ │ -

Definition at line 137 of file topologyLevel.h.

│ │ │ │ +

Definition at line 137 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexCorner()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1466,15 +1466,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the vertex is a corner (only one incident face)

│ │ │ │ │ │ │ │ -

Definition at line 140 of file topologyLevel.h.

│ │ │ │ +

Definition at line 140 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexInfSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1496,15 +1496,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the vertex is infinitely-sharp.

│ │ │ │ │ │ │ │ -

Definition at line 182 of file topologyLevel.h.

│ │ │ │ +

Definition at line 182 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexNonManifold()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1526,15 +1526,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the vertex is non-manifold.

│ │ │ │ │ │ │ │ -

Definition at line 131 of file topologyLevel.h.

│ │ │ │ +

Definition at line 131 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexSemiSharp()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1556,15 +1556,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Return if the vertex is semi-sharp.

│ │ │ │ │ │ │ │ -

Definition at line 188 of file topologyLevel.h.

│ │ │ │ +

Definition at line 188 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsVertexValenceRegular()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1589,15 +1589,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Return if the valence of the vertex is regular (must be manifold)

│ │ │ │

Note that this test only determines if the valence of the vertex is regular with respect to the assigned subdivision scheme – not if the neighborhood around the vertex is regular. The latter depends on a number of factors including the incident faces of the vertex (they must all be regular) and the presence of sharpness at the vertex itself or its incident edges.

│ │ │ │

The regularity of the valence is a necessary but not a sufficient condition in determining the regularity of the neighborhood. For example, while the valence of an interior vertex may be regular, its neighborhood is not if the vertex was made infinitely sharp. Conversely, a corner vertex is considered regular by its valence but its neighborhood is not if the vertex was not made infinitely sharp.

│ │ │ │

Whether the valence of the vertex is regular is also a property that remains the same for the vertex in all subdivision levels. In contrast, the regularity of the region around the vertex may change as the presence of irregular faces or semi-sharp features is reduced by subdivision.

│ │ │ │ │ │ │ │ -

Definition at line 162 of file topologyLevel.h.

│ │ │ │ +

Definition at line 162 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ PrintTopology()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1617,15 +1617,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 287 of file topologyLevel.h.

│ │ │ │ +

Definition at line 287 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ValidateTopology()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1644,15 +1644,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 286 of file topologyLevel.h.

│ │ │ │ +

Definition at line 286 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Friends And Related Symbol Documentation

│ │ │ │ │ │ │ │

◆ TopologyRefiner

│ │ │ │ │ │ │ │ @@ -1669,20 +1669,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 292 of file topologyLevel.h.

│ │ │ │ +

Definition at line 292 of file topologyLevel.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <bufferDescriptor.h>

│ │ │ │ +

#include <bufferDescriptor.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │

Detailed Description

│ │ │ │

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects.

│ │ │ │

The offset of BufferDescriptor can also be used to express a batching offset if the data buffer is combined across multiple objects together.

│ │ │ │
    │ │ │ │
  • Note that each element has the same data type (float)
  • │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 61 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 61 of file bufferDescriptor.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ BufferDescriptor() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

│ │ │ │ Public Member Functions

 BufferDescriptor ()
 Default Constructor.
 
 BufferDescriptor (int o, int l, int s)
│ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Default Constructor.

│ │ │ │ │ │ │ │ -

Definition at line 64 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 64 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ BufferDescriptor() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -216,15 +216,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constructor.

│ │ │ │ │ │ │ │ -

Definition at line 67 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 67 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetLocalOffset()

│ │ │ │ │ │ │ │ @@ -246,15 +246,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the relative offset within a stride.

│ │ │ │ │ │ │ │ -

Definition at line 70 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 70 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ IsValid()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -275,15 +275,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

True if the descriptor values are internally consistent.

│ │ │ │ │ │ │ │ -

Definition at line 75 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 75 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator!=()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -305,15 +305,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

True if the descriptors are not identical.

│ │ │ │ │ │ │ │ -

Definition at line 93 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 93 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ operator==()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -335,15 +335,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

True if the descriptors are identical.

│ │ │ │ │ │ │ │ -

Definition at line 86 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 86 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Reset()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -364,15 +364,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Resets the descriptor to default.

│ │ │ │ │ │ │ │ -

Definition at line 81 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 81 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ length

│ │ │ │ │ │ │ │ @@ -383,15 +383,15 @@ │ │ │ │ int length │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

number or length of the data

│ │ │ │ │ │ │ │ -

Definition at line 100 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 100 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ offset

│ │ │ │ │ │ │ │
│ │ │ │ @@ -401,15 +401,15 @@ │ │ │ │ int offset │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

offset to desired element data

│ │ │ │ │ │ │ │ -

Definition at line 98 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 98 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ stride

│ │ │ │ │ │ │ │
│ │ │ │ @@ -419,20 +419,20 @@ │ │ │ │ int stride │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

stride to the next element

│ │ │ │ │ │ │ │ -

Definition at line 102 of file bufferDescriptor.h.

│ │ │ │ +

Definition at line 102 of file bufferDescriptor.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Concrete vertex buffer class for OpenCL subdivision. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <clVertexBuffer.h>

│ │ │ │ +

#include <clVertexBuffer.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 ~CLVertexBuffer ()
 Destructor.
 
void UpdateData (const float *src, int startVertex, int numVertices, cl_command_queue clQueue, cl_event *startEvents=NULL, unsigned int numStartEvents=0, cl_event *endEvent=NULL)
bool allocate (cl_context clContext)
 
│ │ │ │

Detailed Description

│ │ │ │

Concrete vertex buffer class for OpenCL subdivision.

│ │ │ │

CLVertexBuffer implements CLVertexBufferInterface. An instance of this buffer class can be passed to CLEvaluator

│ │ │ │ │ │ │ │ -

Definition at line 42 of file clVertexBuffer.h.

│ │ │ │ +

Definition at line 42 of file clVertexBuffer.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~CLVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 49 of file clVertexBuffer.h.

│ │ │ │ +

Definition at line 49 of file clVertexBuffer.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetNumElements()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -508,20 +508,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 63 of file clVertexBuffer.h.

│ │ │ │ +

Definition at line 63 of file clVertexBuffer.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <cpuEvaluator.h>

│ │ │ │ +

#include <cpuEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -170,15 +170,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<typename SRC_BUFFER , typename DST_BUFFER , typename STENCIL_TABLE >
static bool EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const CpuEvaluator *instance=NULL, void *deviceContext=NULL)
 Generic static eval stencils function. This function has a same signature as other device kernels have so that it can be called in the same way from OsdMesh template interface.
 
 
static void Synchronize (void *)
 synchronize all asynchronous computation invoked on this device.
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 39 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 39 of file cpuEvaluator.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ EvalPatches() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -716,15 +716,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch
instancenot used in the cpu evaluator
deviceContextnot used in the cpu evaluator
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 607 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 607 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ EvalPatches() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -842,15 +842,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 517 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 517 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ EvalPatches() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -943,15 +943,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 454 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 454 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1118,15 +1118,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1188 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 1188 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1251,15 +1251,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1100 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 1100 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1356,15 +1356,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1034 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 1034 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1524,15 +1524,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 971 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 971 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1650,15 +1650,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 886 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 886 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1748,15 +1748,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 823 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 823 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2352,15 +2352,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the cpu kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the cpu kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 303 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 303 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2464,15 +2464,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the cpu kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the cpu kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 168 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 168 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2551,15 +2551,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the cpu kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the cpu kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 72 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 72 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2584,20 +2584,20 @@ │ │ │ │
│ │ │ │ │ │ │ │

synchronize all asynchronous computation invoked on this device.

│ │ │ │
│ │ │ │

Other methods

│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 1227 of file cpuEvaluator.h.

│ │ │ │ +

Definition at line 1227 of file cpuEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Concrete vertex buffer class for cpu subdivision and OpenGL drawing. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <cpuGLVertexBuffer.h>

│ │ │ │ +

#include <cpuGLVertexBuffer.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -139,15 +139,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 ~CpuGLVertexBuffer ()
 Destructor.
 
void UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
 
│ │ │ │

Detailed Description

│ │ │ │

Concrete vertex buffer class for cpu subdivision and OpenGL drawing.

│ │ │ │

CpuGLVertexBuffer implements CpuVertexBufferInterface and GLVertexBufferInterface.

│ │ │ │

The buffer interop between Cpu and GL is handled automatically when a client calls BindCpuBuffer and BindVBO methods.

│ │ │ │ │ │ │ │ -

Definition at line 47 of file cpuGLVertexBuffer.h.

│ │ │ │ +

Definition at line 47 of file cpuGLVertexBuffer.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~CpuGLVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -387,15 +387,15 @@ │ │ │ │
│ │ │ │
│ │ │ │

This method is meant to be used in client code in order to provide coarse vertices data to Osd.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Cpu patch table. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <cpuPatchTable.h>

│ │ │ │ +

#include <cpuPatchTable.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -168,15 +168,15 @@ │ │ │ │

│ │ │ │ Public Member Functions

 CpuPatchTable (const Far::PatchTable *patchTable)
 
 ~CpuPatchTable ()
 
│ │ │ │

Detailed Description

│ │ │ │

Cpu patch table.

│ │ │ │

XXX: We can use just Far::PatchTable for typical CpuEval use cases.

│ │ │ │

Currently this class exists because of the template resolution for the CpuEvaluator's generic interface functions (glEvalLimit example uses), and device-specific patch tables such as GLPatchTables internally use as a staging buffer to splice patcharray and interleave sharpnesses.

│ │ │ │

Ideally Far::PatchTables should have the same data representation and accessors so that we don't have to copy data unnecessarily.

│ │ │ │ │ │ │ │ -

Definition at line 59 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 59 of file cpuPatchTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ CpuPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -219,15 +219,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 68 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ Create()

│ │ │ │ │ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 61 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 61 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchArrayBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 109 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 109 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -314,15 +314,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 112 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 112 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchIndexSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 115 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 115 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -370,15 +370,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 118 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 118 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchParamSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -398,15 +398,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 121 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 121 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -425,15 +425,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 106 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 106 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumPatchArrays()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 80 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 80 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchArrayBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 70 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -506,15 +506,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 73 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 73 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -533,15 +533,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 83 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 83 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -560,15 +560,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 76 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -587,15 +587,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 86 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 86 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchArrayBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -614,15 +614,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 90 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 90 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -641,15 +641,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 96 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 96 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexSize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -668,15 +668,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 102 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 102 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _fvarIndexBuffers

│ │ │ │ │ │ │ │ @@ -693,15 +693,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 134 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 134 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarParamBuffers

│ │ │ │ │ │ │ │
│ │ │ │ @@ -717,15 +717,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 135 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 135 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -741,15 +741,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 133 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 133 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _indexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -765,15 +765,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 127 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 127 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -789,15 +789,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 126 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 126 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -813,15 +813,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 128 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 128 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingIndexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -837,15 +837,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 131 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 131 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -861,20 +861,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 130 of file cpuPatchTable.h.

│ │ │ │ +

Definition at line 130 of file cpuPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Concrete vertex buffer class for CPU subdivision. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <cpuVertexBuffer.h>

│ │ │ │ +

#include <cpuVertexBuffer.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 ~CpuVertexBuffer ()
 Destructor.
 
void UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
 Constructor.
 
│ │ │ │

Detailed Description

│ │ │ │

Concrete vertex buffer class for CPU subdivision.

│ │ │ │

CpuVertexBuffer implements the VertexBufferInterface. An instance of this buffer class can be passed to CpuEvaluator

│ │ │ │ │ │ │ │ -

Definition at line 42 of file cpuVertexBuffer.h.

│ │ │ │ +

Definition at line 42 of file cpuVertexBuffer.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~CpuVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -337,15 +337,15 @@ │ │ │ │
│ │ │ │
│ │ │ │

This method is meant to be used in client code in order to provide coarse vertices data to Osd.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

CUDA stencil table. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <cudaEvaluator.h>

│ │ │ │ +

#include <cudaEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 CudaStencilTable (Far::StencilTable const *stencilTable)
 
 CudaStencilTable (Far::LimitStencilTable const *limitStencilTable)
 
 
│ │ │ │

Detailed Description

│ │ │ │

CUDA stencil table.

│ │ │ │

This class is a cuda buffer representation of Far::StencilTable.

│ │ │ │

CudaEvaluator consumes this table to apply stencils

│ │ │ │ │ │ │ │ -

Definition at line 52 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 52 of file cudaEvaluator.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ CudaStencilTable() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 59 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 59 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 54 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -312,15 +312,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 76 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDuvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 77 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 77 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -366,15 +366,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 74 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 74 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -393,15 +393,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 78 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 78 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -420,15 +420,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 75 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 75 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetIndicesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -447,15 +447,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 72 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 72 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumStencils()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -474,15 +474,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 79 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetOffsetsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -501,15 +501,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 71 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSizesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -528,15 +528,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 70 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -555,20 +555,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 73 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 73 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <cudaEvaluator.h>

│ │ │ │ +

#include <cudaEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -169,15 +169,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

template<typename SRC_BUFFER , typename DST_BUFFER , typename STENCIL_TABLE >
static bool EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const void *instance=NULL, void *deviceContext=NULL)
 Generic static compute function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface.
 
 Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
 
static void Synchronize (void *deviceContext=NULL)
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 94 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 94 of file cudaEvaluator.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ EvalPatches() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -715,15 +715,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
patchTableCudaPatchTable or equivalent
instancenot used in the cuda evaluator
deviceContextnot used in the cuda evaluator
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 648 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 648 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ EvalPatches() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -841,15 +841,15 @@ │ │ │ │ patchTableCudaPatchTable or equivalent │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 565 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 565 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ EvalPatches() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -942,15 +942,15 @@ │ │ │ │ patchTableCudaPatchTable or equivalent │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 504 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 504 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1117,15 +1117,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1224 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 1224 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1250,15 +1250,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1136 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 1136 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1355,15 +1355,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1070 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 1070 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1523,15 +1523,15 @@ │ │ │ │ patchTableCudaPatchTable or equivalent │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1007 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 1007 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1649,15 +1649,15 @@ │ │ │ │ patchTableCudaPatchTable or equivalent │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 922 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 922 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1747,15 +1747,15 @@ │ │ │ │ patchTableCudaPatchTable or equivalent │ │ │ │ instancenot used in the cuda evaluator │ │ │ │ deviceContextnot used in the cuda evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 859 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 859 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2351,15 +2351,15 @@ │ │ │ │ stencilTablestencil table to be applied. │ │ │ │ instancenot used in the cuda kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the cuda kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 353 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 353 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2463,15 +2463,15 @@ │ │ │ │ stencilTablestencil table to be applied. │ │ │ │ instancenot used in the cuda kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the cuda kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 218 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 218 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2550,15 +2550,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have Cuda memory interfaces. │ │ │ │ instancenot used in the CudaEvaluator │ │ │ │ deviceContextnot used in the CudaEvaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 126 of file cudaEvaluator.h.

│ │ │ │ +

Definition at line 126 of file cudaEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2584,15 +2584,15 @@ │ │ │ │
│ │ │ │

Other methods

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

CUDA patch table. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <cudaPatchTable.h>

│ │ │ │ +

#include <cudaPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for CudaPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -178,15 +178,15 @@ │ │ │ │ │ │ │ │
 
│ │ │ │

Detailed Description

│ │ │ │

CUDA patch table.

│ │ │ │

This class is a cuda buffer representation of Far::PatchTable.

│ │ │ │

CudaEvaluator consumes this table to evaluate on the patches.

│ │ │ │ │ │ │ │ -

Definition at line 51 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 51 of file cudaPatchTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~CudaPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -315,15 +315,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of Osd::PatchArray buffer.

│ │ │ │ │ │ │ │ -

Definition at line 81 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 81 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetFVarPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -345,15 +345,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of face-varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 86 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 86 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetFVarPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -375,15 +375,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of face-varying param.

│ │ │ │ │ │ │ │ -

Definition at line 91 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 91 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -404,15 +404,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the number of face-varying channels buffers.

│ │ │ │ │ │ │ │ -

Definition at line 78 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 78 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchArrayBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -433,15 +433,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of Osd::PatchArray buffer.

│ │ │ │ │ │ │ │ -

Definition at line 60 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 60 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -462,15 +462,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the patch control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 63 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 63 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -491,15 +491,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of Osd::PatchParam buffer.

│ │ │ │ │ │ │ │ -

Definition at line 66 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 66 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchArrayBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -520,15 +520,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of Osd::PatchArray buffer.

│ │ │ │ │ │ │ │ -

Definition at line 69 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 69 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -549,15 +549,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the cuda memory of the array of varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 73 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 73 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _fvarIndexBuffers

│ │ │ │ │ │ │ │ @@ -574,15 +574,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 108 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 108 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarParamBuffers

│ │ │ │ │ │ │ │
│ │ │ │ @@ -598,15 +598,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 109 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 109 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -622,15 +622,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 107 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 107 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _indexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -646,15 +646,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 101 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 101 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -670,15 +670,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 100 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 100 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -694,15 +694,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 102 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 102 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingIndexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -718,15 +718,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 105 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 105 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -742,20 +742,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 104 of file cudaPatchTable.h.

│ │ │ │ +

Definition at line 104 of file cudaPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

D3D11 stencil table. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <d3d11ComputeEvaluator.h>

│ │ │ │ +

#include <d3d11ComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -130,15 +130,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 D3D11StencilTable (Far::StencilTable const *stencilTable, ID3D11DeviceContext *deviceContext)
 
 ~D3D11StencilTable ()
 
 
│ │ │ │

Detailed Description

│ │ │ │

D3D11 stencil table.

│ │ │ │

This class is a D3D11 Shader Resource View representation of Far::StencilTable.

│ │ │ │

D3D11ComputeEvaluator consumes this table to apply stencils

│ │ │ │ │ │ │ │ -

Definition at line 56 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 56 of file d3d11ComputeEvaluator.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ D3D11StencilTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -214,15 +214,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 59 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 59 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 64 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 64 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetIndicesSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 77 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 77 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumStencils()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -306,15 +306,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 79 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetOffsetsSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -333,15 +333,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 76 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSizesSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -360,15 +360,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 75 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 75 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeightsSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -387,20 +387,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 78 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 78 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D3D11ComputeEvaluator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <d3d11ComputeEvaluator.h>

│ │ │ │ +

#include <d3d11ComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef bool Instantiatable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -136,29 +136,29 @@ │ │ │ │

 
static void Synchronize (ID3D11DeviceContext *deviceContext)
 Wait the dispatched kernel finishes.
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 96 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 96 of file d3d11ComputeEvaluator.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ Instantiatable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef bool Instantiatable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 98 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 98 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ D3D11ComputeEvaluator()

│ │ │ │ │ │ │ │ @@ -519,15 +519,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextID3D11DeviceContext. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 148 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 148 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -584,15 +584,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

Dispatch the DX compute kernel on GPU asynchronously. returns false if the kernel hasn't been compiled yet.

│ │ │ │ │ │ │ │ -

Definition at line 181 of file d3d11ComputeEvaluator.h.

│ │ │ │ +

Definition at line 181 of file d3d11ComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -617,15 +617,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Wait the dispatched kernel finishes.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D3D11LegacyGregoryPatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <d3d11LegacyGregoryPatchTable.h>

│ │ │ │ +

#include <d3d11LegacyGregoryPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for D3D11LegacyGregoryPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Protected Member Functions

 D3D11LegacyGregoryPatchTable ()
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 43 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 43 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~D3D11LegacyGregoryPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -215,15 +215,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 49 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 49 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 74 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 74 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetQuadOffsetsSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -306,15 +306,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 70 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -333,15 +333,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 62 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 62 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexValenceSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -360,15 +360,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 66 of file d3d11LegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -405,15 +405,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D3D11PatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <d3d11PatchTable.h>

│ │ │ │ +

#include <d3d11PatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for D3D11PatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -152,29 +152,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ID3D11Buffer * _patchParamBuffer
 
ID3D11ShaderResourceView * _patchParamBufferSRV
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 49 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 49 of file d3d11PatchTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ VertexBufferBinding

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef ID3D11Buffer* VertexBufferBinding
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 51 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 51 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ D3D11PatchTable()

│ │ │ │ │ │ │ │ @@ -278,15 +278,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 57 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 57 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 65 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -370,15 +370,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the index buffer containing the patch control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 70 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 70 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamSRV()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -399,15 +399,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the SRV containing the patch parameter.

│ │ │ │ │ │ │ │ -

Definition at line 75 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 75 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _indexBuffer

│ │ │ │ │ │ │ │ @@ -424,15 +424,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 86 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 86 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -448,15 +448,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 84 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 84 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -472,15 +472,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 87 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 87 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBufferSRV

│ │ │ │ │ │ │ │
│ │ │ │ @@ -496,20 +496,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 88 of file d3d11PatchTable.h.

│ │ │ │ +

Definition at line 88 of file d3d11PatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

GL stencil table (Shader Storage buffer) │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <glComputeEvaluator.h>

│ │ │ │ +

#include <glComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 GLStencilTableSSBO (Far::StencilTable const *stencilTable)
 
 GLStencilTableSSBO (Far::LimitStencilTable const *limitStencilTable)
 
 
│ │ │ │

Detailed Description

│ │ │ │

GL stencil table (Shader Storage buffer)

│ │ │ │

This class is a GLSL SSBO representation of Far::StencilTable.

│ │ │ │

GLSLComputeKernel consumes this table to apply stencils

│ │ │ │ │ │ │ │ -

Definition at line 51 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 51 of file glComputeEvaluator.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ GLStencilTableSSBO() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 58 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 58 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 53 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 53 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -312,15 +312,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 76 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDuvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 77 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 77 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -366,15 +366,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 74 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 74 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -393,15 +393,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 78 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 78 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -420,15 +420,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 75 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 75 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetIndicesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -447,15 +447,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 72 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 72 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumStencils()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -474,15 +474,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 79 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetOffsetsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -501,15 +501,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 71 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSizesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -528,15 +528,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 70 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -555,20 +555,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 73 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 73 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
GLComputeEvaluator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <glComputeEvaluator.h>

│ │ │ │ +

#include <glComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef bool Instantiatable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -233,29 +233,29 @@ │ │ │ │

 
static void Synchronize (void *deviceContext)
 Wait the dispatched kernel finishes.
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 96 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 96 of file glComputeEvaluator.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ Instantiatable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef bool Instantiatable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 98 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 98 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ GLComputeEvaluator()

│ │ │ │ │ │ │ │ @@ -423,15 +423,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 111 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 111 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 99 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 99 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [1/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -857,15 +857,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1071 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1071 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [4/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1025,15 +1025,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 870 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 870 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [5/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1137,15 +1137,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 997 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 997 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [6/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1263,15 +1263,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 769 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 769 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [7/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1347,15 +1347,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 943 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 943 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [8/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1448,15 +1448,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 691 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 691 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1623,15 +1623,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1903 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1903 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [2/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1784,15 +1784,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 2011 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 2011 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [3/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1917,15 +1917,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1736 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1736 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [4/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2036,15 +2036,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1816 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1816 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2141,15 +2141,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1606 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1606 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2232,15 +2232,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1669 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1669 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2386,15 +2386,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1544 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1544 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [2/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2554,15 +2554,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1439 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1439 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [3/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2666,15 +2666,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1355 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1355 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [4/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2792,15 +2792,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1278 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1278 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2876,15 +2876,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1214 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1214 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2974,15 +2974,15 @@ │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLXFB evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1154 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 1154 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [1/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3447,15 +3447,15 @@ │ │ │ │ dvvBufferOutput buffer 2nd derivative wrt v must have BindVBO() method returning a GL buffer object of destination data │ │ │ │ dvvDescvertex buffer descriptor for the dvvBuffer │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 502 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 502 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [4/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3601,15 +3601,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLSL kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 326 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 326 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [5/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3699,15 +3699,15 @@ │ │ │ │ dvBufferOutput buffer derivative wrt v must have BindVBO() method returning a GL buffer object of destination data │ │ │ │ dvDescvertex buffer descriptor for the dvBuffer │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 434 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 434 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [6/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3811,15 +3811,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLSL kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 236 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 236 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [7/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3881,15 +3881,15 @@ │ │ │ │ dstBufferOutput primvar buffer must have BindVBO() method returning a GL buffer object of destination data │ │ │ │ dstDescvertex buffer descriptor for the output buffer │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 386 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 386 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [8/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3968,15 +3968,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have SSBO interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextnot used in the GLSL kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 168 of file glComputeEvaluator.h.

│ │ │ │ +

Definition at line 168 of file glComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -4001,15 +4001,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Wait the dispatched kernel finishes.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
GLLegacyGregoryPatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <glLegacyGregoryPatchTable.h>

│ │ │ │ +

#include <glLegacyGregoryPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for GLLegacyGregoryPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -131,15 +131,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Protected Member Functions

 GLLegacyGregoryPatchTable ()
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 39 of file glLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 39 of file glLegacyGregoryPatchTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~GLLegacyGregoryPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inline
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 60 of file glLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 60 of file glLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetQuadOffsetsTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -253,15 +253,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 56 of file glLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 56 of file glLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetVertexTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -280,15 +280,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 48 of file glLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 48 of file glLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexValenceTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -307,15 +307,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 52 of file glLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 52 of file glLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -330,15 +330,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
GLPatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <glPatchTable.h>

│ │ │ │ +

#include <glPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for GLPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -201,29 +201,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
std::vector< GLuint > _fvarParamBuffers
 
std::vector< GLuint > _fvarParamTextures
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 45 of file glPatchTable.h.

│ │ │ │ +

Definition at line 45 of file glPatchTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ VertexBufferBinding

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef GLuint VertexBufferBinding
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 47 of file glPatchTable.h.

│ │ │ │ +

Definition at line 47 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~GLPatchTable()

│ │ │ │ │ │ │ │ @@ -351,15 +351,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the patch arrays for face-varying index buffer data.

│ │ │ │ │ │ │ │ -

Definition at line 98 of file glPatchTable.h.

│ │ │ │ +

Definition at line 98 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -381,15 +381,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL index buffer containing face-varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 103 of file glPatchTable.h.

│ │ │ │ +

Definition at line 103 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchIndexTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -411,15 +411,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL texture buffer containing face-varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 108 of file glPatchTable.h.

│ │ │ │ +

Definition at line 108 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -441,15 +441,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL index buffer containing face-varying patch params.

│ │ │ │ │ │ │ │ -

Definition at line 113 of file glPatchTable.h.

│ │ │ │ +

Definition at line 113 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchParamTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -471,15 +471,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL texture buffer containing face-varying patch params.

│ │ │ │ │ │ │ │ -

Definition at line 118 of file glPatchTable.h.

│ │ │ │ +

Definition at line 118 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the number of face-varying channel buffers.

│ │ │ │ │ │ │ │ -

Definition at line 95 of file glPatchTable.h.

│ │ │ │ +

Definition at line 95 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchArrays()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -529,15 +529,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the patch arrays for vertex index buffer data.

│ │ │ │ │ │ │ │ -

Definition at line 55 of file glPatchTable.h.

│ │ │ │ +

Definition at line 55 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -558,15 +558,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL index buffer containing the patch control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 60 of file glPatchTable.h.

│ │ │ │ +

Definition at line 60 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -587,15 +587,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL texture buffer containing the patch control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 70 of file glPatchTable.h.

│ │ │ │ +

Definition at line 70 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -616,15 +616,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL index buffer containing the patch parameter.

│ │ │ │ │ │ │ │ -

Definition at line 65 of file glPatchTable.h.

│ │ │ │ +

Definition at line 65 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -645,15 +645,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL texture buffer containing the patch parameter.

│ │ │ │ │ │ │ │ -

Definition at line 75 of file glPatchTable.h.

│ │ │ │ +

Definition at line 75 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchArrays()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -674,15 +674,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the patch arrays for varying index buffer data.

│ │ │ │ │ │ │ │ -

Definition at line 80 of file glPatchTable.h.

│ │ │ │ +

Definition at line 80 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -703,15 +703,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL index buffer containing the varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 85 of file glPatchTable.h.

│ │ │ │ +

Definition at line 85 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexTextureBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -732,15 +732,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Returns the GL texture buffer containing the varying control vertices.

│ │ │ │ │ │ │ │ -

Definition at line 90 of file glPatchTable.h.

│ │ │ │ +

Definition at line 90 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _fvarIndexBuffers

│ │ │ │ │ │ │ │ @@ -757,15 +757,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 141 of file glPatchTable.h.

│ │ │ │ +

Definition at line 141 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarIndexTextures

│ │ │ │ │ │ │ │
│ │ │ │ @@ -781,15 +781,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 142 of file glPatchTable.h.

│ │ │ │ +

Definition at line 142 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarParamBuffers

│ │ │ │ │ │ │ │
│ │ │ │ @@ -805,15 +805,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 144 of file glPatchTable.h.

│ │ │ │ +

Definition at line 144 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarParamTextures

│ │ │ │ │ │ │ │
│ │ │ │ @@ -829,15 +829,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 145 of file glPatchTable.h.

│ │ │ │ +

Definition at line 145 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -853,15 +853,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 140 of file glPatchTable.h.

│ │ │ │ +

Definition at line 140 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -877,15 +877,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 128 of file glPatchTable.h.

│ │ │ │ +

Definition at line 128 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchIndexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -901,15 +901,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 130 of file glPatchTable.h.

│ │ │ │ +

Definition at line 130 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchIndexTexture

│ │ │ │ │ │ │ │
│ │ │ │ @@ -925,15 +925,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 133 of file glPatchTable.h.

│ │ │ │ +

Definition at line 133 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -949,15 +949,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 131 of file glPatchTable.h.

│ │ │ │ +

Definition at line 131 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamTexture

│ │ │ │ │ │ │ │
│ │ │ │ @@ -973,15 +973,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 134 of file glPatchTable.h.

│ │ │ │ +

Definition at line 134 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingIndexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -997,15 +997,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 137 of file glPatchTable.h.

│ │ │ │ +

Definition at line 137 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingIndexTexture

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1021,15 +1021,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 138 of file glPatchTable.h.

│ │ │ │ +

Definition at line 138 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1045,20 +1045,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 136 of file glPatchTable.h.

│ │ │ │ +

Definition at line 136 of file glPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Provides shader source which can be used by client code. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <glslPatchShaderSource.h>

│ │ │ │ +

#include <glslPatchShaderSource.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static std::string GetPatchBasisShaderSource ()
 Returns shader source which can be used to evaluate position and first and second derivatives on piecewise parametric patches resulting from subdivision refinement.
 
static std::string GetPatchDrawingShaderSource ()
 
static std::string GetTessEvalShaderSource (Far::PatchDescriptor::Type type)
 
│ │ │ │

Detailed Description

│ │ │ │

Provides shader source which can be used by client code.

│ │ │ │ │ │ │ │ -

Definition at line 40 of file glslPatchShaderSource.h.

│ │ │ │ +

Definition at line 40 of file glslPatchShaderSource.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetCommonShaderSource()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -282,15 +282,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <glVertexBuffer.h>

│ │ │ │ +

#include <glVertexBuffer.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -136,15 +136,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 ~GLVertexBuffer ()
 Destructor.
 
void UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
bool allocate ()
 
│ │ │ │

Detailed Description

│ │ │ │

Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.

│ │ │ │

GLVertexBuffer implements GLVertexBufferInterface. An instance of this buffer class can be passed to OsdGLComputeEvaluator.

│ │ │ │ │ │ │ │ -

Definition at line 44 of file glVertexBuffer.h.

│ │ │ │ +

Definition at line 44 of file glVertexBuffer.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~GLVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -366,15 +366,15 @@ │ │ │ │
│ │ │ │
│ │ │ │

This method is meant to be used in client code in order to provide coarse vertices data to Osd.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
MeshInterface< PATCH_TABLE > Class Template Referenceabstract
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mesh.h>

│ │ │ │ +

#include <mesh.h>

│ │ │ │
│ │ │ │ Inheritance diagram for MeshInterface< PATCH_TABLE >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT > │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │   │ │ │ │ static void refineMesh (Far::TopologyRefiner &refiner, int level, MeshBitset bits) │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<class PATCH_TABLE>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Osd::MeshInterface< PATCH_TABLE >
│ │ │ │ -

Definition at line 68 of file mesh.h.

│ │ │ │ +

Definition at line 68 of file mesh.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ PatchTable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -167,15 +167,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef PATCH_TABLE PatchTable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file mesh.h.

│ │ │ │ +

Definition at line 70 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ VertexBufferBinding

│ │ │ │ │ │ │ │
│ │ │ │ @@ -185,15 +185,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef PatchTable::VertexBufferBinding VertexBufferBinding
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file mesh.h.

│ │ │ │ +

Definition at line 71 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ MeshInterface()

│ │ │ │ │ │ │ │ @@ -215,15 +215,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 74 of file mesh.h.

│ │ │ │ +

Definition at line 74 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ ~MeshInterface()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -244,15 +244,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file mesh.h.

│ │ │ │ +

Definition at line 76 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ BindVaryingBuffer()

│ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 101 of file mesh.h.

│ │ │ │ +

Definition at line 101 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ refineMesh() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -546,15 +546,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 117 of file mesh.h.

│ │ │ │ +

Definition at line 117 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -672,15 +672,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implemented in Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • opensubdiv/osd/mesh.h
  • │ │ │ │ +
  • opensubdiv/osd/mesh.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
EvaluatorCacheT< EVALUATOR > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mesh.h>

│ │ │ │ +

#include <mesh.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Entry
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -125,15 +125,15 @@ │ │ │ │

template<typename DEVICE_CONTEXT >
EVALUATOR * GetEvaluator (BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT *deviceContext)
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename EVALUATOR>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Osd::EvaluatorCacheT< EVALUATOR >
│ │ │ │ -

Definition at line 186 of file mesh.h.

│ │ │ │ +

Definition at line 186 of file mesh.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ Evaluators

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef std::vector<Entry> Evaluators
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 225 of file mesh.h.

│ │ │ │ +

Definition at line 225 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~EvaluatorCacheT()

│ │ │ │ │ │ │ │ @@ -171,15 +171,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 188 of file mesh.h.

│ │ │ │ +

Definition at line 188 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetEvaluator() [1/3]

│ │ │ │ │ │ │ │ @@ -250,15 +250,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 255 of file mesh.h.

│ │ │ │ +

Definition at line 255 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEvaluator() [2/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 241 of file mesh.h.

│ │ │ │ +

Definition at line 241 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetEvaluator() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -358,20 +358,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 228 of file mesh.h.

│ │ │ │ +

Definition at line 228 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • opensubdiv/osd/mesh.h
  • │ │ │ │ +
  • opensubdiv/osd/mesh.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
EvaluatorCacheT< EVALUATOR >::Entry Struct Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mesh.h>

│ │ │ │ +

#include <mesh.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -126,15 +126,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 Entry (BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, EVALUATOR *evalArg)
 
 Entry (BufferDescriptor const &srcDescArg, BufferDescriptor const &dstDescArg, BufferDescriptor const &duDescArg, BufferDescriptor const &dvDescArg, BufferDescriptor const &duuDescArg, BufferDescriptor const &duvDescArg, BufferDescriptor const &dvvDescArg, EVALUATOR *evalArg)
 
 
EVALUATOR * evaluator
 
│ │ │ │

Detailed Description

│ │ │ │
template<typename EVALUATOR>
│ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Osd::EvaluatorCacheT< EVALUATOR >::Entry
│ │ │ │ -

Definition at line 196 of file mesh.h.

│ │ │ │ +

Definition at line 196 of file mesh.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Entry() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 197 of file mesh.h.

│ │ │ │ +

Definition at line 197 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Entry() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 207 of file mesh.h.

│ │ │ │ +

Definition at line 207 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ dstDesc

│ │ │ │ │ │ │ │ @@ -277,15 +277,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor dstDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 220 of file mesh.h.

│ │ │ │ +

Definition at line 220 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ duDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -295,15 +295,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor duDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 221 of file mesh.h.

│ │ │ │ +

Definition at line 221 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ duuDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -313,15 +313,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor duuDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 222 of file mesh.h.

│ │ │ │ +

Definition at line 222 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ duvDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -331,15 +331,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor duvDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 222 of file mesh.h.

│ │ │ │ +

Definition at line 222 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ dvDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -349,15 +349,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor dvDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 221 of file mesh.h.

│ │ │ │ +

Definition at line 221 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ dvvDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -367,15 +367,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor dvvDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 222 of file mesh.h.

│ │ │ │ +

Definition at line 222 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ evaluator

│ │ │ │ │ │ │ │
│ │ │ │ @@ -385,15 +385,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
EVALUATOR* evaluator
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 223 of file mesh.h.

│ │ │ │ +

Definition at line 223 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ srcDesc

│ │ │ │ │ │ │ │
│ │ │ │ @@ -403,20 +403,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
BufferDescriptor srcDesc
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 220 of file mesh.h.

│ │ │ │ +

Definition at line 220 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file:
    │ │ │ │ -
  • opensubdiv/osd/mesh.h
  • │ │ │ │ +
  • opensubdiv/osd/mesh.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mesh.h>

│ │ │ │ +

#include <mesh.h>

│ │ │ │
│ │ │ │ Inheritance diagram for Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ MeshInterface< PATCH_TABLE > │ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │   │ │ │ │ static void refineMesh (Far::TopologyRefiner &refiner, int level, MeshBitset bits) │ │ │ │   │ │ │ │ │ │ │ │

Detailed Description

│ │ │ │
template<typename VERTEX_BUFFER, typename STENCIL_TABLE, typename EVALUATOR, typename PATCH_TABLE, typename DEVICE_CONTEXT = void>
│ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Osd::Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >
│ │ │ │ -

Definition at line 418 of file mesh.h.

│ │ │ │ +

Definition at line 418 of file mesh.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ DeviceContext

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -193,15 +193,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef DEVICE_CONTEXT DeviceContext
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 424 of file mesh.h.

│ │ │ │ +

Definition at line 424 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Evaluator

│ │ │ │ │ │ │ │
│ │ │ │ @@ -211,15 +211,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef EVALUATOR Evaluator
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 421 of file mesh.h.

│ │ │ │ +

Definition at line 421 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ EvaluatorCache

│ │ │ │ │ │ │ │
│ │ │ │ @@ -229,15 +229,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef EvaluatorCacheT<Evaluator> EvaluatorCache
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 425 of file mesh.h.

│ │ │ │ +

Definition at line 425 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ PatchTable

│ │ │ │ │ │ │ │
│ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef PATCH_TABLE PatchTable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 423 of file mesh.h.

│ │ │ │ +

Definition at line 423 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ StencilTable

│ │ │ │ │ │ │ │
│ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef STENCIL_TABLE StencilTable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 422 of file mesh.h.

│ │ │ │ +

Definition at line 422 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ VertexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -283,15 +283,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef VERTEX_BUFFER VertexBuffer
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 420 of file mesh.h.

│ │ │ │ +

Definition at line 420 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ VertexBufferBinding

│ │ │ │ │ │ │ │
│ │ │ │ @@ -301,15 +301,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef PatchTable::VertexBufferBinding VertexBufferBinding
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 426 of file mesh.h.

│ │ │ │ +

Definition at line 426 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Mesh()

│ │ │ │ │ │ │ │ @@ -372,15 +372,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 428 of file mesh.h.

│ │ │ │ +

Definition at line 428 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ~Mesh()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -401,15 +401,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 478 of file mesh.h.

│ │ │ │ +

Definition at line 478 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ BindVaryingBuffer()

│ │ │ │ │ │ │ │ @@ -433,15 +433,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 566 of file mesh.h.

│ │ │ │ +

Definition at line 566 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ BindVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -464,15 +464,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 562 of file mesh.h.

│ │ │ │ +

Definition at line 562 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFarPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -495,15 +495,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 554 of file mesh.h.

│ │ │ │ +

Definition at line 554 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetMaxValence()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -526,15 +526,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 560 of file mesh.h.

│ │ │ │ +

Definition at line 560 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumVertices()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -557,15 +557,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 558 of file mesh.h.

│ │ │ │ +

Definition at line 558 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -588,15 +588,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 550 of file mesh.h.

│ │ │ │ +

Definition at line 550 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetTopologyRefiner()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -617,15 +617,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 578 of file mesh.h.

│ │ │ │ +

Definition at line 578 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -646,15 +646,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 574 of file mesh.h.

│ │ │ │ +

Definition at line 574 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -675,15 +675,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 570 of file mesh.h.

│ │ │ │ +

Definition at line 570 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Refine()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -706,15 +706,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 501 of file mesh.h.

│ │ │ │ +

Definition at line 501 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -737,15 +737,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 546 of file mesh.h.

│ │ │ │ +

Definition at line 546 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateVaryingBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -785,15 +785,15 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 495 of file mesh.h.

│ │ │ │ +

Definition at line 495 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -833,20 +833,20 @@ │ │ │ │ inlinevirtual │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Implements MeshInterface< PATCH_TABLE >.

│ │ │ │ │ │ │ │ -

Definition at line 489 of file mesh.h.

│ │ │ │ +

Definition at line 489 of file mesh.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • opensubdiv/osd/mesh.h
  • │ │ │ │ +
  • opensubdiv/osd/mesh.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mtlCommon.h>

│ │ │ │ +

#include <mtlCommon.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Attributes

id< MTLDevice > device = nullptr
 
id< MTLCommandQueue > commandQueue = nullptr
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 40 of file mtlCommon.h.

│ │ │ │ +

Definition at line 40 of file mtlCommon.h.

│ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ commandQueue

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
id<MTLCommandQueue> commandQueue = nullptr
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 43 of file mtlCommon.h.

│ │ │ │ +

Definition at line 43 of file mtlCommon.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ device

│ │ │ │ │ │ │ │
│ │ │ │ @@ -135,20 +135,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
id<MTLDevice> device = nullptr
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 42 of file mtlCommon.h.

│ │ │ │ +

Definition at line 42 of file mtlCommon.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
MTLStencilTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mtlComputeEvaluator.h>

│ │ │ │ +

#include <mtlComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │ │ Static Public Member Functions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

 MTLStencilTable (Far::StencilTable const *stencilTable, MTLContext *context)
 
 MTLStencilTable (Far::LimitStencilTable const *stencilTable, MTLContext *context)
 
template<typename STENCIL_TABLE , typename DEVICE_CONTEXT >
static MTLStencilTableCreate (STENCIL_TABLE *stencilTable, DEVICE_CONTEXT context)
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 50 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 50 of file mtlComputeEvaluator.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ MTLStencilTable() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -246,15 +246,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 54 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 71 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetDuvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -300,15 +300,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 72 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 72 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDuWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -327,15 +327,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 69 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 69 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -354,15 +354,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 73 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 73 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetDvWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -381,15 +381,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 70 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetIndicesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -408,15 +408,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 67 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 67 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumStencils()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 75 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 75 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetOffsetsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -462,15 +462,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 66 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetSizesBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -489,15 +489,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 65 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetWeightsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -516,20 +516,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 68 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
MTLComputeEvaluator Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mtlComputeEvaluator.h>

│ │ │ │ +

#include <mtlComputeEvaluator.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

typedef bool Instantiatable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ @@ -231,29 +231,29 @@ │ │ │ │

 
static void Synchronize (MTLContext *context)
 Wait for the dispatched kernel to finish.
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 91 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 91 of file mtlComputeEvaluator.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ Instantiatable

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef bool Instantiatable
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 94 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 94 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ MTLComputeEvaluator()

│ │ │ │ │ │ │ │ @@ -877,15 +877,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 889 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 889 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [4/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1038,15 +1038,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1104 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1104 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [5/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1164,15 +1164,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 786 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 786 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [6/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1283,15 +1283,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1025 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1025 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [7/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1384,15 +1384,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 705 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 705 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatches() [8/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1475,15 +1475,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 966 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 966 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1650,15 +1650,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1991 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1991 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [2/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1818,15 +1818,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 2106 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 2106 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [3/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1951,15 +1951,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1813 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1813 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [4/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2077,15 +2077,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1900 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1900 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2182,15 +2182,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1672 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1672 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesFaceVarying() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2280,15 +2280,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ fvarChannelface-varying channel │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1742 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1742 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [1/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2448,15 +2448,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1496 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1496 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [2/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2609,15 +2609,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1606 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1606 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [3/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2735,15 +2735,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1325 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1325 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [4/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2854,15 +2854,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1407 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1407 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [5/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2952,15 +2952,15 @@ │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1192 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1192 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalPatchesVarying() [6/6]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3043,15 +3043,15 @@ │ │ │ │ patchCoordsarray of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. │ │ │ │ patchTableMTLPatchTable or equivalent │ │ │ │ deviceContextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 1257 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 1257 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [1/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3544,15 +3544,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 312 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 312 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [4/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3691,15 +3691,15 @@ │ │ │ │ dvvDescvertex buffer descriptor for the dvvBuffer │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 504 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 504 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [5/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3803,15 +3803,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 220 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 220 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [6/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3908,15 +3908,15 @@ │ │ │ │ dvDescvertex buffer descriptor for the dvBuffer │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 430 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 430 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [7/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -3995,15 +3995,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ instancecached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 149 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 149 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ EvalStencils() [8/8]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -4072,15 +4072,15 @@ │ │ │ │ dstDescvertex buffer descriptor for the output buffer │ │ │ │ stencilTablestencil table to be applied. The table must have MTLBuffer interfaces. │ │ │ │ contextused to obtain the MTLDevice object and command queue to obtain command buffers from. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 376 of file mtlComputeEvaluator.h.

│ │ │ │ +

Definition at line 376 of file mtlComputeEvaluator.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ Synchronize()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -4105,15 +4105,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Wait for the dispatched kernel to finish.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
MTLLegacyGregoryPatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mtlLegacyGregoryPatchTable.h>

│ │ │ │ +

#include <mtlLegacyGregoryPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for MTLLegacyGregoryPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -128,15 +128,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
static MTLLegacyGregoryPatchTableCreate (Far::PatchTable const *farPatchTable, DEVICE_CONTEXT context)
 
static MTLLegacyGregoryPatchTableCreate (Far::PatchTable const *farPatchTable, MTLContext *context)
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 41 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 41 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ ~MTLLegacyGregoryPatchTable()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -184,15 +184,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ inlinestatic
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 48 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 48 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -248,15 +248,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 71 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetQuadOffsetsBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -275,15 +275,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 66 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 56 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 56 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVertexValenceBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -329,15 +329,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 61 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ +

Definition at line 61 of file mtlLegacyGregoryPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ UpdateVertexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -374,15 +374,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Provides shader source which can be used by client code. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <mtlPatchShaderSource.h>

│ │ │ │ +

#include <mtlPatchShaderSource.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -129,15 +129,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Static Public Member Functions

static std::string GetPatchBasisShaderSource ()
 Returns shader source which can be used to evaluate position and first and second derivatives on piecewise parametric patches resulting from subdivision refinement.
 
static std::string GetPatchDrawingShaderSource ()
 
static std::string GetDomainShaderSource (Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
 
│ │ │ │

Detailed Description

│ │ │ │

Provides shader source which can be used by client code.

│ │ │ │ │ │ │ │ -

Definition at line 40 of file mtlPatchShaderSource.h.

│ │ │ │ +

Definition at line 40 of file mtlPatchShaderSource.h.

│ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetCommonShaderSource()

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -400,15 +400,15 @@ │ │ │ │ │ │ │ │

Deprecated.

│ │ │ │

These methods are deprecated. Clients should determine the patch type of a face-varying patch by inspecting the face-varying patch array descriptors.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
MTLPatchTable Class Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <mtlPatchTable.h>

│ │ │ │ +

#include <mtlPatchTable.h>

│ │ │ │
│ │ │ │ Inheritance diagram for MTLPatchTable:
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ @@ -170,29 +170,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
std::vector< id< MTLBuffer > > _fvarIndexBuffers
 
std::vector< id< MTLBuffer > > _fvarParamBuffers
 
│ │ │ │

Detailed Description

│ │ │ │
│ │ │ │ -

Definition at line 46 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 46 of file mtlPatchTable.h.

│ │ │ │

Member Typedef Documentation

│ │ │ │ │ │ │ │

◆ VertexBufferBinding

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
typedef id<MTLBuffer> VertexBufferBinding
│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 48 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 48 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ MTLPatchTable()

│ │ │ │ │ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 54 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ Create() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -360,15 +360,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 69 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 69 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ GetFVarPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -388,15 +388,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 70 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -416,15 +416,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 71 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 71 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetNumFVarChannels()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -443,15 +443,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 68 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchArrays()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -470,15 +470,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 61 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 61 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -497,15 +497,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 62 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 62 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetPatchParamBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -524,15 +524,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 63 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 63 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchArrays()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -551,15 +551,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 65 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 65 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVaryingPatchIndexBuffer()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -578,15 +578,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 66 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 66 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Data Documentation

│ │ │ │ │ │ │ │

◆ _fvarIndexBuffers

│ │ │ │ │ │ │ │ @@ -603,15 +603,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 86 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 86 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarParamBuffers

│ │ │ │ │ │ │ │
│ │ │ │ @@ -627,15 +627,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 87 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 87 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _fvarPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -651,15 +651,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 85 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 85 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _indexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -675,15 +675,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 78 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 78 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -699,15 +699,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 76 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 76 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _patchParamBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -723,15 +723,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 79 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingPatchArrays

│ │ │ │ │ │ │ │
│ │ │ │ @@ -747,15 +747,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 81 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 81 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ _varyingPatchIndexBuffer

│ │ │ │ │ │ │ │
│ │ │ │ @@ -771,20 +771,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 83 of file mtlPatchTable.h.

│ │ │ │ +

Definition at line 83 of file mtlPatchTable.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

All supported options applying to subdivision scheme. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <options.h>

│ │ │ │ +

#include <options.h>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Public Types

enum  VtxBoundaryInterpolation {
│ │ │ │   VTX_BOUNDARY_NONE = 0 │ │ │ │ ,
│ │ │ │   VTX_BOUNDARY_EDGE_ONLY │ │ │ │ @@ -175,15 +175,15 @@ │ │ │ │
 
│ │ │ │

Detailed Description

│ │ │ │

All supported options applying to subdivision scheme.

│ │ │ │

The Options class contains all supported options that can be applied to a subdivision scheme to affect the shape of the limit surface. These differ from approximations that may be applied at a higher level, i.e. options to limit the level of feature adaptive subdivision, options to ignore fractional creasing, or creasing entirely, etc. These options define the shape of a particular limit surface, including the "shape" of primitive variable data associated with it.

│ │ │ │

The intent is that these sets of options be defined at a high level and propagated into the lowest-level computation in support of each subdivision scheme. Ideally it remains a set of bit-fields (essentially an int) and so remains light weight and easily passed around by value.

│ │ │ │ │ │ │ │ -

Definition at line 51 of file options.h.

│ │ │ │ +

Definition at line 51 of file options.h.

│ │ │ │

Member Enumeration Documentation

│ │ │ │ │ │ │ │

◆ CreasingMethod

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
Enumerator
CREASE_UNIFORM 

Catmark rule.

│ │ │ │
CREASE_CHAIKIN 

Chaikin rule.

│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 68 of file options.h.

│ │ │ │ +

Definition at line 68 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ FVarLinearInterpolation

│ │ │ │ │ │ │ │
│ │ │ │ @@ -225,15 +225,15 @@ │ │ │ │ │ │ │ │ FVAR_LINEAR_BOUNDARIES 

sharpen all boundaries ("always sharp")

│ │ │ │ │ │ │ │ FVAR_LINEAR_ALL 

bilinear interpolation ("bilinear")

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 60 of file options.h.

│ │ │ │ +

Definition at line 60 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

◆ TriangleSubdivision

│ │ │ │ │ │ │ │
│ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Enumerator
TRI_SUB_CATMARK 

Catmark weights (Catmark scheme only)

│ │ │ │
TRI_SUB_SMOOTH 

"smooth triangle" weights (Catmark scheme only)

│ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 72 of file options.h.

│ │ │ │ +

Definition at line 72 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ VtxBoundaryInterpolation

│ │ │ │ │ │ │ │
│ │ │ │ @@ -271,15 +271,15 @@ │ │ │ │ │ │ │ │ VTX_BOUNDARY_EDGE_ONLY 

all boundary edges sharpened and interpolated

│ │ │ │ │ │ │ │ VTX_BOUNDARY_EDGE_AND_CORNER 

all boundary edges and corner vertices sharpened and interpolated

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

Definition at line 53 of file options.h.

│ │ │ │ +

Definition at line 53 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Constructor & Destructor Documentation

│ │ │ │ │ │ │ │

◆ Options()

│ │ │ │ │ │ │ │ @@ -299,15 +299,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 79 of file options.h.

│ │ │ │ +

Definition at line 79 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Member Function Documentation

│ │ │ │ │ │ │ │

◆ GetCreasingMethod()

│ │ │ │ │ │ │ │ @@ -329,15 +329,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Get edge crease rule.

│ │ │ │ │ │ │ │ -

Definition at line 101 of file options.h.

│ │ │ │ +

Definition at line 101 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetFVarLinearInterpolation()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -358,15 +358,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Get face-varying interpolation rule.

│ │ │ │ │ │ │ │ -

Definition at line 95 of file options.h.

│ │ │ │ +

Definition at line 95 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetTriangleSubdivision()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -387,15 +387,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Get triangle subdivision weights rule (Catmark scheme only !)

│ │ │ │ │ │ │ │ -

Definition at line 107 of file options.h.

│ │ │ │ +

Definition at line 107 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetVtxBoundaryInterpolation()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -416,15 +416,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Get vertex boundary interpolation rule.

│ │ │ │ │ │ │ │ -

Definition at line 89 of file options.h.

│ │ │ │ +

Definition at line 89 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetCreasingMethod()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -446,15 +446,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Set edge crease rule.

│ │ │ │ │ │ │ │ -

Definition at line 104 of file options.h.

│ │ │ │ +

Definition at line 104 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetFVarLinearInterpolation()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -476,15 +476,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Set face-varying interpolation rule.

│ │ │ │ │ │ │ │ -

Definition at line 98 of file options.h.

│ │ │ │ +

Definition at line 98 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetTriangleSubdivision()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -506,15 +506,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Set triangle subdivision weights rule (Catmark scheme only !)

│ │ │ │ │ │ │ │ -

Definition at line 110 of file options.h.

│ │ │ │ +

Definition at line 110 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ SetVtxBoundaryInterpolation()

│ │ │ │ │ │ │ │
│ │ │ │ @@ -536,20 +536,20 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Set vertex boundary interpolation rule.

│ │ │ │ │ │ │ │ -

Definition at line 92 of file options.h.

│ │ │ │ +

Definition at line 92 of file options.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file:
    │ │ │ │ -
  • opensubdiv/sdc/options.h
  • │ │ │ │ +
  • opensubdiv/sdc/options.h
  • │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 223 of file loopScheme.h.

│ │ │ │ +

Definition at line 223 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCornerLimitMask() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -663,15 +663,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 386 of file loopScheme.h.

│ │ │ │ +

Definition at line 386 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCornerMaskForVertex() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -701,15 +701,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 142 of file loopScheme.h.

│ │ │ │ +

Definition at line 142 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCornerMaskForVertex() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -877,15 +877,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 236 of file loopScheme.h.

│ │ │ │ +

Definition at line 236 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCreaseLimitMask() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1073,15 +1073,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 420 of file loopScheme.h.

│ │ │ │ +

Definition at line 420 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCreaseLimitTangentMasks() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1161,15 +1161,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 70 of file loopScheme.h.

│ │ │ │ +

Definition at line 70 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignCreaseMaskForEdge() [2/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1337,15 +1337,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 155 of file loopScheme.h.

│ │ │ │ +

Definition at line 155 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignSmoothLimitMask() [1/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1491,15 +1491,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 273 of file loopScheme.h.

│ │ │ │ +

Definition at line 273 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignSmoothLimitTangentMasks() [1/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1669,15 +1669,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 532 of file loopScheme.h.

│ │ │ │ +

Definition at line 532 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignSmoothMaskForEdge() [1/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1745,15 +1745,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 84 of file loopScheme.h.

│ │ │ │ +

Definition at line 84 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ assignSmoothMaskForEdge() [3/3]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -1901,15 +1901,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 180 of file loopScheme.h.

│ │ │ │ +

Definition at line 180 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ ComputeEdgeVertexMask() [1/2]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2295,15 +2295,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 57 of file loopScheme.h.

│ │ │ │ +

Definition at line 57 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetLocalNeighborhoodSize() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2432,15 +2432,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 51 of file loopScheme.h.

│ │ │ │ +

Definition at line 51 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetRegularFaceSize() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2540,15 +2540,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 54 of file loopScheme.h.

│ │ │ │ +

Definition at line 54 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetRegularVertexValence() [4/4]

│ │ │ │ │ │ │ │
│ │ │ │ @@ -2648,15 +2648,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

Definition at line 48 of file loopScheme.h.

│ │ │ │ +

Definition at line 48 of file loopScheme.h.

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │

◆ GetTopologicalSplitType() [4/4]

│ │ │ │ │ │ │ │
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01486_source.html │ │ │ │ @@ -156,15 +156,15 @@ │ │ │ │
55} // end namespace Far
│ │ │ │
56
│ │ │ │
57} // end namespace OPENSUBDIV_VERSION
│ │ │ │
58using namespace OPENSUBDIV_VERSION;
│ │ │ │
59} // end namespace OpenSubdiv
│ │ │ │
60
│ │ │ │
61#endif /* OPENSUBDIV3_FAR_TYPES_H */
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
Vtr::LocalIndexArray LocalIndexArray
Definition types.h:45
│ │ │ │
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:47
│ │ │ │
Vtr::ConstLocalIndexArray ConstLocalIndexArray
Definition types.h:48
│ │ │ │ │ │ │ │
bool IndexIsValid(Index index)
Definition types.h:50
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01489_source.html │ │ │ │ @@ -260,15 +260,15 @@ │ │ │ │
137} // end namespace OPENSUBDIV_VERSION
│ │ │ │
138using namespace OPENSUBDIV_VERSION;
│ │ │ │
139
│ │ │ │
140} // end namespace OpenSubdiv
│ │ │ │
141
│ │ │ │
142
│ │ │ │
143#endif // OPENSUBDIV3_OSD_TYPES_H
│ │ │ │ - │ │ │ │ + │ │ │ │
std::vector< PatchParam > PatchParamVector
Definition types.h:133
│ │ │ │
std::vector< PatchArray > PatchArrayVector
Definition types.h:132
│ │ │ │ │ │ │ │
Type GetType() const
Returns the type of the patch.
│ │ │ │ │ │ │ │
Handle that can be used as unique patch identifier within PatchTable.
Definition patchTable.h:60
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01492_source.html │ │ │ │ @@ -167,15 +167,15 @@ │ │ │ │
70} // end namespace sdc
│ │ │ │
71
│ │ │ │
72} // end namespace OPENSUBDIV_VERSION
│ │ │ │
73using namespace OPENSUBDIV_VERSION;
│ │ │ │
74} // end namespace OpenSubdiv
│ │ │ │
75
│ │ │ │
76#endif /* OPENSUBDIV3_SDC_TYPES_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
Split
Enumerated type for all face splitting schemes.
Definition types.h:47
│ │ │ │ │ │ │ │
@ SPLIT_TO_QUADS
Used by Catmark and Bilinear.
Definition types.h:48
│ │ │ │
@ SPLIT_HYBRID
Not currently used (potential future extension)
Definition types.h:50
│ │ │ │
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:37
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01495_source.html │ │ │ │ @@ -187,15 +187,15 @@ │ │ │ │
86} // end namespace Vtr
│ │ │ │
87
│ │ │ │
88} // end namespace OPENSUBDIV_VERSION
│ │ │ │
89using namespace OPENSUBDIV_VERSION;
│ │ │ │
90} // end namespace OpenSubdiv
│ │ │ │
91
│ │ │ │
92#endif /* OPENSUBDIV3_VTR_TYPES_H */
│ │ │ │ - │ │ │ │ + │ │ │ │
ConstArray< LocalIndex > ConstLocalIndexArray
Definition types.h:83
│ │ │ │
Array< LocalIndex > LocalIndexArray
Definition types.h:82
│ │ │ │ │ │ │ │
std::vector< Index > IndexVector
Definition types.h:77
│ │ │ │
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ │ │ │ │
bool IndexIsValid(Index index)
Definition types.h:58
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_2483050b711c1829a6434006d0beb10c.html │ │ │ │ @@ -93,91 +93,91 @@ │ │ │ │
│ │ │ │
osd Directory Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 bufferDescriptor.h
 bufferDescriptor.h
 
 clEvaluator.h
 
 clPatchTable.h
 
 clVertexBuffer.h
 clVertexBuffer.h
 
 cpuD3D11VertexBuffer.h
 
 cpuEvaluator.h
 cpuEvaluator.h
 
 cpuGLVertexBuffer.h
 cpuGLVertexBuffer.h
 
 cpuPatchTable.h
 cpuPatchTable.h
 
 cpuVertexBuffer.h
 cpuVertexBuffer.h
 
 cudaEvaluator.h
 cudaEvaluator.h
 
 cudaPatchTable.h
 cudaPatchTable.h
 
 cudaVertexBuffer.h
 
 d3d11ComputeEvaluator.h
 d3d11ComputeEvaluator.h
 
 d3d11LegacyGregoryPatchTable.h
 d3d11LegacyGregoryPatchTable.h
 
 d3d11Mesh.h
 
 d3d11PatchTable.h
 d3d11PatchTable.h
 
 d3d11VertexBuffer.h
 
 glComputeEvaluator.h
 glComputeEvaluator.h
 
 glLegacyGregoryPatchTable.h
 glLegacyGregoryPatchTable.h
 
 glMesh.h
 glMesh.h
 
 glPatchTable.h
 glPatchTable.h
 
 glslPatchShaderSource.h
 glslPatchShaderSource.h
 
 glVertexBuffer.h
 glVertexBuffer.h
 
 glXFBEvaluator.h
 
 hlslPatchShaderSource.h
 
 mesh.h
 mesh.h
 
 mtlCommon.h
 mtlCommon.h
 
 mtlComputeEvaluator.h
 mtlComputeEvaluator.h
 
 mtlLegacyGregoryPatchTable.h
 mtlLegacyGregoryPatchTable.h
 
 mtlMesh.h
 
 mtlPatchShaderSource.h
 mtlPatchShaderSource.h
 
 mtlPatchTable.h
 mtlPatchTable.h
 
 mtlVertexBuffer.h
 
 ompEvaluator.h
 
 ompKernel.h
 
 opencl.h
 
 opengl.h
 
 tbbEvaluator.h
 
 tbbKernel.h
 tbbKernel.h
 
 types.h
 
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_2483050b711c1829a6434006d0beb10c.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,42 +1,42 @@ │ │ │ │ │ var dir_2483050b711c1829a6434006d0beb10c = [ │ │ │ │ │ - ["bufferDescriptor.h", "a00899.html", "a00899"], │ │ │ │ │ + ["bufferDescriptor.h", "a00896.html", "a00896"], │ │ │ │ │ ["clEvaluator.h", "a00803.html", "a00803"], │ │ │ │ │ ["clPatchTable.h", "a00800.html", "a00800"], │ │ │ │ │ - ["clVertexBuffer.h", "a00788.html", "a00788"], │ │ │ │ │ + ["clVertexBuffer.h", "a00794.html", "a00794"], │ │ │ │ │ ["cpuD3D11VertexBuffer.h", "a00845.html", "a00845"], │ │ │ │ │ - ["cpuEvaluator.h", "a00890.html", "a00890"], │ │ │ │ │ - ["cpuGLVertexBuffer.h", "a00863.html", "a00863"], │ │ │ │ │ - ["cpuPatchTable.h", "a00887.html", "a00887"], │ │ │ │ │ - ["cpuVertexBuffer.h", "a00896.html", "a00896"], │ │ │ │ │ - ["cudaEvaluator.h", "a00794.html", "a00794"], │ │ │ │ │ - ["cudaPatchTable.h", "a00791.html", "a00791"], │ │ │ │ │ + ["cpuEvaluator.h", "a00899.html", "a00899"], │ │ │ │ │ + ["cpuGLVertexBuffer.h", "a00869.html", "a00869"], │ │ │ │ │ + ["cpuPatchTable.h", "a00893.html", "a00893"], │ │ │ │ │ + ["cpuVertexBuffer.h", "a00890.html", "a00890"], │ │ │ │ │ + ["cudaEvaluator.h", "a00791.html", "a00791"], │ │ │ │ │ + ["cudaPatchTable.h", "a00788.html", "a00788"], │ │ │ │ │ ["cudaVertexBuffer.h", "a00902.html", "a00902"], │ │ │ │ │ - ["d3d11ComputeEvaluator.h", "a00839.html", "a00839"], │ │ │ │ │ - ["d3d11LegacyGregoryPatchTable.h", "a00836.html", "a00836"], │ │ │ │ │ + ["d3d11ComputeEvaluator.h", "a00842.html", "a00842"], │ │ │ │ │ + ["d3d11LegacyGregoryPatchTable.h", "a00839.html", "a00839"], │ │ │ │ │ ["d3d11Mesh.h", "a00830.html", "a00830"], │ │ │ │ │ - ["d3d11PatchTable.h", "a00842.html", "a00842"], │ │ │ │ │ + ["d3d11PatchTable.h", "a00836.html", "a00836"], │ │ │ │ │ ["d3d11VertexBuffer.h", "a00833.html", "a00833"], │ │ │ │ │ - ["glComputeEvaluator.h", "a00848.html", "a00848"], │ │ │ │ │ - ["glLegacyGregoryPatchTable.h", "a00869.html", "a00869"], │ │ │ │ │ - ["glMesh.h", "a00851.html", "a00851"], │ │ │ │ │ - ["glPatchTable.h", "a00872.html", "a00872"], │ │ │ │ │ - ["glslPatchShaderSource.h", "a00857.html", "a00857"], │ │ │ │ │ - ["glVertexBuffer.h", "a00860.html", "a00860"], │ │ │ │ │ + ["glComputeEvaluator.h", "a00851.html", "a00851"], │ │ │ │ │ + ["glLegacyGregoryPatchTable.h", "a00866.html", "a00866"], │ │ │ │ │ + ["glMesh.h", "a00863.html", "a00863"], │ │ │ │ │ + ["glPatchTable.h", "a00860.html", "a00860"], │ │ │ │ │ + ["glslPatchShaderSource.h", "a00848.html", "a00848"], │ │ │ │ │ + ["glVertexBuffer.h", "a00857.html", "a00857"], │ │ │ │ │ ["glXFBEvaluator.h", "a00854.html", "a00854"], │ │ │ │ │ ["hlslPatchShaderSource.h", "a00827.html", "a00827"], │ │ │ │ │ - ["mesh.h", "a00893.html", "a00893"], │ │ │ │ │ - ["mtlCommon.h", "a00806.html", "a00806"], │ │ │ │ │ - ["mtlComputeEvaluator.h", "a00818.html", "a00818"], │ │ │ │ │ - ["mtlLegacyGregoryPatchTable.h", "a00812.html", "a00812"], │ │ │ │ │ + ["mesh.h", "a00887.html", "a00887"], │ │ │ │ │ + ["mtlCommon.h", "a00809.html", "a00809"], │ │ │ │ │ + ["mtlComputeEvaluator.h", "a00812.html", "a00812"], │ │ │ │ │ + ["mtlLegacyGregoryPatchTable.h", "a00821.html", "a00821"], │ │ │ │ │ ["mtlMesh.h", "a00815.html", "a00815"], │ │ │ │ │ - ["mtlPatchShaderSource.h", "a00809.html", "a00809"], │ │ │ │ │ - ["mtlPatchTable.h", "a00821.html", "a00821"], │ │ │ │ │ + ["mtlPatchShaderSource.h", "a00806.html", "a00806"], │ │ │ │ │ + ["mtlPatchTable.h", "a00818.html", "a00818"], │ │ │ │ │ ["mtlVertexBuffer.h", "a00824.html", "a00824"], │ │ │ │ │ ["ompEvaluator.h", "a00881.html", "a00881"], │ │ │ │ │ ["ompKernel.h", "a00878.html", "a00878"], │ │ │ │ │ ["opencl.h", "a00797.html", null], │ │ │ │ │ ["opengl.h", "a00884.html", null], │ │ │ │ │ ["tbbEvaluator.h", "a00875.html", "a00875"], │ │ │ │ │ - ["tbbKernel.h", "a00866.html", "a00866"], │ │ │ │ │ + ["tbbKernel.h", "a00872.html", "a00872"], │ │ │ │ │ ["types.h", "a01489.html", "a01489"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_7f420b72a822828cfa8b0561c695a5cc.html │ │ │ │ @@ -105,25 +105,25 @@ │ │ │ │   │ │ │ │  patchParam.h │ │ │ │   │ │ │ │  patchTable.h │ │ │ │   │ │ │ │  patchTableFactory.h │ │ │ │   │ │ │ │ - primvarRefiner.h │ │ │ │ + primvarRefiner.h │ │ │ │   │ │ │ │ - ptexIndices.h │ │ │ │ + ptexIndices.h │ │ │ │   │ │ │ │ - stencilTable.h │ │ │ │ + stencilTable.h │ │ │ │   │ │ │ │ - stencilTableFactory.h │ │ │ │ + stencilTableFactory.h │ │ │ │   │ │ │ │ - topologyDescriptor.h │ │ │ │ + topologyDescriptor.h │ │ │ │   │ │ │ │ - topologyLevel.h │ │ │ │ + topologyLevel.h │ │ │ │   │ │ │ │  topologyRefiner.h │ │ │ │   │ │ │ │  topologyRefinerFactory.h │ │ │ │   │ │ │ │  types.h │ │ │ │   │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_7f420b72a822828cfa8b0561c695a5cc.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,17 +1,17 @@ │ │ │ │ │ var dir_7f420b72a822828cfa8b0561c695a5cc = [ │ │ │ │ │ ["error.h", "a00743.html", "a00743"], │ │ │ │ │ ["patchDescriptor.h", "a00740.html", "a00740"], │ │ │ │ │ ["patchMap.h", "a00734.html", "a00734"], │ │ │ │ │ ["patchParam.h", "a00737.html", "a00737"], │ │ │ │ │ ["patchTable.h", "a00731.html", "a00731"], │ │ │ │ │ ["patchTableFactory.h", "a00728.html", "a00728"], │ │ │ │ │ - ["primvarRefiner.h", "a00722.html", "a00722"], │ │ │ │ │ - ["ptexIndices.h", "a00719.html", "a00719"], │ │ │ │ │ - ["stencilTable.h", "a00725.html", "a00725"], │ │ │ │ │ - ["stencilTableFactory.h", "a00713.html", "a00713"], │ │ │ │ │ - ["topologyDescriptor.h", "a00716.html", "a00716"], │ │ │ │ │ - ["topologyLevel.h", "a00707.html", "a00707"], │ │ │ │ │ + ["primvarRefiner.h", "a00725.html", "a00725"], │ │ │ │ │ + ["ptexIndices.h", "a00722.html", "a00722"], │ │ │ │ │ + ["stencilTable.h", "a00719.html", "a00719"], │ │ │ │ │ + ["stencilTableFactory.h", "a00716.html", "a00716"], │ │ │ │ │ + ["topologyDescriptor.h", "a00713.html", "a00713"], │ │ │ │ │ + ["topologyLevel.h", "a00710.html", "a00710"], │ │ │ │ │ ["topologyRefiner.h", "a00701.html", "a00701"], │ │ │ │ │ ["topologyRefinerFactory.h", "a00704.html", "a00704"], │ │ │ │ │ ["types.h", "a01486.html", "a01486"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_bd5473d7d5841d48919aaa9ad0cb1f9b.html │ │ │ │ @@ -95,27 +95,27 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 array.h
 
 componentInterfaces.h
 componentInterfaces.h
 
 fvarLevel.h
 
 fvarRefinement.h
 fvarRefinement.h
 
 level.h
 level.h
 
 refinement.h
 refinement.h
 
 sparseSelector.h
 sparseSelector.h
 
 stackBuffer.h
 stackBuffer.h
 
 types.h
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_bd5473d7d5841d48919aaa9ad0cb1f9b.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ var dir_bd5473d7d5841d48919aaa9ad0cb1f9b = [ │ │ │ │ │ ["array.h", "a00767.html", "a00767"], │ │ │ │ │ - ["componentInterfaces.h", "a00755.html", null], │ │ │ │ │ + ["componentInterfaces.h", "a00764.html", null], │ │ │ │ │ ["fvarLevel.h", "a00761.html", null], │ │ │ │ │ - ["fvarRefinement.h", "a00749.html", null], │ │ │ │ │ - ["level.h", "a00764.html", null], │ │ │ │ │ - ["refinement.h", "a00746.html", null], │ │ │ │ │ - ["sparseSelector.h", "a00758.html", null], │ │ │ │ │ - ["stackBuffer.h", "a00752.html", null], │ │ │ │ │ + ["fvarRefinement.h", "a00758.html", null], │ │ │ │ │ + ["level.h", "a00755.html", null], │ │ │ │ │ + ["refinement.h", "a00752.html", null], │ │ │ │ │ + ["sparseSelector.h", "a00749.html", null], │ │ │ │ │ + ["stackBuffer.h", "a00746.html", null], │ │ │ │ │ ["types.h", "a01495.html", "a01495"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_f61368944c63c2c1f8c69bc232e59c39.html │ │ │ │ @@ -99,17 +99,17 @@ │ │ │ │ Files │ │ │ │  bilinearScheme.h │ │ │ │   │ │ │ │  catmarkScheme.h │ │ │ │   │ │ │ │  crease.h │ │ │ │   │ │ │ │ - loopScheme.h │ │ │ │ + loopScheme.h │ │ │ │   │ │ │ │ - options.h │ │ │ │ + options.h │ │ │ │   │ │ │ │  scheme.h │ │ │ │   │ │ │ │  types.h │ │ │ │   │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_f61368944c63c2c1f8c69bc232e59c39.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ │ var dir_f61368944c63c2c1f8c69bc232e59c39 = [ │ │ │ │ │ ["bilinearScheme.h", "a00785.html", null], │ │ │ │ │ ["catmarkScheme.h", "a00782.html", null], │ │ │ │ │ ["crease.h", "a00779.html", "a00779"], │ │ │ │ │ - ["loopScheme.h", "a00773.html", null], │ │ │ │ │ - ["options.h", "a00776.html", "a00776"], │ │ │ │ │ + ["loopScheme.h", "a00776.html", null], │ │ │ │ │ + ["options.h", "a00773.html", "a00773"], │ │ │ │ │ ["scheme.h", "a00770.html", "a00770"], │ │ │ │ │ ["types.h", "a01492.html", "a01492"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_fa5edef2a780a73fbfb6a11f1af88ceb.html │ │ │ │ @@ -93,27 +93,27 @@ │ │ │ │
│ │ │ │
bfr Directory Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 limits.h
 limits.h
 
 parameterization.h
 parameterization.h
 
 refinerSurfaceFactory.h
 refinerSurfaceFactory.h
 
 surface.h
 surface.h
 
 surfaceFactory.h
 surfaceFactory.h
 
 surfaceFactoryCache.h
 surfaceFactoryCache.h
 
 surfaceFactoryMeshAdapter.h
 surfaceFactoryMeshAdapter.h
 
 tessellation.h
 
 vertexDescriptor.h
 
│ │ │ │
│ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_fa5edef2a780a73fbfb6a11f1af88ceb.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ var dir_fa5edef2a780a73fbfb6a11f1af88ceb = [ │ │ │ │ │ - ["limits.h", "a00698.html", "a00698"], │ │ │ │ │ - ["parameterization.h", "a00695.html", "a00695"], │ │ │ │ │ - ["refinerSurfaceFactory.h", "a00686.html", "a00686"], │ │ │ │ │ - ["surface.h", "a00692.html", "a00692"], │ │ │ │ │ - ["surfaceFactory.h", "a00689.html", "a00689"], │ │ │ │ │ - ["surfaceFactoryCache.h", "a00680.html", "a00680"], │ │ │ │ │ - ["surfaceFactoryMeshAdapter.h", "a00683.html", "a00683"], │ │ │ │ │ + ["limits.h", "a00695.html", "a00695"], │ │ │ │ │ + ["parameterization.h", "a00698.html", "a00698"], │ │ │ │ │ + ["refinerSurfaceFactory.h", "a00692.html", "a00692"], │ │ │ │ │ + ["surface.h", "a00689.html", "a00689"], │ │ │ │ │ + ["surfaceFactory.h", "a00686.html", "a00686"], │ │ │ │ │ + ["surfaceFactoryCache.h", "a00683.html", "a00683"], │ │ │ │ │ + ["surfaceFactoryMeshAdapter.h", "a00680.html", "a00680"], │ │ │ │ │ ["tessellation.h", "a00677.html", "a00677"], │ │ │ │ │ ["vertexDescriptor.h", "a00674.html", "a00674"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/files.html │ │ │ │ @@ -94,97 +94,97 @@ │ │ │ │
File List
│ │ │ │ │ │ │ │
│ │ │ │
Here is a list of all files with brief descriptions:
│ │ │ │
[detail level 123]
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │
  opensubdiv
  bfr
 limits.h
 parameterization.h
 refinerSurfaceFactory.h
 surface.h
 surfaceFactory.h
 surfaceFactoryCache.h
 surfaceFactoryMeshAdapter.h
 limits.h
 parameterization.h
 refinerSurfaceFactory.h
 surface.h
 surfaceFactory.h
 surfaceFactoryCache.h
 surfaceFactoryMeshAdapter.h
 tessellation.h
 vertexDescriptor.h
  far
 error.h
 patchDescriptor.h
 patchMap.h
 patchParam.h
 patchTable.h
 patchTableFactory.h
 primvarRefiner.h
 ptexIndices.h
 stencilTable.h
 stencilTableFactory.h
 topologyDescriptor.h
 topologyLevel.h
 primvarRefiner.h
 ptexIndices.h
 stencilTable.h
 stencilTableFactory.h
 topologyDescriptor.h
 topologyLevel.h
 topologyRefiner.h
 topologyRefinerFactory.h
 types.h
  osd
 bufferDescriptor.h
 bufferDescriptor.h
 clEvaluator.h
 clPatchTable.h
 clVertexBuffer.h
 clVertexBuffer.h
 cpuD3D11VertexBuffer.h
 cpuEvaluator.h
 cpuGLVertexBuffer.h
 cpuPatchTable.h
 cpuVertexBuffer.h
 cudaEvaluator.h
 cudaPatchTable.h
 cpuEvaluator.h
 cpuGLVertexBuffer.h
 cpuPatchTable.h
 cpuVertexBuffer.h
 cudaEvaluator.h
 cudaPatchTable.h
 cudaVertexBuffer.h
 d3d11ComputeEvaluator.h
 d3d11LegacyGregoryPatchTable.h
 d3d11ComputeEvaluator.h
 d3d11LegacyGregoryPatchTable.h
 d3d11Mesh.h
 d3d11PatchTable.h
 d3d11PatchTable.h
 d3d11VertexBuffer.h
 glComputeEvaluator.h
 glLegacyGregoryPatchTable.h
 glMesh.h
 glPatchTable.h
 glslPatchShaderSource.h
 glVertexBuffer.h
 glComputeEvaluator.h
 glLegacyGregoryPatchTable.h
 glMesh.h
 glPatchTable.h
 glslPatchShaderSource.h
 glVertexBuffer.h
 glXFBEvaluator.h
 hlslPatchShaderSource.h
 mesh.h
 mtlCommon.h
 mtlComputeEvaluator.h
 mtlLegacyGregoryPatchTable.h
 mesh.h
 mtlCommon.h
 mtlComputeEvaluator.h
 mtlLegacyGregoryPatchTable.h
 mtlMesh.h
 mtlPatchShaderSource.h
 mtlPatchTable.h
 mtlPatchShaderSource.h
 mtlPatchTable.h
 mtlVertexBuffer.h
 ompEvaluator.h
 ompKernel.h
 opencl.h
 opengl.h
 tbbEvaluator.h
 tbbKernel.h
 tbbKernel.h
 types.h
  sdc
 bilinearScheme.h
 catmarkScheme.h
 crease.h
 loopScheme.h
 options.h
 loopScheme.h
 options.h
 scheme.h
 types.h
  vtr
 array.h
 componentInterfaces.h
 componentInterfaces.h
 fvarLevel.h
 fvarRefinement.h
 level.h
 refinement.h
 sparseSelector.h
 stackBuffer.h
 fvarRefinement.h
 level.h
 refinement.h
 sparseSelector.h
 stackBuffer.h
 types.h
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
topologyLevel.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ -#include "../vtr/refinement.h"
│ │ │ │ +#include "../vtr/level.h"
│ │ │ │ +#include "../vtr/refinement.h"
│ │ │ │ #include "../far/types.h"
│ │ │ │ #include <vector>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  TopologyLevel
 An interface for accessing data in a specific level of a refined topology hierarchy. More...
 
│ │ │ │ @@ -121,13 +121,13 @@ │ │ │ │ │ │ │ │
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ ├── +++ ./usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │┄ Files 2% similar despite different names │ │ │ │ @@ -66,15 +66,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
topologyLevel.h
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1//
│ │ │ │ +Go to the documentation of this file.
1//
│ │ │ │
2// Copyright 2015 DreamWorks Animation LLC.
│ │ │ │
3//
│ │ │ │
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
│ │ │ │
5// with the following modification; you may not use this file except in
│ │ │ │
6// compliance with the Apache License and the following modification to it:
│ │ │ │
7// Section 6. Trademarks. is deleted and replaced with:
│ │ │ │
8//
│ │ │ │ @@ -277,69 +277,69 @@ │ │ │ │
304} // end namespace Far
│ │ │ │
305
│ │ │ │
306} // end namespace OPENSUBDIV_VERSION
│ │ │ │
307using namespace OPENSUBDIV_VERSION;
│ │ │ │
308} // end namespace OpenSubdiv
│ │ │ │
309
│ │ │ │
310#endif /* OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H */
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -
An interface for accessing data in a specific level of a refined topology hierarchy.
│ │ │ │ -
Index GetFaceParentFace(Index f) const
Return the parent face (in the previous level) of a given face.
│ │ │ │ - │ │ │ │ -
bool IsVertexValenceRegular(Index v) const
Return if the valence of the vertex is regular (must be manifold)
│ │ │ │ -
float GetEdgeSharpness(Index e) const
Return the sharpness assigned a given edge.
│ │ │ │ -
bool DoesFaceFVarTopologyMatch(Index f, int channel=0) const
Return if face-varying topology around a face matches.
│ │ │ │ -
Sdc::Crease::Rule GetVertexRule(Index v) const
Return the subdivision rule assigned a given vertex specific to this level.
│ │ │ │ -
bool IsVertexCorner(Index v) const
Return if the vertex is a corner (only one incident face)
│ │ │ │ -
Index GetVertexChildVertex(Index v) const
Return the child vertex (in the next level) of a given vertex.
│ │ │ │ -
ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const
Access the local indices of an edge with respect to its incident faces.
│ │ │ │ -
ConstIndexArray GetFaceChildEdges(Index f) const
Access the child edges (in the next level) of a given face.
│ │ │ │ -
bool DoesEdgeFVarTopologyMatch(Index e, int channel=0) const
Return if face-varying topology across the edge only matches.
│ │ │ │ - │ │ │ │ -
ConstIndexArray GetFaceVertices(Index f) const
Access the vertices incident a given face.
│ │ │ │ -
ConstIndexArray GetFaceChildFaces(Index f) const
Access the child faces (in the next level) of a given face.
│ │ │ │ -
int GetNumEdges() const
Return the number of edges in this level.
│ │ │ │ - │ │ │ │ -
bool IsEdgeNonManifold(Index e) const
Return if the edge is non-manifold.
│ │ │ │ -
bool IsFaceHole(Index f) const
Return if a given face has been tagged as a hole.
│ │ │ │ -
ConstIndexArray GetVertexEdges(Index v) const
Access the edges incident a given vertex.
│ │ │ │ -
Index GetFaceChildVertex(Index f) const
Return the child vertex (in the next level) of a given face.
│ │ │ │ -
bool DoesVertexFVarTopologyMatch(Index v, int channel=0) const
Return if face-varying topology around a vertex matches.
│ │ │ │ -
ConstIndexArray GetEdgeChildEdges(Index e) const
Access the child edges (in the next level) of a given edge.
│ │ │ │ -
bool IsEdgeInfSharp(Index e) const
Return if the edge is infinitely-sharp.
│ │ │ │ -
ConstIndexArray GetVertexFaces(Index v) const
Access the faces incident a given vertex.
│ │ │ │ -
Index FindEdge(Index v0, Index v1) const
Identify the edge matching the given vertex pair.
│ │ │ │ -
ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident edges.
│ │ │ │ -
ConstIndexArray GetFaceEdges(Index f) const
Access the edges incident a given face.
│ │ │ │ -
int GetNumFaces() const
Return the number of faces in this level.
│ │ │ │ -
bool IsVertexBoundary(Index v) const
Return if the vertex is on a boundary (at least one incident boundary edge)
│ │ │ │ -
int GetNumFVarChannels() const
Return the number of face-varying channels (should be same for all levels)
│ │ │ │ -
int GetNumVertices() const
Return the number of vertices in this level.
│ │ │ │ -
ConstIndexArray GetEdgeFaces(Index e) const
Access the faces incident a given edge.
│ │ │ │ -
ConstIndexArray GetFaceFVarValues(Index f, int channel=0) const
Access the face-varying values associated with a particular face.
│ │ │ │ -
ConstIndexArray GetEdgeVertices(Index e) const
Access the vertices incident a given edge.
│ │ │ │ -
bool IsEdgeSemiSharp(Index e) const
Return if the edge is semi-sharp.
│ │ │ │ - │ │ │ │ -
float GetVertexSharpness(Index v) const
Return the sharpness assigned a given vertex.
│ │ │ │ -
Index GetEdgeChildVertex(Index e) const
Return the child vertex (in the next level) of a given edge.
│ │ │ │ -
bool IsVertexSemiSharp(Index v) const
Return if the vertex is semi-sharp.
│ │ │ │ -
int GetNumFaceVertices() const
Return the total number of face-vertices, i.e. the sum of all vertices for all faces.
│ │ │ │ -
bool IsVertexNonManifold(Index v) const
Return if the vertex is non-manifold.
│ │ │ │ -
bool IsEdgeBoundary(Index e) const
Return if the edge is a boundary (only one incident face)
│ │ │ │ -
bool IsVertexInfSharp(Index v) const
Return if the vertex is infinitely-sharp.
│ │ │ │ -
int GetNumFVarValues(int channel=0) const
Return the total number of face-varying values in a particular channel (the upper bound of a face-var...
│ │ │ │ -
ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident faces.
│ │ │ │ +
An interface for accessing data in a specific level of a refined topology hierarchy.
│ │ │ │ +
Index GetFaceParentFace(Index f) const
Return the parent face (in the previous level) of a given face.
│ │ │ │ + │ │ │ │ +
bool IsVertexValenceRegular(Index v) const
Return if the valence of the vertex is regular (must be manifold)
│ │ │ │ +
float GetEdgeSharpness(Index e) const
Return the sharpness assigned a given edge.
│ │ │ │ +
bool DoesFaceFVarTopologyMatch(Index f, int channel=0) const
Return if face-varying topology around a face matches.
│ │ │ │ +
Sdc::Crease::Rule GetVertexRule(Index v) const
Return the subdivision rule assigned a given vertex specific to this level.
│ │ │ │ +
bool IsVertexCorner(Index v) const
Return if the vertex is a corner (only one incident face)
│ │ │ │ +
Index GetVertexChildVertex(Index v) const
Return the child vertex (in the next level) of a given vertex.
│ │ │ │ +
ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const
Access the local indices of an edge with respect to its incident faces.
│ │ │ │ +
ConstIndexArray GetFaceChildEdges(Index f) const
Access the child edges (in the next level) of a given face.
│ │ │ │ +
bool DoesEdgeFVarTopologyMatch(Index e, int channel=0) const
Return if face-varying topology across the edge only matches.
│ │ │ │ + │ │ │ │ +
ConstIndexArray GetFaceVertices(Index f) const
Access the vertices incident a given face.
│ │ │ │ +
ConstIndexArray GetFaceChildFaces(Index f) const
Access the child faces (in the next level) of a given face.
│ │ │ │ +
int GetNumEdges() const
Return the number of edges in this level.
│ │ │ │ + │ │ │ │ +
bool IsEdgeNonManifold(Index e) const
Return if the edge is non-manifold.
│ │ │ │ +
bool IsFaceHole(Index f) const
Return if a given face has been tagged as a hole.
│ │ │ │ +
ConstIndexArray GetVertexEdges(Index v) const
Access the edges incident a given vertex.
│ │ │ │ +
Index GetFaceChildVertex(Index f) const
Return the child vertex (in the next level) of a given face.
│ │ │ │ +
bool DoesVertexFVarTopologyMatch(Index v, int channel=0) const
Return if face-varying topology around a vertex matches.
│ │ │ │ +
ConstIndexArray GetEdgeChildEdges(Index e) const
Access the child edges (in the next level) of a given edge.
│ │ │ │ +
bool IsEdgeInfSharp(Index e) const
Return if the edge is infinitely-sharp.
│ │ │ │ +
ConstIndexArray GetVertexFaces(Index v) const
Access the faces incident a given vertex.
│ │ │ │ +
Index FindEdge(Index v0, Index v1) const
Identify the edge matching the given vertex pair.
│ │ │ │ +
ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident edges.
│ │ │ │ +
ConstIndexArray GetFaceEdges(Index f) const
Access the edges incident a given face.
│ │ │ │ +
int GetNumFaces() const
Return the number of faces in this level.
│ │ │ │ +
bool IsVertexBoundary(Index v) const
Return if the vertex is on a boundary (at least one incident boundary edge)
│ │ │ │ +
int GetNumFVarChannels() const
Return the number of face-varying channels (should be same for all levels)
│ │ │ │ +
int GetNumVertices() const
Return the number of vertices in this level.
│ │ │ │ +
ConstIndexArray GetEdgeFaces(Index e) const
Access the faces incident a given edge.
│ │ │ │ +
ConstIndexArray GetFaceFVarValues(Index f, int channel=0) const
Access the face-varying values associated with a particular face.
│ │ │ │ +
ConstIndexArray GetEdgeVertices(Index e) const
Access the vertices incident a given edge.
│ │ │ │ +
bool IsEdgeSemiSharp(Index e) const
Return if the edge is semi-sharp.
│ │ │ │ + │ │ │ │ +
float GetVertexSharpness(Index v) const
Return the sharpness assigned a given vertex.
│ │ │ │ +
Index GetEdgeChildVertex(Index e) const
Return the child vertex (in the next level) of a given edge.
│ │ │ │ +
bool IsVertexSemiSharp(Index v) const
Return if the vertex is semi-sharp.
│ │ │ │ +
int GetNumFaceVertices() const
Return the total number of face-vertices, i.e. the sum of all vertices for all faces.
│ │ │ │ +
bool IsVertexNonManifold(Index v) const
Return if the vertex is non-manifold.
│ │ │ │ +
bool IsEdgeBoundary(Index e) const
Return if the edge is a boundary (only one incident face)
│ │ │ │ +
bool IsVertexInfSharp(Index v) const
Return if the vertex is infinitely-sharp.
│ │ │ │ +
int GetNumFVarValues(int channel=0) const
Return the total number of face-varying values in a particular channel (the upper bound of a face-var...
│ │ │ │ +
ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident faces.
│ │ │ │
Stores topology data for a specified set of refinement options.
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │