--- /srv/reproducible-results/rbuild-debian/r-b-build.mSWqPzWq/b1/opensubdiv_3.5.0-2.1_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.mSWqPzWq/b2/opensubdiv_3.5.0-2.1_amd64.changes ├── Files │ @@ -1,9 +1,9 @@ │ │ 41bf66e40037eeb33def50e511fa65b4 144000 libdevel optional libosd-dev_3.5.0-2.1_amd64.deb │ - ee7a3ffc32b744f78f8a2db935234972 31491436 doc optional libosd-doc_3.5.0-2.1_all.deb │ + 28502e26fce195fbf424841d18cf8998 31492556 doc optional libosd-doc_3.5.0-2.1_all.deb │ 0df97ffc8d70650a063b59e455cc945b 3537348 debug optional libosdcpu3.5.0t64-dbgsym_3.5.0-2.1_amd64.deb │ 4e9757722f4d1a2204cd578127168cfb 338000 libs optional libosdcpu3.5.0t64_3.5.0-2.1_amd64.deb │ bfcad2008b53d3dd7dad69dc56b84515 538900 debug optional libosdgpu3.5.0t64-dbgsym_3.5.0-2.1_amd64.deb │ a9e3dcc5b235ee3d08a1df33c31331cb 136372 libs optional libosdgpu3.5.0t64_3.5.0-2.1_amd64.deb │ 4cb58227d15f0d5cc626212e5eb35a3e 12376664 debug optional opensubdiv-tools-dbgsym_3.5.0-2.1_amd64.deb │ e51c235b0d686c0968a5d5c2e502bea4 653564 graphics optional opensubdiv-tools_3.5.0-2.1_amd64.deb ├── libosd-doc_3.5.0-2.1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-02-29 12:58:19.000000 debian-binary │ │ --rw-r--r-- 0 0 0 25460 2024-02-29 12:58:19.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 31465784 2024-02-29 12:58:19.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 25500 2024-02-29 12:58:19.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 31466864 2024-02-29 12:58:19.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -21,15 +21,14 @@ │ │ │ │ │ usr/share/doc/opensubdiv/css/doxy.css │ │ │ │ │ usr/share/doc/opensubdiv/css/flavor.css │ │ │ │ │ usr/share/doc/opensubdiv/css/pygments.css │ │ │ │ │ usr/share/doc/opensubdiv/css/renderman-university.css │ │ │ │ │ usr/share/doc/opensubdiv/css/rst.css │ │ │ │ │ usr/share/doc/opensubdiv/downloads.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00674.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00677.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ │ @@ -48,41 +47,53 @@ │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ │ 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 │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00719.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00722.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00722.js │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00722_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00728.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00728.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00731.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00734.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00734.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00734_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00737.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00737_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00740.html │ │ │ │ │ +usr/share/doc/opensubdiv/doxy_html/a00740.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00740_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00743.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00743.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00743_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00746.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ │ @@ -124,51 +135,40 @@ │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00785.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00785.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00785_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00788.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00791.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00791_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00797.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00797.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00797_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00800.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00800.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00803.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00806.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00809.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00812.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00815.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00824.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00827.html │ │ │ │ │ -usr/share/doc/opensubdiv/doxy_html/a00827.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00830.js │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00833.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00833_source.html │ │ │ │ │ usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ ├── xz --list │ │ │ @@ -1,13 +1,13 @@ │ │ │ Streams: 1 │ │ │ Blocks: 1 │ │ │ - Compressed size: 24.9 KiB (25460 B) │ │ │ + Compressed size: 24.9 KiB (25500 B) │ │ │ Uncompressed size: 100.0 KiB (102400 B) │ │ │ Ratio: 0.249 │ │ │ Check: CRC64 │ │ │ Stream Padding: 0 B │ │ │ Streams: │ │ │ Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding │ │ │ - 1 1 0 0 25460 102400 0.249 CRC64 0 │ │ │ + 1 1 0 0 25500 102400 0.249 CRC64 0 │ │ │ Blocks: │ │ │ Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check │ │ │ - 1 1 12 0 25424 102400 0.248 CRC64 │ │ │ + 1 1 12 0 25464 102400 0.249 CRC64 │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -27,230 +27,230 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1660 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/css/doxy.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 27698 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/css/flavor.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5321 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/css/pygments.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3011 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/css/renderman-university.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12971 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/css/rst.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 14490 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/downloads.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7504 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 88831 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6436 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4478 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10583 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6306 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45702 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6576 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76687 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7765 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 150 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40418 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6558 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35228 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6387 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14299 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7075 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 120 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75919 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7311 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 195 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27167 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7385 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65516 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6082 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 85953 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6202 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 163473 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6289 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24307 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5899 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22113 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6114 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29126 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5644 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38294 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6267 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81483 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6437 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 121 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46438 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6298 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38674 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5753 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38297 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7580 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 130 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 135867 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5827 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00737.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100442 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00737_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5836 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 89790 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6474 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 59 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53913 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6358 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22933 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7052 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 124 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 223874 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6316 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17165 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7225 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 224157 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6370 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19254 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14201 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 2466 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 182425 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6357 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26984 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7125 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 115 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 128979 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6818 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35394 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11270 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 424 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29216 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7199 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 121 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 239108 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 111096 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6497 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21040 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6687 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27492 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6580 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 99 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12709 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4474 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12883 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00791_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6592 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12826 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6911 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44339 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6306 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20385 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7174 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 115 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 252040 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6246 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 71 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22526 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110902 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6745 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47052 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6574 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12790 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6486 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19962 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110647 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6161 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14083 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6375 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20016 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6766 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27921 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4478 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10583 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6410 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22723 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8721 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 262 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21259 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6445 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23459 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6452 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 79 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25442 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6316 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16843 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7017 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 128 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49761 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6807 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33910 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6425 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23841 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6897 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34223 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9923 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 456 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 177059 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7136 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38039 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7304 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 160 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53848 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9468 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 404 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 84414 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6698 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66668 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8223 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 130 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 212261 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8124 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 314 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50494 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7837 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 190 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 147347 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6745 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42247 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7813 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 163 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67819 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7336 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 159214 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11427 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1173 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22911 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8007 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 74098 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6563 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 64 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19420 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20385 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6486 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19962 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6580 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 99 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12709 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6246 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 71 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22526 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6370 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19254 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6358 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22933 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6745 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47052 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6911 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44339 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110647 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6687 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27492 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00704_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7052 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 124 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 223874 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6357 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26984 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6316 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17165 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6818 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35394 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6574 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12790 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7199 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 121 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 239108 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00722_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110902 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6425 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23841 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6375 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20016 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7174 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 115 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 252040 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00734_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4474 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00737.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12883 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00737_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6497 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21040 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00740_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6807 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33910 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00743_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6452 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25442 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6316 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16843 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6592 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12826 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8721 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 262 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21259 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6381 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 111096 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6445 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23459 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00761_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6410 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22723 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14201 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 2466 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 182425 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7017 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 128 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49761 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6766 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27921 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7225 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 224157 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7125 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 115 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 128979 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6161 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14083 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11270 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 424 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29216 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00785_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6897 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34223 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6437 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 121 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46438 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6114 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29126 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00797_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6082 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 85953 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6202 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 163473 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6289 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24307 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5644 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38294 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5899 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22113 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6267 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81483 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6298 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38674 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7580 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 130 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 135867 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5827 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100442 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5753 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38297 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6474 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 59 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53913 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5836 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 89790 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00833_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6558 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35228 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7765 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40418 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7311 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 195 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27167 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7504 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 88831 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00845_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6576 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76687 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6436 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45702 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7385 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65516 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00854_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7075 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75919 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6387 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14299 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7136 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38039 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8223 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 130 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 212261 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6563 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 64 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19420 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7336 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 159214 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8007 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 74098 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00875_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6745 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42247 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00878_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9923 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 456 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 177059 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00881_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6698 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66668 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00884_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7304 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 160 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53848 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9468 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 404 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 84414 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7837 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 190 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 147347 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8124 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 314 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50494 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11427 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1173 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22911 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7813 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 163 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67819 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00902_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4659 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00905.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00905.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5892 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00906.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 216 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00906.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10819 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00907.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 607 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00907.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 45243 2024-02-29 12:58:19.000000 ./usr/share/doc/opensubdiv/doxy_html/a00908.html │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00674.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/opencl.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -87,51 +87,24 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
surfaceFactory.h File Reference
│ │ │ │ +
opencl.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 <CL/opencl.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  SurfaceFactory::Options
 Simple set of options assigned to instances of SurfaceFactory. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
 
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,11 @@ │ │ │ │ │ [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 │ │ │ │ │ -#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 │ │ │ │ │ +opencl.h File Reference │ │ │ │ │ +#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 │ │ │ │ │ -  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_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_:_:_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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _o_p_e_n_c_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00674_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/opencl.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactory.h
│ │ │ │ +
opencl.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 Pixar
│ │ │ │ +
2// Copyright 2014 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,412 +119,32 @@ │ │ │ │
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_OSD_OPENCL_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_OPENCL_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>
│ │ │ │ -
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;
│ │ │ │ -
162
│ │ │ │ -
164
│ │ │ │ -
168
│ │ │ │ -
170 Sdc::SchemeType GetSchemeType() const { return _subdivScheme; }
│ │ │ │ -
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;
│ │ │ │ -
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.
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
28#if defined(OPENSUBDIV_HAS_CLEW)
│ │ │ │ +
29# include <clew.h>
│ │ │ │ +
30#else
│ │ │ │ +
31# if defined(__APPLE__)
│ │ │ │ +
32# include <OpenCL/opencl.h>
│ │ │ │ +
33# else
│ │ │ │ +
34# include <CL/opencl.h>
│ │ │ │ +
35# endif
│ │ │ │ +
36#endif
│ │ │ │ +
37
│ │ │ │ +
38#endif // OPENSUBDIV3_OSD_CL_UTIL_H
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surfaceFactory.h │ │ │ │ │ +opencl.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 │ │ │ │ │ +2// Copyright 2014 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,476 +24,25 @@ │ │ │ │ │ 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_OSD_OPENCL_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_OPENCL_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 │ │ │ │ │ -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; │ │ │ │ │ -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 │ │ │ │ │ -_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; │ │ │ │ │ -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_:_:_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_:_:_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 │ │ │ │ │ +28#if defined(OPENSUBDIV_HAS_CLEW) │ │ │ │ │ +29# include │ │ │ │ │ +30#else │ │ │ │ │ +31# if defined(__APPLE__) │ │ │ │ │ +32# include │ │ │ │ │ +33# else │ │ │ │ │ +34# include │ │ │ │ │ +35# endif │ │ │ │ │ +36#endif │ │ │ │ │ +37 │ │ │ │ │ +38#endif // OPENSUBDIV3_OSD_CL_UTIL_H │ │ │ │ │ * _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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _o_p_e_n_c_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00677.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/parameterization.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
parameterization.h File Reference
│ │ │ │ +
mtlPatchShaderSource.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ +
import "../version.h"
│ │ │ │ +import "../far/patchDescriptor.h"
│ │ │ │ +import <string>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Parameterization
 Simple class defining the 2D parameterization of a face. More...
class  MTLPatchShaderSource
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -#include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +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   _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_._._. │ │ │ │ │ +class   _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_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 │ │ │ │ │ +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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00677.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00677 = [ │ │ │ │ │ - ["Parameterization", "a00921.html", "a00921"] │ │ │ │ │ + ["MTLPatchShaderSource", "a01293.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00677_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/parameterization.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
parameterization.h
│ │ │ │ +
mtlPatchShaderSource.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,74 @@ │ │ │ │
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_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
│ │ │ │
27
│ │ │ │ -
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../sdc/types.h"
│ │ │ │ +
28#import "../version.h"
│ │ │ │ +
29#import "../far/patchDescriptor.h"
│ │ │ │ +
30#import <string>
│ │ │ │
31
│ │ │ │
32namespace OpenSubdiv {
│ │ │ │
33namespace OPENSUBDIV_VERSION {
│ │ │ │
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
35namespace Osd {
│ │ │ │
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 public:
│ │ │ │ +
39 static std::string GetCommonShaderSource();
│ │ │ │ +
40
│ │ │ │ +
41 static std::string GetPatchBasisShaderSource();
│ │ │ │ +
42
│ │ │ │ + │ │ │ │ +
44
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ + │ │ │ │ +
48
│ │ │ │ +
53 static std::string GetVertexShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
56 static std::string GetHullShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
59 static std::string GetDomainShaderSource(
│ │ │ │ + │ │ │ │ + │ │ │ │ +
62};
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64} // end namespace Osd
│ │ │ │ +
65
│ │ │ │ +
66} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
67using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
68
│ │ │ │ +
69} // end namespace OpenSubdiv
│ │ │ │ +
70
│ │ │ │ +
71#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
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)
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -parameterization.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 2021 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,243 +24,87 @@ │ │ │ │ │ 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_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ 27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../sdc/types.h" │ │ │ │ │ +28#import "../version.h" │ │ │ │ │ +29#import "../far/patchDescriptor.h" │ │ │ │ │ +30#import │ │ │ │ │ 31 │ │ │ │ │ 32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ 33namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -35namespace Bfr { │ │ │ │ │ +35namespace Osd { │ │ │ │ │ 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 */ │ │ │ │ │ +_3_7class _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ +38 public: │ │ │ │ │ +_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +40 │ │ │ │ │ +_4_1 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(); │ │ │ │ │ +42 │ │ │ │ │ +_4_3 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); │ │ │ │ │ +44 │ │ │ │ │ +_4_5 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); │ │ │ │ │ +46 │ │ │ │ │ +_4_7 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); │ │ │ │ │ +48 │ │ │ │ │ +_5_3 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +54 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +55 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +_5_6 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +57 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +58 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +_5_9 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +60 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ +61 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ +62}; │ │ │ │ │ +63 │ │ │ │ │ +64} // end namespace Osd │ │ │ │ │ +65 │ │ │ │ │ +66} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +67using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +68 │ │ │ │ │ +69} // end namespace OpenSubdiv │ │ │ │ │ +70 │ │ │ │ │ +71#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_:_:_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 │ │ │ │ │ +_O_p_e_n_S_u_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 │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_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_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() │ │ │ │ │ +_O_p_e_n_S_u_b_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/vertexDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vertexDescriptor.h File Reference
│ │ │ │ +
glVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../vtr/stackBuffer.h"
│ │ │ │ +#include "../osd/opengl.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  VertexDescriptor
 Simple class used by subclasses of SurfaceFactory to describe a vertex. More...
class  GLVertexBuffer
 Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -vertexDescriptor.h File Reference │ │ │ │ │ +glVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ +#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   _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -  Simple class used by subclasses of _S_u_r_f_a_c_e_F_a_c_t_o_r_y to describe a vertex. │ │ │ │ │ +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_:_:_B_f_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00680 = [ │ │ │ │ │ - ["VertexDescriptor", "a00969.html", "a00969"] │ │ │ │ │ + ["GLVertexBuffer", "a01237.html", "a01237"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00680_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/vertexDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vertexDescriptor.h
│ │ │ │ +
glVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,425 +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_BFR_VERTEX_DESCRIPTOR_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_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 "../vtr/stackBuffer.h"
│ │ │ │ -
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ -
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ -
36
│ │ │ │ -
50//
│ │ │ │ -
51// WIP - need to migrate some of these comments into Doxygen
│ │ │ │ -
52// - others will be moved to the external documentation
│ │ │ │ -
53//
│ │ │ │ -
54// It is used by subclasses of SurfaceFactory to provide a complete
│ │ │ │ -
55// topological description for each vertex of a face, i.e. invoked via
│ │ │ │ -
56// the virtual method:
│ │ │ │ -
57//
│ │ │ │ -
58// int populateFaceVertexDescriptor(Index baseFace,
│ │ │ │ -
59// int cornerVertex,
│ │ │ │ -
60// VertexDescriptor & v) const;
│ │ │ │ -
61//
│ │ │ │ -
62// Assignment of the full topology can be involved in the presence of
│ │ │ │ -
63// irregular faces, non-manifold topology or creasing around a vertex, but
│ │ │ │ -
64// many cases will be simple. For example, to specify a regular boundary
│ │ │ │ -
65// vertex of a Catmark mesh without any optional sharpness:
│ │ │ │ -
66//
│ │ │ │ -
67// int numIncidentFaces = 2;
│ │ │ │ -
68// bool vertexOnBoundary = true;
│ │ │ │ -
69//
│ │ │ │ -
70// vd.Initialize(numIncidentFaces);
│ │ │ │ -
71// vd.SetManifold(true);
│ │ │ │ -
72// vd.SetBoundary(vertexOnBoundary);
│ │ │ │ -
73// vd.ClearIncidentFaceSizes();
│ │ │ │ -
74// vd.Finalize();
│ │ │ │ -
75//
│ │ │ │ -
76// For a more general example, to assign a vertex of some valence whose
│ │ │ │ -
77// incident faces are of different sizes (e.g. required when triangles
│ │ │ │ -
78// appear around a vertex in an otherwise quad-dominant Catmark mesh):
│ │ │ │ -
79//
│ │ │ │ -
80// int numIncidentFaces = meshVertex.GetNumIncidentFaces();
│ │ │ │ -
81// bool vertexOnBoundary = meshVertex.IsBoundar();
│ │ │ │ -
82//
│ │ │ │ -
83// vd.Initialize(numIncidentFaces);
│ │ │ │ -
84// vd.SetManifold(true);
│ │ │ │ -
85// vd.SetBoundary(vertexOnBoundary);
│ │ │ │ -
86//
│ │ │ │ -
87// for (int i = 0; i < numIncidentFaces; ++i) {
│ │ │ │ -
88// vd.SetIncidentFaceSize(i, meshVertex.GetIncidentFaceSize(i));
│ │ │ │ -
89// }
│ │ │ │ -
90// vd.Finalize();
│ │ │ │ -
91//
│ │ │ │ -
92// These examples specify the incident faces as forming a manifold ring
│ │ │ │ -
93// (or half-ring) around the vertex, i.e. they can be specified as a
│ │ │ │ -
94// continuous, connected sequence in counter-clockwise order (and also
│ │ │ │ -
95// without degeneracies). In the case of a boundary vertex, the first
│ │ │ │ -
96// face must be on the leading edge of the boundary while the last is on
│ │ │ │ -
97// the trailing edge. For an interior vertex, which face is specified
│ │ │ │ -
98// first does not matter (since the set is periodic).
│ │ │ │ -
99//
│ │ │ │ -
100// In both cases, the location of the base face in this sequence -- the
│ │ │ │ -
101// face whose corner vertex is being described here -- must be specified
│ │ │ │ -
102// in the return value to populateFaceVertexDescriptor() (e.g. when a
│ │ │ │ -
103// boundary vertex has 3 incident faces, a return value of 0, 1 or 2
│ │ │ │ -
104// will indicate which is the base face).
│ │ │ │ -
105//
│ │ │ │ -
106// The corresponding methods to specify mesh control vertex indices (or
│ │ │ │ -
107// face-varying indices) complete the specification of the neighborhood:
│ │ │ │ -
108//
│ │ │ │ -
109// int getFaceCornerVertexIndices(Index baseFace, int cornerVertex,
│ │ │ │ -
110// Index vertexIndices[]) const;
│ │ │ │ -
111//
│ │ │ │ -
112// int getFaceCornerFVarValueIndices(Index baseFace, int cornerVertex,
│ │ │ │ -
113// Index fvarValueIndices[],
│ │ │ │ -
114// int fvarChannel) const;
│ │ │ │ -
115//
│ │ │ │ -
116// and are invoked by the Factory when needed.
│ │ │ │ -
117//
│ │ │ │ -
118// For each incident face, the indices for all vertices of that face are
│ │ │ │ -
119// to be specified (not the one-ring or some other subset). These indices
│ │ │ │ -
120// must also be specified in an orientation relative to the vertex, i.e.
│ │ │ │ -
121// for a vertex A and an incident face with face-vertices that may be
│ │ │ │ -
122// stored internally as {D, C, A, B}, they must be specified with A first
│ │ │ │ -
123// as {A, B, C, D}. This may seem a bit cumbersome, but it has clear
│ │ │ │ -
124// advantages when dealing with face-varying indices and unordered faces.
│ │ │ │ -
125//
│ │ │ │ -
126// More compact ways of specifying vertex indices for ordered, manifold
│ │ │ │ -
127// cases may be worth exploring in future, but face-varying indices and
│ │ │ │ -
128// non-manifold (unordered) vertices will always require such a full set,
│ │ │ │ -
129// so both methods will need to co-exist.
│ │ │ │ -
130//
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
132public:
│ │ │ │ -
133 // The full declaration must be enclosed by calls to these methods:
│ │ │ │ -
134 //
│ │ │ │ -
135 // Note that vertex valences or face sizes in excess of those defined
│ │ │ │ -
136 // in Bfr::Limits (typically 16-bits) are not valid. When specifying
│ │ │ │ -
137 // values in excess of these limits, initialization will fail and/or
│ │ │ │ -
138 // the descriptor will be marked invalid and finalization will fail.
│ │ │ │ -
139 //
│ │ │ │ -
140
│ │ │ │ -
142
│ │ │ │ -
149
│ │ │ │ -
151 bool Initialize(int numIncidentFaces);
│ │ │ │ -
152
│ │ │ │ -
154 bool Finalize();
│ │ │ │ -
155
│ │ │ │ -
157 bool IsValid() const;
│ │ │ │ -
159
│ │ │ │ -
160 //
│ │ │ │ -
161 // WIP - need to migrate these comments into Doxygen
│ │ │ │ -
162 //
│ │ │ │ -
163 // Three groups of methods describe the topology around a vertex:
│ │ │ │ -
164 // - simple properties (vertex is a boundary, manifold, etc.)
│ │ │ │ -
165 // - sizes of incident faces (constant or size for each face)
│ │ │ │ -
166 // - sharpness of the vertex and its incident edges (optional)
│ │ │ │ -
167 //
│ │ │ │ -
168
│ │ │ │ -
169 // Manifold and boundary conditions:
│ │ │ │ -
170 //
│ │ │ │ -
171 // The manifold property is a strict condition but preferred for
│ │ │ │ -
172 // efficiency and is usually available from common connected mesh
│ │ │ │ -
173 // representations. When declaring the topology as "manifold",
│ │ │ │ -
174 // the Factory assumes the following:
│ │ │ │ -
175 //
│ │ │ │ -
176 // - all incident faces are "ordered" (counter-clockwise)
│ │ │ │ -
177 // - all incident faces are consistently oriented
│ │ │ │ -
178 // - all incident edges are non-degenerate
│ │ │ │ -
179 //
│ │ │ │ -
180 // If not certain that all of these conditions are met, it is best
│ │ │ │ -
181 // to not declare manifold -- leaving the Factory to make sense of
│ │ │ │ -
182 // the set of incident faces from the face-vertex indices that are
│ │ │ │ -
183 // provided elsewhere.
│ │ │ │ -
184 //
│ │ │ │ -
185
│ │ │ │ -
187
│ │ │ │ -
191
│ │ │ │ -
193 void SetManifold(bool isManifold);
│ │ │ │ -
194
│ │ │ │ -
196 void SetBoundary(bool isOnBoundary);
│ │ │ │ -
197
│ │ │ │ -
199 void SetIncidentFaceSize(int faceIndex, int faceSize);
│ │ │ │ -
200
│ │ │ │ - │ │ │ │ -
203
│ │ │ │ -
205 void SetVertexSharpness(float sharpness);
│ │ │ │ -
206
│ │ │ │ - │ │ │ │ -
209
│ │ │ │ -
221 void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness);
│ │ │ │ -
222
│ │ │ │ -
238 void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp,
│ │ │ │ -
239 float trailingEdgeSharp);
│ │ │ │ -
240
│ │ │ │ -
242 void ClearEdgeSharpness();
│ │ │ │ -
244
│ │ │ │ -
246
│ │ │ │ -
251
│ │ │ │ -
253 bool IsManifold() const;
│ │ │ │ -
254
│ │ │ │ -
256 bool IsBoundary() const;
│ │ │ │ -
257
│ │ │ │ -
259 bool HasIncidentFaceSizes() const;
│ │ │ │ -
260
│ │ │ │ -
262 int GetIncidentFaceSize(int faceIndex) const;
│ │ │ │ -
263
│ │ │ │ -
265 bool HasVertexSharpness() const;
│ │ │ │ -
266
│ │ │ │ -
268 float GetVertexSharpness() const;
│ │ │ │ -
269
│ │ │ │ -
271 bool HasEdgeSharpness() const;
│ │ │ │ -
272
│ │ │ │ -
274 float GetManifoldEdgeSharpness(int edgeIndex) const;
│ │ │ │ -
275
│ │ │ │ -
277 void GetIncidentFaceEdgeSharpness(int faceIndex,
│ │ │ │ -
278 float * leadingEdgeSharp, float * trailingEdgeSharp) const;
│ │ │ │ -
280
│ │ │ │ -
281protected:
│ │ │ │ -
283 friend class FaceVertex;
│ │ │ │ -
284
│ │ │ │ -
285 VertexDescriptor() { }
│ │ │ │ - │ │ │ │ -
287
│ │ │ │ -
288 typedef Vtr::internal::StackBuffer<int,8,true> IntBuffer;
│ │ │ │ -
289 typedef Vtr::internal::StackBuffer<float,16,true> FloatBuffer;
│ │ │ │ -
290
│ │ │ │ -
291 void initFaceSizes();
│ │ │ │ -
292 void initEdgeSharpness();
│ │ │ │ -
294
│ │ │ │ -
295protected:
│ │ │ │ -
297 // Member variables assigned through the above interface:
│ │ │ │ -
298 unsigned short _isValid : 1;
│ │ │ │ -
299 unsigned short _isInitialized : 1;
│ │ │ │ -
300 unsigned short _isFinalized : 1;
│ │ │ │ -
301
│ │ │ │ -
302 unsigned short _isManifold : 1;
│ │ │ │ -
303 unsigned short _isBoundary : 1;
│ │ │ │ -
304
│ │ │ │ -
305 unsigned short _hasFaceSizes : 1;
│ │ │ │ -
306 unsigned short _hasEdgeSharpness : 1;
│ │ │ │ -
307
│ │ │ │ -
308 short _numFaces;
│ │ │ │ -
309 float _vertSharpness;
│ │ │ │ -
310
│ │ │ │ -
311 FloatBuffer _faceEdgeSharpness;
│ │ │ │ -
312 IntBuffer _faceSizeOffsets;
│ │ │ │ -
314};
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316//
│ │ │ │ -
317// Public inline methods for simple assignment:
│ │ │ │ -
318//
│ │ │ │ -
319inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
321 return _isValid;
│ │ │ │ -
322}
│ │ │ │ -
│ │ │ │ -
323
│ │ │ │ -
324inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
326 _isManifold = isManifold;
│ │ │ │ -
327}
│ │ │ │ -
│ │ │ │ -
328inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
330 return _isManifold;
│ │ │ │ -
331}
│ │ │ │ -
│ │ │ │ -
332
│ │ │ │ -
333inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
335 _isBoundary = isBoundary;
│ │ │ │ -
336}
│ │ │ │ -
│ │ │ │ -
337inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
339 return _isBoundary;
│ │ │ │ -
340}
│ │ │ │ -
│ │ │ │ -
341
│ │ │ │ -
342//
│ │ │ │ -
343// Public inline methods involving sizes of incident faces:
│ │ │ │ -
344//
│ │ │ │ -
345inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
347 return _hasFaceSizes;
│ │ │ │ -
348}
│ │ │ │ -
│ │ │ │ -
349inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
351 _hasFaceSizes = false;
│ │ │ │ -
352}
│ │ │ │ -
│ │ │ │ -
353
│ │ │ │ -
354inline void
│ │ │ │ -
│ │ │ │ -
355VertexDescriptor::SetIncidentFaceSize(int incFaceIndex, int faceSize) {
│ │ │ │ -
356
│ │ │ │ -
357 if (!_hasFaceSizes) initFaceSizes();
│ │ │ │ -
358
│ │ │ │ -
359 _faceSizeOffsets[incFaceIndex] = faceSize;
│ │ │ │ -
360}
│ │ │ │ -
│ │ │ │ -
361inline int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
363
│ │ │ │ -
364 return _isFinalized ?
│ │ │ │ -
365 (_faceSizeOffsets[incFaceIndex+1] - _faceSizeOffsets[incFaceIndex]) :
│ │ │ │ -
366 _faceSizeOffsets[incFaceIndex];
│ │ │ │ -
367}
│ │ │ │ -
│ │ │ │ -
368
│ │ │ │ -
369//
│ │ │ │ -
370// Public inline methods involving vertex sharpness:
│ │ │ │ -
371//
│ │ │ │ -
372inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
374 return _vertSharpness > 0.0f;
│ │ │ │ -
375}
│ │ │ │ -
│ │ │ │ -
376inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
378 _vertSharpness = 0.0f;
│ │ │ │ -
379}
│ │ │ │ -
│ │ │ │ -
380
│ │ │ │ -
381inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
383 _vertSharpness = vertSharpness;
│ │ │ │ -
384}
│ │ │ │ -
│ │ │ │ -
385inline float
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
387 return _vertSharpness;
│ │ │ │ -
388}
│ │ │ │ -
│ │ │ │ -
389
│ │ │ │ -
390//
│ │ │ │ -
391// Public inline methods involving vertex sharpness:
│ │ │ │ -
392//
│ │ │ │ -
393inline bool
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
395 return _hasEdgeSharpness;
│ │ │ │ -
396}
│ │ │ │ -
│ │ │ │ -
397inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
399 _hasEdgeSharpness = false;
│ │ │ │ -
400}
│ │ │ │ -
│ │ │ │ -
401
│ │ │ │ -
402inline void
│ │ │ │ -
│ │ │ │ -
403VertexDescriptor::SetManifoldEdgeSharpness(int edgeIndex, float sharpness) {
│ │ │ │ -
404
│ │ │ │ -
405 if (!_hasEdgeSharpness) initEdgeSharpness();
│ │ │ │ -
406
│ │ │ │ -
407 // Assign the leading edge of the face after the edge (even index):
│ │ │ │ -
408 if (edgeIndex < _numFaces) {
│ │ │ │ -
409 _faceEdgeSharpness[2*edgeIndex] = sharpness;
│ │ │ │ -
410 }
│ │ │ │ -
411
│ │ │ │ -
412 // Assign the trailing edge of the face before the edge (odd index):
│ │ │ │ -
413 if (edgeIndex > 0) {
│ │ │ │ -
414 _faceEdgeSharpness[2*edgeIndex-1] = sharpness;
│ │ │ │ -
415 } else if (!IsBoundary()) {
│ │ │ │ -
416 _faceEdgeSharpness[2*_numFaces-1] = sharpness;
│ │ │ │ -
417 }
│ │ │ │ -
418}
│ │ │ │ -
│ │ │ │ -
419inline float
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
421
│ │ │ │ -
422 // All edges are first of the pair (even index) except last of boundary
│ │ │ │ -
423 return _faceEdgeSharpness[2*edgeIndex - (edgeIndex == _numFaces)];
│ │ │ │ -
424}
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
426inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
428 float leadingEdgeSharpness, float trailingEdgeSharpness) {
│ │ │ │ -
429
│ │ │ │ -
430 if (!_hasEdgeSharpness) initEdgeSharpness();
│ │ │ │ -
431
│ │ │ │ -
432 _faceEdgeSharpness[2*faceIndex ] = leadingEdgeSharpness;
│ │ │ │ -
433 _faceEdgeSharpness[2*faceIndex+1] = trailingEdgeSharpness;
│ │ │ │ -
434}
│ │ │ │ -
│ │ │ │ -
435inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
437 float * leadingEdgeSharpness, float * trailingEdgeSharpness) const {
│ │ │ │ -
438
│ │ │ │ -
439 *leadingEdgeSharpness = _faceEdgeSharpness[2*faceIndex];
│ │ │ │ -
440 *trailingEdgeSharpness = _faceEdgeSharpness[2*faceIndex+1];
│ │ │ │ -
441}
│ │ │ │ -
│ │ │ │ -
442
│ │ │ │ -
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 */
│ │ │ │ - │ │ │ │ -
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.
│ │ │ │ -
int GetIncidentFaceSize(int faceIndex) const
Return the size of an incident face.
│ │ │ │ -
float GetManifoldEdgeSharpness(int edgeIndex) const
Return the sharpness assigned to a manifold edge.
│ │ │ │ -
void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp, float trailingEdgeSharp)
Assign sharpness to the edges of an incident face.
│ │ │ │ -
bool HasVertexSharpness() const
Return if sharpness was assigned to the vertex.
│ │ │ │ -
void ClearIncidentFaceSizes()
Remove any assigned sizes of incident faces.
│ │ │ │ -
void SetVertexSharpness(float sharpness)
Assign sharpness to the vertex.
│ │ │ │ -
void ClearVertexSharpness()
Remove any sharpness assigned to the vertex.
│ │ │ │ -
void ClearEdgeSharpness()
Remove any sharpness assigned to the incident edges.
│ │ │ │ -
void GetIncidentFaceEdgeSharpness(int faceIndex, float *leadingEdgeSharp, float *trailingEdgeSharp) const
Return the sharpness assigned to edges of an incident face.
│ │ │ │ -
bool IsBoundary() const
Return if vertex neighborhood is on a boundary.
│ │ │ │ -
bool IsValid() const
Return if instance is valid.
│ │ │ │ -
bool HasIncidentFaceSizes() const
Return if the sizes of incident faces are assigned.
│ │ │ │ -
void SetBoundary(bool isOnBoundary)
Declare the vertex neighborhood as being on a boundary.
│ │ │ │ -
void SetIncidentFaceSize(int faceIndex, int faceSize)
Assign the size of an incident face.
│ │ │ │ -
void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness)
Assign sharpness to the edge of a manifold neighborhood.
│ │ │ │ +
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
│ │ │ │ +
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.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -vertexDescriptor.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 2021 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,446 +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_BFR_VERTEX_DESCRIPTOR_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_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 "../vtr/stackBuffer.h" │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Bfr { │ │ │ │ │ -36 │ │ │ │ │ -50// │ │ │ │ │ -51// WIP - need to migrate some of these comments into Doxygen │ │ │ │ │ -52// - others will be moved to the external documentation │ │ │ │ │ -53// │ │ │ │ │ -54// It is used by subclasses of SurfaceFactory to provide a complete │ │ │ │ │ -55// topological description for each vertex of a face, i.e. invoked via │ │ │ │ │ -56// the virtual method: │ │ │ │ │ -57// │ │ │ │ │ -58// int populateFaceVertexDescriptor(Index baseFace, │ │ │ │ │ -59// int cornerVertex, │ │ │ │ │ -60// VertexDescriptor & v) const; │ │ │ │ │ -61// │ │ │ │ │ -62// Assignment of the full topology can be involved in the presence of │ │ │ │ │ -63// irregular faces, non-manifold topology or creasing around a vertex, but │ │ │ │ │ -64// many cases will be simple. For example, to specify a regular boundary │ │ │ │ │ -65// vertex of a Catmark mesh without any optional sharpness: │ │ │ │ │ -66// │ │ │ │ │ -67// int numIncidentFaces = 2; │ │ │ │ │ -68// bool vertexOnBoundary = true; │ │ │ │ │ -69// │ │ │ │ │ -70// vd.Initialize(numIncidentFaces); │ │ │ │ │ -71// vd.SetManifold(true); │ │ │ │ │ -72// vd.SetBoundary(vertexOnBoundary); │ │ │ │ │ -73// vd.ClearIncidentFaceSizes(); │ │ │ │ │ -74// vd.Finalize(); │ │ │ │ │ -75// │ │ │ │ │ -76// For a more general example, to assign a vertex of some valence whose │ │ │ │ │ -77// incident faces are of different sizes (e.g. required when triangles │ │ │ │ │ -78// appear around a vertex in an otherwise quad-dominant Catmark mesh): │ │ │ │ │ -79// │ │ │ │ │ -80// int numIncidentFaces = meshVertex.GetNumIncidentFaces(); │ │ │ │ │ -81// bool vertexOnBoundary = meshVertex.IsBoundar(); │ │ │ │ │ -82// │ │ │ │ │ -83// vd.Initialize(numIncidentFaces); │ │ │ │ │ -84// vd.SetManifold(true); │ │ │ │ │ -85// vd.SetBoundary(vertexOnBoundary); │ │ │ │ │ -86// │ │ │ │ │ -87// for (int i = 0; i < numIncidentFaces; ++i) { │ │ │ │ │ -88// vd.SetIncidentFaceSize(i, meshVertex.GetIncidentFaceSize(i)); │ │ │ │ │ -89// } │ │ │ │ │ -90// vd.Finalize(); │ │ │ │ │ -91// │ │ │ │ │ -92// These examples specify the incident faces as forming a manifold ring │ │ │ │ │ -93// (or half-ring) around the vertex, i.e. they can be specified as a │ │ │ │ │ -94// continuous, connected sequence in counter-clockwise order (and also │ │ │ │ │ -95// without degeneracies). In the case of a boundary vertex, the first │ │ │ │ │ -96// face must be on the leading edge of the boundary while the last is on │ │ │ │ │ -97// the trailing edge. For an interior vertex, which face is specified │ │ │ │ │ -98// first does not matter (since the set is periodic). │ │ │ │ │ -99// │ │ │ │ │ -100// In both cases, the location of the base face in this sequence -- the │ │ │ │ │ -101// face whose corner vertex is being described here -- must be specified │ │ │ │ │ -102// in the return value to populateFaceVertexDescriptor() (e.g. when a │ │ │ │ │ -103// boundary vertex has 3 incident faces, a return value of 0, 1 or 2 │ │ │ │ │ -104// will indicate which is the base face). │ │ │ │ │ -105// │ │ │ │ │ -106// The corresponding methods to specify mesh control vertex indices (or │ │ │ │ │ -107// face-varying indices) complete the specification of the neighborhood: │ │ │ │ │ -108// │ │ │ │ │ -109// int getFaceCornerVertexIndices(Index baseFace, int cornerVertex, │ │ │ │ │ -110// Index vertexIndices[]) const; │ │ │ │ │ -111// │ │ │ │ │ -112// int getFaceCornerFVarValueIndices(Index baseFace, int cornerVertex, │ │ │ │ │ -113// Index fvarValueIndices[], │ │ │ │ │ -114// int fvarChannel) const; │ │ │ │ │ -115// │ │ │ │ │ -116// and are invoked by the Factory when needed. │ │ │ │ │ -117// │ │ │ │ │ -118// For each incident face, the indices for all vertices of that face are │ │ │ │ │ -119// to be specified (not the one-ring or some other subset). These indices │ │ │ │ │ -120// must also be specified in an orientation relative to the vertex, i.e. │ │ │ │ │ -121// for a vertex A and an incident face with face-vertices that may be │ │ │ │ │ -122// stored internally as {D, C, A, B}, they must be specified with A first │ │ │ │ │ -123// as {A, B, C, D}. This may seem a bit cumbersome, but it has clear │ │ │ │ │ -124// advantages when dealing with face-varying indices and unordered faces. │ │ │ │ │ -125// │ │ │ │ │ -126// More compact ways of specifying vertex indices for ordered, manifold │ │ │ │ │ -127// cases may be worth exploring in future, but face-varying indices and │ │ │ │ │ -128// non-manifold (unordered) vertices will always require such a full set, │ │ │ │ │ -129// so both methods will need to co-exist. │ │ │ │ │ -130// │ │ │ │ │ -_1_3_1class _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ -132public: │ │ │ │ │ -133 // The full declaration must be enclosed by calls to these methods: │ │ │ │ │ -134 // │ │ │ │ │ -135 // Note that vertex valences or face sizes in excess of those defined │ │ │ │ │ -136 // in Bfr::Limits (typically 16-bits) are not valid. When specifying │ │ │ │ │ -137 // values in excess of these limits, initialization will fail and/or │ │ │ │ │ -138 // the descriptor will be marked invalid and finalization will fail. │ │ │ │ │ -139 // │ │ │ │ │ -140 │ │ │ │ │ -142 │ │ │ │ │ -149 │ │ │ │ │ -_1_5_1 bool _I_n_i_t_i_a_l_i_z_e(int numIncidentFaces); │ │ │ │ │ -152 │ │ │ │ │ -_1_5_4 bool _F_i_n_a_l_i_z_e(); │ │ │ │ │ -155 │ │ │ │ │ -157 bool _I_s_V_a_l_i_d() const; │ │ │ │ │ -159 │ │ │ │ │ -160 // │ │ │ │ │ -161 // WIP - need to migrate these comments into Doxygen │ │ │ │ │ -162 // │ │ │ │ │ -163 // Three groups of methods describe the topology around a vertex: │ │ │ │ │ -164 // - simple properties (vertex is a boundary, manifold, etc.) │ │ │ │ │ -165 // - sizes of incident faces (constant or size for each face) │ │ │ │ │ -166 // - sharpness of the vertex and its incident edges (optional) │ │ │ │ │ -167 // │ │ │ │ │ -168 │ │ │ │ │ -169 // Manifold and boundary conditions: │ │ │ │ │ -170 // │ │ │ │ │ -171 // The manifold property is a strict condition but preferred for │ │ │ │ │ -172 // efficiency and is usually available from common connected mesh │ │ │ │ │ -173 // representations. When declaring the topology as "manifold", │ │ │ │ │ -174 // the Factory assumes the following: │ │ │ │ │ -175 // │ │ │ │ │ -176 // - all incident faces are "ordered" (counter-clockwise) │ │ │ │ │ -177 // - all incident faces are consistently oriented │ │ │ │ │ -178 // - all incident edges are non-degenerate │ │ │ │ │ -179 // │ │ │ │ │ -180 // If not certain that all of these conditions are met, it is best │ │ │ │ │ -181 // to not declare manifold -- leaving the Factory to make sense of │ │ │ │ │ -182 // the set of incident faces from the face-vertex indices that are │ │ │ │ │ -183 // provided elsewhere. │ │ │ │ │ -184 // │ │ │ │ │ -185 │ │ │ │ │ -187 │ │ │ │ │ -191 │ │ │ │ │ -193 void _S_e_t_M_a_n_i_f_o_l_d(bool isManifold); │ │ │ │ │ -194 │ │ │ │ │ -196 void _S_e_t_B_o_u_n_d_a_r_y(bool isOnBoundary); │ │ │ │ │ -197 │ │ │ │ │ -199 void _S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int faceIndex, int faceSize); │ │ │ │ │ -200 │ │ │ │ │ -202 void _C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s(); │ │ │ │ │ -203 │ │ │ │ │ -205 void _S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float sharpness); │ │ │ │ │ -206 │ │ │ │ │ -208 void _C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(); │ │ │ │ │ -209 │ │ │ │ │ -221 void _S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex, float edgeSharpness); │ │ │ │ │ -222 │ │ │ │ │ -238 void _S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, float leadingEdgeSharp, │ │ │ │ │ -239 float trailingEdgeSharp); │ │ │ │ │ -240 │ │ │ │ │ -242 void _C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s(); │ │ │ │ │ -244 │ │ │ │ │ -246 │ │ │ │ │ -251 │ │ │ │ │ -253 bool _I_s_M_a_n_i_f_o_l_d() const; │ │ │ │ │ -254 │ │ │ │ │ -256 bool _I_s_B_o_u_n_d_a_r_y() const; │ │ │ │ │ -257 │ │ │ │ │ -259 bool _H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() const; │ │ │ │ │ -260 │ │ │ │ │ -262 int _G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int faceIndex) const; │ │ │ │ │ -263 │ │ │ │ │ -265 bool _H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ -266 │ │ │ │ │ -268 float _G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ -269 │ │ │ │ │ -271 bool _H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ -272 │ │ │ │ │ -274 float _G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex) const; │ │ │ │ │ -275 │ │ │ │ │ -277 void _G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ -278 float * leadingEdgeSharp, float * trailingEdgeSharp) const; │ │ │ │ │ -280 │ │ │ │ │ -281protected: │ │ │ │ │ -283 friend class FaceVertex; │ │ │ │ │ -284 │ │ │ │ │ -285 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r() { } │ │ │ │ │ -286 _~_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r() { } │ │ │ │ │ -287 │ │ │ │ │ -288 typedef Vtr::internal::StackBuffer IntBuffer; │ │ │ │ │ -289 typedef Vtr::internal::StackBuffer FloatBuffer; │ │ │ │ │ -290 │ │ │ │ │ -291 void initFaceSizes(); │ │ │ │ │ -292 void initEdgeSharpness(); │ │ │ │ │ -294 │ │ │ │ │ -295protected: │ │ │ │ │ -297 // Member variables assigned through the above interface: │ │ │ │ │ -298 unsigned short _isValid : 1; │ │ │ │ │ -299 unsigned short _isInitialized : 1; │ │ │ │ │ -300 unsigned short _isFinalized : 1; │ │ │ │ │ -301 │ │ │ │ │ -302 unsigned short _isManifold : 1; │ │ │ │ │ -303 unsigned short _isBoundary : 1; │ │ │ │ │ -304 │ │ │ │ │ -305 unsigned short _hasFaceSizes : 1; │ │ │ │ │ -306 unsigned short _hasEdgeSharpness : 1; │ │ │ │ │ -307 │ │ │ │ │ -308 short _numFaces; │ │ │ │ │ -309 float _vertSharpness; │ │ │ │ │ -310 │ │ │ │ │ -311 FloatBuffer _faceEdgeSharpness; │ │ │ │ │ -312 IntBuffer _faceSizeOffsets; │ │ │ │ │ -314}; │ │ │ │ │ -315 │ │ │ │ │ -316// │ │ │ │ │ -317// Public inline methods for simple assignment: │ │ │ │ │ -318// │ │ │ │ │ -319inline bool │ │ │ │ │ -_3_2_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d() const { │ │ │ │ │ -321 return _isValid; │ │ │ │ │ -322} │ │ │ │ │ -323 │ │ │ │ │ -324inline void │ │ │ │ │ -_3_2_5_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d(bool isManifold) { │ │ │ │ │ -326 _isManifold = isManifold; │ │ │ │ │ -327} │ │ │ │ │ -328inline bool │ │ │ │ │ -_3_2_9_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_M_a_n_i_f_o_l_d() const { │ │ │ │ │ -330 return _isManifold; │ │ │ │ │ -331} │ │ │ │ │ -332 │ │ │ │ │ -333inline void │ │ │ │ │ -_3_3_4_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_B_o_u_n_d_a_r_y(bool isBoundary) { │ │ │ │ │ -335 _isBoundary = isBoundary; │ │ │ │ │ -336} │ │ │ │ │ -337inline bool │ │ │ │ │ -_3_3_8_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_B_o_u_n_d_a_r_y() const { │ │ │ │ │ -339 return _isBoundary; │ │ │ │ │ -340} │ │ │ │ │ -341 │ │ │ │ │ -342// │ │ │ │ │ -343// Public inline methods involving sizes of incident faces: │ │ │ │ │ -344// │ │ │ │ │ -345inline bool │ │ │ │ │ -_3_4_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() const { │ │ │ │ │ -347 return _hasFaceSizes; │ │ │ │ │ -348} │ │ │ │ │ -349inline void │ │ │ │ │ -_3_5_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() { │ │ │ │ │ -351 _hasFaceSizes = false; │ │ │ │ │ -352} │ │ │ │ │ -353 │ │ │ │ │ -354inline void │ │ │ │ │ -_3_5_5_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int incFaceIndex, int faceSize) { │ │ │ │ │ -356 │ │ │ │ │ -357 if (!_hasFaceSizes) initFaceSizes(); │ │ │ │ │ -358 │ │ │ │ │ -359 _faceSizeOffsets[incFaceIndex] = faceSize; │ │ │ │ │ -360} │ │ │ │ │ -361inline int │ │ │ │ │ -_3_6_2_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int incFaceIndex) const { │ │ │ │ │ -363 │ │ │ │ │ -364 return _isFinalized ? │ │ │ │ │ -365 (_faceSizeOffsets[incFaceIndex+1] - _faceSizeOffsets[incFaceIndex]) : │ │ │ │ │ -366 _faceSizeOffsets[incFaceIndex]; │ │ │ │ │ -367} │ │ │ │ │ -368 │ │ │ │ │ -369// │ │ │ │ │ -370// Public inline methods involving vertex sharpness: │ │ │ │ │ -371// │ │ │ │ │ -372inline bool │ │ │ │ │ -_3_7_3_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ -374 return _vertSharpness > 0.0f; │ │ │ │ │ -375} │ │ │ │ │ -376inline void │ │ │ │ │ -_3_7_7_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() { │ │ │ │ │ -378 _vertSharpness = 0.0f; │ │ │ │ │ -379} │ │ │ │ │ -380 │ │ │ │ │ -381inline void │ │ │ │ │ -_3_8_2_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertSharpness) { │ │ │ │ │ -383 _vertSharpness = vertSharpness; │ │ │ │ │ -384} │ │ │ │ │ -385inline float │ │ │ │ │ -_3_8_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ -387 return _vertSharpness; │ │ │ │ │ -388} │ │ │ │ │ -389 │ │ │ │ │ -390// │ │ │ │ │ -391// Public inline methods involving vertex sharpness: │ │ │ │ │ -392// │ │ │ │ │ -393inline bool │ │ │ │ │ -_3_9_4_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ -395 return _hasEdgeSharpness; │ │ │ │ │ -396} │ │ │ │ │ -397inline void │ │ │ │ │ -_3_9_8_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s() { │ │ │ │ │ -399 _hasEdgeSharpness = false; │ │ │ │ │ -400} │ │ │ │ │ -401 │ │ │ │ │ -402inline void │ │ │ │ │ -_4_0_3_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex, float sharpness) { │ │ │ │ │ -404 │ │ │ │ │ -405 if (!_hasEdgeSharpness) initEdgeSharpness(); │ │ │ │ │ -406 │ │ │ │ │ -407 // Assign the leading edge of the face after the edge (even index): │ │ │ │ │ -408 if (edgeIndex < _numFaces) { │ │ │ │ │ -409 _faceEdgeSharpness[2*edgeIndex] = sharpness; │ │ │ │ │ -410 } │ │ │ │ │ -411 │ │ │ │ │ -412 // Assign the trailing edge of the face before the edge (odd index): │ │ │ │ │ -413 if (edgeIndex > 0) { │ │ │ │ │ -414 _faceEdgeSharpness[2*edgeIndex-1] = sharpness; │ │ │ │ │ -415 } else if (!_I_s_B_o_u_n_d_a_r_y()) { │ │ │ │ │ -416 _faceEdgeSharpness[2*_numFaces-1] = sharpness; │ │ │ │ │ -417 } │ │ │ │ │ -418} │ │ │ │ │ -419inline float │ │ │ │ │ -_4_2_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex) const { │ │ │ │ │ -421 │ │ │ │ │ -422 // All edges are first of the pair (even index) except last of boundary │ │ │ │ │ -423 return _faceEdgeSharpness[2*edgeIndex - (edgeIndex == _numFaces)]; │ │ │ │ │ -424} │ │ │ │ │ -425 │ │ │ │ │ -426inline void │ │ │ │ │ -_4_2_7_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ -428 float leadingEdgeSharpness, float trailingEdgeSharpness) { │ │ │ │ │ -429 │ │ │ │ │ -430 if (!_hasEdgeSharpness) initEdgeSharpness(); │ │ │ │ │ -431 │ │ │ │ │ -432 _faceEdgeSharpness[2*faceIndex ] = leadingEdgeSharpness; │ │ │ │ │ -433 _faceEdgeSharpness[2*faceIndex+1] = trailingEdgeSharpness; │ │ │ │ │ -434} │ │ │ │ │ -435inline void │ │ │ │ │ -_4_3_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ -437 float * leadingEdgeSharpness, float * trailingEdgeSharpness) const { │ │ │ │ │ -438 │ │ │ │ │ -439 *leadingEdgeSharpness = _faceEdgeSharpness[2*faceIndex]; │ │ │ │ │ -440 *trailingEdgeSharpness = _faceEdgeSharpness[2*faceIndex+1]; │ │ │ │ │ -441} │ │ │ │ │ -442 │ │ │ │ │ -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 */ │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ _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_:_:_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float GetVertexSharpness() const │ │ │ │ │ -Return the sharpness of the vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_F_i_n_a_l_i_z_e │ │ │ │ │ -bool Finalize() │ │ │ │ │ -Terminate the sequence of specifications. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_S_e_t_M_a_n_i_f_o_l_d │ │ │ │ │ -void SetManifold(bool isManifold) │ │ │ │ │ -Declare the vertex neighborhood as manifold (ordered) │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_n_i_t_i_a_l_i_z_e │ │ │ │ │ -bool Initialize(int numIncidentFaces) │ │ │ │ │ -Initialize specification with the number of incident faces. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_I_s_M_a_n_i_f_o_l_d │ │ │ │ │ -bool IsManifold() const │ │ │ │ │ -Return if vertex neighborhood is manifold. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -bool HasEdgeSharpness() const │ │ │ │ │ -Return if sharpness was assigned to the incident edges. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e │ │ │ │ │ -int GetIncidentFaceSize(int faceIndex) const │ │ │ │ │ -Return the size of an incident face. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float GetManifoldEdgeSharpness(int edgeIndex) const │ │ │ │ │ -Return the sharpness assigned to a manifold edge. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_: │ │ │ │ │ -_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp, float │ │ │ │ │ -trailingEdgeSharp) │ │ │ │ │ -Assign sharpness to the edges of an incident face. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -bool HasVertexSharpness() const │ │ │ │ │ -Return if sharpness was assigned to the vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s │ │ │ │ │ -void ClearIncidentFaceSizes() │ │ │ │ │ -Remove any assigned sizes of incident faces. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void SetVertexSharpness(float sharpness) │ │ │ │ │ -Assign sharpness to the vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void ClearVertexSharpness() │ │ │ │ │ -Remove any sharpness assigned to the vertex. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void ClearEdgeSharpness() │ │ │ │ │ -Remove any sharpness assigned to the incident edges. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_: │ │ │ │ │ -_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void GetIncidentFaceEdgeSharpness(int faceIndex, float *leadingEdgeSharp, float │ │ │ │ │ -*trailingEdgeSharp) const │ │ │ │ │ -Return the sharpness assigned to edges of an incident face. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_B_o_u_n_d_a_r_y │ │ │ │ │ -bool IsBoundary() const │ │ │ │ │ -Return if vertex neighborhood is on a boundary. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d │ │ │ │ │ -bool IsValid() const │ │ │ │ │ -Return if instance is valid. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s │ │ │ │ │ -bool HasIncidentFaceSizes() const │ │ │ │ │ -Return if the sizes of incident faces are assigned. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ -void SetBoundary(bool isOnBoundary) │ │ │ │ │ -Declare the vertex neighborhood as being on a boundary. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e │ │ │ │ │ -void SetIncidentFaceSize(int faceIndex, int faceSize) │ │ │ │ │ -Assign the size of an incident face. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness) │ │ │ │ │ -Assign sharpness to the edge of a manifold neighborhood. │ │ │ │ │ -DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_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_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/refinerSurfaceFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlMesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,49 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinerSurfaceFactory.h File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
mtlMesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/surfaceFactory.h"
│ │ │ │ -#include "../bfr/surfaceFactoryCache.h"
│ │ │ │ +#include "../osd/mesh.h"
│ │ │ │ +#include "../osd/mtlPatchTable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  RefinerSurfaceFactoryBase
 Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. 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
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

typedef MeshInterface< MTLPatchTableMTLMeshInterface
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +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 │ │ │ │ │ -refinerSurfaceFactory.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +mtlMesh.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 "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_m_t_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   _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   _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_:_:_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_:_:_B_f_r │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +typedef _M_e_s_h_I_n_t_e_r_f_a_c_e< _M_T_L_P_a_t_c_h_T_a_b_l_e >  _M_T_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00683.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00683 = [ │ │ │ │ │ - ["RefinerSurfaceFactoryBase", "a00925.html", "a00925"], │ │ │ │ │ - ["RefinerSurfaceFactory< CACHE_TYPE >", "a00929.html", "a00929"] │ │ │ │ │ + ["MTLMeshInterface", "a00683.html#aa41e5b43fe46eeb0f97ff6ebdb1935aa", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00683_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlMesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinerSurfaceFactory.h
│ │ │ │ +
mtlMesh.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,163 +119,44 @@ │ │ │ │
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_OSD_MTL_MESH_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_MESH_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include "../bfr/surfaceFactory.h"
│ │ │ │ -
31#include "../bfr/surfaceFactoryCache.h"
│ │ │ │ +
29#include "../osd/mesh.h"
│ │ │ │ +
30#include "../osd/mtlPatchTable.h"
│ │ │ │ +
31
│ │ │ │
32
│ │ │ │
33namespace OpenSubdiv {
│ │ │ │
34namespace OPENSUBDIV_VERSION {
│ │ │ │
35
│ │ │ │ -
│ │ │ │ -
36namespace Far {
│ │ │ │ -
37 class TopologyRefiner;
│ │ │ │ -
38}
│ │ │ │ -
│ │ │ │ +
36namespace Osd {
│ │ │ │ +
37
│ │ │ │ + │ │ │ │
39
│ │ │ │ -
40namespace Bfr {
│ │ │ │ +
40} // end namespace Osd
│ │ │ │
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;
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ -
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.
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -refinerSurfaceFactory.h │ │ │ │ │ +mtlMesh.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 │ │ │ │ │ +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,222 +24,41 @@ │ │ │ │ │ 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_OSD_MTL_MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_MESH_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../bfr/surfaceFactory.h" │ │ │ │ │ -31#include "../bfr/surfaceFactoryCache.h" │ │ │ │ │ +29#include "../osd/mesh.h" │ │ │ │ │ +30#include "../osd/mtlPatchTable.h" │ │ │ │ │ +31 │ │ │ │ │ 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} │ │ │ │ │ +36namespace Osd { │ │ │ │ │ +37 │ │ │ │ │ +_3_8typedef _M_e_s_h_I_n_t_e_r_f_a_c_e_<_M_T_L_P_a_t_c_h_T_a_b_l_e_> _M_T_L_M_e_s_h_I_n_t_e_r_f_a_c_e; │ │ │ │ │ 39 │ │ │ │ │ -40namespace Bfr { │ │ │ │ │ +40} // end namespace Osd │ │ │ │ │ 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; │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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 */ │ │ │ │ │ +42} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +43using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +44 │ │ │ │ │ +45} // end namespace OpenSubdiv │ │ │ │ │ +46 │ │ │ │ │ +47#endif // OPENSUBDIV3_OSD_MTL_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_:_:_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_:_:_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_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_M_T_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +MeshInterface< MTLPatchTable > MTLMeshInterface │ │ │ │ │ +DDeeffiinniittiioonn _m_t_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 │ │ │ │ │ - * _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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/surfaceFactoryMeshAdapter.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surfaceFactoryMeshAdapter.h File Reference
│ │ │ │ +
mtlVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <cstdint>
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  SurfaceFactoryMeshAdapter
 Abstract interface adapting SurfaceFactory to a connected mesh representation. More...
class  CPUMTLVertexBuffer
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -surfaceFactoryMeshAdapter.h File Reference │ │ │ │ │ +mtlVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +#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   _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   _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_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_:_:_B_f_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 │ │ │ │ │ - * _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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00686.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00686 = [ │ │ │ │ │ - ["SurfaceFactoryMeshAdapter", "a00957.html", "a00957"] │ │ │ │ │ + ["CPUMTLVertexBuffer", "a01301.html", "a01301"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00686_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactoryMeshAdapter.h
│ │ │ │ +
mtlVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,149 +119,97 @@ │ │ │ │
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_OSD_MTL_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │ -
29
│ │ │ │ -
30#include <cstdint>
│ │ │ │ -
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ -
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
29#include "../osd/mtlCommon.h"
│ │ │ │ +
30
│ │ │ │ +
31@protocol MTLDevice;
│ │ │ │ +
32@protocol MTLBuffer;
│ │ │ │ +
33
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │
36
│ │ │ │ -
37class VertexDescriptor;
│ │ │ │ +
37namespace Osd {
│ │ │ │
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.
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40public:
│ │ │ │ +
41 static CPUMTLVertexBuffer* Create(int numElements, int numVertices, MTLContext* context);
│ │ │ │ +
42
│ │ │ │ +
43 void UpdateData(const float* src, int startVertex, int numVertices, MTLContext* context);
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
45 int GetNumElements() const
│ │ │ │ +
46 {
│ │ │ │ +
47 return _numElements;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 int GetNumVertices() const
│ │ │ │ +
51 {
│ │ │ │ +
52 return _numVertices;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 float* BindCpuBuffer();
│ │ │ │ +
56 id<MTLBuffer> BindMTLBuffer(MTLContext* context);
│ │ │ │ +
57
│ │ │ │ +
│ │ │ │ +
58 id<MTLBuffer> BindVBO(MTLContext* context)
│ │ │ │ +
59 {
│ │ │ │ +
60 return BindMTLBuffer(context);
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
63protected:
│ │ │ │ +
64
│ │ │ │ +
65 CPUMTLVertexBuffer(int numElements, int numVertices);
│ │ │ │ +
66
│ │ │ │ +
67 bool allocate(MTLContext* context);
│ │ │ │ +
68
│ │ │ │ +
69private:
│ │ │ │ +
70 int _numElements;
│ │ │ │ +
71 int _numVertices;
│ │ │ │ +
72 id<MTLBuffer> _buffer;
│ │ │ │ +
73 bool _dirty;
│ │ │ │ +
74};
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76} //end namespace Osd
│ │ │ │ +
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)
│ │ │ │ + │ │ │ │ +
id< MTLBuffer > BindMTLBuffer(MTLContext *context)
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surfaceFactoryMeshAdapter.h │ │ │ │ │ +mtlVertexBuffer.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 │ │ │ │ │ +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,179 +24,101 @@ │ │ │ │ │ 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_OSD_MTL_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_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 Bfr { │ │ │ │ │ +29#include "../osd/mtlCommon.h" │ │ │ │ │ +30 │ │ │ │ │ +31@protocol MTLDevice; │ │ │ │ │ +32@protocol MTLBuffer; │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ 36 │ │ │ │ │ -37class VertexDescriptor; │ │ │ │ │ +37namespace Osd { │ │ │ │ │ 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 */ │ │ │ │ │ +_3_9class _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +40public: │ │ │ │ │ +_4_1 static _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r* _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +42 │ │ │ │ │ +_4_3 void _U_p_d_a_t_e_D_a_t_a(const float* src, int startVertex, int numVertices, │ │ │ │ │ +_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +44 │ │ │ │ │ +_4_5 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const │ │ │ │ │ +46 { │ │ │ │ │ +47 return _numElements; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_0 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const │ │ │ │ │ +51 { │ │ │ │ │ +52 return _numVertices; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_5 float* _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ +_5_6 id _B_i_n_d_M_T_L_B_u_f_f_e_r(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +57 │ │ │ │ │ +_5_8 id _B_i_n_d_V_B_O(_M_T_L_C_o_n_t_e_x_t* context) │ │ │ │ │ +59 { │ │ │ │ │ +60 return _B_i_n_d_M_T_L_B_u_f_f_e_r(context); │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +63protected: │ │ │ │ │ +64 │ │ │ │ │ +_6_5 _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +66 │ │ │ │ │ +_6_7 bool _a_l_l_o_c_a_t_e(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +68 │ │ │ │ │ +69private: │ │ │ │ │ +70 int _numElements; │ │ │ │ │ +71 int _numVertices; │ │ │ │ │ +72 id _buffer; │ │ │ │ │ +73 bool _dirty; │ │ │ │ │ +74}; │ │ │ │ │ +75 │ │ │ │ │ +76} //end namespace Osd │ │ │ │ │ +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 │ │ │ │ │ _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_:_:_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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_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_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ +id< MTLBuffer > BindVBO(MTLContext *context) │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CPUMTLVertexBuffer(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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CPUMTLVertexBuffer * Create(int numElements, int numVertices, 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_:_:_C_P_U_M_T_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 │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._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_:_:_C_P_U_M_T_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, 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_:_:_C_P_U_M_T_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 │ │ │ │ │ +DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._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_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_M_T_L_B_u_f_f_e_r │ │ │ │ │ +id< MTLBuffer > BindMTLBuffer(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_:_:_C_P_U_M_T_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_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(MTLContext *context) │ │ │ │ │ * _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 │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/limits.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
limits.h File Reference
│ │ │ │ +
cpuVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../far/types.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Limits
 Simple struct with limits related to topology. More...
class  CpuVertexBuffer
 Concrete vertex buffer class for CPU subdivision. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ +cpuVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#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 │ │ │ │ │ -struct   _L_i_m_i_t_s │ │ │ │ │ -  Simple struct with limits related to topology. _M_o_r_e_._._. │ │ │ │ │ +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_:_:_B_f_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _l_i_m_i_t_s_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00689.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00689 = [ │ │ │ │ │ - ["Limits", "a00917.html", null] │ │ │ │ │ + ["CpuVertexBuffer", "a01169.html", "a01169"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00689_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/limits.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
limits.h
│ │ │ │ +
cpuVertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,55 +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_BFR_LIMITS_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_LIMITS_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H
│ │ │ │
27
│ │ │ │
28#include "../version.h"
│ │ │ │
29
│ │ │ │ -
30#include "../far/types.h"
│ │ │ │ +
30#include <cstddef>
│ │ │ │
31
│ │ │ │ -
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │
34
│ │ │ │ -
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
35namespace Osd {
│ │ │ │
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
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43public:
│ │ │ │ +
45 static CpuVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
46 void *deviceContext = NULL);
│ │ │ │ +
47
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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 │ │ │ │ │ -limits.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 2021 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,49 +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_BFR_LIMITS_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_VERTEX_BUFFER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/types.h" │ │ │ │ │ +30#include │ │ │ │ │ 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 Osd { │ │ │ │ │ 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 │ │ │ │ │ +_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 │ │ │ │ │ -51} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -52using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -53} // end namespace OpenSubdiv │ │ │ │ │ -54 │ │ │ │ │ -55#endif /* OPENSUBDIV3_BFR_LIMITS_H */ │ │ │ │ │ +_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_:_:_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_:_:_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) │ │ │ │ │ +Constructor. │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _l_i_m_i_t_s_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/osd/d3d11VertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,46 +90,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surface.h File Reference
│ │ │ │ +
d3d11VertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/surfaceData.h"
│ │ │ │ -#include "../bfr/parameterization.h"
│ │ │ │ -#include "../vtr/array.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Surface< REAL >
 Encapsulates the limit surface for a face of a mesh. More...
 
struct  Surface< REAL >::PointDescriptor
 Simple struct defining the size and stride of points in arrays. More...
class  D3D11VertexBuffer
 Concrete vertex buffer class for DirectX subdivision and DirectX drawing. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
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 │ │ │ │ │ -surface.h File Reference │ │ │ │ │ +d3d11VertexBuffer.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" │ │ │ │ │ _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_._._. │ │ │ │ │ -  │ │ │ │ │ -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   _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for DirectX subdivision and DirectX │ │ │ │ │ + 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_:_:_B_f_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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,3 @@ │ │ │ │ │ var a00692 = [ │ │ │ │ │ - ["Surface< REAL >", "a00933.html", "a00933"], │ │ │ │ │ - ["PointDescriptor", "a00937.html", "a00937"] │ │ │ │ │ + ["D3D11VertexBuffer", "a01205.html", "a01205"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00692_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surface.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11VertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surface.h
│ │ │ │ +
d3d11VertexBuffer.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,358 +119,93 @@ │ │ │ │
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_OSD_D3D11_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_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 };
│ │ │ │ +
30struct ID3D11Buffer;
│ │ │ │ +
31struct ID3D11Device;
│ │ │ │ +
32struct ID3D11DeviceContext;
│ │ │ │ +
33struct ID3D11UnorderedAccessView;
│ │ │ │ +
34
│ │ │ │ +
35namespace OpenSubdiv {
│ │ │ │ +
36namespace OPENSUBDIV_VERSION {
│ │ │ │ +
37
│ │ │ │ +
38namespace Osd {
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47public:
│ │ │ │ +
49 static D3D11VertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
50 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
51
│ │ │ │ + │ │ │ │ +
54
│ │ │ │ +
57 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
58 ID3D11DeviceContext *deviceContext);
│ │ │ │ +
59
│ │ │ │ +
61 int GetNumElements() const;
│ │ │ │ +
62
│ │ │ │ +
64 int GetNumVertices() const;
│ │ │ │ +
65
│ │ │ │ +
67 ID3D11Buffer *BindD3D11Buffer(ID3D11DeviceContext *deviceContext);
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
70 ID3D11Buffer *BindVBO(ID3D11DeviceContext *deviceContext) {
│ │ │ │ +
71 return BindD3D11Buffer(deviceContext);
│ │ │ │ +
72 }
│ │ │ │
│ │ │ │ -
70
│ │ │ │ -
72 typedef int Index;
│ │ │ │
73
│ │ │ │ -
74public:
│ │ │ │ +
75 ID3D11UnorderedAccessView *BindD3D11UAV(ID3D11DeviceContext *deviceContext);
│ │ │ │
76
│ │ │ │ -
84
│ │ │ │ -
86 bool IsValid() const { return _data.isValid(); }
│ │ │ │ -
87
│ │ │ │ -
89 void Clear() { _data.reinitialize(); }
│ │ │ │ -
90
│ │ │ │ - │ │ │ │ +
77protected:
│ │ │ │ +
79 D3D11VertexBuffer(int numElements, int numVertices);
│ │ │ │ +
80
│ │ │ │ +
81 // Allocates D3D11 buffer
│ │ │ │ +
82 bool allocate(ID3D11Device *device);
│ │ │ │ +
83
│ │ │ │ +
84private:
│ │ │ │ +
85 int _numElements;
│ │ │ │ +
86 int _numVertices;
│ │ │ │ +
87 ID3D11Buffer *_buffer;
│ │ │ │ +
88 ID3D11Buffer *_uploadBuffer;
│ │ │ │ +
89 ID3D11UnorderedAccessView *_uav;
│ │ │ │ +
90};
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92} // end namespace Osd
│ │ │ │
93
│ │ │ │ -
94 Surface(Surface const & src) = default;
│ │ │ │ -
95 Surface& operator=(Surface const & src) = default;
│ │ │ │ -
96 ~Surface() = default;
│ │ │ │ +
94} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
95using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
96
│ │ │ │ +
97} // end namespace OpenSubdiv
│ │ │ │
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 void BoundControlPointsFromMesh(REAL const meshPoints[],
│ │ │ │ -
165 PointDescriptor const & meshPointDesc,
│ │ │ │ -
166 REAL minExtent[],
│ │ │ │ -
167 REAL maxExtent[]) const;
│ │ │ │ -
169
│ │ │ │ -
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.
│ │ │ │ - │ │ │ │ +
99#endif // OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_H
│ │ │ │ + │ │ │ │ +
Concrete vertex buffer class for DirectX subdivision and DirectX drawing.
│ │ │ │ +
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
│ │ │ │ +
void UpdateData(const float *src, int startVertex, int numVertices, ID3D11DeviceContext *deviceContext)
│ │ │ │ +
static D3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11DeviceContext *deviceContext)
Creator. Returns NULL if error.
│ │ │ │ +
D3D11VertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │ +
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
│ │ │ │ +
ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object.
│ │ │ │ + │ │ │ │ +
ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext)
Returns the D3D11 UAV.
│ │ │ │ + │ │ │ │ +
ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object (for Osd::Mesh interface)
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -surface.h │ │ │ │ │ +d3d11VertexBuffer.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 │ │ │ │ │ +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,420 +24,106 @@ │ │ │ │ │ 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_OSD_D3D11_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_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; │ │ │ │ │ +30struct ID3D11Buffer; │ │ │ │ │ +31struct ID3D11Device; │ │ │ │ │ +32struct ID3D11DeviceContext; │ │ │ │ │ +33struct ID3D11UnorderedAccessView; │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Osd { │ │ │ │ │ +39 │ │ │ │ │ +_4_6class _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +47public: │ │ │ │ │ +_4_9 static _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +50 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +51 │ │ │ │ │ +_5_3 virtual _~_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ +54 │ │ │ │ │ +_5_7 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +58 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +59 │ │ │ │ │ +_6_1 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +62 │ │ │ │ │ +_6_4 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +65 │ │ │ │ │ +_6_7 ID3D11Buffer *_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(ID3D11DeviceContext *deviceContext); │ │ │ │ │ +68 │ │ │ │ │ +_7_0 ID3D11Buffer *_B_i_n_d_V_B_O(ID3D11DeviceContext *deviceContext) { │ │ │ │ │ +71 return _B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(deviceContext); │ │ │ │ │ +72 } │ │ │ │ │ 73 │ │ │ │ │ -74public: │ │ │ │ │ +_7_5 ID3D11UnorderedAccessView *_B_i_n_d_D_3_D_1_1_U_A_V(ID3D11DeviceContext *deviceContext); │ │ │ │ │ 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(); │ │ │ │ │ +77protected: │ │ │ │ │ +_7_9 _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +80 │ │ │ │ │ +81 // Allocates D3D11 buffer │ │ │ │ │ +_8_2 bool _a_l_l_o_c_a_t_e(ID3D11Device *device); │ │ │ │ │ +83 │ │ │ │ │ +84private: │ │ │ │ │ +85 int _numElements; │ │ │ │ │ +86 int _numVertices; │ │ │ │ │ +87 ID3D11Buffer *_buffer; │ │ │ │ │ +88 ID3D11Buffer *_uploadBuffer; │ │ │ │ │ +89 ID3D11UnorderedAccessView *_uav; │ │ │ │ │ +90}; │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace Osd │ │ │ │ │ 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; │ │ │ │ │ +94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +96 │ │ │ │ │ +97} // end namespace OpenSubdiv │ │ │ │ │ 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 │ │ │ │ │ -_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 │ │ │ │ │ -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 */ │ │ │ │ │ +99#endif // OPENSUBDIV3_OSD_D3D11_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_:_:_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_:_:_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_:_:_O_s_d_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for DirectX subdivision and DirectX drawing. │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._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_:_:_D_3_D_1_1_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_:_:_D_3_D_1_1_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, │ │ │ │ │ +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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static D3D11VertexBuffer * Create(int numElements, int numVertices, │ │ │ │ │ +ID3D11DeviceContext *deviceContext) │ │ │ │ │ +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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +D3D11VertexBuffer(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_:_:_D_3_D_1_1_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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r │ │ │ │ │ +ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Returns the D3D11 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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual ~D3D11VertexBuffer() │ │ │ │ │ +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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_U_A_V │ │ │ │ │ +ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Returns the D3D11 UAV. │ │ │ │ │ +_O_p_e_n_S_u_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(ID3D11Device *device) │ │ │ │ │ +_O_p_e_n_S_u_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ +ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Returns the D3D11 buffer object (for Osd::Mesh interface) │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_7_0 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/surfaceFactoryCache.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,46 +90,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
surfaceFactoryCache.h File Reference
│ │ │ │ +
glPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/irregularPatchType.h"
│ │ │ │ -#include <map>
│ │ │ │ -#include <cstdint>
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/opengl.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <vector>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ 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  GLPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +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 │ │ │ │ │ -surfaceFactoryCache.h File Reference │ │ │ │ │ +glPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../bfr/irregularPatchType.h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#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 │ │ │ │ │ _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   _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_:_:_B_f_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_:_:_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00695.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00695 = [ │ │ │ │ │ - ["SurfaceFactoryCache", "a00949.html", "a00949"], │ │ │ │ │ - ["SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >", "a00953.html", "a00953"] │ │ │ │ │ + ["GLPatchTable", "a01229.html", "a01229"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00695_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
surfaceFactoryCache.h
│ │ │ │ +
glPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,126 +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_SURFACE_FACTORY_CACHE_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_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 "../bfr/irregularPatchType.h"
│ │ │ │ -
31
│ │ │ │ -
32#include <map>
│ │ │ │ -
33#include <cstdint>
│ │ │ │ -
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:
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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} // 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.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 │ │ │ │ │ -surfaceFactoryCache.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 2021 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,131 +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_BFR_SURFACE_FACTORY_CACHE_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_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 "../bfr/irregularPatchType.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33#include │ │ │ │ │ -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(); │ │ │ │ │ +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(); │ │ │ │ │ +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_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 } │ │ │ │ │ +_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 │ │ │ │ │ -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; │ │ │ │ │ +_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} // end namespace OpenSubdiv │ │ │ │ │ -149 │ │ │ │ │ -150#endif /* OPENSUBDIV3_BFR_SURFACE_FACTORY_CACHE_H */ │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/tessellation.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,44 +90,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
tessellation.h File Reference
│ │ │ │ +
cpuPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../bfr/parameterization.h"
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Tessellation
 Encapsulates a specific tessellation pattern of a Parameterization. More...
 
class  Tessellation::Options
 Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate. More...
class  CpuPatchTable
 Cpu patch table. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +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 │ │ │ │ │ -tessellation.h File Reference │ │ │ │ │ +cpuPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_b_f_r_/_p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._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   _T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -  Encapsulates a specific tessellation pattern of a _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s │ │ │ │ │ - _O_p_t_i_o_n_s configure a _T_e_s_s_e_l_l_a_t_i_o_n to specify the nature of both its │ │ │ │ │ -  results and the structure of the coordinate and facet index arrays that │ │ │ │ │ - its methods will populate. _M_o_r_e_._._. │ │ │ │ │ +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_:_:_B_f_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_:_:_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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _t_e_s_s_e_l_l_a_t_i_o_n_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00698.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00698 = [ │ │ │ │ │ - ["Tessellation", "a00961.html", "a00961"], │ │ │ │ │ - ["Options", "a00965.html", "a00965"] │ │ │ │ │ + ["CpuPatchTable", "a01165.html", "a01165"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00698_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/bfr/tessellation.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
tessellation.h
│ │ │ │ +
cpuPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2021 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,281 +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_BFR_TESSELLATION_H
│ │ │ │ -
26#define OPENSUBDIV3_BFR_TESSELLATION_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 "../bfr/parameterization.h"
│ │ │ │ -
31
│ │ │ │ -
32namespace OpenSubdiv {
│ │ │ │ -
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
30#include <vector>
│ │ │ │ +
31#include "../far/patchDescriptor.h"
│ │ │ │ +
32#include "../osd/nonCopyable.h"
│ │ │ │ +
33#include "../osd/types.h"
│ │ │ │
34
│ │ │ │ -
35namespace Bfr {
│ │ │ │ +
35#include <vector>
│ │ │ │
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52public:
│ │ │ │ -
│ │ │ │ -
65 class Options {
│ │ │ │ -
66 public:
│ │ │ │ -
│ │ │ │ -
67 Options() : _preserveQuads(false), _facetSize4(false),
│ │ │ │ -
68 _coordStride(0), _facetStride(0) { }
│ │ │ │ -
│ │ │ │ +
37namespace OpenSubdiv {
│ │ │ │ +
38namespace OPENSUBDIV_VERSION {
│ │ │ │ +
39
│ │ │ │ +
40namespace Far{
│ │ │ │ +
41 class PatchTable;
│ │ │ │ +
42};
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 explicit CpuPatchTable(const Far::PatchTable *patchTable);
│ │ │ │ + │ │ │ │
69
│ │ │ │ -
72 Options & PreserveQuads(bool on);
│ │ │ │ -
74 bool PreserveQuads() const { return _preserveQuads; }
│ │ │ │ -
75
│ │ │ │ -
78 Options & SetFacetSize(int numIndices);
│ │ │ │ -
79 // @brief Return the number of indices per facet
│ │ │ │ -
80 int GetFacetSize() const { return 3 + (int)_facetSize4; }
│ │ │ │ -
81
│ │ │ │ -
83 Options & SetFacetStride(int stride);
│ │ │ │ -
85 int GetFacetStride() const { return _facetStride; }
│ │ │ │ -
86
│ │ │ │ -
88 Options & SetCoordStride(int stride);
│ │ │ │ -
90 int GetCoordStride() const { return _coordStride; }
│ │ │ │ -
91
│ │ │ │ -
92 private:
│ │ │ │ -
93 unsigned int _preserveQuads : 1;
│ │ │ │ -
94 unsigned int _facetSize4 : 1;
│ │ │ │ -
95
│ │ │ │ -
96 short _coordStride;
│ │ │ │ -
97 short _facetStride;
│ │ │ │ -
98 };
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100public:
│ │ │ │ -
102
│ │ │ │ -
111
│ │ │ │ -
118 Tessellation(Parameterization const & p, int uniformRate,
│ │ │ │ -
119 Options const & options = Options());
│ │ │ │ -
120
│ │ │ │ -
158 Tessellation(Parameterization const & p, int numRates, int const rates[],
│ │ │ │ -
159 Options const & options = Options());
│ │ │ │ -
160
│ │ │ │ -
162 bool IsValid() const { return _isValid; }
│ │ │ │ -
163
│ │ │ │ -
165 Tessellation() = delete;
│ │ │ │ -
166
│ │ │ │ -
167 Tessellation(Tessellation const &) = delete;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
171
│ │ │ │ -
173
│ │ │ │ -
177
│ │ │ │ -
179 Parameterization GetParameterization() const { return _param; }
│ │ │ │ -
180
│ │ │ │ -
182 int GetFaceSize() const { return _param.GetFaceSize(); }
│ │ │ │ -
183
│ │ │ │ -
185 int GetRates(int rates[]) const;
│ │ │ │ -
186
│ │ │ │ -
188 bool IsUniform() const { return _isUniform; }
│ │ │ │ -
190
│ │ │ │ -
192
│ │ │ │ -
203
│ │ │ │ -
205 int GetNumCoords() const { return _numInteriorPoints + _numBoundaryPoints; }
│ │ │ │ -
206
│ │ │ │ -
208 int GetCoordStride() const { return _coordStride; }
│ │ │ │ -
209
│ │ │ │ -
211 int GetNumBoundaryCoords() const { return _numBoundaryPoints; }
│ │ │ │ -
212
│ │ │ │ -
214 int GetNumInteriorCoords() const { return _numInteriorPoints; }
│ │ │ │ -
215
│ │ │ │ -
218 int GetNumEdgeCoords(int edge) const { return _outerRates[edge] - 1; }
│ │ │ │ -
219
│ │ │ │ -
221 template <typename REAL>
│ │ │ │ -
222 int GetCoords(REAL coordTuples[]) const;
│ │ │ │ -
223
│ │ │ │ -
225 template <typename REAL>
│ │ │ │ -
226 int GetBoundaryCoords(REAL coordTuples[]) const;
│ │ │ │ -
227
│ │ │ │ -
229 template <typename REAL>
│ │ │ │ -
230 int GetInteriorCoords(REAL coordTuples[]) const;
│ │ │ │ -
231
│ │ │ │ -
233 template <typename REAL>
│ │ │ │ -
234 int GetVertexCoord(int vertex, REAL coordTuples[]) const;
│ │ │ │ -
235
│ │ │ │ -
238 template <typename REAL>
│ │ │ │ -
239 int GetEdgeCoords(int edge, REAL coordTuples[]) const;
│ │ │ │ -
241
│ │ │ │ -
243
│ │ │ │ -
253
│ │ │ │ -
255 int GetNumFacets() const { return _numFacets; }
│ │ │ │ -
256
│ │ │ │ -
258 int GetFacetSize() const { return _facetSize; }
│ │ │ │ -
259
│ │ │ │ -
261 int GetFacetStride() const { return _facetStride; }
│ │ │ │ -
262
│ │ │ │ -
264 int GetFacets(int facetTuples[]) const;
│ │ │ │ -
266
│ │ │ │ -
268
│ │ │ │ -
283
│ │ │ │ -
285 void TransformFacetCoordIndices(int facetTuples[], int commonOffset);
│ │ │ │ -
286
│ │ │ │ -
289 void TransformFacetCoordIndices(int facetTuples[],
│ │ │ │ -
290 int const boundaryIndices[],
│ │ │ │ -
291 int interiorOffset);
│ │ │ │ -
292
│ │ │ │ -
294 void TransformFacetCoordIndices(int facetTuples[],
│ │ │ │ -
295 int const boundaryIndices[],
│ │ │ │ -
296 int const interiorIndices[]);
│ │ │ │ -
298
│ │ │ │ -
299private:
│ │ │ │ -
300 // Private initialization methods:
│ │ │ │ -
301 bool validateArguments(Parameterization const & p,
│ │ │ │ -
302 int nRates, int const rates[], Options const & options);
│ │ │ │ -
303
│ │ │ │ -
304 void initialize(Parameterization const & p,
│ │ │ │ -
305 int nRates, int const rates[], Options const & options);
│ │ │ │ -
306
│ │ │ │ -
307 void initializeDefaults();
│ │ │ │ -
308 int initializeRates(int nRates, int const rates[]);
│ │ │ │ -
309 void initializeInventoryForParamTri(int sumOfOuterRates);
│ │ │ │ -
310 void initializeInventoryForParamQuad(int sumOfOuterRates);
│ │ │ │ -
311 void initializeInventoryForParamQPoly(int sumOfOuterRates);
│ │ │ │ -
312
│ │ │ │ -
313private:
│ │ │ │ -
314 // Private members:
│ │ │ │ -
315 Parameterization _param;
│ │ │ │ -
316
│ │ │ │ -
317 unsigned short _isValid : 1;
│ │ │ │ -
318 unsigned short _isUniform : 1;
│ │ │ │ -
319 unsigned short _triangulate : 1;
│ │ │ │ -
320 unsigned short _singleFace : 1;
│ │ │ │ -
321 unsigned short _segmentedFace : 1;
│ │ │ │ -
322 unsigned short _triangleFan : 1;
│ │ │ │ -
323 unsigned short _splitQuad : 1;
│ │ │ │ -
324
│ │ │ │ -
325 short _facetSize;
│ │ │ │ -
326 int _facetStride;
│ │ │ │ -
327 int _coordStride;
│ │ │ │ -
328
│ │ │ │ -
329 int _numGivenRates;
│ │ │ │ -
330 int _numBoundaryPoints;
│ │ │ │ -
331 int _numInteriorPoints;
│ │ │ │ -
332 int _numFacets;
│ │ │ │ -
333
│ │ │ │ -
334 int _innerRates[2];
│ │ │ │ -
335 int* _outerRates;
│ │ │ │ -
336 int _outerRatesLocal[4];
│ │ │ │ -
337};
│ │ │ │ -
│ │ │ │ -
338
│ │ │ │ -
339//
│ │ │ │ -
340// Inline implementations:
│ │ │ │ -
341//
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
344 _preserveQuads = on;
│ │ │ │ -
345 return *this;
│ │ │ │ -
346}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
349 _facetSize4 = (numIndices == 4);
│ │ │ │ -
350 return *this;
│ │ │ │ -
351}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
354 _facetStride = (short) stride;
│ │ │ │ -
355 return *this;
│ │ │ │ -
356}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
359 _coordStride = (short) stride;
│ │ │ │ -
360 return *this;
│ │ │ │ -
361}
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
363template <typename REAL>
│ │ │ │ -
364inline int
│ │ │ │ -
│ │ │ │ -
365Tessellation::GetVertexCoord(int vertex, REAL coord[]) const {
│ │ │ │ -
366 _param.GetVertexCoord(vertex, coord);
│ │ │ │ -
367 return 1;
│ │ │ │ -
368}
│ │ │ │ -
│ │ │ │ -
369
│ │ │ │ -
370template <typename REAL>
│ │ │ │ -
371inline int
│ │ │ │ -
│ │ │ │ -
372Tessellation::GetCoords(REAL coordTuples[]) const {
│ │ │ │ -
373 int nCoords = GetBoundaryCoords(coordTuples);
│ │ │ │ -
374 nCoords += GetInteriorCoords(coordTuples + nCoords * _coordStride);
│ │ │ │ -
375 return nCoords;
│ │ │ │ -
376}
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
378} // end namespace Bfr
│ │ │ │ -
379
│ │ │ │ -
380} // end namespace OPENSUBDIV_VERSION
│ │ │ │ -
381using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
382
│ │ │ │ -
383} // end namespace OpenSubdiv
│ │ │ │ -
384
│ │ │ │ -
385#endif /* OPENSUBDIV3_BFR_TESSELLATION */
│ │ │ │ - │ │ │ │ -
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.
│ │ │ │ - │ │ │ │ -
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.
│ │ │ │ -
int GetNumEdgeCoords(int edge) const
Return the number of coordinates within a given edge (excluding those at its end vertices)
│ │ │ │ -
int GetInteriorCoords(REAL coordTuples[]) const
Retrieve the coordinates for the boundary.
│ │ │ │ -
int GetFacetStride() const
Return the number of elements between each facet.
│ │ │ │ -
bool IsUniform() const
Return if the pattern is uniform.
│ │ │ │ -
int GetNumCoords() const
Return the number of coordinates in the entire pattern.
│ │ │ │ -
int GetCoords(REAL coordTuples[]) const
Retrieve the coordinates for the entire pattern.
│ │ │ │ -
void TransformFacetCoordIndices(int facetTuples[], int commonOffset)
Apply a common offset to all facet coordinate indices.
│ │ │ │ -
Tessellation(Parameterization const &p, int numRates, int const rates[], Options const &options=Options())
General constructor providing multiple tessellation rates for a non-uniform tessellation.
│ │ │ │ -
Parameterization GetParameterization() const
Return the Parameterization.
│ │ │ │ -
void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], int interiorOffset)
Reassign indices of boundary coordinates while offseting those of interior coordinates.
│ │ │ │ -
int GetFacetSize() const
Return the number of indices assigned to each facet.
│ │ │ │ -
Tessellation()=delete
Default construction is unavailable.
│ │ │ │ -
Tessellation(Parameterization const &p, int uniformRate, Options const &options=Options())
Simple constructor providing a single uniform tessellation rate.
│ │ │ │ -
int GetFacets(int facetTuples[]) const
Retrieve the facet indices for the entire pattern.
│ │ │ │ -
int GetNumFacets() const
Return the number of facets in the entire pattern.
│ │ │ │ -
int GetNumInteriorCoords() const
Return the number of interior coordinates.
│ │ │ │ -
int GetVertexCoord(int vertex, REAL coordTuples[]) const
Retrieve the coordinate for a given vertex of the face.
│ │ │ │ -
int GetBoundaryCoords(REAL coordTuples[]) const
Retrieve the coordinates for the boundary.
│ │ │ │ - │ │ │ │ -
int GetRates(int rates[]) const
Retrieve the rates assigned.
│ │ │ │ -
bool IsValid() const
Return true if correctly initialized.
│ │ │ │ -
Tessellation & operator=(Tessellation const &)=delete
│ │ │ │ -
int GetEdgeCoords(int edge, REAL coordTuples[]) const
Retrieve the coordinates for a given edge of the face (excluding those at its end vertices)
│ │ │ │ -
Options configure a Tessellation to specify the nature of both its results and the structure of the c...
│ │ │ │ - │ │ │ │ -
int GetCoordStride() const
Return the stride between (u,v) pairs.
│ │ │ │ -
Options & SetFacetSize(int numIndices)
Assign the number of indices per facet (must be 3 or 4, default is 3)
│ │ │ │ -
int GetFacetStride() const
Return the stride between facets.
│ │ │ │ - │ │ │ │ -
Options & SetCoordStride(int stride)
Assign the stride between (u,v) pairs (default is 2)
│ │ │ │ -
Options & SetFacetStride(int stride)
Assign the stride between facets (default is facet size)
│ │ │ │ -
bool PreserveQuads() const
Return if preservation of quads is set.
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 return &_patchArrays[0];
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
73 const int *GetPatchIndexBuffer() const {
│ │ │ │ +
74 return &_indexBuffer[0];
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
77 return &_patchParamBuffer[0];
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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};
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -tessellation.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 2021 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,367 +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_BFR_TESSELLATION_H │ │ │ │ │ -26#define OPENSUBDIV3_BFR_TESSELLATION_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 "../bfr/parameterization.h" │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../far/patchDescriptor.h" │ │ │ │ │ +32#include "../osd/nonCopyable.h" │ │ │ │ │ +33#include "../osd/types.h" │ │ │ │ │ 34 │ │ │ │ │ -35namespace Bfr { │ │ │ │ │ +35#include │ │ │ │ │ 36 │ │ │ │ │ -_5_1class _T_e_s_s_e_l_l_a_t_i_o_n { │ │ │ │ │ -52public: │ │ │ │ │ -_6_5 class _O_p_t_i_o_n_s { │ │ │ │ │ -66 public: │ │ │ │ │ -_6_7 _O_p_t_i_o_n_s() : _preserveQuads(false), _facetSize4(false), │ │ │ │ │ -68 _coordStride(0), _facetStride(0) { } │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ -72 _O_p_t_i_o_n_s & _P_r_e_s_e_r_v_e_Q_u_a_d_s(bool on); │ │ │ │ │ -_7_4 bool _P_r_e_s_e_r_v_e_Q_u_a_d_s() const { return _preserveQuads; } │ │ │ │ │ -75 │ │ │ │ │ -78 _O_p_t_i_o_n_s & _S_e_t_F_a_c_e_t_S_i_z_e(int numIndices); │ │ │ │ │ -79 // @brief Return the number of indices per facet │ │ │ │ │ -_8_0 int _G_e_t_F_a_c_e_t_S_i_z_e() const { return 3 + (int)_facetSize4; } │ │ │ │ │ -81 │ │ │ │ │ -83 _O_p_t_i_o_n_s & _S_e_t_F_a_c_e_t_S_t_r_i_d_e(int stride); │ │ │ │ │ -_8_5 int _G_e_t_F_a_c_e_t_S_t_r_i_d_e() const { return _facetStride; } │ │ │ │ │ -86 │ │ │ │ │ -88 _O_p_t_i_o_n_s & _S_e_t_C_o_o_r_d_S_t_r_i_d_e(int stride); │ │ │ │ │ -_9_0 int _G_e_t_C_o_o_r_d_S_t_r_i_d_e() const { return _coordStride; } │ │ │ │ │ -91 │ │ │ │ │ -92 private: │ │ │ │ │ -93 unsigned int _preserveQuads : 1; │ │ │ │ │ -94 unsigned int _facetSize4 : 1; │ │ │ │ │ -95 │ │ │ │ │ -96 short _coordStride; │ │ │ │ │ -97 short _facetStride; │ │ │ │ │ -98 }; │ │ │ │ │ -99 │ │ │ │ │ -100public: │ │ │ │ │ -102 │ │ │ │ │ -111 │ │ │ │ │ -_1_1_8 _T_e_s_s_e_l_l_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, int uniformRate, │ │ │ │ │ -119 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()); │ │ │ │ │ -120 │ │ │ │ │ -_1_5_8 _T_e_s_s_e_l_l_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, int numRates, int const rates[], │ │ │ │ │ -159 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()); │ │ │ │ │ -160 │ │ │ │ │ -_1_6_2 bool _I_s_V_a_l_i_d() const { return _isValid; } │ │ │ │ │ -163 │ │ │ │ │ -_1_6_5 _T_e_s_s_e_l_l_a_t_i_o_n() = delete; │ │ │ │ │ -166 │ │ │ │ │ -_1_6_7 _T_e_s_s_e_l_l_a_t_i_o_n(_T_e_s_s_e_l_l_a_t_i_o_n const &) = delete; │ │ │ │ │ -_1_6_8 _T_e_s_s_e_l_l_a_t_i_o_n & _o_p_e_r_a_t_o_r_=(_T_e_s_s_e_l_l_a_t_i_o_n const &) = delete; │ │ │ │ │ -_1_6_9 _~_T_e_s_s_e_l_l_a_t_i_o_n(); │ │ │ │ │ -171 │ │ │ │ │ -173 │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 _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 _param; } │ │ │ │ │ -180 │ │ │ │ │ -_1_8_2 int _G_e_t_F_a_c_e_S_i_z_e() const { return _param._G_e_t_F_a_c_e_S_i_z_e(); } │ │ │ │ │ -183 │ │ │ │ │ -_1_8_5 int _G_e_t_R_a_t_e_s(int rates[]) const; │ │ │ │ │ -186 │ │ │ │ │ -_1_8_8 bool _I_s_U_n_i_f_o_r_m() const { return _isUniform; } │ │ │ │ │ -190 │ │ │ │ │ -192 │ │ │ │ │ -203 │ │ │ │ │ -_2_0_5 int _G_e_t_N_u_m_C_o_o_r_d_s() const { return _numInteriorPoints + _numBoundaryPoints; │ │ │ │ │ -} │ │ │ │ │ -206 │ │ │ │ │ -_2_0_8 int _G_e_t_C_o_o_r_d_S_t_r_i_d_e() const { return _coordStride; } │ │ │ │ │ -209 │ │ │ │ │ -_2_1_1 int _G_e_t_N_u_m_B_o_u_n_d_a_r_y_C_o_o_r_d_s() const { return _numBoundaryPoints; } │ │ │ │ │ -212 │ │ │ │ │ -_2_1_4 int _G_e_t_N_u_m_I_n_t_e_r_i_o_r_C_o_o_r_d_s() const { return _numInteriorPoints; } │ │ │ │ │ -215 │ │ │ │ │ -_2_1_8 int _G_e_t_N_u_m_E_d_g_e_C_o_o_r_d_s(int edge) const { return _outerRates[edge] - 1; } │ │ │ │ │ -219 │ │ │ │ │ -221 template │ │ │ │ │ -222 int _G_e_t_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ -223 │ │ │ │ │ -225 template │ │ │ │ │ -_2_2_6 int _G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ -227 │ │ │ │ │ -229 template │ │ │ │ │ -_2_3_0 int _G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ -231 │ │ │ │ │ -233 template │ │ │ │ │ -234 int _G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertex, REAL coordTuples[]) const; │ │ │ │ │ -235 │ │ │ │ │ -238 template │ │ │ │ │ -_2_3_9 int _G_e_t_E_d_g_e_C_o_o_r_d_s(int edge, REAL coordTuples[]) const; │ │ │ │ │ -241 │ │ │ │ │ -243 │ │ │ │ │ -253 │ │ │ │ │ -_2_5_5 int _G_e_t_N_u_m_F_a_c_e_t_s() const { return _numFacets; } │ │ │ │ │ -256 │ │ │ │ │ -_2_5_8 int _G_e_t_F_a_c_e_t_S_i_z_e() const { return _facetSize; } │ │ │ │ │ -259 │ │ │ │ │ -_2_6_1 int _G_e_t_F_a_c_e_t_S_t_r_i_d_e() const { return _facetStride; } │ │ │ │ │ -262 │ │ │ │ │ -_2_6_4 int _G_e_t_F_a_c_e_t_s(int facetTuples[]) const; │ │ │ │ │ -266 │ │ │ │ │ -268 │ │ │ │ │ -283 │ │ │ │ │ -_2_8_5 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], int commonOffset); │ │ │ │ │ -286 │ │ │ │ │ -_2_8_9 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], │ │ │ │ │ -290 int const boundaryIndices[], │ │ │ │ │ -291 int interiorOffset); │ │ │ │ │ -292 │ │ │ │ │ -_2_9_4 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], │ │ │ │ │ -295 int const boundaryIndices[], │ │ │ │ │ -296 int const interiorIndices[]); │ │ │ │ │ -298 │ │ │ │ │ -299private: │ │ │ │ │ -300 // Private initialization methods: │ │ │ │ │ -301 bool validateArguments(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, │ │ │ │ │ -302 int nRates, int const rates[], _O_p_t_i_o_n_s const & options); │ │ │ │ │ -303 │ │ │ │ │ -304 void initialize(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, │ │ │ │ │ -305 int nRates, int const rates[], _O_p_t_i_o_n_s const & options); │ │ │ │ │ -306 │ │ │ │ │ -307 void initializeDefaults(); │ │ │ │ │ -308 int initializeRates(int nRates, int const rates[]); │ │ │ │ │ -309 void initializeInventoryForParamTri(int sumOfOuterRates); │ │ │ │ │ -310 void initializeInventoryForParamQuad(int sumOfOuterRates); │ │ │ │ │ -311 void initializeInventoryForParamQPoly(int sumOfOuterRates); │ │ │ │ │ -312 │ │ │ │ │ -313private: │ │ │ │ │ -314 // Private members: │ │ │ │ │ -315 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _param; │ │ │ │ │ -316 │ │ │ │ │ -317 unsigned short _isValid : 1; │ │ │ │ │ -318 unsigned short _isUniform : 1; │ │ │ │ │ -319 unsigned short _triangulate : 1; │ │ │ │ │ -320 unsigned short _singleFace : 1; │ │ │ │ │ -321 unsigned short _segmentedFace : 1; │ │ │ │ │ -322 unsigned short _triangleFan : 1; │ │ │ │ │ -323 unsigned short _splitQuad : 1; │ │ │ │ │ -324 │ │ │ │ │ -325 short _facetSize; │ │ │ │ │ -326 int _facetStride; │ │ │ │ │ -327 int _coordStride; │ │ │ │ │ -328 │ │ │ │ │ -329 int _numGivenRates; │ │ │ │ │ -330 int _numBoundaryPoints; │ │ │ │ │ -331 int _numInteriorPoints; │ │ │ │ │ -332 int _numFacets; │ │ │ │ │ -333 │ │ │ │ │ -334 int _innerRates[2]; │ │ │ │ │ -335 int* _outerRates; │ │ │ │ │ -336 int _outerRatesLocal[4]; │ │ │ │ │ -337}; │ │ │ │ │ -338 │ │ │ │ │ -339// │ │ │ │ │ -340// Inline implementations: │ │ │ │ │ -341// │ │ │ │ │ -342inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_3_4_3_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_P_r_e_s_e_r_v_e_Q_u_a_d_s(bool on) { │ │ │ │ │ -344 _preserveQuads = on; │ │ │ │ │ -345 return *this; │ │ │ │ │ -346} │ │ │ │ │ -347inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_3_4_8_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_i_z_e(int numIndices) { │ │ │ │ │ -349 _facetSize4 = (numIndices == 4); │ │ │ │ │ -350 return *this; │ │ │ │ │ -351} │ │ │ │ │ -352inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_3_5_3_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_t_r_i_d_e(int stride) { │ │ │ │ │ -354 _facetStride = (short) stride; │ │ │ │ │ -355 return *this; │ │ │ │ │ -356} │ │ │ │ │ -357inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ -_3_5_8_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_o_o_r_d_S_t_r_i_d_e(int stride) { │ │ │ │ │ -359 _coordStride = (short) stride; │ │ │ │ │ -360 return *this; │ │ │ │ │ -361} │ │ │ │ │ -362 │ │ │ │ │ -363template │ │ │ │ │ -364inline int │ │ │ │ │ -_3_6_5_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertex, REAL coord[]) const { │ │ │ │ │ -366 _param._G_e_t_V_e_r_t_e_x_C_o_o_r_d(vertex, coord); │ │ │ │ │ -367 return 1; │ │ │ │ │ -368} │ │ │ │ │ -369 │ │ │ │ │ -370template │ │ │ │ │ -371inline int │ │ │ │ │ -_3_7_2_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_s(REAL coordTuples[]) const { │ │ │ │ │ -373 int nCoords = _G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s(coordTuples); │ │ │ │ │ -374 nCoords += _G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s(coordTuples + nCoords * _coordStride); │ │ │ │ │ -375 return nCoords; │ │ │ │ │ -376} │ │ │ │ │ -377 │ │ │ │ │ -378} // end namespace Bfr │ │ │ │ │ -379 │ │ │ │ │ -380} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -381using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -382 │ │ │ │ │ -383} // end namespace OpenSubdiv │ │ │ │ │ -384 │ │ │ │ │ -385#endif /* OPENSUBDIV3_BFR_TESSELLATION */ │ │ │ │ │ +_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 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 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 │ │ │ │ │ +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_:_:_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_:_:_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -Encapsulates a specific tessellation pattern of a Parameterization. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ -int GetFaceSize() const │ │ │ │ │ -Return the size of the face. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_1_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_B_o_u_n_d_a_r_y_C_o_o_r_d_s │ │ │ │ │ -int GetNumBoundaryCoords() const │ │ │ │ │ -Return the number of boundary coordinates. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_~_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -~Tessellation() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ -void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], │ │ │ │ │ -int const interiorIndices[]) │ │ │ │ │ -Reassign all facet coordinate indices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ -int GetCoordStride() const │ │ │ │ │ -Return the number of elements between each coordinate. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_E_d_g_e_C_o_o_r_d_s │ │ │ │ │ -int GetNumEdgeCoords(int edge) const │ │ │ │ │ -Return the number of coordinates within a given edge (excluding those at its │ │ │ │ │ -end vertices) │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s │ │ │ │ │ -int GetInteriorCoords(REAL coordTuples[]) const │ │ │ │ │ -Retrieve the coordinates for the boundary. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ -int GetFacetStride() const │ │ │ │ │ -Return the number of elements between each facet. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ -bool IsUniform() const │ │ │ │ │ -Return if the pattern is uniform. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_C_o_o_r_d_s │ │ │ │ │ -int GetNumCoords() const │ │ │ │ │ -Return the number of coordinates in the entire pattern. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_s │ │ │ │ │ -int GetCoords(REAL coordTuples[]) const │ │ │ │ │ -Retrieve the coordinates for the entire pattern. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ -void TransformFacetCoordIndices(int facetTuples[], int commonOffset) │ │ │ │ │ -Apply a common offset to all facet coordinate indices. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -Tessellation(Parameterization const &p, int numRates, int const rates[], │ │ │ │ │ -Options const &options=Options()) │ │ │ │ │ -General constructor providing multiple tessellation rates for a non-uniform │ │ │ │ │ -tessellation. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_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 _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ -void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], │ │ │ │ │ -int interiorOffset) │ │ │ │ │ -Reassign indices of boundary coordinates while offseting those of interior │ │ │ │ │ -coordinates. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ -int GetFacetSize() const │ │ │ │ │ -Return the number of indices assigned to each facet. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -Tessellation()=delete │ │ │ │ │ -Default construction is unavailable. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -Tessellation(Parameterization const &p, int uniformRate, Options const │ │ │ │ │ -&options=Options()) │ │ │ │ │ -Simple constructor providing a single uniform tessellation rate. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_s │ │ │ │ │ -int GetFacets(int facetTuples[]) const │ │ │ │ │ -Retrieve the facet indices for the entire pattern. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_F_a_c_e_t_s │ │ │ │ │ -int GetNumFacets() const │ │ │ │ │ -Return the number of facets in the entire pattern. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_I_n_t_e_r_i_o_r_C_o_o_r_d_s │ │ │ │ │ -int GetNumInteriorCoords() const │ │ │ │ │ -Return the number of interior coordinates. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d │ │ │ │ │ -int GetVertexCoord(int vertex, REAL coordTuples[]) const │ │ │ │ │ -Retrieve the coordinate for a given vertex of the face. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s │ │ │ │ │ -int GetBoundaryCoords(REAL coordTuples[]) const │ │ │ │ │ -Retrieve the coordinates for the boundary. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ -Tessellation(Tessellation 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_R_a_t_e_s │ │ │ │ │ -int GetRates(int rates[]) const │ │ │ │ │ -Retrieve the rates assigned. │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_I_s_V_a_l_i_d │ │ │ │ │ -bool IsValid() const │ │ │ │ │ -Return true if correctly initialized. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_1_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -Tessellation & operator=(Tessellation 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_E_d_g_e_C_o_o_r_d_s │ │ │ │ │ -int GetEdgeCoords(int edge, REAL coordTuples[]) const │ │ │ │ │ -Retrieve the coordinates for a given edge of the face (excluding those at its │ │ │ │ │ -end 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options configure a Tessellation to specify the nature of both its results and │ │ │ │ │ -the structure of the c... │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options() │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ -int GetCoordStride() const │ │ │ │ │ -Return the stride between (u,v) pairs. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ -Options & SetFacetSize(int numIndices) │ │ │ │ │ -Assign the number of indices per facet (must be 3 or 4, default is 3) │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ -int GetFacetStride() const │ │ │ │ │ -Return the stride between facets. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ -int GetFacetSize() const │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ -Options & SetCoordStride(int stride) │ │ │ │ │ -Assign the stride between (u,v) pairs (default is 2) │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ -Options & SetFacetStride(int stride) │ │ │ │ │ -Assign the stride between facets (default is facet size) │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_P_r_e_s_e_r_v_e_Q_u_a_d_s │ │ │ │ │ -bool PreserveQuads() const │ │ │ │ │ -Return if preservation of quads is set. │ │ │ │ │ -DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _b_f_r │ │ │ │ │ - * _t_e_s_s_e_l_l_a_t_i_o_n_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00701.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/refinement.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,40 +88,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinement.h File Reference
│ │ │ │ +
cpuEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../vtr/types.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ -#include <vector>
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  CpuEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinement.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cpuEvaluator.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 │ │ │ │ │ +#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 │ │ │ │ │ +  │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00701_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/refinement.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.h
│ │ │ │ +
cpuEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 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,457 +118,530 @@ │ │ │ │
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
│ │ │ │ -
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"
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29#include "../osd/bufferDescriptor.h"
│ │ │ │ +
30#include "../osd/types.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <cstddef>
│ │ │ │
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;
│ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
36
│ │ │ │ +
37namespace Osd {
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40public:
│ │ │ │
46
│ │ │ │ -
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();
│ │ │ │ -
74
│ │ │ │ -
75 Level const& parent() const { return *_parent; }
│ │ │ │ -
76 Level const& child() const { return *_child; }
│ │ │ │ -
77 Level& child() { return *_child; }
│ │ │ │ +
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 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
│ │ │ │ -
113 unsigned int _sparse : 1;
│ │ │ │ -
114 unsigned int _faceVertsFirst : 1;
│ │ │ │ -
115 unsigned int _minimalTopology : 1;
│ │ │ │ -
116
│ │ │ │ -
117 // Still under consideration:
│ │ │ │ -
118 //unsigned int _childToParentMap : 1;
│ │ │ │ -
119 };
│ │ │ │ -
120
│ │ │ │ -
121 void refine(Options options = Options());
│ │ │ │ -
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:
│ │ │ │ -
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) { }
│ │ │ │ -
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}
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -refinement.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 2014 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,545 +23,656 @@ │ │ │ │ │ 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 │ │ │ │ │ -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" │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29#include "../osd/bufferDescriptor.h" │ │ │ │ │ +30#include "../osd/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 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; │ │ │ │ │ +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// │ │ │ │ │ -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 │ │ │ │ │ -75 Level const& parent() const { return *_parent; } │ │ │ │ │ -76 Level const& child() const { return *_child; } │ │ │ │ │ -77 Level& child() { return *_child; } │ │ │ │ │ +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 _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 │ │ │ │ │ -113 unsigned int _sparse : 1; │ │ │ │ │ -114 unsigned int _faceVertsFirst : 1; │ │ │ │ │ -115 unsigned int _minimalTopology : 1; │ │ │ │ │ -116 │ │ │ │ │ -117 // Still under consideration: │ │ │ │ │ -118 //unsigned int _childToParentMap : 1; │ │ │ │ │ -119 }; │ │ │ │ │ -120 │ │ │ │ │ -121 void refine(Options options = Options()); │ │ │ │ │ -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: │ │ │ │ │ -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) { } │ │ │ │ │ -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} │ │ │ │ │ +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 │ │ │ │ │ -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 */ │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ +*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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00704.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/level.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/bufferDescriptor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
level.h File Reference
│ │ │ │ +
bufferDescriptor.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 <vector>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │ +#include <string.h>
│ │ │ │
│ │ │ │

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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -level.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +bufferDescriptor.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 │ │ │ │ │ -#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 │ │ │ │ │ +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_:_:_V_t_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _l_e_v_e_l_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00704_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/level.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/bufferDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
level.h
│ │ │ │ +
bufferDescriptor.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 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,882 +118,113 @@ │ │ │ │
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
│ │ │ │ -
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"
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29#include <string.h>
│ │ │ │ +
30
│ │ │ │ +
31namespace OpenSubdiv {
│ │ │ │ +
32namespace OPENSUBDIV_VERSION {
│ │ │ │
33
│ │ │ │ -
34#include <algorithm>
│ │ │ │ -
35#include <vector>
│ │ │ │ -
36#include <cassert>
│ │ │ │ -
37#include <cstring>
│ │ │ │ -
38
│ │ │ │ -
39
│ │ │ │ -
40namespace OpenSubdiv {
│ │ │ │ -
41namespace OPENSUBDIV_VERSION {
│ │ │ │ -
42
│ │ │ │ -
43namespace Vtr {
│ │ │ │ -
44namespace internal {
│ │ │ │ -
45
│ │ │ │ -
46class Refinement;
│ │ │ │ -
47class TriRefinement;
│ │ │ │ -
48class QuadRefinement;
│ │ │ │ -
49class FVarRefinement;
│ │ │ │ -
50class FVarLevel;
│ │ │ │ -
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).
│ │ │ │ +
│ │ │ │ +
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//
│ │ │ │ -
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 {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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() { }
│ │ │ │ -
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)); }
│ │ │ │ +
│ │ │ │ +
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 typedef unsigned short VTagSize;
│ │ │ │ +
105} // end namespace Osd
│ │ │ │ +
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 │ │ │ │ │ -level.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 2014 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,986 +23,126 @@ │ │ │ │ │ 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 │ │ │ │ │ -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" │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29#include │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ 33 │ │ │ │ │ -34#include │ │ │ │ │ -35#include │ │ │ │ │ -36#include │ │ │ │ │ -37#include │ │ │ │ │ -38 │ │ │ │ │ -39 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ -42 │ │ │ │ │ -43namespace Vtr { │ │ │ │ │ -44namespace internal { │ │ │ │ │ -45 │ │ │ │ │ -46class Refinement; │ │ │ │ │ -47class TriRefinement; │ │ │ │ │ -48class QuadRefinement; │ │ │ │ │ -49class FVarRefinement; │ │ │ │ │ -50class FVarLevel; │ │ │ │ │ -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). │ │ │ │ │ +_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// │ │ │ │ │ -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 { │ │ │ │ │ +_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 } │ │ │ │ │ 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() { } │ │ │ │ │ -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)); } │ │ │ │ │ +_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 typedef unsigned short VTagSize; │ │ │ │ │ +105} // end namespace Osd │ │ │ │ │ 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 _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 */ │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _l_e_v_e_l_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00707.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/fvarRefinement.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
fvarRefinement.h File Reference
│ │ │ │ +
mtlComputeEvaluator.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 <vector>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  MTLStencilTable
 
class  MTLComputeEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,29 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -fvarRefinement.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +mtlComputeEvaluator.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 │ │ │ │ │ +#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 │ │ │ │ │ +  │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00707_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/fvarRefinement.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
fvarRefinement.h
│ │ │ │ +
mtlComputeEvaluator.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,115 +118,1139 @@ │ │ │ │
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
│ │ │ │ -
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>
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
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();
│ │ │ │ +
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 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 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 //
│ │ │ │ -
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;
│ │ │ │ +
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
│ │ │ │ -
96 Level const & _parentLevel;
│ │ │ │ -
97 FVarLevel const & _parentFVar;
│ │ │ │ -
98
│ │ │ │ -
99 Level const & _childLevel;
│ │ │ │ -
100 FVarLevel & _childFVar;
│ │ │ │ + │ │ │ │ +
97 BufferDescriptor const &dstDesc,
│ │ │ │ +
98 BufferDescriptor const &duDesc,
│ │ │ │ +
99 BufferDescriptor const &dvDesc,
│ │ │ │ +
100 MTLContext* context);
│ │ │ │
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 */
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -fvarRefinement.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 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,118 +23,1383 @@ │ │ │ │ │ 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 │ │ │ │ │ -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 │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_COMPUTE_EVALUATOR_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +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 │ │ │ │ │ -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 } │ │ │ │ │ -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(); │ │ │ │ │ +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 _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 │ │ │ │ │ -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 // │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -96 Level const & _parentLevel; │ │ │ │ │ -97 FVarLevel const & _parentFVar; │ │ │ │ │ -98 │ │ │ │ │ -99 Level const & _childLevel; │ │ │ │ │ -100 FVarLevel & _childFVar; │ │ │ │ │ +_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 │ │ │ │ │ -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 */ │ │ │ │ │ +_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_:_:_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_:_:_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_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00710.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/sparseSelector.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,38 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
sparseSelector.h File Reference
│ │ │ │ +
d3d11LegacyGregoryPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../vtr/types.h"
│ │ │ │ -#include "../vtr/refinement.h"
│ │ │ │ -#include <vector>
│ │ │ │ +#include "../far/patchTable.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  D3D11LegacyGregoryPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -sparseSelector.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ #include "../version.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 │ │ │ │ │ +#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_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_:_:_V_t_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00710_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/sparseSelector.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
sparseSelector.h
│ │ │ │ +
d3d11LegacyGregoryPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 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,98 +118,123 @@ │ │ │ │
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
│ │ │ │ -
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 {
│ │ │ │ -
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; }
│ │ │ │ +
24
│ │ │ │ +
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
│ │ │ │ +
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 {
│ │ │ │ +
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);
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
62 ID3D11ShaderResourceView* GetVertexSRV() const {
│ │ │ │ +
63 return _vertexSRV;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │
65
│ │ │ │ -
66 bool isSelectionEmpty() const { return !_selected; }
│ │ │ │ -
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();
│ │ │ │ -
88
│ │ │ │ -
89private:
│ │ │ │ -
90 Refinement* _refine;
│ │ │ │ -
91 bool _selected;
│ │ │ │ -
92};
│ │ │ │ +
│ │ │ │ +
66 ID3D11ShaderResourceView* GetVertexValenceSRV() const {
│ │ │ │ +
67 return _vertexValenceSRV;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 ID3D11ShaderResourceView* GetQuadOffsetsSRV() const {
│ │ │ │ +
71 return _quadOffsetsSRV;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
76 return _quadOffsetsBase[1];
│ │ │ │ +
77 }
│ │ │ │ +
78 return _quadOffsetsBase[0];
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
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} // end namespace internal
│ │ │ │ -
95} // end namespace Vtr
│ │ │ │ +
94
│ │ │ │ +
95} // end namespace Osd
│ │ │ │
96
│ │ │ │ -
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
97} // end namespace OPENSUBDIV_VERSION
│ │ │ │
98using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
99} // end namespace OpenSubdiv
│ │ │ │ -
100
│ │ │ │ -
101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -sparseSelector.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 2014 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,111 +23,135 @@ │ │ │ │ │ 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 │ │ │ │ │ -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 { │ │ │ │ │ -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; } │ │ │ │ │ +24 │ │ │ │ │ +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 │ │ │ │ │ +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 { │ │ │ │ │ +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); │ │ │ │ │ +61 │ │ │ │ │ +_6_2 ID3D11ShaderResourceView* _G_e_t_V_e_r_t_e_x_S_R_V() const { │ │ │ │ │ +63 return _vertexSRV; │ │ │ │ │ +64 } │ │ │ │ │ 65 │ │ │ │ │ -66 bool isSelectionEmpty() const { return !_selected; } │ │ │ │ │ -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(); │ │ │ │ │ -88 │ │ │ │ │ -89private: │ │ │ │ │ -90 Refinement* _refine; │ │ │ │ │ -91 bool _selected; │ │ │ │ │ -92}; │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ +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} // end namespace internal │ │ │ │ │ -95} // end namespace Vtr │ │ │ │ │ +94 │ │ │ │ │ +95} // end namespace Osd │ │ │ │ │ 96 │ │ │ │ │ 97} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ 98using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -99} // end namespace OpenSubdiv │ │ │ │ │ -100 │ │ │ │ │ -101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */ │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00713.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/componentInterfaces.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,40 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
componentInterfaces.h File Reference
│ │ │ │ +
glslPatchShaderSource.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/crease.h"
│ │ │ │ -#include "../vtr/types.h"
│ │ │ │ -#include "../vtr/stackBuffer.h"
│ │ │ │ -#include <vector>
│ │ │ │ +#include <string>
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  GLSLPatchShaderSource
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -componentInterfaces.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +glslPatchShaderSource.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_/_s_t_a_c_k_B_u_f_f_e_r_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_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_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_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 │ │ │ │ │ +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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00713_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/componentInterfaces.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
componentInterfaces.h
│ │ │ │ +
glslPatchShaderSource.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 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,155 +118,65 @@ │ │ │ │
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
│ │ │ │ -
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"
│ │ │ │ -
33
│ │ │ │ -
34#include <vector>
│ │ │ │ -
35
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29#include <string>
│ │ │ │ +
30#include "../far/patchDescriptor.h"
│ │ │ │ +
31
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
34
│ │ │ │ +
35namespace Osd {
│ │ │ │
36
│ │ │ │ -
37namespace OpenSubdiv {
│ │ │ │ -
38namespace OPENSUBDIV_VERSION {
│ │ │ │ -
39
│ │ │ │ -
40namespace Vtr {
│ │ │ │ -
41namespace internal {
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38public:
│ │ │ │ +
39 static std::string GetCommonShaderSource();
│ │ │ │ +
40
│ │ │ │ +
41 static std::string GetPatchBasisShaderSource();
│ │ │ │
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//
│ │ │ │ -
51
│ │ │ │ +
43 static std::string GetVertexShaderSource(
│ │ │ │ + │ │ │ │ +
45
│ │ │ │ +
46 static std::string GetTessControlShaderSource(
│ │ │ │ + │ │ │ │ +
48
│ │ │ │ +
49 static std::string GetTessEvalShaderSource(
│ │ │ │ + │ │ │ │ +
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); }
│ │ │ │ -
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;
│ │ │ │ -
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 */
│ │ │ │ - │ │ │ │ -
ConstArray< Index > ConstIndexArray
Definition types.h:80
│ │ │ │ +
53} // end namespace Osd
│ │ │ │ +
54
│ │ │ │ +
55} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
56using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
57
│ │ │ │ +
58} // end namespace OpenSubdiv
│ │ │ │ +
59
│ │ │ │ +
60#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ +
static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type)
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -componentInterfaces.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 2014 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,158 +23,70 @@ │ │ │ │ │ 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 │ │ │ │ │ -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" │ │ │ │ │ -33 │ │ │ │ │ -34#include │ │ │ │ │ -35 │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29#include │ │ │ │ │ +30#include "../far/patchDescriptor.h" │ │ │ │ │ +31 │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +35namespace Osd { │ │ │ │ │ 36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ -39 │ │ │ │ │ -40namespace Vtr { │ │ │ │ │ -41namespace internal { │ │ │ │ │ +_3_7class _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ +38public: │ │ │ │ │ +_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +40 │ │ │ │ │ +_4_1 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(); │ │ │ │ │ 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// │ │ │ │ │ -51 │ │ │ │ │ +_4_3 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ +44 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +45 │ │ │ │ │ +_4_6 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( │ │ │ │ │ +47 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +48 │ │ │ │ │ +_4_9 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( │ │ │ │ │ +50 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +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); } │ │ │ │ │ -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; │ │ │ │ │ -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; │ │ │ │ │ -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 */ │ │ │ │ │ +53} // end namespace Osd │ │ │ │ │ +54 │ │ │ │ │ +55} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +56using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +57 │ │ │ │ │ +58} // end namespace OpenSubdiv │ │ │ │ │ +59 │ │ │ │ │ +60#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_:_:_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_:_:_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 │ │ │ │ │ +DDeeffiinniittiioonn _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_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_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() │ │ │ │ │ +_O_p_e_n_S_u_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/vtr/stackBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,35 +88,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
stackBuffer.h File Reference
│ │ │ │ +
mtlPatchTable.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../far/patchDescriptor.h"
│ │ │ │ +#include "../osd/nonCopyable.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include "../osd/mtlCommon.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  MTLPatchTable
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,28 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -stackBuffer.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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_/_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 │ │ │ │ │ +  │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00716_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/stackBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
stackBuffer.h
│ │ │ │ +
mtlPatchTable.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2015 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,223 +118,124 @@ │ │ │ │
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
│ │ │ │ -
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.
│ │ │ │ -
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();
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.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
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59 static MTLPatchTable *Create(Far::PatchTable const *farPatchTable, MTLContext* context);
│ │ │ │
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
│ │ │ │ -
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();
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
77
│ │ │ │ +
78 id<MTLBuffer> _indexBuffer;
│ │ │ │ +
79 id<MTLBuffer> _patchParamBuffer;
│ │ │ │ +
80
│ │ │ │ + │ │ │ │ +
82
│ │ │ │ + │ │ │ │
84
│ │ │ │ -
85private:
│ │ │ │ -
86 TYPE * _data;
│ │ │ │ -
87 size_type _size;
│ │ │ │ -
88 size_type _capacity;
│ │ │ │ +
85 std::vector<PatchArrayVector> _fvarPatchArrays;
│ │ │ │ +
86 std::vector<id<MTLBuffer>> _fvarIndexBuffers;
│ │ │ │ +
87 std::vector<id<MTLBuffer>> _fvarParamBuffers;
│ │ │ │ +
88};
│ │ │ │ +
│ │ │ │
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
│ │ │ │ +
90} // end namespace Osd
│ │ │ │ +
91
│ │ │ │ +
92} //end namespace OPENSUBDIV_VERSION
│ │ │ │ +
93using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
94
│ │ │ │ +
95} //end namespace OpenSubdiv
│ │ │ │
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
│ │ │ │ -
113template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
│ │ │ │ -
114inline void
│ │ │ │ -
115StackBuffer<TYPE,SIZE,POD_TYPE>::deallocate() {
│ │ │ │ -
116
│ │ │ │ -
117 ::operator delete(_dynamicData);
│ │ │ │ -
118
│ │ │ │ -
119 _data = reinterpret_cast<TYPE*>(_staticData);
│ │ │ │ -
120 _capacity = SIZE;
│ │ │ │ -
121}
│ │ │ │ -
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) {
│ │ │ │ -
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) {
│ │ │ │ -
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 */
│ │ │ │ - │ │ │ │ +
97#endif //end OPENSUBDIV3_OSD_MTL_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
│ │ │ │ +
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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -stackBuffer.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 2015 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,230 +23,171 @@ │ │ │ │ │ 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 │ │ │ │ │ -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. │ │ │ │ │ -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(); │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_PATCH_TABLE_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.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 │ │ │ │ │ +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); │ │ │ │ │ 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 │ │ │ │ │ -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(); │ │ │ │ │ +_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; │ │ │ │ │ +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 │ │ │ │ │ -85private: │ │ │ │ │ -86 TYPE * _data; │ │ │ │ │ -87 size_type _size; │ │ │ │ │ -88 size_type _capacity; │ │ │ │ │ +_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 // 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 │ │ │ │ │ +90} // end namespace Osd │ │ │ │ │ +91 │ │ │ │ │ +92} //end namespace OPENSUBDIV_VERSION │ │ │ │ │ +93using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +94 │ │ │ │ │ +95} //end namespace OpenSubdiv │ │ │ │ │ 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 │ │ │ │ │ -113template │ │ │ │ │ -114inline void │ │ │ │ │ -115StackBuffer::deallocate() { │ │ │ │ │ -116 │ │ │ │ │ -117 ::operator delete(_dynamicData); │ │ │ │ │ -118 │ │ │ │ │ -119 _data = reinterpret_cast(_staticData); │ │ │ │ │ -120 _capacity = SIZE; │ │ │ │ │ -121} │ │ │ │ │ -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) { │ │ │ │ │ -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) { │ │ │ │ │ -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 */ │ │ │ │ │ +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_:_:_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _m_t_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/vtr/fvarLevel.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glMesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
fvarLevel.h File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
glMesh.h File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/crease.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../vtr/types.h"
│ │ │ │ -#include "../vtr/level.h"
│ │ │ │ -#include <vector>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstring>
│ │ │ │ +#include "../osd/mesh.h"
│ │ │ │ +#include "../osd/glPatchTable.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Namespaces

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

│ │ │ │ +Typedefs

typedef MeshInterface< GLPatchTableGLMeshInterface
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -fvarLevel.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 "_._._/_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_/_l_e_v_e_l_._h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#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_. │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _f_v_a_r_L_e_v_e_l_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00719_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/fvarLevel.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glMesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
fvarLevel.h
│ │ │ │ +
glMesh.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,443 +118,46 @@ │ │ │ │
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_LEVEL_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_FVAR_LEVEL_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"
│ │ │ │ -
33#include "../vtr/level.h"
│ │ │ │ -
34
│ │ │ │ -
35#include <vector>
│ │ │ │ -
36#include <cassert>
│ │ │ │ -
37#include <cstring>
│ │ │ │ -
38
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_GL_MESH_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
│ │ │ │ -
40namespace OpenSubdiv {
│ │ │ │ -
41namespace OPENSUBDIV_VERSION {
│ │ │ │ +
40
│ │ │ │ +
41} // end namespace Osd
│ │ │ │
42
│ │ │ │ -
43namespace Vtr {
│ │ │ │ -
44namespace internal {
│ │ │ │ +
43} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
44using namespace OPENSUBDIV_VERSION;
│ │ │ │
45
│ │ │ │ -
46//
│ │ │ │ -
47// FVarLevel:
│ │ │ │ -
48// A "face-varying channel" includes the topology for a set of face-varying
│ │ │ │ -
49// data, relative to the topology of the Level with which it is associated.
│ │ │ │ -
50//
│ │ │ │ -
51// Analogous to a set of vertices and face-vertices that define the topology for
│ │ │ │ -
52// the geometry, a channel requires a set of "values" and "face-values". The
│ │ │ │ -
53// "values" are indices of entries in a set of face-varying data, just as vertices
│ │ │ │ -
54// are indices into a set of vertex data. The face-values identify a value for
│ │ │ │ -
55// each vertex of the face, and so define topology for the values that may be
│ │ │ │ -
56// unique to each channel.
│ │ │ │ -
57//
│ │ │ │ -
58// In addition to the value size and the vector of face-values (which matches the
│ │ │ │ -
59// size of the geometry's face-vertices), tags are associated with each component
│ │ │ │ -
60// to identify deviations of the face-varying topology from the vertex topology.
│ │ │ │ -
61// And since there may be a one-to-many mapping between vertices and face-varying
│ │ │ │ -
62// values, that mapping is also allocated.
│ │ │ │ -
63//
│ │ │ │ -
64// It turns out that the mapping used is able to completely encode the set of
│ │ │ │ -
65// face-values and is more amenable to refinement. Currently the face-values
│ │ │ │ -
66// take up almost half the memory of this representation, so if memory does
│ │ │ │ -
67// become a concern, we do not need to store them. The only reason we do so now
│ │ │ │ -
68// is that the face-value interface for specifying base topology and inspecting
│ │ │ │ -
69// subsequent levels is very familiar to that of face-vertices for clients. So
│ │ │ │ -
70// having them available for such access is convenient.
│ │ │ │ -
71//
│ │ │ │ -
72// Regarding scope and access...
│ │ │ │ -
73// Unclear at this early state, but leaning towards nesting this class within
│ │ │ │ -
74// Level, given the intimate dependency between the two.
│ │ │ │ -
75// Everything is being declared public for now to facilitate access until it's
│ │ │ │ -
76// clearer how this functionality will be provided.
│ │ │ │ -
77//
│ │ │ │ -
78class FVarLevel {
│ │ │ │ -
79public:
│ │ │ │ -
80 //
│ │ │ │ -
81 // Component tags -- trying to minimize the types needed here:
│ │ │ │ -
82 //
│ │ │ │ -
83 // Tag per Edge:
│ │ │ │ -
84 // - facilitates topological analysis around each vertex
│ │ │ │ -
85 // - required during refinement to spawn one or more edge-values
│ │ │ │ -
86 //
│ │ │ │ -
87 struct ETag {
│ │ │ │ -
88 ETag() { }
│ │ │ │ -
89
│ │ │ │ -
90 void clear() { std::memset(this, 0, sizeof(ETag)); }
│ │ │ │ -
91
│ │ │ │ -
92 typedef unsigned char ETagSize;
│ │ │ │ -
93
│ │ │ │ -
94 ETagSize _mismatch : 1; // local FVar topology does not match
│ │ │ │ -
95 ETagSize _disctsV0 : 1; // discontinuous at vertex 0
│ │ │ │ -
96 ETagSize _disctsV1 : 1; // discontinuous at vertex 1
│ │ │ │ -
97 ETagSize _linear : 1; // linear boundary constraints
│ │ │ │ -
98
│ │ │ │ -
99 Level::ETag combineWithLevelETag(Level::ETag) const;
│ │ │ │ -
100 };
│ │ │ │ -
101
│ │ │ │ -
102 //
│ │ │ │ -
103 // Tag per Value:
│ │ │ │ -
104 // - informs both refinement and interpolation
│ │ │ │ -
105 // - every value spawns a child value in refinement
│ │ │ │ -
106 // - includes a subset of Level::VTag to be later combined with a VTag
│ │ │ │ -
107 //
│ │ │ │ -
108 struct ValueTag {
│ │ │ │ -
109 ValueTag() { }
│ │ │ │ -
110
│ │ │ │ -
111 void clear() { std::memset(this, 0, sizeof(ValueTag)); }
│ │ │ │ -
112
│ │ │ │ -
113 bool isMismatch() const { return _mismatch; }
│ │ │ │ -
114 bool isCrease() const { return _crease; }
│ │ │ │ -
115 bool isCorner() const { return !_crease; }
│ │ │ │ -
116 bool isSemiSharp() const { return _semiSharp; }
│ │ │ │ -
117 bool isInfSharp() const { return !_semiSharp && !_crease; }
│ │ │ │ -
118 bool isDepSharp() const { return _depSharp; }
│ │ │ │ -
119 bool hasCreaseEnds() const { return _crease || _semiSharp; }
│ │ │ │ -
120
│ │ │ │ -
121 bool hasInfSharpEdges() const { return _infSharpEdges; }
│ │ │ │ -
122 bool hasInfIrregularity() const { return _infIrregular; }
│ │ │ │ -
123
│ │ │ │ -
124 typedef unsigned char ValueTagSize;
│ │ │ │ -
125
│ │ │ │ -
126 // If there is no mismatch, no other members should be inspected
│ │ │ │ -
127 ValueTagSize _mismatch : 1; // local FVar topology does not match
│ │ │ │ -
128 ValueTagSize _xordinary : 1; // local FVar topology is extra-ordinary
│ │ │ │ -
129 ValueTagSize _nonManifold : 1; // local FVar topology is non-manifold
│ │ │ │ -
130 ValueTagSize _crease : 1; // value is a crease, otherwise a corner
│ │ │ │ -
131 ValueTagSize _semiSharp : 1; // value is a corner decaying to crease
│ │ │ │ -
132 ValueTagSize _depSharp : 1; // value is a corner by dependency on another
│ │ │ │ -
133
│ │ │ │ -
134 ValueTagSize _infSharpEdges : 1; // value is a corner by inf-sharp features
│ │ │ │ -
135 ValueTagSize _infIrregular : 1; // value span includes inf-sharp irregularity
│ │ │ │ -
136
│ │ │ │ -
137 Level::VTag combineWithLevelVTag(Level::VTag) const;
│ │ │ │ -
138
│ │ │ │ -
139 // Alternate constructor and accessor for dealing with integer bits directly:
│ │ │ │ -
140 explicit ValueTag(ValueTagSize bits) {
│ │ │ │ -
141 std::memcpy(this, &bits, sizeof(bits));
│ │ │ │ -
142 }
│ │ │ │ -
143 ValueTagSize getBits() const {
│ │ │ │ -
144 ValueTagSize bits;
│ │ │ │ -
145 std::memcpy(&bits, this, sizeof(bits));
│ │ │ │ -
146 return bits;
│ │ │ │ -
147 }
│ │ │ │ -
148 };
│ │ │ │ -
149
│ │ │ │ -
150 typedef Vtr::ConstArray<ValueTag> ConstValueTagArray;
│ │ │ │ -
151 typedef Vtr::Array<ValueTag> ValueTagArray;
│ │ │ │ -
152
│ │ │ │ -
153 //
│ │ │ │ -
154 // Simple struct containing the "end faces" of a crease, i.e. the faces which
│ │ │ │ -
155 // contain the FVar values to be used when interpolating the crease. (Prefer
│ │ │ │ -
156 // the struct over std::pair for its member names)
│ │ │ │ -
157 //
│ │ │ │ -
158 struct CreaseEndPair {
│ │ │ │ -
159 LocalIndex _startFace;
│ │ │ │ -
160 LocalIndex _endFace;
│ │ │ │ -
161 };
│ │ │ │ -
162
│ │ │ │ -
163 typedef Vtr::ConstArray<CreaseEndPair> ConstCreaseEndPairArray;
│ │ │ │ -
164 typedef Vtr::Array<CreaseEndPair> CreaseEndPairArray;
│ │ │ │ -
165
│ │ │ │ -
166 typedef LocalIndex Sibling;
│ │ │ │ -
167
│ │ │ │ -
168 typedef ConstLocalIndexArray ConstSiblingArray;
│ │ │ │ -
169 typedef LocalIndexArray SiblingArray;
│ │ │ │ -
170
│ │ │ │ -
171public:
│ │ │ │ -
172 FVarLevel(Level const& level);
│ │ │ │ -
173 ~FVarLevel();
│ │ │ │ -
174
│ │ │ │ -
175 // Queries for the entire channel:
│ │ │ │ -
176 Level const& getLevel() const { return _level; }
│ │ │ │ -
177
│ │ │ │ -
178 int getNumValues() const { return _valueCount; }
│ │ │ │ -
179 int getNumFaceValuesTotal() const { return (int) _faceVertValues.size(); }
│ │ │ │ -
180
│ │ │ │ -
181 bool isLinear() const { return _isLinear; }
│ │ │ │ -
182 bool hasLinearBoundaries() const { return _hasLinearBoundaries; }
│ │ │ │ -
183 bool hasSmoothBoundaries() const { return ! _hasLinearBoundaries; }
│ │ │ │ -
184 bool hasCreaseEnds() const { return hasSmoothBoundaries(); }
│ │ │ │ -
185
│ │ │ │ -
186 Sdc::Options getOptions() const { return _options; }
│ │ │ │ -
187
│ │ │ │ -
188 // Queries per face:
│ │ │ │ -
189 ConstIndexArray getFaceValues(Index fIndex) const;
│ │ │ │ -
190 IndexArray getFaceValues(Index fIndex);
│ │ │ │ -
191
│ │ │ │ -
192 // Queries per edge:
│ │ │ │ -
193 ETag getEdgeTag(Index eIndex) const { return _edgeTags[eIndex]; }
│ │ │ │ -
194 bool edgeTopologyMatches(Index eIndex) const { return !getEdgeTag(eIndex)._mismatch; }
│ │ │ │ -
195
│ │ │ │ -
196 // Queries per vertex (and its potential sibling values):
│ │ │ │ -
197 int getNumVertexValues(Index v) const { return _vertSiblingCounts[v]; }
│ │ │ │ -
198 Index getVertexValueOffset(Index v, Sibling i = 0) const { return _vertSiblingOffsets[v] + i; }
│ │ │ │ -
199
│ │ │ │ -
200 Index getVertexValue(Index v, Sibling i = 0) const { return _vertValueIndices[getVertexValueOffset(v,i)]; }
│ │ │ │ -
201
│ │ │ │ -
202 Index findVertexValueIndex(Index vertexIndex, Index valueIndex) const;
│ │ │ │ -
203
│ │ │ │ -
204 // Methods to access/modify array properties per vertex:
│ │ │ │ -
205 ConstIndexArray getVertexValues(Index vIndex) const;
│ │ │ │ -
206 IndexArray getVertexValues(Index vIndex);
│ │ │ │ -
207
│ │ │ │ -
208 ConstValueTagArray getVertexValueTags(Index vIndex) const;
│ │ │ │ -
209 ValueTagArray getVertexValueTags(Index vIndex);
│ │ │ │ -
210
│ │ │ │ -
211 ConstCreaseEndPairArray getVertexValueCreaseEnds(Index vIndex) const;
│ │ │ │ -
212 CreaseEndPairArray getVertexValueCreaseEnds(Index vIndex);
│ │ │ │ -
213
│ │ │ │ -
214 ConstSiblingArray getVertexFaceSiblings(Index vIndex) const;
│ │ │ │ -
215 SiblingArray getVertexFaceSiblings(Index vIndex);
│ │ │ │ -
216
│ │ │ │ -
217 // Queries per value:
│ │ │ │ -
218 ValueTag getValueTag(Index valueIndex) const { return _vertValueTags[valueIndex]; }
│ │ │ │ -
219 bool valueTopologyMatches(Index valueIndex) const { return !getValueTag(valueIndex)._mismatch; }
│ │ │ │ -
220
│ │ │ │ -
221 CreaseEndPair getValueCreaseEndPair(Index valueIndex) const { return _vertValueCreaseEnds[valueIndex]; }
│ │ │ │ -
222
│ │ │ │ -
223 // Tag queries related to faces (use Level methods for those returning Level::VTag/ETag)
│ │ │ │ -
224 void getFaceValueTags(Index faceIndex, ValueTag valueTags[]) const;
│ │ │ │ -
225
│ │ │ │ -
226 ValueTag getFaceCompositeValueTag(Index faceIndex) const;
│ │ │ │ -
227
│ │ │ │ -
228 // Higher-level topological queries, i.e. values in a neighborhood:
│ │ │ │ -
229 void getEdgeFaceValues(Index eIndex, int fIncToEdge, Index valuesPerVert[2]) const;
│ │ │ │ -
230 void getVertexEdgeValues(Index vIndex, Index valuesPerEdge[]) const;
│ │ │ │ -
231 void getVertexCreaseEndValues(Index vIndex, Sibling sibling, Index endValues[2]) const;
│ │ │ │ -
232
│ │ │ │ -
233 // Initialization and allocation helpers:
│ │ │ │ -
234 void setOptions(Sdc::Options const& options);
│ │ │ │ -
235 void resizeVertexValues(int numVertexValues);
│ │ │ │ -
236 void resizeValues(int numValues);
│ │ │ │ -
237 void resizeComponents();
│ │ │ │ -
238
│ │ │ │ -
239 // Topological analysis methods -- tagging and face-value population:
│ │ │ │ -
240 void completeTopologyFromFaceValues(int regBoundaryValence);
│ │ │ │ -
241 void initializeFaceValuesFromFaceVertices();
│ │ │ │ -
242 void initializeFaceValuesFromVertexFaceSiblings();
│ │ │ │ -
243
│ │ │ │ -
244 struct ValueSpan;
│ │ │ │ -
245 void gatherValueSpans(Index vIndex, ValueSpan * vValueSpans) const;
│ │ │ │ -
246
│ │ │ │ -
247 // Debugging methods:
│ │ │ │ -
248 bool validate() const;
│ │ │ │ -
249 void print() const;
│ │ │ │ -
250 void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector<Sibling>& fvSiblings) const;
│ │ │ │ -
251
│ │ │ │ -
252private:
│ │ │ │ -
253 // Just as Refinements build Levels, FVarRefinements build FVarLevels...
│ │ │ │ -
254 friend class FVarRefinement;
│ │ │ │ -
255
│ │ │ │ -
256 Level const & _level;
│ │ │ │ -
257
│ │ │ │ -
258 // Linear interpolation options vary between channels:
│ │ │ │ -
259 Sdc::Options _options;
│ │ │ │ -
260
│ │ │ │ -
261 bool _isLinear;
│ │ │ │ -
262 bool _hasLinearBoundaries;
│ │ │ │ -
263 bool _hasDependentSharpness;
│ │ │ │ -
264 int _valueCount;
│ │ │ │ -
265
│ │ │ │ -
266 //
│ │ │ │ -
267 // Vectors recording face-varying topology including tags that help propagate
│ │ │ │ -
268 // data through the refinement hierarchy. Vectors are not sparse but most use
│ │ │ │ -
269 // 8-bit values relative to the local topology.
│ │ │ │ -
270 //
│ │ │ │ -
271 // The vector of face-values is actually redundant here, but is constructed as
│ │ │ │ -
272 // it is most convenient for clients. It represents almost half the memory of
│ │ │ │ -
273 // the topology (4 32-bit integers per face) and not surprisingly, populating
│ │ │ │ -
274 // it takes a considerable amount of the refinement time (1/3). We can reduce
│ │ │ │ -
275 // both if we are willing to compute these on demand for clients.
│ │ │ │ -
276 //
│ │ │ │ -
277 // Per-face (matches face-verts of corresponding level):
│ │ │ │ -
278 std::vector<Index> _faceVertValues;
│ │ │ │ -
279
│ │ │ │ -
280 // Per-edge:
│ │ │ │ -
281 std::vector<ETag> _edgeTags;
│ │ │ │ -
282
│ │ │ │ -
283 // Per-vertex:
│ │ │ │ -
284 std::vector<Sibling> _vertSiblingCounts;
│ │ │ │ -
285 std::vector<int> _vertSiblingOffsets;
│ │ │ │ -
286 std::vector<Sibling> _vertFaceSiblings;
│ │ │ │ -
287
│ │ │ │ -
288 // Per-value:
│ │ │ │ -
289 std::vector<Index> _vertValueIndices;
│ │ │ │ -
290 std::vector<ValueTag> _vertValueTags;
│ │ │ │ -
291 std::vector<CreaseEndPair> _vertValueCreaseEnds;
│ │ │ │ -
292};
│ │ │ │ -
293
│ │ │ │ -
294//
│ │ │ │ -
295// Access/modify the values associated with each face:
│ │ │ │ -
296//
│ │ │ │ -
297inline ConstIndexArray
│ │ │ │ -
298FVarLevel::getFaceValues(Index fIndex) const {
│ │ │ │ -
299
│ │ │ │ -
300 int vCount = _level.getNumFaceVertices(fIndex);
│ │ │ │ -
301 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
│ │ │ │ -
302 return ConstIndexArray(&_faceVertValues[vOffset], vCount);
│ │ │ │ -
303}
│ │ │ │ -
304inline IndexArray
│ │ │ │ -
305FVarLevel::getFaceValues(Index fIndex) {
│ │ │ │ -
306
│ │ │ │ -
307 int vCount = _level.getNumFaceVertices(fIndex);
│ │ │ │ -
308 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
│ │ │ │ -
309 return IndexArray(&_faceVertValues[vOffset], vCount);
│ │ │ │ -
310}
│ │ │ │ -
311
│ │ │ │ -
312inline FVarLevel::ConstSiblingArray
│ │ │ │ -
313FVarLevel::getVertexFaceSiblings(Index vIndex) const {
│ │ │ │ -
314
│ │ │ │ -
315 int vCount = _level.getNumVertexFaces(vIndex);
│ │ │ │ -
316 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
│ │ │ │ -
317 return ConstSiblingArray(&_vertFaceSiblings[vOffset], vCount);
│ │ │ │ -
318}
│ │ │ │ -
319inline FVarLevel::SiblingArray
│ │ │ │ -
320FVarLevel::getVertexFaceSiblings(Index vIndex) {
│ │ │ │ -
321
│ │ │ │ -
322 int vCount = _level.getNumVertexFaces(vIndex);
│ │ │ │ -
323 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
│ │ │ │ -
324 return SiblingArray(&_vertFaceSiblings[vOffset], vCount);
│ │ │ │ -
325}
│ │ │ │ -
326
│ │ │ │ -
327inline ConstIndexArray
│ │ │ │ -
328FVarLevel::getVertexValues(Index vIndex) const
│ │ │ │ -
329{
│ │ │ │ -
330 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
331 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
332 return ConstIndexArray(&_vertValueIndices[vOffset], vCount);
│ │ │ │ -
333}
│ │ │ │ -
334inline IndexArray
│ │ │ │ -
335FVarLevel::getVertexValues(Index vIndex)
│ │ │ │ -
336{
│ │ │ │ -
337 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
338 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
339 return IndexArray(&_vertValueIndices[vOffset], vCount);
│ │ │ │ -
340}
│ │ │ │ -
341
│ │ │ │ -
342inline FVarLevel::ConstValueTagArray
│ │ │ │ -
343FVarLevel::getVertexValueTags(Index vIndex) const
│ │ │ │ -
344{
│ │ │ │ -
345 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
346 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
347 return ConstValueTagArray(&_vertValueTags[vOffset], vCount);
│ │ │ │ -
348}
│ │ │ │ -
349inline FVarLevel::ValueTagArray
│ │ │ │ -
350FVarLevel::getVertexValueTags(Index vIndex)
│ │ │ │ -
351{
│ │ │ │ -
352 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
353 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
354 return ValueTagArray(&_vertValueTags[vOffset], vCount);
│ │ │ │ -
355}
│ │ │ │ -
356
│ │ │ │ -
357inline FVarLevel::ConstCreaseEndPairArray
│ │ │ │ -
358FVarLevel::getVertexValueCreaseEnds(Index vIndex) const
│ │ │ │ -
359{
│ │ │ │ -
360 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
361 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
362 return ConstCreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount);
│ │ │ │ -
363}
│ │ │ │ -
364inline FVarLevel::CreaseEndPairArray
│ │ │ │ -
365FVarLevel::getVertexValueCreaseEnds(Index vIndex)
│ │ │ │ -
366{
│ │ │ │ -
367 int vCount = getNumVertexValues(vIndex);
│ │ │ │ -
368 int vOffset = getVertexValueOffset(vIndex);
│ │ │ │ -
369 return CreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount);
│ │ │ │ -
370}
│ │ │ │ -
371
│ │ │ │ -
372inline Index
│ │ │ │ -
373FVarLevel::findVertexValueIndex(Index vertexIndex, Index valueIndex) const {
│ │ │ │ -
374
│ │ │ │ -
375 if (_level.getDepth() > 0) return valueIndex;
│ │ │ │ -
376
│ │ │ │ -
377 Index vvIndex = getVertexValueOffset(vertexIndex);
│ │ │ │ -
378 while (_vertValueIndices[vvIndex] != valueIndex) {
│ │ │ │ -
379 ++ vvIndex;
│ │ │ │ -
380 }
│ │ │ │ -
381 return vvIndex;
│ │ │ │ -
382}
│ │ │ │ -
383
│ │ │ │ -
384//
│ │ │ │ -
385// Methods related to tagging:
│ │ │ │ -
386//
│ │ │ │ -
387inline Level::ETag
│ │ │ │ -
388FVarLevel::ETag::combineWithLevelETag(Level::ETag levelTag) const
│ │ │ │ -
389{
│ │ │ │ -
390 if (this->_mismatch) {
│ │ │ │ -
391 levelTag._boundary = true;
│ │ │ │ -
392 levelTag._infSharp = true;
│ │ │ │ -
393 }
│ │ │ │ -
394 return levelTag;
│ │ │ │ -
395}
│ │ │ │ -
396inline Level::VTag
│ │ │ │ -
397FVarLevel::ValueTag::combineWithLevelVTag(Level::VTag levelTag) const
│ │ │ │ -
398{
│ │ │ │ -
399 if (this->_mismatch) {
│ │ │ │ -
400 //
│ │ │ │ -
401 // Semi-sharp FVar values are always tagged and treated as corners
│ │ │ │ -
402 // (at least three sharp edges (two boundary edges and one interior
│ │ │ │ -
403 // semi-sharp) and/or vertex is semi-sharp) until the sharpness has
│ │ │ │ -
404 // decayed, but they ultimately lie on the inf-sharp crease of the
│ │ │ │ -
405 // FVar boundary. Consider this when tagging inf-sharp features.
│ │ │ │ -
406 //
│ │ │ │ -
407 if (this->isCorner()) {
│ │ │ │ -
408 levelTag._rule = (Level::VTag::VTagSize) Sdc::Crease::RULE_CORNER;
│ │ │ │ -
409 } else {
│ │ │ │ -
410 levelTag._rule = (Level::VTag::VTagSize) Sdc::Crease::RULE_CREASE;
│ │ │ │ -
411 }
│ │ │ │ -
412 if (this->isCrease() || this->isSemiSharp()) {
│ │ │ │ -
413 levelTag._infSharp = false;
│ │ │ │ -
414 levelTag._infSharpCrease = true;
│ │ │ │ -
415 levelTag._corner = false;
│ │ │ │ -
416 } else {
│ │ │ │ -
417 levelTag._infSharp = true;
│ │ │ │ -
418 levelTag._infSharpCrease = false;
│ │ │ │ -
419 levelTag._corner = !this->_infIrregular && !this->_infSharpEdges;
│ │ │ │ -
420 }
│ │ │ │ -
421 levelTag._infSharpEdges = true;
│ │ │ │ -
422 levelTag._infIrregular = this->_infIrregular;
│ │ │ │ -
423
│ │ │ │ -
424 levelTag._boundary = true;
│ │ │ │ -
425 levelTag._xordinary = this->_xordinary;
│ │ │ │ -
426
│ │ │ │ -
427 levelTag._nonManifold |= this->_nonManifold;
│ │ │ │ -
428 }
│ │ │ │ -
429 return levelTag;
│ │ │ │ -
430}
│ │ │ │ -
431
│ │ │ │ -
432} // end namespace internal
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
46} // end namespace OpenSubdiv
│ │ │ │ +
47
│ │ │ │ +
48#endif // OPENSUBDIV3_OSD_GL_MESH_H
│ │ │ │ + │ │ │ │ +
MeshInterface< GLPatchTable > GLMeshInterface
Definition glMesh.h:38
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -fvarLevel.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 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,484 +23,43 @@ │ │ │ │ │ 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_LEVEL_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_FVAR_LEVEL_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" │ │ │ │ │ -33#include "../vtr/level.h" │ │ │ │ │ -34 │ │ │ │ │ -35#include │ │ │ │ │ -36#include │ │ │ │ │ -37#include │ │ │ │ │ -38 │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_MESH_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 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +40 │ │ │ │ │ +41} // end namespace Osd │ │ │ │ │ 42 │ │ │ │ │ -43namespace Vtr { │ │ │ │ │ -44namespace internal { │ │ │ │ │ +43} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +44using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 45 │ │ │ │ │ -46// │ │ │ │ │ -47// FVarLevel: │ │ │ │ │ -48// A "face-varying channel" includes the topology for a set of face-varying │ │ │ │ │ -49// data, relative to the topology of the Level with which it is associated. │ │ │ │ │ -50// │ │ │ │ │ -51// Analogous to a set of vertices and face-vertices that define the topology │ │ │ │ │ -for │ │ │ │ │ -52// the geometry, a channel requires a set of "values" and "face-values". The │ │ │ │ │ -53// "values" are indices of entries in a set of face-varying data, just as │ │ │ │ │ -vertices │ │ │ │ │ -54// are indices into a set of vertex data. The face-values identify a value │ │ │ │ │ -for │ │ │ │ │ -55// each vertex of the face, and so define topology for the values that may be │ │ │ │ │ -56// unique to each channel. │ │ │ │ │ -57// │ │ │ │ │ -58// In addition to the value size and the vector of face-values (which matches │ │ │ │ │ -the │ │ │ │ │ -59// size of the geometry's face-vertices), tags are associated with each │ │ │ │ │ -component │ │ │ │ │ -60// to identify deviations of the face-varying topology from the vertex │ │ │ │ │ -topology. │ │ │ │ │ -61// And since there may be a one-to-many mapping between vertices and face- │ │ │ │ │ -varying │ │ │ │ │ -62// values, that mapping is also allocated. │ │ │ │ │ -63// │ │ │ │ │ -64// It turns out that the mapping used is able to completely encode the set of │ │ │ │ │ -65// face-values and is more amenable to refinement. Currently the face-values │ │ │ │ │ -66// take up almost half the memory of this representation, so if memory does │ │ │ │ │ -67// become a concern, we do not need to store them. The only reason we do so │ │ │ │ │ -now │ │ │ │ │ -68// is that the face-value interface for specifying base topology and │ │ │ │ │ -inspecting │ │ │ │ │ -69// subsequent levels is very familiar to that of face-vertices for clients. │ │ │ │ │ -So │ │ │ │ │ -70// having them available for such access is convenient. │ │ │ │ │ -71// │ │ │ │ │ -72// Regarding scope and access... │ │ │ │ │ -73// Unclear at this early state, but leaning towards nesting this class within │ │ │ │ │ -74// Level, given the intimate dependency between the two. │ │ │ │ │ -75// Everything is being declared public for now to facilitate access until │ │ │ │ │ -it's │ │ │ │ │ -76// clearer how this functionality will be provided. │ │ │ │ │ -77// │ │ │ │ │ -78class FVarLevel { │ │ │ │ │ -79public: │ │ │ │ │ -80 // │ │ │ │ │ -81 // Component tags -- trying to minimize the types needed here: │ │ │ │ │ -82 // │ │ │ │ │ -83 // Tag per Edge: │ │ │ │ │ -84 // - facilitates topological analysis around each vertex │ │ │ │ │ -85 // - required during refinement to spawn one or more edge-values │ │ │ │ │ -86 // │ │ │ │ │ -87 struct ETag { │ │ │ │ │ -88 ETag() { } │ │ │ │ │ -89 │ │ │ │ │ -90 void clear() { std::memset(this, 0, sizeof(ETag)); } │ │ │ │ │ -91 │ │ │ │ │ -92 typedef unsigned char ETagSize; │ │ │ │ │ -93 │ │ │ │ │ -94 ETagSize _mismatch : 1; // local FVar topology does not match │ │ │ │ │ -95 ETagSize _disctsV0 : 1; // discontinuous at vertex 0 │ │ │ │ │ -96 ETagSize _disctsV1 : 1; // discontinuous at vertex 1 │ │ │ │ │ -97 ETagSize _linear : 1; // linear boundary constraints │ │ │ │ │ -98 │ │ │ │ │ -99 Level::ETag combineWithLevelETag(Level::ETag) const; │ │ │ │ │ -100 }; │ │ │ │ │ -101 │ │ │ │ │ -102 // │ │ │ │ │ -103 // Tag per Value: │ │ │ │ │ -104 // - informs both refinement and interpolation │ │ │ │ │ -105 // - every value spawns a child value in refinement │ │ │ │ │ -106 // - includes a subset of Level::VTag to be later combined with a VTag │ │ │ │ │ -107 // │ │ │ │ │ -108 struct ValueTag { │ │ │ │ │ -109 ValueTag() { } │ │ │ │ │ -110 │ │ │ │ │ -111 void clear() { std::memset(this, 0, sizeof(ValueTag)); } │ │ │ │ │ -112 │ │ │ │ │ -113 bool isMismatch() const { return _mismatch; } │ │ │ │ │ -114 bool isCrease() const { return _crease; } │ │ │ │ │ -115 bool isCorner() const { return !_crease; } │ │ │ │ │ -116 bool isSemiSharp() const { return _semiSharp; } │ │ │ │ │ -117 bool isInfSharp() const { return !_semiSharp && !_crease; } │ │ │ │ │ -118 bool isDepSharp() const { return _depSharp; } │ │ │ │ │ -119 bool hasCreaseEnds() const { return _crease || _semiSharp; } │ │ │ │ │ -120 │ │ │ │ │ -121 bool hasInfSharpEdges() const { return _infSharpEdges; } │ │ │ │ │ -122 bool hasInfIrregularity() const { return _infIrregular; } │ │ │ │ │ -123 │ │ │ │ │ -124 typedef unsigned char ValueTagSize; │ │ │ │ │ -125 │ │ │ │ │ -126 // If there is no mismatch, no other members should be inspected │ │ │ │ │ -127 ValueTagSize _mismatch : 1; // local FVar topology does not match │ │ │ │ │ -128 ValueTagSize _xordinary : 1; // local FVar topology is extra-ordinary │ │ │ │ │ -129 ValueTagSize _nonManifold : 1; // local FVar topology is non-manifold │ │ │ │ │ -130 ValueTagSize _crease : 1; // value is a crease, otherwise a corner │ │ │ │ │ -131 ValueTagSize _semiSharp : 1; // value is a corner decaying to crease │ │ │ │ │ -132 ValueTagSize _depSharp : 1; // value is a corner by dependency on another │ │ │ │ │ -133 │ │ │ │ │ -134 ValueTagSize _infSharpEdges : 1; // value is a corner by inf-sharp features │ │ │ │ │ -135 ValueTagSize _infIrregular : 1; // value span includes inf-sharp │ │ │ │ │ -irregularity │ │ │ │ │ -136 │ │ │ │ │ -137 Level::VTag combineWithLevelVTag(Level::VTag) const; │ │ │ │ │ -138 │ │ │ │ │ -139 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ -directly: │ │ │ │ │ -140 explicit ValueTag(ValueTagSize bits) { │ │ │ │ │ -141 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ -142 } │ │ │ │ │ -143 ValueTagSize getBits() const { │ │ │ │ │ -144 ValueTagSize bits; │ │ │ │ │ -145 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ -146 return bits; │ │ │ │ │ -147 } │ │ │ │ │ -148 }; │ │ │ │ │ -149 │ │ │ │ │ -150 typedef Vtr::ConstArray ConstValueTagArray; │ │ │ │ │ -151 typedef Vtr::Array ValueTagArray; │ │ │ │ │ -152 │ │ │ │ │ -153 // │ │ │ │ │ -154 // Simple struct containing the "end faces" of a crease, i.e. the faces │ │ │ │ │ -which │ │ │ │ │ -155 // contain the FVar values to be used when interpolating the crease. │ │ │ │ │ -(Prefer │ │ │ │ │ -156 // the struct over std::pair for its member names) │ │ │ │ │ -157 // │ │ │ │ │ -158 struct CreaseEndPair { │ │ │ │ │ -159 _L_o_c_a_l_I_n_d_e_x _startFace; │ │ │ │ │ -160 _L_o_c_a_l_I_n_d_e_x _endFace; │ │ │ │ │ -161 }; │ │ │ │ │ -162 │ │ │ │ │ -163 typedef Vtr::ConstArray ConstCreaseEndPairArray; │ │ │ │ │ -164 typedef Vtr::Array CreaseEndPairArray; │ │ │ │ │ -165 │ │ │ │ │ -166 typedef _L_o_c_a_l_I_n_d_e_x Sibling; │ │ │ │ │ -167 │ │ │ │ │ -168 typedef _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y ConstSiblingArray; │ │ │ │ │ -169 typedef _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y SiblingArray; │ │ │ │ │ -170 │ │ │ │ │ -171public: │ │ │ │ │ -172 FVarLevel(Level const& level); │ │ │ │ │ -173 ~FVarLevel(); │ │ │ │ │ -174 │ │ │ │ │ -175 // Queries for the entire channel: │ │ │ │ │ -176 Level const& getLevel() const { return _level; } │ │ │ │ │ -177 │ │ │ │ │ -178 int getNumValues() const { return _valueCount; } │ │ │ │ │ -179 int getNumFaceValuesTotal() const { return (int) _faceVertValues.size(); } │ │ │ │ │ -180 │ │ │ │ │ -181 bool isLinear() const { return _isLinear; } │ │ │ │ │ -182 bool hasLinearBoundaries() const { return _hasLinearBoundaries; } │ │ │ │ │ -183 bool hasSmoothBoundaries() const { return ! _hasLinearBoundaries; } │ │ │ │ │ -184 bool hasCreaseEnds() const { return hasSmoothBoundaries(); } │ │ │ │ │ -185 │ │ │ │ │ -186 Sdc::Options getOptions() const { return _options; } │ │ │ │ │ -187 │ │ │ │ │ -188 // Queries per face: │ │ │ │ │ -189 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceValues(_I_n_d_e_x fIndex) const; │ │ │ │ │ -190 _I_n_d_e_x_A_r_r_a_y getFaceValues(_I_n_d_e_x fIndex); │ │ │ │ │ -191 │ │ │ │ │ -192 // Queries per edge: │ │ │ │ │ -193 ETag getEdgeTag(_I_n_d_e_x eIndex) const { return _edgeTags[eIndex]; } │ │ │ │ │ -194 bool edgeTopologyMatches(_I_n_d_e_x eIndex) const { return !getEdgeTag │ │ │ │ │ -(eIndex)._mismatch; } │ │ │ │ │ -195 │ │ │ │ │ -196 // Queries per vertex (and its potential sibling values): │ │ │ │ │ -197 int getNumVertexValues(_I_n_d_e_x v) const { return _vertSiblingCounts[v]; } │ │ │ │ │ -198 _I_n_d_e_x getVertexValueOffset(_I_n_d_e_x v, Sibling i = 0) const { return │ │ │ │ │ -_vertSiblingOffsets[v] + i; } │ │ │ │ │ -199 │ │ │ │ │ -200 _I_n_d_e_x getVertexValue(_I_n_d_e_x v, Sibling i = 0) const { return │ │ │ │ │ -_vertValueIndices[getVertexValueOffset(v,i)]; } │ │ │ │ │ -201 │ │ │ │ │ -202 _I_n_d_e_x findVertexValueIndex(_I_n_d_e_x vertexIndex, _I_n_d_e_x valueIndex) const; │ │ │ │ │ -203 │ │ │ │ │ -204 // Methods to access/modify array properties per vertex: │ │ │ │ │ -205 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexValues(_I_n_d_e_x vIndex) const; │ │ │ │ │ -206 _I_n_d_e_x_A_r_r_a_y getVertexValues(_I_n_d_e_x vIndex); │ │ │ │ │ -207 │ │ │ │ │ -208 ConstValueTagArray getVertexValueTags(_I_n_d_e_x vIndex) const; │ │ │ │ │ -209 ValueTagArray getVertexValueTags(_I_n_d_e_x vIndex); │ │ │ │ │ -210 │ │ │ │ │ -211 ConstCreaseEndPairArray getVertexValueCreaseEnds(_I_n_d_e_x vIndex) const; │ │ │ │ │ -212 CreaseEndPairArray getVertexValueCreaseEnds(_I_n_d_e_x vIndex); │ │ │ │ │ -213 │ │ │ │ │ -214 ConstSiblingArray getVertexFaceSiblings(_I_n_d_e_x vIndex) const; │ │ │ │ │ -215 SiblingArray getVertexFaceSiblings(_I_n_d_e_x vIndex); │ │ │ │ │ -216 │ │ │ │ │ -217 // Queries per value: │ │ │ │ │ -218 ValueTag getValueTag(_I_n_d_e_x valueIndex) const { return _vertValueTags │ │ │ │ │ -[valueIndex]; } │ │ │ │ │ -219 bool valueTopologyMatches(_I_n_d_e_x valueIndex) const { return !getValueTag │ │ │ │ │ -(valueIndex)._mismatch; } │ │ │ │ │ -220 │ │ │ │ │ -221 CreaseEndPair getValueCreaseEndPair(_I_n_d_e_x valueIndex) const { return │ │ │ │ │ -_vertValueCreaseEnds[valueIndex]; } │ │ │ │ │ -222 │ │ │ │ │ -223 // Tag queries related to faces (use Level methods for those returning │ │ │ │ │ -Level::VTag/ETag) │ │ │ │ │ -224 void getFaceValueTags(_I_n_d_e_x faceIndex, ValueTag valueTags[]) const; │ │ │ │ │ -225 │ │ │ │ │ -226 ValueTag getFaceCompositeValueTag(_I_n_d_e_x faceIndex) const; │ │ │ │ │ -227 │ │ │ │ │ -228 // Higher-level topological queries, i.e. values in a neighborhood: │ │ │ │ │ -229 void getEdgeFaceValues(_I_n_d_e_x eIndex, int fIncToEdge, _I_n_d_e_x valuesPerVert │ │ │ │ │ -[2]) const; │ │ │ │ │ -230 void getVertexEdgeValues(_I_n_d_e_x vIndex, _I_n_d_e_x valuesPerEdge[]) const; │ │ │ │ │ -231 void getVertexCreaseEndValues(_I_n_d_e_x vIndex, Sibling sibling, _I_n_d_e_x │ │ │ │ │ -endValues[2]) const; │ │ │ │ │ -232 │ │ │ │ │ -233 // Initialization and allocation helpers: │ │ │ │ │ -234 void setOptions(Sdc::Options const& options); │ │ │ │ │ -235 void resizeVertexValues(int numVertexValues); │ │ │ │ │ -236 void resizeValues(int numValues); │ │ │ │ │ -237 void resizeComponents(); │ │ │ │ │ -238 │ │ │ │ │ -239 // Topological analysis methods -- tagging and face-value population: │ │ │ │ │ -240 void completeTopologyFromFaceValues(int regBoundaryValence); │ │ │ │ │ -241 void initializeFaceValuesFromFaceVertices(); │ │ │ │ │ -242 void initializeFaceValuesFromVertexFaceSiblings(); │ │ │ │ │ -243 │ │ │ │ │ -244 struct ValueSpan; │ │ │ │ │ -245 void gatherValueSpans(_I_n_d_e_x vIndex, ValueSpan * vValueSpans) const; │ │ │ │ │ -246 │ │ │ │ │ -247 // Debugging methods: │ │ │ │ │ -248 bool validate() const; │ │ │ │ │ -249 void print() const; │ │ │ │ │ -250 void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector& │ │ │ │ │ -fvSiblings) const; │ │ │ │ │ -251 │ │ │ │ │ -252private: │ │ │ │ │ -253 // Just as Refinements build Levels, FVarRefinements build FVarLevels... │ │ │ │ │ -254 friend class FVarRefinement; │ │ │ │ │ -255 │ │ │ │ │ -256 Level const & _level; │ │ │ │ │ -257 │ │ │ │ │ -258 // Linear interpolation options vary between channels: │ │ │ │ │ -259 Sdc::Options _options; │ │ │ │ │ -260 │ │ │ │ │ -261 bool _isLinear; │ │ │ │ │ -262 bool _hasLinearBoundaries; │ │ │ │ │ -263 bool _hasDependentSharpness; │ │ │ │ │ -264 int _valueCount; │ │ │ │ │ -265 │ │ │ │ │ -266 // │ │ │ │ │ -267 // Vectors recording face-varying topology including tags that help │ │ │ │ │ -propagate │ │ │ │ │ -268 // data through the refinement hierarchy. Vectors are not sparse but most │ │ │ │ │ -use │ │ │ │ │ -269 // 8-bit values relative to the local topology. │ │ │ │ │ -270 // │ │ │ │ │ -271 // The vector of face-values is actually redundant here, but is constructed │ │ │ │ │ -as │ │ │ │ │ -272 // it is most convenient for clients. It represents almost half the memory │ │ │ │ │ -of │ │ │ │ │ -273 // the topology (4 32-bit integers per face) and not surprisingly, │ │ │ │ │ -populating │ │ │ │ │ -274 // it takes a considerable amount of the refinement time (1/3). We can │ │ │ │ │ -reduce │ │ │ │ │ -275 // both if we are willing to compute these on demand for clients. │ │ │ │ │ -276 // │ │ │ │ │ -277 // Per-face (matches face-verts of corresponding level): │ │ │ │ │ -278 std::vector _faceVertValues; │ │ │ │ │ -279 │ │ │ │ │ -280 // Per-edge: │ │ │ │ │ -281 std::vector _edgeTags; │ │ │ │ │ -282 │ │ │ │ │ -283 // Per-vertex: │ │ │ │ │ -284 std::vector _vertSiblingCounts; │ │ │ │ │ -285 std::vector _vertSiblingOffsets; │ │ │ │ │ -286 std::vector _vertFaceSiblings; │ │ │ │ │ -287 │ │ │ │ │ -288 // Per-value: │ │ │ │ │ -289 std::vector _vertValueIndices; │ │ │ │ │ -290 std::vector _vertValueTags; │ │ │ │ │ -291 std::vector _vertValueCreaseEnds; │ │ │ │ │ -292}; │ │ │ │ │ -293 │ │ │ │ │ -294// │ │ │ │ │ -295// Access/modify the values associated with each face: │ │ │ │ │ -296// │ │ │ │ │ -297inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -298FVarLevel::getFaceValues(_I_n_d_e_x fIndex) const { │ │ │ │ │ -299 │ │ │ │ │ -300 int vCount = _level.getNumFaceVertices(fIndex); │ │ │ │ │ -301 int vOffset = _level.getOffsetOfFaceVertices(fIndex); │ │ │ │ │ -302 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertValues[vOffset], vCount); │ │ │ │ │ -303} │ │ │ │ │ -304inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -305FVarLevel::getFaceValues(_I_n_d_e_x fIndex) { │ │ │ │ │ -306 │ │ │ │ │ -307 int vCount = _level.getNumFaceVertices(fIndex); │ │ │ │ │ -308 int vOffset = _level.getOffsetOfFaceVertices(fIndex); │ │ │ │ │ -309 return _I_n_d_e_x_A_r_r_a_y(&_faceVertValues[vOffset], vCount); │ │ │ │ │ -310} │ │ │ │ │ -311 │ │ │ │ │ -312inline FVarLevel::ConstSiblingArray │ │ │ │ │ -313FVarLevel::getVertexFaceSiblings(_I_n_d_e_x vIndex) const { │ │ │ │ │ -314 │ │ │ │ │ -315 int vCount = _level.getNumVertexFaces(vIndex); │ │ │ │ │ -316 int vOffset = _level.getOffsetOfVertexFaces(vIndex); │ │ │ │ │ -317 return ConstSiblingArray(&_vertFaceSiblings[vOffset], vCount); │ │ │ │ │ -318} │ │ │ │ │ -319inline FVarLevel::SiblingArray │ │ │ │ │ -320FVarLevel::getVertexFaceSiblings(_I_n_d_e_x vIndex) { │ │ │ │ │ -321 │ │ │ │ │ -322 int vCount = _level.getNumVertexFaces(vIndex); │ │ │ │ │ -323 int vOffset = _level.getOffsetOfVertexFaces(vIndex); │ │ │ │ │ -324 return SiblingArray(&_vertFaceSiblings[vOffset], vCount); │ │ │ │ │ -325} │ │ │ │ │ -326 │ │ │ │ │ -327inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -328FVarLevel::getVertexValues(_I_n_d_e_x vIndex) const │ │ │ │ │ -329{ │ │ │ │ │ -330 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -331 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -332 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_vertValueIndices[vOffset], vCount); │ │ │ │ │ -333} │ │ │ │ │ -334inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -335FVarLevel::getVertexValues(_I_n_d_e_x vIndex) │ │ │ │ │ -336{ │ │ │ │ │ -337 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -338 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -339 return _I_n_d_e_x_A_r_r_a_y(&_vertValueIndices[vOffset], vCount); │ │ │ │ │ -340} │ │ │ │ │ -341 │ │ │ │ │ -342inline FVarLevel::ConstValueTagArray │ │ │ │ │ -343FVarLevel::getVertexValueTags(_I_n_d_e_x vIndex) const │ │ │ │ │ -344{ │ │ │ │ │ -345 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -346 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -347 return ConstValueTagArray(&_vertValueTags[vOffset], vCount); │ │ │ │ │ -348} │ │ │ │ │ -349inline FVarLevel::ValueTagArray │ │ │ │ │ -350FVarLevel::getVertexValueTags(_I_n_d_e_x vIndex) │ │ │ │ │ -351{ │ │ │ │ │ -352 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -353 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -354 return ValueTagArray(&_vertValueTags[vOffset], vCount); │ │ │ │ │ -355} │ │ │ │ │ -356 │ │ │ │ │ -357inline FVarLevel::ConstCreaseEndPairArray │ │ │ │ │ -358FVarLevel::getVertexValueCreaseEnds(_I_n_d_e_x vIndex) const │ │ │ │ │ -359{ │ │ │ │ │ -360 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -361 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -362 return ConstCreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount); │ │ │ │ │ -363} │ │ │ │ │ -364inline FVarLevel::CreaseEndPairArray │ │ │ │ │ -365FVarLevel::getVertexValueCreaseEnds(_I_n_d_e_x vIndex) │ │ │ │ │ -366{ │ │ │ │ │ -367 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ -368 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ -369 return CreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount); │ │ │ │ │ -370} │ │ │ │ │ -371 │ │ │ │ │ -372inline _I_n_d_e_x │ │ │ │ │ -373FVarLevel::findVertexValueIndex(_I_n_d_e_x vertexIndex, _I_n_d_e_x valueIndex) const { │ │ │ │ │ -374 │ │ │ │ │ -375 if (_level.getDepth() > 0) return valueIndex; │ │ │ │ │ -376 │ │ │ │ │ -377 _I_n_d_e_x vvIndex = getVertexValueOffset(vertexIndex); │ │ │ │ │ -378 while (_vertValueIndices[vvIndex] != valueIndex) { │ │ │ │ │ -379 ++ vvIndex; │ │ │ │ │ -380 } │ │ │ │ │ -381 return vvIndex; │ │ │ │ │ -382} │ │ │ │ │ -383 │ │ │ │ │ -384// │ │ │ │ │ -385// Methods related to tagging: │ │ │ │ │ -386// │ │ │ │ │ -387inline Level::ETag │ │ │ │ │ -388FVarLevel::ETag::combineWithLevelETag(Level::ETag levelTag) const │ │ │ │ │ -389{ │ │ │ │ │ -390 if (this->_mismatch) { │ │ │ │ │ -391 levelTag._boundary = true; │ │ │ │ │ -392 levelTag._infSharp = true; │ │ │ │ │ -393 } │ │ │ │ │ -394 return levelTag; │ │ │ │ │ -395} │ │ │ │ │ -396inline Level::VTag │ │ │ │ │ -397FVarLevel::ValueTag::combineWithLevelVTag(Level::VTag levelTag) const │ │ │ │ │ -398{ │ │ │ │ │ -399 if (this->_mismatch) { │ │ │ │ │ -400 // │ │ │ │ │ -401 // Semi-sharp FVar values are always tagged and treated as corners │ │ │ │ │ -402 // (at least three sharp edges (two boundary edges and one interior │ │ │ │ │ -403 // semi-sharp) and/or vertex is semi-sharp) until the sharpness has │ │ │ │ │ -404 // decayed, but they ultimately lie on the inf-sharp crease of the │ │ │ │ │ -405 // FVar boundary. Consider this when tagging inf-sharp features. │ │ │ │ │ -406 // │ │ │ │ │ -407 if (this->isCorner()) { │ │ │ │ │ -408 levelTag._rule = (Level::VTag::VTagSize) _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_O_R_N_E_R; │ │ │ │ │ -409 } else { │ │ │ │ │ -410 levelTag._rule = (Level::VTag::VTagSize) _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E; │ │ │ │ │ -411 } │ │ │ │ │ -412 if (this->isCrease() || this->isSemiSharp()) { │ │ │ │ │ -413 levelTag._infSharp = false; │ │ │ │ │ -414 levelTag._infSharpCrease = true; │ │ │ │ │ -415 levelTag._corner = false; │ │ │ │ │ -416 } else { │ │ │ │ │ -417 levelTag._infSharp = true; │ │ │ │ │ -418 levelTag._infSharpCrease = false; │ │ │ │ │ -419 levelTag._corner = !this->_infIrregular && !this->_infSharpEdges; │ │ │ │ │ -420 } │ │ │ │ │ -421 levelTag._infSharpEdges = true; │ │ │ │ │ -422 levelTag._infIrregular = this->_infIrregular; │ │ │ │ │ -423 │ │ │ │ │ -424 levelTag._boundary = true; │ │ │ │ │ -425 levelTag._xordinary = this->_xordinary; │ │ │ │ │ -426 │ │ │ │ │ -427 levelTag._nonManifold |= this->_nonManifold; │ │ │ │ │ -428 } │ │ │ │ │ -429 return levelTag; │ │ │ │ │ -430} │ │ │ │ │ -431 │ │ │ │ │ -432} // end namespace internal │ │ │ │ │ -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 */ │ │ │ │ │ +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_:_:_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___C_O_R_N_E_R │ │ │ │ │ -@ RULE_CORNER │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _f_v_a_r_L_e_v_e_l_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _g_l_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/vtr/array.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/ompEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
array.h File Reference
│ │ │ │ +
ompEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include <cassert>
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  ConstArray< TYPE >
 
class  Array< TYPE >
class  OmpEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +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 │ │ │ │ │ -array.h File Reference │ │ │ │ │ +ompEvaluator.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 │ │ │ │ │ -class   _C_o_n_s_t_A_r_r_a_y_<_ _T_Y_P_E_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _A_r_r_a_y_<_ _T_Y_P_E_ _> │ │ │ │ │ +class   _O_m_p_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_:_:_V_t_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _a_r_r_a_y_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _o_m_p_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00725.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00725 = [ │ │ │ │ │ - ["ConstArray< TYPE >", "a01345.html", "a01345"], │ │ │ │ │ - ["Array< TYPE >", "a01349.html", "a01349"] │ │ │ │ │ + ["OmpEvaluator", "a01305.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00725_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/vtr/array.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/ompEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
array.h
│ │ │ │ +
ompEvaluator.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1//
│ │ │ │ -
2// Copyright 2014 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,192 +118,529 @@ │ │ │ │
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_ARRAY_INTERFACE_H
│ │ │ │ -
25#define OPENSUBDIV3_VTR_ARRAY_INTERFACE_H
│ │ │ │ -
26
│ │ │ │ -
27#include "../version.h"
│ │ │ │ -
28
│ │ │ │ -
29#include <cassert>
│ │ │ │ -
30
│ │ │ │ -
31namespace OpenSubdiv {
│ │ │ │ -
32namespace OPENSUBDIV_VERSION {
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_OMP_EVALUATOR_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_OMP_EVALUATOR_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29#include "../osd/bufferDescriptor.h"
│ │ │ │ +
30#include "../osd/types.h"
│ │ │ │ +
31
│ │ │ │ +
32#include <cstddef>
│ │ │ │
33
│ │ │ │ -
34namespace Vtr {
│ │ │ │ -
35
│ │ │ │ -
36//
│ │ │ │ -
37// This class provides a simple array-like interface -- a subset std::vector's interface -- for
│ │ │ │ -
38// a sequence of elements stored in contiguous memory. It provides a unified representation for
│ │ │ │ -
39// referencing data on the stack, all or a subset of std::vector<>, or anywhere else in memory.
│ │ │ │ -
40//
│ │ │ │ -
41// Note that its members are head/size rather than begin/end as in std::vector -- we frequently
│ │ │ │ -
42// need only the size for many queries, and that is most often what is stored elsewhere in other
│ │ │ │ -
43// classes, so we hope to reduce unnecessary address arithmetic constructing the interface and
│ │ │ │ -
44// accessing the size. The size type is also specifically 32-bit (rather than size_t) to match
│ │ │ │ -
45// internal usage and avoid unnecessary conversion to/from 64-bit.
│ │ │ │ -
46//
│ │ │ │ -
47// Question:
│ │ │ │ -
48// Naming is at issue here... formerly called ArrayInterface until that was shot down it has
│ │ │ │ -
49// been simplified to Array but needs to be distanced from std::array as it DOES NOT store its
│ │ │ │ -
50// own memory and is simply an interface to memory stored elsewhere.
│ │ │ │ -
51//
│ │ │ │ -
52template <typename TYPE>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54
│ │ │ │ -
55public:
│ │ │ │ -
56 typedef TYPE value_type;
│ │ │ │ -
57 typedef int size_type;
│ │ │ │ -
58
│ │ │ │ -
59 typedef TYPE const& const_reference;
│ │ │ │ -
60 typedef TYPE const* const_iterator;
│ │ │ │ -
61
│ │ │ │ -
62 typedef TYPE& reference;
│ │ │ │ -
63 typedef TYPE* iterator;
│ │ │ │ -
64
│ │ │ │ -
65public:
│ │ │ │ -
66
│ │ │ │ -
67 ConstArray() : _begin(0), _size(0) { }
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
69 ConstArray(value_type const * ptr, size_type sizeArg) :
│ │ │ │ -
70 _begin(ptr), _size(sizeArg) { }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72 size_type size() const { return _size; }
│ │ │ │ -
73
│ │ │ │ -
74 bool empty() const { return _size==0; }
│ │ │ │ -
75
│ │ │ │ -
76 const_reference operator[](int index) const { return _begin[index]; }
│ │ │ │ -
77 const_iterator begin() const { return _begin; }
│ │ │ │ -
78 const_iterator end() const { return _begin + _size; }
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
81 assert(_size>=4);
│ │ │ │ -
82 if (value == _begin[0]) return 0;
│ │ │ │ -
83 if (value == _begin[1]) return 1;
│ │ │ │ -
84 if (value == _begin[2]) return 2;
│ │ │ │ -
85 if (value == _begin[3]) return 3;
│ │ │ │ -
86 assert("FindIndexIn4Tuple() did not find expected value!" == 0);
│ │ │ │ -
87 return -1;
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 for (size_type i=0; i<size(); ++i) {
│ │ │ │ -
92 if (value==_begin[i]) {
│ │ │ │ -
93 return i;
│ │ │ │ -
94 }
│ │ │ │ -
95 }
│ │ │ │ -
96 return -1;
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99protected:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
102};
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104template <typename TYPE>
│ │ │ │ -
│ │ │ │ -
105class Array : public ConstArray<TYPE> {
│ │ │ │ -
106
│ │ │ │ -
107public:
│ │ │ │ -
108 typedef TYPE value_type;
│ │ │ │ -
109 typedef int size_type;
│ │ │ │ -
110
│ │ │ │ -
111 typedef TYPE const& const_reference;
│ │ │ │ -
112
│ │ │ │ -
113 typedef TYPE& reference;
│ │ │ │ -
114 typedef TYPE* iterator;
│ │ │ │ -
115
│ │ │ │ -
116public:
│ │ │ │ -
117
│ │ │ │ -
118 Array() : ConstArray<TYPE>() { }
│ │ │ │ -
119
│ │ │ │ -
120 Array(value_type * ptr, size_type sizeArg) : ConstArray<TYPE>(ptr, sizeArg) { }
│ │ │ │ -
121
│ │ │ │ -
122public:
│ │ │ │ -
123
│ │ │ │ -
│ │ │ │ -
124 const_reference operator[](int index) const {
│ │ │ │ -
125 return ConstArray<TYPE>::_begin[index];
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
129 return const_cast<reference>(ConstArray<TYPE>::_begin[index]);
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
133 return const_cast<iterator>(ConstArray<TYPE>::_begin);
│ │ │ │ -
134 }
│ │ │ │ -
│ │ │ │ -
135
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
137 return const_cast<iterator>(ConstArray<TYPE>::_begin +
│ │ │ │ - │ │ │ │ -
139 }
│ │ │ │ -
│ │ │ │ -
140};
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
ConstArray(value_type const *ptr, size_type sizeArg)
Definition array.h:69
│ │ │ │ - │ │ │ │ - │ │ │ │ -
size_type FindIndex(value_type value) const
Definition array.h:90
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
const_reference operator[](int index) const
Definition array.h:124
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Array(value_type *ptr, size_type sizeArg)
Definition array.h:120
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
34namespace OpenSubdiv {
│ │ │ │ +
35namespace OPENSUBDIV_VERSION {
│ │ │ │ +
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 OmpEvaluator *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 OmpEvaluator *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 OmpEvaluator *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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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
│ │ │ │ +
1226 static void Synchronize(void *deviceContext = NULL);
│ │ │ │ +
1227
│ │ │ │ +
1228 static void SetNumThreads(int numThreads);
│ │ │ │ +
1229};
│ │ │ │ +
│ │ │ │ +
1230
│ │ │ │ +
1231
│ │ │ │ +
1232} // end namespace Osd
│ │ │ │ +
1233
│ │ │ │ +
1234} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
1235using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
1236
│ │ │ │ +
1237} // end namespace OpenSubdiv
│ │ │ │ +
1238
│ │ │ │ +
1239
│ │ │ │ +
1240#endif // OPENSUBDIV3_OSD_OMP_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, 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 ...
│ │ │ │ +
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, 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, 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 EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const OmpEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function. This function has a same signature as other device kernels hav...
│ │ │ │ +
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, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
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, 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 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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
│ │ │ │ +
static void Synchronize(void *deviceContext=NULL)
│ │ │ │ +
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 OmpEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
│ │ │ │ +
static bool EvalPatches(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 ...
│ │ │ │ +
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 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 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, OmpEvaluator const *instance=NULL, 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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -array.h │ │ │ │ │ +ompEvaluator.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 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,236 +23,656 @@ │ │ │ │ │ 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_ARRAY_INTERFACE_H │ │ │ │ │ -25#define OPENSUBDIV3_VTR_ARRAY_INTERFACE_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include │ │ │ │ │ -30 │ │ │ │ │ -31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_OMP_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_OMP_EVALUATOR_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29#include "../osd/bufferDescriptor.h" │ │ │ │ │ +30#include "../osd/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 33 │ │ │ │ │ -34namespace Vtr { │ │ │ │ │ -35 │ │ │ │ │ -36// │ │ │ │ │ -37// This class provides a simple array-like interface -- a subset std:: │ │ │ │ │ -vector's interface -- for │ │ │ │ │ -38// a sequence of elements stored in contiguous memory. It provides a unified │ │ │ │ │ -representation for │ │ │ │ │ -39// referencing data on the stack, all or a subset of std::vector<>, or │ │ │ │ │ -anywhere else in memory. │ │ │ │ │ -40// │ │ │ │ │ -41// Note that its members are head/size rather than begin/end as in std:: │ │ │ │ │ -vector -- we frequently │ │ │ │ │ -42// need only the size for many queries, and that is most often what is stored │ │ │ │ │ -elsewhere in other │ │ │ │ │ -43// classes, so we hope to reduce unnecessary address arithmetic constructing │ │ │ │ │ -the interface and │ │ │ │ │ -44// accessing the size. The size type is also specifically 32-bit (rather than │ │ │ │ │ -size_t) to match │ │ │ │ │ -45// internal usage and avoid unnecessary conversion to/from 64-bit. │ │ │ │ │ -46// │ │ │ │ │ -47// Question: │ │ │ │ │ -48// Naming is at issue here... formerly called ArrayInterface until that was │ │ │ │ │ -shot down it has │ │ │ │ │ -49// been simplified to Array but needs to be distanced from std::array as it │ │ │ │ │ -DOES NOT store its │ │ │ │ │ -50// own memory and is simply an interface to memory stored elsewhere. │ │ │ │ │ -51// │ │ │ │ │ -52template │ │ │ │ │ -_5_3class _C_o_n_s_t_A_r_r_a_y { │ │ │ │ │ -54 │ │ │ │ │ -55public: │ │ │ │ │ -_5_6 typedef TYPE _v_a_l_u_e___t_y_p_e; │ │ │ │ │ -_5_7 typedef int _s_i_z_e___t_y_p_e; │ │ │ │ │ -58 │ │ │ │ │ -_5_9 typedef TYPE const& _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ │ -_6_0 typedef TYPE const* _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ │ -61 │ │ │ │ │ -_6_2 typedef TYPE& _r_e_f_e_r_e_n_c_e; │ │ │ │ │ -_6_3 typedef TYPE* _i_t_e_r_a_t_o_r; │ │ │ │ │ -64 │ │ │ │ │ -65public: │ │ │ │ │ -66 │ │ │ │ │ -_6_7 _C_o_n_s_t_A_r_r_a_y() : ___b_e_g_i_n(0), ___s_i_z_e(0) { } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 _C_o_n_s_t_A_r_r_a_y(_v_a_l_u_e___t_y_p_e const * ptr, _s_i_z_e___t_y_p_e sizeArg) : │ │ │ │ │ -70 ___b_e_g_i_n(ptr), ___s_i_z_e(sizeArg) { } │ │ │ │ │ -71 │ │ │ │ │ -_7_2 _s_i_z_e___t_y_p_e _s_i_z_e() const { return ___s_i_z_e; } │ │ │ │ │ -73 │ │ │ │ │ -_7_4 bool _e_m_p_t_y() const { return ___s_i_z_e==0; } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 _c_o_n_s_t___r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) const { return ___b_e_g_i_n[index]; } │ │ │ │ │ -_7_7 _c_o_n_s_t___i_t_e_r_a_t_o_r _b_e_g_i_n() const { return ___b_e_g_i_n; } │ │ │ │ │ -_7_8 _c_o_n_s_t___i_t_e_r_a_t_o_r _e_n_d() const { return ___b_e_g_i_n + ___s_i_z_e; } │ │ │ │ │ -79 │ │ │ │ │ -_8_0 _s_i_z_e___t_y_p_e _F_i_n_d_I_n_d_e_x_I_n_4_T_u_p_l_e(_v_a_l_u_e___t_y_p_e value) const { │ │ │ │ │ -81 assert(___s_i_z_e>=4); │ │ │ │ │ -82 if (value == ___b_e_g_i_n[0]) return 0; │ │ │ │ │ -83 if (value == ___b_e_g_i_n[1]) return 1; │ │ │ │ │ -84 if (value == ___b_e_g_i_n[2]) return 2; │ │ │ │ │ -85 if (value == ___b_e_g_i_n[3]) return 3; │ │ │ │ │ -86 assert("FindIndexIn4Tuple() did not find expected value!" == 0); │ │ │ │ │ -87 return -1; │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_0 _s_i_z_e___t_y_p_e _F_i_n_d_I_n_d_e_x(_v_a_l_u_e___t_y_p_e value) const { │ │ │ │ │ -91 for (_s_i_z_e___t_y_p_e i=0; i<_s_i_z_e(); ++i) { │ │ │ │ │ -92 if (value==___b_e_g_i_n[i]) { │ │ │ │ │ -93 return i; │ │ │ │ │ -94 } │ │ │ │ │ -95 } │ │ │ │ │ -96 return -1; │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99protected: │ │ │ │ │ -_1_0_0 _v_a_l_u_e___t_y_p_e const * ___b_e_g_i_n; │ │ │ │ │ -_1_0_1 _s_i_z_e___t_y_p_e ___s_i_z_e; │ │ │ │ │ -102}; │ │ │ │ │ -103 │ │ │ │ │ -104template │ │ │ │ │ -_1_0_5class _A_r_r_a_y : public _C_o_n_s_t_A_r_r_a_y { │ │ │ │ │ -106 │ │ │ │ │ -107public: │ │ │ │ │ -_1_0_8 typedef TYPE _v_a_l_u_e___t_y_p_e; │ │ │ │ │ -_1_0_9 typedef int _s_i_z_e___t_y_p_e; │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 typedef TYPE const& _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 typedef TYPE& _r_e_f_e_r_e_n_c_e; │ │ │ │ │ -_1_1_4 typedef TYPE* _i_t_e_r_a_t_o_r; │ │ │ │ │ -115 │ │ │ │ │ -116public: │ │ │ │ │ -117 │ │ │ │ │ -_1_1_8 _A_r_r_a_y() : _C_o_n_s_t_A_r_r_a_y() { } │ │ │ │ │ -119 │ │ │ │ │ -_1_2_0 _A_r_r_a_y(_v_a_l_u_e___t_y_p_e * ptr, _s_i_z_e___t_y_p_e sizeArg) : _C_o_n_s_t_A_r_r_a_y(ptr, sizeArg) │ │ │ │ │ -{ } │ │ │ │ │ -121 │ │ │ │ │ -122public: │ │ │ │ │ -123 │ │ │ │ │ -_1_2_4 _c_o_n_s_t___r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) const { │ │ │ │ │ -125 return _C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n[index]; │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 _r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) { │ │ │ │ │ -129 return const_cast<_r_e_f_e_r_e_n_c_e>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n[index]); │ │ │ │ │ -130 } │ │ │ │ │ -131 │ │ │ │ │ -_1_3_2 _i_t_e_r_a_t_o_r _b_e_g_i_n() { │ │ │ │ │ -133 return const_cast<_i_t_e_r_a_t_o_r>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n); │ │ │ │ │ -134 } │ │ │ │ │ -135 │ │ │ │ │ -_1_3_6 _i_t_e_r_a_t_o_r _e_n_d() { │ │ │ │ │ -137 return const_cast<_i_t_e_r_a_t_o_r>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n + │ │ │ │ │ -138 _C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___s_i_z_e); │ │ │ │ │ -139 } │ │ │ │ │ -140}; │ │ │ │ │ -141 │ │ │ │ │ -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 */ │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_3_9class _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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_6 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext = NULL); │ │ │ │ │ +1227 │ │ │ │ │ +_1_2_2_8 static void _S_e_t_N_u_m_T_h_r_e_a_d_s(int numThreads); │ │ │ │ │ +1229}; │ │ │ │ │ +1230 │ │ │ │ │ +1231 │ │ │ │ │ +1232} // end namespace Osd │ │ │ │ │ +1233 │ │ │ │ │ +1234} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +1235using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +1236 │ │ │ │ │ +1237} // end namespace OpenSubdiv │ │ │ │ │ +1238 │ │ │ │ │ +1239 │ │ │ │ │ +1240#endif // OPENSUBDIV3_OSD_OMP_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_:_:_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_:_:___b_e_g_i_n │ │ │ │ │ -value_type const * _begin │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ │ -TYPE value_type │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_b_e_g_i_n │ │ │ │ │ -const_iterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const_reference operator[](int index) const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ │ -TYPE const * const_iterator │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_F_i_n_d_I_n_d_e_x_I_n_4_T_u_p_l_e │ │ │ │ │ -size_type FindIndexIn4Tuple(value_type value) const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_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_:_:_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_:_:_e_m_p_t_y │ │ │ │ │ -bool empty() const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ -ConstArray(value_type const *ptr, size_type sizeArg) │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ │ -TYPE & reference │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:___s_i_z_e │ │ │ │ │ -size_type _size │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_F_i_n_d_I_n_d_e_x │ │ │ │ │ -size_type FindIndex(value_type value) const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ -int size_type │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ │ -TYPE const & const_reference │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_e_n_d │ │ │ │ │ -const_iterator end() const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_i_t_e_r_a_t_o_r │ │ │ │ │ -TYPE * iterator │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ -ConstArray() │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ │ -TYPE value_type │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const_reference operator[](int index) const │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ │ -TYPE & reference │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ -int size_type │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ │ -TYPE const & const_reference │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_e_n_d │ │ │ │ │ -iterator end() │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_b_e_g_i_n │ │ │ │ │ -iterator begin() │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_A_r_r_a_y │ │ │ │ │ -Array(value_type *ptr, size_type sizeArg) │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_i_t_e_r_a_t_o_r │ │ │ │ │ -TYPE * iterator │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -reference operator[](int index) │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_A_r_r_a_y │ │ │ │ │ -Array() │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_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_:_:_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_:_:_O_m_p_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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 │ │ │ │ │ +OmpEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, │ │ │ │ │ +OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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 OmpEvaluator *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function. This function has a same signature as │ │ │ │ │ +other device kernels hav... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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 OmpEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_E_v_a_l_u_a_t_o_r_:_:_S_e_t_N_u_m_T_h_r_e_a_d_s │ │ │ │ │ +static void SetNumThreads(int numThreads) │ │ │ │ │ +_O_p_e_n_S_u_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_m_p_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_:_:_O_m_p_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, │ │ │ │ │ +OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _o_m_p_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_:_:_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 │ │ │ │ │ - * _v_t_r │ │ │ │ │ - * _a_r_r_a_y_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _o_m_p_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00728.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/options.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/clVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,40 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
options.h File Reference
│ │ │ │ +
clVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ +#include "../osd/opencl.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Options
 All supported options applying to subdivision scheme. More...
class  CLVertexBuffer
 Concrete vertex buffer class for OpenCL subdivision. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +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 │ │ │ │ │ -options.h File Reference │ │ │ │ │ +clVertexBuffer.h File Reference │ │ │ │ │ #include "../version.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   _O_p_t_i_o_n_s │ │ │ │ │ -  All supported options applying to subdivision scheme. _M_o_r_e_._._. │ │ │ │ │ +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_:_:_S_d_c │ │ │ │ │ +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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _o_p_t_i_o_n_s_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00728.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00728 = [ │ │ │ │ │ - ["Options", "a01329.html", "a01329"] │ │ │ │ │ + ["CLVertexBuffer", "a01149.html", "a01149"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00728_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/options.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/clVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
options.h
│ │ │ │ +
clVertexBuffer.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,137 +118,96 @@ │ │ │ │
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
│ │ │ │ -
26
│ │ │ │ -
27#include "../version.h"
│ │ │ │ -
28
│ │ │ │ -
29namespace OpenSubdiv {
│ │ │ │ -
30namespace OPENSUBDIV_VERSION {
│ │ │ │ -
31
│ │ │ │ -
32namespace Sdc {
│ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29#include "../osd/opencl.h"
│ │ │ │ +
30
│ │ │ │ +
31namespace OpenSubdiv {
│ │ │ │ +
32namespace OPENSUBDIV_VERSION {
│ │ │ │
33
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51class Options {
│ │ │ │ -
52public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
67 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
71 };
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
75 };
│ │ │ │ -
│ │ │ │ -
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 //
│ │ │ │ -
87
│ │ │ │ - │ │ │ │ -
90
│ │ │ │ -
92 void SetVtxBoundaryInterpolation(VtxBoundaryInterpolation b) { _vtxBoundInterp = (EnumIntType) b; }
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ +
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 │ │ │ │ │ -options.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 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,200 +23,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_SDC_OPTIONS_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -30namespace OPENSUBDIV_VERSION { │ │ │ │ │ -31 │ │ │ │ │ -32namespace Sdc { │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -_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; } │ │ │ │ │ +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 │ │ │ │ │ +_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_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; } │ │ │ │ │ +94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 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 │ │ │ │ │ -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 */ │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _o_p_t_i_o_n_s_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00731.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/bilinearScheme.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,36 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
bilinearScheme.h File Reference
│ │ │ │ +
cudaVertexBuffer.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/scheme.h"
│ │ │ │ +#include <cstddef>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  CudaVertexBuffer
 Concrete vertex buffer class for Cuda subdivision. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,20 +1,24 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -bilinearScheme.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cudaVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_s_c_h_e_m_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 │ │ │ │ │ +class   _C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for Cuda 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_:_:_S_d_c │ │ │ │ │ +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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00731_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/bilinearScheme.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
bilinearScheme.h
│ │ │ │ +
cudaVertexBuffer.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,193 +118,80 @@ │ │ │ │
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_BILINEAR_SCHEME_H
│ │ │ │ -
25#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
│ │ │ │ -
26
│ │ │ │ -
27#include "../version.h"
│ │ │ │ -
28
│ │ │ │ -
29#include "../sdc/scheme.h"
│ │ │ │ -
30
│ │ │ │ -
31namespace OpenSubdiv {
│ │ │ │ -
32namespace OPENSUBDIV_VERSION {
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
34namespace Sdc {
│ │ │ │ -
35
│ │ │ │ -
36//
│ │ │ │ -
37// Specializations for Scheme<SCHEME_BILINEAR>:
│ │ │ │ -
38//
│ │ │ │ -
39
│ │ │ │ -
40//
│ │ │ │ -
41// Bilinear traits:
│ │ │ │ -
42//
│ │ │ │ -
43template <>
│ │ │ │ - │ │ │ │ -
45
│ │ │ │ -
46template <>
│ │ │ │ - │ │ │ │ +
24
│ │ │ │ +
25#ifndef OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H
│ │ │ │ +
26#define OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H
│ │ │ │ +
27
│ │ │ │ +
28#include "../version.h"
│ │ │ │ +
29
│ │ │ │ +
30#include <cstddef>
│ │ │ │ +
31
│ │ │ │ +
32namespace OpenSubdiv {
│ │ │ │ +
33namespace OPENSUBDIV_VERSION {
│ │ │ │ +
34
│ │ │ │ +
35namespace Osd {
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43
│ │ │ │ +
44public:
│ │ │ │ +
46 static CudaVertexBuffer * Create(int numElements, int numVertices,
│ │ │ │ +
47 void *deviceContext = NULL);
│ │ │ │
48
│ │ │ │ -
49template <>
│ │ │ │ - │ │ │ │ + │ │ │ │
51
│ │ │ │ -
52template <>
│ │ │ │ - │ │ │ │ -
54
│ │ │ │ -
55
│ │ │ │ -
56//
│ │ │ │ -
57// Refinement masks:
│ │ │ │ -
58//
│ │ │ │ -
59template <>
│ │ │ │ -
60template <typename EDGE, typename MASK>
│ │ │ │ -
61void
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
64 // This should be inline, otherwise trivially replicate it:
│ │ │ │ -
65 assignCreaseMaskForEdge(edge, mask);
│ │ │ │ -
66}
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68template <>
│ │ │ │ -
69template <typename VERTEX, typename MASK>
│ │ │ │ -
70void
│ │ │ │ -
│ │ │ │ -
71Scheme<SCHEME_BILINEAR>::ComputeVertexVertexMask(VERTEX const& vertex, MASK& mask,
│ │ │ │ - │ │ │ │ -
73 // This should be inline, otherwise trivially replicate it:
│ │ │ │ -
74 assignCornerMaskForVertex(vertex, mask);
│ │ │ │ -
75}
│ │ │ │ -
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ -
78//
│ │ │ │ -
79// Limit masks for position -- the limit position of all vertices is the refined vertex.
│ │ │ │ -
80//
│ │ │ │ -
81template <>
│ │ │ │ -
82template <typename VERTEX, typename MASK>
│ │ │ │ -
83inline void
│ │ │ │ -
│ │ │ │ -
84Scheme<SCHEME_BILINEAR>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
│ │ │ │ +
54 void UpdateData(const float *src, int startVertex, int numVertices,
│ │ │ │ +
55 void *deviceContext=NULL);
│ │ │ │ +
56
│ │ │ │ +
58 int GetNumElements() const;
│ │ │ │ +
59
│ │ │ │ +
61 int GetNumVertices() const;
│ │ │ │ +
62
│ │ │ │ +
64 float * BindCudaBuffer();
│ │ │ │ +
65
│ │ │ │ +
66protected:
│ │ │ │ +
68 CudaVertexBuffer(int numElements, int numVertices);
│ │ │ │ +
69
│ │ │ │ +
72 bool allocate();
│ │ │ │ +
73
│ │ │ │ +
74private:
│ │ │ │ +
75 int _numElements;
│ │ │ │ +
76 int _numVertices;
│ │ │ │ +
77 void *_cudaMem;
│ │ │ │ +
78
│ │ │ │ +
79};
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
81} // end namespace Osd
│ │ │ │ +
82
│ │ │ │ +
83} // end namespace OPENSUBDIV_VERSION
│ │ │ │ +
84using namespace OPENSUBDIV_VERSION;
│ │ │ │
85
│ │ │ │ -
86 posMask.SetNumVertexWeights(1);
│ │ │ │ -
87 posMask.SetNumEdgeWeights(0);
│ │ │ │ -
88 posMask.SetNumFaceWeights(0);
│ │ │ │ -
89 posMask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
90
│ │ │ │ -
91 posMask.VertexWeight(0) = 1.0f;
│ │ │ │ -
92}
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
94template <>
│ │ │ │ -
95template <typename VERTEX, typename MASK>
│ │ │ │ -
96inline void
│ │ │ │ -
│ │ │ │ -
97Scheme<SCHEME_BILINEAR>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
│ │ │ │ -
98 int const /* creaseEnds */[2]) const {
│ │ │ │ -
99
│ │ │ │ -
100 assignCornerLimitMask(vertex, posMask);
│ │ │ │ -
101}
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
103template <>
│ │ │ │ -
104template <typename VERTEX, typename MASK>
│ │ │ │ -
105inline void
│ │ │ │ -
│ │ │ │ -
106Scheme<SCHEME_BILINEAR>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
│ │ │ │ -
107
│ │ │ │ -
108 assignCornerLimitMask(vertex, posMask);
│ │ │ │ -
109}
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111//
│ │ │ │ -
112// Limit masks for tangents -- these are ambiguous around all vertices. Provide
│ │ │ │ -
113// the tangents based on the incident edges of the first face.
│ │ │ │ -
114//
│ │ │ │ -
115template <>
│ │ │ │ -
116template <typename VERTEX, typename MASK>
│ │ │ │ -
117inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
119 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ -
120
│ │ │ │ -
121 tan1Mask.SetNumVertexWeights(1);
│ │ │ │ -
122 tan1Mask.SetNumEdgeWeights(2);
│ │ │ │ -
123 tan1Mask.SetNumFaceWeights(0);
│ │ │ │ -
124 tan1Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
125
│ │ │ │ -
126 tan2Mask.SetNumVertexWeights(1);
│ │ │ │ -
127 tan2Mask.SetNumEdgeWeights(2);
│ │ │ │ -
128 tan2Mask.SetNumFaceWeights(0);
│ │ │ │ -
129 tan2Mask.SetFaceWeightsForFaceCenters(false);
│ │ │ │ -
130
│ │ │ │ -
131 tan1Mask.VertexWeight(0) = -1.0f;
│ │ │ │ -
132 tan1Mask.EdgeWeight(0) = 1.0f;
│ │ │ │ -
133 tan1Mask.EdgeWeight(1) = 0.0f;
│ │ │ │ -
134
│ │ │ │ -
135 tan2Mask.VertexWeight(0) = -1.0f;
│ │ │ │ -
136 tan2Mask.EdgeWeight(0) = 0.0f;
│ │ │ │ -
137 tan2Mask.EdgeWeight(1) = 1.0f;
│ │ │ │ -
138}
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
140template <>
│ │ │ │ -
141template <typename VERTEX, typename MASK>
│ │ │ │ -
142inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
144 MASK& tan1Mask, MASK& tan2Mask, int const /* creaseEnds */[2]) const {
│ │ │ │ -
145
│ │ │ │ -
146 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
│ │ │ │ -
147}
│ │ │ │ -
│ │ │ │ -
148
│ │ │ │ -
149template <>
│ │ │ │ -
150template <typename VERTEX, typename MASK>
│ │ │ │ -
151inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
153 MASK& tan1Mask, MASK& tan2Mask) const {
│ │ │ │ -
154
│ │ │ │ -
155 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
│ │ │ │ -
156}
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158} // end namespace sdc
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease::RULE_UNKNOWN) const
Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can be specified to accel...
Definition scheme.h:392
│ │ │ │ -
void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
│ │ │ │ - │ │ │ │ -
void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const creaseEnds[2]) 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
│ │ │ │ +
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.
│ │ │ │ + │ │ │ │ +
CudaVertexBuffer(int numElements, int numVertices)
Constructor.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -bilinearScheme.h │ │ │ │ │ +cudaVertexBuffer.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,211 +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_SDC_BILINEAR_SCHEME_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../sdc/scheme.h" │ │ │ │ │ -30 │ │ │ │ │ -31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -32namespace OPENSUBDIV_VERSION { │ │ │ │ │ -33 │ │ │ │ │ -_3_4namespace Sdc { │ │ │ │ │ -35 │ │ │ │ │ -36// │ │ │ │ │ -37// Specializations for Scheme: │ │ │ │ │ -38// │ │ │ │ │ -39 │ │ │ │ │ -40// │ │ │ │ │ -41// Bilinear traits: │ │ │ │ │ -42// │ │ │ │ │ -43template <> │ │ │ │ │ -_4_4inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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___Q_U_A_D_S; } │ │ │ │ │ -45 │ │ │ │ │ -46template <> │ │ │ │ │ -_4_7inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 4; } │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +43 │ │ │ │ │ +44public: │ │ │ │ │ +_4_6 static _C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +47 void *deviceContext = NULL); │ │ │ │ │ 48 │ │ │ │ │ -49template <> │ │ │ │ │ -_5_0inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 4; } │ │ │ │ │ +_5_0 _~_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ 51 │ │ │ │ │ -52template <> │ │ │ │ │ -_5_3inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 0; } │ │ │ │ │ -54 │ │ │ │ │ -55 │ │ │ │ │ -56// │ │ │ │ │ -57// Refinement masks: │ │ │ │ │ -58// │ │ │ │ │ -59template <> │ │ │ │ │ -60template │ │ │ │ │ -61void │ │ │ │ │ -_6_2_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k(EDGE const& edge, MASK& mask, │ │ │ │ │ -63 _C_r_e_a_s_e_:_:_R_u_l_e, _C_r_e_a_s_e_:_:_R_u_l_e) const { │ │ │ │ │ -64 // This should be inline, otherwise trivially replicate it: │ │ │ │ │ -65 assignCreaseMaskForEdge(edge, mask); │ │ │ │ │ -66} │ │ │ │ │ -67 │ │ │ │ │ -68template <> │ │ │ │ │ -69template │ │ │ │ │ -70void │ │ │ │ │ -_7_1_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ -mask, │ │ │ │ │ -72 _C_r_e_a_s_e_:_:_R_u_l_e, _C_r_e_a_s_e_:_:_R_u_l_e) const { │ │ │ │ │ -73 // This should be inline, otherwise trivially replicate it: │ │ │ │ │ -74 assignCornerMaskForVertex(vertex, mask); │ │ │ │ │ -75} │ │ │ │ │ -76 │ │ │ │ │ -77 │ │ │ │ │ -78// │ │ │ │ │ -79// Limit masks for position -- the limit position of all vertices is the │ │ │ │ │ -refined vertex. │ │ │ │ │ -80// │ │ │ │ │ -81template <> │ │ │ │ │ -82template │ │ │ │ │ -83inline void │ │ │ │ │ -_8_4_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 { │ │ │ │ │ +_5_4 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ +55 void *deviceContext=NULL); │ │ │ │ │ +56 │ │ │ │ │ +_5_8 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +59 │ │ │ │ │ +_6_1 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +62 │ │ │ │ │ +_6_4 float * _B_i_n_d_C_u_d_a_B_u_f_f_e_r(); │ │ │ │ │ +65 │ │ │ │ │ +66protected: │ │ │ │ │ +_6_8 _C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +69 │ │ │ │ │ +_7_2 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ +73 │ │ │ │ │ +74private: │ │ │ │ │ +75 int _numElements; │ │ │ │ │ +76 int _numVertices; │ │ │ │ │ +77 void *_cudaMem; │ │ │ │ │ +78 │ │ │ │ │ +79}; │ │ │ │ │ +80 │ │ │ │ │ +81} // end namespace Osd │ │ │ │ │ +82 │ │ │ │ │ +83} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +84using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 85 │ │ │ │ │ -86 posMask.SetNumVertexWeights(1); │ │ │ │ │ -87 posMask.SetNumEdgeWeights(0); │ │ │ │ │ -88 posMask.SetNumFaceWeights(0); │ │ │ │ │ -89 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -90 │ │ │ │ │ -91 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ -92} │ │ │ │ │ -93 │ │ │ │ │ -94template <> │ │ │ │ │ -95template │ │ │ │ │ -96inline void │ │ │ │ │ -_9_7_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ -98 int const /* creaseEnds */[2]) const { │ │ │ │ │ -99 │ │ │ │ │ -100 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ -101} │ │ │ │ │ -102 │ │ │ │ │ -103template <> │ │ │ │ │ -104template │ │ │ │ │ -105inline void │ │ │ │ │ -_1_0_6_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 { │ │ │ │ │ -107 │ │ │ │ │ -108 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ -109} │ │ │ │ │ -110 │ │ │ │ │ -111// │ │ │ │ │ -112// Limit masks for tangents -- these are ambiguous around all vertices. │ │ │ │ │ -Provide │ │ │ │ │ -113// the tangents based on the incident edges of the first face. │ │ │ │ │ -114// │ │ │ │ │ -115template <> │ │ │ │ │ -116template │ │ │ │ │ -117inline void │ │ │ │ │ -_1_1_8_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 */, │ │ │ │ │ -119 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -120 │ │ │ │ │ -121 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -122 tan1Mask.SetNumEdgeWeights(2); │ │ │ │ │ -123 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ -124 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -125 │ │ │ │ │ -126 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -127 tan2Mask.SetNumEdgeWeights(2); │ │ │ │ │ -128 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ -129 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -130 │ │ │ │ │ -131 tan1Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ -132 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ -133 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ -134 │ │ │ │ │ -135 tan2Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ -136 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ -137 tan2Mask.EdgeWeight(1) = 1.0f; │ │ │ │ │ -138} │ │ │ │ │ -139 │ │ │ │ │ -140template <> │ │ │ │ │ -141template │ │ │ │ │ -142inline void │ │ │ │ │ -_1_4_3_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ -144 MASK& tan1Mask, MASK& tan2Mask, int const /* creaseEnds */[2]) const { │ │ │ │ │ -145 │ │ │ │ │ -146 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ -147} │ │ │ │ │ -148 │ │ │ │ │ -149template <> │ │ │ │ │ -150template │ │ │ │ │ -151inline void │ │ │ │ │ -_1_5_2_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ -153 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -154 │ │ │ │ │ -155 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ -156} │ │ │ │ │ -157 │ │ │ │ │ -158} // end namespace sdc │ │ │ │ │ -159 │ │ │ │ │ -160} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -161using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -162} // end namespace OpenSubdiv │ │ │ │ │ -163 │ │ │ │ │ -164#endif /* OPENSUBDIV3_SDC_BILINEAR_SCHEME_H */ │ │ │ │ │ +86} // end namespace OpenSubdiv │ │ │ │ │ +87 │ │ │ │ │ +88#endif // OPENSUBDIV3_OSD_CUDA_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_:_:_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___Q_U_A_D_S │ │ │ │ │ -@ SPLIT_TO_QUADS │ │ │ │ │ -Used by Catmark and Bilinear. │ │ │ │ │ -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_:_:_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_:_:_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_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ -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... │ │ │ │ │ -DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_5_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_:_:_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_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ -void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, │ │ │ │ │ -Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease:: │ │ │ │ │ -RULE_UNKNOWN) const │ │ │ │ │ -Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can │ │ │ │ │ -be specified to accel... │ │ │ │ │ -DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_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_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_:_:_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_:_:_O_s_d_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for Cuda subdivision. │ │ │ │ │ +DDeeffiinniittiioonn _c_u_d_a_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_u_d_a_B_u_f_f_e_r │ │ │ │ │ +float * BindCudaBuffer() │ │ │ │ │ +Returns cuda memory. │ │ │ │ │ +_O_p_e_n_S_u_b_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +~CudaVertexBuffer() │ │ │ │ │ +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_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_u_d_a_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_u_d_a_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CudaVertexBuffer * 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_u_d_a_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_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CudaVertexBuffer(int numElements, int numVertices) │ │ │ │ │ +Constructor. │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00734.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/scheme.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/clEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,49 +90,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
scheme.h File Reference
│ │ │ │ +
clEvaluator.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include "../version.h"
│ │ │ │ -#include "../sdc/types.h"
│ │ │ │ -#include "../sdc/options.h"
│ │ │ │ -#include "../sdc/crease.h"
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstdlib>
│ │ │ │ -#include <vector>
│ │ │ │ +#include "../osd/opencl.h"
│ │ │ │ +#include "../osd/types.h"
│ │ │ │ +#include "../osd/bufferDescriptor.h"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Scheme< SCHEME_TYPE >
 Scheme is a class template which provides all implementation for the subdivision schemes supported by OpenSubdiv through specializations of the methods of each. An instance of Scheme<SCHEME_TYPE> includes a set of Options that will dictate the variable aspects of its behavior.
│ │ │ │ - More...
class  CLStencilTable
 OpenCL stencil table. More...
 
class  Scheme< SCHEME_TYPE >::LocalMask< WEIGHT >
class  CLEvaluator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  OpenSubdiv
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
 
namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +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 │ │ │ │ │ -scheme.h File Reference │ │ │ │ │ +clEvaluator.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_/_c_r_e_a_s_e_._h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_o_s_d_/_o_p_e_n_c_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   _S_c_h_e_m_e_<_ _S_C_H_E_M_E___T_Y_P_E_ _> │ │ │ │ │ - _S_c_h_e_m_e is a class template which provides all implementation for the │ │ │ │ │ - subdivision schemes supported by _O_p_e_n_S_u_b_d_i_v through specializations of │ │ │ │ │ -  the methods of each. An instance of Scheme includes a set │ │ │ │ │ - of _O_p_t_i_o_n_s that will dictate the variable aspects of its behavior. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _C_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +  OpenCL stencil table. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _S_c_h_e_m_e_<_ _S_C_H_E_M_E___T_Y_P_E_ _>_:_:_L_o_c_a_l_M_a_s_k_<_ _W_E_I_G_H_T_ _> │ │ │ │ │ +class   _C_L_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_:_:_S_d_c │ │ │ │ │ +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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _s_c_h_e_m_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_l_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00734.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00734 = [ │ │ │ │ │ - ["Scheme< SCHEME_TYPE >", "a01333.html", "a01333"], │ │ │ │ │ - ["LocalMask< WEIGHT >", "a01337.html", "a01337"] │ │ │ │ │ + ["CLStencilTable", "a01137.html", "a01137"], │ │ │ │ │ + ["CLEvaluator", "a01141.html", "a01141"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00734_source.html │ │ │ │ @@ -22,8471 +22,15732 @@ │ │ │ │ 00000150: 656e 743d 2244 6f78 7967 656e 2031 2e39 ent="Doxygen 1.9 │ │ │ │ 00000160: 2e38 222f 3e0a 3c6d 6574 6120 6e61 6d65 .8"/>..OpenSubdiv: o │ │ │ │ -000001c0: 7065 6e73 7562 6469 762f 7364 632f 7363 pensubdiv/sdc/sc │ │ │ │ -000001d0: 6865 6d65 2e68 2053 6f75 7263 6520 4669 heme.h Source Fi │ │ │ │ -000001e0: 6c65 3c2f 7469 746c 653e 0a3c 6c69 6e6b le...... │ │ │ │ -00000310: 3c73 6372 6970 7420 7479 7065 3d22 7465 .........
.
. │ │ │ │ -00000530: 3c74 6162 6c65 2063 656c 6c73 7061 6369 . │ │ │ │ -00000560: 0a20 3c74 7220 6964 3d22 7072 6f6a 6563 . . . . .
│ │ │ │ -000005c0: 3c2f 7464 3e0a 2020 3c74 6420 6964 3d22 . │ │ │ │ -000005e0: 2020 3c64 6976 2069 643d 2270 726f 6a65
OpenSubd │ │ │ │ -00000600: 6976 0a20 2020 3c2f 6469 763e 0a20 203c iv.
. < │ │ │ │ -00000610: 2f74 643e 0a20 3c2f 7472 3e0a 203c 2f74 /td>.
.< │ │ │ │ -00000630: 2f64 6976 3e0a 3c21 2d2d 2065 6e64 2068 /div>..< │ │ │ │ -00000650: 212d 2d20 4765 6e65 7261 7465 6420 6279 !-- Generated by │ │ │ │ -00000660: 2044 6f78 7967 656e 2031 2e39 2e38 202d Doxygen 1.9.8 - │ │ │ │ -00000670: 2d3e 0a3c 7363 7269 7074 2074 7970 653d ->.. │ │ │ │ -00000750: 3c73 6372 6970 7420 7479 7065 3d22 7465 ...
...
.. │ │ │ │ -00000d00: 3c21 2d2d 2069 6672 616d 6520 7368 6f77 .< │ │ │ │ -00000d40: 6469 7620 6964 3d22 4d53 6561 7263 6852 div id="MSearchR │ │ │ │ -00000d50: 6573 756c 7473 5769 6e64 6f77 223e 0a3c esultsWindow">.< │ │ │ │ -00000d60: 6469 7620 6964 3d22 4d53 6561 7263 6852 div id="MSearchR │ │ │ │ -00000d70: 6573 756c 7473 223e 0a3c 6469 7620 636c esults">.
. │ │ │ │ -00000da0: 0a3c 6469 7620 6964 3d22 5352 5265 7375 .
.
L │ │ │ │ -00000de0: 6f61 6469 6e67 2e2e 2e3c 2f64 6976 3e0a oading...
. │ │ │ │ -00000df0: 3c64 6976 2063 6c61 7373 3d22 5352 5374 .
No │ │ │ │ -00000e50: 4d61 7463 6865 733c 2f64 6976 3e0a 3c2f Matches
..
..
..
. │ │ │ │ -00000e90: 2020 3c64 6976 2063 6c61 7373 3d22 6865
sc │ │ │ │ -00000ec0: 6865 6d65 2e68 3c2f 6469 763e 3c2f 6469 heme.h
.
.
.Go to the do │ │ │ │ -00000f20: 6375 6d65 6e74 6174 696f 6e20 6f66 2074 cumentation of t │ │ │ │ -00000f30: 6869 7320 6669 6c65 2e3c 2f61 3e3c 6469 his file.
1 │ │ │ │ -00000fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 //< │ │ │ │ -00000fc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.< │ │ │ │ -00000fe0: 6120 6964 3d22 6c30 3030 3032 2220 6e61 a id="l00002" na │ │ │ │ -00000ff0: 6d65 3d22 6c30 3030 3032 223e 3c2f 613e me="l00002"> │ │ │ │ -00001000: 3c73 7061 6e20 636c 6173 733d 226c 696e 2// Copy │ │ │ │ -00001040: 7269 6768 7420 3230 3134 2044 7265 616d right 2014 Dream │ │ │ │ -00001050: 576f 726b 7320 416e 696d 6174 696f 6e20 Works Animation │ │ │ │ -00001060: 4c4c 432e 3c2f 7370 616e 3e3c 2f64 6976 LLC.
.
3< │ │ │ │ -000010c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>//
.
< │ │ │ │ -00001120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00001130: 6e6f 223e 2020 2020 343c 2f73 7061 6e3e no"> 4 │ │ │ │ -00001140: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Licen │ │ │ │ -00001160: 7365 6420 756e 6465 7220 7468 6520 4170 sed under the Ap │ │ │ │ -00001170: 6163 6865 204c 6963 656e 7365 2c20 5665 ache License, Ve │ │ │ │ -00001180: 7273 696f 6e20 322e 3020 2874 6865 2026 rsion 2.0 (the & │ │ │ │ -00001190: 7175 6f74 3b41 7061 6368 6520 4c69 6365 quot;Apache Lice │ │ │ │ -000011a0: 6e73 6526 7175 6f74 3b29 3c2f 7370 616e nse")
.
│ │ │ │ -00001200: 2020 2020 353c 2f73 7061 6e3e 3c73 7061 5// with the │ │ │ │ -00001230: 666f 6c6c 6f77 696e 6720 6d6f 6469 6669 following modifi │ │ │ │ -00001240: 6361 7469 6f6e 3b20 796f 7520 6d61 7920 cation; you may │ │ │ │ -00001250: 6e6f 7420 7573 6520 7468 6973 2066 696c not use this fil │ │ │ │ -00001260: 6520 6578 6365 7074 2069 6e3c 2f73 7061 e except in
.
6// complian │ │ │ │ -000012f0: 6365 2077 6974 6820 7468 6520 4170 6163 ce with the Apac │ │ │ │ -00001300: 6865 204c 6963 656e 7365 2061 6e64 2074 he License and t │ │ │ │ -00001310: 6865 2066 6f6c 6c6f 7769 6e67 206d 6f64 he following mod │ │ │ │ -00001320: 6966 6963 6174 696f 6e20 746f 2069 743a ification to it: │ │ │ │ -00001330: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -00001350: 3c61 2069 643d 226c 3030 3030 3722 206e 7// Sec │ │ │ │ -000013b0: 7469 6f6e 2036 2e20 5472 6164 656d 6172 tion 6. Trademar │ │ │ │ -000013c0: 6b73 2e20 6973 2064 656c 6574 6564 2061 ks. is deleted a │ │ │ │ -000013d0: 6e64 2072 6570 6c61 6365 6420 7769 7468 nd replaced with │ │ │ │ -000013e0: 3a3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c :
.< │ │ │ │ -000013f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00001400: 3e3c 6120 6964 3d22 6c30 3030 3038 2220 > 8//
.
9// 6. Trade │ │ │ │ -000014e0: 6d61 726b 732e 2054 6869 7320 4c69 6365 marks. This Lice │ │ │ │ -000014f0: 6e73 6520 646f 6573 206e 6f74 2067 7261 nse does not gra │ │ │ │ -00001500: 6e74 2070 6572 6d69 7373 696f 6e20 746f nt permission to │ │ │ │ -00001510: 2075 7365 2074 6865 2074 7261 6465 3c2f use the trade
.
< │ │ │ │ -00001560: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00001570: 6e6f 223e 2020 2031 303c 2f73 7061 6e3e no"> 10 │ │ │ │ -00001580: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // na │ │ │ │ -000015a0: 6d65 732c 2074 7261 6465 6d61 726b 732c mes, trademarks, │ │ │ │ -000015b0: 2073 6572 7669 6365 206d 6172 6b73 2c20 service marks, │ │ │ │ -000015c0: 6f72 2070 726f 6475 6374 206e 616d 6573 or product names │ │ │ │ -000015d0: 206f 6620 7468 6520 4c69 6365 6e73 6f72 of the Licensor │ │ │ │ -000015e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -00001600: 3c61 2069 643d 226c 3030 3031 3122 206e 11// │ │ │ │ -00001660: 616e 6420 6974 7320 6166 6669 6c69 6174 and its affiliat │ │ │ │ -00001670: 6573 2c20 6578 6365 7074 2061 7320 7265 es, except as re │ │ │ │ -00001680: 7175 6972 6564 2074 6f20 636f 6d70 6c79 quired to comply │ │ │ │ -00001690: 2077 6974 6820 5365 6374 696f 6e20 3428 with Section 4( │ │ │ │ -000016a0: 6329 206f 663c 2f73 7061 6e3e 3c2f 6469 c) of.
12 │ │ │ │ -00001700: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -00001720: 2020 2020 2074 6865 204c 6963 656e 7365 the License │ │ │ │ -00001730: 2061 6e64 2074 6f20 7265 7072 6f64 7563 and to reproduc │ │ │ │ -00001740: 6520 7468 6520 636f 6e74 656e 7420 6f66 e the content of │ │ │ │ -00001750: 2074 6865 204e 4f54 4943 4520 6669 6c65 the NOTICE file │ │ │ │ -00001760: 2e3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c .
.< │ │ │ │ -00001770: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00001780: 3e3c 6120 6964 3d22 6c30 3030 3133 2220 > 13//.
14// You may │ │ │ │ -00001860: 6f62 7461 696e 2061 2063 6f70 7920 6f66 obtain a copy of │ │ │ │ -00001870: 2074 6865 2041 7061 6368 6520 4c69 6365 the Apache Lice │ │ │ │ -00001880: 6e73 6520 6174 3c2f 7370 616e 3e3c 2f64 nse at.
1 │ │ │ │ -000018e0: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5// │ │ │ │ -00001900: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -00001920: 3c61 2069 643d 226c 3030 3031 3622 206e 16
// │ │ │ │ -00001980: 2068 7474 703a 2f2f 7777 772e 6170 6163 http://www.apac │ │ │ │ -00001990: 6865 2e6f 7267 2f6c 6963 656e 7365 732f he.org/licenses/ │ │ │ │ -000019a0: 4c49 4345 4e53 452d 322e 303c 2f73 7061 LICENSE-2.0
.
17//.
18 │ │ │ │ -00001a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -00001aa0: 2020 556e 6c65 7373 2072 6571 7569 7265 Unless require │ │ │ │ -00001ab0: 6420 6279 2061 7070 6c69 6361 626c 6520 d by applicable │ │ │ │ -00001ac0: 6c61 7720 6f72 2061 6772 6565 6420 746f law or agreed to │ │ │ │ -00001ad0: 2069 6e20 7772 6974 696e 672c 2073 6f66 in writing, sof │ │ │ │ -00001ae0: 7477 6172 653c 2f73 7061 6e3e 3c2f 6469 tware.
19 │ │ │ │ -00001b40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -00001b60: 2020 6469 7374 7269 6275 7465 6420 756e distributed un │ │ │ │ -00001b70: 6465 7220 7468 6520 4170 6163 6865 204c der the Apache L │ │ │ │ -00001b80: 6963 656e 7365 2077 6974 6820 7468 6520 icense with the │ │ │ │ -00001b90: 6162 6f76 6520 6d6f 6469 6669 6361 7469 above modificati │ │ │ │ -00001ba0: 6f6e 2069 733c 2f73 7061 6e3e 3c2f 6469 on is.
20 │ │ │ │ -00001c00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -00001c20: 2020 6469 7374 7269 6275 7465 6420 6f6e distributed on │ │ │ │ -00001c30: 2061 6e20 2671 756f 743b 4153 2049 5326 an "AS IS& │ │ │ │ -00001c40: 7175 6f74 3b20 4241 5349 532c 2057 4954 quot; BASIS, WIT │ │ │ │ -00001c50: 484f 5554 2057 4152 5241 4e54 4945 5320 HOUT WARRANTIES │ │ │ │ -00001c60: 4f52 2043 4f4e 4449 5449 4f4e 5320 4f46 OR CONDITIONS OF │ │ │ │ -00001c70: 2041 4e59 3c2f 7370 616e 3e3c 2f64 6976 ANY
.
21< │ │ │ │ -00001cd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -00001cf0: 204b 494e 442c 2065 6974 6865 7220 6578 KIND, either ex │ │ │ │ -00001d00: 7072 6573 7320 6f72 2069 6d70 6c69 6564 press or implied │ │ │ │ -00001d10: 2e20 5365 6520 7468 6520 4170 6163 6865 . See the Apache │ │ │ │ -00001d20: 204c 6963 656e 7365 2066 6f72 2074 6865 License for the │ │ │ │ -00001d30: 2073 7065 6369 6669 633c 2f73 7061 6e3e specific │ │ │ │ -00001d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -00001d90: 2020 3232 3c2f 7370 616e 3e3c 7370 616e 22// language g │ │ │ │ -00001dc0: 6f76 6572 6e69 6e67 2070 6572 6d69 7373 overning permiss │ │ │ │ -00001dd0: 696f 6e73 2061 6e64 206c 696d 6974 6174 ions and limitat │ │ │ │ -00001de0: 696f 6e73 2075 6e64 6572 2074 6865 2041 ions under the A │ │ │ │ -00001df0: 7061 6368 6520 4c69 6365 6e73 652e 3c2f pache License.
.
< │ │ │ │ -00001e40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00001e50: 6e6f 223e 2020 2032 333c 2f73 7061 6e3e no"> 23 │ │ │ │ -00001e60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -00001e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00001ed0: 2032 343c 2f73 7061 6e3e 3c73 7061 6e20 24#ifndef OPE │ │ │ │ -00001f00: 4e53 5542 4449 5633 5f53 4443 5f53 4348 NSUBDIV3_SDC_SCH │ │ │ │ -00001f10: 454d 455f 483c 2f73 7061 6e3e 3c2f 6469 EME_H.
25 │ │ │ │ -00001f70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 #define OPENSU │ │ │ │ -00001fa0: 4244 4956 335f 5344 435f 5343 4845 4d45 BDIV3_SDC_SCHEME │ │ │ │ -00001fb0: 5f48 3c2f 7370 616e 3e3c 2f64 6976 3e0a _H
. │ │ │ │ -00001fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
.
< │ │ │ │ -00002050: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00002060: 6e6f 223e 2020 2032 373c 2f73 7061 6e3e no"> 27 │ │ │ │ -00002070: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ -00002090: 7564 6520 2671 756f 743b 2e2e 2f76 6572 ude "../ver │ │ │ │ -000020a0: 7369 6f6e 2e68 2671 756f 743b 3c2f 7370 sion.h"
.
28 < │ │ │ │ -00002110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00002160: 2032 393c 2f73 7061 6e3e 3c73 7061 6e20 29#include &q │ │ │ │ -00002190: 756f 743b 2e2e 2f73 6463 2f74 7970 6573 uot;../sdc/types │ │ │ │ -000021a0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ -000021b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00002200: 2033 303c 2f73 7061 6e3e 3c73 7061 6e20 30#include &q │ │ │ │ -00002230: 756f 743b 2e2e 2f73 6463 2f6f 7074 696f uot;../sdc/optio │ │ │ │ -00002240: 6e73 2e68 2671 756f 743b 3c2f 7370 616e ns.h"
.
│ │ │ │ -000022a0: 2020 2033 313c 2f73 7061 6e3e 3c73 7061 31#include │ │ │ │ -000022d0: 2671 756f 743b 2e2e 2f73 6463 2f63 7265 "../sdc/cre │ │ │ │ -000022e0: 6173 652e 6826 7175 6f74 3b3c 2f73 7061 ase.h"
.
32 .
│ │ │ │ -000023a0: 3333 3c2f 7370 616e 3e3c 7370 616e 2063 33#include < │ │ │ │ -000023d0: 3b63 6173 7365 7274 2667 743b 3c2f 7370 ;cassert>
.
34#includ │ │ │ │ -00002460: 6520 266c 743b 6373 7464 6c69 6226 6774 e <cstdlib> │ │ │ │ -00002470: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
.< │ │ │ │ -00002480: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00002490: 3e3c 6120 6964 3d22 6c30 3030 3335 2220 > 35#i │ │ │ │ -000024f0: 6e63 6c75 6465 2026 6c74 3b76 6563 746f nclude <vecto │ │ │ │ -00002500: 7226 6774 3b3c 2f73 7061 6e3e 3c2f 6469 r>.
36 │ │ │ │ -00002560: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
.< │ │ │ │ -00002570: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00002580: 3e3c 6120 6964 3d22 6c30 3030 3337 2220 > 37namespa │ │ │ │ -000025e0: 6365 203c 2f73 7061 6e3e 3c61 2063 6c61 ce OpenSu │ │ │ │ -00002620: 6264 6976 3c2f 613e 207b 3c2f 6469 763e bdiv {
│ │ │ │ -00002630: 0a3c 6469 7620 636c 6173 733d 226c 696e .
│ │ │ │ -00002660: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 38names │ │ │ │ -000026a0: 7061 6365 203c 2f73 7061 6e3e 4f50 454e pace OPEN │ │ │ │ -000026b0: 5355 4244 4956 5f56 4552 5349 4f4e 207b SUBDIV_VERSION { │ │ │ │ -000026c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -00002710: 2020 3339 3c2f 7370 616e 3e20 3c2f 6469 39 .
40 │ │ │ │ -00002770: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 nam │ │ │ │ -00002790: 6573 7061 6365 203c 2f73 7061 6e3e 5364 espace Sd │ │ │ │ -000027a0: 6320 7b3c 2f64 6976 3e0a 3c64 6976 2063 c {
.
41 < │ │ │ │ -00002800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00002850: 2036 353c 2f73 7061 6e3e 3c73 7061 6e20 65 │ │ │ │ -00002870: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -00002880: 266c 743b 5363 6865 6d65 5479 7065 2053 <SchemeType S │ │ │ │ -00002890: 4348 454d 455f 5459 5045 2667 743b 3c2f CHEME_TYPE>.
.
< │ │ │ │ -00002920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00002930: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 66 │ │ │ │ -00002960: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 cla │ │ │ │ -00002980: 7373 203c 2f73 7061 6e3e 3c61 2063 6c61 ss Scheme │ │ │ │ -000029c0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
.
67 .
│ │ │ │ -00002a70: 3638 3c2f 7370 616e 3e3c 7370 616e 2063 68p │ │ │ │ -00002a90: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
6 │ │ │ │ -00002af0: 393c 2f73 7061 6e3e 203c 2f64 6976 3e0a 9
. │ │ │ │ -00002b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
< │ │ │ │ -00002b30: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ │ -00002b90: 3730 3c2f 613e 3c2f 7370 616e 3e20 2020 70 │ │ │ │ -00002ba0: 203c 6120 636c 6173 733d 2263 6f64 6520 Scheme() : │ │ │ │ -00002c00: 205f 6f70 7469 6f6e 7328 2920 7b20 7d3c _options() { }< │ │ │ │ -00002c10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00002c60: 2037 313c 2f73 7061 6e3e 203c 2f64 6976 71
.
│ │ │ │ -00002d00: 2020 3732 3c2f 613e 3c2f 7370 616e 3e20 72 │ │ │ │ -00002d10: 2020 203c 6120 636c 6173 733d 2263 6f64 Scheme(< │ │ │ │ -00002d70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00002d80: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ -00002d90: 3133 3239 2e68 746d 6c22 3e4f 7074 696f 1329.html">Optio │ │ │ │ -00002da0: 6e73 3c2f 613e 203c 7370 616e 2063 6c61 ns con │ │ │ │ -00002dc0: 7374 3c2f 7370 616e 3e26 616d 703b 206f st& o │ │ │ │ -00002dd0: 7074 696f 6e73 2920 3a20 5f6f 7074 696f ptions) : _optio │ │ │ │ -00002de0: 6e73 286f 7074 696f 6e73 2920 7b20 7d3c ns(options) { }< │ │ │ │ -00002df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00002e40: 2037 333c 2f73 7061 6e3e 203c 2f64 6976 73
.
│ │ │ │ -00002ee0: 2020 3734 3c2f 613e 3c2f 7370 616e 3e20 74 │ │ │ │ -00002ef0: 2020 203c 6120 636c 6173 733d 2263 6f64 O │ │ │ │ -00002f20: 7074 696f 6e73 3c2f 613e 203c 6120 636c ptions GetO │ │ │ │ -00002f80: 7074 696f 6e73 3c2f 613e 2829 3c73 7061 ptions() const │ │ │ │ -00002fb0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ │ -00002fd0: 726e 3c2f 7370 616e 3e20 5f6f 7074 696f rn _optio │ │ │ │ -00002fe0: 6e73 3b20 7d3c 2f64 6976 3e0a 3c64 6976 ns; }
.
< │ │ │ │ -00003020: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00003030: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 75 void SetOption │ │ │ │ -00003110: 733c 2f61 3e28 3c73 7061 6e20 636c 6173 s(cons │ │ │ │ -00003130: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Options │ │ │ │ -00003170: 2661 6d70 3b20 6e65 774f 7074 696f 6e73 & newOptions │ │ │ │ -00003180: 2920 7b20 5f6f 7074 696f 6e73 203d 206e ) { _options = n │ │ │ │ -00003190: 6577 4f70 7469 6f6e 733b 207d 3c2f 6469 ewOptions; }.
76 │ │ │ │ -000031f0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
.< │ │ │ │ -00003200: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00003210: 3e3c 6120 6964 3d22 6c30 3030 3830 2220 > 80 tem │ │ │ │ -00003270: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ -00003280: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ -000032a0: 2f73 7061 6e3e 2046 4143 452c 203c 7370 /span> FACE, typename MASK>
.
81< │ │ │ │ -00003330: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ -00003360: 3c61 2063 6c61 7373 3d22 636f 6465 2068 ComputeFaceVert │ │ │ │ -000033c0: 6578 4d61 736b 3c2f 613e 2846 4143 4520 exMask(FACE │ │ │ │ -000033d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const& faceNeig │ │ │ │ -00003400: 6862 6f72 686f 6f64 2c20 4d41 534b 2661 hborhood, MASK&a │ │ │ │ -00003410: 6d70 3b20 6661 6365 5665 7274 6578 4d61 mp; faceVertexMa │ │ │ │ -00003420: 736b 2920 3c73 7061 6e20 636c 6173 733d sk) const< │ │ │ │ -00003440: 2f73 7061 6e3e 3b3c 2f64 6976 3e0a 3c64 /span>;
. │ │ │ │ -00003460: 3c61 2069 643d 226c 3030 3038 3222 206e 82
.
98 │ │ │ │ -00003500: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ │ -00003520: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename EDGE, ty │ │ │ │ -00003570: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ -00003580: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
.< │ │ │ │ -000035a0: 6120 6964 3d22 6c30 3030 3939 2220 6e61 a id="l00099" na │ │ │ │ -000035b0: 6d65 3d22 6c30 3030 3939 223e 3c2f 613e me="l00099"> │ │ │ │ -000035c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 99 v │ │ │ │ -00003600: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid Comp │ │ │ │ -00003660: 7574 6545 6467 6556 6572 7465 784d 6173 uteEdgeVertexMas │ │ │ │ -00003670: 6b3c 2f61 3e28 4544 4745 203c 7370 616e k(EDGE const&am │ │ │ │ -000036a0: 703b 2065 6467 654e 6569 6768 626f 7268 p; edgeNeighborh │ │ │ │ -000036b0: 6f6f 642c 204d 4153 4b26 616d 703b 2065 ood, MASK& e │ │ │ │ -000036c0: 6467 6556 6572 7465 784d 6173 6b2c 3c2f dgeVertexMask,.
1 │ │ │ │ -00003720: 3030 3c2f 7370 616e 3e20 2020 2020 2020 00 │ │ │ │ -00003730: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003740: 2020 2020 2020 2020 3c61 2063 6c61 7373 Crea │ │ │ │ -000037a0: 7365 3a3a 5275 6c65 3c2f 613e 2070 6172 se::Rule par │ │ │ │ -000037b0: 656e 7452 756c 6520 3d20 3c61 2063 6c61 entRule = Cre │ │ │ │ -00003830: 6173 653a 3a52 554c 455f 554e 4b4e 4f57 ase::RULE_UNKNOW │ │ │ │ -00003840: 4e3c 2f61 3e2c 3c2f 6469 763e 0a3c 6469 N,
.< │ │ │ │ -00003860: 6120 6964 3d22 6c30 3031 3031 2220 6e61 a id="l00101" na │ │ │ │ -00003870: 6d65 3d22 6c30 3031 3031 223e 3c2f 613e me="l00101"> │ │ │ │ -00003880: 3c73 7061 6e20 636c 6173 733d 226c 696e 101 │ │ │ │ -000038b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000038c0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ -00003920: 3c2f 613e 2063 6869 6c64 5275 6c65 203d childRule = │ │ │ │ -00003930: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::RULE │ │ │ │ -000039b0: 5f55 4e4b 4e4f 574e 3c2f 613e 2920 3c73 _UNKNOWN) const │ │ │ │ -000039e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
│ │ │ │ -00003a30: 2020 3130 323c 2f73 7061 6e3e 203c 2f64 102 .
11 │ │ │ │ -00003a90: 323c 2f73 7061 6e3e 2020 2020 3c73 7061 2 template <type │ │ │ │ -00003ae0: 6e61 6d65 3c2f 7370 616e 3e20 5645 5254 name VERT │ │ │ │ -00003af0: 4558 2c20 3c73 7061 6e20 636c 6173 733d EX, typena │ │ │ │ -00003b10: 6d65 3c2f 7370 616e 3e20 4d41 534b 2667 me MASK&g │ │ │ │ -00003b20: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
..
114 │ │ │ │ -00003cd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003ce0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003cf0: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::Rul │ │ │ │ -00003d50: 653c 2f61 3e20 7061 7265 6e74 5275 6c65 e parentRule │ │ │ │ -00003d60: 203d 203c 6120 636c 6173 733d 2263 6f64 = Crease::RU │ │ │ │ -00003de0: 4c45 5f55 4e4b 4e4f 574e 3c2f 613e 2c3c LE_UNKNOWN,< │ │ │ │ -00003df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00003e40: 3131 353c 2f73 7061 6e3e 2020 2020 2020 115 │ │ │ │ -00003e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003e60: 2020 2020 2020 2020 2020 2020 2020 3c61 Crease::Rule childRule = < │ │ │ │ -00003ee0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00003ef0: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ -00003f00: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ -00003f10: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ -00003f20: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ -00003f30: 6232 3939 6165 6662 3236 3031 3361 3739 b299aefb26013a79 │ │ │ │ -00003f40: 6435 3231 3931 6137 3838 3766 6561 3533 d52191a7887fea53 │ │ │ │ -00003f50: 223e 4372 6561 7365 3a3a 5255 4c45 5f55 ">Crease::RULE_U │ │ │ │ -00003f60: 4e4b 4e4f 574e 3c2f 613e 2920 3c73 7061 NKNOWN) const;< │ │ │ │ -00003f90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00003fe0: 3131 363c 2f73 7061 6e3e 203c 2f64 6976 116
.
141< │ │ │ │ -00004040: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00004060: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -00004070: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ │ -00004090: 6d65 3c2f 7370 616e 3e20 5645 5254 4558 me VERTEX │ │ │ │ -000040a0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ -000040c0: 3c2f 7370 616e 3e20 4d41 534b 2667 743b MASK> │ │ │ │ -000040d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -00004120: 2031 3432 3c2f 7370 616e 3e20 2020 203c 142 < │ │ │ │ -00004130: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00004140: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void ComputeVer │ │ │ │ -000041b0: 7465 784c 696d 6974 4d61 736b 3c2f 613e texLimitMask │ │ │ │ -000041c0: 2856 4552 5445 5820 3c73 7061 6e20 636c (VERTEX co │ │ │ │ -000041e0: 6e73 743c 2f73 7061 6e3e 2661 6d70 3b20 nst& │ │ │ │ -000041f0: 7665 7274 6578 4e65 6967 6862 6f72 686f vertexNeighborho │ │ │ │ -00004200: 6f64 2c20 4d41 534b 2661 6d70 3b20 706f od, MASK& po │ │ │ │ -00004210: 7369 7469 6f6e 4d61 736b 2c3c 2f64 6976 sitionMask,
.
143< │ │ │ │ -00004270: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00004280: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004290: 2020 2020 2020 3c61 2063 6c61 7373 3d22 Crease │ │ │ │ -000042f0: 3a3a 5275 6c65 3c2f 613e 2076 6572 7465 ::Rule verte │ │ │ │ -00004300: 7852 756c 6529 203c 7370 616e 2063 6c61 xRule) con │ │ │ │ -00004320: 7374 3c2f 7370 616e 3e3b 3c2f 6469 763e st;
│ │ │ │ -00004330: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -000043a0: 6120 6964 3d22 6c30 3031 3435 2220 6e61 a id="l00145" na │ │ │ │ -000043b0: 6d65 3d22 6c30 3031 3435 223e 3c2f 613e me="l00145"> │ │ │ │ -000043c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 145 templ │ │ │ │ -00004400: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ -00004410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00004420: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename VERTEX, typename MASK>
.
146< │ │ │ │ -000044c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ -000044f0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 ComputeVertexLi │ │ │ │ -00004550: 6d69 744d 6173 6b3c 2f61 3e28 5645 5254 mitMask(VERT │ │ │ │ -00004560: 4558 203c 7370 616e 2063 6c61 7373 3d22 EX const& verte │ │ │ │ -00004590: 784e 6569 6768 626f 7268 6f6f 642c 204d xNeighborhood, M │ │ │ │ -000045a0: 4153 4b26 616d 703b 2070 6f73 6974 696f ASK& positio │ │ │ │ -000045b0: 6e4d 6173 6b2c 3c2f 6469 763e 0a3c 6469 nMask,
.< │ │ │ │ -000045d0: 6120 6964 3d22 6c30 3031 3437 2220 6e61 a id="l00147" na │ │ │ │ -000045e0: 6d65 3d22 6c30 3031 3437 223e 3c2f 613e me="l00147"> │ │ │ │ -000045f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 147 │ │ │ │ -00004620: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004630: 204d 4153 4b26 616d 703b 2074 616e 6765 MASK& tange │ │ │ │ -00004640: 6e74 314d 6173 6b2c 204d 4153 4b26 616d nt1Mask, MASK&am │ │ │ │ -00004650: 703b 2074 616e 6765 6e74 324d 6173 6b2c p; tangent2Mask, │ │ │ │ -00004660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -000046b0: 2031 3438 3c2f 7370 616e 3e20 2020 2020 148 │ │ │ │ -000046c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000046d0: 2020 2020 2020 2020 2020 203c 6120 636c C │ │ │ │ -00004730: 7265 6173 653a 3a52 756c 653c 2f61 3e20 rease::Rule │ │ │ │ -00004740: 7665 7274 6578 5275 6c65 2920 3c73 7061 vertexRule) const;< │ │ │ │ -00004770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -000047c0: 3134 393c 2f73 7061 6e3e 203c 2f64 6976 149
.
150< │ │ │ │ -00004820: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00004840: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
. │ │ │ │ -00004850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
.
│ │ │ │ -00004950: 2020 3135 323c 2f73 7061 6e3e 2020 2020 152 │ │ │ │ -00004960: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -00004980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..< │ │ │ │ -00004b20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00004b30: 3e3c 6120 6964 3d22 6c30 3031 3534 2220 > 15 │ │ │ │ -00004bb0: 343c 2f61 3e3c 2f73 7061 6e3e 2020 2020 4 │ │ │ │ -00004bc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in │ │ │ │ -00004c00: 743c 2f73 7061 6e3e 2020 203c 6120 636c t GetR │ │ │ │ -00004c60: 6567 756c 6172 4661 6365 5369 7a65 3c2f egularFaceSize();
.. │ │ │ │ -00004df0: 3c61 2069 643d 226c 3030 3135 3622 206e 156 │ │ │ │ -00004e70: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ -00004e80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00004e90: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord">static int │ │ │ │ -00004ec0: 3c2f 7370 616e 3e20 2020 3c61 2063 6c61 GetLo │ │ │ │ -00004f20: 6361 6c4e 6569 6768 626f 7268 6f6f 6453 calNeighborhoodS │ │ │ │ -00004f30: 697a 653c 2f61 3e28 293b 3c2f 6469 763e ize();
│ │ │ │ -00004f40: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00004fb0: 6120 6964 3d22 6c30 3031 3538 2220 6e61 a id="l00158" na │ │ │ │ -00004fc0: 6d65 3d22 6c30 3031 3538 223e 3c2f 613e me="l00158"> │ │ │ │ -00004fd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 158protected │ │ │ │ -00005010: 3c2f 7370 616e 3e3a 3c2f 6469 763e 0a3c :
.< │ │ │ │ -00005020: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00005030: 3e3c 6120 6964 3d22 6c30 3031 3539 2220 > 159
.
160 │ │ │ │ -000050d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
.
161 │ │ │ │ -00005150: 203c 7370 616e 2063 6c61 7373 3d22 636f // Suppo │ │ │ │ -00005170: 7274 696e 6720 696e 7465 726e 616c 206d rting internal m │ │ │ │ -00005180: 6574 686f 6473 202d 2d20 6f70 7469 6f6e ethods -- option │ │ │ │ -00005190: 616c 6c79 2069 6d70 6c65 6d65 6e74 6564 ally implemented │ │ │ │ -000051a0: 2c20 6465 7065 6e64 696e 6720 6f6e 2073 , depending on s │ │ │ │ -000051b0: 7065 6369 616c 697a 6174 696f 6e3a 3c2f pecialization:
.
< │ │ │ │ -00005200: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00005210: 6e6f 223e 2020 3136 323c 2f73 7061 6e3e no"> 162 │ │ │ │ -00005220: 2020 2020 3c73 7061 6e20 636c 6173 733d //
.
163 < │ │ │ │ -000052a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -000052f0: 3136 343c 2f73 7061 6e3e 2020 2020 3c73 164 // Subdivis │ │ │ │ -00005320: 696f 6e2f 7265 6669 6e65 6d65 6e74 206d ion/refinement m │ │ │ │ -00005330: 6173 6b73 202d 2d20 7477 6f20 666f 7220 asks -- two for │ │ │ │ -00005340: 6564 6765 2d76 6572 7469 6365 7320 616e edge-vertices an │ │ │ │ -00005350: 6420 7468 7265 6520 666f 7220 7665 7274 d three for vert │ │ │ │ -00005360: 6578 2d76 6572 7469 6365 733a 3c2f 7370 ex-vertices:
.
165 │ │ │ │ -000053d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 //
.
│ │ │ │ -00005440: 2020 3136 363c 2f73 7061 6e3e 2020 2020 166 │ │ │ │ -00005450: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ -00005490: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -000054a0: 4544 4745 2c20 3c73 7061 6e20 636c 6173 EDGE, type │ │ │ │ -000054c0: 6e61 6d65 3c2f 7370 616e 3e20 4d41 534b name MASK │ │ │ │ -000054d0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
167 │ │ │ │ -00005530: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -00005550: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d assign │ │ │ │ -000055b0: 4372 6561 7365 4d61 736b 466f 7245 6467 CreaseMaskForEdg │ │ │ │ -000055c0: 653c 2f61 3e28 4544 4745 203c 7370 616e e(EDGE const&am │ │ │ │ -000055f0: 703b 2065 6467 652c 204d 4153 4b26 616d p; edge, MASK&am │ │ │ │ -00005600: 703b 206d 6173 6b29 203c 7370 616e 2063 p; mask) c │ │ │ │ -00005620: 6f6e 7374 3c2f 7370 616e 3e3b 3c2f 6469 onst;.
168 │ │ │ │ -00005680: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ -000056b0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ -000056d0: 616d 653c 2f73 7061 6e3e 2045 4447 452c ame EDGE, │ │ │ │ -000056e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ -00005700: 2f73 7061 6e3e 204d 4153 4b26 6774 3b3c /span> MASK>< │ │ │ │ -00005710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
169 void as │ │ │ │ -00005830: 7369 676e 536d 6f6f 7468 4d61 736b 466f signSmoothMaskFo │ │ │ │ -00005840: 7245 6467 653c 2f61 3e28 4544 4745 203c rEdge(EDGE < │ │ │ │ -00005850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00005860: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& edge, MAS │ │ │ │ -00005880: 4b26 616d 703b 206d 6173 6b29 203c 7370 K& mask) const; │ │ │ │ -000058b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -00005900: 2031 3730 3c2f 7370 616e 3e20 3c2f 6469 170 .
171 │ │ │ │ -00005960: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ -00005990: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ -000059b0: 616d 653c 2f73 7061 6e3e 2056 4552 5445 ame VERTE │ │ │ │ -000059c0: 582c 203c 7370 616e 2063 6c61 7373 3d22 X, typenam │ │ │ │ -000059e0: 653c 2f73 7061 6e3e 204d 4153 4b26 6774 e MASK> │ │ │ │ -000059f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
│ │ │ │ -00005a40: 2020 3137 323c 2f73 7061 6e3e 2020 2020 172 │ │ │ │ -00005a50: 3c73 7061 6e20 636c 6173 733d 226b 6579 void assignCor │ │ │ │ -00005ad0: 6e65 724d 6173 6b46 6f72 5665 7274 6578 nerMaskForVertex │ │ │ │ -00005ae0: 3c2f 613e 2856 4552 5445 5820 3c73 7061 (VERTEX const&a │ │ │ │ -00005b10: 6d70 3b20 6564 6765 2c20 4d41 534b 2661 mp; edge, MASK&a │ │ │ │ -00005b20: 6d70 3b20 6d61 736b 2920 3c73 7061 6e20 mp; mask) │ │ │ │ -00005b40: 636f 6e73 743c 2f73 7061 6e3e 3b3c 2f64 const;.
17 │ │ │ │ -00005ba0: 333c 2f73 7061 6e3e 2020 2020 3c73 7061 3 template <type │ │ │ │ -00005bf0: 6e61 6d65 3c2f 7370 616e 3e20 5645 5254 name VERT │ │ │ │ -00005c00: 4558 2c20 3c73 7061 6e20 636c 6173 733d EX, typena │ │ │ │ -00005c20: 6d65 3c2f 7370 616e 3e20 4d41 534b 2667 me MASK&g │ │ │ │ -00005c30: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
.
174< │ │ │ │ -00005cd0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ -00005d00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 assignCreaseMas │ │ │ │ -00005d60: 6b46 6f72 5665 7274 6578 3c2f 613e 2856 kForVertex(V │ │ │ │ -00005d70: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ -00005d90: 743c 2f73 7061 6e3e 2661 6d70 3b20 6564 t& ed │ │ │ │ -00005da0: 6765 2c20 4d41 534b 2661 6d70 3b20 6d61 ge, MASK& ma │ │ │ │ -00005db0: 736b 2c20 3c73 7061 6e20 636c 6173 733d sk, in │ │ │ │ -00005dd0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t c │ │ │ │ -00005df0: 6f6e 7374 3c2f 7370 616e 3e20 6372 6561 onst crea │ │ │ │ -00005e00: 7365 456e 6473 5b32 5d29 203c 7370 616e seEnds[2]) const;.
1 │ │ │ │ -00005e80: 3735 3c2f 7370 616e 3e20 2020 203c 7370 75 template <typ │ │ │ │ -00005ed0: 656e 616d 653c 2f73 7061 6e3e 2056 4552 ename VER │ │ │ │ -00005ee0: 5445 582c 203c 7370 616e 2063 6c61 7373 TEX, typen │ │ │ │ -00005f00: 616d 653c 2f73 7061 6e3e 204d 4153 4b26 ame MASK& │ │ │ │ -00005f10: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
176 │ │ │ │ -00005fb0: 3c2f 7370 616e 3e20 2020 203c 7370 616e void │ │ │ │ -00005fe0: 203c 6120 636c 6173 733d 2263 6f64 6520 assignSmoothMa │ │ │ │ -00006040: 736b 466f 7256 6572 7465 783c 2f61 3e28 skForVertex( │ │ │ │ -00006050: 5645 5254 4558 203c 7370 616e 2063 6c61 VERTEX con │ │ │ │ -00006070: 7374 3c2f 7370 616e 3e26 616d 703b 2065 st& e │ │ │ │ -00006080: 6467 652c 204d 4153 4b26 616d 703b 206d dge, MASK& m │ │ │ │ -00006090: 6173 6b29 203c 7370 616e 2063 6c61 7373 ask) const │ │ │ │ -000060b0: 3c2f 7370 616e 3e3b 3c2f 6469 763e 0a3c ;
.< │ │ │ │ -000060c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000060d0: 3e3c 6120 6964 3d22 6c30 3031 3737 2220 > 177
.
178 │ │ │ │ -00006170: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
.
179 │ │ │ │ -000061f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // Limit │ │ │ │ -00006210: 206d 6173 6b73 2066 6f72 2070 6f73 6974 masks for posit │ │ │ │ -00006220: 696f 6e20 616e 6420 7461 6e67 656e 7473 ion and tangents │ │ │ │ -00006230: 2061 7420 7665 7274 6963 6573 202d 2d20 at vertices -- │ │ │ │ -00006240: 7468 7265 6520 6361 7365 7320 666f 7220 three cases for │ │ │ │ -00006250: 6561 6368 3a3c 2f73 7061 6e3e 3c2f 6469 each:.
180 │ │ │ │ -000062b0: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
│ │ │ │ -000062e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
│ │ │ │ -00006310: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 181 t │ │ │ │ -00006350: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ │ -00006360: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ │ -00006380: 653c 2f73 7061 6e3e 2056 4552 5445 582c e VERTEX, │ │ │ │ -00006390: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ -000063b0: 2f73 7061 6e3e 204d 4153 4b26 6774 3b3c /span> MASK>< │ │ │ │ -000063c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
182 void as │ │ │ │ -000064e0: 7369 676e 436f 726e 6572 4c69 6d69 744d signCornerLimitM │ │ │ │ -000064f0: 6173 6b3c 2f61 3e28 5645 5254 4558 203c ask(VERTEX < │ │ │ │ -00006500: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00006510: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ -00006530: 4153 4b26 616d 703b 2070 6f73 2920 3c73 ASK& pos) const │ │ │ │ -00006560: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
│ │ │ │ -000065b0: 2020 3138 333c 2f73 7061 6e3e 2020 2020 183 │ │ │ │ -000065c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ -00006600: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -00006610: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ -00006630: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ -00006640: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
.< │ │ │ │ -00006660: 6120 6964 3d22 6c30 3031 3834 2220 6e61 a id="l00184" na │ │ │ │ -00006670: 6d65 3d22 6c30 3031 3834 223e 3c2f 613e me="l00184"> │ │ │ │ -00006680: 3c73 7061 6e20 636c 6173 733d 226c 696e 184< │ │ │ │ -000066e0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> void assignCreas │ │ │ │ -00006770: 654c 696d 6974 4d61 736b 3c2f 613e 2856 eLimitMask(V │ │ │ │ -00006780: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ -000067a0: 743c 2f73 7061 6e3e 2661 6d70 3b20 7665 t& ve │ │ │ │ -000067b0: 7274 6578 2c20 4d41 534b 2661 6d70 3b20 rtex, MASK& │ │ │ │ -000067c0: 706f 732c 203c 7370 616e 2063 6c61 7373 pos, i │ │ │ │ -000067e0: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt │ │ │ │ -00006800: 636f 6e73 743c 2f73 7061 6e3e 2063 7265 const cre │ │ │ │ -00006810: 6173 6545 6e64 735b 325d 2920 3c73 7061 aseEnds[2]) const
;< │ │ │ │ -00006840: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -00006890: 3138 353c 2f73 7061 6e3e 2020 2020 3c73 185 template <ty │ │ │ │ -000068e0: 7065 6e61 6d65 3c2f 7370 616e 3e20 5645 pename VE │ │ │ │ -000068f0: 5254 4558 2c20 3c73 7061 6e20 636c 6173 RTEX, type │ │ │ │ -00006910: 6e61 6d65 3c2f 7370 616e 3e20 4d41 534b name MASK │ │ │ │ -00006920: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
. │ │ │ │ +000001f0: 3c6c 696e 6b20 6872 6566 3d22 7461 6273 ... │ │ │ │ +000002a0: 3c6c 696e 6b20 6872 6566 3d22 6e61 7674 ...
  • .< │ │ │ │ +000003d0: 7363 7269 7074 2074 7970 653d 2274 6578 script type="tex │ │ │ │ +000003e0: 742f 6a61 7661 7363 7269 7074 2220 7372 t/javascript" sr │ │ │ │ +000003f0: 633d 2273 6561 7263 682f 7365 6172 6368 c="search/search │ │ │ │ +00000400: 6461 7461 2e6a 7322 3e3c 2f73 6372 6970 data.js">.. │ │ │ │ +00000790: 3c73 6372 6970 7420 7479 7065 3d22 7465 . │ │ │ │ +000008f0: 3c2f 6469 763e 0a3c 7363 7269 7074 2074
  • ..
    │ │ │ │ +000009d0: 3c21 2d2d 2074 6f70 202d 2d3e 0a3c 6469 .. │ │ │ │ +00000a90: 0a20 203c 6469 7620 6964 3d22 7370 6c69 .
    . .
    ../* @li │ │ │ │ +00000b20: 6365 6e73 6520 6d61 676e 6574 3a3f 7874 cense magnet:?xt │ │ │ │ +00000b30: 3d75 726e 3a62 7469 683a 6433 6439 6139 =urn:btih:d3d9a9 │ │ │ │ +00000b40: 6136 3539 3535 3231 6639 3636 3661 3565 a6595521f9666a5e │ │ │ │ +00000b50: 3934 6363 3833 3064 6162 3833 6236 3536 94cc830dab83b656 │ │ │ │ +00000b60: 3939 2661 6d70 3b64 6e3d 6578 7061 742e 99&dn=expat. │ │ │ │ +00000b70: 7478 7420 4d49 5420 2a2f 0a24 2864 6f63 txt MIT */.$(doc │ │ │ │ +00000b80: 756d 656e 7429 2e72 6561 6479 2866 756e ument).ready(fun │ │ │ │ +00000b90: 6374 696f 6e28 297b 696e 6974 4e61 7654 ction(){initNavT │ │ │ │ +00000ba0: 7265 6528 2761 3030 3733 345f 736f 7572 ree('a00734_sour │ │ │ │ +00000bb0: 6365 2e68 746d 6c27 2c27 2729 3b20 696e ce.html',''); in │ │ │ │ +00000bc0: 6974 5265 7369 7a61 626c 6528 293b 207d itResizable(); } │ │ │ │ +00000bd0: 293b 0a2f 2a20 406c 6963 656e 7365 2d65 );./* @license-e │ │ │ │ +00000be0: 6e64 202a 2f0a 3c2f 7363 7269 7074 3e0a nd */.. │ │ │ │ +00000bf0: 3c64 6976 2069 643d 2264 6f63 2d63 6f6e
    ..
    .
    ..
    .
    │ │ │ │ +00000dc0: 0a3c 6469 7620 636c 6173 733d 2253 5253 .
    Loading....
    Search │ │ │ │ +00000e20: 696e 672e 2e2e 3c2f 6469 763e 0a3c 6469 ing...
    .No Matches.
    .
    │ │ │ │ +00000e70: 0a3c 2f64 6976 3e0a 3c2f 6469 763e 0a0a .
    .
    .. │ │ │ │ +00000e80: 3c64 6976 2063 6c61 7373 3d22 6865 6164
    .
    │ │ │ │ +00000eb0: 3c64 6976 2063 6c61 7373 3d22 7469 746c
    clEvaluator.h │ │ │ │ +00000ed0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    . │ │ │ │ +00000ef0: 0a3c 6469 7620 636c 6173 733d 2263 6f6e .
    .Go │ │ │ │ +00000f20: 2074 6f20 7468 6520 646f 6375 6d65 6e74 to the document │ │ │ │ +00000f30: 6174 696f 6e20 6f66 2074 6869 7320 6669 ation of this fi │ │ │ │ +00000f40: 6c65 2e3c 2f61 3e3c 6469 7620 636c 6173 le.
    < │ │ │ │ +00000f70: 6120 6964 3d22 6c30 3030 3031 2220 6e61 a id="l00001" na │ │ │ │ +00000f80: 6d65 3d22 6c30 3030 3031 223e 3c2f 613e me="l00001"> │ │ │ │ +00000f90: 3c73 7061 6e20 636c 6173 733d 226c 696e 1// │ │ │ │ +00000fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00001020: 2020 2032 3c2f 7370 616e 3e3c 7370 616e 2// Copyright │ │ │ │ +00001050: 3230 3135 2050 6978 6172 3c2f 7370 616e 2015 Pixar
    .
    │ │ │ │ +000010b0: 2020 2020 333c 2f73 7061 6e3e 3c73 7061 3//
    .
    4< │ │ │ │ +00001130: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +00001150: 204c 6963 656e 7365 6420 756e 6465 7220 Licensed under │ │ │ │ +00001160: 7468 6520 4170 6163 6865 204c 6963 656e the Apache Licen │ │ │ │ +00001170: 7365 2c20 5665 7273 696f 6e20 322e 3020 se, Version 2.0 │ │ │ │ +00001180: 2874 6865 2026 7175 6f74 3b41 7061 6368 (the "Apach │ │ │ │ +00001190: 6520 4c69 6365 6e73 6526 7175 6f74 3b29 e License") │ │ │ │ +000011a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000011c0: 3c61 2069 643d 226c 3030 3030 3522 206e 5// wit │ │ │ │ +00001220: 6820 7468 6520 666f 6c6c 6f77 696e 6720 h the following │ │ │ │ +00001230: 6d6f 6469 6669 6361 7469 6f6e 3b20 796f modification; yo │ │ │ │ +00001240: 7520 6d61 7920 6e6f 7420 7573 6520 7468 u may not use th │ │ │ │ +00001250: 6973 2066 696c 6520 6578 6365 7074 2069 is file except i │ │ │ │ +00001260: 6e3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c n
    .< │ │ │ │ +00001270: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00001280: 3e3c 6120 6964 3d22 6c30 3030 3036 2220 > 6// co │ │ │ │ +000012e0: 6d70 6c69 616e 6365 2077 6974 6820 7468 mpliance with th │ │ │ │ +000012f0: 6520 4170 6163 6865 204c 6963 656e 7365 e Apache License │ │ │ │ +00001300: 2061 6e64 2074 6865 2066 6f6c 6c6f 7769 and the followi │ │ │ │ +00001310: 6e67 206d 6f64 6966 6963 6174 696f 6e20 ng modification │ │ │ │ +00001320: 746f 2069 743a 3c2f 7370 616e 3e3c 2f64 to it:.
    │ │ │ │ +00001380: 373c 2f73 7061 6e3e 3c73 7061 6e20 636c 7// │ │ │ │ +000013a0: 2020 2053 6563 7469 6f6e 2036 2e20 5472 Section 6. Tr │ │ │ │ +000013b0: 6164 656d 6172 6b73 2e20 6973 2064 656c ademarks. is del │ │ │ │ +000013c0: 6574 6564 2061 6e64 2072 6570 6c61 6365 eted and replace │ │ │ │ +000013d0: 6420 7769 7468 3a3c 2f73 7061 6e3e 3c2f d with:.
    │ │ │ │ +00001430: 2038 3c2f 7370 616e 3e3c 7370 616e 2063 8/ │ │ │ │ +00001450: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +00001460: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00001470: 3e3c 6120 6964 3d22 6c30 3030 3039 2220 > 9// 6. │ │ │ │ +000014d0: 2054 7261 6465 6d61 726b 732e 2054 6869 Trademarks. Thi │ │ │ │ +000014e0: 7320 4c69 6365 6e73 6520 646f 6573 206e s License does n │ │ │ │ +000014f0: 6f74 2067 7261 6e74 2070 6572 6d69 7373 ot grant permiss │ │ │ │ +00001500: 696f 6e20 746f 2075 7365 2074 6865 2074 ion to use the t │ │ │ │ +00001510: 7261 6465 3c2f 7370 616e 3e3c 2f64 6976 rade
    .
    10< │ │ │ │ +00001570: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +00001590: 2020 2020 6e61 6d65 732c 2074 7261 6465 names, trade │ │ │ │ +000015a0: 6d61 726b 732c 2073 6572 7669 6365 206d marks, service m │ │ │ │ +000015b0: 6172 6b73 2c20 6f72 2070 726f 6475 6374 arks, or product │ │ │ │ +000015c0: 206e 616d 6573 206f 6620 7468 6520 4c69 names of the Li │ │ │ │ +000015d0: 6365 6e73 6f72 3c2f 7370 616e 3e3c 2f64 censor.
    1 │ │ │ │ +00001630: 313c 2f73 7061 6e3e 3c73 7061 6e20 636c 1// │ │ │ │ +00001650: 2020 2020 2020 616e 6420 6974 7320 6166 and its af │ │ │ │ +00001660: 6669 6c69 6174 6573 2c20 6578 6365 7074 filiates, except │ │ │ │ +00001670: 2061 7320 7265 7175 6972 6564 2074 6f20 as required to │ │ │ │ +00001680: 636f 6d70 6c79 2077 6974 6820 5365 6374 comply with Sect │ │ │ │ +00001690: 696f 6e20 3428 6329 206f 663c 2f73 7061 ion 4(c) of
    .
    12// the L │ │ │ │ +00001720: 6963 656e 7365 2061 6e64 2074 6f20 7265 icense and to re │ │ │ │ +00001730: 7072 6f64 7563 6520 7468 6520 636f 6e74 produce the cont │ │ │ │ +00001740: 656e 7420 6f66 2074 6865 204e 4f54 4943 ent of the NOTIC │ │ │ │ +00001750: 4520 6669 6c65 2e3c 2f73 7061 6e3e 3c2f E file..
    │ │ │ │ +000017b0: 3133 3c2f 7370 616e 3e3c 7370 616e 2063 13/ │ │ │ │ +000017d0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +000017e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000017f0: 3e3c 6120 6964 3d22 6c30 3030 3134 2220 > 14
    // Yo │ │ │ │ +00001850: 7520 6d61 7920 6f62 7461 696e 2061 2063 u may obtain a c │ │ │ │ +00001860: 6f70 7920 6f66 2074 6865 2041 7061 6368 opy of the Apach │ │ │ │ +00001870: 6520 4c69 6365 6e73 6520 6174 3c2f 7370 e License at
    .
    15//.
    1 │ │ │ │ +00001950: 363c 2f73 7061 6e3e 3c73 7061 6e20 636c 6// │ │ │ │ +00001970: 2020 2020 2020 2068 7474 703a 2f2f 7777 http://ww │ │ │ │ +00001980: 772e 6170 6163 6865 2e6f 7267 2f6c 6963 w.apache.org/lic │ │ │ │ +00001990: 656e 7365 732f 4c49 4345 4e53 452d 322e enses/LICENSE-2. │ │ │ │ +000019a0: 303c 2f73 7061 6e3e 3c2f 6469 763e 0a3c 0
    .< │ │ │ │ +000019b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000019c0: 3e3c 6120 6964 3d22 6c30 3030 3137 2220 > 17
    //
    .
    18// Unless r │ │ │ │ +00001aa0: 6571 7569 7265 6420 6279 2061 7070 6c69 equired by appli │ │ │ │ +00001ab0: 6361 626c 6520 6c61 7720 6f72 2061 6772 cable law or agr │ │ │ │ +00001ac0: 6565 6420 746f 2069 6e20 7772 6974 696e eed to in writin │ │ │ │ +00001ad0: 672c 2073 6f66 7477 6172 653c 2f73 7061 g, software
    .
    19// distribu │ │ │ │ +00001b60: 7465 6420 756e 6465 7220 7468 6520 4170 ted under the Ap │ │ │ │ +00001b70: 6163 6865 204c 6963 656e 7365 2077 6974 ache License wit │ │ │ │ +00001b80: 6820 7468 6520 6162 6f76 6520 6d6f 6469 h the above modi │ │ │ │ +00001b90: 6669 6361 7469 6f6e 2069 733c 2f73 7061 fication is
    .
    20// distribu │ │ │ │ +00001c20: 7465 6420 6f6e 2061 6e20 2671 756f 743b ted on an " │ │ │ │ +00001c30: 4153 2049 5326 7175 6f74 3b20 4241 5349 AS IS" BASI │ │ │ │ +00001c40: 532c 2057 4954 484f 5554 2057 4152 5241 S, WITHOUT WARRA │ │ │ │ +00001c50: 4e54 4945 5320 4f52 2043 4f4e 4449 5449 NTIES OR CONDITI │ │ │ │ +00001c60: 4f4e 5320 4f46 2041 4e59 3c2f 7370 616e ONS OF ANY
    .
    │ │ │ │ +00001cc0: 2020 2032 313c 2f73 7061 6e3e 3c73 7061 21// KIND, eit │ │ │ │ +00001cf0: 6865 7220 6578 7072 6573 7320 6f72 2069 her express or i │ │ │ │ +00001d00: 6d70 6c69 6564 2e20 5365 6520 7468 6520 mplied. See the │ │ │ │ +00001d10: 4170 6163 6865 204c 6963 656e 7365 2066 Apache License f │ │ │ │ +00001d20: 6f72 2074 6865 2073 7065 6369 6669 633c or the specific< │ │ │ │ +00001d30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00001d50: 6120 6964 3d22 6c30 3030 3232 2220 6e61 a id="l00022" na │ │ │ │ +00001d60: 6d65 3d22 6c30 3030 3232 223e 3c2f 613e me="l00022"> │ │ │ │ +00001d70: 3c73 7061 6e20 636c 6173 733d 226c 696e 22// lang │ │ │ │ +00001db0: 7561 6765 2067 6f76 6572 6e69 6e67 2070 uage governing p │ │ │ │ +00001dc0: 6572 6d69 7373 696f 6e73 2061 6e64 206c ermissions and l │ │ │ │ +00001dd0: 696d 6974 6174 696f 6e73 2075 6e64 6572 imitations under │ │ │ │ +00001de0: 2074 6865 2041 7061 6368 6520 4c69 6365 the Apache Lice │ │ │ │ +00001df0: 6e73 652e 3c2f 7370 616e 3e3c 2f64 6976 nse.
    .
    23< │ │ │ │ +00001e50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>//
    .
    < │ │ │ │ +00001eb0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00001ec0: 6e6f 223e 2020 2032 343c 2f73 7061 6e3e no"> 24 │ │ │ │ +00001ed0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +00001f20: 2020 2032 353c 2f73 7061 6e3e 3c73 7061 25#ifndef O │ │ │ │ +00001f50: 5045 4e53 5542 4449 5633 5f4f 5344 5f43 PENSUBDIV3_OSD_C │ │ │ │ +00001f60: 4c5f 4556 414c 5541 544f 525f 483c 2f73 L_EVALUATOR_H
    .
    26< │ │ │ │ +00001fd0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ +00001fe0: 726f 6365 7373 6f72 223e 2364 6566 696e rocessor">#defin │ │ │ │ +00001ff0: 6520 4f50 454e 5355 4244 4956 335f 4f53 e OPENSUBDIV3_OS │ │ │ │ +00002000: 445f 434c 5f45 5641 4c55 4154 4f52 5f48 D_CL_EVALUATOR_H │ │ │ │ +00002010: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00002030: 3c61 2069 643d 226c 3030 3032 3722 206e 27
    .
    28#includ │ │ │ │ +000020f0: 6520 2671 756f 743b 2e2e 2f76 6572 7369 e "../versi │ │ │ │ +00002100: 6f6e 2e68 2671 756f 743b 3c2f 7370 616e on.h"
    .
    │ │ │ │ +00002160: 2020 2032 393c 2f73 7061 6e3e 203c 2f64 29 .
    3 │ │ │ │ +000021c0: 303c 2f73 7061 6e3e 3c73 7061 6e20 636c 0#include &quo │ │ │ │ +000021f0: 743b 2e2e 2f6f 7364 2f6f 7065 6e63 6c2e t;../osd/opencl. │ │ │ │ +00002200: 6826 7175 6f74 3b3c 2f73 7061 6e3e 3c2f h".
    │ │ │ │ +00002260: 3331 3c2f 7370 616e 3e3c 7370 616e 2063 31#include &qu │ │ │ │ +00002290: 6f74 3b2e 2e2f 6f73 642f 7479 7065 732e ot;../osd/types. │ │ │ │ +000022a0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 3c2f h".
    │ │ │ │ +00002300: 3332 3c2f 7370 616e 3e3c 7370 616e 2063 32#include &qu │ │ │ │ +00002330: 6f74 3b2e 2e2f 6f73 642f 6275 6666 6572 ot;../osd/buffer │ │ │ │ +00002340: 4465 7363 7269 7074 6f72 2e68 2671 756f Descriptor.h&quo │ │ │ │ +00002350: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ │ +00002360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +000023f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00002400: 6e6f 223e 2020 2033 343c 2f73 7061 6e3e no"> 34 │ │ │ │ +00002410: 3c73 7061 6e20 636c 6173 733d 226b 6579 namespace │ │ │ │ +00002430: 3c2f 7370 616e 3e3c 6120 636c 6173 733d OpenSubdi │ │ │ │ +00002470: 763c 2f61 3e20 7b3c 2f64 6976 3e0a 3c64 v {
    . │ │ │ │ +00002490: 3c61 2069 643d 226c 3030 3033 3522 206e 35namespac │ │ │ │ +000024f0: 6520 3c2f 7370 616e 3e4f 5045 4e53 5542 e OPENSUB │ │ │ │ +00002500: 4449 565f 5645 5253 494f 4e20 7b3c 2f64 DIV_VERSION {.
    3 │ │ │ │ +00002560: 363c 2f73 7061 6e3e 203c 2f64 6976 3e0a 6
    . │ │ │ │ +00002570: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00002640: 2020 3338 3c2f 7370 616e 3e20 2020 203c 38 < │ │ │ │ +00002650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00002660: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord">class PatchTable;.
    3 │ │ │ │ +000026d0: 393c 2f73 7061 6e3e 2020 2020 3c73 7061 9 class S │ │ │ │ +00002700: 7465 6e63 696c 5461 626c 653b 3c2f 6469 tencilTable;.
    40 │ │ │ │ +00002760: 3c2f 7370 616e 3e20 2020 203c 7370 616e class Li │ │ │ │ +00002790: 6d69 7453 7465 6e63 696c 5461 626c 653b mitStencilTable; │ │ │ │ +000027a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000027f0: 2020 3431 3c2f 7370 616e 3e7d 3c2f 6469 41}.
    42 │ │ │ │ +00002850: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00002860: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00002870: 3e3c 6120 6964 3d22 6c30 3030 3433 2220 > 43namespa │ │ │ │ +000028d0: 6365 203c 2f73 7061 6e3e 4f73 6420 7b3c ce Osd {< │ │ │ │ +000028e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002930: 2034 343c 2f73 7061 6e3e 203c 2f64 6976 44
    .
    .
    52class │ │ │ │ +00002a20: 3c2f 7370 616e 3e3c 6120 636c 6173 733d CLStencilTabl │ │ │ │ +00002a60: 653c 2f61 3e20 7b3c 2f64 6976 3e0a 3c64 e {
    . │ │ │ │ +00002a80: 3c61 2069 643d 226c 3030 3035 3322 206e 53public:
    .< │ │ │ │ +00002b00: 6120 6964 3d22 6c30 3030 3534 2220 6e61 a id="l00054" na │ │ │ │ +00002b10: 6d65 3d22 6c30 3030 3534 223e 3c2f 613e me="l00054"> │ │ │ │ +00002b20: 3c73 7061 6e20 636c 6173 733d 226c 696e 54 templ │ │ │ │ +00002b60: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +00002b70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00002b80: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename DEVICE_CONT │ │ │ │ +00002ba0: 4558 5426 6774 3b3c 2f64 6976 3e0a 3c64 EXT>
    ..
    55 stati │ │ │ │ +00002cb0: 633c 2f73 7061 6e3e 203c 6120 636c 6173 c CLStencilTa │ │ │ │ +00002cf0: 626c 653c 2f61 3e20 2a3c 6120 636c 6173 ble *Create │ │ │ │ +00002d50: 3c2f 613e 283c 6120 636c 6173 733d 2263 (Far::StencilTab │ │ │ │ +00002d90: 6c65 3c2f 613e 203c 7370 616e 2063 6c61 le con │ │ │ │ +00002db0: 7374 3c2f 7370 616e 3e20 2a73 7465 6e63 st *stenc │ │ │ │ +00002dc0: 696c 5461 626c 652c 3c2f 6469 763e 0a3c ilTable,
    .< │ │ │ │ +00002dd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00002de0: 3e3c 6120 6964 3d22 6c30 3030 3536 2220 > 56 │ │ │ │ +00002e30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00002e40: 2020 2020 2044 4556 4943 455f 434f 4e54 DEVICE_CONT │ │ │ │ +00002e50: 4558 5420 636f 6e74 6578 7429 207b 3c2f EXT context) {.
    │ │ │ │ +00002eb0: 3537 3c2f 7370 616e 3e20 2020 2020 2020 57 │ │ │ │ +00002ec0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +00002ee0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n n │ │ │ │ +00002f00: 6577 3c2f 7370 616e 3e20 3c61 2063 6c61 ew CLStencilT │ │ │ │ +00002f40: 6162 6c65 3c2f 613e 2873 7465 6e63 696c able(stencil │ │ │ │ +00002f50: 5461 626c 652c 2063 6f6e 7465 7874 2d26 Table, context-& │ │ │ │ +00002f60: 6774 3b47 6574 436f 6e74 6578 7428 2929 gt;GetContext()) │ │ │ │ +00002f70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00002fc0: 2020 2035 383c 2f73 7061 6e3e 2020 2020 58 │ │ │ │ +00002fd0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ │ +00002fe0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00002ff0: 3e3c 6120 6964 3d22 6c30 3030 3539 2220 > 59
    .
    60 │ │ │ │ +00003090: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ │ +000030b0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename DEVICE_CONTEX │ │ │ │ +000030f0: 5426 6774 3b3c 2f64 6976 3e0a 3c64 6976 T>
    .
    .
    │ │ │ │ +000031d0: 2020 3631 3c2f 613e 3c2f 7370 616e 3e20 61 │ │ │ │ +000031e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 static< │ │ │ │ +00003200: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> CLStencilTabl │ │ │ │ +00003240: 653c 2f61 3e20 2a3c 6120 636c 6173 733d e *Create(
    .
    62 │ │ │ │ +00003300: 2020 2020 2020 3c61 2063 6c61 7373 3d22 Far::LimitSten │ │ │ │ +00003340: 6369 6c54 6162 6c65 3c2f 613e 203c 7370 cilTable const │ │ │ │ +00003370: 2a6c 696d 6974 5374 656e 6369 6c54 6162 *limitStencilTab │ │ │ │ +00003380: 6c65 2c3c 2f64 6976 3e0a 3c64 6976 2063 le,
    .
    63 │ │ │ │ +000033e0: 2020 2020 2020 4445 5649 4345 5f43 4f4e DEVICE_CON │ │ │ │ +000033f0: 5445 5854 2063 6f6e 7465 7874 2920 7b3c TEXT context) {< │ │ │ │ +00003400: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00003450: 2036 343c 2f73 7061 6e3e 2020 2020 2020 64 │ │ │ │ +00003460: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +00003480: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ │ +000034a0: 6e65 773c 2f73 7061 6e3e 203c 6120 636c new CLStencil │ │ │ │ +000034e0: 5461 626c 653c 2f61 3e28 6c69 6d69 7453 Table(limitS │ │ │ │ +000034f0: 7465 6e63 696c 5461 626c 652c 2063 6f6e tencilTable, con │ │ │ │ +00003500: 7465 7874 2d26 6774 3b47 6574 436f 6e74 text->GetCont │ │ │ │ +00003510: 6578 7428 2929 3b3c 2f64 6976 3e0a 3c64 ext());
    . │ │ │ │ +00003530: 3c61 2069 643d 226c 3030 3036 3522 206e 65 }
    ..
    │ │ │ │ +000035d0: 3636 3c2f 7370 616e 3e20 3c2f 6469 763e 66
    │ │ │ │ +000035e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00003610: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ +00003670: 2036 373c 2f61 3e3c 2f73 7061 6e3e 2020 67 │ │ │ │ +00003680: 2020 3c61 2063 6c61 7373 3d22 636f 6465 CLStencilTabl │ │ │ │ +000036e0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(Far::StencilTa │ │ │ │ +00003720: 626c 653c 2f61 3e20 3c73 7061 6e20 636c ble co │ │ │ │ +00003740: 6e73 743c 2f73 7061 6e3e 202a 7374 656e nst *sten │ │ │ │ +00003750: 6369 6c54 6162 6c65 2c3c 2f64 6976 3e0a cilTable,
    . │ │ │ │ +00003760: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00003790: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 68 │ │ │ │ +000037c0: 2020 2020 2020 2063 6c5f 636f 6e74 6578 cl_contex │ │ │ │ +000037d0: 7420 636c 436f 6e74 6578 7429 3b3c 2f64 t clContext);.
    69 CLStencilT │ │ │ │ +000038e0: 6162 6c65 3c2f 613e 283c 6120 636c 6173 able(Far::LimitS │ │ │ │ +00003920: 7465 6e63 696c 5461 626c 653c 2f61 3e20 tencilTable │ │ │ │ +00003930: 3c73 7061 6e20 636c 6173 733d 226b 6579 const *limitStencil │ │ │ │ +00003960: 5461 626c 652c 3c2f 6469 763e 0a3c 6469 Table,
    .< │ │ │ │ +00003980: 6120 6964 3d22 6c30 3030 3730 2220 6e61 a id="l00070" na │ │ │ │ +00003990: 6d65 3d22 6c30 3030 3730 223e 3c2f 613e me="l00070"> │ │ │ │ +000039a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 70 │ │ │ │ +000039d0: 2020 2020 636c 5f63 6f6e 7465 7874 2063 cl_context c │ │ │ │ +000039e0: 6c43 6f6e 7465 7874 293b 3c2f 6469 763e lContext);
    │ │ │ │ +000039f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ +00003b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00003b90: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00003ba0: 6e6f 223e 2020 2037 333c 2f73 7061 6e3e no"> 73 │ │ │ │ +00003bb0: 2020 2020 3c73 7061 6e20 636c 6173 733d // int │ │ │ │ +00003bd0: 6572 6661 6365 7320 6e65 6564 6564 2066 erfaces needed f │ │ │ │ +00003be0: 6f72 2043 4c43 6f6d 7075 7465 4b65 726e or CLComputeKern │ │ │ │ +00003bf0: 656c 3c2f 7370 616e 3e3c 2f64 6976 3e0a el
    . │ │ │ │ +00003c00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00003c30: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ │ +00003c90: 3734 3c2f 613e 3c2f 7370 616e 3e20 2020 74 │ │ │ │ +00003ca0: 2063 6c5f 6d65 6d20 3c61 2063 6c61 7373 cl_mem GetSize │ │ │ │ +00003d00: 7342 7566 6665 723c 2f61 3e28 293c 7370 sBuffer() const < │ │ │ │ +00003d30: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ +00003d60: 5f73 697a 6573 3b20 7d3c 2f64 6976 3e0a _sizes; }
    . │ │ │ │ +00003d70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00003da0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ │ +00003e00: 3735 3c2f 613e 3c2f 7370 616e 3e20 2020 75 │ │ │ │ +00003e10: 2063 6c5f 6d65 6d20 3c61 2063 6c61 7373 cl_mem GetOffs │ │ │ │ +00003e70: 6574 7342 7566 6665 723c 2f61 3e28 293c etsBuffer()< │ │ │ │ +00003e80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00003e90: 6f72 6422 3e20 2020 2063 6f6e 7374 203c ord"> const < │ │ │ │ +00003ea0: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ +00003ed0: 5f6f 6666 7365 7473 3b20 7d3c 2f64 6976 _offsets; }
    .
    │ │ │ │ +00003f70: 2020 3736 3c2f 613e 3c2f 7370 616e 3e20 76 │ │ │ │ +00003f80: 2020 2063 6c5f 6d65 6d20 3c61 2063 6c61 cl_mem GetIn │ │ │ │ +00003fe0: 6469 6365 7342 7566 6665 723c 2f61 3e28 dicesBuffer( │ │ │ │ +00003ff0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const │ │ │ │ +00004010: 203c 2f73 7061 6e3e 7b20 3c73 7061 6e20 { return _indices; }.
    77 cl_mem Get │ │ │ │ +00004150: 5765 6967 6874 7342 7566 6665 723c 2f61 WeightsBuffer() con │ │ │ │ +00004180: 7374 203c 2f73 7061 6e3e 7b20 3c73 7061 st { return _weights; }< │ │ │ │ +000041c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    78 cl_mem G │ │ │ │ +000042c0: 6574 4475 5765 6967 6874 7342 7566 6665 etDuWeightsBuffe │ │ │ │ +000042d0: 723c 2f61 3e28 293c 7370 616e 2063 6c61 r() c │ │ │ │ +000042f0: 6f6e 7374 203c 2f73 7061 6e3e 7b20 3c73 onst { return _duWeights │ │ │ │ +00004330: 3b20 7d3c 2f64 6976 3e0a 3c64 6976 2063 ; }
    .
    79 │ │ │ │ +000043d0: 3c2f 7370 616e 3e20 2020 2063 6c5f 6d65 cl_me │ │ │ │ +000043e0: 6d20 3c61 2063 6c61 7373 3d22 636f 6465 m GetDvWeightsB │ │ │ │ +00004440: 7566 6665 723c 2f61 3e28 293c 7370 616e uffer() const │ │ │ │ +00004470: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ │ +00004490: 726e 3c2f 7370 616e 3e20 5f64 7657 6569 rn _dvWei │ │ │ │ +000044a0: 6768 7473 3b20 7d3c 2f64 6976 3e0a 3c64 ghts; }
    . │ │ │ │ +000044c0: 3c61 2069 643d 226c 3030 3038 3022 206e 80 │ │ │ │ +00004540: 3c2f 613e 3c2f 7370 616e 3e20 2020 2063 c │ │ │ │ +00004550: 6c5f 6d65 6d20 3c61 2063 6c61 7373 3d22 l_mem GetDuuWei │ │ │ │ +000045b0: 6768 7473 4275 6666 6572 3c2f 613e 2829 ghtsBuffer() │ │ │ │ +000045c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const
    { │ │ │ │ +00004600: 7265 7475 726e 3c2f 7370 616e 3e20 5f64 return _d │ │ │ │ +00004610: 7575 5765 6967 6874 733b 207d 3c2f 6469 uuWeights; }..
    │ │ │ │ +000047e0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 82 cl_mem │ │ │ │ +00004840: 3c61 2063 6c61 7373 3d22 636f 6465 2068 GetDvvWeightsBu │ │ │ │ +000048a0: 6666 6572 3c2f 613e 2829 3c73 7061 6e20 ffer() │ │ │ │ +000048c0: 2063 6f6e 7374 203c 2f73 7061 6e3e 7b20 const { │ │ │ │ +000048d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +000048f0: 3c2f 7370 616e 3e20 5f64 7676 5765 6967 _dvvWeig │ │ │ │ +00004900: 6874 733b 207d 3c2f 6469 763e 0a3c 6469 hts; }
    .< │ │ │ │ +00004920: 6120 6964 3d22 6c30 3030 3833 2220 6e61 a id="l00083" na │ │ │ │ +00004930: 6d65 3d22 6c30 3030 3833 223e 3c2f 613e me="l00083"> │ │ │ │ +00004940: 3c73 7061 6e20 636c 6173 733d 226c 696e 83< │ │ │ │ +000049a0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> int
    GetNumStenci │ │ │ │ +00004a30: 6c73 3c2f 613e 2829 3c73 7061 6e20 636c ls() │ │ │ │ +00004a50: 2020 2020 2020 2063 6f6e 7374 203c 2f73 const { │ │ │ │ +00004a80: 7265 7475 726e 3c2f 7370 616e 3e20 5f6e return _n │ │ │ │ +00004a90: 756d 5374 656e 6369 6c73 3b20 7d3c 2f64 umStencils; }.
    8 │ │ │ │ +00004af0: 343c 2f73 7061 6e3e 203c 2f64 6976 3e0a 4
    . │ │ │ │ +00004b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +00004b80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ +00004c00: 6120 6964 3d22 6c30 3030 3837 2220 6e61 a id="l00087" na │ │ │ │ +00004c10: 6d65 3d22 6c30 3030 3837 223e 3c2f 613e me="l00087"> │ │ │ │ +00004c20: 3c73 7061 6e20 636c 6173 733d 226c 696e 87 cl_mem _off │ │ │ │ +00004c50: 7365 7473 3b3c 2f64 6976 3e0a 3c64 6976 sets;
    .
    < │ │ │ │ +00004c90: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00004ca0: 6e6f 223e 2020 2038 383c 2f73 7061 6e3e no"> 88 │ │ │ │ +00004cb0: 2020 2020 636c 5f6d 656d 205f 696e 6469 cl_mem _indi │ │ │ │ +00004cc0: 6365 733b 3c2f 6469 763e 0a3c 6469 7620 ces;
    .
    89 │ │ │ │ +00004d20: 2020 2063 6c5f 6d65 6d20 5f77 6569 6768 cl_mem _weigh │ │ │ │ +00004d30: 7473 3b3c 2f64 6976 3e0a 3c64 6976 2063 ts;
    .
    90 │ │ │ │ +00004d90: 2020 636c 5f6d 656d 205f 6475 5765 6967 cl_mem _duWeig │ │ │ │ +00004da0: 6874 733b 3c2f 6469 763e 0a3c 6469 7620 hts;
    .
    91 │ │ │ │ +00004e00: 2020 2063 6c5f 6d65 6d20 5f64 7657 6569 cl_mem _dvWei │ │ │ │ +00004e10: 6768 7473 3b3c 2f64 6976 3e0a 3c64 6976 ghts;
    .
    < │ │ │ │ +00004e50: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00004e60: 6e6f 223e 2020 2039 323c 2f73 7061 6e3e no"> 92 │ │ │ │ +00004e70: 2020 2020 636c 5f6d 656d 205f 6475 7557 cl_mem _duuW │ │ │ │ +00004e80: 6569 6768 7473 3b3c 2f64 6976 3e0a 3c64 eights;
    . │ │ │ │ +00004ea0: 3c61 2069 643d 226c 3030 3039 3322 206e 93 cl_mem _du │ │ │ │ +00004ef0: 7657 6569 6768 7473 3b3c 2f64 6976 3e0a vWeights;
    . │ │ │ │ +00004f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    95< │ │ │ │ +00004fc0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> int _ │ │ │ │ +00004ff0: 6e75 6d53 7465 6e63 696c 733b 3c2f 6469 numStencils;.
    96 │ │ │ │ +00005050: 3c2f 7370 616e 3e7d 3b3c 2f64 6976 3e0a };
    . │ │ │ │ +00005060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000050b0: 2020 3937 3c2f 7370 616e 3e20 3c2f 6469 97 .
    98 │ │ │ │ +00005110: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00005130: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ │ +00005140: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ │ +00005150: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ │ +00005160: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ │ +00005170: 2d2d 2d2d 2d2d 2d2d 2d2d 2d3c 2f73 7061 -----------
    .
    99 .
    .
    < │ │ │ │ +00005260: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00005270: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 100 │ │ │ │ +000052a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 cla │ │ │ │ +000052c0: 7373 203c 2f73 7061 6e3e 3c61 2063 6c61 ss CLEvaluato │ │ │ │ +00005300: 723c 2f61 3e20 7b3c 2f64 6976 3e0a 3c64 r {
    . │ │ │ │ +00005320: 3c61 2069 643d 226c 3030 3130 3122 206e 101public:
    .< │ │ │ │ +000053a0: 6120 6964 3d22 6c30 3031 3032 2220 6e61 a id="l00102" na │ │ │ │ +000053b0: 6d65 3d22 6c30 3031 3032 223e 3c2f 613e me="l00102"> │ │ │ │ +000053c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 102< │ │ │ │ +00005420: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> typedef
    boo │ │ │ │ +00005470: 6c3c 2f73 7061 6e3e 203c 6120 636c 6173 l Instant │ │ │ │ +000054d0: 6961 7461 626c 653c 2f61 3e3b 3c2f 6469 iatable;.
    103 │ │ │ │ +00005530: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00005540: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00005550: 3e3c 6120 6964 3d22 6c30 3031 3035 2220 > 105 tem │ │ │ │ +000055b0: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ +000055c0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ +000055e0: 2f73 7061 6e3e 2044 4556 4943 455f 434f /span> DEVICE_CO │ │ │ │ +000055f0: 4e54 4558 5426 6774 3b3c 2f64 6976 3e0a NTEXT>
    . │ │ │ │ +00005600: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    106 sta │ │ │ │ +00005700: 7469 633c 2f73 7061 6e3e 203c 6120 636c tic CLEvaluat │ │ │ │ +00005740: 6f72 3c2f 613e 202a 3c61 2063 6c61 7373 or *Create< │ │ │ │ +000057a0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(BufferDescripto │ │ │ │ +000057e0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00005800: 743c 2f73 7061 6e3e 2026 616d 703b 7372 t &sr │ │ │ │ +00005810: 6344 6573 632c 3c2f 6469 763e 0a3c 6469 cDesc,
    .< │ │ │ │ +00005830: 6120 6964 3d22 6c30 3031 3037 2220 6e61 a id="l00107" na │ │ │ │ +00005840: 6d65 3d22 6c30 3031 3037 223e 3c2f 613e me="l00107"> │ │ │ │ +00005850: 3c73 7061 6e20 636c 6173 733d 226c 696e 107 │ │ │ │ +00005880: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00005890: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +000058c0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &dstDes │ │ │ │ +00005900: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    108 │ │ │ │ +00005960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00005970: 2020 2020 2020 2020 2020 2020 3c61 2063 BufferD │ │ │ │ +000059b0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +000059e0: 2026 616d 703b 6475 4465 7363 2c3c 2f64 &duDesc,.
    10 │ │ │ │ +00005a40: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +00005a50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00005a60: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ +00005aa0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +00005ac0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +00005ad0: 3b64 7644 6573 632c 3c2f 6469 763e 0a3c ;dvDesc,
    .< │ │ │ │ +00005ae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00005af0: 3e3c 6120 6964 3d22 6c30 3031 3130 2220 > 110 │ │ │ │ +00005b40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00005b50: 2020 4445 5649 4345 5f43 4f4e 5445 5854 DEVICE_CONTEXT │ │ │ │ +00005b60: 2064 6576 6963 6543 6f6e 7465 7874 2920 deviceContext) │ │ │ │ +00005b70: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00005bc0: 2020 3131 313c 2f73 7061 6e3e 2020 2020 111 │ │ │ │ +00005bd0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +00005bf0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn Cre │ │ │ │ +00005c50: 6174 653c 2f61 3e28 7372 6344 6573 632c ate(srcDesc, │ │ │ │ +00005c60: 2064 7374 4465 7363 2c20 6475 4465 7363 dstDesc, duDesc │ │ │ │ +00005c70: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +00005c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +00005d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00005d40: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 113 │ │ │ │ +00005d70: 2020 2020 2020 2020 2020 6465 7669 6365 device │ │ │ │ +00005d80: 436f 6e74 6578 742d 2667 743b 4765 7443 Context->GetC │ │ │ │ +00005d90: 6f6d 6d61 6e64 5175 6575 6528 2929 3b3c ommandQueue());< │ │ │ │ +00005da0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00005df0: 3131 343c 2f73 7061 6e3e 2020 2020 7d3c 114 }< │ │ │ │ +00005e00: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ │ +00005e20: 6120 6964 3d22 6c30 3031 3135 2220 6e61 a id="l00115" na │ │ │ │ +00005e30: 6d65 3d22 6c30 3031 3135 223e 3c2f 613e me="l00115"> │ │ │ │ +00005e40: 3c73 7061 6e20 636c 6173 733d 226c 696e 115
    .
    .< │ │ │ │ +00005eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00005ec0: 3e3c 6120 6964 3d22 6c30 3031 3136 2220 > 11 │ │ │ │ +00005f40: 363c 2f61 3e3c 2f73 7061 6e3e 2020 2020 6 │ │ │ │ +00005f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 static │ │ │ │ +00005fa0: 434c 4576 616c 7561 746f 723c 2f61 3e20 CLEvaluator │ │ │ │ +00005fb0: 2a20 3c61 2063 6c61 7373 3d22 636f 6465 * Create(Buffe │ │ │ │ +00006040: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +00006050: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &srcDesc, │ │ │ │ +00006080: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000060d0: 2031 3137 3c2f 7370 616e 3e20 2020 2020 117 │ │ │ │ +000060e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000060f0: 2020 2020 2020 2020 2020 203c 6120 636c BufferDe │ │ │ │ +00006130: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00006160: 2661 6d70 3b64 7374 4465 7363 2c3c 2f64 &dstDesc,.
    11 │ │ │ │ +000061c0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +000061d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000061e0: 2020 2020 2020 2020 3c61 2063 6c61 7373 BufferDescr │ │ │ │ +00006220: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +00006240: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00006250: 703b 6475 4465 7363 2c3c 2f64 6976 3e0a p;duDesc,
    . │ │ │ │ +00006260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ +00006380: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00006390: 6e6f 223e 2020 3132 303c 2f73 7061 6e3e no"> 120 │ │ │ │ +000063a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000063b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000063c0: 636c 5f63 6f6e 7465 7874 2063 6c43 6f6e cl_context clCon │ │ │ │ +000063d0: 7465 7874 2c3c 2f64 6976 3e0a 3c64 6976 text,
    .
    < │ │ │ │ +00006410: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00006420: 6e6f 223e 2020 3132 313c 2f73 7061 6e3e no"> 121 │ │ │ │ +00006430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00006440: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00006450: 636c 5f63 6f6d 6d61 6e64 5f71 7565 7565 cl_command_queue │ │ │ │ +00006460: 2063 6c43 6f6d 6d61 6e64 5175 6575 6529 clCommandQueue) │ │ │ │ +00006470: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    122 │ │ │ │ +000064d0: 2020 2020 203c 6120 636c 6173 733d 2263 CLEvaluator │ │ │ │ +00006510: 202a 696e 7374 616e 6365 203d 203c 7370 *instance = new CLEval │ │ │ │ +00006570: 7561 746f 723c 2f61 3e28 636c 436f 6e74 uator(clCont │ │ │ │ +00006580: 6578 742c 2063 6c43 6f6d 6d61 6e64 5175 ext, clCommandQu │ │ │ │ +00006590: 6575 6529 3b3c 2f64 6976 3e0a 3c64 6976 eue);
    .
    < │ │ │ │ +000065d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000065e0: 6e6f 223e 2020 3132 333c 2f73 7061 6e3e no"> 123 │ │ │ │ +000065f0: 2020 2020 2020 2020 3c73 7061 6e20 636c if (ins │ │ │ │ +00006620: 7461 6e63 652d 2667 743b 3c61 2063 6c61 tance->Compi │ │ │ │ +00006680: 6c65 3c2f 613e 2873 7263 4465 7363 2c20 le(srcDesc, │ │ │ │ +00006690: 6473 7444 6573 632c 2064 7544 6573 632c dstDesc, duDesc, │ │ │ │ +000066a0: 2064 7644 6573 6329 293c 2f64 6976 3e0a dvDesc))
    . │ │ │ │ +000066b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00006790: 2020 3132 353c 2f73 7061 6e3e 2020 2020 125 │ │ │ │ +000067a0: 2020 2020 3c73 7061 6e20 636c 6173 733d delete │ │ │ │ +000067c0: 3c2f 7370 616e 3e20 696e 7374 616e 6365 instance │ │ │ │ +000067d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00006820: 2020 3132 363c 2f73 7061 6e3e 2020 2020 126 │ │ │ │ +00006830: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +00006850: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL │ │ │ │ +00006860: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +000068b0: 2020 3132 373c 2f73 7061 6e3e 2020 2020 127 │ │ │ │ +000068c0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ │ +000068d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000068e0: 3e3c 6120 6964 3d22 6c30 3031 3238 2220 > 128
    .
    186 void assignSmoothL │ │ │ │ -00006a50: 696d 6974 4d61 736b 3c2f 613e 2856 4552 imitMask(VER │ │ │ │ -00006a60: 5445 5820 3c73 7061 6e20 636c 6173 733d TEX const< │ │ │ │ -00006a80: 2f73 7061 6e3e 2661 6d70 3b20 7665 7274 /span>& vert │ │ │ │ -00006a90: 6578 2c20 4d41 534b 2661 6d70 3b20 706f ex, MASK& po │ │ │ │ -00006aa0: 7329 203c 7370 616e 2063 6c61 7373 3d22 s) const;
    .< │ │ │ │ -00006ae0: 6120 6964 3d22 6c30 3031 3837 2220 6e61 a id="l00187" na │ │ │ │ -00006af0: 6d65 3d22 6c30 3031 3837 223e 3c2f 613e me="l00187"> │ │ │ │ -00006b00: 3c73 7061 6e20 636c 6173 733d 226c 696e 187
    .
    188 │ │ │ │ -00006b80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ -00006ba0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ -00006bd0: 2056 4552 5445 582c 203c 7370 616e 2063 VERTEX, t │ │ │ │ -00006bf0: 7970 656e 616d 653c 2f73 7061 6e3e 204d ypename M │ │ │ │ -00006c00: 4153 4b26 6774 3b3c 2f64 6976 3e0a 3c64 ASK>
    . │ │ │ │ -00006c20: 3c61 2069 643d 226c 3030 3138 3922 206e 189 │ │ │ │ -00006ca0: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ -00006cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00006cc0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    assignCorn │ │ │ │ -00006d30: 6572 4c69 6d69 7454 616e 6765 6e74 4d61 erLimitTangentMa │ │ │ │ -00006d40: 736b 733c 2f61 3e28 5645 5254 4558 203c sks(VERTEX < │ │ │ │ -00006d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00006d60: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ -00006d80: 4153 4b26 616d 703b 2074 616e 312c 204d ASK& tan1, M │ │ │ │ -00006d90: 4153 4b26 616d 703b 2074 616e 3229 203c ASK& tan2) < │ │ │ │ -00006da0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00006db0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const;
    .
    190 │ │ │ │ -00006e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ -00006e40: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ -00006e70: 2056 4552 5445 582c 203c 7370 616e 2063 VERTEX, t │ │ │ │ -00006e90: 7970 656e 616d 653c 2f73 7061 6e3e 204d ypename M │ │ │ │ -00006ea0: 4153 4b26 6774 3b3c 2f64 6976 3e0a 3c64 ASK>
    . │ │ │ │ -00006ec0: 3c61 2069 643d 226c 3030 3139 3122 206e 191 │ │ │ │ -00006f40: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ -00006f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00006f60: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    assignCrea │ │ │ │ -00006fd0: 7365 4c69 6d69 7454 616e 6765 6e74 4d61 seLimitTangentMa │ │ │ │ -00006fe0: 736b 733c 2f61 3e28 5645 5254 4558 203c sks(VERTEX < │ │ │ │ -00006ff0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00007000: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ -00007020: 4153 4b26 616d 703b 2074 616e 312c 204d ASK& tan1, M │ │ │ │ -00007030: 4153 4b26 616d 703b 2074 616e 322c 203c ASK& tan2, < │ │ │ │ -00007040: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00007050: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int const< │ │ │ │ -00007080: 2f73 7061 6e3e 2063 7265 6173 6545 6e64 /span> creaseEnd │ │ │ │ -00007090: 735b 325d 2920 3c73 7061 6e20 636c 6173 s[2]) cons │ │ │ │ -000070b0: 743c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a t;
    . │ │ │ │ -000070c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000070f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 192 te │ │ │ │ -00007130: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ │ -00007140: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ │ -00007160: 3c2f 7370 616e 3e20 5645 5254 4558 2c20 VERTEX, │ │ │ │ -00007170: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename MASK>.
    193 │ │ │ │ -00007260: 766f 6964 3c2f 7370 616e 3e20 3c61 2063 void ass │ │ │ │ -000072c0: 6967 6e53 6d6f 6f74 684c 696d 6974 5461 ignSmoothLimitTa │ │ │ │ -000072d0: 6e67 656e 744d 6173 6b73 3c2f 613e 2856 ngentMasks(V │ │ │ │ -000072e0: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ -00007300: 743c 2f73 7061 6e3e 2661 6d70 3b20 7665 t& ve │ │ │ │ -00007310: 7274 6578 2c20 4d41 534b 2661 6d70 3b20 rtex, MASK& │ │ │ │ -00007320: 7461 6e31 2c20 4d41 534b 2661 6d70 3b20 tan1, MASK& │ │ │ │ -00007330: 7461 6e32 2920 3c73 7061 6e20 636c 6173 tan2) cons │ │ │ │ -00007350: 743c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a t;
    . │ │ │ │ -00007360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -000073f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00007400: 6e6f 223e 2020 3139 353c 2f73 7061 6e3e no"> 195 │ │ │ │ -00007410: 3c73 7061 6e20 636c 6173 733d 226b 6579 private:
    .
    < │ │ │ │ -00007470: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00007480: 6e6f 223e 2020 3139 363c 2f73 7061 6e3e no"> 196 │ │ │ │ -00007490: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ -000074c0: 4f70 7469 6f6e 733c 2f61 3e20 5f6f 7074 Options _opt │ │ │ │ -000074d0: 696f 6e73 3b3c 2f64 6976 3e0a 3c64 6976 ions;
    .
    < │ │ │ │ -00007510: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00007520: 6e6f 223e 2020 3139 373c 2f73 7061 6e3e no"> 197 │ │ │ │ -00007530: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -00007580: 2020 3139 383c 2f73 7061 6e3e 3c73 7061 198protected:
    .
    199 < │ │ │ │ -00007610: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00007660: 3230 303c 2f73 7061 6e3e 2020 2020 3c73 200 //.
    20 │ │ │ │ -000076e0: 313c 2f73 7061 6e3e 2020 2020 3c73 7061 1 // Internal i │ │ │ │ -00007710: 6d70 6c65 6d65 6e74 6174 696f 6e20 7375 mplementation su │ │ │ │ -00007720: 7070 6f72 743a 3c2f 7370 616e 3e3c 2f64 pport:.
    20 │ │ │ │ -00007780: 323c 2f73 7061 6e3e 2020 2020 3c73 7061 2 //
    .
    203< │ │ │ │ -00007800: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00007820: 2f2f 2020 5765 206e 6565 6420 6120 6c6f // We need a lo │ │ │ │ -00007830: 6361 6c20 2671 756f 743b 6d61 736b 2671 cal "mask&q │ │ │ │ -00007840: 756f 743b 2063 6c61 7373 2074 6f20 6265 uot; class to be │ │ │ │ -00007850: 2064 6563 6c61 7265 6420 6c6f 6361 6c6c declared locall │ │ │ │ -00007860: 7920 7769 7468 696e 2074 6865 2076 6572 y within the ver │ │ │ │ -00007870: 7465 782d 7665 7274 6578 206d 6173 6b20 tex-vertex mask │ │ │ │ -00007880: 7175 6572 793c 2f73 7061 6e3e 3c2f 6469 query.
    204 │ │ │ │ -000078e0: 3c2f 7370 616e 3e20 2020 203c 7370 616e // to hold one │ │ │ │ -00007910: 206f 6620 7468 6520 7477 6f20 706f 7373 of the two poss │ │ │ │ -00007920: 6962 6c65 206d 6173 6b73 2072 6571 7569 ible masks requi │ │ │ │ -00007930: 7265 6420 616e 6420 746f 2063 6f6d 6269 red and to combi │ │ │ │ -00007940: 6e65 2074 6865 206c 6f63 616c 206d 6173 ne the local mas │ │ │ │ -00007950: 6b20 7769 7468 2074 6865 206d 6173 6b3c k with the mask< │ │ │ │ -00007960: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00007980: 6120 6964 3d22 6c30 3032 3035 2220 6e61 a id="l00205" na │ │ │ │ -00007990: 6d65 3d22 6c30 3032 3035 223e 3c2f 613e me="l00205"> │ │ │ │ -000079a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 205 // t │ │ │ │ -000079e0: 6865 2063 616c 6c65 7220 7072 6f76 6964 he caller provid │ │ │ │ -000079f0: 6573 2e20 2049 7420 6861 7320 6265 656e es. It has been │ │ │ │ -00007a00: 2070 6172 616d 6574 6572 697a 6564 2062 parameterized b │ │ │ │ -00007a10: 7920 266c 743b 5745 4947 4854 2667 743b y <WEIGHT> │ │ │ │ -00007a20: 2073 6f20 7468 6174 2061 2076 6572 7369 so that a versi │ │ │ │ -00007a30: 6f6e 2063 6f6d 7061 7469 626c 653c 2f73 on compatible
    .
    206 │ │ │ │ -00007aa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // wit │ │ │ │ -00007ac0: 6820 7468 6520 6361 6c6c 6572 2623 3339 h the caller' │ │ │ │ -00007ad0: 3b73 206d 6173 6b20 636c 6173 7320 6973 ;s mask class is │ │ │ │ -00007ae0: 2063 7265 6174 6564 2e3c 2f73 7061 6e3e created. │ │ │ │ -00007af0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00007b40: 2032 3037 3c2f 7370 616e 3e20 2020 203c 207 < │ │ │ │ -00007b50: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00007b60: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    2 │ │ │ │ -00007bc0: 3038 3c2f 7370 616e 3e20 2020 203c 7370 08 template <typ │ │ │ │ -00007c10: 656e 616d 653c 2f73 7061 6e3e 2057 4549 ename WEI │ │ │ │ -00007c20: 4748 5426 6774 3b3c 2f64 6976 3e0a 3c64 GHT>
    ..
    │ │ │ │ -00007ce0: 2020 3230 393c 2f61 3e3c 2f73 7061 6e3e 209 │ │ │ │ -00007cf0: 2020 2020 3c73 7061 6e20 636c 6173 733d class │ │ │ │ -00007d10: 3c2f 7370 616e 3e3c 6120 636c 6173 733d LocalMask │ │ │ │ -00007d50: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    210 .
    2 │ │ │ │ -00007e00: 3131 3c2f 7370 616e 3e20 2020 203c 7370 11 public │ │ │ │ -00007e30: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ │ -00007e80: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 212 typedef WEIGHT Weight< │ │ │ │ -00007f60: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
    .
    213 │ │ │ │ -00007fc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00008010: 2032 3134 3c2f 7370 616e 3e20 2020 203c 214 < │ │ │ │ -00008020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00008030: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
    .
    215 │ │ │ │ -000080e0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -000080f0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00008100: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -00008110: 2261 3031 3333 372e 6874 6d6c 2361 6334 "a01337.html#ac4 │ │ │ │ -00008120: 6234 6335 3566 6232 3464 6139 3566 3135 b4c55fb24da95f15 │ │ │ │ -00008130: 3466 3461 3966 3531 3764 6230 3739 223e 4f4a9f517db079"> │ │ │ │ -00008140: 4c6f 6361 6c4d 6173 6b3c 2f61 3e28 3c61 LocalMask(We │ │ │ │ -000081a0: 6967 6874 3c2f 613e 2a20 762c 203c 6120 ight* v, Wei │ │ │ │ -00008200: 6768 743c 2f61 3e2a 2065 2c20 3c61 2063 ght* e, Weig │ │ │ │ -00008260: 6874 3c2f 613e 2a20 6629 203a 205f 7657 ht* f) : _vW │ │ │ │ -00008270: 6569 6768 7473 2876 292c 205f 6557 6569 eights(v), _eWei │ │ │ │ -00008280: 6768 7473 2865 292c 205f 6657 6569 6768 ghts(e), _fWeigh │ │ │ │ -00008290: 7473 2866 2920 7b20 7d3c 2f64 6976 3e0a ts(f) { }
    . │ │ │ │ -000082a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 │ │ │ │ -000083b0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00008420: 6120 6964 3d22 6c30 3032 3138 2220 6e61 a id="l00218" na │ │ │ │ -00008430: 6d65 3d22 6c30 3032 3138 223e 3c2f 613e me="l00218"> │ │ │ │ -00008440: 3c73 7061 6e20 636c 6173 733d 226c 696e 218 publi │ │ │ │ -00008480: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
    . │ │ │ │ -00008490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -00008520: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00008530: 6e6f 223e 2020 3232 303c 2f73 7061 6e3e no"> 220 │ │ │ │ -00008540: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ -00008560: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00008580: 3c61 2069 643d 226c 3030 3232 3122 206e 221 │ │ │ │ -000085e0: 2f2f 2020 4d65 7468 6f64 7320 7265 7175 // Methods requ │ │ │ │ -000085f0: 6972 6564 2066 6f72 2067 656e 6572 616c ired for general │ │ │ │ -00008600: 206d 6173 6b20 6173 7369 676e 6d65 6e74 mask assignment │ │ │ │ -00008610: 7320 616e 6420 7175 6572 6965 733a 3c2f s and queries:
    .
    < │ │ │ │ -00008660: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00008670: 6e6f 223e 2020 3232 323c 2f73 7061 6e3e no"> 222 │ │ │ │ -00008680: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ -000086a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -000086c0: 3c61 2069 643d 226c 3030 3232 3322 206e 223 │ │ │ │ -00008740: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ -00008750: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -00008770: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 GetNumV │ │ │ │ -000087d0: 6572 7465 7857 6569 6768 7473 3c2f 613e ertexWeights │ │ │ │ -000087e0: 2829 3c73 7061 6e20 636c 6173 733d 226b () const < │ │ │ │ -00008800: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ -00008830: 5f76 436f 756e 743b 207d 3c2f 6469 763e _vCount; }
    │ │ │ │ -00008840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00008870: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ -000088d0: 3232 343c 2f61 3e3c 2f73 7061 6e3e 2020 224 │ │ │ │ -000088e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -00008900: 696e 743c 2f73 7061 6e3e 203c 6120 636c int GetN │ │ │ │ -00008960: 756d 4564 6765 5765 6967 6874 733c 2f61 umEdgeWeights() cons │ │ │ │ -00008990: 7420 3c2f 7370 616e 3e7b 203c 7370 616e t { return _eCount; }.
    225 int G │ │ │ │ -00008af0: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ -00008b00: 3c2f 613e 2829 3c73 7061 6e20 636c 6173 () c │ │ │ │ -00008b20: 6f6e 7374 203c 2f73 7061 6e3e 7b20 3c73 onst { return _fCount; } │ │ │ │ -00008b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00008bb0: 2032 3236 3c2f 7370 616e 3e20 3c2f 6469 226 .
    │ │ │ │ -00008c50: 2020 3232 373c 2f61 3e3c 2f73 7061 6e3e 227 │ │ │ │ -00008c60: 2020 2020 2020 2020 3c73 7061 6e20 636c void S │ │ │ │ -00008ce0: 6574 4e75 6d56 6572 7465 7857 6569 6768 etNumVertexWeigh │ │ │ │ -00008cf0: 7473 3c2f 613e 283c 7370 616e 2063 6c61 ts(int coun │ │ │ │ -00008d20: 7429 207b 205f 7643 6f75 6e74 203d 2063 t) { _vCount = c │ │ │ │ -00008d30: 6f75 6e74 3b20 7d3c 2f64 6976 3e0a 3c64 ount; }
    . │ │ │ │ -00008d50: 3c61 2069 643d 226c 3030 3232 3822 206e 228 │ │ │ │ -00008dd0: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ -00008de0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -00008e00: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d SetNum │ │ │ │ -00008e60: 4564 6765 5765 6967 6874 733c 2f61 3e28 EdgeWeights( │ │ │ │ -00008e70: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -00008e90: 2f73 7061 6e3e 2063 6f75 6e74 2920 7b20 /span> count) { │ │ │ │ -00008ea0: 5f65 436f 756e 7420 3d20 636f 756e 743b _eCount = count; │ │ │ │ -00008eb0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    229< │ │ │ │ -00008f50: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> void SetNumFaceW │ │ │ │ -00008fe0: 6569 6768 7473 3c2f 613e 2820 203c 7370 eights( int count) { _fCou │ │ │ │ -00009020: 6e74 203d 2063 6f75 6e74 3b20 7d3c 2f64 nt = count; }.
    23 │ │ │ │ -00009080: 303c 2f73 7061 6e3e 203c 2f64 6976 3e0a 0
    . │ │ │ │ -00009090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000090c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2 │ │ │ │ -00009120: 3331 3c2f 613e 3c2f 7370 616e 3e20 2020 31 │ │ │ │ -00009130: 2020 2020 203c 6120 636c 6173 733d 2263 Weight │ │ │ │ -00009190: 3c73 7061 6e20 636c 6173 733d 226b 6579 const& VertexW │ │ │ │ -00009210: 6569 6768 743c 2f61 3e28 3c73 7061 6e20 eight(int i │ │ │ │ -00009240: 6e64 6578 293c 7370 616e 2063 6c61 7373 ndex) cons │ │ │ │ -00009260: 7420 3c2f 7370 616e 3e7b 203c 7370 616e t { return _vWeights[ind │ │ │ │ -000092a0: 6578 5d3b 207d 3c2f 6469 763e 0a3c 6469 ex]; }
    .< │ │ │ │ -000092c0: 6120 6964 3d22 6c30 3032 3332 2220 6e61 a id="l00232" na │ │ │ │ -000092d0: 6d65 3d22 6c30 3032 3332 223e 3c2f 613e me="l00232"> │ │ │ │ -000092e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 232< │ │ │ │ -00009340: 2f61 3e3c 2f73 7061 6e3e 2020 2020 2020 /a> │ │ │ │ -00009350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Weight const& │ │ │ │ -000093d0: 616d 703b 203c 6120 636c 6173 733d 2263 amp; EdgeWeight │ │ │ │ -00009430: 3c2f 613e 2820 203c 7370 616e 2063 6c61 ( int inde │ │ │ │ -00009460: 7829 3c73 7061 6e20 636c 6173 733d 226b x) const < │ │ │ │ -00009480: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ -000094b0: 5f65 5765 6967 6874 735b 696e 6465 785d _eWeights[index] │ │ │ │ -000094c0: 3b20 7d3c 2f64 6976 3e0a 3c64 6976 2063 ; }
    .
    233 │ │ │ │ -00009560: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -00009570: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00009580: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ │ -00009590: 6130 3133 3337 2e68 746d 6c23 6131 3733 a01337.html#a173 │ │ │ │ -000095a0: 6539 3865 3064 3162 3364 3135 6635 6333 e98e0d1b3d15f5c3 │ │ │ │ -000095b0: 6164 3433 3664 3066 6564 3430 3122 3e57 ad436d0fed401">W │ │ │ │ -000095c0: 6569 6768 743c 2f61 3e20 3c73 7061 6e20 eight │ │ │ │ -000095e0: 636f 6e73 743c 2f73 7061 6e3e 2661 6d70 const& │ │ │ │ -000095f0: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; FaceWeight( in │ │ │ │ -00009670: 743c 2f73 7061 6e3e 2069 6e64 6578 293c t index)< │ │ │ │ -00009680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00009690: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const { r │ │ │ │ -000096c0: 6574 7572 6e3c 2f73 7061 6e3e 205f 6657 eturn _fW │ │ │ │ -000096d0: 6569 6768 7473 5b69 6e64 6578 5d3b 207d eights[index]; } │ │ │ │ -000096e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00009730: 2032 3334 3c2f 7370 616e 3e20 3c2f 6469 234 .
    │ │ │ │ -000097d0: 2020 3233 353c 2f61 3e3c 2f73 7061 6e3e 235 │ │ │ │ -000097e0: 2020 2020 2020 2020 3c61 2063 6c61 7373 Weight& VertexW │ │ │ │ -000098a0: 6569 6768 743c 2f61 3e28 3c73 7061 6e20 eight(int i │ │ │ │ -000098d0: 6e64 6578 2920 7b20 3c73 7061 6e20 636c ndex) { return │ │ │ │ -00009900: 5f76 5765 6967 6874 735b 696e 6465 785d _vWeights[index] │ │ │ │ -00009910: 3b20 7d3c 2f64 6976 3e0a 3c64 6976 2063 ; }
    .
    236 │ │ │ │ -000099b0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -000099c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -000099d0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ │ -000099e0: 6130 3133 3337 2e68 746d 6c23 6131 3733 a01337.html#a173 │ │ │ │ -000099f0: 6539 3865 3064 3162 3364 3135 6635 6333 e98e0d1b3d15f5c3 │ │ │ │ -00009a00: 6164 3433 3664 3066 6564 3430 3122 3e57 ad436d0fed401">W │ │ │ │ -00009a10: 6569 6768 743c 2f61 3e26 616d 703b 203c eight& < │ │ │ │ -00009a20: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00009a30: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -00009a40: 2261 3031 3333 372e 6874 6d6c 2361 3533 "a01337.html#a53 │ │ │ │ -00009a50: 3364 6261 3332 6139 3436 3835 3463 3366 3dba32a946854c3f │ │ │ │ -00009a60: 3235 6532 3762 3532 3165 6637 6466 223e 25e27b521ef7df"> │ │ │ │ -00009a70: 4564 6765 5765 6967 6874 3c2f 613e 2820 EdgeWeight( │ │ │ │ -00009a80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int index) { < │ │ │ │ -00009ab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00009ac0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ -00009ad0: 2f73 7061 6e3e 205f 6557 6569 6768 7473 /span> _eWeights │ │ │ │ -00009ae0: 5b69 6e64 6578 5d3b 207d 3c2f 6469 763e [index]; }
    │ │ │ │ -00009af0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00009b20: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ -00009b80: 3233 373c 2f61 3e3c 2f73 7061 6e3e 2020 237 │ │ │ │ -00009b90: 2020 2020 2020 3c61 2063 6c61 7373 3d22 Weight │ │ │ │ -00009bf0: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & FaceWeigh │ │ │ │ -00009c50: 743c 2f61 3e28 2020 3c73 7061 6e20 636c t( int ind │ │ │ │ -00009c80: 6578 2920 7b20 3c73 7061 6e20 636c 6173 ex) { │ │ │ │ -00009ca0: 7265 7475 726e 3c2f 7370 616e 3e20 5f66 return _f │ │ │ │ -00009cb0: 5765 6967 6874 735b 696e 6465 785d 3b20 Weights[index]; │ │ │ │ -00009cc0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    130 │ │ │ │ +00006980: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ │ +000069a0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename DEVICE_CONTEX │ │ │ │ +000069e0: 5426 6774 3b3c 2f64 6976 3e0a 3c64 6976 T>
    .
    .
    │ │ │ │ +00006ac0: 2031 3331 3c2f 613e 3c2f 7370 616e 3e20 131 │ │ │ │ +00006ad0: 2020 203c 7370 616e 2063 6c61 7373 3d22 static< │ │ │ │ +00006af0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> CLEvaluator *Create( │ │ │ │ +00006b90: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +00006bc0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &srcDes │ │ │ │ +00006c00: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    132 │ │ │ │ +00006c60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00006c70: 2020 2020 2020 2020 2020 2020 3c61 2063 BufferD │ │ │ │ +00006cb0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +00006ce0: 2026 616d 703b 6473 7444 6573 632c 3c2f &dstDesc,.
    1 │ │ │ │ +00006d40: 3333 3c2f 7370 616e 3e20 2020 2020 2020 33 │ │ │ │ +00006d50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00006d60: 2020 2020 2020 2020 3c61 2063 6c61 7373 BufferDescr │ │ │ │ +00006da0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +00006dc0: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00006dd0: 703b 6475 4465 7363 2c3c 2f64 6976 3e0a p;duDesc,
    . │ │ │ │ +00006de0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    135 │ │ │ │ +00006f20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00006f30: 2020 2020 2020 2020 2020 2020 2020 3c61 Buffe │ │ │ │ +00006f70: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +00006f80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &duuDesc, │ │ │ │ +00006fb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00007000: 2031 3336 3c2f 7370 616e 3e20 2020 2020 136 │ │ │ │ +00007010: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007020: 2020 2020 2020 2020 2020 3c61 2063 6c61 BufferDes │ │ │ │ +00007060: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +00007090: 616d 703b 6475 7644 6573 632c 3c2f 6469 amp;duvDesc,.
    137 │ │ │ │ +000070f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00007100: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007110: 2020 2020 2020 3c61 2063 6c61 7373 3d22 BufferDescrip │ │ │ │ +00007150: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00007170: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +00007180: 6476 7644 6573 632c 3c2f 6469 763e 0a3c dvvDesc,
    .< │ │ │ │ +00007190: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000071a0: 3e3c 6120 6964 3d22 6c30 3031 3338 2220 > 138 │ │ │ │ +000071f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007200: 2020 4445 5649 4345 5f43 4f4e 5445 5854 DEVICE_CONTEXT │ │ │ │ +00007210: 2064 6576 6963 6543 6f6e 7465 7874 2920 deviceContext) │ │ │ │ +00007220: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00007270: 2020 3133 393c 2f73 7061 6e3e 2020 2020 139 │ │ │ │ +00007280: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +000072a0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn Cre │ │ │ │ +00007300: 6174 653c 2f61 3e28 7372 6344 6573 632c ate(srcDesc, │ │ │ │ +00007310: 2064 7374 4465 7363 2c20 6475 4465 7363 dstDesc, duDesc │ │ │ │ +00007320: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +00007330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    141 │ │ │ │ +00007410: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007420: 2020 2020 2064 6576 6963 6543 6f6e 7465 deviceConte │ │ │ │ +00007430: 7874 2d26 6774 3b47 6574 436f 6e74 6578 xt->GetContex │ │ │ │ +00007440: 7428 292c 3c2f 6469 763e 0a3c 6469 7620 t(),
    .
    142 │ │ │ │ +000074a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000074b0: 2020 2020 2064 6576 6963 6543 6f6e 7465 deviceConte │ │ │ │ +000074c0: 7874 2d26 6774 3b47 6574 436f 6d6d 616e xt->GetComman │ │ │ │ +000074d0: 6451 7565 7565 2829 293b 3c2f 6469 763e dQueue());
    │ │ │ │ +000074e0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ │ +00007540: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ │ +00007590: 2020 3134 343c 2f73 7061 6e3e 203c 2f64 144 .
    .
    145 │ │ │ │ +00007680: 3c2f 7370 616e 3e20 2020 203c 7370 616e static < │ │ │ │ +000076b0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +000076c0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ +000076d0: 3131 3431 2e68 746d 6c22 3e43 4c45 7661 1141.html">CLEva │ │ │ │ +000076e0: 6c75 6174 6f72 3c2f 613e 202a 203c 6120 luator * Cr │ │ │ │ +00007740: 6561 7465 3c2f 613e 283c 6120 636c 6173 eate(BufferDesc │ │ │ │ +00007780: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +000077b0: 6d70 3b73 7263 4465 7363 2c3c 2f64 6976 mp;srcDesc,
    .
    146< │ │ │ │ +00007810: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00007820: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007830: 2020 2020 2020 3c61 2063 6c61 7373 3d22 BufferDescrip │ │ │ │ +00007870: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00007890: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +000078a0: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ +000078b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000078c0: 3e3c 6120 6964 3d22 6c30 3031 3437 2220 > 147 │ │ │ │ +00007910: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007920: 2020 203c 6120 636c 6173 733d 2263 6f64 │ │ │ │ +00007950: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00007960: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ +00007980: 3c2f 7370 616e 3e20 2661 6d70 3b64 7544 &duD │ │ │ │ +00007990: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    148 │ │ │ │ +000079f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007a00: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00007a10: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00007a20: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00007a30: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00007a40: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00007a50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dvDesc, │ │ │ │ +00007a80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00007ad0: 2031 3439 3c2f 7370 616e 3e20 2020 2020 149 │ │ │ │ +00007ae0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007af0: 2020 2020 2020 2020 2020 203c 6120 636c BufferDe │ │ │ │ +00007b30: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00007b60: 2661 6d70 3b64 7575 4465 7363 2c3c 2f64 &duuDesc,.
    15 │ │ │ │ +00007bc0: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ +00007bd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007be0: 2020 2020 2020 2020 3c61 2063 6c61 7373 BufferDescr │ │ │ │ +00007c20: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +00007c40: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00007c50: 703b 6475 7644 6573 632c 3c2f 6469 763e p;duvDesc,
    │ │ │ │ +00007c60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00007c90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 151 │ │ │ │ +00007cc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007cd0: 2020 2020 203c 6120 636c 6173 733d 2263 BufferDescript │ │ │ │ +00007d10: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +00007d30: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ +00007d40: 7676 4465 7363 2c3c 2f64 6976 3e0a 3c64 vvDesc,
    . │ │ │ │ +00007d60: 3c61 2069 643d 226c 3030 3135 3222 206e 152 │ │ │ │ +00007db0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007dc0: 2020 636c 5f63 6f6e 7465 7874 2063 6c43 cl_context clC │ │ │ │ +00007dd0: 6f6e 7465 7874 2c3c 2f64 6976 3e0a 3c64 ontext,
    . │ │ │ │ +00007df0: 3c61 2069 643d 226c 3030 3135 3322 206e 153 │ │ │ │ +00007e40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00007e50: 2020 636c 5f63 6f6d 6d61 6e64 5f71 7565 cl_command_que │ │ │ │ +00007e60: 7565 2063 6c43 6f6d 6d61 6e64 5175 6575 ue clCommandQueu │ │ │ │ +00007e70: 6529 207b 3c2f 6469 763e 0a3c 6469 7620 e) {
    .
    154 │ │ │ │ +00007ed0: 2020 2020 2020 203c 6120 636c 6173 733d CLEvaluator *instance = < │ │ │ │ +00007f20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00007f30: 6f72 6422 3e6e 6577 3c2f 7370 616e 3e20 ord">new │ │ │ │ +00007f40: 3c61 2063 6c61 7373 3d22 636f 6465 2068 CLEv │ │ │ │ +00007f70: 616c 7561 746f 723c 2f61 3e28 636c 436f aluator(clCo │ │ │ │ +00007f80: 6e74 6578 742c 2063 6c43 6f6d 6d61 6e64 ntext, clCommand │ │ │ │ +00007f90: 5175 6575 6529 3b3c 2f64 6976 3e0a 3c64 Queue);
    . │ │ │ │ +00007fb0: 3c61 2069 643d 226c 3030 3135 3522 206e 155 if (i │ │ │ │ +00008020: 6e73 7461 6e63 652d 2667 743b 3c61 2063 nstance->Com │ │ │ │ +00008080: 7069 6c65 3c2f 613e 2873 7263 4465 7363 pile(srcDesc │ │ │ │ +00008090: 2c20 6473 7444 6573 632c 2064 7544 6573 , dstDesc, duDes │ │ │ │ +000080a0: 632c 2064 7644 6573 632c 3c2f 6469 763e c, dvDesc,
    │ │ │ │ +000080b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000080e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 156 │ │ │ │ +00008110: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00008120: 2020 2064 7575 4465 7363 2c20 6475 7644 duuDesc, duvD │ │ │ │ +00008130: 6573 632c 2064 7676 4465 7363 2929 3c2f esc, dvvDesc)).
    1 │ │ │ │ +00008190: 3537 3c2f 7370 616e 3e20 2020 2020 2020 57 │ │ │ │ +000081a0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +000081c0: 6574 7572 6e3c 2f73 7061 6e3e 2069 6e73 eturn ins │ │ │ │ +000081d0: 7461 6e63 653b 3c2f 6469 763e 0a3c 6469 tance;
    .< │ │ │ │ +000081f0: 6120 6964 3d22 6c30 3031 3538 2220 6e61 a id="l00158" na │ │ │ │ +00008200: 6d65 3d22 6c30 3031 3538 223e 3c2f 613e me="l00158"> │ │ │ │ +00008210: 3c73 7061 6e20 636c 6173 733d 226c 696e 158 d │ │ │ │ +00008250: 656c 6574 653c 2f73 7061 6e3e 2069 6e73 elete ins │ │ │ │ +00008260: 7461 6e63 653b 3c2f 6469 763e 0a3c 6469 tance;
    .< │ │ │ │ +00008280: 6120 6964 3d22 6c30 3031 3539 2220 6e61 a id="l00159" na │ │ │ │ +00008290: 6d65 3d22 6c30 3031 3539 223e 3c2f 613e me="l00159"> │ │ │ │ +000082a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 159 return │ │ │ │ +000082f0: 204e 554c 4c3b 3c2f 6469 763e 0a3c 6469 NULL;
    .< │ │ │ │ +00008310: 6120 6964 3d22 6c30 3031 3630 2220 6e61 a id="l00160" na │ │ │ │ +00008320: 6d65 3d22 6c30 3031 3630 223e 3c2f 613e me="l00160"> │ │ │ │ +00008330: 3c73 7061 6e20 636c 6173 733d 226c 696e 160 }
    ..
    16 │ │ │ │ +000083b0: 313c 2f73 7061 6e3e 203c 2f64 6976 3e0a 1
    . │ │ │ │ +000083c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000083f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ │ +00008450: 3633 3c2f 613e 3c2f 7370 616e 3e20 2020 63 │ │ │ │ +00008460: 203c 6120 636c 6173 733d 2263 6f64 6520 CLEvaluator(cl_context con │ │ │ │ +000084d0: 7465 7874 2c20 636c 5f63 6f6d 6d61 6e64 text, cl_command │ │ │ │ +000084e0: 5f71 7565 7565 2071 7565 7565 293b 3c2f _queue queue);.
    1 │ │ │ │ +00008540: 3634 3c2f 7370 616e 3e20 3c2f 6469 763e 64
    │ │ │ │ +00008550: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00008670: 6120 6964 3d22 6c30 3031 3637 2220 6e61 a id="l00167" na │ │ │ │ +00008680: 6d65 3d22 6c30 3031 3637 223e 3c2f 613e me="l00167"> │ │ │ │ +00008690: 3c73 7061 6e20 636c 6173 733d 226c 696e 167
    .
    173 .
    2 │ │ │ │ +00008760: 3137 3c2f 7370 616e 3e20 2020 203c 7370 17 template <typ │ │ │ │ +000087b0: 656e 616d 653c 2f73 7061 6e3e 2053 5243 ename SRC │ │ │ │ +000087c0: 5f42 5546 4645 522c 203c 7370 616e 2063 _BUFFER, t │ │ │ │ +000087e0: 7970 656e 616d 653c 2f73 7061 6e3e 2044 ypename D │ │ │ │ +000087f0: 5354 5f42 5546 4645 522c 3c2f 6469 763e ST_BUFFER,
    │ │ │ │ +00008800: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00008830: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 218 │ │ │ │ +00008860: 2020 203c 7370 616e 2063 6c61 7373 3d22 typenam │ │ │ │ +00008880: 653c 2f73 7061 6e3e 2053 5445 4e43 494c e STENCIL │ │ │ │ +00008890: 5f54 4142 4c45 2c20 3c73 7061 6e20 636c _TABLE, ty │ │ │ │ +000088b0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4445 pename DE │ │ │ │ +000088c0: 5649 4345 5f43 4f4e 5445 5854 2667 743b VICE_CONTEXT> │ │ │ │ +000088d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ │ +00008930: 6120 6964 3d22 6c30 3032 3139 2220 6e61 a id="l00219" na │ │ │ │ +00008940: 6d65 3d22 6c30 3032 3139 223e 3c2f 613e me="l00219"> │ │ │ │ +00008950: 3c73 7061 6e20 636c 6173 733d 226c 696e 219< │ │ │ │ +000089b0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> static bool │ │ │ │ +00008a00: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 EvalSte │ │ │ │ +00008a60: 6e63 696c 733c 2f61 3e28 3c2f 6469 763e ncils(
    │ │ │ │ +00008a70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00008aa0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 220 SRC │ │ │ │ +00008ad0: 5f42 5546 4645 5220 2a73 7263 4275 6666 _BUFFER *srcBuff │ │ │ │ +00008ae0: 6572 2c20 3c61 2063 6c61 7373 3d22 636f er, BufferDescripto │ │ │ │ +00008b20: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00008b40: 743c 2f73 7061 6e3e 2026 616d 703b 7372 t &sr │ │ │ │ +00008b50: 6344 6573 632c 3c2f 6469 763e 0a3c 6469 cDesc,
    .< │ │ │ │ +00008b70: 6120 6964 3d22 6c30 3032 3231 2220 6e61 a id="l00221" na │ │ │ │ +00008b80: 6d65 3d22 6c30 3032 3231 223e 3c2f 613e me="l00221"> │ │ │ │ +00008b90: 3c73 7061 6e20 636c 6173 733d 226c 696e 221 DST_BUF │ │ │ │ +00008bc0: 4645 5220 2a64 7374 4275 6666 6572 2c20 FER *dstBuffer, │ │ │ │ +00008bd0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +00008c00: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &dstDes │ │ │ │ +00008c40: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    222 │ │ │ │ +00008ca0: 2020 2020 2053 5445 4e43 494c 5f54 4142 STENCIL_TAB │ │ │ │ +00008cb0: 4c45 203c 7370 616e 2063 6c61 7373 3d22 LE const *stencilTa │ │ │ │ +00008ce0: 626c 652c 3c2f 6469 763e 0a3c 6469 7620 ble,
    .
    223 │ │ │ │ +00008d40: 2020 2020 2020 203c 6120 636c 6173 733d CLEvaluator const *instance, │ │ │ │ +00008db0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00008e00: 2032 3234 3c2f 7370 616e 3e20 2020 2020 224 │ │ │ │ +00008e10: 2020 2044 4556 4943 455f 434f 4e54 4558 DEVICE_CONTEX │ │ │ │ +00008e20: 5420 6465 7669 6365 436f 6e74 6578 742c T deviceContext, │ │ │ │ +00008e30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00008e80: 2032 3235 3c2f 7370 616e 3e20 2020 2020 225 │ │ │ │ +00008e90: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns │ │ │ │ +00008eb0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int numStartEvents │ │ │ │ +00008ef0: 3d30 2c3c 2f64 6976 3e0a 3c64 6976 2063 =0,
    .
    226 │ │ │ │ +00008f50: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ +00008f70: 743c 2f73 7061 6e3e 2063 6c5f 6576 656e t cl_even │ │ │ │ +00008f80: 742a 2073 7461 7274 4576 656e 7473 3d4e t* startEvents=N │ │ │ │ +00008f90: 554c 4c2c 3c2f 6469 763e 0a3c 6469 7620 ULL,
    .
    227 │ │ │ │ +00008ff0: 2020 2020 2020 2063 6c5f 6576 656e 742a cl_event* │ │ │ │ +00009000: 2065 6e64 4576 656e 743d 4e55 4c4c 2920 endEvent=NULL) │ │ │ │ +00009010: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00009060: 2020 3232 383c 2f73 7061 6e3e 203c 2f64 228 .
    22 │ │ │ │ +000090c0: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +000090d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (instance) { │ │ │ │ +00009100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00009150: 2032 3330 3c2f 7370 616e 3e20 2020 2020 230 │ │ │ │ +00009160: 2020 2020 2020 203c 7370 616e 2063 6c61 return i │ │ │ │ +00009190: 6e73 7461 6e63 652d 2667 743b 3c61 2063 nstance->Eva │ │ │ │ +000091f0: 6c53 7465 6e63 696c 733c 2f61 3e28 7372 lStencils(sr │ │ │ │ +00009200: 6342 7566 6665 722c 2073 7263 4465 7363 cBuffer, srcDesc │ │ │ │ +00009210: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00009260: 2020 3233 313c 2f73 7061 6e3e 2020 2020 231 │ │ │ │ +00009270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009280: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009290: 2020 2020 2020 6473 7442 7566 6665 722c dstBuffer, │ │ │ │ +000092a0: 2064 7374 4465 7363 2c3c 2f64 6976 3e0a dstDesc,
    . │ │ │ │ +000092b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    233< │ │ │ │ +00009390: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000093a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000093b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000093c0: 6e75 6d53 7461 7274 4576 656e 7473 2c20 numStartEvents, │ │ │ │ +000093d0: 7374 6172 7445 7665 6e74 732c 2065 6e64 startEvents, end │ │ │ │ +000093e0: 4576 656e 7429 3b3c 2f64 6976 3e0a 3c64 Event);
    . │ │ │ │ +00009400: 3c61 2069 643d 226c 3030 3233 3422 206e 234 } else {
    .
    235 │ │ │ │ +000094d0: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +000094f0: 2f2f 2043 7265 6174 6520 616e 2069 6e73 // Create an ins │ │ │ │ +00009500: 7461 6e63 6520 6f6e 2064 656d 616e 6420 tance on demand │ │ │ │ +00009510: 2873 6c6f 7729 3c2f 7370 616e 3e3c 2f64 (slow).
    23 │ │ │ │ +00009570: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ +00009580: 2020 2020 696e 7374 616e 6365 203d 203c instance = < │ │ │ │ +00009590: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +000095a0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +000095b0: 2261 3031 3134 312e 6874 6d6c 2361 3361 "a01141.html#a3a │ │ │ │ +000095c0: 3266 6161 3131 3730 6365 6464 3835 3166 2faa1170cedd851f │ │ │ │ +000095d0: 6561 3732 3636 6530 6666 3765 6461 223e ea7266e0ff7eda"> │ │ │ │ +000095e0: 4372 6561 7465 3c2f 613e 2873 7263 4465 Create(srcDe │ │ │ │ +000095f0: 7363 2c20 6473 7444 6573 632c 3c2f 6469 sc, dstDesc,.
    237 │ │ │ │ +00009650: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00009660: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009670: 2020 2020 203c 6120 636c 6173 733d 2263 BufferDescript │ │ │ │ +000096b0: 6f72 3c2f 613e 2829 2c3c 2f64 6976 3e0a or(),
    . │ │ │ │ +000096c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00009790: 6120 6964 3d22 6c30 3032 3339 2220 6e61 a id="l00239" na │ │ │ │ +000097a0: 6d65 3d22 6c30 3032 3339 223e 3c2f 613e me="l00239"> │ │ │ │ +000097b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 239 │ │ │ │ +000097e0: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +000097f0: 6576 6963 6543 6f6e 7465 7874 293b 3c2f eviceContext);.
    2 │ │ │ │ +00009850: 3430 3c2f 7370 616e 3e20 2020 2020 2020 40 │ │ │ │ +00009860: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +00009880: 663c 2f73 7061 6e3e 2028 696e 7374 616e f (instan │ │ │ │ +00009890: 6365 2920 7b3c 2f64 6976 3e0a 3c64 6976 ce) {
    .
    < │ │ │ │ +000098d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000098e0: 6e6f 223e 2020 3234 313c 2f73 7061 6e3e no"> 241 │ │ │ │ +000098f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009900: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool r = instan │ │ │ │ +00009930: 6365 2d26 6774 3b3c 6120 636c 6173 733d ce->EvalSten │ │ │ │ +00009990: 6369 6c73 3c2f 613e 2873 7263 4275 6666 cils(srcBuff │ │ │ │ +000099a0: 6572 2c20 7372 6344 6573 632c 3c2f 6469 er, srcDesc,.
    242 │ │ │ │ +00009a00: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00009a10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009a20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009a30: 2020 2020 2020 2064 7374 4275 6666 6572 dstBuffer │ │ │ │ +00009a40: 2c20 6473 7444 6573 632c 3c2f 6469 763e , dstDesc,
    │ │ │ │ +00009a50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00009a80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 243 │ │ │ │ +00009ab0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009ac0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009ad0: 2020 2020 2073 7465 6e63 696c 5461 626c stencilTabl │ │ │ │ +00009ae0: 652c 3c2f 6469 763e 0a3c 6469 7620 636c e,
    .
    244 │ │ │ │ +00009b40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009b50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00009b60: 2020 2020 2020 2020 2020 2020 206e 756d num │ │ │ │ +00009b70: 5374 6172 7445 7665 6e74 732c 2073 7461 StartEvents, sta │ │ │ │ +00009b80: 7274 4576 656e 7473 2c20 656e 6445 7665 rtEvents, endEve │ │ │ │ +00009b90: 6e74 293b 3c2f 6469 763e 0a3c 6469 7620 nt);
    .
    245 │ │ │ │ +00009bf0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00009c00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00009c10: 6f72 6422 3e64 656c 6574 653c 2f73 7061 ord">delete instance;.
    246 │ │ │ │ +00009c80: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00009c90: 2020 2020 2020 203c 7370 616e 2063 6c61 return r │ │ │ │ +00009cc0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00009d10: 2020 3233 383c 2f73 7061 6e3e 203c 2f64 238 .
    239 bool < │ │ │ │ -00009df0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00009e00: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -00009e10: 2261 3031 3333 372e 6874 6d6c 2361 3335 "a01337.html#a35 │ │ │ │ -00009e20: 3139 6535 6530 3536 3331 3032 3666 6164 19e5e05631026fad │ │ │ │ -00009e30: 3934 6337 3631 3666 3565 3065 3637 223e 94c7616f5e0e67"> │ │ │ │ -00009e40: 4172 6546 6163 6557 6569 6768 7473 466f AreFaceWeightsFo │ │ │ │ -00009e50: 7246 6163 6543 656e 7465 7273 3c2f 613e rFaceCenters │ │ │ │ -00009e60: 2829 3c73 7061 6e20 636c 6173 733d 226b () const │ │ │ │ -00009e80: 3c2f 7370 616e 3e7b 203c 7370 616e 2063 { return │ │ │ │ -00009eb0: 205f 6657 6569 6768 7473 466f 7243 656e _fWeightsForCen │ │ │ │ -00009ec0: 7465 7273 3b20 7d3c 2f64 6976 3e0a 3c64 ters; }
    . │ │ │ │ -00009ee0: 3c61 2069 643d 226c 3030 3234 3022 206e 240 │ │ │ │ -00009f60: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ -00009f70: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -00009f90: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d SetFac │ │ │ │ -00009ff0: 6557 6569 6768 7473 466f 7246 6163 6543 eWeightsForFaceC │ │ │ │ -0000a000: 656e 7465 7273 3c2f 613e 283c 7370 616e enters(bool │ │ │ │ -0000a030: 206f 6e29 207b 205f 6657 6569 6768 7473 on) { _fWeights │ │ │ │ -0000a040: 466f 7243 656e 7465 7273 203d 206f 6e3b ForCenters = on; │ │ │ │ -0000a050: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    241 .
    2 │ │ │ │ -0000a100: 3432 3c2f 7370 616e 3e20 2020 203c 7370 42 public │ │ │ │ -0000a130: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ │ -0000a180: 2020 3234 333c 2f73 7061 6e3e 203c 2f64 243 .
    24 │ │ │ │ -0000a1e0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ -0000a1f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -0000a210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000a260: 3234 353c 2f73 7061 6e3e 2020 2020 2020 245 │ │ │ │ -0000a270: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Addi │ │ │ │ -0000a290: 7469 6f6e 616c 206d 6574 686f 6473 202d tional methods - │ │ │ │ -0000a2a0: 2d20 6d61 696e 6c79 2074 6865 2062 6c65 - mainly the ble │ │ │ │ -0000a2b0: 6e64 696e 6720 6d65 7468 6f64 2066 6f72 nding method for │ │ │ │ -0000a2c0: 2076 6572 7465 782d 7665 7274 6578 206d vertex-vertex m │ │ │ │ -0000a2d0: 6173 6b73 3a3c 2f73 7061 6e3e 3c2f 6469 asks:.
    246 │ │ │ │ -0000a330: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -0000a340: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0000a350: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    2 │ │ │ │ -0000a3b0: 3437 3c2f 7370 616e 3e20 2020 2020 2020 47 │ │ │ │ -0000a3c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ -0000a3e0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ -0000a410: 2055 5345 525f 4d41 534b 2667 743b 3c2f USER_MASK>.
    2 │ │ │ │ -0000a470: 3438 3c2f 7370 616e 3e20 2020 2020 2020 48 │ │ │ │ -0000a480: 203c 7370 616e 2063 6c61 7373 3d22 6b65 inline v │ │ │ │ -0000a4c0: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ -0000a4d0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ -0000a560: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ -0000a570: 7265 663d 2261 3031 3333 372e 6874 6d6c ref="a01337.html │ │ │ │ -0000a580: 2361 3565 6438 3030 6539 6437 3032 6635 #a5ed800e9d702f5 │ │ │ │ -0000a590: 3761 6539 3738 6665 3630 6261 3261 3337 7ae978fe60ba2a37 │ │ │ │ -0000a5a0: 6463 223e 2020 3234 393c 2f61 3e3c 2f73 dc"> 249 Com │ │ │ │ -0000a610: 6269 6e65 5665 7274 6578 5665 7274 6578 bineVertexVertex │ │ │ │ -0000a620: 4d61 736b 733c 2f61 3e28 3c61 2063 6c61 Masks(Weight │ │ │ │ -0000a680: 3c2f 613e 2074 6869 7343 6f65 6666 2c20 thisCoeff, │ │ │ │ -0000a690: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ │ -0000a6e0: 5765 6967 6874 3c2f 613e 2064 7374 436f Weight dstCo │ │ │ │ -0000a6f0: 6566 662c 2055 5345 525f 4d41 534b 2661 eff, USER_MASK&a │ │ │ │ -0000a700: 6d70 3b20 6473 7429 3c73 7061 6e20 636c mp; dst) c │ │ │ │ -0000a720: 6f6e 7374 203c 2f73 7061 6e3e 7b3c 2f64 onst {.
    25 │ │ │ │ -0000a780: 303c 2f73 7061 6e3e 203c 2f64 6976 3e0a 0
    . │ │ │ │ -0000a790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0000a7c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 251 │ │ │ │ -0000a7f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -0000a810: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000a860: 3235 323c 2f73 7061 6e3e 2020 2020 2020 252 │ │ │ │ -0000a870: 2020 2020 2020 3c73 7061 6e20 636c 6173 // │ │ │ │ -0000a890: 5468 6973 2069 6d70 6c65 6d65 6e74 6174 This implementat │ │ │ │ -0000a8a0: 696f 6e20 6973 2063 6f6e 766f 6c75 7465 ion is convolute │ │ │ │ -0000a8b0: 6420 6279 2074 6865 2070 6f74 656e 7469 d by the potenti │ │ │ │ -0000a8c0: 616c 2073 7061 7273 6974 7920 6f66 2065 al sparsity of e │ │ │ │ -0000a8d0: 6163 6820 6d61 736b 2e20 2053 696e 6365 ach mask. Since │ │ │ │ -0000a8e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000a900: 3c61 2069 643d 226c 3030 3235 3322 206e 253 // it is sp │ │ │ │ -0000a970: 6563 6966 6963 2074 6f20 6120 7665 7274 ecific to a vert │ │ │ │ -0000a980: 6578 2d76 6572 7465 7820 6d61 736b 2c20 ex-vertex mask, │ │ │ │ -0000a990: 7765 2061 7265 2067 7561 7261 6e74 6565 we are guarantee │ │ │ │ -0000a9a0: 6420 746f 2068 6176 6520 6578 6163 746c d to have exactl │ │ │ │ -0000a9b0: 7920 6f6e 653c 2f73 7061 6e3e 3c2f 6469 y one.
    254 │ │ │ │ -0000aa10: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -0000aa20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // ver │ │ │ │ -0000aa40: 7465 782d 7765 6967 6874 2066 6f72 2062 tex-weight for b │ │ │ │ -0000aa50: 6f74 6820 6d61 736b 732c 2062 7574 2074 oth masks, but t │ │ │ │ -0000aa60: 6865 2065 6467 652d 2061 6e64 2066 6163 he edge- and fac │ │ │ │ -0000aa70: 652d 7765 6967 6874 7320 6172 6520 6f70 e-weights are op │ │ │ │ -0000aa80: 7469 6f6e 616c 2e20 2054 6865 3c2f 7370 tional. The
    .
    255 │ │ │ │ -0000aaf0: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ -0000ab10: 2f2f 2020 6368 696c 6420 6d61 736b 2028 // child mask ( │ │ │ │ -0000ab20: 7468 6520 2671 756f 743b 736f 7572 6365 the "source │ │ │ │ -0000ab30: 2671 756f 743b 2920 7368 6f75 6c64 2068 ") should h │ │ │ │ -0000ab40: 6176 6520 6120 7375 7065 7273 6574 206f ave a superset o │ │ │ │ -0000ab50: 6620 7468 6520 7765 6967 6874 7320 6f66 f the weights of │ │ │ │ -0000ab60: 2074 6865 2070 6172 656e 743c 2f73 7061 the parent
    .
    256 │ │ │ │ -0000abd0: 2020 2020 2020 2020 203c 7370 616e 2063 / │ │ │ │ -0000abf0: 2f20 2028 7468 6520 2671 756f 743b 6465 / (the "de │ │ │ │ -0000ac00: 7374 696e 6174 696f 6e26 7175 6f74 3b29 stination") │ │ │ │ -0000ac10: 2067 6976 656e 2069 7473 2072 6564 7563 given its reduc │ │ │ │ -0000ac20: 6564 2073 6861 7270 6e65 7373 2c20 736f ed sharpness, so │ │ │ │ -0000ac30: 2077 6520 666f 7274 756e 6174 656c 7920 we fortunately │ │ │ │ -0000ac40: 646f 6e26 2333 393b 7420 6e65 6564 2074 don't need t │ │ │ │ -0000ac50: 6f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c o
    .< │ │ │ │ -0000ac60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000ac70: 3e3c 6120 6964 3d22 6c30 3032 3537 2220 > 257 < │ │ │ │ -0000acc0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0000acd0: 656e 7422 3e2f 2f20 2074 6573 7420 616c ent">// test al │ │ │ │ -0000ace0: 6c20 7065 726d 7574 6174 696f 6e73 2e3c l permutations.< │ │ │ │ -0000acf0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0000ad10: 6120 6964 3d22 6c30 3032 3538 2220 6e61 a id="l00258" na │ │ │ │ -0000ad20: 6d65 3d22 6c30 3032 3538 223e 3c2f 613e me="l00258"> │ │ │ │ -0000ad30: 3c73 7061 6e20 636c 6173 733d 226c 696e 258 //.
    259 │ │ │ │ -0000add0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -0000ade0: 2020 2064 7374 2e56 6572 7465 7857 6569 dst.VertexWei │ │ │ │ -0000adf0: 6768 7428 3029 203d 2064 7374 436f 6566 ght(0) = dstCoef │ │ │ │ -0000ae00: 6620 2a20 6473 742e 5665 7274 6578 5765 f * dst.VertexWe │ │ │ │ -0000ae10: 6967 6874 2830 2920 2b20 7468 6973 436f ight(0) + thisCo │ │ │ │ -0000ae20: 6566 6620 2a20 7468 6973 2d26 6774 3b3c eff * this->< │ │ │ │ -0000ae30: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000ae40: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -0000ae50: 2261 3031 3333 372e 6874 6d6c 2361 6563 "a01337.html#aec │ │ │ │ -0000ae60: 3563 3261 6266 6466 6264 6534 6464 3933 5c2abfdfbde4dd93 │ │ │ │ -0000ae70: 3463 3036 3136 3235 3939 3437 3931 223e 4c061625994791"> │ │ │ │ -0000ae80: 5665 7274 6578 5765 6967 6874 3c2f 613e VertexWeight │ │ │ │ -0000ae90: 2830 293b 3c2f 6469 763e 0a3c 6469 7620 (0);
    .
    260 │ │ │ │ -0000aef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000af40: 2032 3631 3c2f 7370 616e 3e20 2020 2020 261 │ │ │ │ -0000af50: 2020 2020 2020 203c 7370 616e 2063 6c61 int edge │ │ │ │ -0000af80: 5765 6967 6874 436f 756e 7420 3d20 7468 WeightCount = th │ │ │ │ -0000af90: 6973 2d26 6774 3b3c 6120 636c 6173 733d is->GetNumEd │ │ │ │ -0000aff0: 6765 5765 6967 6874 733c 2f61 3e28 293b geWeights(); │ │ │ │ -0000b000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000b050: 2032 3632 3c2f 7370 616e 3e20 2020 2020 262 │ │ │ │ -0000b060: 2020 2020 2020 203c 7370 616e 2063 6c61 if (edge │ │ │ │ -0000b090: 5765 6967 6874 436f 756e 7429 207b 3c2f WeightCount) {.
    2 │ │ │ │ -0000b0f0: 3633 3c2f 7370 616e 3e20 2020 2020 2020 63 │ │ │ │ -0000b100: 2020 2020 2020 2020 203c 7370 616e 2063 if (ds │ │ │ │ -0000b130: 742e 4765 744e 756d 4564 6765 5765 6967 t.GetNumEdgeWeig │ │ │ │ -0000b140: 6874 7328 2920 3d3d 2030 2920 7b3c 2f64 hts() == 0) {.
    26 │ │ │ │ -0000b1a0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ -0000b1b0: 2020 2020 2020 2020 2020 2020 6473 742e dst. │ │ │ │ -0000b1c0: 5365 744e 756d 4564 6765 5765 6967 6874 SetNumEdgeWeight │ │ │ │ -0000b1d0: 7328 6564 6765 5765 6967 6874 436f 756e s(edgeWeightCoun │ │ │ │ -0000b1e0: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    265 │ │ │ │ -0000b240: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b250: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ │ -0000b270: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (int i = │ │ │ │ -0000b2a0: 2030 3b20 6920 266c 743b 2065 6467 6557 0; i < edgeW │ │ │ │ -0000b2b0: 6569 6768 7443 6f75 6e74 3b20 2b2b 6929 eightCount; ++i) │ │ │ │ -0000b2c0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    266 │ │ │ │ -0000b320: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b330: 2020 2020 2064 7374 2e45 6467 6557 6569 dst.EdgeWei │ │ │ │ -0000b340: 6768 7428 6929 203d 2074 6869 7343 6f65 ght(i) = thisCoe │ │ │ │ -0000b350: 6666 202a 2074 6869 732d 2667 743b 3c61 ff * this->E │ │ │ │ -0000b3b0: 6467 6557 6569 6768 743c 2f61 3e28 6929 dgeWeight(i) │ │ │ │ -0000b3c0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0000b410: 2020 3236 373c 2f73 7061 6e3e 2020 2020 267 │ │ │ │ -0000b420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b430: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ -0000b480: 2020 3236 383c 2f73 7061 6e3e 2020 2020 268 │ │ │ │ -0000b490: 2020 2020 2020 2020 2020 2020 7d20 3c73 } else {
    .
    < │ │ │ │ -0000b500: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000b510: 6e6f 223e 2020 3236 393c 2f73 7061 6e3e no"> 269 │ │ │ │ -0000b520: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b530: 2020 2020 3c73 7061 6e20 636c 6173 733d fo │ │ │ │ -0000b550: 723c 2f73 7061 6e3e 2028 3c73 7061 6e20 r (int i │ │ │ │ -0000b580: 203d 2030 3b20 6920 266c 743b 2065 6467 = 0; i < edg │ │ │ │ -0000b590: 6557 6569 6768 7443 6f75 6e74 3b20 2b2b eWeightCount; ++ │ │ │ │ -0000b5a0: 6929 207b 3c2f 6469 763e 0a3c 6469 7620 i) {
    .
    270 │ │ │ │ -0000b600: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b610: 2020 2020 2020 2064 7374 2e45 6467 6557 dst.EdgeW │ │ │ │ -0000b620: 6569 6768 7428 6929 203d 2064 7374 436f eight(i) = dstCo │ │ │ │ -0000b630: 6566 6620 2a20 6473 742e 4564 6765 5765 eff * dst.EdgeWe │ │ │ │ -0000b640: 6967 6874 2869 2920 2b20 7468 6973 436f ight(i) + thisCo │ │ │ │ -0000b650: 6566 6620 2a20 7468 6973 2d26 6774 3b3c eff * this->< │ │ │ │ -0000b660: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000b670: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -0000b680: 2261 3031 3333 372e 6874 6d6c 2361 3464 "a01337.html#a4d │ │ │ │ -0000b690: 6239 3332 6138 6133 3366 6430 3632 3263 b932a8a33fd0622c │ │ │ │ -0000b6a0: 3764 3031 3136 3765 6231 3462 3532 223e 7d01167eb14b52"> │ │ │ │ -0000b6b0: 4564 6765 5765 6967 6874 3c2f 613e 2869 EdgeWeight(i │ │ │ │ -0000b6c0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    271 │ │ │ │ -0000b720: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000b730: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    272 │ │ │ │ -0000b790: 2020 2020 2020 2020 2020 2020 207d 3c2f }.
    2 │ │ │ │ -0000b7f0: 3733 3c2f 7370 616e 3e20 2020 2020 2020 73 │ │ │ │ -0000b800: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ │ -0000b820: 6120 6964 3d22 6c30 3032 3734 2220 6e61 a id="l00274" na │ │ │ │ -0000b830: 6d65 3d22 6c30 3032 3734 223e 3c2f 613e me="l00274"> │ │ │ │ -0000b840: 3c73 7061 6e20 636c 6173 733d 226c 696e 274
    .
    275 │ │ │ │ -0000b8c0: 2020 2020 2020 2020 203c 7370 616e 2063 int fa │ │ │ │ -0000b8f0: 6365 5765 6967 6874 436f 756e 7420 3d20 ceWeightCount = │ │ │ │ -0000b900: 7468 6973 2d26 6774 3b3c 6120 636c 6173 this->GetNum │ │ │ │ -0000b960: 4661 6365 5765 6967 6874 733c 2f61 3e28 FaceWeights( │ │ │ │ -0000b970: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    276 │ │ │ │ -0000b9d0: 2020 2020 2020 2020 203c 7370 616e 2063 if (fa │ │ │ │ -0000ba00: 6365 5765 6967 6874 436f 756e 7429 207b ceWeightCount) { │ │ │ │ -0000ba10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000ba60: 2032 3737 3c2f 7370 616e 3e20 2020 2020 277 │ │ │ │ -0000ba70: 2020 2020 2020 2020 2020 203c 7370 616e //
    │ │ │ │ -0000baa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000bad0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 278 │ │ │ │ -0000bb00: 2020 2020 203c 7370 616e 2063 6c61 7373 // I │ │ │ │ -0000bb20: 6620 636f 6d62 696e 696e 6720 6661 6365 f combining face │ │ │ │ -0000bb30: 2077 6569 6768 7473 2c20 6265 2073 7572 weights, be sur │ │ │ │ -0000bb40: 6520 7468 6569 7220 696e 7465 7270 7265 e their interpre │ │ │ │ -0000bb50: 7461 7469 6f6e 2028 692e 652e 2066 6163 tation (i.e. fac │ │ │ │ -0000bb60: 652d 6365 6e74 6572 733c 2f73 7061 6e3e e-centers │ │ │ │ -0000bb70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000bbc0: 2032 3739 3c2f 7370 616e 3e20 2020 2020 279 │ │ │ │ -0000bbd0: 2020 2020 2020 2020 2020 203c 7370 616e // or opposite │ │ │ │ -0000bc00: 2076 6572 7469 6365 7329 2069 7320 7072 vertices) is pr │ │ │ │ -0000bc10: 6f70 6572 6c79 2073 6574 2069 6e20 7468 operly set in th │ │ │ │ -0000bc20: 6520 6465 7374 696e 6174 696f 6e20 6d61 e destination ma │ │ │ │ -0000bc30: 736b 3a3c 2f73 7061 6e3e 3c2f 6469 763e sk:
    │ │ │ │ -0000bc40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000bc70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 280 │ │ │ │ -0000bca0: 2020 2020 203c 7370 616e 2063 6c61 7373 //
    .
    281 │ │ │ │ -0000bd20: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0000bd30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000bd40: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (dst.GetNumFa │ │ │ │ -0000bd60: 6365 5765 6967 6874 7328 2920 3d3d 2030 ceWeights() == 0 │ │ │ │ -0000bd70: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    282 │ │ │ │ -0000bdd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000bde0: 2020 6473 742e 5365 744e 756d 4661 6365 dst.SetNumFace │ │ │ │ -0000bdf0: 5765 6967 6874 7328 6661 6365 5765 6967 Weights(faceWeig │ │ │ │ -0000be00: 6874 436f 756e 7429 3b3c 2f64 6976 3e0a htCount);
    . │ │ │ │ -0000be10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ -0000bf30: 3c61 2069 643d 226c 3030 3238 3422 206e 284
    .
    285 │ │ │ │ -0000bfd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000bfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ │ -0000c000: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (int i = │ │ │ │ -0000c030: 2030 3b20 6920 266c 743b 2066 6163 6557 0; i < faceW │ │ │ │ -0000c040: 6569 6768 7443 6f75 6e74 3b20 2b2b 6929 eightCount; ++i) │ │ │ │ -0000c050: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    286 │ │ │ │ -0000c0b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c0c0: 2020 2020 2064 7374 2e46 6163 6557 6569 dst.FaceWei │ │ │ │ -0000c0d0: 6768 7428 6929 203d 2074 6869 7343 6f65 ght(i) = thisCoe │ │ │ │ -0000c0e0: 6666 202a 2074 6869 732d 2667 743b 3c61 ff * this->F │ │ │ │ -0000c140: 6163 6557 6569 6768 743c 2f61 3e28 6929 aceWeight(i) │ │ │ │ -0000c150: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0000c1a0: 2020 3238 373c 2f73 7061 6e3e 2020 2020 287 │ │ │ │ -0000c1b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c1c0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ -0000c210: 2020 3238 383c 2f73 7061 6e3e 2020 2020 288 │ │ │ │ -0000c220: 2020 2020 2020 2020 2020 2020 7d20 3c73 } else {
    .
    < │ │ │ │ -0000c290: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000c2a0: 6e6f 223e 2020 3238 393c 2f73 7061 6e3e no"> 289 │ │ │ │ -0000c2b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c2c0: 2020 2020 6173 7365 7274 2874 6869 732d assert(this- │ │ │ │ -0000c2d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >AreFaceWeig │ │ │ │ -0000c330: 6874 7346 6f72 4661 6365 4365 6e74 6572 htsForFaceCenter │ │ │ │ -0000c340: 733c 2f61 3e28 2920 3d3d 2064 7374 2e41 s() == dst.A │ │ │ │ -0000c350: 7265 4661 6365 5765 6967 6874 7346 6f72 reFaceWeightsFor │ │ │ │ -0000c360: 4661 6365 4365 6e74 6572 7328 2929 3b3c FaceCenters());< │ │ │ │ -0000c370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000c3c0: 3239 303c 2f73 7061 6e3e 203c 2f64 6976 290
    .
    291< │ │ │ │ -0000c420: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -0000c430: 2020 2020 2020 2020 2020 3c73 7061 6e20 for ( │ │ │ │ -0000c460: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i = 0; i &l │ │ │ │ -0000c490: 743b 2066 6163 6557 6569 6768 7443 6f75 t; faceWeightCou │ │ │ │ -0000c4a0: 6e74 3b20 2b2b 6929 207b 3c2f 6469 763e nt; ++i) {
    │ │ │ │ -0000c4b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000c4e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 292 │ │ │ │ -0000c510: 2020 2020 2020 2020 2020 2020 2064 7374 dst │ │ │ │ -0000c520: 2e46 6163 6557 6569 6768 7428 6929 203d .FaceWeight(i) = │ │ │ │ -0000c530: 2064 7374 436f 6566 6620 2a20 6473 742e dstCoeff * dst. │ │ │ │ -0000c540: 4661 6365 5765 6967 6874 2869 2920 2b20 FaceWeight(i) + │ │ │ │ -0000c550: 7468 6973 436f 6566 6620 2a20 7468 6973 thisCoeff * this │ │ │ │ -0000c560: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->FaceWeight │ │ │ │ -0000c5c0: 3c2f 613e 2869 293b 3c2f 6469 763e 0a3c (i);
    .< │ │ │ │ -0000c5d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000c5e0: 3e3c 6120 6964 3d22 6c30 3032 3933 2220 > 293 │ │ │ │ -0000c630: 2020 2020 2020 207d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ -0000c640: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000c650: 3e3c 6120 6964 3d22 6c30 3032 3934 2220 > 294 │ │ │ │ -0000c6a0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    295 │ │ │ │ -0000c700: 2020 2020 2020 2020 2020 207d 3c2f 6469 }.
    296 │ │ │ │ -0000c760: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ │ -0000c770: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ -0000c790: 3c61 2069 643d 226c 3030 3239 3722 206e 297
    .
    298 │ │ │ │ -0000c830: 2020 3c73 7061 6e20 636c 6173 733d 226b private< │ │ │ │ -0000c850: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    . │ │ │ │ -0000c870: 3c61 2069 643d 226c 3030 3239 3922 206e 299 Weight │ │ │ │ -0000c910: 3c2f 613e 2a20 5f76 5765 6967 6874 733b * _vWeights; │ │ │ │ -0000c920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000c970: 2033 3030 3c2f 7370 616e 3e20 2020 2020 300 │ │ │ │ -0000c980: 2020 203c 6120 636c 6173 733d 2263 6f64 Weight* _ │ │ │ │ -0000c9e0: 6557 6569 6768 7473 3b3c 2f64 6976 3e0a eWeights;
    . │ │ │ │ -0000c9f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    302 │ │ │ │ -0000cb10: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ -0000cb30: 6e74 3c2f 7370 616e 3e20 5f76 436f 756e nt _vCoun │ │ │ │ -0000cb40: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    303 │ │ │ │ -0000cba0: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ -0000cbc0: 6e74 3c2f 7370 616e 3e20 5f65 436f 756e nt _eCoun │ │ │ │ -0000cbd0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    304 │ │ │ │ -0000cc30: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ -0000cc50: 6e74 3c2f 7370 616e 3e20 5f66 436f 756e nt _fCoun │ │ │ │ -0000cc60: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    305 │ │ │ │ -0000ccc0: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ │ -0000cce0: 6f6f 6c3c 2f73 7061 6e3e 205f 6657 6569 ool _fWei │ │ │ │ -0000ccf0: 6768 7473 466f 7243 656e 7465 7273 3b3c ghtsForCenters;< │ │ │ │ -0000cd00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000cd50: 3330 363c 2f73 7061 6e3e 2020 2020 7d3b 306 }; │ │ │ │ -0000cd60: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ -0000cd80: 3c61 2069 643d 226c 3030 3330 3722 206e 307};
    .
    .
    308< │ │ │ │ -0000ce20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0000ce40: 3c61 2069 643d 226c 3030 3330 3922 206e 309
    .
    310//.
    31 │ │ │ │ -0000cf50: 313c 2f73 7061 6e3e 3c73 7061 6e20 636c 1// │ │ │ │ -0000cf70: 2020 4372 6561 7365 2061 6e64 2063 6f72 Crease and cor │ │ │ │ -0000cf80: 6e65 7220 6d61 736b 7320 6172 6520 636f ner masks are co │ │ │ │ -0000cf90: 6d6d 6f6e 2074 6f20 6d6f 7374 2073 6368 mmon to most sch │ │ │ │ -0000cfa0: 656d 6573 202d 2d20 7468 6520 7265 7374 emes -- the rest │ │ │ │ -0000cfb0: 206e 6565 6420 746f 2062 6520 7072 6f76 need to be prov │ │ │ │ -0000cfc0: 6964 6564 3c2f 7370 616e 3e3c 2f64 6976 ided
    .
    312< │ │ │ │ -0000d020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -0000d040: 666f 7220 6561 6368 2053 6368 656d 6520 for each Scheme │ │ │ │ -0000d050: 7370 6563 6961 6c69 7a61 7469 6f6e 2e3c specialization.< │ │ │ │ -0000d060: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0000d080: 6120 6964 3d22 6c30 3033 3133 2220 6e61 a id="l00313" na │ │ │ │ -0000d090: 6d65 3d22 6c30 3033 3133 223e 3c2f 613e me="l00313"> │ │ │ │ -0000d0a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 313// │ │ │ │ -0000d0e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000d130: 2033 3134 3c2f 7370 616e 3e3c 7370 616e 314template │ │ │ │ -0000d160: 2026 6c74 3b53 6368 656d 6554 7970 6520 <SchemeType │ │ │ │ -0000d170: 5343 4845 4d45 2667 743b 3c2f 6469 763e SCHEME>
    │ │ │ │ -0000d180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000d1b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 315templ │ │ │ │ -0000d1f0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ -0000d200: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000d210: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename EDGE, typename │ │ │ │ -0000d250: 204d 4153 4b26 6774 3b3c 2f64 6976 3e0a MASK>
    . │ │ │ │ -0000d260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0000d290: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 316inline │ │ │ │ -0000d2d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c void.
    .
    317 │ │ │ │ -0000d3e0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d Scheme&l │ │ │ │ -0000d440: 743b 5343 4845 4d45 2667 743b 3a3a 6173 t;SCHEME>::as │ │ │ │ -0000d450: 7369 676e 4372 6561 7365 4d61 736b 466f signCreaseMaskFo │ │ │ │ -0000d460: 7245 6467 653c 2f61 3e28 4544 4745 203c rEdge(EDGE < │ │ │ │ -0000d470: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000d480: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const&, MASK& │ │ │ │ -0000d4a0: 3b20 6d61 736b 293c 7370 616e 2063 6c61 ; mask) co │ │ │ │ -0000d4c0: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    318 │ │ │ │ -0000d520: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0000d530: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000d540: 3e3c 6120 6964 3d22 6c30 3033 3139 2220 > 319
    mask.SetN │ │ │ │ -0000d590: 756d 5665 7274 6578 5765 6967 6874 7328 umVertexWeights( │ │ │ │ -0000d5a0: 3229 3b3c 2f64 6976 3e0a 3c64 6976 2063 2);
    .
    320 │ │ │ │ -0000d600: 2020 6d61 736b 2e53 6574 4e75 6d45 6467 mask.SetNumEdg │ │ │ │ -0000d610: 6557 6569 6768 7473 2830 293b 3c2f 6469 eWeights(0);.
    321 │ │ │ │ -0000d670: 3c2f 7370 616e 3e20 2020 206d 6173 6b2e mask. │ │ │ │ -0000d680: 5365 744e 756d 4661 6365 5765 6967 6874 SetNumFaceWeight │ │ │ │ -0000d690: 7328 3029 3b3c 2f64 6976 3e0a 3c64 6976 s(0);
    .
    < │ │ │ │ -0000d6d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000d6e0: 6e6f 223e 2020 3332 323c 2f73 7061 6e3e no"> 322 │ │ │ │ -0000d6f0: 2020 2020 6d61 736b 2e53 6574 4661 6365 mask.SetFace │ │ │ │ -0000d700: 5765 6967 6874 7346 6f72 4661 6365 4365 WeightsForFaceCe │ │ │ │ -0000d710: 6e74 6572 7328 3c73 7061 6e20 636c 6173 nters(fals │ │ │ │ -0000d730: 653c 2f73 7061 6e3e 293b 3c2f 6469 763e e);
    │ │ │ │ -0000d740: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -0000d7b0: 6120 6964 3d22 6c30 3033 3234 2220 6e61 a id="l00324" na │ │ │ │ -0000d7c0: 6d65 3d22 6c30 3033 3234 223e 3c2f 613e me="l00324"> │ │ │ │ -0000d7d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 324 mask.Vertex │ │ │ │ -0000d800: 5765 6967 6874 2830 2920 3d20 302e 3566 Weight(0) = 0.5f │ │ │ │ -0000d810: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0000d860: 2020 3332 353c 2f73 7061 6e3e 2020 2020 325 │ │ │ │ -0000d870: 6d61 736b 2e56 6572 7465 7857 6569 6768 mask.VertexWeigh │ │ │ │ -0000d880: 7428 3129 203d 2030 2e35 663b 3c2f 6469 t(1) = 0.5f;.
    326 │ │ │ │ -0000d8e0: 3c2f 7370 616e 3e7d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ -0000d8f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000d940: 3332 373c 2f73 7061 6e3e 203c 2f64 6976 327
    .
    328< │ │ │ │ -0000d9a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ -0000d9c0: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ -0000d9d0: 5363 6865 6d65 5479 7065 2053 4348 454d SchemeType SCHEM │ │ │ │ -0000d9e0: 4526 6774 3b3c 2f64 6976 3e0a 3c64 6976 E>
    .
    < │ │ │ │ -0000da20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000da30: 6e6f 223e 2020 3332 393c 2f73 7061 6e3e no"> 329 │ │ │ │ -0000da40: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ -0000da80: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -0000da90: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ -0000dab0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ -0000dac0: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ -0000dae0: 6120 6964 3d22 6c30 3033 3330 2220 6e61 a id="l00330" na │ │ │ │ -0000daf0: 6d65 3d22 6c30 3033 3330 223e 3c2f 613e me="l00330"> │ │ │ │ -0000db00: 3c73 7061 6e20 636c 6173 733d 226c 696e 330inline
    v │ │ │ │ -0000db60: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ -0000db70: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ -0000dc00: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ -0000dc10: 7265 663d 2261 3031 3333 332e 6874 6d6c ref="a01333.html │ │ │ │ -0000dc20: 2361 3737 3634 3466 3639 6564 6530 3366 #a77644f69ede03f │ │ │ │ -0000dc30: 6136 3232 3232 6436 3061 3939 3937 3032 a62222d60a999702 │ │ │ │ -0000dc40: 3338 223e 2020 3333 313c 2f61 3e3c 2f73 38"> 331Scheme<S │ │ │ │ -0000dcb0: 4348 454d 4526 6774 3b3a 3a61 7373 6967 CHEME>::assig │ │ │ │ -0000dcc0: 6e43 6f72 6e65 724d 6173 6b46 6f72 5665 nCornerMaskForVe │ │ │ │ -0000dcd0: 7274 6578 3c2f 613e 2856 4552 5445 5820 rtex(VERTEX │ │ │ │ -0000dce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const&, MASK&am │ │ │ │ -0000dd10: 703b 206d 6173 6b29 3c73 7061 6e20 636c p; mask) c │ │ │ │ -0000dd30: 6f6e 7374 203c 2f73 7061 6e3e 7b3c 2f64 onst {.
    33 │ │ │ │ -0000dd90: 323c 2f73 7061 6e3e 203c 2f64 6976 3e0a 2
    . │ │ │ │ -0000dda0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    334 │ │ │ │ -0000de70: 2020 206d 6173 6b2e 5365 744e 756d 4564 mask.SetNumEd │ │ │ │ -0000de80: 6765 5765 6967 6874 7328 3029 3b3c 2f64 geWeights(0);.
    33 │ │ │ │ -0000dee0: 353c 2f73 7061 6e3e 2020 2020 6d61 736b 5 mask │ │ │ │ -0000def0: 2e53 6574 4e75 6d46 6163 6557 6569 6768 .SetNumFaceWeigh │ │ │ │ -0000df00: 7473 2830 293b 3c2f 6469 763e 0a3c 6469 ts(0);
    .< │ │ │ │ -0000df20: 6120 6964 3d22 6c30 3033 3336 2220 6e61 a id="l00336" na │ │ │ │ -0000df30: 6d65 3d22 6c30 3033 3336 223e 3c2f 613e me="l00336"> │ │ │ │ -0000df40: 3c73 7061 6e20 636c 6173 733d 226c 696e 336 mask.SetFac │ │ │ │ -0000df70: 6557 6569 6768 7473 466f 7246 6163 6543 eWeightsForFaceC │ │ │ │ -0000df80: 656e 7465 7273 283c 7370 616e 2063 6c61 enters(fal │ │ │ │ -0000dfa0: 7365 3c2f 7370 616e 3e29 3b3c 2f64 6976 se);
    .
    337< │ │ │ │ -0000e000: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0000e020: 3c61 2069 643d 226c 3030 3333 3822 206e 338 mask.Verte │ │ │ │ -0000e070: 7857 6569 6768 7428 3029 203d 2031 2e30 xWeight(0) = 1.0 │ │ │ │ -0000e080: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    339}.
    .
    < │ │ │ │ -0000e120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000e130: 6e6f 223e 2020 3334 303c 2f73 7061 6e3e no"> 340 │ │ │ │ -0000e140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0000e190: 2020 3334 313c 2f73 7061 6e3e 203c 2f64 341 .
    34 │ │ │ │ -0000e1f0: 323c 2f73 7061 6e3e 3c73 7061 6e20 636c 2// │ │ │ │ -0000e210: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000e230: 3c61 2069 643d 226c 3030 3334 3322 206e 343// The │ │ │ │ -0000e290: 636f 6d70 7574 6174 696f 6e20 6f66 2061 computation of a │ │ │ │ -0000e2a0: 2066 6163 652d 7665 7274 6578 206d 6173 face-vertex mas │ │ │ │ -0000e2b0: 6b20 6973 2074 7269 7669 616c 2061 6e64 k is trivial and │ │ │ │ -0000e2c0: 2063 6f6e 7369 7374 656e 7420 666f 7220 consistent for │ │ │ │ -0000e2d0: 616c 6c20 7363 6865 6d65 733a 3c2f 7370 all schemes:
    .
    344//.
    34 │ │ │ │ -0000e3b0: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5te │ │ │ │ -0000e3d0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ │ -0000e3e0: 743b 5363 6865 6d65 5479 7065 2053 4348 t;SchemeType SCH │ │ │ │ -0000e3f0: 454d 4526 6774 3b3c 2f64 6976 3e0a 3c64 EME>
    . │ │ │ │ -0000e410: 3c61 2069 643d 226c 3030 3334 3622 206e 346template │ │ │ │ -0000e470: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename FACE, ty │ │ │ │ -0000e4c0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ -0000e4d0: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ -0000e4f0: 6120 6964 3d22 6c30 3033 3437 2220 6e61 a id="l00347" na │ │ │ │ -0000e500: 6d65 3d22 6c30 3033 3437 223e 3c2f 613e me="l00347"> │ │ │ │ -0000e510: 3c73 7061 6e20 636c 6173 733d 226c 696e 347void< │ │ │ │ -0000e550: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    ..
    │ │ │ │ -0000e630: 2020 3334 383c 2f61 3e3c 2f73 7061 6e3e 348 │ │ │ │ -0000e640: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Scheme<SCHEM │ │ │ │ -0000e6a0: 4526 6774 3b3a 3a43 6f6d 7075 7465 4661 E>::ComputeFa │ │ │ │ -0000e6b0: 6365 5665 7274 6578 4d61 736b 3c2f 613e ceVertexMask │ │ │ │ -0000e6c0: 2846 4143 4520 3c73 7061 6e20 636c 6173 (FACE cons │ │ │ │ -0000e6e0: 743c 2f73 7061 6e3e 2661 6d70 3b20 6661 t& fa │ │ │ │ -0000e6f0: 6365 2c20 4d41 534b 2661 6d70 3b20 6d61 ce, MASK& ma │ │ │ │ -0000e700: 736b 293c 7370 616e 2063 6c61 7373 3d22 sk) const │ │ │ │ -0000e720: 3c2f 7370 616e 3e7b 3c2f 6469 763e 0a3c {
    .< │ │ │ │ -0000e730: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000e740: 3e3c 6120 6964 3d22 6c30 3033 3439 2220 > 349
    .
    350 │ │ │ │ -0000e7e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -0000e800: 3c2f 7370 616e 3e20 7665 7274 436f 756e vertCoun │ │ │ │ -0000e810: 7420 3d20 6661 6365 2e47 6574 4e75 6d56 t = face.GetNumV │ │ │ │ -0000e820: 6572 7469 6365 7328 293b 3c2f 6469 763e ertices();
    │ │ │ │ -0000e830: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -0000e8a0: 6120 6964 3d22 6c30 3033 3532 2220 6e61 a id="l00352" na │ │ │ │ -0000e8b0: 6d65 3d22 6c30 3033 3532 223e 3c2f 613e me="l00352"> │ │ │ │ -0000e8c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 352 mask.SetNum │ │ │ │ -0000e8f0: 5665 7274 6578 5765 6967 6874 7328 7665 VertexWeights(ve │ │ │ │ -0000e900: 7274 436f 756e 7429 3b3c 2f64 6976 3e0a rtCount);
    . │ │ │ │ -0000e910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    354 │ │ │ │ -0000e9e0: 206d 6173 6b2e 5365 744e 756d 4661 6365 mask.SetNumFace │ │ │ │ -0000e9f0: 5765 6967 6874 7328 3029 3b3c 2f64 6976 Weights(0);
    .
    355< │ │ │ │ -0000ea50: 2f73 7061 6e3e 2020 2020 6d61 736b 2e53 /span> mask.S │ │ │ │ -0000ea60: 6574 4661 6365 5765 6967 6874 7346 6f72 etFaceWeightsFor │ │ │ │ -0000ea70: 4661 6365 4365 6e74 6572 7328 3c73 7061 FaceCenters(false); │ │ │ │ -0000eaa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000eaf0: 2033 3536 3c2f 7370 616e 3e20 3c2f 6469 356 .
    357 │ │ │ │ -0000eb50: 3c2f 7370 616e 3e20 2020 203c 7370 616e typename │ │ │ │ -0000eb80: 204d 4153 4b3a 3a57 6569 6768 7420 7657 MASK::Weight vW │ │ │ │ -0000eb90: 6569 6768 7420 3d20 312e 3066 202f 2028 eight = 1.0f / ( │ │ │ │ -0000eba0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename MASK::Weig │ │ │ │ -0000ebd0: 6874 2920 7665 7274 436f 756e 743b 3c2f ht) vertCount;.
    3 │ │ │ │ -0000ec30: 3538 3c2f 7370 616e 3e20 2020 203c 7370 58 for (int │ │ │ │ -0000ec80: 3c2f 7370 616e 3e20 6920 3d20 303b 2069 i = 0; i │ │ │ │ -0000ec90: 2026 6c74 3b20 7665 7274 436f 756e 743b < vertCount; │ │ │ │ -0000eca0: 202b 2b69 2920 7b3c 2f64 6976 3e0a 3c64 ++i) {
    . │ │ │ │ -0000ecc0: 3c61 2069 643d 226c 3030 3335 3922 206e 359 mask.V │ │ │ │ -0000ed10: 6572 7465 7857 6569 6768 7428 6929 203d ertexWeight(i) = │ │ │ │ -0000ed20: 2076 5765 6967 6874 3b3c 2f64 6976 3e0a vWeight;
    . │ │ │ │ -0000ed30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ -0000ed90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ..
    362 │ │ │ │ -0000ee40: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0000ee50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000ee60: 3e3c 6120 6964 3d22 6c30 3033 3633 2220 > 363
    .
    364< │ │ │ │ -0000ef00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0000ef10: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    3 │ │ │ │ -0000ef70: 3635 3c2f 7370 616e 3e3c 7370 616e 2063 65/ │ │ │ │ -0000ef90: 2f20 2054 6865 2063 6f6d 7075 7461 7469 / The computati │ │ │ │ -0000efa0: 6f6e 206f 6620 616e 2065 6467 652d 7665 on of an edge-ve │ │ │ │ -0000efb0: 7274 6578 206d 6173 6b20 7265 7175 6972 rtex mask requir │ │ │ │ -0000efc0: 6573 2069 6e73 7065 6374 696f 6e20 6f66 es inspection of │ │ │ │ -0000efd0: 2073 6861 7270 6e65 7373 2076 616c 7565 sharpness value │ │ │ │ -0000efe0: 7320 746f 3c2f 7370 616e 3e3c 2f64 6976 s to
    .
    366< │ │ │ │ -0000f040: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -0000f060: 6465 7465 726d 696e 6520 6966 2073 6d6f determine if smo │ │ │ │ -0000f070: 6f74 6820 6f72 2061 2063 7265 6173 652c oth or a crease, │ │ │ │ -0000f080: 2061 6e64 2061 6c73 6f20 746f 2064 6574 and also to det │ │ │ │ -0000f090: 6563 7420 616e 6420 6170 706c 7920 6120 ect and apply a │ │ │ │ -0000f0a0: 7472 616e 7369 7469 6f6e 2066 726f 6d20 transition from │ │ │ │ -0000f0b0: 613c 2f73 7061 6e3e 3c2f 6469 763e 0a3c a
    .< │ │ │ │ -0000f0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000f0d0: 3e3c 6120 6964 3d22 6c30 3033 3637 2220 > 367// cre │ │ │ │ -0000f130: 6173 6520 746f 2073 6d6f 6f74 682e 2020 ase to smooth. │ │ │ │ -0000f140: 5573 696e 6720 7468 6520 7072 6f74 6563 Using the protec │ │ │ │ -0000f150: 7465 6420 6d65 7468 6f64 7320 746f 2061 ted methods to a │ │ │ │ -0000f160: 7373 6967 6e20 7468 6520 7370 6563 6966 ssign the specif │ │ │ │ -0000f170: 6963 206d 6173 6b73 2028 6f6e 6c79 3c2f ic masks (only
    .
    < │ │ │ │ -0000f1c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000f1d0: 6e6f 223e 2020 3336 383c 2f73 7061 6e3e no"> 368 │ │ │ │ -0000f1e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // two -- │ │ │ │ -0000f200: 2073 6d6f 6f74 6820 6f72 2063 7265 6173 smooth or creas │ │ │ │ -0000f210: 6529 2074 6869 7320 696d 706c 656d 656e e) this implemen │ │ │ │ -0000f220: 7461 7469 6f6e 2073 686f 756c 6420 7365 tation should se │ │ │ │ -0000f230: 7276 6520 616c 6c20 6e6f 6e2d 6c69 6e65 rve all non-line │ │ │ │ -0000f240: 6172 2073 6368 656d 6573 3c2f 7370 616e ar schemes
    .
    │ │ │ │ -0000f2a0: 2020 3336 393c 2f73 7061 6e3e 3c73 7061 369// (currently │ │ │ │ -0000f2d0: 2043 6174 6d61 726b 2061 6e64 204c 6f6f Catmark and Loo │ │ │ │ -0000f2e0: 7029 2061 6e64 206f 6e6c 7920 6e65 6564 p) and only need │ │ │ │ -0000f2f0: 7320 746f 2062 6520 7370 6563 6961 6c69 s to be speciali │ │ │ │ -0000f300: 7a65 6420 666f 7220 4269 6c69 6e65 6172 zed for Bilinear │ │ │ │ -0000f310: 2074 6f3c 2f73 7061 6e3e 3c2f 6469 763e to
    │ │ │ │ -0000f320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000f350: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 370// t │ │ │ │ -0000f390: 7269 7669 616c 697a 6520 6974 2074 6f20 rivialize it to │ │ │ │ -0000f3a0: 7468 6520 6372 6561 7365 2063 6173 652e the crease case. │ │ │ │ -0000f3b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000f3d0: 3c61 2069 643d 226c 3030 3337 3122 206e 371//
    .
    │ │ │ │ -0000f480: 2020 3337 323c 2f73 7061 6e3e 3c73 7061 372// The implem │ │ │ │ -0000f4b0: 656e 7461 7469 6f6e 2068 6572 6520 6973 entation here is │ │ │ │ -0000f4c0: 2073 6c69 6768 746c 7920 636f 6d70 6c69 slightly compli │ │ │ │ -0000f4d0: 6361 7465 6420 6279 2063 6f6d 6269 6e69 cated by combini │ │ │ │ -0000f4e0: 6e67 2074 776f 2073 6365 6e61 7269 6f73 ng two scenarios │ │ │ │ -0000f4f0: 2069 6e74 6f20 613c 2f73 7061 6e3e 3c2f into a.
    3 │ │ │ │ -0000f550: 3733 3c2f 7370 616e 3e3c 7370 616e 2063 73/ │ │ │ │ -0000f570: 2f20 2073 696e 676c 6520 696d 706c 656d / single implem │ │ │ │ -0000f580: 656e 7461 7469 6f6e 202d 2d20 6569 7468 entation -- eith │ │ │ │ -0000f590: 6572 2074 6865 2063 616c 6c65 7220 6b6e er the caller kn │ │ │ │ -0000f5a0: 6f77 7320 7468 6520 7061 7265 6e74 2061 ows the parent a │ │ │ │ -0000f5b0: 6e64 2063 6869 6c64 2072 756c 6573 2061 nd child rules a │ │ │ │ -0000f5c0: 6e64 3c2f 7370 616e 3e3c 2f64 6976 3e0a nd
    . │ │ │ │ -0000f5d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ -0000f6a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000f6b0: 3e3c 6120 6964 3d22 6c30 3033 3735 2220 > 375// val │ │ │ │ -0000f710: 7565 732e 2020 426f 7468 2063 6173 6573 ues. Both cases │ │ │ │ -0000f720: 2069 6e63 6c75 6465 2071 7569 636b 2072 include quick r │ │ │ │ -0000f730: 6574 7572 6e20 6f6e 6365 2074 6865 2070 eturn once the p │ │ │ │ -0000f740: 6172 656e 7420 6973 2064 6574 6572 6d69 arent is determi │ │ │ │ -0000f750: 6e65 6420 746f 2062 653c 2f73 7061 6e3e ned to be │ │ │ │ -0000f760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000f7b0: 2033 3736 3c2f 7370 616e 3e3c 7370 616e 376// smooth or t │ │ │ │ -0000f7e0: 6865 2063 6869 6c64 2061 2063 7265 6173 he child a creas │ │ │ │ -0000f7f0: 652c 206c 6561 7669 6e67 2074 6865 2074 e, leaving the t │ │ │ │ -0000f800: 7261 6e73 6974 696f 6e61 6c20 6361 7365 ransitional case │ │ │ │ -0000f810: 2072 656d 6169 6e69 6e67 2e3c 2f73 7061 remaining.
    .
    377//.
    378 │ │ │ │ -0000f8f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -0000f910: 2054 6865 206f 7665 7261 6c6c 2070 726f The overall pro │ │ │ │ -0000f920: 6365 7373 2069 7320 6173 2066 6f6c 6c6f cess is as follo │ │ │ │ -0000f930: 7773 3a3c 2f73 7061 6e3e 3c2f 6469 763e ws:
    │ │ │ │ -0000f940: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    380< │ │ │ │ -0000fa10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0000fa20: 656e 7422 3e2f 2f20 2020 2020 202d 2071 ent">// - q │ │ │ │ -0000fa30: 7569 636b 6c79 2064 6574 6563 7420 7468 uickly detect th │ │ │ │ -0000fa40: 6520 6d6f 7374 2063 6f6d 6d6f 6e20 7370 e most common sp │ │ │ │ -0000fa50: 6563 6966 6965 6420 6f72 2064 6574 6563 ecified or detec │ │ │ │ -0000fa60: 7465 6420 536d 6f6f 7468 2063 6173 6520 ted Smooth case │ │ │ │ -0000fa70: 616e 6420 7265 7475 726e 3c2f 7370 616e and return
    .
    │ │ │ │ -0000fad0: 2020 3338 313c 2f73 7061 6e3e 3c73 7061 381// - quic │ │ │ │ -0000fb00: 6b6c 7920 6465 7465 6374 2061 2066 756c kly detect a ful │ │ │ │ -0000fb10: 6c20 4372 6561 7365 2062 7920 6368 696c l Crease by chil │ │ │ │ -0000fb20: 6420 5275 6c65 2061 7373 6967 6e6d 656e d Rule assignmen │ │ │ │ -0000fb30: 7420 616e 6420 7265 7475 726e 3c2f 7370 t and return
    .
    382// - de │ │ │ │ -0000fbc0: 7465 726d 696e 6520 6672 6f6d 2073 6861 termine from sha │ │ │ │ -0000fbd0: 7270 6e65 7373 2069 6620 756e 7370 6563 rpness if unspec │ │ │ │ -0000fbe0: 6966 6965 6420 6368 696c 6420 6973 2061 ified child is a │ │ │ │ -0000fbf0: 2063 7265 6173 6520 2d2d 2072 6574 7572 crease -- retur │ │ │ │ -0000fc00: 6e20 6966 2073 6f3c 2f73 7061 6e3e 3c2f n if so.
    3 │ │ │ │ -0000fc60: 3833 3c2f 7370 616e 3e3c 7370 616e 2063 83/ │ │ │ │ -0000fc80: 2f20 2020 2020 202d 2063 6f6d 7075 7465 / - compute │ │ │ │ -0000fc90: 2073 6d6f 6f74 6820 6d61 736b 2066 6f72 smooth mask for │ │ │ │ -0000fca0: 2063 6869 6c64 2061 6e64 2063 6f6d 6269 child and combi │ │ │ │ -0000fcb0: 6e65 2077 6974 6820 6372 6561 7365 2066 ne with crease f │ │ │ │ -0000fcc0: 726f 6d20 7061 7265 6e74 3c2f 7370 616e rom parent
    .
    │ │ │ │ -0000fd20: 2020 3338 343c 2f73 7061 6e3e 3c73 7061 384//
    .
    385< │ │ │ │ -0000fda0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -0000fdc0: 5573 6167 6520 6f66 2074 6865 2070 6172 Usage of the par │ │ │ │ -0000fdd0: 656e 7420 5275 6c65 2068 6572 6520 616c ent Rule here al │ │ │ │ -0000fde0: 6c6f 7773 2073 6f6d 6520 6d69 7375 7365 lows some misuse │ │ │ │ -0000fdf0: 2069 6e20 7468 6174 206f 6e6c 7920 7468 in that only th │ │ │ │ -0000fe00: 7265 6520 6f66 2066 6976 6520 706f 7373 ree of five poss │ │ │ │ -0000fe10: 6962 6c65 3c2f 7370 616e 3e3c 2f64 6976 ible
    .
    386< │ │ │ │ -0000fe70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -0000fe90: 6173 7369 676e 6d65 6e74 7320 6172 6520 assignments are │ │ │ │ -0000fea0: 6c65 6769 7469 6d61 7465 2066 6f72 2074 legitimate for t │ │ │ │ -0000feb0: 6865 2070 6172 656e 7420 616e 6420 666f he parent and fo │ │ │ │ -0000fec0: 7572 2066 6f72 2074 6865 2063 6869 6c64 ur for the child │ │ │ │ -0000fed0: 2028 4461 7274 2062 6569 6e67 206f 6e6c (Dart being onl │ │ │ │ -0000fee0: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
    .< │ │ │ │ -0000fef0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000ff00: 3e3c 6120 6964 3d22 6c30 3033 3837 2220 > 387
    // val │ │ │ │ -0000ff60: 6964 2066 6f72 2074 6865 2063 6869 6c64 id for the child │ │ │ │ -0000ff70: 2061 6e64 2043 6f72 6e65 7220 666f 7220 and Corner for │ │ │ │ -0000ff80: 6e65 6974 6865 7229 2e20 2052 6573 756c neither). Resul │ │ │ │ -0000ff90: 7473 2061 7265 2075 6e64 6566 696e 6564 ts are undefined │ │ │ │ -0000ffa0: 2069 6e20 7468 6573 6520 6361 7365 732e in these cases. │ │ │ │ -0000ffb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000ffd0: 3c61 2069 643d 226c 3030 3338 3822 206e 388//
    .
    │ │ │ │ -00010080: 2020 3338 393c 2f73 7061 6e3e 3c73 7061 389template <SchemeType │ │ │ │ -000100c0: 2053 4348 454d 4526 6774 3b3c 2f64 6976 SCHEME>
    .
    390< │ │ │ │ -00010120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ -00010140: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ -00010150: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename EDGE, typename MASK>
    │ │ │ │ -000101b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000101e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 391v │ │ │ │ -00010220: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ -00010230: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ -000102c0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ -000102d0: 7265 663d 2261 3031 3333 332e 6874 6d6c ref="a01333.html │ │ │ │ -000102e0: 2361 3562 3561 3533 3737 6130 3165 6234 #a5b5a5377a01eb4 │ │ │ │ -000102f0: 6261 3434 3665 3137 3465 6666 3965 3435 ba446e174eff9e45 │ │ │ │ -00010300: 6163 223e 2020 3339 323c 2f61 3e3c 2f73 ac"> 392Scheme<S │ │ │ │ -00010370: 4348 454d 4526 6774 3b3a 3a43 6f6d 7075 CHEME>::Compu │ │ │ │ -00010380: 7465 4564 6765 5665 7274 6578 4d61 736b teEdgeVertexMask │ │ │ │ -00010390: 3c2f 613e 2845 4447 4520 3c73 7061 6e20 (EDGE │ │ │ │ -000103b0: 636f 6e73 743c 2f73 7061 6e3e 2661 6d70 const& │ │ │ │ -000103c0: 3b20 2020 2020 6564 6765 2c3c 2f64 6976 ; edge,
    .
    393< │ │ │ │ -00010420: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00010430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00010440: 2020 2020 2020 2020 2020 2020 2020 204d M │ │ │ │ -00010450: 4153 4b26 616d 703b 2020 2020 2020 2020 ASK& │ │ │ │ -00010460: 2020 206d 6173 6b2c 3c2f 6469 763e 0a3c mask,
    .< │ │ │ │ -00010470: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00010480: 3e3c 6120 6964 3d22 6c30 3033 3934 2220 > 394 │ │ │ │ -000104d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000104e0: 2020 2020 2020 2020 2020 2020 3c61 2063 │ │ │ │ -00010540: 4372 6561 7365 3a3a 5275 6c65 3c2f 613e Crease::Rule │ │ │ │ -00010550: 2070 6172 656e 7452 756c 652c 3c2f 6469 parentRule,.
    395 │ │ │ │ -000105b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -000105c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000105d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000105e0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ -00010640: 3c2f 613e 2063 6869 6c64 5275 6c65 293c childRule)< │ │ │ │ -00010650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00010660: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    396 │ │ │ │ -000106d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00010720: 2033 3937 3c2f 7370 616e 3e20 2020 203c 397 < │ │ │ │ -00010730: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00010740: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    3 │ │ │ │ -000107a0: 3938 3c2f 7370 616e 3e20 2020 203c 7370 98 // If the pa │ │ │ │ -000107d0: 7265 6e74 2077 6173 2073 7065 6369 6669 rent was specifi │ │ │ │ -000107e0: 6564 206f 7220 6465 7465 726d 696e 6564 ed or determined │ │ │ │ -000107f0: 2074 6f20 6265 2053 6d6f 6f74 682c 2077 to be Smooth, w │ │ │ │ -00010800: 6520 6361 6e20 7175 6963 6b6c 7920 7265 e can quickly re │ │ │ │ -00010810: 7475 726e 3c2f 7370 616e 3e3c 2f64 6976 turn
    .
    399< │ │ │ │ -00010870: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00010890: 2f2f 2020 7769 7468 2061 2053 6d6f 6f74 // with a Smoot │ │ │ │ -000108a0: 6820 6d61 736b 2e20 204f 7468 6572 7769 h mask. Otherwi │ │ │ │ -000108b0: 7365 2074 6865 2070 6172 656e 7420 6973 se the parent is │ │ │ │ -000108c0: 2061 2063 7265 6173 6520 2d2d 2069 6620 a crease -- if │ │ │ │ -000108d0: 7468 6520 6368 696c 6420 7761 733c 2f73 the child was
    .
    400 │ │ │ │ -00010940: 2020 203c 7370 616e 2063 6c61 7373 3d22 // als │ │ │ │ -00010960: 6f20 7370 6563 6966 6965 6420 746f 2062 o specified to b │ │ │ │ -00010970: 6520 6120 6372 6561 7365 2c20 7765 2063 e a crease, we c │ │ │ │ -00010980: 616e 2071 7569 636b 6c79 2072 6574 7572 an quickly retur │ │ │ │ -00010990: 6e20 7769 7468 2061 2043 7265 6173 6520 n with a Crease │ │ │ │ -000109a0: 6d61 736b 2e3c 2f73 7061 6e3e 3c2f 6469 mask..
    401 │ │ │ │ -00010a00: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
    │ │ │ │ -00010a30: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    403< │ │ │ │ -00010ba0: 2f73 7061 6e3e 2020 2020 2020 2028 2870 /span> ((p │ │ │ │ -00010bb0: 6172 656e 7452 756c 6520 3d3d 203c 6120 arentRule == │ │ │ │ -00010c30: 4372 6561 7365 3a3a 5255 4c45 5f55 4e4b Crease::RULE_UNK │ │ │ │ -00010c40: 4e4f 574e 3c2f 613e 2920 2661 6d70 3b26 NOWN) && │ │ │ │ -00010c50: 616d 703b 2028 6564 6765 2e47 6574 5368 amp; (edge.GetSh │ │ │ │ -00010c60: 6172 706e 6573 7328 2920 266c 743b 3d20 arpness() <= │ │ │ │ -00010c70: 302e 3066 2929 2920 7b3c 2f64 6976 3e0a 0.0f))) {
    . │ │ │ │ -00010c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ -00010d50: 2034 3035 3c2f 7370 616e 3e20 2020 2020 405 │ │ │ │ -00010d60: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -00010d80: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    406< │ │ │ │ -00010de0: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    407< │ │ │ │ -00010e40: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (c │ │ │ │ -00010e70: 6869 6c64 5275 6c65 203d 3d20 3c61 2063 hildRule == C │ │ │ │ -00010ef0: 7265 6173 653a 3a52 554c 455f 4352 4541 rease::RULE_CREA │ │ │ │ -00010f00: 5345 3c2f 613e 2920 7b3c 2f64 6976 3e0a SE) {
    . │ │ │ │ -00010f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ -00010fe0: 2034 3039 3c2f 7370 616e 3e20 2020 2020 409 │ │ │ │ -00010ff0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -00011010: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    410< │ │ │ │ -00011070: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    411< │ │ │ │ -000110d0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -000110f0: 3c61 2069 643d 226c 3030 3431 3222 206e 412 //
    .
    < │ │ │ │ -00011190: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000111a0: 6e6f 223e 2020 3431 333c 2f73 7061 6e3e no"> 413 │ │ │ │ -000111b0: 2020 2020 3c73 7061 6e20 636c 6173 733d // We │ │ │ │ -000111d0: 2068 6176 6520 6120 4372 6561 7365 206f have a Crease o │ │ │ │ -000111e0: 6e20 7468 6520 7061 7265 6e74 2061 6e64 n the parent and │ │ │ │ -000111f0: 2074 6865 2063 6869 6c64 2077 6173 2065 the child was e │ │ │ │ -00011200: 6974 6865 7220 7370 6563 6966 6965 6420 ither specified │ │ │ │ -00011210: 6173 2053 6d6f 6f74 683c 2f73 7061 6e3e as Smooth │ │ │ │ -00011220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00011270: 2034 3134 3c2f 7370 616e 3e20 2020 203c 414 < │ │ │ │ -00011280: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00011290: 656e 7422 3e2f 2f20 206f 7220 7761 7320 ent">// or was │ │ │ │ -000112a0: 6e6f 7420 7370 6563 6966 6965 6420 6174 not specified at │ │ │ │ -000112b0: 2061 6c6c 202d 2d20 6465 616c 2077 6974 all -- deal wit │ │ │ │ -000112c0: 6820 7468 6520 756e 7370 6563 6966 6965 h the unspecifie │ │ │ │ -000112d0: 6420 6361 7365 2066 6972 7374 2028 6167 d case first (ag │ │ │ │ -000112e0: 6169 6e3c 2f73 7061 6e3e 3c2f 6469 763e ain
    │ │ │ │ -000112f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00011320: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 415 / │ │ │ │ -00011360: 2f20 2072 6574 7572 6e69 6e67 2061 2043 / returning a C │ │ │ │ -00011370: 7265 6173 6520 6d61 736b 2069 6620 7468 rease mask if th │ │ │ │ -00011380: 6520 6368 696c 6420 6973 2061 6c73 6f20 e child is also │ │ │ │ -00011390: 6465 7465 726d 696e 6564 2074 6f20 6265 determined to be │ │ │ │ -000113a0: 2061 2043 7265 6173 6529 2061 6e64 3c2f a Crease) and
    .
    < │ │ │ │ -000113f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00011400: 6e6f 223e 2020 3431 363c 2f73 7061 6e3e no"> 416 │ │ │ │ -00011410: 2020 2020 3c73 7061 6e20 636c 6173 733d // co │ │ │ │ -00011430: 6e74 696e 7565 2069 6620 7765 2068 6176 ntinue if we hav │ │ │ │ -00011440: 6520 6120 7472 616e 7369 7469 6f6e 2074 e a transition t │ │ │ │ -00011450: 6f20 536d 6f6f 7468 2e3c 2f73 7061 6e3e o Smooth. │ │ │ │ -00011460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000114b0: 2034 3137 3c2f 7370 616e 3e20 2020 203c 417 < │ │ │ │ -000114c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000114d0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    4 │ │ │ │ -00011530: 3138 3c2f 7370 616e 3e20 2020 203c 7370 18 // Note when │ │ │ │ -00011560: 2071 7561 6c69 6679 696e 6720 7468 6520 qualifying the │ │ │ │ -00011570: 6368 696c 6420 7468 6174 2069 6620 7468 child that if th │ │ │ │ -00011580: 6520 7061 7265 6e74 2073 6861 7270 6e65 e parent sharpne │ │ │ │ -00011590: 7373 2026 6774 3b20 312e 302c 2072 6567 ss > 1.0, reg │ │ │ │ -000115a0: 6172 646c 6573 733c 2f73 7061 6e3e 3c2f ardless.
    4 │ │ │ │ -00011600: 3139 3c2f 7370 616e 3e20 2020 203c 7370 19 // of the cr │ │ │ │ -00011630: 6561 7369 6e67 206d 6574 686f 642c 2077 easing method, w │ │ │ │ -00011640: 6865 7468 6572 2074 6865 2063 6869 6c64 hether the child │ │ │ │ -00011650: 2073 6861 7270 6e65 7373 2076 616c 7565 sharpness value │ │ │ │ -00011660: 7320 6465 6361 7920 746f 207a 6572 6f20 s decay to zero │ │ │ │ -00011670: 6973 3c2f 7370 616e 3e3c 2f64 6976 3e0a is
    . │ │ │ │ -00011680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -00011780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00011790: 6e6f 223e 2020 3432 313c 2f73 7061 6e3e no"> 421 │ │ │ │ -000117a0: 2020 2020 3c73 7061 6e20 636c 6173 733d // sh │ │ │ │ -000117c0: 6172 706e 6573 7329 2069 7320 2667 743b arpness) is > │ │ │ │ -000117d0: 2031 2e30 2c20 616e 6420 7768 656e 2063 1.0, and when c │ │ │ │ -000117e0: 6c61 6d70 6564 2074 6f20 3120 6566 6665 lamped to 1 effe │ │ │ │ -000117f0: 6374 6976 656c 7920 7969 656c 6473 2061 ctively yields a │ │ │ │ -00011800: 2066 756c 6c20 6372 6561 7365 2e3c 2f73 full crease.
    .
    422 │ │ │ │ -00011870: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
    .
    423 │ │ │ │ -000118f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (childRule │ │ │ │ -00011920: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ -000119a0: 4c45 5f55 4e4b 4e4f 574e 3c2f 613e 2920 LE_UNKNOWN) │ │ │ │ -000119b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -00011a00: 2020 3432 343c 2f73 7061 6e3e 2020 2020 424 │ │ │ │ -00011a10: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ -00011a40: 4372 6561 7365 3c2f 613e 2063 7265 6173 Crease creas │ │ │ │ -00011a50: 6528 5f6f 7074 696f 6e73 293b 3c2f 6469 e(_options);.
    425 │ │ │ │ -00011ab0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00011ac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00011ad0: 3e3c 6120 6964 3d22 6c30 3034 3236 2220 > 426 bool │ │ │ │ -00011b40: 2063 6869 6c64 4973 4372 6561 7365 203d childIsCrease = │ │ │ │ -00011b50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 false;
    .
    427 │ │ │ │ -00011bd0: 2020 2020 2020 203c 7370 616e 2063 6c61 if (pare │ │ │ │ -00011c00: 6e74 5275 6c65 203d 3d20 3c61 2063 6c61 ntRule == Cre │ │ │ │ -00011c80: 6173 653a 3a52 554c 455f 4352 4541 5345 ase::RULE_CREASE │ │ │ │ -00011c90: 3c2f 613e 2920 7b3c 2f64 6976 3e0a 3c64 ) {
    . │ │ │ │ -00011cb0: 3c61 2069 643d 226c 3030 3432 3822 206e 428 // Child un │ │ │ │ -00011d20: 6b6e 6f77 6e20 6173 2064 6566 6175 6c74 known as default │ │ │ │ -00011d30: 2076 616c 7565 2062 7574 2070 6172 656e value but paren │ │ │ │ -00011d40: 7420 5275 6c65 2073 7065 6369 6669 6564 t Rule specified │ │ │ │ -00011d50: 2061 7320 4372 6561 7365 3c2f 7370 616e as Crease
    .
    │ │ │ │ -00011db0: 2020 3432 393c 2f73 7061 6e3e 2020 2020 429 │ │ │ │ -00011dc0: 2020 2020 2020 2020 6368 696c 6449 7343 childIsC │ │ │ │ -00011dd0: 7265 6173 6520 3d20 3c73 7061 6e20 636c rease = tr │ │ │ │ -00011df0: 7565 3c2f 7370 616e 3e3b 3c2f 6469 763e ue;
    │ │ │ │ -00011e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00011e30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 430 } < │ │ │ │ -00011e60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00011e70: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else i │ │ │ │ -00011ea0: 663c 2f73 7061 6e3e 2028 6564 6765 2e47 f (edge.G │ │ │ │ -00011eb0: 6574 5368 6172 706e 6573 7328 2920 2667 etSharpness() &g │ │ │ │ -00011ec0: 743b 3d20 312e 3066 2920 7b3c 2f64 6976 t;= 1.0f) {
    .
    431< │ │ │ │ -00011f20: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00011f30: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Shar │ │ │ │ -00011f50: 706e 6573 7320 2667 743b 3d20 312e 3020 pness >= 1.0 │ │ │ │ -00011f60: 616c 7761 7973 2061 2063 7265 6173 6520 always a crease │ │ │ │ -00011f70: 2d2d 2073 6565 206e 6f74 6520 6162 6f76 -- see note abov │ │ │ │ -00011f80: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -00011f90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00011fa0: 3e3c 6120 6964 3d22 6c30 3034 3332 2220 > 432 c │ │ │ │ -00011ff0: 6869 6c64 4973 4372 6561 7365 203d 203c hildIsCrease = < │ │ │ │ -00012000: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00012010: 6f72 6422 3e74 7275 653c 2f73 7061 6e3e ord">true │ │ │ │ -00012020: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00012070: 2020 3433 333c 2f73 7061 6e3e 2020 2020 433 │ │ │ │ -00012080: 2020 2020 7d20 3c73 7061 6e20 636c 6173 } │ │ │ │ -000120a0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if │ │ │ │ -000120d0: 2863 7265 6173 652e 3c61 2063 6c61 7373 (crease.IsUnifo │ │ │ │ -00012130: 726d 3c2f 613e 2829 2920 7b3c 2f64 6976 rm()) {
    .
    434< │ │ │ │ -00012190: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -000121a0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Shar │ │ │ │ -000121c0: 706e 6573 7320 266c 743b 2031 2e30 2069 pness < 1.0 i │ │ │ │ -000121d0: 7320 6775 6172 616e 7465 6564 2074 6f20 s guaranteed to │ │ │ │ -000121e0: 6465 6361 7920 746f 2030 2e30 2066 6f72 decay to 0.0 for │ │ │ │ -000121f0: 2055 6e69 666f 726d 2063 6869 6c64 2065 Uniform child e │ │ │ │ -00012200: 6467 6573 3c2f 7370 616e 3e3c 2f64 6976 dges
    .
    435< │ │ │ │ -00012260: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00012270: 2020 6368 696c 6449 7343 7265 6173 6520 childIsCrease │ │ │ │ -00012280: 3d20 3c73 7061 6e20 636c 6173 733d 226b = false;
    .
    < │ │ │ │ -000122e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000122f0: 6e6f 223e 2020 3433 363c 2f73 7061 6e3e no"> 436 │ │ │ │ -00012300: 2020 2020 2020 2020 7d20 3c73 7061 6e20 } else │ │ │ │ -00012330: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -00012380: 2020 3433 373c 2f73 7061 6e3e 2020 2020 437 │ │ │ │ -00012390: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ -000123b0: 2020 5368 6172 706e 6573 7320 266c 743b Sharpness < │ │ │ │ -000123c0: 3d20 312e 3020 646f 6573 206e 6f74 206e = 1.0 does not n │ │ │ │ -000123d0: 6563 6573 7361 7269 6c79 2064 6563 6179 ecessarily decay │ │ │ │ -000123e0: 2074 6f20 302e 3020 666f 7220 626f 7468 to 0.0 for both │ │ │ │ -000123f0: 2063 6869 6c64 2065 6467 6573 2e2e 2e3c child edges...< │ │ │ │ -00012400: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00012420: 6120 6964 3d22 6c30 3034 3338 2220 6e61 a id="l00438" na │ │ │ │ -00012430: 6d65 3d22 6c30 3034 3338 223e 3c2f 613e me="l00438"> │ │ │ │ -00012440: 3c73 7061 6e20 636c 6173 733d 226c 696e 438 float cEdgeSharpne │ │ │ │ -000124a0: 7373 5b32 5d3b 3c2f 6469 763e 0a3c 6469 ss[2];
    .< │ │ │ │ -000124c0: 6120 6964 3d22 6c30 3034 3339 2220 6e61 a id="l00439" na │ │ │ │ -000124d0: 6d65 3d22 6c30 3034 3339 223e 3c2f 613e me="l00439"> │ │ │ │ -000124e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 439 edg │ │ │ │ -00012510: 652e 4765 7443 6869 6c64 5368 6172 706e e.GetChildSharpn │ │ │ │ -00012520: 6573 7365 7328 6372 6561 7365 2c20 6345 esses(crease, cE │ │ │ │ -00012530: 6467 6553 6861 7270 6e65 7373 293b 3c2f dgeSharpness);.
    4 │ │ │ │ -00012590: 3430 3c2f 7370 616e 3e20 2020 2020 2020 40 │ │ │ │ -000125a0: 2020 2020 2063 6869 6c64 4973 4372 6561 childIsCrea │ │ │ │ -000125b0: 7365 203d 2028 6345 6467 6553 6861 7270 se = (cEdgeSharp │ │ │ │ -000125c0: 6e65 7373 5b30 5d20 2667 743b 2030 2e30 ness[0] > 0.0 │ │ │ │ -000125d0: 6629 2026 616d 703b 2661 6d70 3b20 2863 f) && (c │ │ │ │ -000125e0: 4564 6765 5368 6172 706e 6573 735b 315d EdgeSharpness[1] │ │ │ │ -000125f0: 2026 6774 3b20 302e 3066 293b 3c2f 6469 > 0.0f);.
    441 │ │ │ │ -00012650: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ │ -00012660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000126b0: 2034 3432 3c2f 7370 616e 3e20 2020 2020 442 │ │ │ │ -000126c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ -000126e0: 2f73 7061 6e3e 2028 6368 696c 6449 7343 /span> (childIsC │ │ │ │ -000126f0: 7265 6173 6529 207b 3c2f 6469 763e 0a3c rease) {
    .< │ │ │ │ -00012700: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00012710: 3e3c 6120 6964 3d22 6c30 3034 3433 2220 > 443 a │ │ │ │ -00012760: 7373 6967 6e43 7265 6173 654d 6173 6b46 ssignCreaseMaskF │ │ │ │ -00012770: 6f72 4564 6765 2865 6467 652c 206d 6173 orEdge(edge, mas │ │ │ │ -00012780: 6b29 3b3c 2f64 6976 3e0a 3c64 6976 2063 k);
    .
    444 │ │ │ │ -000127e0: 2020 2020 2020 2020 2020 3c73 7061 6e20 return;
    .
    445 │ │ │ │ -00012870: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ │ -00012890: 6120 6964 3d22 6c30 3034 3436 2220 6e61 a id="l00446" na │ │ │ │ -000128a0: 6d65 3d22 6c30 3034 3436 223e 3c2f 613e me="l00446"> │ │ │ │ -000128b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 446 }
    .< │ │ │ │ -000128f0: 6120 6964 3d22 6c30 3034 3437 2220 6e61 a id="l00447" na │ │ │ │ -00012900: 6d65 3d22 6c30 3034 3437 223e 3c2f 613e me="l00447"> │ │ │ │ -00012910: 3c73 7061 6e20 636c 6173 733d 226c 696e 447
    .
    448 │ │ │ │ -00012990: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ -000129b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00012a00: 2034 3439 3c2f 7370 616e 3e20 2020 203c 449 < │ │ │ │ -00012a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00012a20: 656e 7422 3e2f 2f20 2057 6520 6172 6520 ent">// We are │ │ │ │ -00012a30: 6e6f 7720 6c65 6674 2077 6974 6820 7468 now left with th │ │ │ │ -00012a40: 6520 4372 6561 7365 2d74 6f2d 536d 6f6f e Crease-to-Smoo │ │ │ │ -00012a50: 7468 2063 6173 6520 2d2d 2063 6f6d 7075 th case -- compu │ │ │ │ -00012a60: 7465 2074 6865 2053 6d6f 6f74 6820 6d61 te the Smooth ma │ │ │ │ -00012a70: 736b 3c2f 7370 616e 3e3c 2f64 6976 3e0a sk
    . │ │ │ │ -00012a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ -00012b90: 2020 3435 313c 2f73 7061 6e3e 2020 2020 451 │ │ │ │ -00012ba0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -00012bc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00012c10: 3435 323c 2f73 7061 6e3e 2020 2020 3c73 452 // A genera │ │ │ │ -00012c40: 6c20 636f 6d62 696e 6174 696f 6e20 6f66 l combination of │ │ │ │ -00012c50: 2073 6570 6172 6174 656c 7920 6173 7369 separately assi │ │ │ │ -00012c60: 676e 6564 206d 6173 6b73 2068 6572 6520 gned masks here │ │ │ │ -00012c70: 2861 7320 646f 6e65 2069 6e20 7468 6520 (as done in the │ │ │ │ -00012c80: 7665 7274 6578 2d3c 2f73 7061 6e3e 3c2f vertex-.
    4 │ │ │ │ -00012ce0: 3533 3c2f 7370 616e 3e20 2020 203c 7370 53 // vertex ca │ │ │ │ -00012d10: 7365 2920 6973 206f 7665 726b 696c 6c20 se) is overkill │ │ │ │ -00012d20: 2d2d 2074 7269 7669 616c 6c79 2063 6f6d -- trivially com │ │ │ │ -00012d30: 6269 6e65 2074 6865 2030 2e35 6620 7665 bine the 0.5f ve │ │ │ │ -00012d40: 7274 6578 2063 6f65 6666 6963 6965 6e74 rtex coefficient │ │ │ │ -00012d50: 2066 6f72 3c2f 7370 616e 3e3c 2f64 6976 for
    .
    454< │ │ │ │ -00012db0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00012dd0: 2f2f 2020 7468 6520 4372 6561 7365 206f // the Crease o │ │ │ │ -00012de0: 6620 7468 6520 7061 7265 6e74 2077 6974 f the parent wit │ │ │ │ -00012df0: 6820 7468 6520 7665 7274 6578 2077 6569 h the vertex wei │ │ │ │ -00012e00: 6768 7473 2061 6e64 2061 7474 656e 7561 ghts and attenua │ │ │ │ -00012e10: 7465 2074 6865 2066 6163 6520 7765 6967 te the face weig │ │ │ │ -00012e20: 6874 733c 2f73 7061 6e3e 3c2f 6469 763e hts
    │ │ │ │ -00012e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00012e60: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 455 / │ │ │ │ -00012ea0: 2f20 2061 6363 6f72 6469 6e67 6c79 2e3c / accordingly.< │ │ │ │ -00012eb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00012ed0: 6120 6964 3d22 6c30 3034 3536 2220 6e61 a id="l00456" na │ │ │ │ -00012ee0: 6d65 3d22 6c30 3034 3536 223e 3c2f 613e me="l00456"> │ │ │ │ -00012ef0: 3c73 7061 6e20 636c 6173 733d 226c 696e 456 //
    .
    457 │ │ │ │ -00012f90: 2020 2061 7373 6967 6e53 6d6f 6f74 684d assignSmoothM │ │ │ │ -00012fa0: 6173 6b46 6f72 4564 6765 2865 6467 652c askForEdge(edge, │ │ │ │ -00012fb0: 206d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 mask);
    . │ │ │ │ -00012fd0: 3c61 2069 643d 226c 3030 3435 3822 206e 458
    .
    459 │ │ │ │ -00013070: 2020 3c73 7061 6e20 636c 6173 733d 226b typedef< │ │ │ │ -00013090: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ │ │ │ │ -000130b0: 656e 616d 653c 2f73 7061 6e3e 204d 4153 ename MAS │ │ │ │ -000130c0: 4b3a 3a57 6569 6768 7420 5765 6967 6874 K::Weight Weight │ │ │ │ -000130d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00013120: 2020 3436 303c 2f73 7061 6e3e 203c 2f64 460 .
    46 │ │ │ │ -00013180: 313c 2f73 7061 6e3e 2020 2020 5765 6967 1 Weig │ │ │ │ -00013190: 6874 2070 5765 6967 6874 203d 2065 6467 ht pWeight = edg │ │ │ │ -000131a0: 652e 4765 7453 6861 7270 6e65 7373 2829 e.GetSharpness() │ │ │ │ -000131b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00013200: 2020 3436 323c 2f73 7061 6e3e 2020 2020 462 │ │ │ │ -00013210: 5765 6967 6874 2063 5765 6967 6874 203d Weight cWeight = │ │ │ │ -00013220: 2031 2e30 6620 2d20 7057 6569 6768 743b 1.0f - pWeight; │ │ │ │ -00013230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00013280: 2034 3633 3c2f 7370 616e 3e20 3c2f 6469 463 .
    464 │ │ │ │ -000132e0: 3c2f 7370 616e 3e20 2020 206d 6173 6b2e mask. │ │ │ │ -000132f0: 5665 7274 6578 5765 6967 6874 2830 2920 VertexWeight(0) │ │ │ │ -00013300: 3d20 7057 6569 6768 7420 2a20 302e 3566 = pWeight * 0.5f │ │ │ │ -00013310: 202b 2063 5765 6967 6874 202a 206d 6173 + cWeight * mas │ │ │ │ -00013320: 6b2e 5665 7274 6578 5765 6967 6874 2830 k.VertexWeight(0 │ │ │ │ -00013330: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    465 │ │ │ │ -00013390: 206d 6173 6b2e 5665 7274 6578 5765 6967 mask.VertexWeig │ │ │ │ -000133a0: 6874 2831 2920 3d20 7057 6569 6768 7420 ht(1) = pWeight │ │ │ │ -000133b0: 2a20 302e 3566 202b 2063 5765 6967 6874 * 0.5f + cWeight │ │ │ │ -000133c0: 202a 206d 6173 6b2e 5665 7274 6578 5765 * mask.VertexWe │ │ │ │ -000133d0: 6967 6874 2831 293b 3c2f 6469 763e 0a3c ight(1);
    .< │ │ │ │ -000133e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000133f0: 3e3c 6120 6964 3d22 6c30 3034 3636 2220 > 466
    .
    467 │ │ │ │ -00013490: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -000134b0: 3c2f 7370 616e 3e20 6661 6365 436f 756e faceCoun │ │ │ │ -000134c0: 7420 3d20 6d61 736b 2e47 6574 4e75 6d46 t = mask.GetNumF │ │ │ │ -000134d0: 6163 6557 6569 6768 7473 2829 3b3c 2f64 aceWeights();.
    46 │ │ │ │ -00013530: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 for │ │ │ │ -00013560: 2028 3c73 7061 6e20 636c 6173 733d 226b (int< │ │ │ │ -00013580: 2f73 7061 6e3e 2069 203d 2030 3b20 6920 /span> i = 0; i │ │ │ │ -00013590: 266c 743b 2066 6163 6543 6f75 6e74 3b20 < faceCount; │ │ │ │ -000135a0: 2b2b 6929 207b 3c2f 6469 763e 0a3c 6469 ++i) {
    .< │ │ │ │ -000135c0: 6120 6964 3d22 6c30 3034 3639 2220 6e61 a id="l00469" na │ │ │ │ -000135d0: 6d65 3d22 6c30 3034 3639 223e 3c2f 613e me="l00469"> │ │ │ │ -000135e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 469 mask.Fa │ │ │ │ -00013610: 6365 5765 6967 6874 2869 2920 2a3d 2063 ceWeight(i) *= c │ │ │ │ -00013620: 5765 6967 6874 3b3c 2f64 6976 3e0a 3c64 Weight;
    . │ │ │ │ -00013640: 3c61 2069 643d 226c 3030 3437 3022 206e 470 }
    . │ │ │ │ -000136a0: 3c61 2069 643d 226c 3030 3437 3122 206e 471}
    .
    │ │ │ │ -000136f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00013760: 6120 6964 3d22 6c30 3034 3733 2220 6e61 a id="l00473" na │ │ │ │ -00013770: 6d65 3d22 6c30 3034 3733 223e 3c2f 613e me="l00473"> │ │ │ │ -00013780: 3c73 7061 6e20 636c 6173 733d 226c 696e 473// │ │ │ │ -000137c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00013810: 2034 3734 3c2f 7370 616e 3e3c 7370 616e 474// The computa │ │ │ │ -00013840: 7469 6f6e 206f 6620 6120 7665 7274 6578 tion of a vertex │ │ │ │ -00013850: 2d76 6572 7465 7820 6d61 736b 2072 6571 -vertex mask req │ │ │ │ -00013860: 7569 7265 7320 696e 7370 6563 7469 6f6e uires inspection │ │ │ │ -00013870: 206f 6620 6372 6561 7369 6e67 2073 6861 of creasing sha │ │ │ │ -00013880: 7270 6e65 7373 2076 616c 7565 733c 2f73 rpness values
    .
    475< │ │ │ │ -000138f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00013900: 656e 7422 3e2f 2f20 2074 6f20 6465 7465 ent">// to dete │ │ │ │ -00013910: 726d 696e 6520 7768 6174 2073 7562 6469 rmine what subdi │ │ │ │ -00013920: 7669 7369 6f6e 2052 756c 6573 2061 7070 vision Rules app │ │ │ │ -00013930: 6c79 2074 6f20 7468 6520 7061 7265 6e74 ly to the parent │ │ │ │ -00013940: 2061 6e64 2069 7473 2063 6869 6c64 2076 and its child v │ │ │ │ -00013950: 6572 7465 782c 2061 6e64 2061 6c73 6f20 ertex, and also │ │ │ │ -00013960: 746f 3c2f 7370 616e 3e3c 2f64 6976 3e0a to
    . │ │ │ │ -00013970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000139a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 476// de │ │ │ │ -000139e0: 7465 6374 2061 6e64 2061 7070 6c79 2061 tect and apply a │ │ │ │ -000139f0: 2074 7261 6e73 6974 696f 6e20 6265 7477 transition betw │ │ │ │ -00013a00: 6565 6e20 7477 6f20 6469 6666 6572 696e een two differin │ │ │ │ -00013a10: 6720 5275 6c65 732e 2020 5573 696e 6720 g Rules. Using │ │ │ │ -00013a20: 7468 6520 7072 6f74 6563 7465 6420 6d65 the protected me │ │ │ │ -00013a30: 7468 6f64 7320 746f 3c2f 7370 616e 3e3c thods to< │ │ │ │ -00013a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00013a90: 3437 373c 2f73 7061 6e3e 3c73 7061 6e20 477 │ │ │ │ -00013ab0: 2f2f 2020 6173 7369 676e 2073 7065 6369 // assign speci │ │ │ │ -00013ac0: 6669 6320 6d61 736b 732c 2074 6869 7320 fic masks, this │ │ │ │ -00013ad0: 696d 706c 656d 656e 7461 7469 6f6e 2073 implementation s │ │ │ │ -00013ae0: 686f 756c 6420 7365 7276 6520 616c 6c20 hould serve all │ │ │ │ -00013af0: 6e6f 6e2d 6c69 6e65 6172 2073 6368 656d non-linear schem │ │ │ │ -00013b00: 6573 2028 6375 7272 656e 746c 793c 2f73 es (currently
    .
    478< │ │ │ │ -00013b70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00013b80: 656e 7422 3e2f 2f20 2043 6174 6d61 726b ent">// Catmark │ │ │ │ -00013b90: 2061 6e64 204c 6f6f 7029 2061 6e64 206f and Loop) and o │ │ │ │ -00013ba0: 6e6c 7920 6e65 6564 7320 746f 2062 6520 nly needs to be │ │ │ │ -00013bb0: 7370 6563 6961 6c69 7a65 6420 666f 7220 specialized for │ │ │ │ -00013bc0: 4269 6c69 6e65 6172 2074 6f20 7265 6d6f Bilinear to remo │ │ │ │ -00013bd0: 7665 2061 6c6c 2075 6e6e 6563 6573 7361 ve all unnecessa │ │ │ │ -00013be0: 7279 3c2f 7370 616e 3e3c 2f64 6976 3e0a ry
    . │ │ │ │ -00013bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ -00013ce0: 2020 3438 303c 2f73 7061 6e3e 3c73 7061 480//
    .
    481< │ │ │ │ -00013d60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -00013d80: 5468 6520 696d 706c 656d 656e 7461 7469 The implementati │ │ │ │ -00013d90: 6f6e 2068 6572 6520 6973 2073 6c69 6768 on here is sligh │ │ │ │ -00013da0: 746c 7920 636f 6d70 6c69 6361 7465 6420 tly complicated │ │ │ │ -00013db0: 6279 2063 6f6d 6269 6e69 6e67 2074 776f by combining two │ │ │ │ -00013dc0: 2073 6365 6e61 7269 6f73 2069 6e74 6f20 scenarios into │ │ │ │ -00013dd0: 6f6e 6520 2d2d 3c2f 7370 616e 3e3c 2f64 one --.
    48 │ │ │ │ -00013e30: 323c 2f73 7061 6e3e 3c73 7061 6e20 636c 2// │ │ │ │ -00013e50: 2020 6569 7468 6572 2074 6865 2063 616c either the cal │ │ │ │ -00013e60: 6c65 7220 6b6e 6f77 7320 7468 6520 7061 ler knows the pa │ │ │ │ -00013e70: 7265 6e74 2061 6e64 2063 6869 6c64 2072 rent and child r │ │ │ │ -00013e80: 756c 6573 2061 6e64 2070 726f 7669 6465 ules and provide │ │ │ │ -00013e90: 7320 7468 656d 2c20 6f72 2074 6865 7920 s them, or they │ │ │ │ -00013ea0: 646f 6e26 2333 393b 7420 616e 643c 2f73 don't and
    .
    483< │ │ │ │ -00013f10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00013f20: 656e 7422 3e2f 2f20 2074 6865 2052 756c ent">// the Rul │ │ │ │ -00013f30: 6573 2068 6176 6520 746f 2062 6520 6465 es have to be de │ │ │ │ -00013f40: 7465 726d 696e 6564 2066 726f 6d20 7368 termined from sh │ │ │ │ -00013f50: 6172 706e 6573 7320 7661 6c75 6573 2e20 arpness values. │ │ │ │ -00013f60: 2045 7665 6e20 7768 656e 2074 6865 2052 Even when the R │ │ │ │ -00013f70: 756c 6573 2061 7265 206b 6e6f 776e 2061 ules are known a │ │ │ │ -00013f80: 6e64 3c2f 7370 616e 3e3c 2f64 6976 3e0a nd
    . │ │ │ │ -00013f90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -00013fc0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 484// pr │ │ │ │ -00014000: 6f76 6964 6564 2074 686f 7567 682c 2074 ovided though, t │ │ │ │ -00014010: 6865 7265 2061 7265 2063 6173 6573 2077 here are cases w │ │ │ │ -00014020: 6865 7265 2074 6865 2070 6172 656e 7420 here the parent │ │ │ │ -00014030: 616e 6420 6368 696c 6420 7368 6172 706e and child sharpn │ │ │ │ -00014040: 6573 7320 7661 6c75 6573 206e 6565 6420 ess values need │ │ │ │ -00014050: 746f 2062 653c 2f73 7061 6e3e 3c2f 6469 to be.
    485 │ │ │ │ -000140b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -000140d0: 2069 6465 6e74 6966 6965 642c 2073 6f20 identified, so │ │ │ │ -000140e0: 6163 636f 756e 7469 6e67 2066 6f72 2074 accounting for t │ │ │ │ -000140f0: 6865 2075 6e6b 6e6f 776e 2052 756c 6573 he unknown Rules │ │ │ │ -00014100: 2074 6f6f 2069 7320 6e6f 7420 6d75 6368 too is not much │ │ │ │ -00014110: 206f 6620 616e 2061 6464 6564 2063 6f6d of an added com │ │ │ │ -00014120: 706c 6963 6174 696f 6e2e 3c2f 7370 616e plication.
    .
    │ │ │ │ -00014180: 2020 3438 363c 2f73 7061 6e3e 3c73 7061 486//
    │ │ │ │ +00009d20: 2020 2020 2020 2020 7d3c 2f64 6976 3e0a }
    . │ │ │ │ +00009d30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    249< │ │ │ │ +00009e30: 2f73 7061 6e3e 2020 2020 2020 2020 7d3c /span> }< │ │ │ │ +00009e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00009e90: 3235 303c 2f73 7061 6e3e 2020 2020 7d3c 250 }< │ │ │ │ +00009ea0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ │ +00009ec0: 6120 6964 3d22 6c30 3032 3531 2220 6e61 a id="l00251" na │ │ │ │ +00009ed0: 6d65 3d22 6c30 3032 3531 223e 3c2f 613e me="l00251"> │ │ │ │ +00009ee0: 3c73 7061 6e20 636c 6173 733d 226c 696e 251
    .
    307 │ │ │ │ +00009f60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +00009f80: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +00009fb0: 2053 5243 5f42 5546 4645 522c 203c 7370 SRC_BUFFER, typename DST_BUFFER,.
    3 │ │ │ │ +0000a040: 3038 3c2f 7370 616e 3e20 2020 2020 2020 08 │ │ │ │ +0000a050: 2020 2020 2020 203c 7370 616e 2063 6c61 typ │ │ │ │ +0000a070: 656e 616d 653c 2f73 7061 6e3e 2053 5445 ename STE │ │ │ │ +0000a080: 4e43 494c 5f54 4142 4c45 2c20 3c73 7061 NCIL_TABLE, typename DEVICE_CONTEXT │ │ │ │ +0000a0c0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    │ │ │ │ +0000a110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000a140: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ +0000a1a0: 3330 393c 2f61 3e3c 2f73 7061 6e3e 2020 309 │ │ │ │ +0000a1b0: 2020 3c73 7061 6e20 636c 6173 733d 226b static │ │ │ │ +0000a1f0: 626f 6f6c 3c2f 7370 616e 3e20 3c61 2063 bool Eva │ │ │ │ +0000a250: 6c53 7465 6e63 696c 733c 2f61 3e28 3c2f lStencils(.
    3 │ │ │ │ +0000a2b0: 3130 3c2f 7370 616e 3e20 2020 2020 2020 10 │ │ │ │ +0000a2c0: 2053 5243 5f42 5546 4645 5220 2a73 7263 SRC_BUFFER *src │ │ │ │ +0000a2d0: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ +0000a310: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +0000a330: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +0000a340: 703b 7372 6344 6573 632c 3c2f 6469 763e p;srcDesc,
    │ │ │ │ +0000a350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000a380: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 311 DST │ │ │ │ +0000a3b0: 5f42 5546 4645 5220 2a64 7374 4275 6666 _BUFFER *dstBuff │ │ │ │ +0000a3c0: 6572 2c20 3c61 2063 6c61 7373 3d22 636f er, BufferDescripto │ │ │ │ +0000a400: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +0000a420: 743c 2f73 7061 6e3e 2026 616d 703b 6473 t &ds │ │ │ │ +0000a430: 7444 6573 632c 3c2f 6469 763e 0a3c 6469 tDesc,
    .< │ │ │ │ +0000a450: 6120 6964 3d22 6c30 3033 3132 2220 6e61 a id="l00312" na │ │ │ │ +0000a460: 6d65 3d22 6c30 3033 3132 223e 3c2f 613e me="l00312"> │ │ │ │ +0000a470: 3c73 7061 6e20 636c 6173 733d 226c 696e 312 DST_BUF │ │ │ │ +0000a4a0: 4645 5220 2a64 7542 7566 6665 722c 2020 FER *duBuffer, │ │ │ │ +0000a4b0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +0000a4e0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &duDesc │ │ │ │ +0000a520: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0000a570: 2020 3331 333c 2f73 7061 6e3e 2020 2020 313 │ │ │ │ +0000a580: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +0000a590: 6476 4275 6666 6572 2c20 203c 6120 636c dvBuffer, BufferDe │ │ │ │ +0000a5d0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +0000a600: 2661 6d70 3b64 7644 6573 632c 3c2f 6469 &dvDesc,.
    314 │ │ │ │ +0000a660: 3c2f 7370 616e 3e20 2020 2020 2020 2053 S │ │ │ │ +0000a670: 5445 4e43 494c 5f54 4142 4c45 203c 7370 TENCIL_TABLE const │ │ │ │ +0000a6a0: 2a73 7465 6e63 696c 5461 626c 652c 3c2f *stencilTable,.
    3 │ │ │ │ +0000a700: 3135 3c2f 7370 616e 3e20 2020 2020 2020 15 │ │ │ │ +0000a710: 203c 6120 636c 6173 733d 2263 6f64 6520 CLE │ │ │ │ +0000a740: 7661 6c75 6174 6f72 3c2f 613e 203c 7370 valuator const │ │ │ │ +0000a770: 2a69 6e73 7461 6e63 652c 3c2f 6469 763e *instance,
    │ │ │ │ +0000a780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000a7b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 316 DEV │ │ │ │ +0000a7e0: 4943 455f 434f 4e54 4558 5420 6465 7669 ICE_CONTEXT devi │ │ │ │ +0000a7f0: 6365 436f 6e74 6578 742c 3c2f 6469 763e ceContext,
    │ │ │ │ +0000a800: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000a830: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 317 unsigned< │ │ │ │ +0000a880: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int numS │ │ │ │ +0000a8b0: 7461 7274 4576 656e 7473 3d30 2c3c 2f64 tartEvents=0,.
    31 │ │ │ │ +0000a910: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0000a920: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cl_event* sta │ │ │ │ +0000a950: 7274 4576 656e 7473 3d4e 554c 4c2c 3c2f rtEvents=NULL,.
    3 │ │ │ │ +0000a9b0: 3139 3c2f 7370 616e 3e20 2020 2020 2020 19 │ │ │ │ +0000a9c0: 2063 6c5f 6576 656e 742a 2065 6e64 4576 cl_event* endEv │ │ │ │ +0000a9d0: 656e 743d 4e55 4c4c 2920 7b3c 2f64 6976 ent=NULL) {
    .
    320< │ │ │ │ +0000aa30: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0000aa50: 3c61 2069 643d 226c 3030 3332 3122 206e 321 if (i │ │ │ │ +0000aac0: 6e73 7461 6e63 6529 207b 3c2f 6469 763e nstance) {
    │ │ │ │ +0000aad0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000ab00: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 322 │ │ │ │ +0000ab30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +0000ab50: 6e3c 2f73 7061 6e3e 2069 6e73 7461 6e63 n instanc │ │ │ │ +0000ab60: 652d 2667 743b 3c61 2063 6c61 7373 3d22 e->EvalStenc │ │ │ │ +0000abc0: 696c 733c 2f61 3e28 7372 6342 7566 6665 ils(srcBuffe │ │ │ │ +0000abd0: 722c 2073 7263 4465 7363 2c3c 2f64 6976 r, srcDesc,
    .
    323< │ │ │ │ +0000ac30: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0000ac40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ac50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ac60: 6473 7442 7566 6665 722c 2064 7374 4465 dstBuffer, dstDe │ │ │ │ +0000ac70: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    324 │ │ │ │ +0000acd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ace0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000acf0: 2020 2020 2020 2020 6475 4275 6666 6572 duBuffer │ │ │ │ +0000ad00: 2c20 2064 7544 6573 632c 3c2f 6469 763e , duDesc,
    │ │ │ │ +0000ad10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000ad40: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 325 │ │ │ │ +0000ad70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ad80: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +0000ad90: 7642 7566 6665 722c 2020 6476 4465 7363 vBuffer, dvDesc │ │ │ │ +0000ada0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0000adf0: 2020 3332 363c 2f73 7061 6e3e 2020 2020 326 │ │ │ │ +0000ae00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ae10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ae20: 2020 2020 2020 7374 656e 6369 6c54 6162 stencilTab │ │ │ │ +0000ae30: 6c65 2c3c 2f64 6976 3e0a 3c64 6976 2063 le,
    .
    327 │ │ │ │ +0000ae90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000aea0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000aeb0: 2020 2020 2020 2020 6e75 6d53 7461 7274 numStart │ │ │ │ +0000aec0: 4576 656e 7473 2c20 7374 6172 7445 7665 Events, startEve │ │ │ │ +0000aed0: 6e74 732c 2065 6e64 4576 656e 7429 3b3c nts, endEvent);< │ │ │ │ +0000aee0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000af30: 3332 383c 2f73 7061 6e3e 2020 2020 2020 328 │ │ │ │ +0000af40: 2020 7d20 3c73 7061 6e20 636c 6173 733d } el │ │ │ │ +0000af60: 7365 3c2f 7370 616e 3e20 7b3c 2f64 6976 se {
    .
    329< │ │ │ │ +0000afc0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0000afd0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Creat │ │ │ │ +0000aff0: 6520 616e 2069 6e73 7461 6e63 6520 6f6e e an instance on │ │ │ │ +0000b000: 2064 656d 616e 6420 2873 6c6f 7729 3c2f demand (slow)
    .
    < │ │ │ │ +0000b050: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000b060: 6e6f 223e 2020 3333 303c 2f73 7061 6e3e no"> 330 │ │ │ │ +0000b070: 2020 2020 2020 2020 2020 2020 696e 7374 inst │ │ │ │ +0000b080: 616e 6365 203d 203c 6120 636c 6173 733d ance = Create(srcDesc, dstD │ │ │ │ +0000b0f0: 6573 632c 2064 7544 6573 632c 2064 7644 esc, duDesc, dvD │ │ │ │ +0000b100: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    331 │ │ │ │ +0000b160: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b170: 2020 2020 2020 2020 2020 2020 2064 6576 dev │ │ │ │ +0000b180: 6963 6543 6f6e 7465 7874 293b 3c2f 6469 iceContext);.
    332 │ │ │ │ +0000b1e0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000b1f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +0000b210: 2f73 7061 6e3e 2028 696e 7374 616e 6365 /span> (instance │ │ │ │ +0000b220: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    333 │ │ │ │ +0000b280: 2020 2020 2020 2020 2020 2020 2020 3c73 bool r = instance │ │ │ │ +0000b2c0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->EvalStenci │ │ │ │ +0000b320: 6c73 3c2f 613e 2873 7263 4275 6666 6572 ls(srcBuffer │ │ │ │ +0000b330: 2c20 7372 6344 6573 632c 3c2f 6469 763e , srcDesc,
    │ │ │ │ +0000b340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000b370: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 334 │ │ │ │ +0000b3a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b3b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b3c0: 2020 2020 2064 7374 4275 6666 6572 2c20 dstBuffer, │ │ │ │ +0000b3d0: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ +0000b3e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000b3f0: 3e3c 6120 6964 3d22 6c30 3033 3335 2220 > 335 │ │ │ │ +0000b440: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b450: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b460: 2020 2064 7542 7566 6665 722c 2020 6475 duBuffer, du │ │ │ │ +0000b470: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0000b4b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000b4c0: 6e6f 223e 2020 3333 363c 2f73 7061 6e3e no"> 336 │ │ │ │ +0000b4d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b4e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b4f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b500: 6476 4275 6666 6572 2c20 2064 7644 6573 dvBuffer, dvDes │ │ │ │ +0000b510: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    337 │ │ │ │ +0000b570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b580: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b590: 2020 2020 2020 2020 2020 2020 2073 7465 ste │ │ │ │ +0000b5a0: 6e63 696c 5461 626c 652c 3c2f 6469 763e ncilTable,
    │ │ │ │ +0000b5b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000b5e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 338 │ │ │ │ +0000b610: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b620: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b630: 2020 2020 206e 756d 5374 6172 7445 7665 numStartEve │ │ │ │ +0000b640: 6e74 732c 2073 7461 7274 4576 656e 7473 nts, startEvents │ │ │ │ +0000b650: 2c20 656e 6445 7665 6e74 293b 3c2f 6469 , endEvent);.
    339 │ │ │ │ +0000b6b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000b6c0: 2020 2020 2020 203c 7370 616e 2063 6c61 del │ │ │ │ +0000b6e0: 6574 653c 2f73 7061 6e3e 2069 6e73 7461 ete insta │ │ │ │ +0000b6f0: 6e63 653b 3c2f 6469 763e 0a3c 6469 7620 nce;
    .
    340 │ │ │ │ +0000b750: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +0000b760: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000b770: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +0000b780: 2f73 7061 6e3e 2072 3b3c 2f64 6976 3e0a /span> r;
    . │ │ │ │ +0000b790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ +0000b840: 2020 3334 323c 2f73 7061 6e3e 2020 2020 342 │ │ │ │ +0000b850: 2020 2020 2020 2020 3c73 7061 6e20 636c return │ │ │ │ +0000b880: 3c73 7061 6e20 636c 6173 733d 226b 6579 false;
    .
    343 │ │ │ │ +0000b900: 2020 2020 2020 7d3c 2f64 6976 3e0a 3c64 }
    . │ │ │ │ +0000b920: 3c61 2069 643d 226c 3030 3334 3422 206e 344 }
    ..
    3 │ │ │ │ +0000b9c0: 3435 3c2f 7370 616e 3e20 3c2f 6469 763e 45
    │ │ │ │ +0000b9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000ba00: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 419 t │ │ │ │ +0000ba40: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ │ +0000ba50: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ │ +0000ba70: 653c 2f73 7061 6e3e 2053 5243 5f42 5546 e SRC_BUF │ │ │ │ +0000ba80: 4645 522c 203c 7370 616e 2063 6c61 7373 FER, typen │ │ │ │ +0000baa0: 616d 653c 2f73 7061 6e3e 2044 5354 5f42 ame DST_B │ │ │ │ +0000bab0: 5546 4645 522c 3c2f 6469 763e 0a3c 6469 UFFER,
    .< │ │ │ │ +0000bad0: 6120 6964 3d22 6c30 3034 3230 2220 6e61 a id="l00420" na │ │ │ │ +0000bae0: 6d65 3d22 6c30 3034 3230 223e 3c2f 613e me="l00420"> │ │ │ │ +0000baf0: 3c73 7061 6e20 636c 6173 733d 226c 696e 420 < │ │ │ │ +0000bb20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000bb30: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    STENCIL_TAB │ │ │ │ +0000bb50: 4c45 2c20 3c73 7061 6e20 636c 6173 733d LE, typena │ │ │ │ +0000bb70: 6d65 3c2f 7370 616e 3e20 4445 5649 4345 me DEVICE │ │ │ │ +0000bb80: 5f43 4f4e 5445 5854 2667 743b 3c2f 6469 _CONTEXT>.
    .
    421< │ │ │ │ +0000bc70: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +0000bc90: 7374 6174 6963 3c2f 7370 616e 3e20 3c73 static bool EvalStencil │ │ │ │ +0000bd20: 733c 2f61 3e28 3c2f 6469 763e 0a3c 6469 s(
    .< │ │ │ │ +0000bd40: 6120 6964 3d22 6c30 3034 3232 2220 6e61 a id="l00422" na │ │ │ │ +0000bd50: 6d65 3d22 6c30 3034 3232 223e 3c2f 613e me="l00422"> │ │ │ │ +0000bd60: 3c73 7061 6e20 636c 6173 733d 226c 696e 422 SRC_BUF │ │ │ │ +0000bd90: 4645 5220 2a73 7263 4275 6666 6572 2c20 FER *srcBuffer, │ │ │ │ +0000bda0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +0000bdd0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &srcDes │ │ │ │ +0000be10: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    423 │ │ │ │ +0000be70: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ +0000be80: 2a64 7374 4275 6666 6572 2c20 3c61 2063 *dstBuffer, BufferD │ │ │ │ +0000bec0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +0000bef0: 2026 616d 703b 6473 7444 6573 632c 3c2f &dstDesc,.
    4 │ │ │ │ +0000bf50: 3234 3c2f 7370 616e 3e20 2020 2020 2020 24 │ │ │ │ +0000bf60: 2044 5354 5f42 5546 4645 5220 2a64 7542 DST_BUFFER *duB │ │ │ │ +0000bf70: 7566 6665 722c 2020 3c61 2063 6c61 7373 uffer, BufferDescr │ │ │ │ +0000bfb0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +0000bfd0: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +0000bfe0: 703b 6475 4465 7363 2c3c 2f64 6976 3e0a p;duDesc,
    . │ │ │ │ +0000bff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    426 │ │ │ │ +0000c130: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ +0000c140: 5220 2a64 7575 4275 6666 6572 2c20 3c61 R *duuBuffer, Buffe │ │ │ │ +0000c180: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +0000c190: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &duuDesc, │ │ │ │ +0000c1c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000c210: 2034 3237 3c2f 7370 616e 3e20 2020 2020 427 │ │ │ │ +0000c220: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ +0000c230: 7576 4275 6666 6572 2c20 3c61 2063 6c61 uvBuffer, BufferDes │ │ │ │ +0000c270: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +0000c2a0: 616d 703b 6475 7644 6573 632c 3c2f 6469 amp;duvDesc,.
    428 │ │ │ │ +0000c300: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +0000c310: 5354 5f42 5546 4645 5220 2a64 7676 4275 ST_BUFFER *dvvBu │ │ │ │ +0000c320: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +0000c360: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +0000c380: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +0000c390: 6476 7644 6573 632c 3c2f 6469 763e 0a3c dvvDesc,
    .< │ │ │ │ +0000c3a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000c3b0: 3e3c 6120 6964 3d22 6c30 3034 3239 2220 > 429 STENC │ │ │ │ +0000c400: 494c 5f54 4142 4c45 203c 7370 616e 2063 IL_TABLE c │ │ │ │ +0000c420: 6f6e 7374 3c2f 7370 616e 3e20 2a73 7465 onst *ste │ │ │ │ +0000c430: 6e63 696c 5461 626c 652c 3c2f 6469 763e ncilTable,
    │ │ │ │ +0000c440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000c470: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 430 CLEvalu │ │ │ │ +0000c4d0: 6174 6f72 3c2f 613e 203c 7370 616e 2063 ator c │ │ │ │ +0000c4f0: 6f6e 7374 3c2f 7370 616e 3e20 2a69 6e73 onst *ins │ │ │ │ +0000c500: 7461 6e63 652c 3c2f 6469 763e 0a3c 6469 tance,
    .< │ │ │ │ +0000c520: 6120 6964 3d22 6c30 3034 3331 2220 6e61 a id="l00431" na │ │ │ │ +0000c530: 6d65 3d22 6c30 3034 3331 223e 3c2f 613e me="l00431"> │ │ │ │ +0000c540: 3c73 7061 6e20 636c 6173 733d 226c 696e 431 DEVICE_ │ │ │ │ +0000c570: 434f 4e54 4558 5420 6465 7669 6365 436f CONTEXT deviceCo │ │ │ │ +0000c580: 6e74 6578 742c 3c2f 6469 763e 0a3c 6469 ntext,
    .< │ │ │ │ +0000c5a0: 6120 6964 3d22 6c30 3034 3332 2220 6e61 a id="l00432" na │ │ │ │ +0000c5b0: 6d65 3d22 6c30 3034 3332 223e 3c2f 613e me="l00432"> │ │ │ │ +0000c5c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 432 unsigned int │ │ │ │ +0000c630: 3c2f 7370 616e 3e20 6e75 6d53 7461 7274 numStart │ │ │ │ +0000c640: 4576 656e 7473 3d30 2c3c 2f64 6976 3e0a Events=0,
    . │ │ │ │ +0000c650: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 │ │ │ │ +0000c6f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000c720: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 434 cl_ │ │ │ │ +0000c750: 6576 656e 742a 2065 6e64 4576 656e 743d event* endEvent= │ │ │ │ +0000c760: 4e55 4c4c 2920 7b3c 2f64 6976 3e0a 3c64 NULL) {
    . │ │ │ │ +0000c780: 3c61 2069 643d 226c 3030 3433 3522 206e 435
    .
    436 │ │ │ │ +0000c820: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +0000c840: 6966 3c2f 7370 616e 3e20 2869 6e73 7461 if (insta │ │ │ │ +0000c850: 6e63 6529 207b 3c2f 6469 763e 0a3c 6469 nce) {
    .< │ │ │ │ +0000c870: 6120 6964 3d22 6c30 3034 3337 2220 6e61 a id="l00437" na │ │ │ │ +0000c880: 6d65 3d22 6c30 3034 3337 223e 3c2f 613e me="l00437"> │ │ │ │ +0000c890: 3c73 7061 6e20 636c 6173 733d 226c 696e 437 return
    instance-&g │ │ │ │ +0000c8f0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;EvalStencils< │ │ │ │ +0000c950: 2f61 3e28 7372 6342 7566 6665 722c 2073 /a>(srcBuffer, s │ │ │ │ +0000c960: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ +0000c980: 3c61 2069 643d 226c 3030 3433 3822 206e 438 │ │ │ │ +0000c9d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000c9e0: 2020 2020 2020 2020 2020 2020 6473 7442 dstB │ │ │ │ +0000c9f0: 7566 6665 722c 2064 7374 4465 7363 2c3c uffer, dstDesc,< │ │ │ │ +0000ca00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000ca50: 3433 393c 2f73 7061 6e3e 2020 2020 2020 439 │ │ │ │ +0000ca60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ca70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ca80: 2020 2020 6475 4275 6666 6572 2c20 2064 duBuffer, d │ │ │ │ +0000ca90: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ +0000cab0: 6120 6964 3d22 6c30 3034 3430 2220 6e61 a id="l00440" na │ │ │ │ +0000cac0: 6d65 3d22 6c30 3034 3430 223e 3c2f 613e me="l00440"> │ │ │ │ +0000cad0: 3c73 7061 6e20 636c 6173 733d 226c 696e 440 │ │ │ │ +0000cb00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cb10: 2020 2020 2020 2020 2020 2064 7642 7566 dvBuf │ │ │ │ +0000cb20: 6665 722c 2020 6476 4465 7363 2c3c 2f64 fer, dvDesc,.
    44 │ │ │ │ +0000cb80: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0000cb90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cba0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cbb0: 2020 6475 7542 7566 6665 722c 2064 7575 duuBuffer, duu │ │ │ │ +0000cbc0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0000cc00: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000cc10: 6e6f 223e 2020 3434 323c 2f73 7061 6e3e no"> 442 │ │ │ │ +0000cc20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cc30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cc40: 2020 2020 2020 2020 2020 6475 7642 7566 duvBuf │ │ │ │ +0000cc50: 6665 722c 2064 7576 4465 7363 2c3c 2f64 fer, duvDesc,.
    44 │ │ │ │ +0000ccb0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +0000ccc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ccd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cce0: 2020 6476 7642 7566 6665 722c 2064 7676 dvvBuffer, dvv │ │ │ │ +0000ccf0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0000cd30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000cd40: 6e6f 223e 2020 3434 343c 2f73 7061 6e3e no"> 444 │ │ │ │ +0000cd50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cd60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000cd70: 2020 2020 2020 2020 2020 7374 656e 6369 stenci │ │ │ │ +0000cd80: 6c54 6162 6c65 2c3c 2f64 6976 3e0a 3c64 lTable,
    . │ │ │ │ +0000cda0: 3c61 2069 643d 226c 3030 3434 3522 206e 445 │ │ │ │ +0000cdf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ce00: 2020 2020 2020 2020 2020 2020 6e75 6d53 numS │ │ │ │ +0000ce10: 7461 7274 4576 656e 7473 2c20 7374 6172 tartEvents, star │ │ │ │ +0000ce20: 7445 7665 6e74 732c 2065 6e64 4576 656e tEvents, endEven │ │ │ │ +0000ce30: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    446 │ │ │ │ +0000ce90: 2020 2020 2020 7d20 3c73 7061 6e20 636c } else {< │ │ │ │ +0000cec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000cf10: 3434 373c 2f73 7061 6e3e 2020 2020 2020 447 │ │ │ │ +0000cf20: 2020 2020 2020 3c73 7061 6e20 636c 6173 // C │ │ │ │ +0000cf40: 7265 6174 6520 616e 2069 6e73 7461 6e63 reate an instanc │ │ │ │ +0000cf50: 6520 6f6e 2064 656d 616e 6420 2873 6c6f e on demand (slo │ │ │ │ +0000cf60: 7729 3c2f 7370 616e 3e3c 2f64 6976 3e0a w)
    . │ │ │ │ +0000cf70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ +0000d050: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000d060: 3e3c 6120 6964 3d22 6c30 3034 3439 2220 > 449
    │ │ │ │ +0000d0b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d0c0: 2064 7544 6573 632c 2064 7644 6573 632c duDesc, dvDesc, │ │ │ │ +0000d0d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000d120: 2034 3530 3c2f 7370 616e 3e20 2020 2020 450 │ │ │ │ +0000d130: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d140: 2020 2020 2020 2020 2064 7575 4465 7363 duuDesc │ │ │ │ +0000d150: 2c20 6475 7644 6573 632c 2064 7676 4465 , duvDesc, dvvDe │ │ │ │ +0000d160: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    451 │ │ │ │ +0000d1c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d1d0: 2020 2020 2020 2020 2020 2020 6465 7669 devi │ │ │ │ +0000d1e0: 6365 436f 6e74 6578 7429 3b3c 2f64 6976 ceContext);
    .
    452< │ │ │ │ +0000d240: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0000d250: 2020 3c73 7061 6e20 636c 6173 733d 226b if (instance) │ │ │ │ +0000d280: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    453 │ │ │ │ +0000d2e0: 2020 2020 2020 2020 2020 2020 203c 7370 bool r = instance- │ │ │ │ +0000d320: 2667 743b 3c61 2063 6c61 7373 3d22 636f >EvalStencil │ │ │ │ +0000d380: 733c 2f61 3e28 7372 6342 7566 6665 722c s(srcBuffer, │ │ │ │ +0000d390: 2073 7263 4465 7363 2c3c 2f64 6976 3e0a srcDesc,
    . │ │ │ │ +0000d3a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +0000d450: 3c61 2069 643d 226c 3030 3435 3522 206e 455 │ │ │ │ +0000d4a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d4b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d4c0: 2020 6475 4275 6666 6572 2c20 2064 7544 duBuffer, duD │ │ │ │ +0000d4d0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    456 │ │ │ │ +0000d530: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d540: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d550: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +0000d560: 7642 7566 6665 722c 2020 6476 4465 7363 vBuffer, dvDesc │ │ │ │ +0000d570: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0000d5c0: 2020 3435 373c 2f73 7061 6e3e 2020 2020 457 │ │ │ │ +0000d5d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d5e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d5f0: 2020 2020 2020 2020 2020 2020 6475 7542 duuB │ │ │ │ +0000d600: 7566 6665 722c 2064 7575 4465 7363 2c3c uffer, duuDesc,< │ │ │ │ +0000d610: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000d660: 3435 383c 2f73 7061 6e3e 2020 2020 2020 458 │ │ │ │ +0000d670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d690: 2020 2020 2020 2020 2020 6475 7642 7566 duvBuf │ │ │ │ +0000d6a0: 6665 722c 2064 7576 4465 7363 2c3c 2f64 fer, duvDesc,.
    45 │ │ │ │ +0000d700: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +0000d710: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d720: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d730: 2020 2020 2020 2020 6476 7642 7566 6665 dvvBuffe │ │ │ │ +0000d740: 722c 2064 7676 4465 7363 2c3c 2f64 6976 r, dvvDesc,
    .
    460< │ │ │ │ +0000d7a0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0000d7b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d7c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d7d0: 2020 2020 2020 7374 656e 6369 6c54 6162 stencilTab │ │ │ │ +0000d7e0: 6c65 2c3c 2f64 6976 3e0a 3c64 6976 2063 le,
    .
    461 │ │ │ │ +0000d840: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d850: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d860: 2020 2020 2020 2020 2020 2020 2020 6e75 nu │ │ │ │ +0000d870: 6d53 7461 7274 4576 656e 7473 2c20 7374 mStartEvents, st │ │ │ │ +0000d880: 6172 7445 7665 6e74 732c 2065 6e64 4576 artEvents, endEv │ │ │ │ +0000d890: 656e 7429 3b3c 2f64 6976 3e0a 3c64 6976 ent);
    .
    < │ │ │ │ +0000d8d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000d8e0: 6e6f 223e 2020 3436 323c 2f73 7061 6e3e no"> 462 │ │ │ │ +0000d8f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000d900: 3c73 7061 6e20 636c 6173 733d 226b 6579 delete instance;.
    46 │ │ │ │ +0000d980: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +0000d990: 2020 2020 2020 2020 3c73 7061 6e20 636c return │ │ │ │ +0000d9c0: 723b 3c2f 6469 763e 0a3c 6469 7620 636c r;
    .
    464 │ │ │ │ +0000da20: 2020 2020 2020 2020 207d 3c2f 6469 763e }
    │ │ │ │ +0000da30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000da60: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 465 │ │ │ │ +0000da90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +0000dab0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n f │ │ │ │ +0000dad0: 616c 7365 3c2f 7370 616e 3e3b 3c2f 6469 alse;.
    466 │ │ │ │ +0000db30: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ │ +0000db40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000db90: 2034 3637 3c2f 7370 616e 3e20 2020 207d 467 } │ │ │ │ +0000dba0: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ +0000dbc0: 3c61 2069 643d 226c 3030 3436 3822 206e 468
    .
    499 │ │ │ │ +0000dc60: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ │ +0000dc80: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename SRC_BUFFER, typename DST_BUFFER, │ │ │ │ +0000dcf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename STENCIL_TA │ │ │ │ +0000dd20: 424c 4526 6774 3b3c 2f64 6976 3e0a 3c64 BLE>
    ..
    500 b │ │ │ │ +0000de30: 6f6f 6c3c 2f73 7061 6e3e 203c 6120 636c ool Eval │ │ │ │ +0000de90: 5374 656e 6369 6c73 3c2f 613e 283c 2f64 Stencils(.
    50 │ │ │ │ +0000def0: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0000df00: 5352 435f 4255 4646 4552 202a 7372 6342 SRC_BUFFER *srcB │ │ │ │ +0000df10: 7566 6665 722c 203c 6120 636c 6173 733d uffer, BufferDescri │ │ │ │ +0000df50: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +0000df70: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +0000df80: 3b73 7263 4465 7363 2c3c 2f64 6976 3e0a ;srcDesc,
    . │ │ │ │ +0000df90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +0000e0b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000e0c0: 6e6f 223e 2020 3530 333c 2f73 7061 6e3e no"> 503 │ │ │ │ +0000e0d0: 2020 2020 2020 2020 5354 454e 4349 4c5f STENCIL_ │ │ │ │ +0000e0e0: 5441 424c 4520 3c73 7061 6e20 636c 6173 TABLE cons │ │ │ │ +0000e100: 743c 2f73 7061 6e3e 202a 7374 656e 6369 t *stenci │ │ │ │ +0000e110: 6c54 6162 6c65 2c3c 2f64 6976 3e0a 3c64 lTable,
    . │ │ │ │ +0000e130: 3c61 2069 643d 226c 3030 3530 3422 206e 504 unsigned in │ │ │ │ +0000e1c0: 743c 2f73 7061 6e3e 206e 756d 5374 6172 t numStar │ │ │ │ +0000e1d0: 7445 7665 6e74 733d 302c 3c2f 6469 763e tEvents=0,
    │ │ │ │ +0000e1e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000e210: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 505 const │ │ │ │ +0000e260: 636c 5f65 7665 6e74 2a20 7374 6172 7445 cl_event* startE │ │ │ │ +0000e270: 7665 6e74 733d 4e55 4c4c 2c3c 2f64 6976 vents=NULL,
    .
    506< │ │ │ │ +0000e2d0: 2f73 7061 6e3e 2020 2020 2020 2020 636c /span> cl │ │ │ │ +0000e2e0: 5f65 7665 6e74 2a20 656e 6445 7665 6e74 _event* endEvent │ │ │ │ +0000e2f0: 3d4e 554c 4c29 3c73 7061 6e20 636c 6173 =NULL) con │ │ │ │ +0000e310: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    507< │ │ │ │ +0000e370: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> return EvalStenc │ │ │ │ +0000e400: 696c 733c 2f61 3e28 7372 6342 7566 6665 ils(srcBuffe │ │ │ │ +0000e410: 722d 2667 743b 4269 6e64 434c 4275 6666 r->BindCLBuff │ │ │ │ +0000e420: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +0000e430: 7565 292c 2073 7263 4465 7363 2c3c 2f64 ue), srcDesc,.
    50 │ │ │ │ +0000e490: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0000e4a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e4b0: 2020 2020 6473 7442 7566 6665 722d 2667 dstBuffer-&g │ │ │ │ +0000e4c0: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +0000e4d0: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +0000e4e0: 2064 7374 4465 7363 2c3c 2f64 6976 3e0a dstDesc,
    . │ │ │ │ +0000e4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    510 │ │ │ │ +0000e5e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e5f0: 2020 2020 2020 2020 2073 7465 6e63 696c stencil │ │ │ │ +0000e600: 5461 626c 652d 2667 743b 4765 744f 6666 Table->GetOff │ │ │ │ +0000e610: 7365 7473 4275 6666 6572 2829 2c3c 2f64 setsBuffer(),.
    51 │ │ │ │ +0000e670: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0000e680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e690: 2020 2020 7374 656e 6369 6c54 6162 6c65 stencilTable │ │ │ │ +0000e6a0: 2d26 6774 3b47 6574 496e 6469 6365 7342 ->GetIndicesB │ │ │ │ +0000e6b0: 7566 6665 7228 292c 3c2f 6469 763e 0a3c uffer(),
    .< │ │ │ │ +0000e6c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000e6d0: 3e3c 6120 6964 3d22 6c30 3035 3132 2220 > 512 │ │ │ │ +0000e720: 2020 2020 2020 2020 2020 2020 2020 2073 s │ │ │ │ +0000e730: 7465 6e63 696c 5461 626c 652d 2667 743b tencilTable-> │ │ │ │ +0000e740: 4765 7457 6569 6768 7473 4275 6666 6572 GetWeightsBuffer │ │ │ │ +0000e750: 2829 2c3c 2f64 6976 3e0a 3c64 6976 2063 (),
    .
    513 │ │ │ │ +0000e7b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e7c0: 2020 2020 2020 2020 2020 302c 3c2f 6469 0,.
    514 │ │ │ │ +0000e820: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000e830: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e840: 2020 2073 7465 6e63 696c 5461 626c 652d stencilTable- │ │ │ │ +0000e850: 2667 743b 4765 744e 756d 5374 656e 6369 >GetNumStenci │ │ │ │ +0000e860: 6c73 2829 2c3c 2f64 6976 3e0a 3c64 6976 ls(),
    .
    < │ │ │ │ +0000e8a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000e8b0: 6e6f 223e 2020 3531 353c 2f73 7061 6e3e no"> 515 │ │ │ │ +0000e8c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000e8d0: 2020 2020 2020 2020 2020 2020 6e75 6d53 numS │ │ │ │ +0000e8e0: 7461 7274 4576 656e 7473 2c20 7374 6172 tartEvents, star │ │ │ │ +0000e8f0: 7445 7665 6e74 732c 2065 6e64 4576 656e tEvents, endEven │ │ │ │ +0000e900: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    516 │ │ │ │ +0000e960: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ │ +0000e970: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0000e9e0: 6120 6964 3d22 6c30 3035 3630 2220 6e61 a id="l00560" na │ │ │ │ +0000e9f0: 6d65 3d22 6c30 3035 3630 223e 3c2f 613e me="l00560"> │ │ │ │ +0000ea00: 3c73 7061 6e20 636c 6173 733d 226c 696e 560 templ │ │ │ │ +0000ea40: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +0000ea50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000ea60: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    SRC_BUFFER, │ │ │ │ +0000ea80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +0000eaa0: 2f73 7061 6e3e 2044 5354 5f42 5546 4645 /span> DST_BUFFE │ │ │ │ +0000eab0: 522c 203c 7370 616e 2063 6c61 7373 3d22 R, typenam │ │ │ │ +0000ead0: 653c 2f73 7061 6e3e 2053 5445 4e43 494c e STENCIL │ │ │ │ +0000eae0: 5f54 4142 4c45 2667 743b 3c2f 6469 763e _TABLE>
    │ │ │ │ +0000eaf0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ +0000eb80: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +0000eb90: 7265 663d 2261 3031 3134 312e 6874 6d6c ref="a01141.html │ │ │ │ +0000eba0: 2361 3236 6664 3538 3237 3562 3833 3864 #a26fd58275b838d │ │ │ │ +0000ebb0: 6266 3064 6139 3634 3130 3236 3961 3431 bf0da96410269a41 │ │ │ │ +0000ebc0: 6566 223e 2020 3536 313c 2f61 3e3c 2f73 ef"> 561 bool E │ │ │ │ +0000ec50: 7661 6c53 7465 6e63 696c 733c 2f61 3e28 valStencils( │ │ │ │ +0000ec60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000ecb0: 2035 3632 3c2f 7370 616e 3e20 2020 2020 562 │ │ │ │ +0000ecc0: 2020 2053 5243 5f42 5546 4645 5220 2a73 SRC_BUFFER *s │ │ │ │ +0000ecd0: 7263 4275 6666 6572 2c20 3c61 2063 6c61 rcBuffer, BufferDes │ │ │ │ +0000ed10: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +0000ed40: 616d 703b 7372 6344 6573 632c 3c2f 6469 amp;srcDesc,.
    563 │ │ │ │ +0000eda0: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +0000edb0: 5354 5f42 5546 4645 5220 2a64 7374 4275 ST_BUFFER *dstBu │ │ │ │ +0000edc0: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +0000ee00: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +0000ee20: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +0000ee30: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ +0000ee40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000ee50: 3e3c 6120 6964 3d22 6c30 3035 3634 2220 > 564 DST_B │ │ │ │ +0000eea0: 5546 4645 5220 2a64 7542 7566 6665 722c UFFER *duBuffer, │ │ │ │ +0000eeb0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 B │ │ │ │ +0000eee0: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +0000eef0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +0000ef10: 2f73 7061 6e3e 2026 616d 703b 6475 4465 /span> &duDe │ │ │ │ +0000ef20: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    565 │ │ │ │ +0000ef80: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +0000ef90: 202a 6476 4275 6666 6572 2c20 203c 6120 *dvBuffer, Buffer │ │ │ │ +0000efd0: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0000efe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000eff0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dvDesc,.
    5 │ │ │ │ +0000f060: 3636 3c2f 7370 616e 3e20 2020 2020 2020 66 │ │ │ │ +0000f070: 2053 5445 4e43 494c 5f54 4142 4c45 203c STENCIL_TABLE < │ │ │ │ +0000f080: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000f090: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const *stencilTable, │ │ │ │ +0000f0b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000f100: 2035 3637 3c2f 7370 616e 3e20 2020 2020 567 │ │ │ │ +0000f110: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns │ │ │ │ +0000f130: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int numStartEvents │ │ │ │ +0000f170: 3d30 2c3c 2f64 6976 3e0a 3c64 6976 2063 =0,
    .
    568 │ │ │ │ +0000f1d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ +0000f1f0: 743c 2f73 7061 6e3e 2063 6c5f 6576 656e t cl_even │ │ │ │ +0000f200: 742a 2073 7461 7274 4576 656e 7473 3d4e t* startEvents=N │ │ │ │ +0000f210: 554c 4c2c 3c2f 6469 763e 0a3c 6469 7620 ULL,
    .
    569 │ │ │ │ +0000f270: 2020 2020 2020 2063 6c5f 6576 656e 742a cl_event* │ │ │ │ +0000f280: 2065 6e64 4576 656e 743d 4e55 4c4c 293c endEvent=NULL)< │ │ │ │ +0000f290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000f2a0: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    570 │ │ │ │ +0000f310: 2020 2020 2020 203c 7370 616e 2063 6c61 return < │ │ │ │ +0000f340: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0000f350: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0000f360: 2261 3031 3134 312e 6874 6d6c 2361 3066 "a01141.html#a0f │ │ │ │ +0000f370: 3264 3736 3062 6262 3961 3465 6135 3865 2d760bbb9a4ea58e │ │ │ │ +0000f380: 6166 3665 3238 3036 6430 3333 6361 223e af6e2806d033ca"> │ │ │ │ +0000f390: 4576 616c 5374 656e 6369 6c73 3c2f 613e EvalStencils │ │ │ │ +0000f3a0: 2873 7263 4275 6666 6572 2d26 6774 3b42 (srcBuffer->B │ │ │ │ +0000f3b0: 696e 6443 4c42 7566 6665 7228 5f63 6c43 indCLBuffer(_clC │ │ │ │ +0000f3c0: 6f6d 6d61 6e64 5175 6575 6529 2c20 7372 ommandQueue), sr │ │ │ │ +0000f3d0: 6344 6573 632c 3c2f 6469 763e 0a3c 6469 cDesc,
    .< │ │ │ │ +0000f3f0: 6120 6964 3d22 6c30 3035 3731 2220 6e61 a id="l00571" na │ │ │ │ +0000f400: 6d65 3d22 6c30 3035 3731 223e 3c2f 613e me="l00571"> │ │ │ │ +0000f410: 3c73 7061 6e20 636c 6173 733d 226c 696e 571 │ │ │ │ +0000f440: 2020 2020 2020 2020 2020 2020 2064 7374 dst │ │ │ │ +0000f450: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ +0000f460: 4c42 7566 6665 7228 5f63 6c43 6f6d 6d61 LBuffer(_clComma │ │ │ │ +0000f470: 6e64 5175 6575 6529 2c20 6473 7444 6573 ndQueue), dstDes │ │ │ │ +0000f480: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    572 │ │ │ │ +0000f4e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f4f0: 2020 2020 2020 2020 2064 7542 7566 6665 duBuffe │ │ │ │ +0000f500: 722d 2667 743b 4269 6e64 434c 4275 6666 r->BindCLBuff │ │ │ │ +0000f510: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +0000f520: 7565 292c 2064 7544 6573 632c 3c2f 6469 ue), duDesc,.
    573 │ │ │ │ +0000f580: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000f590: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f5a0: 2020 2064 7642 7566 6665 722d 2667 743b dvBuffer-> │ │ │ │ +0000f5b0: 4269 6e64 434c 4275 6666 6572 285f 636c BindCLBuffer(_cl │ │ │ │ +0000f5c0: 436f 6d6d 616e 6451 7565 7565 292c 2064 CommandQueue), d │ │ │ │ +0000f5d0: 7644 6573 632c 3c2f 6469 763e 0a3c 6469 vDesc,
    .< │ │ │ │ +0000f5f0: 6120 6964 3d22 6c30 3035 3734 2220 6e61 a id="l00574" na │ │ │ │ +0000f600: 6d65 3d22 6c30 3035 3734 223e 3c2f 613e me="l00574"> │ │ │ │ +0000f610: 3c73 7061 6e20 636c 6173 733d 226c 696e 574 │ │ │ │ +0000f640: 2020 2020 2020 2020 2020 2020 2073 7465 ste │ │ │ │ +0000f650: 6e63 696c 5461 626c 652d 2667 743b 4765 ncilTable->Ge │ │ │ │ +0000f660: 7453 697a 6573 4275 6666 6572 2829 2c3c tSizesBuffer(),< │ │ │ │ +0000f670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000f6c0: 3537 353c 2f73 7061 6e3e 2020 2020 2020 575 │ │ │ │ +0000f6d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f6e0: 2020 2020 2020 7374 656e 6369 6c54 6162 stencilTab │ │ │ │ +0000f6f0: 6c65 2d26 6774 3b47 6574 4f66 6673 6574 le->GetOffset │ │ │ │ +0000f700: 7342 7566 6665 7228 292c 3c2f 6469 763e sBuffer(),
    │ │ │ │ +0000f710: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000f740: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 576 │ │ │ │ +0000f770: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f780: 2073 7465 6e63 696c 5461 626c 652d 2667 stencilTable-&g │ │ │ │ +0000f790: 743b 4765 7449 6e64 6963 6573 4275 6666 t;GetIndicesBuff │ │ │ │ +0000f7a0: 6572 2829 2c3c 2f64 6976 3e0a 3c64 6976 er(),
    .
    < │ │ │ │ +0000f7e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000f7f0: 6e6f 223e 2020 3537 373c 2f73 7061 6e3e no"> 577 │ │ │ │ +0000f800: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f810: 2020 2020 2020 2020 2020 2020 7374 656e sten │ │ │ │ +0000f820: 6369 6c54 6162 6c65 2d26 6774 3b47 6574 cilTable->Get │ │ │ │ +0000f830: 5765 6967 6874 7342 7566 6665 7228 292c WeightsBuffer(), │ │ │ │ +0000f840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000f890: 2035 3738 3c2f 7370 616e 3e20 2020 2020 578 │ │ │ │ +0000f8a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f8b0: 2020 2020 2020 2073 7465 6e63 696c 5461 stencilTa │ │ │ │ +0000f8c0: 626c 652d 2667 743b 4765 7444 7557 6569 ble->GetDuWei │ │ │ │ +0000f8d0: 6768 7473 4275 6666 6572 2829 2c3c 2f64 ghtsBuffer(),.
    57 │ │ │ │ +0000f930: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +0000f940: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f950: 2020 2020 7374 656e 6369 6c54 6162 6c65 stencilTable │ │ │ │ +0000f960: 2d26 6774 3b47 6574 4476 5765 6967 6874 ->GetDvWeight │ │ │ │ +0000f970: 7342 7566 6665 7228 292c 3c2f 6469 763e sBuffer(),
    │ │ │ │ +0000f980: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000f9b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 580 │ │ │ │ +0000f9e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000f9f0: 2030 2c3c 2f64 6976 3e0a 3c64 6976 2063 0,
    .
    581 │ │ │ │ +0000fa50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000fa60: 2020 2020 2020 2020 2020 7374 656e 6369 stenci │ │ │ │ +0000fa70: 6c54 6162 6c65 2d26 6774 3b47 6574 4e75 lTable->GetNu │ │ │ │ +0000fa80: 6d53 7465 6e63 696c 7328 292c 3c2f 6469 mStencils(),.
    582 │ │ │ │ +0000fae0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000faf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000fb00: 2020 206e 756d 5374 6172 7445 7665 6e74 numStartEvent │ │ │ │ +0000fb10: 732c 2073 7461 7274 4576 656e 7473 2c20 s, startEvents, │ │ │ │ +0000fb20: 656e 6445 7665 6e74 293b 3c2f 6469 763e endEvent);
    │ │ │ │ +0000fb30: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ │ +0000fb90: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ │ +0000fbe0: 2020 3538 343c 2f73 7061 6e3e 203c 2f64 584 .
    64 │ │ │ │ +0000fc40: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 template <type │ │ │ │ +0000fc90: 6e61 6d65 3c2f 7370 616e 3e20 5352 435f name SRC_ │ │ │ │ +0000fca0: 4255 4646 4552 2c20 3c73 7061 6e20 636c BUFFER, ty │ │ │ │ +0000fcc0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4453 pename DS │ │ │ │ +0000fcd0: 545f 4255 4646 4552 2c20 3c73 7061 6e20 T_BUFFER, │ │ │ │ +0000fcf0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +0000fd00: 5354 454e 4349 4c5f 5441 424c 4526 6774 STENCIL_TABLE> │ │ │ │ +0000fd10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    . │ │ │ │ +0000fd70: 3c61 2069 643d 226c 3030 3634 3622 206e 646 │ │ │ │ +0000fdf0: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ +0000fe00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000fe10: 6f72 6474 7970 6522 3e62 6f6f 6c3c 2f73 ordtype">bool EvalStenci │ │ │ │ +0000fe80: 6c73 3c2f 613e 283c 2f64 6976 3e0a 3c64 ls(
    . │ │ │ │ +0000fea0: 3c61 2069 643d 226c 3030 3634 3722 206e 647 SRC_BU │ │ │ │ +0000fef0: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ +0000ff00: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +0000ff30: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ +0000ff70: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    648 │ │ │ │ +0000ffd0: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +0000ffe0: 202a 6473 7442 7566 6665 722c 203c 6120 *dstBuffer, Buffer │ │ │ │ +00010020: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +00010030: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00010040: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dstDesc,< │ │ │ │ +00010060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000100b0: 3634 393c 2f73 7061 6e3e 2020 2020 2020 649 │ │ │ │ +000100c0: 2020 4453 545f 4255 4646 4552 202a 6475 DST_BUFFER *du │ │ │ │ +000100d0: 4275 6666 6572 2c20 203c 6120 636c 6173 Buffer, BufferDesc │ │ │ │ +00010110: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +00010140: 6d70 3b64 7544 6573 632c 3c2f 6469 763e mp;duDesc,
    │ │ │ │ +00010150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00010180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 650 DST │ │ │ │ +000101b0: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ +000101c0: 722c 2020 3c61 2063 6c61 7373 3d22 636f r, BufferDescripto │ │ │ │ +00010200: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00010220: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ +00010230: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +00010270: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00010280: 6e6f 223e 2020 3635 313c 2f73 7061 6e3e no"> 651 │ │ │ │ +00010290: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ +000102a0: 4552 202a 6475 7542 7566 6665 722c 203c ER *duuBuffer, < │ │ │ │ +000102b0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +000102c0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +000102d0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +000102e0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +000102f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duuDesc │ │ │ │ +00010320: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00010370: 2020 3635 323c 2f73 7061 6e3e 2020 2020 652 │ │ │ │ +00010380: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +00010390: 6475 7642 7566 6665 722c 203c 6120 636c duvBuffer, BufferDe │ │ │ │ +000103d0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00010400: 2661 6d70 3b64 7576 4465 7363 2c3c 2f64 &duvDesc,.
    65 │ │ │ │ +00010460: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00010470: 4453 545f 4255 4646 4552 202a 6476 7642 DST_BUFFER *dvvB │ │ │ │ +00010480: 7566 6665 722c 203c 6120 636c 6173 733d uffer, BufferDescri │ │ │ │ +000104c0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +000104e0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +000104f0: 3b64 7676 4465 7363 2c3c 2f64 6976 3e0a ;dvvDesc,
    . │ │ │ │ +00010500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    655< │ │ │ │ +000105f0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> unsigned │ │ │ │ +00010620: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int num │ │ │ │ +00010650: 5374 6172 7445 7665 6e74 733d 302c 3c2f StartEvents=0,.
    6 │ │ │ │ +000106b0: 3536 3c2f 7370 616e 3e20 2020 2020 2020 56 │ │ │ │ +000106c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const cl_event* st │ │ │ │ +000106f0: 6172 7445 7665 6e74 733d 4e55 4c4c 2c3c artEvents=NULL,< │ │ │ │ +00010700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00010750: 3635 373c 2f73 7061 6e3e 2020 2020 2020 657 │ │ │ │ +00010760: 2020 636c 5f65 7665 6e74 2a20 656e 6445 cl_event* endE │ │ │ │ +00010770: 7665 6e74 3d4e 554c 4c29 3c73 7061 6e20 vent=NULL) │ │ │ │ +00010790: 2063 6f6e 7374 203c 2f73 7061 6e3e 7b3c const {< │ │ │ │ +000107a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000107f0: 3635 383c 2f73 7061 6e3e 2020 2020 2020 658 │ │ │ │ +00010800: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +00010820: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn EvalS │ │ │ │ +00010880: 7465 6e63 696c 733c 2f61 3e28 7372 6342 tencils(srcB │ │ │ │ +00010890: 7566 6665 722d 2667 743b 4269 6e64 434c uffer->BindCL │ │ │ │ +000108a0: 4275 6666 6572 285f 636c 436f 6d6d 616e Buffer(_clComman │ │ │ │ +000108b0: 6451 7565 7565 292c 2073 7263 4465 7363 dQueue), srcDesc │ │ │ │ +000108c0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00010910: 2020 3635 393c 2f73 7061 6e3e 2020 2020 659 │ │ │ │ +00010920: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010930: 2020 2020 2020 2020 6473 7442 7566 6665 dstBuffe │ │ │ │ +00010940: 722d 2667 743b 4269 6e64 434c 4275 6666 r->BindCLBuff │ │ │ │ +00010950: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +00010960: 7565 292c 2064 7374 4465 7363 2c3c 2f64 ue), dstDesc,.
    66 │ │ │ │ +000109c0: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ +000109d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000109e0: 2020 2020 6475 4275 6666 6572 2d26 6774 duBuffer-> │ │ │ │ +000109f0: 3b42 696e 6443 4c42 7566 6665 7228 5f63 ;BindCLBuffer(_c │ │ │ │ +00010a00: 6c43 6f6d 6d61 6e64 5175 6575 6529 2c20 lCommandQueue), │ │ │ │ +00010a10: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ +00010a30: 3c61 2069 643d 226c 3030 3636 3122 206e 661 │ │ │ │ +00010a80: 2020 2020 2020 2020 2020 2020 2020 6476 dv │ │ │ │ +00010a90: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ +00010aa0: 4c42 7566 6665 7228 5f63 6c43 6f6d 6d61 LBuffer(_clComma │ │ │ │ +00010ab0: 6e64 5175 6575 6529 2c20 6476 4465 7363 ndQueue), dvDesc │ │ │ │ +00010ac0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00010b10: 2020 3636 323c 2f73 7061 6e3e 2020 2020 662 │ │ │ │ +00010b20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010b30: 2020 2020 2020 2020 6475 7542 7566 6665 duuBuffe │ │ │ │ +00010b40: 722d 2667 743b 4269 6e64 434c 4275 6666 r->BindCLBuff │ │ │ │ +00010b50: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +00010b60: 7565 292c 2064 7575 4465 7363 2c3c 2f64 ue), duuDesc,.
    66 │ │ │ │ +00010bc0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00010bd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010be0: 2020 2020 6475 7642 7566 6665 722d 2667 duvBuffer-&g │ │ │ │ +00010bf0: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +00010c00: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +00010c10: 2064 7576 4465 7363 2c3c 2f64 6976 3e0a duvDesc,
    . │ │ │ │ +00010c20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00010d00: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00010d10: 6e6f 223e 2020 3636 353c 2f73 7061 6e3e no"> 665 │ │ │ │ +00010d20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010d30: 2020 2020 2020 2020 2020 2020 7374 656e sten │ │ │ │ +00010d40: 6369 6c54 6162 6c65 2d26 6774 3b47 6574 cilTable->Get │ │ │ │ +00010d50: 5369 7a65 7342 7566 6665 7228 292c 3c2f SizesBuffer(),.
    6 │ │ │ │ +00010db0: 3636 3c2f 7370 616e 3e20 2020 2020 2020 66 │ │ │ │ +00010dc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010dd0: 2020 2020 2073 7465 6e63 696c 5461 626c stencilTabl │ │ │ │ +00010de0: 652d 2667 743b 4765 744f 6666 7365 7473 e->GetOffsets │ │ │ │ +00010df0: 4275 6666 6572 2829 2c3c 2f64 6976 3e0a Buffer(),
    . │ │ │ │ +00010e00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    668 │ │ │ │ +00010ef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010f00: 2020 2020 2020 2020 2020 2073 7465 6e63 stenc │ │ │ │ +00010f10: 696c 5461 626c 652d 2667 743b 4765 7457 ilTable->GetW │ │ │ │ +00010f20: 6569 6768 7473 4275 6666 6572 2829 2c3c eightsBuffer(),< │ │ │ │ +00010f30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00010f80: 3636 393c 2f73 7061 6e3e 2020 2020 2020 669 │ │ │ │ +00010f90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010fa0: 2020 2020 2020 7374 656e 6369 6c54 6162 stencilTab │ │ │ │ +00010fb0: 6c65 2d26 6774 3b47 6574 4475 5765 6967 le->GetDuWeig │ │ │ │ +00010fc0: 6874 7342 7566 6665 7228 292c 3c2f 6469 htsBuffer(),.
    670 │ │ │ │ +00011020: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00011030: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00011040: 2020 2073 7465 6e63 696c 5461 626c 652d stencilTable- │ │ │ │ +00011050: 2667 743b 4765 7444 7657 6569 6768 7473 >GetDvWeights │ │ │ │ +00011060: 4275 6666 6572 2829 2c3c 2f64 6976 3e0a Buffer(),
    . │ │ │ │ +00011070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +00011120: 3c61 2069 643d 226c 3030 3637 3222 206e 672 │ │ │ │ +00011170: 2020 2020 2020 2020 2020 2020 2020 7374 st │ │ │ │ +00011180: 656e 6369 6c54 6162 6c65 2d26 6774 3b47 encilTable->G │ │ │ │ +00011190: 6574 4475 7657 6569 6768 7473 4275 6666 etDuvWeightsBuff │ │ │ │ +000111a0: 6572 2829 2c3c 2f64 6976 3e0a 3c64 6976 er(),
    .
    < │ │ │ │ +000111e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000111f0: 6e6f 223e 2020 3637 333c 2f73 7061 6e3e no"> 673 │ │ │ │ +00011200: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00011210: 2020 2020 2020 2020 2020 2020 7374 656e sten │ │ │ │ +00011220: 6369 6c54 6162 6c65 2d26 6774 3b47 6574 cilTable->Get │ │ │ │ +00011230: 4476 7657 6569 6768 7473 4275 6666 6572 DvvWeightsBuffer │ │ │ │ +00011240: 2829 2c3c 2f64 6976 3e0a 3c64 6976 2063 (),
    .
    674 │ │ │ │ +000112a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000112b0: 2020 2020 2020 2020 2020 302c 3c2f 6469 0,.
    675 │ │ │ │ +00011310: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00011320: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00011330: 2020 2073 7465 6e63 696c 5461 626c 652d stencilTable- │ │ │ │ +00011340: 2667 743b 4765 744e 756d 5374 656e 6369 >GetNumStenci │ │ │ │ +00011350: 6c73 2829 2c3c 2f64 6976 3e0a 3c64 6976 ls(),
    .
    < │ │ │ │ +00011390: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000113a0: 6e6f 223e 2020 3637 363c 2f73 7061 6e3e no"> 676 │ │ │ │ +000113b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000113c0: 2020 2020 2020 2020 2020 2020 6e75 6d53 numS │ │ │ │ +000113d0: 7461 7274 4576 656e 7473 2c20 7374 6172 tartEvents, star │ │ │ │ +000113e0: 7445 7665 6e74 732c 2065 6e64 4576 656e tEvents, endEven │ │ │ │ +000113f0: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    677 │ │ │ │ +00011450: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ │ +00011460: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +000114d0: 6120 6964 3d22 6c30 3036 3831 2220 6e61 a id="l00681" na │ │ │ │ +000114e0: 6d65 3d22 6c30 3036 3831 223e 3c2f 613e me="l00681"> │ │ │ │ +000114f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 681< │ │ │ │ +00011550: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> bool EvalStencil │ │ │ │ +000115e0: 733c 2f61 3e28 636c 5f6d 656d 2073 7263 s(cl_mem src │ │ │ │ +000115f0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ +00011620: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00011630: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +00011650: 2f73 7061 6e3e 2026 616d 703b 7372 6344 /span> &srcD │ │ │ │ +00011660: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    682 │ │ │ │ +000116c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000116d0: 2020 2020 2063 6c5f 6d65 6d20 6473 742c cl_mem dst, │ │ │ │ +000116e0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +00011710: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dstDe │ │ │ │ +00011750: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    683 │ │ │ │ +000117b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000117c0: 2020 2020 636c 5f6d 656d 2073 697a 6573 cl_mem sizes │ │ │ │ +000117d0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00011820: 2020 3638 343c 2f73 7061 6e3e 2020 2020 684 │ │ │ │ +00011830: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00011840: 2020 636c 5f6d 656d 206f 6666 7365 7473 cl_mem offsets │ │ │ │ +00011850: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000118a0: 2020 3638 353c 2f73 7061 6e3e 2020 2020 685 │ │ │ │ +000118b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000118c0: 2020 636c 5f6d 656d 2069 6e64 6963 6573 cl_mem indices │ │ │ │ +000118d0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00011920: 2020 3638 363c 2f73 7061 6e3e 2020 2020 686 │ │ │ │ +00011930: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00011940: 2020 636c 5f6d 656d 2077 6569 6768 7473 cl_mem weights │ │ │ │ +00011950: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000119a0: 2020 3638 373c 2f73 7061 6e3e 2020 2020 687 │ │ │ │ +000119b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000119c0: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +000119e0: 2f73 7061 6e3e 2073 7461 7274 2c3c 2f64 /span> start,.
    68 │ │ │ │ +00011a40: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +00011a50: 2020 2020 2020 2020 2020 2020 2020 3c73 int end,
    . │ │ │ │ +00011aa0: 3c61 2069 643d 226c 3030 3638 3922 206e 689 │ │ │ │ +00011af0: 2020 2020 2020 2020 3c73 7061 6e20 636c unsigned int< │ │ │ │ +00011b40: 2f73 7061 6e3e 206e 756d 5374 6172 7445 /span> numStartE │ │ │ │ +00011b50: 7665 6e74 733d 302c 3c2f 6469 763e 0a3c vents=0,
    .< │ │ │ │ +00011b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00011b70: 3e3c 6120 6964 3d22 6c30 3036 3930 2220 > 690 │ │ │ │ +00011bc0: 2020 2020 2020 2020 203c 7370 616e 2063 c │ │ │ │ +00011be0: 6f6e 7374 3c2f 7370 616e 3e20 636c 5f65 onst cl_e │ │ │ │ +00011bf0: 7665 6e74 2a20 7374 6172 7445 7665 6e74 vent* startEvent │ │ │ │ +00011c00: 733d 4e55 4c4c 2c3c 2f64 6976 3e0a 3c64 s=NULL,
    . │ │ │ │ +00011c20: 3c61 2069 643d 226c 3030 3639 3122 206e 691 │ │ │ │ +00011c70: 2020 2020 2020 2020 636c 5f65 7665 6e74 cl_event │ │ │ │ +00011c80: 2a20 656e 6445 7665 6e74 3d4e 554c 4c29 * endEvent=NULL) │ │ │ │ +00011c90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const;
    .
    692 │ │ │ │ +00011d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +00011d60: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +00011d70: 7265 663d 2261 3031 3134 312e 6874 6d6c ref="a01141.html │ │ │ │ +00011d80: 2361 3039 6335 6663 6463 3965 3132 3330 #a09c5fcdc9e1230 │ │ │ │ +00011d90: 6336 3235 6433 3230 3530 3038 6434 3163 c625d3205008d41c │ │ │ │ +00011da0: 3038 223e 2020 3734 313c 2f61 3e3c 2f73 08"> 741 bool E │ │ │ │ +00011e30: 7661 6c53 7465 6e63 696c 733c 2f61 3e28 valStencils( │ │ │ │ +00011e40: 636c 5f6d 656d 2073 7263 2c20 3c61 2063 cl_mem src, BufferD │ │ │ │ +00011e80: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +00011eb0: 2026 616d 703b 7372 6344 6573 632c 3c2f &srcDesc,.
    7 │ │ │ │ +00011f10: 3432 3c2f 7370 616e 3e20 2020 2020 2020 42 │ │ │ │ +00011f20: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +00011f30: 6c5f 6d65 6d20 6473 742c 203c 6120 636c l_mem dst, BufferDe │ │ │ │ +00011f70: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00011fa0: 2661 6d70 3b64 7374 4465 7363 2c3c 2f64 &dstDesc,.
    74 │ │ │ │ +00012000: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00012010: 2020 2020 2020 2020 2020 2020 2020 636c cl │ │ │ │ +00012020: 5f6d 656d 2064 752c 2020 3c61 2063 6c61 _mem du, BufferDes │ │ │ │ +00012060: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +00012090: 616d 703b 6475 4465 7363 2c3c 2f64 6976 amp;duDesc,
    .
    744< │ │ │ │ +000120f0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00012100: 2020 2020 2020 2020 2020 2020 636c 5f6d cl_m │ │ │ │ +00012110: 656d 2064 762c 2020 3c61 2063 6c61 7373 em dv, BufferDescr │ │ │ │ +00012150: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +00012170: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00012180: 703b 6476 4465 7363 2c3c 2f64 6976 3e0a p;dvDesc,
    . │ │ │ │ +00012190: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +00012220: 3c61 2069 643d 226c 3030 3734 3622 206e 746 │ │ │ │ +00012270: 2020 2020 2020 2020 636c 5f6d 656d 206f cl_mem o │ │ │ │ +00012280: 6666 7365 7473 2c3c 2f64 6976 3e0a 3c64 ffsets,
    . │ │ │ │ +000122a0: 3c61 2069 643d 226c 3030 3734 3722 206e 747 │ │ │ │ +000122f0: 2020 2020 2020 2020 636c 5f6d 656d 2069 cl_mem i │ │ │ │ +00012300: 6e64 6963 6573 2c3c 2f64 6976 3e0a 3c64 ndices,
    . │ │ │ │ +00012320: 3c61 2069 643d 226c 3030 3734 3822 206e 748 │ │ │ │ +00012370: 2020 2020 2020 2020 636c 5f6d 656d 2077 cl_mem w │ │ │ │ +00012380: 6569 6768 7473 2c3c 2f64 6976 3e0a 3c64 eights,
    . │ │ │ │ +000123a0: 3c61 2069 643d 226c 3030 3734 3922 206e 749 │ │ │ │ +000123f0: 2020 2020 2020 2020 636c 5f6d 656d 2064 cl_mem d │ │ │ │ +00012400: 7557 6569 6768 7473 2c3c 2f64 6976 3e0a uWeights,
    . │ │ │ │ +00012410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    751< │ │ │ │ +000124e0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000124f0: 2020 2020 2020 2020 2020 2020 3c73 7061 int │ │ │ │ +00012520: 2073 7461 7274 2c3c 2f64 6976 3e0a 3c64 start,
    . │ │ │ │ +00012540: 3c61 2069 643d 226c 3030 3735 3222 206e 752 │ │ │ │ +00012590: 2020 2020 2020 2020 3c73 7061 6e20 636c int end │ │ │ │ +000125c0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00012610: 2020 3735 333c 2f73 7061 6e3e 2020 2020 753 │ │ │ │ +00012620: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012630: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi │ │ │ │ +00012650: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int │ │ │ │ +00012680: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +00012690: 302c 3c2f 6469 763e 0a3c 6469 7620 636c 0,
    .
    754 │ │ │ │ +000126f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012700: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +00012730: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +00012740: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00012790: 2020 3735 353c 2f73 7061 6e3e 2020 2020 755 │ │ │ │ +000127a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000127b0: 2020 636c 5f65 7665 6e74 2a20 656e 6445 cl_event* endE │ │ │ │ +000127c0: 7665 6e74 3d4e 554c 4c29 203c 7370 616e vent=NULL) const;.
    7 │ │ │ │ +00012840: 3536 3c2f 7370 616e 3e20 3c2f 6469 763e 56
    │ │ │ │ +00012850: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00012880: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ +000128e0: 3832 333c 2f61 3e3c 2f73 7061 6e3e 2020 823 │ │ │ │ +000128f0: 2020 3c73 7061 6e20 636c 6173 733d 226b bool │ │ │ │ +00012910: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 EvalSte │ │ │ │ +00012970: 6e63 696c 733c 2f61 3e28 636c 5f6d 656d ncils(cl_mem │ │ │ │ +00012980: 2073 7263 2c20 3c61 2063 6c61 7373 3d22 src, BufferDescrip │ │ │ │ +000129c0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +000129e0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +000129f0: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +00012a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00012a10: 3e3c 6120 6964 3d22 6c30 3038 3234 2220 > 824 │ │ │ │ +00012a60: 2020 2020 2020 2020 2063 6c5f 6d65 6d20 cl_mem │ │ │ │ +00012a70: 6473 742c 203c 6120 636c 6173 733d 2263 dst, BufferDescript │ │ │ │ +00012ab0: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +00012ad0: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ +00012ae0: 7374 4465 7363 2c3c 2f64 6976 3e0a 3c64 stDesc,
    . │ │ │ │ +00012b00: 3c61 2069 643d 226c 3030 3832 3522 206e 825 │ │ │ │ +00012b50: 2020 2020 2020 2020 636c 5f6d 656d 2064 cl_mem d │ │ │ │ +00012b60: 752c 2020 3c61 2063 6c61 7373 3d22 636f u, BufferDescripto │ │ │ │ +00012ba0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00012bc0: 743c 2f73 7061 6e3e 2026 616d 703b 6475 t &du │ │ │ │ +00012bd0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +00012c10: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00012c20: 6e6f 223e 2020 3832 363c 2f73 7061 6e3e no"> 826 │ │ │ │ +00012c30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012c40: 2020 2020 2020 636c 5f6d 656d 2064 762c cl_mem dv, │ │ │ │ +00012c50: 2020 3c61 2063 6c61 7373 3d22 636f 6465 B │ │ │ │ +00012c80: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00012c90: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +00012cb0: 2f73 7061 6e3e 2026 616d 703b 6476 4465 /span> &dvDe │ │ │ │ +00012cc0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    827 │ │ │ │ +00012d20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012d30: 2020 2020 636c 5f6d 656d 2064 7575 2c20 cl_mem duu, │ │ │ │ +00012d40: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +00012d70: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &duuDes │ │ │ │ +00012db0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    828 │ │ │ │ +00012e10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012e20: 2020 2063 6c5f 6d65 6d20 6475 762c 203c cl_mem duv, < │ │ │ │ +00012e30: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00012e40: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00012e50: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00012e60: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00012e70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duvDesc │ │ │ │ +00012ea0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00012ef0: 2020 3832 393c 2f73 7061 6e3e 2020 2020 829 │ │ │ │ +00012f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00012f10: 2020 636c 5f6d 656d 2064 7676 2c20 3c61 cl_mem dvv, Buffe │ │ │ │ +00012f50: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +00012f60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dvvDesc, │ │ │ │ +00012f90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00012fe0: 2038 3330 3c2f 7370 616e 3e20 2020 2020 830 │ │ │ │ +00012ff0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013000: 2063 6c5f 6d65 6d20 7369 7a65 732c 3c2f cl_mem sizes,.
    8 │ │ │ │ +00013060: 3331 3c2f 7370 616e 3e20 2020 2020 2020 31 │ │ │ │ +00013070: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +00013080: 6c5f 6d65 6d20 6f66 6673 6574 732c 3c2f l_mem offsets,.
    8 │ │ │ │ +000130e0: 3332 3c2f 7370 616e 3e20 2020 2020 2020 32 │ │ │ │ +000130f0: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +00013100: 6c5f 6d65 6d20 696e 6469 6365 732c 3c2f l_mem indices,.
    8 │ │ │ │ +00013160: 3333 3c2f 7370 616e 3e20 2020 2020 2020 33 │ │ │ │ +00013170: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +00013180: 6c5f 6d65 6d20 7765 6967 6874 732c 3c2f l_mem weights,.
    8 │ │ │ │ +000131e0: 3334 3c2f 7370 616e 3e20 2020 2020 2020 34 │ │ │ │ +000131f0: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +00013200: 6c5f 6d65 6d20 6475 5765 6967 6874 732c l_mem duWeights, │ │ │ │ +00013210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00013260: 2038 3335 3c2f 7370 616e 3e20 2020 2020 835 │ │ │ │ +00013270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013280: 2063 6c5f 6d65 6d20 6476 5765 6967 6874 cl_mem dvWeight │ │ │ │ +00013290: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    836 │ │ │ │ +000132f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013300: 2020 2063 6c5f 6d65 6d20 6475 7557 6569 cl_mem duuWei │ │ │ │ +00013310: 6768 7473 2c3c 2f64 6976 3e0a 3c64 6976 ghts,
    .
    < │ │ │ │ +00013350: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00013360: 6e6f 223e 2020 3833 373c 2f73 7061 6e3e no"> 837 │ │ │ │ +00013370: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013380: 2020 2020 2020 636c 5f6d 656d 2064 7576 cl_mem duv │ │ │ │ +00013390: 5765 6967 6874 732c 3c2f 6469 763e 0a3c Weights,
    .< │ │ │ │ +000133a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000133b0: 3e3c 6120 6964 3d22 6c30 3038 3338 2220 > 838 │ │ │ │ +00013400: 2020 2020 2020 2020 2063 6c5f 6d65 6d20 cl_mem │ │ │ │ +00013410: 6476 7657 6569 6768 7473 2c3c 2f64 6976 dvvWeights,
    .
    839< │ │ │ │ +00013470: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00013480: 2020 2020 2020 2020 2020 2020 3c73 7061 int │ │ │ │ +000134b0: 2073 7461 7274 2c3c 2f64 6976 3e0a 3c64 start,
    . │ │ │ │ +000134d0: 3c61 2069 643d 226c 3030 3834 3022 206e 840 │ │ │ │ +00013520: 2020 2020 2020 2020 3c73 7061 6e20 636c int end │ │ │ │ +00013550: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000135a0: 2020 3834 313c 2f73 7061 6e3e 2020 2020 841 │ │ │ │ +000135b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000135c0: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi │ │ │ │ +000135e0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int │ │ │ │ +00013610: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +00013620: 302c 3c2f 6469 763e 0a3c 6469 7620 636c 0,
    .
    842 │ │ │ │ +00013680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013690: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +000136c0: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +000136d0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00013720: 2020 3834 333c 2f73 7061 6e3e 2020 2020 843 │ │ │ │ +00013730: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00013740: 2020 636c 5f65 7665 6e74 2a20 656e 6445 cl_event* endE │ │ │ │ +00013750: 7665 6e74 3d4e 554c 4c29 203c 7370 616e vent=NULL) const;.
    8 │ │ │ │ +000137d0: 3434 3c2f 7370 616e 3e20 3c2f 6469 763e 44
    │ │ │ │ +000137e0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00013850: 6120 6964 3d22 6c30 3038 3939 2220 6e61 a id="l00899" na │ │ │ │ +00013860: 6d65 3d22 6c30 3038 3939 223e 3c2f 613e me="l00899"> │ │ │ │ +00013870: 3c73 7061 6e20 636c 6173 733d 226c 696e 899 templ │ │ │ │ +000138b0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +000138c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000138d0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    SRC_BUFFER, │ │ │ │ +000138f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +00013910: 2f73 7061 6e3e 2044 5354 5f42 5546 4645 /span> DST_BUFFE │ │ │ │ +00013920: 522c 3c2f 6469 763e 0a3c 6469 7620 636c R,
    .
    900 │ │ │ │ +00013980: 2020 2020 2020 2020 2020 203c 7370 616e typename │ │ │ │ +000139b0: 2050 4154 4348 434f 4f52 445f 4255 4646 PATCHCOORD_BUFF │ │ │ │ +000139c0: 4552 2c20 3c73 7061 6e20 636c 6173 733d ER, typena │ │ │ │ +000139e0: 6d65 3c2f 7370 616e 3e20 5041 5443 485f me PATCH_ │ │ │ │ +000139f0: 5441 424c 452c 3c2f 6469 763e 0a3c 6469 TABLE,
    .< │ │ │ │ +00013a10: 6120 6964 3d22 6c30 3039 3031 2220 6e61 a id="l00901" na │ │ │ │ +00013a20: 6d65 3d22 6c30 3039 3031 223e 3c2f 613e me="l00901"> │ │ │ │ +00013a30: 3c73 7061 6e20 636c 6173 733d 226c 696e 901 < │ │ │ │ +00013a60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00013a70: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename DEVICE_CONT │ │ │ │ +00013a90: 4558 5426 6774 3b3c 2f64 6976 3e0a 3c64 EXT>
    ..
    902 stati │ │ │ │ +00013ba0: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c bool < │ │ │ │ +00013bd0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00013be0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00013bf0: 2261 3031 3134 312e 6874 6d6c 2361 6235 "a01141.html#ab5 │ │ │ │ +00013c00: 6361 6537 6538 3935 6632 6566 6539 3535 cae7e895f2efe955 │ │ │ │ +00013c10: 6232 3761 6533 6461 6663 6366 6432 223e b27ae3dafccfd2"> │ │ │ │ +00013c20: 4576 616c 5061 7463 6865 733c 2f61 3e28 EvalPatches( │ │ │ │ +00013c30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00013c80: 2039 3033 3c2f 7370 616e 3e20 2020 2020 903 │ │ │ │ +00013c90: 2020 2053 5243 5f42 5546 4645 5220 2a73 SRC_BUFFER *s │ │ │ │ +00013ca0: 7263 4275 6666 6572 2c20 3c61 2063 6c61 rcBuffer, BufferDes │ │ │ │ +00013ce0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +00013d10: 616d 703b 7372 6344 6573 632c 3c2f 6469 amp;srcDesc,.
    904 │ │ │ │ +00013d70: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +00013d80: 5354 5f42 5546 4645 5220 2a64 7374 4275 ST_BUFFER *dstBu │ │ │ │ +00013d90: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +00013dd0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00013df0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +00013e00: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ +00013e10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00013e20: 3e3c 6120 6964 3d22 6c30 3039 3035 2220 > 905 int │ │ │ │ +00013e90: 6e75 6d50 6174 6368 436f 6f72 6473 2c3c numPatchCoords,< │ │ │ │ +00013ea0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00013ef0: 3930 363c 2f73 7061 6e3e 2020 2020 2020 906 │ │ │ │ +00013f00: 2020 5041 5443 4843 4f4f 5244 5f42 5546 PATCHCOORD_BUF │ │ │ │ +00013f10: 4645 5220 2a70 6174 6368 436f 6f72 6473 FER *patchCoords │ │ │ │ +00013f20: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00013f70: 2020 3930 373c 2f73 7061 6e3e 2020 2020 907 │ │ │ │ +00013f80: 2020 2020 5041 5443 485f 5441 424c 4520 PATCH_TABLE │ │ │ │ +00013f90: 2a70 6174 6368 5461 626c 652c 3c2f 6469 *patchTable,.
    908 │ │ │ │ +00013ff0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00014000: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00014010: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ +00014020: 3131 3431 2e68 746d 6c22 3e43 4c45 7661 1141.html">CLEva │ │ │ │ +00014030: 6c75 6174 6f72 3c2f 613e 203c 7370 616e luator const *i │ │ │ │ +00014060: 6e73 7461 6e63 652c 3c2f 6469 763e 0a3c nstance,
    .< │ │ │ │ +00014070: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00014080: 3e3c 6120 6964 3d22 6c30 3039 3039 2220 > 909 DEVIC │ │ │ │ +000140d0: 455f 434f 4e54 4558 5420 6465 7669 6365 E_CONTEXT device │ │ │ │ +000140e0: 436f 6e74 6578 742c 3c2f 6469 763e 0a3c Context,
    .< │ │ │ │ +000140f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00014100: 3e3c 6120 6964 3d22 6c30 3039 3130 2220 > 910 unsigned i │ │ │ │ +00014190: 6e74 3c2f 7370 616e 3e20 6e75 6d53 7461 nt numSta │ │ │ │ +000141a0: 7274 4576 656e 7473 3d30 2c3c 2f64 6976 rtEvents=0,
    .
    487< │ │ │ │ -00014200: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ -00014220: 5468 6520 6265 6e65 6669 7420 6f66 2073 The benefit of s │ │ │ │ -00014230: 7570 706f 7274 696e 6720 7370 6563 6966 upporting specif │ │ │ │ -00014240: 6965 6420 5275 6c65 7320 6973 2074 6861 ied Rules is tha │ │ │ │ -00014250: 7420 7468 6579 2063 616e 206f 6674 656e t they can often │ │ │ │ -00014260: 2062 6520 7472 6976 6961 6c6c 793c 2f73 be trivially
    .
    488< │ │ │ │ -000142d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000142e0: 656e 7422 3e2f 2f20 2064 6574 6572 6d69 ent">// determi │ │ │ │ -000142f0: 6e65 6420 6672 6f6d 2063 6f6e 7465 7874 ned from context │ │ │ │ -00014300: 2028 652e 672e 2061 2076 6572 7465 7820 (e.g. a vertex │ │ │ │ -00014310: 6465 7269 7665 6420 6672 6f6d 2061 2066 derived from a f │ │ │ │ -00014320: 6163 6520 6174 2061 2070 7265 7669 6f75 ace at a previou │ │ │ │ -00014330: 7320 6c65 7665 6c20 7769 6c6c 2061 6c77 s level will alw │ │ │ │ -00014340: 6179 733c 2f73 7061 6e3e 3c2f 6469 763e ays
    │ │ │ │ -00014350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00014380: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 489// b │ │ │ │ -000143c0: 6520 736d 6f6f 7468 2920 7261 7468 6572 e smooth) rather │ │ │ │ -000143d0: 2074 6861 6e20 6d6f 7265 2067 656e 6572 than more gener │ │ │ │ -000143e0: 616c 6c79 2c20 616e 6420 6174 2067 7265 ally, and at gre │ │ │ │ -000143f0: 6174 6572 2063 6f73 742c 2069 6e73 7065 ater cost, inspe │ │ │ │ -00014400: 6374 696e 6720 6e65 6967 6862 6f72 696e cting neighborin │ │ │ │ -00014410: 6720 616e 643c 2f73 7061 6e3e 3c2f 6469 g and.
    490 │ │ │ │ -00014470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ -00014490: 2074 6865 7920 6172 6520 6f66 7465 6e20 they are often │ │ │ │ -000144a0: 7468 6520 7361 6d65 2066 6f72 2070 6172 the same for par │ │ │ │ -000144b0: 656e 7420 616e 6420 6368 696c 642e 3c2f ent and child.
    .
    < │ │ │ │ -00014500: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014510: 6e6f 223e 2020 3439 313c 2f73 7061 6e3e no"> 491 │ │ │ │ -00014520: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -00014540: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00014590: 3439 323c 2f73 7061 6e3e 3c73 7061 6e20 492 │ │ │ │ -000145b0: 2f2f 2020 5468 6520 6f76 6572 616c 6c20 // The overall │ │ │ │ -000145c0: 7072 6f63 6573 7320 6973 2061 7320 666f process is as fo │ │ │ │ -000145d0: 6c6c 6f77 733a 3c2f 7370 616e 3e3c 2f64 llows:.
    49 │ │ │ │ -00014630: 333c 2f73 7061 6e3e 3c73 7061 6e20 636c 3// │ │ │ │ -00014650: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00014670: 3c61 2069 643d 226c 3030 3439 3422 206e 494// │ │ │ │ -000146d0: 2d20 7175 6963 6b6c 7920 6465 7465 6374 - quickly detect │ │ │ │ -000146e0: 2074 6865 206d 6f73 7420 636f 6d6d 6f6e the most common │ │ │ │ -000146f0: 2053 6d6f 6f74 6820 6361 7365 2077 6865 Smooth case whe │ │ │ │ -00014700: 6e20 7370 6563 6966 6965 6420 616e 6420 n specified and │ │ │ │ -00014710: 7265 7475 726e 3c2f 7370 616e 3e3c 2f64 return.
    49 │ │ │ │ -00014770: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5// │ │ │ │ -00014790: 2020 2020 2020 2d20 6465 7465 726d 696e - determin │ │ │ │ -000147a0: 6520 6966 2073 6861 7270 6e65 7373 2066 e if sharpness f │ │ │ │ -000147b0: 6f72 2070 6172 656e 7420 6973 2072 6571 or parent is req │ │ │ │ -000147c0: 7569 7265 6420 616e 6420 6761 7468 6572 uired and gather │ │ │ │ -000147d0: 2069 6620 736f 3c2f 7370 616e 3e3c 2f64 if so.
    49 │ │ │ │ -00014830: 363c 2f73 7061 6e3e 3c73 7061 6e20 636c 6// │ │ │ │ -00014850: 2020 2020 2020 2d20 6966 2075 6e73 7065 - if unspe │ │ │ │ -00014860: 6369 6669 6564 2c20 6465 7465 726d 696e cified, determin │ │ │ │ -00014870: 6520 7468 6520 7061 7265 6e74 2072 756c e the parent rul │ │ │ │ -00014880: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -00014890: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000148a0: 3e3c 6120 6964 3d22 6c30 3034 3937 2220 > 497// │ │ │ │ -00014900: 202d 2061 7373 6967 6e20 6d61 736b 2066 - assign mask f │ │ │ │ -00014910: 6f72 2074 6865 2070 6172 656e 7420 7275 or the parent ru │ │ │ │ -00014920: 6c65 202d 2d20 7265 7475 726e 696e 6720 le -- returning │ │ │ │ -00014930: 6966 2053 6d6f 6f74 682f 4461 7274 3c2f if Smooth/Dart
    .
    < │ │ │ │ -00014980: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014990: 6e6f 223e 2020 3439 383c 2f73 7061 6e3e no"> 498 │ │ │ │ -000149a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // - │ │ │ │ -000149c0: 7265 7475 726e 2069 6620 6368 696c 6420 return if child │ │ │ │ -000149d0: 7275 6c65 206d 6174 6368 6573 2070 6172 rule matches par │ │ │ │ -000149e0: 656e 743c 2f73 7061 6e3e 3c2f 6469 763e ent
    │ │ │ │ -000149f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00014a20: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 499// │ │ │ │ -00014a60: 2020 202d 2067 6174 6865 7220 7368 6172 - gather shar │ │ │ │ -00014a70: 706e 6573 7320 666f 7220 6368 696c 6420 pness for child │ │ │ │ -00014a80: 746f 2064 6574 6572 6d69 6e65 206f 7220 to determine or │ │ │ │ -00014a90: 636f 6d62 696e 6520 6368 696c 6420 7275 combine child ru │ │ │ │ -00014aa0: 6c65 3c2f 7370 616e 3e3c 2f64 6976 3e0a le
    . │ │ │ │ -00014ab0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    501// - as │ │ │ │ -00014bf0: 7369 676e 206c 6f63 616c 206d 6173 6b20 sign local mask │ │ │ │ -00014c00: 666f 7220 6368 696c 6420 7275 6c65 3c2f for child rule
    .
    < │ │ │ │ -00014c50: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014c60: 6e6f 223e 2020 3530 323c 2f73 7061 6e3e no"> 502 │ │ │ │ -00014c70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // - │ │ │ │ -00014c90: 636f 6d62 696e 6520 6c6f 6361 6c20 6368 combine local ch │ │ │ │ -00014ca0: 696c 6420 6d61 736b 2077 6974 6820 7468 ild mask with th │ │ │ │ -00014cb0: 6520 7061 7265 6e74 206d 6173 6b3c 2f73 e parent mask
    .
    503< │ │ │ │ -00014d20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00014d30: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    5 │ │ │ │ -00014d90: 3034 3c2f 7370 616e 3e3c 7370 616e 2063 04/ │ │ │ │ -00014db0: 2f20 2052 656d 656d 6265 7220 2d2d 2069 / Remember -- i │ │ │ │ -00014dc0: 6620 7468 6520 7061 7265 6e74 2072 756c f the parent rul │ │ │ │ -00014dd0: 6520 6973 2073 7065 6369 6669 6564 2062 e is specified b │ │ │ │ -00014de0: 7574 2074 6865 2063 6869 6c64 2069 7320 ut the child is │ │ │ │ -00014df0: 6e6f 742c 2074 6869 7320 696d 706c 6965 not, this implie │ │ │ │ -00014e00: 7320 6f6e 6c79 206f 6e65 3c2f 7370 616e s only one
    .
    │ │ │ │ -00014e60: 2020 3530 353c 2f73 7061 6e3e 3c73 7061 505// of the two │ │ │ │ -00014e90: 206f 7074 696f 6e61 6c20 7275 6c65 7320 optional rules │ │ │ │ -00014ea0: 7761 7320 7370 6563 6966 6965 6420 616e was specified an │ │ │ │ -00014eb0: 6420 6973 206d 6561 6e74 2074 6f20 696e d is meant to in │ │ │ │ -00014ec0: 6469 6361 7465 2074 6865 7265 2069 7320 dicate there is │ │ │ │ -00014ed0: 6e6f 2074 7261 6e73 6974 696f 6e2c 3c2f no transition,
    .
    < │ │ │ │ -00014f20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014f30: 6e6f 223e 2020 3530 363c 2f73 7061 6e3e no"> 506 │ │ │ │ -00014f40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // so the │ │ │ │ -00014f60: 2063 6869 6c64 2072 756c 6520 7368 6f75 child rule shou │ │ │ │ -00014f70: 6c64 2062 6520 6173 7369 676e 6564 2074 ld be assigned t │ │ │ │ -00014f80: 6f20 6265 2074 6865 2073 616d 6520 2877 o be the same (w │ │ │ │ -00014f90: 6973 6820 7468 6520 636f 6d70 696c 6572 ish the compiler │ │ │ │ -00014fa0: 2077 6f75 6c64 2061 6c6c 6f77 2074 6869 would allow thi │ │ │ │ -00014fb0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ -00014fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00014fd0: 3e3c 6120 6964 3d22 6c30 3035 3037 2220 > 507// in │ │ │ │ -00015030: 6465 6661 756c 7420 7661 6c75 6520 6173 default value as │ │ │ │ -00015040: 7369 676e 6d65 6e74 292e 3c2f 7370 616e signment).
    .
    │ │ │ │ -000150a0: 2020 3530 383c 2f73 7061 6e3e 3c73 7061 508//
    .
    509< │ │ │ │ -00015120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ -00015140: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ -00015150: 5363 6865 6d65 5479 7065 2053 4348 454d SchemeType SCHEM │ │ │ │ -00015160: 4526 6774 3b3c 2f64 6976 3e0a 3c64 6976 E>
    .
    < │ │ │ │ -000151a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000151b0: 6e6f 223e 2020 3531 303c 2f73 7061 6e3e no"> 510 │ │ │ │ -000151c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ -00015200: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -00015210: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ -00015230: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ -00015240: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ -00015260: 6120 6964 3d22 6c30 3035 3131 2220 6e61 a id="l00511" na │ │ │ │ -00015270: 6d65 3d22 6c30 3035 3131 223e 3c2f 613e me="l00511"> │ │ │ │ -00015280: 3c73 7061 6e20 636c 6173 733d 226c 696e 511void< │ │ │ │ -000152c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    ...
    513< │ │ │ │ -000154c0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -000154d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000154e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000154f0: 204d 4153 4b26 616d 703b 2020 2020 2020 MASK& │ │ │ │ -00015500: 2020 2020 206d 6173 6b2c 3c2f 6469 763e mask,
    │ │ │ │ -00015510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00015540: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 514 │ │ │ │ -00015570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015580: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015590: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ -000155f0: 3c2f 613e 2070 5275 6c65 2c3c 2f64 6976 pRule,
    .
    515< │ │ │ │ -00015650: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00015660: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015680: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::Rul │ │ │ │ -000156e0: 653c 2f61 3e20 6352 756c 6529 3c73 7061 e cRule) const │ │ │ │ -00015710: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -00015760: 2020 3531 363c 2f73 7061 6e3e 203c 2f64 516 .
    51 │ │ │ │ -000157c0: 373c 2f73 7061 6e3e 2020 2020 3c73 7061 7 // Quick assi │ │ │ │ -000157f0: 676e 6d65 6e74 2061 6e64 2072 6574 7572 gnment and retur │ │ │ │ -00015800: 6e20 666f 7220 7468 6520 6d6f 7374 2063 n for the most c │ │ │ │ -00015810: 6f6d 6d6f 6e20 6361 7365 3a3c 2f73 7061 ommon case:
    .
    518 │ │ │ │ -00015880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if ((pRule == │ │ │ │ -000158b0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::RULE_ │ │ │ │ -00015930: 534d 4f4f 5448 3c2f 613e 2920 7c7c 2028 SMOOTH) || ( │ │ │ │ -00015940: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ -000159c0: 7365 3a3a 5255 4c45 5f44 4152 543c 2f61 se::RULE_DART)) {
    .
    < │ │ │ │ -00015a10: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00015a20: 6e6f 223e 2020 3531 393c 2f73 7061 6e3e no"> 519 │ │ │ │ -00015a30: 2020 2020 2020 2020 6173 7369 676e 536d assignSm │ │ │ │ -00015a40: 6f6f 7468 4d61 736b 466f 7256 6572 7465 oothMaskForVerte │ │ │ │ -00015a50: 7828 7665 7274 6578 2c20 6d61 736b 293b x(vertex, mask); │ │ │ │ -00015a60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00015ab0: 2035 3230 3c2f 7370 616e 3e20 2020 2020 520 │ │ │ │ -00015ac0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -00015ae0: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    521< │ │ │ │ -00015b40: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    522< │ │ │ │ -00015ba0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00015bc0: 2f2f 2020 4966 2075 6e73 7065 6369 6669 // If unspecifi │ │ │ │ -00015bd0: 6564 2c20 6173 7369 676e 2074 6865 2063 ed, assign the c │ │ │ │ -00015be0: 6869 6c64 2072 756c 6520 746f 206d 6174 hild rule to mat │ │ │ │ -00015bf0: 6368 2074 6865 2070 6172 656e 7420 7275 ch the parent ru │ │ │ │ -00015c00: 6c65 2069 6620 7370 6563 6966 6965 643a le if specified: │ │ │ │ -00015c10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00015c30: 3c61 2069 643d 226c 3030 3532 3322 206e 523 │ │ │ │ -00015c90: 6966 3c2f 7370 616e 3e20 2828 6352 756c if ((cRul │ │ │ │ -00015ca0: 6520 3d3d 203c 6120 636c 6173 733d 2263 e == Crease:: │ │ │ │ -00015d20: 5255 4c45 5f55 4e4b 4e4f 574e 3c2f 613e RULE_UNKNOWN │ │ │ │ -00015d30: 2920 2661 6d70 3b26 616d 703b 2028 7052 ) && (pR │ │ │ │ -00015d40: 756c 6520 213d 203c 6120 636c 6173 733d ule != Crease │ │ │ │ -00015dc0: 3a3a 5255 4c45 5f55 4e4b 4e4f 574e 3c2f ::RULE_UNKNOWN)) {
    .< │ │ │ │ -00015df0: 6120 6964 3d22 6c30 3035 3234 2220 6e61 a id="l00524" na │ │ │ │ -00015e00: 6d65 3d22 6c30 3035 3234 223e 3c2f 613e me="l00524"> │ │ │ │ -00015e10: 3c73 7061 6e20 636c 6173 733d 226c 696e 524 cRule = │ │ │ │ -00015e40: 2070 5275 6c65 3b3c 2f64 6976 3e0a 3c64 pRule;
    . │ │ │ │ -00015e60: 3c61 2069 643d 226c 3030 3532 3522 206e 525 }
    . │ │ │ │ -00015ec0: 3c61 2069 643d 226c 3030 3532 3622 206e 526 │ │ │ │ -00015f20: 696e 743c 2f73 7061 6e3e 2076 616c 656e int valen │ │ │ │ -00015f30: 6365 203d 2076 6572 7465 782e 4765 744e ce = vertex.GetN │ │ │ │ -00015f40: 756d 4564 6765 7328 293b 3c2f 6469 763e umEdges();
    │ │ │ │ -00015f50: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00015fc0: 6120 6964 3d22 6c30 3035 3238 2220 6e61 a id="l00528" na │ │ │ │ -00015fd0: 6d65 3d22 6c30 3035 3238 223e 3c2f 613e me="l00528"> │ │ │ │ -00015fe0: 3c73 7061 6e20 636c 6173 733d 226c 696e 528 //
    .
    529 │ │ │ │ -00016080: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Det │ │ │ │ -000160a0: 6572 6d69 6e65 2069 6620 7765 206e 6565 ermine if we nee │ │ │ │ -000160b0: 6420 7468 6520 7061 7265 6e74 2065 6467 d the parent edg │ │ │ │ -000160c0: 6520 7368 6172 706e 6573 7320 7661 6c75 e sharpness valu │ │ │ │ -000160d0: 6573 202d 2d20 6964 656e 7469 6679 2f67 es -- identify/g │ │ │ │ -000160e0: 6174 6865 7220 6966 2073 6f3c 2f73 7061 ather if so
    .
    530 │ │ │ │ -00016150: 203c 7370 616e 2063 6c61 7373 3d22 636f // and u │ │ │ │ -00016170: 7365 2069 7420 746f 2063 6f6d 7075 7465 se it to compute │ │ │ │ -00016180: 2074 6865 2070 6172 656e 7420 7275 6c65 the parent rule │ │ │ │ -00016190: 2069 6620 756e 7370 6563 6966 6965 643a if unspecified: │ │ │ │ -000161a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -000161c0: 3c61 2069 643d 226c 3030 3533 3122 206e 531 //
    .
    < │ │ │ │ -00016260: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00016270: 6e6f 223e 2020 3533 323c 2f73 7061 6e3e no"> 532 │ │ │ │ -00016280: 2020 2020 3c73 7061 6e20 636c 6173 733d fl │ │ │ │ -000162a0: 6f61 743c 2f73 7061 6e3e 202a 2070 4564 oat * pEd │ │ │ │ -000162b0: 6765 5368 6172 706e 6573 7342 7566 6665 geSharpnessBuffe │ │ │ │ -000162c0: 7220 3d20 283c 7370 616e 2063 6c61 7373 r = (f │ │ │ │ -000162e0: 6c6f 6174 3c2f 7370 616e 3e20 2a29 616c loat *)al │ │ │ │ -000162f0: 6c6f 6361 2876 616c 656e 6365 2a3c 7370 loca(valence*sizeof │ │ │ │ -00016320: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (float │ │ │ │ -00016340: 3c2f 7370 616e 3e29 292c 3c2f 6469 763e )),
    │ │ │ │ -00016350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00016380: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 533 * │ │ │ │ -000163b0: 2070 4564 6765 5368 6172 706e 6573 7320 pEdgeSharpness │ │ │ │ -000163c0: 2020 3d20 302c 3c2f 6469 763e 0a3c 6469 = 0,
    .< │ │ │ │ -000163e0: 6120 6964 3d22 6c30 3035 3334 2220 6e61 a id="l00534" na │ │ │ │ -000163f0: 6d65 3d22 6c30 3035 3334 223e 3c2f 613e me="l00534"> │ │ │ │ -00016400: 3c73 7061 6e20 636c 6173 733d 226c 696e 534 pVe │ │ │ │ -00016430: 7274 6578 5368 6172 706e 6573 7320 3d20 rtexSharpness = │ │ │ │ -00016440: 302e 3066 3b3c 2f64 6976 3e0a 3c64 6976 0.0f;
    .
    < │ │ │ │ -00016480: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00016490: 6e6f 223e 2020 3533 353c 2f73 7061 6e3e no"> 535 │ │ │ │ -000164a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -000164f0: 2020 3533 363c 2f73 7061 6e3e 2020 2020 536 │ │ │ │ -00016500: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool requirePar │ │ │ │ -00016530: 656e 7453 6861 7270 6e65 7373 203d 2028 entSharpness = ( │ │ │ │ -00016540: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ -000165c0: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ -000165d0: 3c2f 613e 2920 7c7c 3c2f 6469 763e 0a3c ) ||
    .< │ │ │ │ -000165e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000165f0: 3e3c 6120 6964 3d22 6c30 3035 3337 2220 > 537 │ │ │ │ -00016640: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00016650: 2020 2020 2028 7052 756c 6520 3d3d 203c (pRule == < │ │ │ │ -00016660: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00016670: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ -00016680: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ -00016690: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ -000166a0: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ -000166b0: 3936 3666 6131 6165 3861 6562 3835 3837 966fa1ae8aeb8587 │ │ │ │ -000166c0: 6334 3938 6366 3661 3932 6363 3333 3335 c498cf6a92cc3335 │ │ │ │ -000166d0: 223e 4372 6561 7365 3a3a 5255 4c45 5f43 ">Crease::RULE_C │ │ │ │ -000166e0: 5245 4153 453c 2f61 3e29 207c 7c3c 2f64 REASE) ||.
    53 │ │ │ │ -00016740: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ -00016750: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00016760: 2020 2020 2020 2020 2020 2870 5275 6c65 (pRule │ │ │ │ -00016770: 2021 3d20 6352 756c 6529 3b3c 2f64 6976 != cRule);
    .
    539< │ │ │ │ -000167d0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (r │ │ │ │ -00016800: 6571 7569 7265 5061 7265 6e74 5368 6172 equireParentShar │ │ │ │ -00016810: 706e 6573 7329 207b 3c2f 6469 763e 0a3c pness) {
    .< │ │ │ │ -00016820: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00016830: 3e3c 6120 6964 3d22 6c30 3035 3430 2220 > 540 pVert │ │ │ │ -00016880: 6578 5368 6172 706e 6573 7320 3d20 7665 exSharpness = ve │ │ │ │ -00016890: 7274 6578 2e47 6574 5368 6172 706e 6573 rtex.GetSharpnes │ │ │ │ -000168a0: 7328 293b 3c2f 6469 763e 0a3c 6469 7620 s();
    .
    541 │ │ │ │ -00016900: 2020 2020 2020 2070 4564 6765 5368 6172 pEdgeShar │ │ │ │ -00016910: 706e 6573 7320 2020 3d20 7665 7274 6578 pness = vertex │ │ │ │ -00016920: 2e47 6574 5368 6172 706e 6573 7350 6572 .GetSharpnessPer │ │ │ │ -00016930: 4564 6765 2870 4564 6765 5368 6172 706e Edge(pEdgeSharpn │ │ │ │ -00016940: 6573 7342 7566 6665 7229 3b3c 2f64 6976 essBuffer);
    .
    542< │ │ │ │ -000169a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -000169c0: 3c61 2069 643d 226c 3030 3534 3322 206e 543 if (p │ │ │ │ -00016a30: 5275 6c65 203d 3d20 3c61 2063 6c61 7373 Rule == Creas │ │ │ │ -00016ab0: 653a 3a52 554c 455f 554e 4b4e 4f57 4e3c e::RULE_UNKNOWN< │ │ │ │ -00016ac0: 2f61 3e29 207b 3c2f 6469 763e 0a3c 6469 /a>) {
    .< │ │ │ │ -00016ae0: 6120 6964 3d22 6c30 3035 3434 2220 6e61 a id="l00544" na │ │ │ │ -00016af0: 6d65 3d22 6c30 3035 3434 223e 3c2f 613e me="l00544"> │ │ │ │ -00016b00: 3c73 7061 6e20 636c 6173 733d 226c 696e 544 pRu │ │ │ │ -00016b30: 6c65 203d 203c 6120 636c 6173 733d 2263 le = Crease(_opt │ │ │ │ -00016b70: 696f 6e73 292e 3c61 2063 6c61 7373 3d22 ions).Determine │ │ │ │ -00016bd0: 5665 7274 6578 5665 7274 6578 5275 6c65 VertexVertexRule │ │ │ │ -00016be0: 3c2f 613e 2870 5665 7274 6578 5368 6172 (pVertexShar │ │ │ │ -00016bf0: 706e 6573 732c 2076 616c 656e 6365 2c20 pness, valence, │ │ │ │ -00016c00: 7045 6467 6553 6861 7270 6e65 7373 293b pEdgeSharpness); │ │ │ │ -00016c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00016c60: 2035 3435 3c2f 7370 616e 3e20 2020 2020 545 │ │ │ │ -00016c70: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    546 │ │ │ │ -00016cd0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    547 │ │ │ │ -00016d30: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ -00016d50: 2f73 7061 6e3e 2028 2870 5275 6c65 203d /span> ((pRule = │ │ │ │ -00016d60: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = Crease::RUL │ │ │ │ -00016de0: 455f 534d 4f4f 5448 3c2f 613e 2920 7c7c E_SMOOTH) || │ │ │ │ -00016df0: 2028 7052 756c 6520 3d3d 203c 6120 636c (pRule == Cr │ │ │ │ -00016e70: 6561 7365 3a3a 5255 4c45 5f44 4152 543c ease::RULE_DART< │ │ │ │ -00016e80: 2f61 3e29 2920 7b3c 2f64 6976 3e0a 3c64 /a>)) {
    . │ │ │ │ -00016ea0: 3c61 2069 643d 226c 3030 3534 3822 206e 548 assign │ │ │ │ -00016ef0: 536d 6f6f 7468 4d61 736b 466f 7256 6572 SmoothMaskForVer │ │ │ │ -00016f00: 7465 7828 7665 7274 6578 2c20 6d61 736b tex(vertex, mask │ │ │ │ -00016f10: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    549 │ │ │ │ -00016f70: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ -00016f90: 6574 7572 6e3c 2f73 7061 6e3e 3b20 203c eturn; < │ │ │ │ -00016fa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00016fb0: 656e 7422 3e2f 2f20 2041 7320 646f 6e65 ent">// As done │ │ │ │ -00016fc0: 206f 6e20 656e 7472 792c 2077 6520 6361 on entry, we ca │ │ │ │ -00016fd0: 6e20 7265 7475 726e 2069 6d6d 6564 6961 n return immedia │ │ │ │ -00016fe0: 7465 6c79 2069 6620 7061 7265 6e74 2069 tely if parent i │ │ │ │ -00016ff0: 7320 536d 6f6f 7468 2f44 6172 743c 2f73 s Smooth/Dart
    .
    550 │ │ │ │ -00017060: 2020 207d 203c 7370 616e 2063 6c61 7373 } e │ │ │ │ -00017080: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if ( │ │ │ │ -000170b0: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ -00017130: 7365 3a3a 5255 4c45 5f43 5245 4153 453c se::RULE_CREASE< │ │ │ │ -00017140: 2f61 3e29 207b 3c2f 6469 763e 0a3c 6469 /a>) {
    .< │ │ │ │ -00017160: 6120 6964 3d22 6c30 3035 3531 2220 6e61 a id="l00551" na │ │ │ │ -00017170: 6d65 3d22 6c30 3035 3531 223e 3c2f 613e me="l00551"> │ │ │ │ -00017180: 3c73 7061 6e20 636c 6173 733d 226c 696e 551 int cr │ │ │ │ -000171d0: 6561 7365 456e 6473 5b32 5d3b 3c2f 6469 easeEnds[2];.
    552 │ │ │ │ -00017230: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -00017240: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00017250: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ -00017260: 3133 3235 2e68 746d 6c22 3e43 7265 6173 1325.html">Creas │ │ │ │ -00017270: 653c 2f61 3e28 5f6f 7074 696f 6e73 292e e(_options). │ │ │ │ -00017280: 3c61 2063 6c61 7373 3d22 636f 6465 2068 GetSharpEdgePai │ │ │ │ -000172e0: 724f 6643 7265 6173 653c 2f61 3e28 7045 rOfCrease(pE │ │ │ │ -000172f0: 6467 6553 6861 7270 6e65 7373 2c20 7661 dgeSharpness, va │ │ │ │ -00017300: 6c65 6e63 652c 2063 7265 6173 6545 6e64 lence, creaseEnd │ │ │ │ -00017310: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    553 < │ │ │ │ -00017370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -000173c0: 3535 343c 2f73 7061 6e3e 2020 2020 2020 554 │ │ │ │ -000173d0: 2020 6173 7369 676e 4372 6561 7365 4d61 assignCreaseMa │ │ │ │ -000173e0: 736b 466f 7256 6572 7465 7828 7665 7274 skForVertex(vert │ │ │ │ -000173f0: 6578 2c20 6d61 736b 2c20 6372 6561 7365 ex, mask, crease │ │ │ │ -00017400: 456e 6473 293b 3c2f 6469 763e 0a3c 6469 Ends);
    .< │ │ │ │ -00017420: 6120 6964 3d22 6c30 3035 3535 2220 6e61 a id="l00555" na │ │ │ │ -00017430: 6d65 3d22 6c30 3035 3535 223e 3c2f 613e me="l00555"> │ │ │ │ -00017440: 3c73 7061 6e20 636c 6173 733d 226c 696e 555 } else {.
    5 │ │ │ │ -000174e0: 3536 3c2f 7370 616e 3e20 2020 2020 2020 56 │ │ │ │ -000174f0: 2061 7373 6967 6e43 6f72 6e65 724d 6173 assignCornerMas │ │ │ │ -00017500: 6b46 6f72 5665 7274 6578 2876 6572 7465 kForVertex(verte │ │ │ │ -00017510: 782c 206d 6173 6b29 3b3c 2f64 6976 3e0a x, mask);
    . │ │ │ │ -00017520: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ -00017580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -00017670: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00017680: 6e6f 223e 2020 3535 393c 2f73 7061 6e3e no"> 559 │ │ │ │ -00017690: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -000176e0: 2020 3536 303c 2f73 7061 6e3e 2020 2020 560 │ │ │ │ -000176f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -00017710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00017760: 3536 313c 2f73 7061 6e3e 2020 2020 3c73 561 // Identify │ │ │ │ -00017790: 2f67 6174 6865 7220 6368 696c 6420 7368 /gather child sh │ │ │ │ -000177a0: 6172 706e 6573 7320 746f 2063 6f6d 6269 arpness to combi │ │ │ │ -000177b0: 6e65 206d 6173 6b73 2066 6f72 2074 6865 ne masks for the │ │ │ │ -000177c0: 2074 776f 2064 6966 6665 7269 6e67 2052 two differing R │ │ │ │ -000177d0: 756c 6573 3a3c 2f73 7061 6e3e 3c2f 6469 ules:.
    562 │ │ │ │ -00017830: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
    │ │ │ │ -00017860: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00017890: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 563 Crease │ │ │ │ -000178f0: 6372 6561 7365 285f 6f70 7469 6f6e 7329 crease(_options) │ │ │ │ -00017900: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00017950: 2020 3536 343c 2f73 7061 6e3e 203c 2f64 564 .
    56 │ │ │ │ -000179b0: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 float * cEdgeSharpn │ │ │ │ -000179f0: 6573 7342 7566 6665 7220 3d20 283c 7370 essBuffer = (float *)alloca(val │ │ │ │ -00017a30: 656e 6365 2a3c 7370 616e 2063 6c61 7373 ence*sizeo │ │ │ │ -00017a50: 663c 2f73 7061 6e3e 283c 7370 616e 2063 f(float) │ │ │ │ -00017a80: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    566 │ │ │ │ -00017ae0: 2020 2020 2020 202a 2063 4564 6765 5368 * cEdgeSh │ │ │ │ -00017af0: 6172 706e 6573 7320 3d20 7665 7274 6578 arpness = vertex │ │ │ │ -00017b00: 2e47 6574 4368 696c 6453 6861 7270 6e65 .GetChildSharpne │ │ │ │ -00017b10: 7373 5065 7245 6467 6528 6372 6561 7365 ssPerEdge(crease │ │ │ │ -00017b20: 2c20 6345 6467 6553 6861 7270 6e65 7373 , cEdgeSharpness │ │ │ │ -00017b30: 4275 6666 6572 292c 3c2f 6469 763e 0a3c Buffer),
    .< │ │ │ │ -00017b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00017b50: 3e3c 6120 6964 3d22 6c30 3035 3637 2220 > 567 c │ │ │ │ -00017ba0: 5665 7274 6578 5368 6172 706e 6573 7320 VertexSharpness │ │ │ │ -00017bb0: 3d20 7665 7274 6578 2e47 6574 4368 696c = vertex.GetChil │ │ │ │ -00017bc0: 6453 6861 7270 6e65 7373 2863 7265 6173 dSharpness(creas │ │ │ │ -00017bd0: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    568 < │ │ │ │ -00017c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>. │ │ │ │ -00017d50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00017d80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 570 cRu │ │ │ │ -00017db0: 6c65 203d 2063 7265 6173 652e 3c61 2063 le = crease.Det │ │ │ │ -00017e10: 6572 6d69 6e65 5665 7274 6578 5665 7274 ermineVertexVert │ │ │ │ -00017e20: 6578 5275 6c65 3c2f 613e 2863 5665 7274 exRule(cVert │ │ │ │ -00017e30: 6578 5368 6172 706e 6573 732c 2076 616c exSharpness, val │ │ │ │ -00017e40: 656e 6365 2c20 6345 6467 6553 6861 7270 ence, cEdgeSharp │ │ │ │ -00017e50: 6e65 7373 293b 3c2f 6469 763e 0a3c 6469 ness);
    .< │ │ │ │ -00017e70: 6120 6964 3d22 6c30 3035 3731 2220 6e61 a id="l00571" na │ │ │ │ -00017e80: 6d65 3d22 6c30 3035 3731 223e 3c2f 613e me="l00571"> │ │ │ │ -00017e90: 3c73 7061 6e20 636c 6173 733d 226c 696e 571 if (cR │ │ │ │ -00017ee0: 756c 6520 3d3d 2070 5275 6c65 2920 3c73 ule == pRule) return;
    .< │ │ │ │ -00017f30: 6120 6964 3d22 6c30 3035 3732 2220 6e61 a id="l00572" na │ │ │ │ -00017f40: 6d65 3d22 6c30 3035 3732 223e 3c2f 613e me="l00572"> │ │ │ │ -00017f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 572 }
    .< │ │ │ │ -00017f90: 6120 6964 3d22 6c30 3035 3733 2220 6e61 a id="l00573" na │ │ │ │ -00017fa0: 6d65 3d22 6c30 3035 3733 223e 3c2f 613e me="l00573"> │ │ │ │ -00017fb0: 3c73 7061 6e20 636c 6173 733d 226c 696e 573
    .
    574 │ │ │ │ -00018030: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ -00018050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000180a0: 2035 3735 3c2f 7370 616e 3e20 2020 203c 575 < │ │ │ │ -000180b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000180c0: 656e 7422 3e2f 2f20 2049 6e69 7469 616c ent">// Initial │ │ │ │ -000180d0: 697a 6520 6120 6c6f 6361 6c20 6368 696c ize a local chil │ │ │ │ -000180e0: 6420 6d61 736b 2c20 636f 6d70 7574 6520 d mask, compute │ │ │ │ -000180f0: 7468 6520 6672 6163 7469 6f6e 616c 2077 the fractional w │ │ │ │ -00018100: 6569 6768 7420 6672 6f6d 2070 6172 656e eight from paren │ │ │ │ -00018110: 7420 616e 6420 6368 696c 643c 2f73 7061 t and child
    .
    576 │ │ │ │ -00018180: 203c 7370 616e 2063 6c61 7373 3d22 636f // sharp │ │ │ │ -000181a0: 6e65 7373 2076 616c 7565 7320 616e 6420 ness values and │ │ │ │ -000181b0: 636f 6d62 696e 6520 7468 6520 7477 6f20 combine the two │ │ │ │ -000181c0: 6d61 736b 733a 3c2f 7370 616e 3e3c 2f64 masks:.
    57 │ │ │ │ -00018220: 373c 2f73 7061 6e3e 2020 2020 3c73 7061 7 //
    .
    578< │ │ │ │ -000182a0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -000182c0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef < │ │ │ │ -000182d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000182e0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename MASK::Weigh │ │ │ │ -00018300: 7420 5765 6967 6874 3b3c 2f64 6976 3e0a t Weight;
    . │ │ │ │ -00018310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -000183a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000183b0: 6e6f 223e 2020 3538 303c 2f73 7061 6e3e no"> 580 │ │ │ │ -000183c0: 2020 2020 5765 6967 6874 202a 2063 4d61 Weight * cMa │ │ │ │ -000183d0: 736b 5765 6967 6874 7320 3d20 2857 6569 skWeights = (Wei │ │ │ │ -000183e0: 6768 7420 2a29 616c 6c6f 6361 2828 3120 ght *)alloca((1 │ │ │ │ -000183f0: 2b20 3220 2a20 7661 6c65 6e63 6529 2a3c + 2 * valence)*< │ │ │ │ -00018400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00018410: 6f72 6422 3e73 697a 656f 663c 2f73 7061 ord">sizeof(Weight));..
    < │ │ │ │ -00018550: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00018560: 6e6f 223e 2020 3538 323c 2f73 7061 6e3e no"> 582 │ │ │ │ -00018570: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -000185c0: 2020 3538 333c 2f73 7061 6e3e 2020 2020 583 │ │ │ │ -000185d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if ((cRule == < │ │ │ │ -00018600: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00018610: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ -00018620: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ -00018630: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ -00018640: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ -00018650: 3631 6431 3337 6638 3636 3939 3765 6433 61d137f866997ed3 │ │ │ │ -00018660: 3639 3365 3366 6361 6437 3664 6566 3566 693e3fcad76def5f │ │ │ │ -00018670: 223e 4372 6561 7365 3a3a 5255 4c45 5f53 ">Crease::RULE_S │ │ │ │ -00018680: 4d4f 4f54 483c 2f61 3e29 207c 7c20 2863 MOOTH) || (c │ │ │ │ -00018690: 5275 6c65 203d 3d20 3c61 2063 6c61 7373 Rule == Creas │ │ │ │ -00018710: 653a 3a52 554c 455f 4441 5254 3c2f 613e e::RULE_DART │ │ │ │ -00018720: 2929 207b 3c2f 6469 763e 0a3c 6469 7620 )) {
    .
    584 │ │ │ │ -00018780: 2020 2020 2020 2061 7373 6967 6e53 6d6f assignSmo │ │ │ │ -00018790: 6f74 684d 6173 6b46 6f72 5665 7274 6578 othMaskForVertex │ │ │ │ -000187a0: 2876 6572 7465 782c 2063 4d61 736b 293b (vertex, cMask); │ │ │ │ -000187b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00018800: 2035 3835 3c2f 7370 616e 3e20 2020 207d 585 } │ │ │ │ -00018810: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ -00018830: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (cRul │ │ │ │ -00018860: 6520 3d3d 203c 6120 636c 6173 733d 2263 e == Crease:: │ │ │ │ -000188e0: 5255 4c45 5f43 5245 4153 453c 2f61 3e29 RULE_CREASE) │ │ │ │ -000188f0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    586 │ │ │ │ -00018950: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ -00018970: 6e74 3c2f 7370 616e 3e20 6372 6561 7365 nt crease │ │ │ │ -00018980: 456e 6473 5b32 5d3b 3c2f 6469 763e 0a3c Ends[2];
    .< │ │ │ │ -00018990: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000189a0: 3e3c 6120 6964 3d22 6c30 3035 3837 2220 > 587 Crease(_options).Get │ │ │ │ -00018a80: 5368 6172 7045 6467 6550 6169 724f 6643 SharpEdgePairOfC │ │ │ │ -00018a90: 7265 6173 653c 2f61 3e28 6345 6467 6553 rease(cEdgeS │ │ │ │ -00018aa0: 6861 7270 6e65 7373 2c20 7661 6c65 6e63 harpness, valenc │ │ │ │ -00018ab0: 652c 2063 7265 6173 6545 6e64 7329 3b3c e, creaseEnds);< │ │ │ │ -00018ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00018b10: 3538 383c 2f73 7061 6e3e 203c 2f64 6976 588
    .
    589< │ │ │ │ -00018b70: 2f73 7061 6e3e 2020 2020 2020 2020 6173 /span> as │ │ │ │ -00018b80: 7369 676e 4372 6561 7365 4d61 736b 466f signCreaseMaskFo │ │ │ │ -00018b90: 7256 6572 7465 7828 7665 7274 6578 2c20 rVertex(vertex, │ │ │ │ -00018ba0: 634d 6173 6b2c 2063 7265 6173 6545 6e64 cMask, creaseEnd │ │ │ │ -00018bb0: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    590 │ │ │ │ -00018c10: 2020 7d20 3c73 7061 6e20 636c 6173 733d } el │ │ │ │ -00018c30: 7365 3c2f 7370 616e 3e20 7b3c 2f64 6976 se {
    .
    591< │ │ │ │ -00018c90: 2f73 7061 6e3e 2020 2020 2020 2020 6173 /span> as │ │ │ │ -00018ca0: 7369 676e 436f 726e 6572 4d61 736b 466f signCornerMaskFo │ │ │ │ -00018cb0: 7256 6572 7465 7828 7665 7274 6578 2c20 rVertex(vertex, │ │ │ │ -00018cc0: 634d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 cMask);
    . │ │ │ │ -00018ce0: 3c61 2069 643d 226c 3030 3539 3222 206e 592 }
    . │ │ │ │ -00018d40: 3c61 2069 643d 226c 3030 3539 3322 206e 593
    .
    594 │ │ │ │ -00018de0: 2020 5765 6967 6874 2070 5765 6967 6874 Weight pWeight │ │ │ │ -00018df0: 203d 2063 7265 6173 652e 3c61 2063 6c61 = crease.Compu │ │ │ │ -00018e50: 7465 4672 6163 7469 6f6e 616c 5765 6967 teFractionalWeig │ │ │ │ -00018e60: 6874 4174 5665 7274 6578 3c2f 613e 2870 htAtVertex(p │ │ │ │ -00018e70: 5665 7274 6578 5368 6172 706e 6573 732c VertexSharpness, │ │ │ │ -00018e80: 2063 5665 7274 6578 5368 6172 706e 6573 cVertexSharpnes │ │ │ │ -00018e90: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    595 │ │ │ │ +000141f0: 3d22 6c69 6e65 6e6f 223e 2020 3931 313c ="lineno"> 911< │ │ │ │ +00014200: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> const │ │ │ │ +00014230: 2063 6c5f 6576 656e 742a 2073 7461 7274 cl_event* start │ │ │ │ +00014240: 4576 656e 7473 3d4e 554c 4c2c 3c2f 6469 Events=NULL,.
    912 │ │ │ │ +000142a0: 3c2f 7370 616e 3e20 2020 2020 2020 2063 c │ │ │ │ +000142b0: 6c5f 6576 656e 742a 2065 6e64 4576 656e l_event* endEven │ │ │ │ +000142c0: 743d 4e55 4c4c 2920 7b3c 2f64 6976 3e0a t=NULL) {
    . │ │ │ │ +000142d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00014360: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014370: 6e6f 223e 2020 3931 343c 2f73 7061 6e3e no"> 914 │ │ │ │ +00014380: 2020 2020 2020 2020 3c73 7061 6e20 636c if (ins │ │ │ │ +000143b0: 7461 6e63 6529 207b 3c2f 6469 763e 0a3c tance) {
    .< │ │ │ │ +000143c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000143d0: 3e3c 6120 6964 3d22 6c30 3039 3135 2220 > 915 < │ │ │ │ +00014420: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00014430: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +00014440: 2f73 7061 6e3e 2069 6e73 7461 6e63 652d /span> instance- │ │ │ │ +00014450: 2667 743b 3c61 2063 6c61 7373 3d22 636f >EvalPatches │ │ │ │ +000144b0: 3c2f 613e 2873 7263 4275 6666 6572 2c20 (srcBuffer, │ │ │ │ +000144c0: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +000144d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000144e0: 3e3c 6120 6964 3d22 6c30 3039 3136 2220 > 916 │ │ │ │ +00014530: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014540: 2020 2020 2020 2020 2020 2020 6473 7442 dstB │ │ │ │ +00014550: 7566 6665 722c 2064 7374 4465 7363 2c3c uffer, dstDesc,< │ │ │ │ +00014560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000145b0: 3931 373c 2f73 7061 6e3e 2020 2020 2020 917 │ │ │ │ +000145c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000145d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000145e0: 2020 206e 756d 5061 7463 6843 6f6f 7264 numPatchCoord │ │ │ │ +000145f0: 732c 2070 6174 6368 436f 6f72 6473 2c3c s, patchCoords,< │ │ │ │ +00014600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00014650: 3931 383c 2f73 7061 6e3e 2020 2020 2020 918 │ │ │ │ +00014660: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014680: 2020 2070 6174 6368 5461 626c 652c 3c2f patchTable,.
    9 │ │ │ │ +000146e0: 3139 3c2f 7370 616e 3e20 2020 2020 2020 19 │ │ │ │ +000146f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014700: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014710: 2020 6e75 6d53 7461 7274 4576 656e 7473 numStartEvents │ │ │ │ +00014720: 2c20 7374 6172 7445 7665 6e74 732c 2065 , startEvents, e │ │ │ │ +00014730: 6e64 4576 656e 7429 3b3c 2f64 6976 3e0a ndEvent);
    . │ │ │ │ +00014740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00014800: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014810: 6e6f 223e 2020 3932 313c 2f73 7061 6e3e no"> 921 │ │ │ │ +00014820: 2020 2020 2020 2020 2020 2020 3c73 7061 // Create an i │ │ │ │ +00014850: 6e73 7461 6e63 6520 6f6e 2064 656d 616e nstance on deman │ │ │ │ +00014860: 6420 2873 6c6f 7729 3c2f 7370 616e 3e3c d (slow)< │ │ │ │ +00014870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000148c0: 3932 323c 2f73 7061 6e3e 2020 2020 2020 922 │ │ │ │ +000148d0: 2020 2020 2020 2876 6f69 6429 6465 7669 (void)devi │ │ │ │ +000148e0: 6365 436f 6e74 6578 743b 2020 3c73 7061 ceContext; // unused
    .
    923 │ │ │ │ +00014970: 2020 2020 2020 2020 2069 6e73 7461 6e63 instanc │ │ │ │ +00014980: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = Create( │ │ │ │ +000149e0: 7372 6344 6573 632c 2064 7374 4465 7363 srcDesc, dstDesc │ │ │ │ +000149f0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00014a40: 2020 3932 343c 2f73 7061 6e3e 2020 2020 924 │ │ │ │ +00014a50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014a60: 2020 2020 2020 2020 2020 3c61 2063 6c61 BufferDes │ │ │ │ +00014aa0: 6372 6970 746f 723c 2f61 3e28 292c 3c2f criptor(),.
    9 │ │ │ │ +00014b00: 3235 3c2f 7370 616e 3e20 2020 2020 2020 25 │ │ │ │ +00014b10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014b20: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ +00014b60: 7074 6f72 3c2f 613e 2829 2c3c 2f64 6976 ptor(),
    .
    926< │ │ │ │ +00014bc0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00014bd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014be0: 2020 2020 6465 7669 6365 436f 6e74 6578 deviceContex │ │ │ │ +00014bf0: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    927 │ │ │ │ +00014c50: 2020 2020 2020 2020 2020 3c73 7061 6e20 if (i │ │ │ │ +00014c80: 6e73 7461 6e63 6529 207b 3c2f 6469 763e nstance) {
    │ │ │ │ +00014c90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00014cc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 928 │ │ │ │ +00014cf0: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ │ +00014d10: 6f6f 6c3c 2f73 7061 6e3e 2072 203d 2069 ool r = i │ │ │ │ +00014d20: 6e73 7461 6e63 652d 2667 743b 3c61 2063 nstance->Eva │ │ │ │ +00014d80: 6c50 6174 6368 6573 3c2f 613e 2873 7263 lPatches(src │ │ │ │ +00014d90: 4275 6666 6572 2c20 7372 6344 6573 632c Buffer, srcDesc, │ │ │ │ +00014da0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00014df0: 2039 3239 3c2f 7370 616e 3e20 2020 2020 929 │ │ │ │ +00014e00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014e10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014e20: 2020 2020 2020 2020 2020 6473 7442 7566 dstBuf │ │ │ │ +00014e30: 6665 722c 2064 7374 4465 7363 2c3c 2f64 fer, dstDesc,.
    93 │ │ │ │ +00014e90: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ +00014ea0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014eb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014ec0: 2020 2020 2020 206e 756d 5061 7463 6843 numPatchC │ │ │ │ +00014ed0: 6f6f 7264 732c 2070 6174 6368 436f 6f72 oords, patchCoor │ │ │ │ +00014ee0: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    931 │ │ │ │ +00014f40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014f50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014f60: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ +00014f70: 6368 5461 626c 652c 3c2f 6469 763e 0a3c chTable,
    .< │ │ │ │ +00014f80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00014f90: 3e3c 6120 6964 3d22 6c30 3039 3332 2220 > 932 │ │ │ │ +00014fe0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00014ff0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00015000: 2020 6e75 6d53 7461 7274 4576 656e 7473 numStartEvents │ │ │ │ +00015010: 2c20 7374 6172 7445 7665 6e74 732c 2065 , startEvents, e │ │ │ │ +00015020: 6e64 4576 656e 7429 3b3c 2f64 6976 3e0a ndEvent);
    . │ │ │ │ +00015030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00015110: 2020 3933 343c 2f73 7061 6e3e 2020 2020 934 │ │ │ │ +00015120: 2020 2020 2020 2020 2020 2020 3c73 7061 return r;
    .< │ │ │ │ +00015170: 6120 6964 3d22 6c30 3039 3335 2220 6e61 a id="l00935" na │ │ │ │ +00015180: 6d65 3d22 6c30 3039 3335 223e 3c2f 613e me="l00935"> │ │ │ │ +00015190: 3c73 7061 6e20 636c 6173 733d 226c 696e 935 }.
    9 │ │ │ │ +00015210: 3336 3c2f 7370 616e 3e20 2020 2020 2020 36 │ │ │ │ +00015220: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +00015240: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn false; │ │ │ │ +00015270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000152c0: 2039 3337 3c2f 7370 616e 3e20 2020 2020 937 │ │ │ │ +000152d0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    938 │ │ │ │ +00015330: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    939< │ │ │ │ +00015390: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +000153b0: 3c61 2069 643d 226c 3031 3030 3022 206e 1000 temp │ │ │ │ +00015410: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ +00015420: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename SRC_BUFFER │ │ │ │ +00015450: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ +00015470: 3c2f 7370 616e 3e20 4453 545f 4255 4646 DST_BUFF │ │ │ │ +00015480: 4552 2c3c 2f64 6976 3e0a 3c64 6976 2063 ER,
    .
    1001 │ │ │ │ +000154e0: 2020 2020 2020 2020 2020 2020 3c73 7061 typename PATCHCOORD_BUF │ │ │ │ +00015520: 4645 522c 203c 7370 616e 2063 6c61 7373 FER, typen │ │ │ │ +00015540: 616d 653c 2f73 7061 6e3e 2050 4154 4348 ame PATCH │ │ │ │ +00015550: 5f54 4142 4c45 2c3c 2f64 6976 3e0a 3c64 _TABLE,
    . │ │ │ │ +00015570: 3c61 2069 643d 226c 3031 3030 3222 206e 1002 │ │ │ │ +000155c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename DEVICE_CON │ │ │ │ +000155f0: 5445 5854 2667 743b 3c2f 6469 763e 0a3c TEXT>
    .< │ │ │ │ +00015600: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ │ +00015610: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ │ +00015620: 6e30 3130 3033 2220 6461 7461 2d73 7461 n01003" data-sta │ │ │ │ +00015630: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ │ +00015640: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    1003 stat │ │ │ │ +00015700: 6963 3c2f 7370 616e 3e20 3c73 7061 6e20 ic bool │ │ │ │ +00015730: 3c61 2063 6c61 7373 3d22 636f 6465 2068 EvalPatches │ │ │ │ +00015790: 283c 2f64 6976 3e0a 3c64 6976 2063 6c61 (
    .
    │ │ │ │ +000157e0: 2031 3030 343c 2f73 7061 6e3e 2020 2020 1004 │ │ │ │ +000157f0: 2020 2020 5352 435f 4255 4646 4552 202a SRC_BUFFER * │ │ │ │ +00015800: 7372 6342 7566 6665 722c 203c 6120 636c srcBuffer, BufferDe │ │ │ │ +00015840: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00015870: 2661 6d70 3b73 7263 4465 7363 2c3c 2f64 &srcDesc,.
    100 │ │ │ │ +000158d0: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ │ +000158e0: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ +000158f0: 7566 6665 722c 203c 6120 636c 6173 733d uffer, BufferDescri │ │ │ │ +00015930: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +00015950: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +00015960: 3b64 7374 4465 7363 2c3c 2f64 6976 3e0a ;dstDesc,
    . │ │ │ │ +00015970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1007 │ │ │ │ +00015ab0: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ +00015ac0: 5220 2a64 7642 7566 6665 722c 2020 3c61 R *dvBuffer, Buffe │ │ │ │ +00015b00: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +00015b10: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dvDesc,< │ │ │ │ +00015b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00015b90: 3030 383c 2f73 7061 6e3e 2020 2020 2020 008 │ │ │ │ +00015ba0: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +00015bc0: 2f73 7061 6e3e 206e 756d 5061 7463 6843 /span> numPatchC │ │ │ │ +00015bd0: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ +00015bf0: 6120 6964 3d22 6c30 3130 3039 2220 6e61 a id="l01009" na │ │ │ │ +00015c00: 6d65 3d22 6c30 3130 3039 223e 3c2f 613e me="l01009"> │ │ │ │ +00015c10: 3c73 7061 6e20 636c 6173 733d 226c 696e 1009 PATCHCO │ │ │ │ +00015c40: 4f52 445f 4255 4646 4552 202a 7061 7463 ORD_BUFFER *patc │ │ │ │ +00015c50: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ +00015c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00015c70: 3e3c 6120 6964 3d22 6c30 3130 3130 2220 > 1010 PATCH │ │ │ │ +00015cc0: 5f54 4142 4c45 202a 7061 7463 6854 6162 _TABLE *patchTab │ │ │ │ +00015cd0: 6c65 2c3c 2f64 6976 3e0a 3c64 6976 2063 le,
    .
    1011 │ │ │ │ +00015d30: 2020 2020 2020 3c61 2063 6c61 7373 3d22 CLEvaluator const *instance,< │ │ │ │ +00015da0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00015df0: 3031 323c 2f73 7061 6e3e 2020 2020 2020 012 │ │ │ │ +00015e00: 2020 4445 5649 4345 5f43 4f4e 5445 5854 DEVICE_CONTEXT │ │ │ │ +00015e10: 2064 6576 6963 6543 6f6e 7465 7874 2c3c deviceContext,< │ │ │ │ +00015e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00015e70: 3031 333c 2f73 7061 6e3e 2020 2020 2020 013 │ │ │ │ +00015e80: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi │ │ │ │ +00015ea0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int │ │ │ │ +00015ed0: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +00015ee0: 302c 3c2f 6469 763e 0a3c 6469 7620 636c 0,
    .
    1014 │ │ │ │ +00015f40: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ │ +00015f60: 3c2f 7370 616e 3e20 636c 5f65 7665 6e74 cl_event │ │ │ │ +00015f70: 2a20 7374 6172 7445 7665 6e74 733d 4e55 * startEvents=NU │ │ │ │ +00015f80: 4c4c 2c3c 2f64 6976 3e0a 3c64 6976 2063 LL,
    .
    1015 │ │ │ │ +00015fe0: 2020 2020 2020 636c 5f65 7665 6e74 2a20 cl_event* │ │ │ │ +00015ff0: 656e 6445 7665 6e74 3d4e 554c 4c29 207b endEvent=NULL) { │ │ │ │ +00016000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00016050: 3130 3136 3c2f 7370 616e 3e20 3c2f 6469 1016 .
    1017 │ │ │ │ +000160b0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +000160c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000160d0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (instance) {< │ │ │ │ +000160f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00016140: 3031 383c 2f73 7061 6e3e 2020 2020 2020 018 │ │ │ │ +00016150: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +00016170: 7265 7475 726e 3c2f 7370 616e 3e20 696e return in │ │ │ │ +00016180: 7374 616e 6365 2d26 6774 3b3c 6120 636c stance->Eval │ │ │ │ +000161e0: 5061 7463 6865 733c 2f61 3e28 7372 6342 Patches(srcB │ │ │ │ +000161f0: 7566 6665 722c 2073 7263 4465 7363 2c3c uffer, srcDesc,< │ │ │ │ +00016200: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00016250: 3031 393c 2f73 7061 6e3e 2020 2020 2020 019 │ │ │ │ +00016260: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016280: 2020 2064 7374 4275 6666 6572 2c20 6473 dstBuffer, ds │ │ │ │ +00016290: 7444 6573 632c 3c2f 6469 763e 0a3c 6469 tDesc,
    .< │ │ │ │ +000162b0: 6120 6964 3d22 6c30 3130 3230 2220 6e61 a id="l01020" na │ │ │ │ +000162c0: 6d65 3d22 6c30 3130 3230 223e 3c2f 613e me="l01020"> │ │ │ │ +000162d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1020 │ │ │ │ +00016300: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016310: 2020 2020 2020 2020 2020 6475 4275 6666 duBuff │ │ │ │ +00016320: 6572 2c20 6475 4465 7363 2c3c 2f64 6976 er, duDesc,
    .
    1021< │ │ │ │ +00016380: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00016390: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000163a0: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +000163b0: 7642 7566 6665 722c 2064 7644 6573 632c vBuffer, dvDesc, │ │ │ │ +000163c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00016410: 3130 3232 3c2f 7370 616e 3e20 2020 2020 1022 │ │ │ │ +00016420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016440: 2020 2020 6e75 6d50 6174 6368 436f 6f72 numPatchCoor │ │ │ │ +00016450: 6473 2c20 7061 7463 6843 6f6f 7264 732c ds, patchCoords, │ │ │ │ +00016460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000164b0: 3130 3233 3c2f 7370 616e 3e20 2020 2020 1023 │ │ │ │ +000164c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000164d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000164e0: 2020 2020 7061 7463 6854 6162 6c65 2c3c patchTable,< │ │ │ │ +000164f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00016540: 3032 343c 2f73 7061 6e3e 2020 2020 2020 024 │ │ │ │ +00016550: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016560: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016570: 2020 206e 756d 5374 6172 7445 7665 6e74 numStartEvent │ │ │ │ +00016580: 732c 2073 7461 7274 4576 656e 7473 2c20 s, startEvents, │ │ │ │ +00016590: 656e 6445 7665 6e74 293b 3c2f 6469 763e endEvent);
    │ │ │ │ +000165a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000165d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1025 } < │ │ │ │ +00016600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00016610: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else {
    .< │ │ │ │ +00016640: 6120 6964 3d22 6c30 3130 3236 2220 6e61 a id="l01026" na │ │ │ │ +00016650: 6d65 3d22 6c30 3130 3236 223e 3c2f 613e me="l01026"> │ │ │ │ +00016660: 3c73 7061 6e20 636c 6173 733d 226c 696e 1026 // Create an │ │ │ │ +000166b0: 696e 7374 616e 6365 206f 6e20 6465 6d61 instance on dema │ │ │ │ +000166c0: 6e64 2028 736c 6f77 293c 2f73 7061 6e3e nd (slow) │ │ │ │ +000166d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00016720: 3130 3237 3c2f 7370 616e 3e20 2020 2020 1027 │ │ │ │ +00016730: 2020 2020 2020 2028 766f 6964 2964 6576 (void)dev │ │ │ │ +00016740: 6963 6543 6f6e 7465 7874 3b20 203c 7370 iceContext; // unused
    .
    1028 │ │ │ │ +000167d0: 2020 2020 2020 2020 2020 696e 7374 616e instan │ │ │ │ +000167e0: 6365 203d 203c 6120 636c 6173 733d 2263 ce = Create │ │ │ │ +00016840: 2873 7263 4465 7363 2c20 6473 7444 6573 (srcDesc, dstDes │ │ │ │ +00016850: 632c 2064 7544 6573 632c 2064 7644 6573 c, duDesc, dvDes │ │ │ │ +00016860: 632c 2064 6576 6963 6543 6f6e 7465 7874 c, deviceContext │ │ │ │ +00016870: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    1029 │ │ │ │ +000168d0: 2020 2020 2020 2020 203c 7370 616e 2063 if (in │ │ │ │ +00016900: 7374 616e 6365 2920 7b3c 2f64 6976 3e0a stance) {
    . │ │ │ │ +00016910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00016940: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1030 │ │ │ │ +00016970: 2020 2020 3c73 7061 6e20 636c 6173 733d bo │ │ │ │ +00016990: 6f6c 3c2f 7370 616e 3e20 7220 3d20 696e ol r = in │ │ │ │ +000169a0: 7374 616e 6365 2d26 6774 3b3c 6120 636c stance->Eval │ │ │ │ +00016a00: 5061 7463 6865 733c 2f61 3e28 7372 6342 Patches(srcB │ │ │ │ +00016a10: 7566 6665 722c 2073 7263 4465 7363 2c3c uffer, srcDesc,< │ │ │ │ +00016a20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00016a70: 3033 313c 2f73 7061 6e3e 2020 2020 2020 031 │ │ │ │ +00016a80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016a90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016aa0: 2020 2020 2020 2020 2064 7374 4275 6666 dstBuff │ │ │ │ +00016ab0: 6572 2c20 6473 7444 6573 632c 3c2f 6469 er, dstDesc,.
    1032 │ │ │ │ +00016b10: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00016b20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016b30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016b40: 2020 2020 2020 6475 4275 6666 6572 2c20 duBuffer, │ │ │ │ +00016b50: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ +00016b70: 3c61 2069 643d 226c 3031 3033 3322 206e 1033 │ │ │ │ +00016bc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016bd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016be0: 2064 7642 7566 6665 722c 2064 7644 6573 dvBuffer, dvDes │ │ │ │ +00016bf0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1034 │ │ │ │ +00016c50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016c60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016c70: 2020 2020 2020 2020 2020 2020 6e75 6d50 numP │ │ │ │ +00016c80: 6174 6368 436f 6f72 6473 2c20 7061 7463 atchCoords, patc │ │ │ │ +00016c90: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ +00016ca0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00016cb0: 3e3c 6120 6964 3d22 6c30 3130 3335 2220 > 1035 │ │ │ │ +00016d00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016d10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016d20: 2020 7061 7463 6854 6162 6c65 2c3c 2f64 patchTable,.
    103 │ │ │ │ +00016d80: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ +00016d90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016da0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016db0: 2020 2020 2020 206e 756d 5374 6172 7445 numStartE │ │ │ │ +00016dc0: 7665 6e74 732c 2073 7461 7274 4576 656e vents, startEven │ │ │ │ +00016dd0: 7473 2c20 656e 6445 7665 6e74 293b 3c2f ts, endEvent);.
    10 │ │ │ │ +00016e30: 3337 3c2f 7370 616e 3e20 2020 2020 2020 37 │ │ │ │ +00016e40: 2020 2020 2020 2020 203c 7370 616e 2063 d │ │ │ │ +00016e60: 656c 6574 653c 2f73 7061 6e3e 2069 6e73 elete ins │ │ │ │ +00016e70: 7461 6e63 653b 3c2f 6469 763e 0a3c 6469 tance;
    .< │ │ │ │ +00016e90: 6120 6964 3d22 6c30 3130 3338 2220 6e61 a id="l01038" na │ │ │ │ +00016ea0: 6d65 3d22 6c30 3130 3338 223e 3c2f 613e me="l01038"> │ │ │ │ +00016eb0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1038 │ │ │ │ +00016ee0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +00016f00: 6e3c 2f73 7061 6e3e 2072 3b3c 2f64 6976 n r;
    .
    1039< │ │ │ │ +00016f60: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00016f70: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    1040 │ │ │ │ +00016fd0: 2020 2020 2020 2020 2020 3c73 7061 6e20 return false;
    .
    < │ │ │ │ +00017060: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00017070: 6e6f 223e 2031 3034 313c 2f73 7061 6e3e no"> 1041 │ │ │ │ +00017080: 2020 2020 2020 2020 7d3c 2f64 6976 3e0a }
    . │ │ │ │ +00017090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +000170f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00017140: 3130 3433 3c2f 7370 616e 3e20 3c2f 6469 1043 .
    1122 │ │ │ │ +000171a0: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ +000171d0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ +000171f0: 616d 653c 2f73 7061 6e3e 2053 5243 5f42 ame SRC_B │ │ │ │ +00017200: 5546 4645 522c 203c 7370 616e 2063 6c61 UFFER, typ │ │ │ │ +00017220: 656e 616d 653c 2f73 7061 6e3e 2044 5354 ename DST │ │ │ │ +00017230: 5f42 5546 4645 522c 3c2f 6469 763e 0a3c _BUFFER,
    .< │ │ │ │ +00017240: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00017250: 3e3c 6120 6964 3d22 6c30 3131 3233 2220 > 1123 │ │ │ │ +000172a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +000172c0: 2f73 7061 6e3e 2050 4154 4348 434f 4f52 /span> PATCHCOOR │ │ │ │ +000172d0: 445f 4255 4646 4552 2c20 3c73 7061 6e20 D_BUFFER, │ │ │ │ +000172f0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +00017300: 5041 5443 485f 5441 424c 452c 3c2f 6469 PATCH_TABLE,.
    1124 │ │ │ │ +00017360: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00017370: 2020 2020 203c 7370 616e 2063 6c61 7373 typen │ │ │ │ +00017390: 616d 653c 2f73 7061 6e3e 2044 4556 4943 ame DEVIC │ │ │ │ +000173a0: 455f 434f 4e54 4558 5426 6774 3b3c 2f64 E_CONTEXT>.
    .
    1125 │ │ │ │ +00017490: 3c2f 7370 616e 3e20 2020 203c 7370 616e static < │ │ │ │ +000174c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000174d0: 6f72 6474 7970 6522 3e62 6f6f 6c3c 2f73 ordtype">bool EvalPatche │ │ │ │ +00017540: 733c 2f61 3e28 3c2f 6469 763e 0a3c 6469 s(
    .< │ │ │ │ +00017560: 6120 6964 3d22 6c30 3131 3236 2220 6e61 a id="l01126" na │ │ │ │ +00017570: 6d65 3d22 6c30 3131 3236 223e 3c2f 613e me="l01126"> │ │ │ │ +00017580: 3c73 7061 6e20 636c 6173 733d 226c 696e 1126 SRC_BUF │ │ │ │ +000175b0: 4645 5220 2a73 7263 4275 6666 6572 2c20 FER *srcBuffer, │ │ │ │ +000175c0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +000175f0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &srcDes │ │ │ │ +00017630: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1127 │ │ │ │ +00017690: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ +000176a0: 2a64 7374 4275 6666 6572 2c20 3c61 2063 *dstBuffer, BufferD │ │ │ │ +000176e0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +00017710: 2026 616d 703b 6473 7444 6573 632c 3c2f &dstDesc,.
    11 │ │ │ │ +00017770: 3238 3c2f 7370 616e 3e20 2020 2020 2020 28 │ │ │ │ +00017780: 2044 5354 5f42 5546 4645 5220 2a64 7542 DST_BUFFER *duB │ │ │ │ +00017790: 7566 6665 722c 2020 3c61 2063 6c61 7373 uffer, BufferDescr │ │ │ │ +000177d0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +000177f0: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00017800: 703b 6475 4465 7363 2c3c 2f64 6976 3e0a p;duDesc,
    . │ │ │ │ +00017810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1130 │ │ │ │ +00017950: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ +00017960: 5220 2a64 7575 4275 6666 6572 2c20 3c61 R *duuBuffer, Buffe │ │ │ │ +000179a0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +000179b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &duuDesc, │ │ │ │ +000179e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00017a30: 3131 3331 3c2f 7370 616e 3e20 2020 2020 1131 │ │ │ │ +00017a40: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ +00017a50: 7576 4275 6666 6572 2c20 3c61 2063 6c61 uvBuffer, BufferDes │ │ │ │ +00017a90: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +00017ac0: 616d 703b 6475 7644 6573 632c 3c2f 6469 amp;duvDesc,.
    1132 │ │ │ │ +00017b20: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +00017b30: 5354 5f42 5546 4645 5220 2a64 7676 4275 ST_BUFFER *dvvBu │ │ │ │ +00017b40: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +00017b80: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00017ba0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +00017bb0: 6476 7644 6573 632c 3c2f 6469 763e 0a3c dvvDesc,
    .< │ │ │ │ +00017bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00017bd0: 3e3c 6120 6964 3d22 6c30 3131 3333 2220 > 1133 int │ │ │ │ +00017c40: 6e75 6d50 6174 6368 436f 6f72 6473 2c3c numPatchCoords,< │ │ │ │ +00017c50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00017ca0: 3133 343c 2f73 7061 6e3e 2020 2020 2020 134 │ │ │ │ +00017cb0: 2020 5041 5443 4843 4f4f 5244 5f42 5546 PATCHCOORD_BUF │ │ │ │ +00017cc0: 4645 5220 2a70 6174 6368 436f 6f72 6473 FER *patchCoords │ │ │ │ +00017cd0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00017d20: 2031 3133 353c 2f73 7061 6e3e 2020 2020 1135 │ │ │ │ +00017d30: 2020 2020 5041 5443 485f 5441 424c 4520 PATCH_TABLE │ │ │ │ +00017d40: 2a70 6174 6368 5461 626c 652c 3c2f 6469 *patchTable,.
    1136 │ │ │ │ +00017da0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00017db0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00017dc0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ +00017dd0: 3131 3431 2e68 746d 6c22 3e43 4c45 7661 1141.html">CLEva │ │ │ │ +00017de0: 6c75 6174 6f72 3c2f 613e 203c 7370 616e luator const *i │ │ │ │ +00017e10: 6e73 7461 6e63 652c 3c2f 6469 763e 0a3c nstance,
    .< │ │ │ │ +00017e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00017e30: 3e3c 6120 6964 3d22 6c30 3131 3337 2220 > 1137 DEVIC │ │ │ │ +00017e80: 455f 434f 4e54 4558 5420 6465 7669 6365 E_CONTEXT device │ │ │ │ +00017e90: 436f 6e74 6578 742c 3c2f 6469 763e 0a3c Context,
    .< │ │ │ │ +00017ea0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00017eb0: 3e3c 6120 6964 3d22 6c30 3131 3338 2220 > 1138 unsigned
    i │ │ │ │ +00017f40: 6e74 3c2f 7370 616e 3e20 6e75 6d53 7461 nt numSta │ │ │ │ +00017f50: 7274 4576 656e 7473 3d30 2c3c 2f64 6976 rtEvents=0,
    .
    1139< │ │ │ │ +00017fb0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> const │ │ │ │ +00017fe0: 2063 6c5f 6576 656e 742a 2073 7461 7274 cl_event* start │ │ │ │ +00017ff0: 4576 656e 7473 3d4e 554c 4c2c 3c2f 6469 Events=NULL,.
    1140 │ │ │ │ +00018050: 3c2f 7370 616e 3e20 2020 2020 2020 2063 c │ │ │ │ +00018060: 6c5f 6576 656e 742a 2065 6e64 4576 656e l_event* endEven │ │ │ │ +00018070: 743d 4e55 4c4c 2920 7b3c 2f64 6976 3e0a t=NULL) {
    . │ │ │ │ +00018080: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00018110: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00018120: 6e6f 223e 2031 3134 323c 2f73 7061 6e3e no"> 1142 │ │ │ │ +00018130: 2020 2020 2020 2020 3c73 7061 6e20 636c if (ins │ │ │ │ +00018160: 7461 6e63 6529 207b 3c2f 6469 763e 0a3c tance) {
    .< │ │ │ │ +00018170: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00018180: 3e3c 6120 6964 3d22 6c30 3131 3433 2220 > 1143 < │ │ │ │ +000181d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000181e0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +000181f0: 2f73 7061 6e3e 2069 6e73 7461 6e63 652d /span> instance- │ │ │ │ +00018200: 2667 743b 3c61 2063 6c61 7373 3d22 636f >EvalPatches │ │ │ │ +00018260: 3c2f 613e 2873 7263 4275 6666 6572 2c20 (srcBuffer, │ │ │ │ +00018270: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +00018280: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00018290: 3e3c 6120 6964 3d22 6c30 3131 3434 2220 > 1144 │ │ │ │ +000182e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000182f0: 2020 2020 2020 2020 2020 2020 6473 7442 dstB │ │ │ │ +00018300: 7566 6665 722c 2064 7374 4465 7363 2c3c uffer, dstDesc,< │ │ │ │ +00018310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00018360: 3134 353c 2f73 7061 6e3e 2020 2020 2020 145 │ │ │ │ +00018370: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018380: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018390: 2020 2064 7542 7566 6665 722c 2064 7544 duBuffer, duD │ │ │ │ +000183a0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1146 │ │ │ │ +00018400: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018410: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018420: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +00018430: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +00018440: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ +00018520: 3131 3438 3c2f 7370 616e 3e20 2020 2020 1148 │ │ │ │ +00018530: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018540: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018550: 2020 2020 6475 7642 7566 6665 722c 2064 duvBuffer, d │ │ │ │ +00018560: 7576 4465 7363 2c3c 2f64 6976 3e0a 3c64 uvDesc,
    . │ │ │ │ +00018580: 3c61 2069 643d 226c 3031 3134 3922 206e 1149
    │ │ │ │ +000185d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000185e0: 2020 2020 2020 2020 2020 2064 7676 4275 dvvBu │ │ │ │ +000185f0: 6666 6572 2c20 6476 7644 6573 632c 3c2f ffer, dvvDesc,.
    11 │ │ │ │ +00018650: 3530 3c2f 7370 616e 3e20 2020 2020 2020 50 │ │ │ │ +00018660: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018680: 2020 6e75 6d50 6174 6368 436f 6f72 6473 numPatchCoords │ │ │ │ +00018690: 2c20 7061 7463 6843 6f6f 7264 732c 3c2f , patchCoords,.
    11 │ │ │ │ +000186f0: 3531 3c2f 7370 616e 3e20 2020 2020 2020 51 │ │ │ │ +00018700: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018710: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018720: 2020 7061 7463 6854 6162 6c65 2c3c 2f64 patchTable,.
    115 │ │ │ │ +00018780: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +00018790: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000187a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000187b0: 206e 756d 5374 6172 7445 7665 6e74 732c numStartEvents, │ │ │ │ +000187c0: 2073 7461 7274 4576 656e 7473 2c20 656e startEvents, en │ │ │ │ +000187d0: 6445 7665 6e74 293b 3c2f 6469 763e 0a3c dEvent);
    .< │ │ │ │ +000187e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000187f0: 3e3c 6120 6964 3d22 6c30 3131 3533 2220 > 1153 } else {
    .
    1154 │ │ │ │ +000188c0: 2020 2020 2020 2020 2020 203c 7370 616e // Create an in │ │ │ │ +000188f0: 7374 616e 6365 206f 6e20 6465 6d61 6e64 stance on demand │ │ │ │ +00018900: 2028 736c 6f77 293c 2f73 7061 6e3e 3c2f (slow).
    11 │ │ │ │ +00018960: 3535 3c2f 7370 616e 3e20 2020 2020 2020 55 │ │ │ │ +00018970: 2020 2020 2028 766f 6964 2964 6576 6963 (void)devic │ │ │ │ +00018980: 6543 6f6e 7465 7874 3b20 203c 7370 616e eContext; // unused
    .
    │ │ │ │ +00018a00: 2031 3135 363c 2f73 7061 6e3e 2020 2020 1156 │ │ │ │ +00018a10: 2020 2020 2020 2020 696e 7374 616e 6365 instance │ │ │ │ +00018a20: 203d 203c 6120 636c 6173 733d 2263 6f64 = Create(s │ │ │ │ +00018a80: 7263 4465 7363 2c20 6473 7444 6573 632c rcDesc, dstDesc, │ │ │ │ +00018a90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00018ae0: 3131 3537 3c2f 7370 616e 3e20 2020 2020 1157 │ │ │ │ +00018af0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018b00: 2020 2020 2020 2020 2064 7544 6573 632c duDesc, │ │ │ │ +00018b10: 2064 7644 6573 632c 3c2f 6469 763e 0a3c dvDesc,
    .< │ │ │ │ +00018b20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00018b30: 3e3c 6120 6964 3d22 6c30 3131 3538 2220 > 1158 │ │ │ │ +00018b80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018b90: 2064 7575 4465 7363 2c20 6475 7644 6573 duuDesc, duvDes │ │ │ │ +00018ba0: 632c 2064 7676 4465 7363 2c3c 2f64 6976 c, dvvDesc,
    .
    1159< │ │ │ │ +00018c00: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00018c10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018c20: 2020 2020 6465 7669 6365 436f 6e74 6578 deviceContex │ │ │ │ +00018c30: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    1160 │ │ │ │ +00018c90: 2020 2020 2020 2020 2020 3c73 7061 6e20 if (i │ │ │ │ +00018cc0: 6e73 7461 6e63 6529 207b 3c2f 6469 763e nstance) {
    │ │ │ │ +00018cd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00018d00: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1161 │ │ │ │ +00018d30: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ │ +00018d50: 6f6f 6c3c 2f73 7061 6e3e 2072 203d 2069 ool r = i │ │ │ │ +00018d60: 6e73 7461 6e63 652d 2667 743b 3c61 2063 nstance->Eva │ │ │ │ +00018dc0: 6c50 6174 6368 6573 3c2f 613e 2873 7263 lPatches(src │ │ │ │ +00018dd0: 4275 6666 6572 2c20 7372 6344 6573 632c Buffer, srcDesc, │ │ │ │ +00018de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00018e30: 3131 3632 3c2f 7370 616e 3e20 2020 2020 1162 │ │ │ │ +00018e40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018e60: 2020 2020 2020 2020 2020 6473 7442 7566 dstBuf │ │ │ │ +00018e70: 6665 722c 2064 7374 4465 7363 2c3c 2f64 fer, dstDesc,.
    116 │ │ │ │ +00018ed0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00018ee0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ 00018ef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00018f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00018f10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00018f20: 7661 6c65 6e63 652c 2070 4564 6765 5368 valence, pEdgeSh │ │ │ │ -00018f30: 6172 706e 6573 732c 2063 4564 6765 5368 arpness, cEdgeSh │ │ │ │ -00018f40: 6172 706e 6573 7329 3b3c 2f64 6976 3e0a arpness);
    . │ │ │ │ -00018f50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ -00018fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00018fe0: 3e3c 6120 6964 3d22 6c30 3035 3937 2220 > 597
    .
    598 │ │ │ │ -00019080: 2020 2063 4d61 736b 2e3c 6120 636c 6173 cMask.Combin │ │ │ │ -000190e0: 6556 6572 7465 7856 6572 7465 784d 6173 eVertexVertexMas │ │ │ │ -000190f0: 6b73 3c2f 613e 2863 5765 6967 6874 2c20 ks(cWeight, │ │ │ │ -00019100: 7057 6569 6768 742c 206d 6173 6b29 3b3c pWeight, mask);< │ │ │ │ -00019110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00019160: 3539 393c 2f73 7061 6e3e 7d3c 2f64 6976 599}
    .
    .
    600 .
    6 │ │ │ │ -00019220: 3031 3c2f 7370 616e 3e3c 7370 616e 2063 01/ │ │ │ │ -00019240: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ -00019250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00019260: 3e3c 6120 6964 3d22 6c30 3036 3032 2220 > 602// The │ │ │ │ -000192c0: 2063 6f6d 7075 7461 7469 6f6e 206f 6620 computation of │ │ │ │ -000192d0: 6c69 6d69 7420 6d61 736b 7320 666f 7220 limit masks for │ │ │ │ -000192e0: 7665 7274 6963 6573 3a3c 2f73 7061 6e3e vertices: │ │ │ │ -000192f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00019340: 2036 3033 3c2f 7370 616e 3e3c 7370 616e 603//
    │ │ │ │ -00019370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000193a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 604templ │ │ │ │ -000193e0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b53 ate <S │ │ │ │ -000193f0: 6368 656d 6554 7970 6520 5343 4845 4d45 chemeType SCHEME │ │ │ │ -00019400: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    605< │ │ │ │ -00019460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00019470: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ │ -000194a0: 7970 656e 616d 653c 2f73 7061 6e3e 2056 ypename V │ │ │ │ -000194b0: 4552 5445 582c 203c 7370 616e 2063 6c61 ERTEX, typ │ │ │ │ -000194d0: 656e 616d 653c 2f73 7061 6e3e 204d 4153 ename MAS │ │ │ │ -000194e0: 4b26 6774 3b3c 2f64 6976 3e0a 3c64 6976 K>
    .
    < │ │ │ │ -00019520: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00019530: 6e6f 223e 2020 3630 363c 2f73 7061 6e3e no"> 606 │ │ │ │ -00019540: 3c73 7061 6e20 636c 6173 733d 226b 6579 void
    .
    .
    │ │ │ │ -00019640: 2036 3037 3c2f 613e 3c2f 7370 616e 3e3c 607< │ │ │ │ -00019650: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00019660: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -00019670: 2261 3031 3333 332e 6874 6d6c 2361 3363 "a01333.html#a3c │ │ │ │ -00019680: 3864 3736 3363 6131 3863 3435 3763 3933 8d763ca18c457c93 │ │ │ │ -00019690: 3664 6230 6534 3739 3937 3436 6632 223e 6db0e4799746f2"> │ │ │ │ -000196a0: 5363 6865 6d65 266c 743b 5343 4845 4d45 Scheme<SCHEME │ │ │ │ -000196b0: 2667 743b 3a3a 436f 6d70 7574 6556 6572 >::ComputeVer │ │ │ │ -000196c0: 7465 784c 696d 6974 4d61 736b 3c2f 613e texLimitMask │ │ │ │ -000196d0: 2856 4552 5445 5820 3c73 7061 6e20 636c (VERTEX co │ │ │ │ -000196f0: 6e73 743c 2f73 7061 6e3e 2661 6d70 3b20 nst& │ │ │ │ -00019700: 7665 7274 6578 2c3c 2f64 6976 3e0a 3c64 vertex,
    . │ │ │ │ -00019720: 3c61 2069 643d 226c 3030 3630 3822 206e 608 │ │ │ │ -00019770: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00019780: 2020 2020 2020 2020 204d 4153 4b26 616d MASK&am │ │ │ │ -00019790: 703b 2020 2020 2020 2020 206d 6173 6b2c p; mask, │ │ │ │ -000197a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000197f0: 2036 3039 3c2f 7370 616e 3e20 2020 2020 609 │ │ │ │ -00019800: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00019810: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00019820: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Crease::Ru │ │ │ │ -00019880: 6c65 3c2f 613e 2020 7275 6c65 293c 7370 le rule) const {
    .
    610 .
    6 │ │ │ │ -00019960: 3131 3c2f 7370 616e 3e20 2020 203c 7370 11 if │ │ │ │ -00019990: 2028 2872 756c 6520 3d3d 203c 6120 636c ((rule == Cr │ │ │ │ -00019a10: 6561 7365 3a3a 5255 4c45 5f53 4d4f 4f54 ease::RULE_SMOOT │ │ │ │ -00019a20: 483c 2f61 3e29 207c 7c20 2872 756c 6520 H) || (rule │ │ │ │ -00019a30: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ -00019ab0: 4c45 5f44 4152 543c 2f61 3e29 2920 7b3c LE_DART)) {< │ │ │ │ -00019ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00019b10: 3631 323c 2f73 7061 6e3e 2020 2020 2020 612 │ │ │ │ -00019b20: 2020 6173 7369 676e 536d 6f6f 7468 4c69 assignSmoothLi │ │ │ │ -00019b30: 6d69 744d 6173 6b28 7665 7274 6578 2c20 mitMask(vertex, │ │ │ │ -00019b40: 6d61 736b 293b 3c2f 6469 763e 0a3c 6469 mask);
    .< │ │ │ │ -00019b60: 6120 6964 3d22 6c30 3036 3133 2220 6e61 a id="l00613" na │ │ │ │ -00019b70: 6d65 3d22 6c30 3036 3133 223e 3c2f 613e me="l00613"> │ │ │ │ -00019b80: 3c73 7061 6e20 636c 6173 733d 226c 696e 613 } else if │ │ │ │ -00019bf0: 2028 7275 6c65 203d 3d20 3c61 2063 6c61 (rule == Cre │ │ │ │ -00019c70: 6173 653a 3a52 554c 455f 4352 4541 5345 ase::RULE_CREASE │ │ │ │ -00019c80: 3c2f 613e 2920 7b3c 2f64 6976 3e0a 3c64 ) {
    . │ │ │ │ -00019ca0: 3c61 2069 643d 226c 3030 3631 3422 206e 614
    float │ │ │ │ -00019d10: 202a 2065 6467 6553 6861 7270 6e65 7373 * edgeSharpness │ │ │ │ -00019d20: 203d 2028 3c73 7061 6e20 636c 6173 733d = (fl │ │ │ │ -00019d40: 6f61 743c 2f73 7061 6e3e 202a 2961 6c6c oat *)all │ │ │ │ -00019d50: 6f63 6128 7665 7274 6578 2e47 6574 4e75 oca(vertex.GetNu │ │ │ │ -00019d60: 6d45 6467 6573 2829 202a 203c 7370 616e mEdges() * sizeof(f │ │ │ │ -00019d90: 6c6f 6174 2929 3b3c 2f64 6976 3e0a 3c64 loat));
    . │ │ │ │ -00019db0: 3c61 2069 643d 226c 3030 3631 3522 206e 615 vertex │ │ │ │ -00019e00: 2e47 6574 5368 6172 706e 6573 7350 6572 .GetSharpnessPer │ │ │ │ -00019e10: 4564 6765 2865 6467 6553 6861 7270 6e65 Edge(edgeSharpne │ │ │ │ -00019e20: 7373 293b 3c2f 6469 763e 0a3c 6469 7620 ss);
    .
    616 │ │ │ │ -00019e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00019ed0: 2036 3137 3c2f 7370 616e 3e20 2020 2020 617 │ │ │ │ -00019ee0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -00019f00: 3c2f 7370 616e 3e20 6372 6561 7365 456e creaseEn │ │ │ │ -00019f10: 6473 5b32 5d3b 3c2f 6469 763e 0a3c 6469 ds[2];
    .< │ │ │ │ -00019f30: 6120 6964 3d22 6c30 3036 3138 2220 6e61 a id="l00618" na │ │ │ │ -00019f40: 6d65 3d22 6c30 3036 3138 223e 3c2f 613e me="l00618"> │ │ │ │ -00019f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 618 Crease( │ │ │ │ -00019fb0: 5f6f 7074 696f 6e73 292e 3c61 2063 6c61 _options).GetSh │ │ │ │ -0001a010: 6172 7045 6467 6550 6169 724f 6643 7265 arpEdgePairOfCre │ │ │ │ -0001a020: 6173 653c 2f61 3e28 6564 6765 5368 6172 ase(edgeShar │ │ │ │ -0001a030: 706e 6573 732c 2076 6572 7465 782e 4765 pness, vertex.Ge │ │ │ │ -0001a040: 744e 756d 4564 6765 7328 292c 2063 7265 tNumEdges(), cre │ │ │ │ -0001a050: 6173 6545 6e64 7329 3b3c 2f64 6976 3e0a aseEnds);
    . │ │ │ │ -0001a060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -0001a0f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0001a100: 6e6f 223e 2020 3632 303c 2f73 7061 6e3e no"> 620 │ │ │ │ -0001a110: 2020 2020 2020 2020 6173 7369 676e 4372 assignCr │ │ │ │ -0001a120: 6561 7365 4c69 6d69 744d 6173 6b28 7665 easeLimitMask(ve │ │ │ │ -0001a130: 7274 6578 2c20 6d61 736b 2c20 6372 6561 rtex, mask, crea │ │ │ │ -0001a140: 7365 456e 6473 293b 3c2f 6469 763e 0a3c seEnds);
    .< │ │ │ │ -0001a150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0001a160: 3e3c 6120 6964 3d22 6c30 3036 3231 2220 > 621 } else { │ │ │ │ -0001a1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0001a220: 2036 3232 3c2f 7370 616e 3e20 2020 2020 622 │ │ │ │ -0001a230: 2020 2061 7373 6967 6e43 6f72 6e65 724c assignCornerL │ │ │ │ -0001a240: 696d 6974 4d61 736b 2876 6572 7465 782c imitMask(vertex, │ │ │ │ -0001a250: 206d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 mask);
    . │ │ │ │ -0001a270: 3c61 2069 643d 226c 3030 3632 3322 206e 623 }
    . │ │ │ │ -0001a2d0: 3c61 2069 643d 226c 3030 3632 3422 206e 624}
    .
    │ │ │ │ -0001a320: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -0001a390: 6120 6964 3d22 6c30 3036 3236 2220 6e61 a id="l00626" na │ │ │ │ -0001a3a0: 6d65 3d22 6c30 3036 3236 223e 3c2f 613e me="l00626"> │ │ │ │ -0001a3b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 626template< │ │ │ │ -0001a3f0: 2f73 7061 6e3e 2026 6c74 3b53 6368 656d /span> <Schem │ │ │ │ -0001a400: 6554 7970 6520 5343 4845 4d45 2667 743b eType SCHEME> │ │ │ │ -0001a410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0001a460: 2036 3237 3c2f 7370 616e 3e3c 7370 616e 627template │ │ │ │ -0001a490: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ -0001a4b0: 616d 653c 2f73 7061 6e3e 2056 4552 5445 ame VERTE │ │ │ │ -0001a4c0: 582c 203c 7370 616e 2063 6c61 7373 3d22 X, typenam │ │ │ │ -0001a4e0: 653c 2f73 7061 6e3e 204d 4153 4b26 6774 e MASK> │ │ │ │ -0001a4f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0001a540: 2020 3632 383c 2f73 7061 6e3e 3c73 7061 628void
    .
    . │ │ │ │ -0001a5d0: 3c61 2069 643d 226c 3030 3632 3922 206e 629 │ │ │ │ -0001a650: 3c2f 613e 3c2f 7370 616e 3e3c 6120 636c Sche │ │ │ │ -0001a6b0: 6d65 266c 743b 5343 4845 4d45 2667 743b me<SCHEME> │ │ │ │ -0001a6c0: 3a3a 436f 6d70 7574 6556 6572 7465 784c ::ComputeVertexL │ │ │ │ -0001a6d0: 696d 6974 4d61 736b 3c2f 613e 2856 4552 imitMask(VER │ │ │ │ -0001a6e0: 5445 5820 3c73 7061 6e20 636c 6173 733d TEX const< │ │ │ │ -0001a700: 2f73 7061 6e3e 2661 6d70 3b20 7665 7274 /span>& vert │ │ │ │ -0001a710: 6578 2c3c 2f64 6976 3e0a 3c64 6976 2063 ex,
    .
    630 │ │ │ │ -0001a770: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001a780: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001a790: 2020 2020 204d 4153 4b26 616d 703b 2020 MASK& │ │ │ │ -0001a7a0: 2020 2020 2020 2070 6f73 4d61 736b 2c3c posMask,< │ │ │ │ -0001a7b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0001a800: 3633 313c 2f73 7061 6e3e 2020 2020 2020 631 │ │ │ │ -0001a810: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001a820: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001a830: 204d 4153 4b26 616d 703b 2020 2020 2020 MASK& │ │ │ │ -0001a840: 2020 2074 616e 314d 6173 6b2c 3c2f 6469 tan1Mask,.
    632 │ │ │ │ -0001a8a0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -0001a8b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001a8c0: 2020 2020 2020 2020 2020 2020 2020 4d41 MA │ │ │ │ -0001a8d0: 534b 2661 6d70 3b20 2020 2020 2020 2020 SK& │ │ │ │ -0001a8e0: 7461 6e32 4d61 736b 2c3c 2f64 6976 3e0a tan2Mask,
    . │ │ │ │ -0001a8f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    634< │ │ │ │ -0001aa50: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0001aa70: 3c61 2069 643d 226c 3030 3633 3522 206e 635 │ │ │ │ -0001aad0: 6966 3c2f 7370 616e 3e20 2828 7275 6c65 if ((rule │ │ │ │ -0001aae0: 203d 3d20 3c61 2063 6c61 7373 3d22 636f == Crease::R │ │ │ │ -0001ab60: 554c 455f 534d 4f4f 5448 3c2f 613e 2920 ULE_SMOOTH) │ │ │ │ -0001ab70: 7c7c 2028 7275 6c65 203d 3d20 3c61 2063 || (rule == C │ │ │ │ -0001abf0: 7265 6173 653a 3a52 554c 455f 4441 5254 rease::RULE_DART │ │ │ │ -0001ac00: 3c2f 613e 2929 207b 3c2f 6469 763e 0a3c )) {
    .< │ │ │ │ -0001ac10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0001ac20: 3e3c 6120 6964 3d22 6c30 3036 3336 2220 > 636 assig │ │ │ │ -0001ac70: 6e53 6d6f 6f74 684c 696d 6974 4d61 736b nSmoothLimitMask │ │ │ │ -0001ac80: 2876 6572 7465 782c 2070 6f73 4d61 736b (vertex, posMask │ │ │ │ -0001ac90: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    637 │ │ │ │ -0001acf0: 2020 2020 2061 7373 6967 6e53 6d6f 6f74 assignSmoot │ │ │ │ -0001ad00: 684c 696d 6974 5461 6e67 656e 744d 6173 hLimitTangentMas │ │ │ │ -0001ad10: 6b73 2876 6572 7465 782c 2074 616e 314d ks(vertex, tan1M │ │ │ │ -0001ad20: 6173 6b2c 2074 616e 324d 6173 6b29 3b3c ask, tan2Mask);< │ │ │ │ -0001ad30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0001ad80: 3633 383c 2f73 7061 6e3e 2020 2020 7d20 638 } │ │ │ │ -0001ad90: 3c73 7061 6e20 636c 6173 733d 226b 6579 else │ │ │ │ -0001add0: 6966 3c2f 7370 616e 3e20 2872 756c 6520 if (rule │ │ │ │ -0001ade0: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ -0001ae60: 4c45 5f43 5245 4153 453c 2f61 3e29 207b LE_CREASE) { │ │ │ │ -0001ae70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0001aec0: 2036 3339 3c2f 7370 616e 3e20 2020 2020 639 │ │ │ │ -0001aed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo │ │ │ │ -0001aef0: 6174 3c2f 7370 616e 3e20 2a20 6564 6765 at * edge │ │ │ │ -0001af00: 5368 6172 706e 6573 7320 3d20 283c 7370 Sharpness = (float *)alloca(ver │ │ │ │ -0001af40: 7465 782e 4765 744e 756d 4564 6765 7328 tex.GetNumEdges( │ │ │ │ -0001af50: 2920 2a20 3c73 7061 6e20 636c 6173 733d ) * sizeof │ │ │ │ -0001af70: 3c2f 7370 616e 3e28 666c 6f61 7429 293b (float)); │ │ │ │ -0001af80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0001afd0: 2036 3430 3c2f 7370 616e 3e20 2020 2020 640 │ │ │ │ -0001afe0: 2020 2076 6572 7465 782e 4765 7453 6861 vertex.GetSha │ │ │ │ -0001aff0: 7270 6e65 7373 5065 7245 6467 6528 6564 rpnessPerEdge(ed │ │ │ │ -0001b000: 6765 5368 6172 706e 6573 7329 3b3c 2f64 geSharpness);.
    64 │ │ │ │ -0001b060: 313c 2f73 7061 6e3e 203c 2f64 6976 3e0a 1
    . │ │ │ │ -0001b070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0001b0a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 642 int │ │ │ │ -0001b0f0: 2063 7265 6173 6545 6e64 735b 325d 3b3c creaseEnds[2];< │ │ │ │ -0001b100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0001b150: 3634 333c 2f73 7061 6e3e 2020 2020 2020 643 │ │ │ │ -0001b160: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Cr │ │ │ │ -0001b190: 6561 7365 3c2f 613e 285f 6f70 7469 6f6e ease(_option │ │ │ │ -0001b1a0: 7329 2e3c 6120 636c 6173 733d 2263 6f64 s).GetSharpEdge │ │ │ │ -0001b200: 5061 6972 4f66 4372 6561 7365 3c2f 613e PairOfCrease │ │ │ │ -0001b210: 2865 6467 6553 6861 7270 6e65 7373 2c20 (edgeSharpness, │ │ │ │ -0001b220: 7665 7274 6578 2e47 6574 4e75 6d45 6467 vertex.GetNumEdg │ │ │ │ -0001b230: 6573 2829 2c20 6372 6561 7365 456e 6473 es(), creaseEnds │ │ │ │ -0001b240: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    644 .
    6 │ │ │ │ -0001b2f0: 3435 3c2f 7370 616e 3e20 2020 2020 2020 45 │ │ │ │ -0001b300: 2061 7373 6967 6e43 7265 6173 654c 696d assignCreaseLim │ │ │ │ -0001b310: 6974 4d61 736b 2876 6572 7465 782c 2070 itMask(vertex, p │ │ │ │ -0001b320: 6f73 4d61 736b 2c20 6372 6561 7365 456e osMask, creaseEn │ │ │ │ -0001b330: 6473 293b 3c2f 6469 763e 0a3c 6469 7620 ds);
    .
    646 │ │ │ │ -0001b390: 2020 2020 2020 2061 7373 6967 6e43 7265 assignCre │ │ │ │ -0001b3a0: 6173 654c 696d 6974 5461 6e67 656e 744d aseLimitTangentM │ │ │ │ -0001b3b0: 6173 6b73 2876 6572 7465 782c 2074 616e asks(vertex, tan │ │ │ │ -0001b3c0: 314d 6173 6b2c 2074 616e 324d 6173 6b2c 1Mask, tan2Mask, │ │ │ │ -0001b3d0: 2063 7265 6173 6545 6e64 7329 3b3c 2f64 creaseEnds);.
    64 │ │ │ │ -0001b430: 373c 2f73 7061 6e3e 2020 2020 7d20 3c73 7 } else {
    .
    < │ │ │ │ -0001b4a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0001b4b0: 6e6f 223e 2020 3634 383c 2f73 7061 6e3e no"> 648 │ │ │ │ -0001b4c0: 2020 2020 2020 2020 6173 7369 676e 436f assignCo │ │ │ │ -0001b4d0: 726e 6572 4c69 6d69 744d 6173 6b28 7665 rnerLimitMask(ve │ │ │ │ -0001b4e0: 7274 6578 2c20 706f 734d 6173 6b29 3b3c rtex, posMask);< │ │ │ │ -0001b4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0001b540: 3634 393c 2f73 7061 6e3e 2020 2020 2020 649 │ │ │ │ -0001b550: 2020 6173 7369 676e 436f 726e 6572 4c69 assignCornerLi │ │ │ │ -0001b560: 6d69 7454 616e 6765 6e74 4d61 736b 7328 mitTangentMasks( │ │ │ │ -0001b570: 7665 7274 6578 2c20 7461 6e31 4d61 736b vertex, tan1Mask │ │ │ │ -0001b580: 2c20 7461 6e32 4d61 736b 293b 3c2f 6469 , tan2Mask);.
    650 │ │ │ │ -0001b5e0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    651 │ │ │ │ -0001b640: 3c2f 7370 616e 3e7d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ -0001b650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0001b6a0: 3635 323c 2f73 7061 6e3e 203c 2f64 6976 652
    .< │ │ │ │ +00018f20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00018f30: 3e3c 6120 6964 3d22 6c30 3131 3634 2220 > 1164 │ │ │ │ +00018f80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018f90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018fa0: 2020 6476 4275 6666 6572 2c20 6476 4465 dvBuffer, dvDe │ │ │ │ +00018fb0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1165 │ │ │ │ +00019010: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019020: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019030: 2020 2020 2020 2020 2020 2020 2064 7575 duu │ │ │ │ +00019040: 4275 6666 6572 2c20 6475 7544 6573 632c Buffer, duuDesc, │ │ │ │ +00019050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000190a0: 3131 3636 3c2f 7370 616e 3e20 2020 2020 1166 │ │ │ │ +000190b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000190c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000190d0: 2020 2020 2020 2020 2020 6475 7642 7566 duvBuf │ │ │ │ +000190e0: 6665 722c 2064 7576 4465 7363 2c3c 2f64 fer, duvDesc,.
    116 │ │ │ │ +00019140: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ │ +00019150: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019160: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019170: 2020 2020 2020 2064 7676 4275 6666 6572 dvvBuffer │ │ │ │ +00019180: 2c20 6476 7644 6573 632c 3c2f 6469 763e , dvvDesc,
    │ │ │ │ +00019190: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000191c0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1168 │ │ │ │ +000191f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019200: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019210: 2020 2020 6e75 6d50 6174 6368 436f 6f72 numPatchCoor │ │ │ │ +00019220: 6473 2c20 7061 7463 6843 6f6f 7264 732c ds, patchCoords, │ │ │ │ +00019230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00019280: 3131 3639 3c2f 7370 616e 3e20 2020 2020 1169 │ │ │ │ +00019290: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000192a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000192b0: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ +000192c0: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ +00019300: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00019310: 6e6f 223e 2031 3137 303c 2f73 7061 6e3e no"> 1170 │ │ │ │ +00019320: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019330: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019340: 2020 2020 2020 2020 2020 2020 2020 206e n │ │ │ │ +00019350: 756d 5374 6172 7445 7665 6e74 732c 2073 umStartEvents, s │ │ │ │ +00019360: 7461 7274 4576 656e 7473 2c20 656e 6445 tartEvents, endE │ │ │ │ +00019370: 7665 6e74 293b 3c2f 6469 763e 0a3c 6469 vent);
    .< │ │ │ │ +00019390: 6120 6964 3d22 6c30 3131 3731 2220 6e61 a id="l01171" na │ │ │ │ +000193a0: 6d65 3d22 6c30 3131 3731 223e 3c2f 613e me="l01171"> │ │ │ │ +000193b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1171 │ │ │ │ +000193e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 delete
    instance;.
    11 │ │ │ │ +00019460: 3732 3c2f 7370 616e 3e20 2020 2020 2020 72 │ │ │ │ +00019470: 2020 2020 2020 2020 203c 7370 616e 2063 return │ │ │ │ +000194a0: 2072 3b3c 2f64 6976 3e0a 3c64 6976 2063 r;
    .
    1173 │ │ │ │ +00019500: 2020 2020 2020 2020 2020 7d3c 2f64 6976 }
    .
    1174< │ │ │ │ +00019560: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00019570: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +00019590: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ │ +000195b0: 6661 6c73 653c 2f73 7061 6e3e 3b3c 2f64 false;.
    117 │ │ │ │ +00019610: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ │ +00019620: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ +00019670: 2031 3137 363c 2f73 7061 6e3e 2020 2020 1176 │ │ │ │ +00019680: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ │ +00019690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000196a0: 3e3c 6120 6964 3d22 6c30 3131 3737 2220 > 1177
    .
    1215 │ │ │ │ +00019740: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ │ +00019760: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename SRC_BUFFER, < │ │ │ │ +000197a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000197b0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename DST_BUFFER, │ │ │ │ +000197d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00019820: 3132 3136 3c2f 7370 616e 3e20 2020 2020 1216 │ │ │ │ +00019830: 2020 2020 2020 2020 203c 7370 616e 2063 t │ │ │ │ +00019850: 7970 656e 616d 653c 2f73 7061 6e3e 2050 ypename P │ │ │ │ +00019860: 4154 4348 434f 4f52 445f 4255 4646 4552 ATCHCOORD_BUFFER │ │ │ │ +00019870: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ +00019890: 3c2f 7370 616e 3e20 5041 5443 485f 5441 PATCH_TA │ │ │ │ +000198a0: 424c 4526 6774 3b3c 2f64 6976 3e0a 3c64 BLE>
    ..
    1217 b │ │ │ │ +000199b0: 6f6f 6c3c 2f73 7061 6e3e 203c 6120 636c ool Eval │ │ │ │ +00019a10: 5061 7463 6865 733c 2f61 3e28 3c2f 6469 Patches(.
    1218 │ │ │ │ +00019a70: 3c2f 7370 616e 3e20 2020 2020 2020 2053 S │ │ │ │ +00019a80: 5243 5f42 5546 4645 5220 2a73 7263 4275 RC_BUFFER *srcBu │ │ │ │ +00019a90: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +00019ad0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00019af0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +00019b00: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +00019b10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00019b20: 3e3c 6120 6964 3d22 6c30 3132 3139 2220 > 1219 DST_B │ │ │ │ +00019b70: 5546 4645 5220 2a64 7374 4275 6666 6572 UFFER *dstBuffer │ │ │ │ +00019b80: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ +00019bb0: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00019bc0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +00019be0: 2f73 7061 6e3e 2026 616d 703b 6473 7444 /span> &dstD │ │ │ │ +00019bf0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1220 │ │ │ │ +00019c50: 2020 2020 2020 203c 7370 616e 2063 6c61 int numP │ │ │ │ +00019c80: 6174 6368 436f 6f72 6473 2c3c 2f64 6976 atchCoords,
    .
    1221< │ │ │ │ +00019ce0: 2f73 7061 6e3e 2020 2020 2020 2020 5041 /span> PA │ │ │ │ +00019cf0: 5443 4843 4f4f 5244 5f42 5546 4645 5220 TCHCOORD_BUFFER │ │ │ │ +00019d00: 2a70 6174 6368 436f 6f72 6473 2c3c 2f64 *patchCoords,.
    122 │ │ │ │ +00019d60: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +00019d70: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ +00019d80: 6368 5461 626c 652c 3c2f 6469 763e 0a3c chTable,
    .< │ │ │ │ +00019d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00019da0: 3e3c 6120 6964 3d22 6c30 3132 3233 2220 > 1223 unsigned
    i │ │ │ │ +00019e30: 6e74 3c2f 7370 616e 3e20 6e75 6d53 7461 nt numSta │ │ │ │ +00019e40: 7274 4576 656e 7473 3d30 2c3c 2f64 6976 rtEvents=0,
    .
    1224< │ │ │ │ +00019ea0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> const │ │ │ │ +00019ed0: 2063 6c5f 6576 656e 742a 2073 7461 7274 cl_event* start │ │ │ │ +00019ee0: 4576 656e 7473 3d4e 554c 4c2c 3c2f 6469 Events=NULL,.
    1225 │ │ │ │ +00019f40: 3c2f 7370 616e 3e20 2020 2020 2020 2063 c │ │ │ │ +00019f50: 6c5f 6576 656e 742a 2065 6e64 4576 656e l_event* endEven │ │ │ │ +00019f60: 743d 4e55 4c4c 293c 7370 616e 2063 6c61 t=NULL) co │ │ │ │ +00019f80: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    1226 │ │ │ │ +00019fe0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00019ff0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001a000: 3e3c 6120 6964 3d22 6c30 3132 3237 2220 > 1227 return EvalPatches< │ │ │ │ +0001a0d0: 2f61 3e28 7372 6342 7566 6665 722d 2667 /a>(srcBuffer-&g │ │ │ │ +0001a0e0: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +0001a0f0: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +0001a100: 2073 7263 4465 7363 2c3c 2f64 6976 3e0a srcDesc,
    . │ │ │ │ +0001a110: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1229 │ │ │ │ +0001a210: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a220: 2020 2020 2020 2020 2020 302c 203c 6120 0, Buffer │ │ │ │ +0001a260: 4465 7363 7269 7074 6f72 3c2f 613e 2829 Descriptor() │ │ │ │ +0001a270: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001a2c0: 2031 3233 303c 2f73 7061 6e3e 2020 2020 1230 │ │ │ │ +0001a2d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a2e0: 2020 2020 2020 2030 2c20 3c61 2063 6c61 0, BufferDes │ │ │ │ +0001a320: 6372 6970 746f 723c 2f61 3e28 292c 3c2f criptor(),.
    12 │ │ │ │ +0001a380: 3331 3c2f 7370 616e 3e20 2020 2020 2020 31 │ │ │ │ +0001a390: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a3a0: 2020 2020 6e75 6d50 6174 6368 436f 6f72 numPatchCoor │ │ │ │ +0001a3b0: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    1232 │ │ │ │ +0001a410: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a420: 2020 2020 2020 2020 2070 6174 6368 436f patchCo │ │ │ │ +0001a430: 6f72 6473 2d26 6774 3b42 696e 6443 4c42 ords->BindCLB │ │ │ │ +0001a440: 7566 6665 7228 5f63 6c43 6f6d 6d61 6e64 uffer(_clCommand │ │ │ │ +0001a450: 5175 6575 6529 2c3c 2f64 6976 3e0a 3c64 Queue),
    . │ │ │ │ +0001a470: 3c61 2069 643d 226c 3031 3233 3322 206e 1233 │ │ │ │ +0001a4c0: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ +0001a4d0: 6368 5461 626c 652d 2667 743b 4765 7450 chTable->GetP │ │ │ │ +0001a4e0: 6174 6368 4172 7261 7942 7566 6665 7228 atchArrayBuffer( │ │ │ │ +0001a4f0: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    1234 │ │ │ │ +0001a550: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a560: 2020 2020 2020 2020 7061 7463 6854 6162 patchTab │ │ │ │ +0001a570: 6c65 2d26 6774 3b47 6574 5061 7463 6849 le->GetPatchI │ │ │ │ +0001a580: 6e64 6578 4275 6666 6572 2829 2c3c 2f64 ndexBuffer(),.
    123 │ │ │ │ +0001a5e0: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ │ +0001a5f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a600: 2020 2070 6174 6368 5461 626c 652d 2667 patchTable-&g │ │ │ │ +0001a610: 743b 4765 7450 6174 6368 5061 7261 6d42 t;GetPatchParamB │ │ │ │ +0001a620: 7566 6665 7228 292c 3c2f 6469 763e 0a3c uffer(),
    .< │ │ │ │ +0001a630: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001a640: 3e3c 6120 6964 3d22 6c30 3132 3336 2220 > 1236 │ │ │ │ +0001a690: 2020 2020 2020 2020 2020 2020 2020 6e75 nu │ │ │ │ +0001a6a0: 6d53 7461 7274 4576 656e 7473 2c20 7374 mStartEvents, st │ │ │ │ +0001a6b0: 6172 7445 7665 6e74 732c 2065 6e64 4576 artEvents, endEv │ │ │ │ +0001a6c0: 656e 7429 3b3c 2f64 6976 3e0a 3c64 6976 ent);
    .
    < │ │ │ │ +0001a700: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001a710: 6e6f 223e 2031 3233 373c 2f73 7061 6e3e no"> 1237 │ │ │ │ +0001a720: 2020 2020 7d3c 2f64 6976 3e0a 3c2f 6469 }
    ..
    1238 │ │ │ │ +0001a780: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0001a790: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001a7a0: 3e3c 6120 6964 3d22 6c30 3132 3836 2220 > 1286 tem │ │ │ │ +0001a800: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ +0001a810: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ +0001a830: 2f73 7061 6e3e 2053 5243 5f42 5546 4645 /span> SRC_BUFFE │ │ │ │ +0001a840: 522c 203c 7370 616e 2063 6c61 7373 3d22 R, typenam │ │ │ │ +0001a860: 653c 2f73 7061 6e3e 2044 5354 5f42 5546 e DST_BUF │ │ │ │ +0001a870: 4645 522c 3c2f 6469 763e 0a3c 6469 7620 FER,
    .
    1287 │ │ │ │ +0001a8d0: 2020 2020 2020 2020 2020 2020 203c 7370 typename PATCHCOORD_BU │ │ │ │ +0001a910: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ +0001a930: 6e61 6d65 3c2f 7370 616e 3e20 5041 5443 name PATC │ │ │ │ +0001a940: 485f 5441 424c 4526 6774 3b3c 2f64 6976 H_TABLE>
    .
    .
    │ │ │ │ +0001a9e0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 1288 bool < │ │ │ │ +0001aa60: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0001aa70: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0001aa80: 2261 3031 3134 312e 6874 6d6c 2361 6436 "a01141.html#ad6 │ │ │ │ +0001aa90: 3262 6463 6237 3261 3864 3837 3866 3830 2bdcb72a8d878f80 │ │ │ │ +0001aaa0: 6136 6536 6135 3361 6265 6263 6364 223e a6e6a53abebccd"> │ │ │ │ +0001aab0: 4576 616c 5061 7463 6865 733c 2f61 3e28 EvalPatches( │ │ │ │ +0001aac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001ab10: 3132 3839 3c2f 7370 616e 3e20 2020 2020 1289 │ │ │ │ +0001ab20: 2020 2053 5243 5f42 5546 4645 5220 2a73 SRC_BUFFER *s │ │ │ │ +0001ab30: 7263 4275 6666 6572 2c20 3c61 2063 6c61 rcBuffer, BufferDes │ │ │ │ +0001ab70: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +0001aba0: 616d 703b 7372 6344 6573 632c 3c2f 6469 amp;srcDesc,.
    1290 │ │ │ │ +0001ac00: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +0001ac10: 5354 5f42 5546 4645 5220 2a64 7374 4275 ST_BUFFER *dstBu │ │ │ │ +0001ac20: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +0001ac60: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +0001ac80: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +0001ac90: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ +0001aca0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001acb0: 3e3c 6120 6964 3d22 6c30 3132 3931 2220 > 1291 DST_B │ │ │ │ +0001ad00: 5546 4645 5220 2a64 7542 7566 6665 722c UFFER *duBuffer, │ │ │ │ +0001ad10: 2020 3c61 2063 6c61 7373 3d22 636f 6465 B │ │ │ │ +0001ad40: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +0001ad50: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +0001ad70: 2f73 7061 6e3e 2026 616d 703b 6475 4465 /span> &duDe │ │ │ │ +0001ad80: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1292 │ │ │ │ +0001ade0: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +0001adf0: 202a 6476 4275 6666 6572 2c20 203c 6120 *dvBuffer, Buffer │ │ │ │ +0001ae30: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0001ae40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0001ae50: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dvDesc,.
    12 │ │ │ │ +0001aec0: 3933 3c2f 7370 616e 3e20 2020 2020 2020 93 │ │ │ │ +0001aed0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int numPatchCo │ │ │ │ +0001af00: 6f72 6473 2c3c 2f64 6976 3e0a 3c64 6976 ords,
    .
    < │ │ │ │ +0001af40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001af50: 6e6f 223e 2031 3239 343c 2f73 7061 6e3e no"> 1294 │ │ │ │ +0001af60: 2020 2020 2020 2020 5041 5443 4843 4f4f PATCHCOO │ │ │ │ +0001af70: 5244 5f42 5546 4645 5220 2a70 6174 6368 RD_BUFFER *patch │ │ │ │ +0001af80: 436f 6f72 6473 2c3c 2f64 6976 3e0a 3c64 Coords,
    . │ │ │ │ +0001afa0: 3c61 2069 643d 226c 3031 3239 3522 206e 1295 PATCH_ │ │ │ │ +0001aff0: 5441 424c 4520 2a70 6174 6368 5461 626c TABLE *patchTabl │ │ │ │ +0001b000: 652c 3c2f 6469 763e 0a3c 6469 7620 636c e,
    .
    1296 │ │ │ │ +0001b060: 2020 2020 203c 7370 616e 2063 6c61 7373 u │ │ │ │ +0001b080: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned < │ │ │ │ +0001b090: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0001b0a0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int numStartEven │ │ │ │ +0001b0c0: 7473 3d30 2c3c 2f64 6976 3e0a 3c64 6976 ts=0,
    .
    < │ │ │ │ +0001b100: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001b110: 6e6f 223e 2031 3239 373c 2f73 7061 6e3e no"> 1297 │ │ │ │ +0001b120: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ │ +0001b140: 6e73 743c 2f73 7061 6e3e 2063 6c5f 6576 nst cl_ev │ │ │ │ +0001b150: 656e 742a 2073 7461 7274 4576 656e 7473 ent* startEvents │ │ │ │ +0001b160: 3d4e 554c 4c2c 3c2f 6469 763e 0a3c 6469 =NULL,
    .< │ │ │ │ +0001b180: 6120 6964 3d22 6c30 3132 3938 2220 6e61 a id="l01298" na │ │ │ │ +0001b190: 6d65 3d22 6c30 3132 3938 223e 3c2f 613e me="l01298"> │ │ │ │ +0001b1a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1298 cl_even │ │ │ │ +0001b1d0: 742a 2065 6e64 4576 656e 743d 4e55 4c4c t* endEvent=NULL │ │ │ │ +0001b1e0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ │ +0001b220: 6120 6964 3d22 6c30 3132 3939 2220 6e61 a id="l01299" na │ │ │ │ +0001b230: 6d65 3d22 6c30 3132 3939 223e 3c2f 613e me="l01299"> │ │ │ │ +0001b240: 3c73 7061 6e20 636c 6173 733d 226c 696e 1299
    .
    1300 │ │ │ │ +0001b2c0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +0001b2e0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn Ev │ │ │ │ +0001b340: 616c 5061 7463 6865 733c 2f61 3e28 7372 alPatches(sr │ │ │ │ +0001b350: 6342 7566 6665 722d 2667 743b 4269 6e64 cBuffer->Bind │ │ │ │ +0001b360: 434c 4275 6666 6572 285f 636c 436f 6d6d CLBuffer(_clComm │ │ │ │ +0001b370: 616e 6451 7565 7565 292c 2073 7263 4465 andQueue), srcDe │ │ │ │ +0001b380: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1301 │ │ │ │ +0001b3e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b3f0: 2020 2020 2020 2020 2064 7374 4275 6666 dstBuff │ │ │ │ +0001b400: 6572 2d26 6774 3b42 696e 6443 4c42 7566 er->BindCLBuf │ │ │ │ +0001b410: 6665 7228 5f63 6c43 6f6d 6d61 6e64 5175 fer(_clCommandQu │ │ │ │ +0001b420: 6575 6529 2c20 6473 7444 6573 632c 3c2f eue), dstDesc,.
    13 │ │ │ │ +0001b480: 3032 3c2f 7370 616e 3e20 2020 2020 2020 02 │ │ │ │ +0001b490: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b4a0: 2020 2020 6475 4275 6666 6572 2d26 6774 duBuffer-> │ │ │ │ +0001b4b0: 3b42 696e 6443 4c42 7566 6665 7228 5f63 ;BindCLBuffer(_c │ │ │ │ +0001b4c0: 6c43 6f6d 6d61 6e64 5175 6575 6529 2c20 lCommandQueue), │ │ │ │ +0001b4d0: 2064 7544 6573 632c 3c2f 6469 763e 0a3c duDesc,
    .< │ │ │ │ +0001b4e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001b4f0: 3e3c 6120 6964 3d22 6c30 3133 3033 2220 > 1303
    │ │ │ │ +0001b540: 2020 2020 2020 2020 2020 2020 2020 6476 dv │ │ │ │ +0001b550: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ +0001b560: 4c42 7566 6665 7228 5f63 6c43 6f6d 6d61 LBuffer(_clComma │ │ │ │ +0001b570: 6e64 5175 6575 6529 2c20 2064 7644 6573 ndQueue), dvDes │ │ │ │ +0001b580: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1304 │ │ │ │ +0001b5e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b5f0: 2020 2020 2020 2020 6e75 6d50 6174 6368 numPatch │ │ │ │ +0001b600: 436f 6f72 6473 2c3c 2f64 6976 3e0a 3c64 Coords,
    . │ │ │ │ +0001b620: 3c61 2069 643d 226c 3031 3330 3522 206e 1305 │ │ │ │ +0001b670: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ +0001b680: 6368 436f 6f72 6473 2d26 6774 3b42 696e chCoords->Bin │ │ │ │ +0001b690: 6443 4c42 7566 6665 7228 5f63 6c43 6f6d dCLBuffer(_clCom │ │ │ │ +0001b6a0: 6d61 6e64 5175 6575 6529 2c3c 2f64 6976 mandQueue),
    .
    653< │ │ │ │ -0001b700: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0001b720: 3c61 2069 643d 226c 3030 3635 3422 206e 654} // end │ │ │ │ -0001b780: 206e 616d 6573 7061 6365 2073 6463 3c2f namespace sdc
    .
    < │ │ │ │ -0001b7d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0001b7e0: 6e6f 223e 2020 3635 353c 2f73 7061 6e3e no"> 655 │ │ │ │ -0001b7f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0001b840: 2020 3635 363c 2f73 7061 6e3e 7d20 3c73 656} // end names │ │ │ │ -0001b870: 7061 6365 204f 5045 4e53 5542 4449 565f pace OPENSUBDIV_ │ │ │ │ -0001b880: 5645 5253 494f 4e3c 2f73 7061 6e3e 3c2f VERSION.
    6 │ │ │ │ -0001b8e0: 3537 3c2f 7370 616e 3e3c 7370 616e 2063 57u │ │ │ │ -0001b900: 7369 6e67 206e 616d 6573 7061 6365 203c sing namespace < │ │ │ │ -0001b910: 2f73 7061 6e3e 4f50 454e 5355 4244 4956 /span>OPENSUBDIV │ │ │ │ -0001b920: 5f56 4552 5349 4f4e 3b3c 2f64 6976 3e0a _VERSION;
    . │ │ │ │ -0001b930: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0001b960: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 658} // e │ │ │ │ -0001b9a0: 6e64 206e 616d 6573 7061 6365 204f 7065 nd namespace Ope │ │ │ │ -0001b9b0: 6e53 7562 6469 763c 2f73 7061 6e3e 3c2f nSubdiv.
    6 │ │ │ │ -0001ba10: 3539 3c2f 7370 616e 3e20 3c2f 6469 763e 59
    │ │ │ │ -0001ba20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0001ba50: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 660 │ │ │ │ -0001ba90: 2365 6e64 6966 203c 2f73 7061 6e3e 3c73 #endif /* OPENSUBDI │ │ │ │ -0001bac0: 5633 5f53 4443 5f53 4348 454d 455f 4820 V3_SDC_SCHEME_H │ │ │ │ -0001bad0: 2a2f 3c2f 7370 616e 3e3c 7370 616e 2063 */
    .
    E │ │ │ │ -0001bcc0: 6e75 6d65 7261 7465 6420 7479 7065 2066 numerated type f │ │ │ │ -0001bcd0: 6f72 2061 6c6c 2066 6163 6520 7370 6c69 or all face spli │ │ │ │ -0001bce0: 7474 696e 6720 7363 6865 6d65 732e 3c2f tting schemes.
    Defini │ │ │ │ -0001bd10: 7469 6f6e 3c2f 623e 203c 6120 6872 6566 tion typ │ │ │ │ -0001bd40: 6573 2e68 3a34 373c 2f61 3e3c 2f64 6976 es.h:47
    .
    < │ │ │ │ -0001bd90: 6120 6872 6566 3d22 6130 3133 3235 2e68 a href="a01325.h │ │ │ │ -0001bda0: 746d 6c22 3e4f 7065 6e53 7562 6469 763a tml">OpenSubdiv: │ │ │ │ -0001bdb0: 3a4f 5045 4e53 5542 4449 565f 5645 5253 :OPENSUBDIV_VERS │ │ │ │ -0001bdc0: 494f 4e3a 3a53 6463 3a3a 4372 6561 7365 ION::Sdc::Crease │ │ │ │ -0001bdd0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    Typ │ │ │ │ -0001bdf0: 6573 2c20 636f 6e73 7461 6e74 7320 616e es, constants an │ │ │ │ -0001be00: 6420 7574 696c 6974 6965 7320 7265 6c61 d utilities rela │ │ │ │ -0001be10: 7465 6420 746f 2073 656d 692d 7368 6172 ted to semi-shar │ │ │ │ -0001be20: 7020 6372 6561 7369 6e67 20e2 8093 2077 p creasing ... w │ │ │ │ -0001be30: 686f 7365 2069 6d70 6c65 6d65 6e74 6174 hose implementat │ │ │ │ -0001be40: 696f 6e20 6973 2069 6e64 6570 656e 6465 ion is independe │ │ │ │ -0001be50: 6e74 206f 2e2e 2e3c 2f64 6976 3e3c 6469 nt o...
    │ │ │ │ -0001be70: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition crease.h:6 │ │ │ │ -0001beb0: 323c 2f61 3e3c 2f64 6976 3e3c 2f64 6976 2
    .
    < │ │ │ │ -0001bfc0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ -0001bfd0: 203c 6120 6872 6566 3d22 6130 3037 3433 crease.h:82 │ │ │ │ -0001c000: 3c2f 613e 3c2f 6469 763e 3c2f 6469 763e
    │ │ │ │ -0001c010: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    .
    OpenSubdiv::OPE │ │ │ │ -0001c290: 4e53 5542 4449 565f 5645 5253 494f 4e3a NSUBDIV_VERSION: │ │ │ │ -0001c2a0: 3a53 6463 3a3a 4372 6561 7365 3a3a 5255 :Sdc::Crease::RU │ │ │ │ -0001c2b0: 4c45 5f53 4d4f 4f54 483c 2f61 3e3c 2f64 LE_SMOOTH
    @ RULE_SM │ │ │ │ -0001c2e0: 4f4f 5448 3c2f 6469 763e 3c64 6976 2063 OOTH
    │ │ │ │ -0001c300: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ -0001c310: 6120 6872 6566 3d22 6130 3037 3433 5f73 a href="a00743_s │ │ │ │ -0001c320: 6f75 7263 652e 6874 6d6c 236c 3030 3038 ource.html#l0008 │ │ │ │ -0001c330: 3422 3e63 7265 6173 652e 683a 3834 3c2f 4">crease.h:84
    .< │ │ │ │ -0001c350: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -0001c360: 6964 3d22 6161 3031 3332 355f 6874 6d6c id="aa01325_html │ │ │ │ -0001c370: 5f61 3131 6663 6435 3165 6638 3631 3138 _a11fcd51ef86118 │ │ │ │ -0001c380: 6636 3565 3630 3363 3134 3734 3337 3761 f65e603c1474377a │ │ │ │ -0001c390: 3738 6139 3636 6661 3161 6538 6165 6238 78a966fa1ae8aeb8 │ │ │ │ -0001c3a0: 3538 3763 3439 3863 6636 6139 3263 6333 587c498cf6a92cc3 │ │ │ │ -0001c3b0: 3333 3522 3e3c 6469 7620 636c 6173 733d 335">. │ │ │ │ -0001c4f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322 .
    OpenSubdiv:: │ │ │ │ -0001c730: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ -0001c740: 4f4e 3a3a 5364 633a 3a43 7265 6173 653a ON::Sdc::Crease: │ │ │ │ -0001c750: 3a47 6574 5368 6172 7045 6467 6550 6169 :GetSharpEdgePai │ │ │ │ -0001c760: 724f 6643 7265 6173 653c 2f61 3e3c 2f64 rOfCrease
    void GetS │ │ │ │ -0001c790: 6861 7270 4564 6765 5061 6972 4f66 4372 harpEdgePairOfCr │ │ │ │ -0001c7a0: 6561 7365 2866 6c6f 6174 2063 6f6e 7374 ease(float const │ │ │ │ -0001c7b0: 202a 696e 6369 6465 6e74 4564 6765 5368 *incidentEdgeSh │ │ │ │ -0001c7c0: 6172 706e 6573 732c 2069 6e74 2069 6e63 arpness, int inc │ │ │ │ -0001c7d0: 6964 656e 7445 6467 6543 6f75 6e74 2c20 identEdgeCount, │ │ │ │ -0001c7e0: 696e 7420 7368 6172 7045 6467 6550 6169 int sharpEdgePai │ │ │ │ -0001c7f0: 725b 325d 2920 636f 6e73 743c 2f64 6976 r[2]) const
    Definitio │ │ │ │ -0001c820: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n crease │ │ │ │ -0001c850: 2e68 3a32 3238 3c2f 613e 3c2f 6469 763e .h:228
    │ │ │ │ -0001c860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..< │ │ │ │ -0001c9e0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -0001c9f0: 6964 3d22 6161 3031 3332 355f 6874 6d6c id="aa01325_html │ │ │ │ -0001ca00: 5f61 3564 6661 3638 3130 6635 3130 6661 _a5dfa6810f510fa │ │ │ │ -0001ca10: 6331 6563 3632 3166 6339 6536 6235 3330 c1ec621fc9e6b530 │ │ │ │ -0001ca20: 6334 223e 3c64 6976 2063 6c61 7373 3d22 c4"> │ │ │ │ -0001cab0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool IsUnifo │ │ │ │ -0001cad0: 726d 2829 2063 6f6e 7374 3c2f 6469 763e rm() const
    │ │ │ │ -0001cae0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -0001cb00: 3c2f 623e 203c 6120 6872 6566 3d22 6130 crease. │ │ │ │ -0001cb30: 683a 3935 3c2f 613e 3c2f 6469 763e 3c2f h:95
    .
    │ │ │ │ -0001cc40: 666c 6f61 7420 436f 6d70 7574 6546 7261 float ComputeFra │ │ │ │ -0001cc50: 6374 696f 6e61 6c57 6569 6768 7441 7456 ctionalWeightAtV │ │ │ │ -0001cc60: 6572 7465 7828 666c 6f61 7420 7665 7274 ertex(float vert │ │ │ │ -0001cc70: 6578 5368 6172 706e 6573 732c 2066 6c6f exSharpness, flo │ │ │ │ -0001cc80: 6174 2063 6869 6c64 5665 7274 6578 5368 at childVertexSh │ │ │ │ -0001cc90: 6172 706e 6573 732c 2069 6e74 2069 6e63 arpness, int inc │ │ │ │ -0001cca0: 6964 656e 7445 6467 6543 6f75 6e74 2c20 identEdgeCount, │ │ │ │ -0001ccb0: 666c 6f61 7420 636f 6e73 7420 2a69 6e63 float const *inc │ │ │ │ -0001ccc0: 6964 656e 7445 6467 6553 6861 7270 6e65 identEdgeSharpne │ │ │ │ -0001ccd0: 7373 2c20 666c 6f61 7420 636f 6e73 7420 ss, float const │ │ │ │ -0001cce0: 2a63 6869 6c64 4564 6765 7353 6861 7270 *childEdgesSharp │ │ │ │ -0001ccf0: 6e65 7373 2920 636f 6e73 743c 2f64 6976 ness) const
    Transitional │ │ │ │ -0001cd20: 2077 6569 6768 7469 6e67 3a20 5768 656e weighting: When │ │ │ │ -0001cd30: 2074 6865 2072 756c 6573 2061 7070 6c69 the rules appli │ │ │ │ -0001cd40: 6361 626c 6520 746f 2061 2070 6172 656e cable to a paren │ │ │ │ -0001cd50: 7420 7665 7274 6578 2061 6e64 2069 7473 t vertex and its │ │ │ │ -0001cd60: 2063 6869 6c64 2064 6966 6665 722c 2e2e child differ,.. │ │ │ │ -0001cd70: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    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
    .
    Scheme │ │ │ │ -0001cf50: 2069 7320 6120 636c 6173 7320 7465 6d70 is a class temp │ │ │ │ -0001cf60: 6c61 7465 2077 6869 6368 2070 726f 7669 late which provi │ │ │ │ -0001cf70: 6465 7320 616c 6c20 696d 706c 656d 656e des all implemen │ │ │ │ -0001cf80: 7461 7469 6f6e 2066 6f72 2074 6865 2073 tation for the s │ │ │ │ -0001cf90: 7562 6469 7669 7369 6f6e 2073 6368 656d ubdivision schem │ │ │ │ -0001cfa0: 6573 2073 7570 706f 7274 6564 2062 792e es supported by. │ │ │ │ -0001cfb0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ -0001cfd0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:66 │ │ │ │ -0001d010: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    │ │ │ │ -0001d110: 766f 6964 2061 7373 6967 6e53 6d6f 6f74 void assignSmoot │ │ │ │ -0001d120: 684d 6173 6b46 6f72 4564 6765 2845 4447 hMaskForEdge(EDG │ │ │ │ -0001d130: 4520 636f 6e73 7420 2661 6d70 3b65 6467 E const &edg │ │ │ │ -0001d140: 652c 204d 4153 4b20 2661 6d70 3b6d 6173 e, MASK &mas │ │ │ │ -0001d150: 6b29 2063 6f6e 7374 3c2f 6469 763e 3c2f k) const
    .
    OpenSubdiv │ │ │ │ -0001d200: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ -0001d210: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ -0001d220: 653a 3a47 6574 546f 706f 6c6f 6769 6361 e::GetTopologica │ │ │ │ -0001d230: 6c53 706c 6974 5479 7065 3c2f 613e 3c2f lSplitType
    static S │ │ │ │ -0001d260: 706c 6974 2047 6574 546f 706f 6c6f 6769 plit GetTopologi │ │ │ │ -0001d270: 6361 6c53 706c 6974 5479 7065 2829 3c2f calSplitType()
    .
    │ │ │ │ -0001d2d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ -0001d380: 766f 6964 2061 7373 6967 6e43 7265 6173 void assignCreas │ │ │ │ -0001d390: 654d 6173 6b46 6f72 5665 7274 6578 2856 eMaskForVertex(V │ │ │ │ -0001d3a0: 4552 5445 5820 636f 6e73 7420 2661 6d70 ERTEX const & │ │ │ │ -0001d3b0: 3b65 6467 652c 204d 4153 4b20 2661 6d70 ;edge, MASK & │ │ │ │ -0001d3c0: 3b6d 6173 6b2c 2069 6e74 2063 6f6e 7374 ;mask, int const │ │ │ │ -0001d3d0: 2063 7265 6173 6545 6e64 735b 325d 2920 creaseEnds[2]) │ │ │ │ -0001d3e0: 636f 6e73 743c 2f64 6976 3e3c 2f64 6976 const
    .
    void Comput │ │ │ │ -0001d4f0: 6556 6572 7465 7856 6572 7465 784d 6173 eVertexVertexMas │ │ │ │ -0001d500: 6b28 5645 5254 4558 2063 6f6e 7374 2026 k(VERTEX const & │ │ │ │ -0001d510: 616d 703b 7665 7274 6578 4e65 6967 6862 amp;vertexNeighb │ │ │ │ -0001d520: 6f72 686f 6f64 2c20 4d41 534b 2026 616d orhood, MASK &am │ │ │ │ -0001d530: 703b 7665 7274 6578 5665 7274 6578 4d61 p;vertexVertexMa │ │ │ │ -0001d540: 736b 2c20 4372 6561 7365 3a3a 5275 6c65 sk, Crease::Rule │ │ │ │ -0001d550: 2070 6172 656e 7452 756c 653d 4372 6561 parentRule=Crea │ │ │ │ -0001d560: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ -0001d570: 2c20 4372 6561 7365 3a3a 5275 6c65 2063 , Crease::Rule c │ │ │ │ -0001d580: 6869 6c64 5275 6c65 3d43 7265 6173 653a hildRule=Crease: │ │ │ │ -0001d590: 3a52 554c 455f 554e 4b4e 4f57 4e29 2063 :RULE_UNKNOWN) c │ │ │ │ -0001d5a0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    Ver │ │ │ │ -0001d5c0: 7465 782d 7665 7274 6578 206d 6173 6b73 tex-vertex masks │ │ │ │ -0001d5d0: 2049 6620 6b6e 6f77 6e2c 2061 2073 696e If known, a sin │ │ │ │ -0001d5e0: 676c 6520 5275 6c65 206f 7220 7061 6972 gle Rule or pair │ │ │ │ -0001d5f0: 206f 6620 5275 6c65 7320 6361 6e20 6265 of Rules can be │ │ │ │ -0001d600: 2073 7065 6369 6669 6564 2028 696e 6469 specified (indi │ │ │ │ -0001d610: 6361 7469 6e67 2061 2063 7265 6173 6520 cating a crease │ │ │ │ -0001d620: 7472 2e2e 2e3c 2f64 6976 3e3c 6469 7620 tr...
    Definition │ │ │ │ -0001d650: 3c61 2068 7265 663d 2261 3030 3733 345f scheme.h:512 │ │ │ │ -0001d680: 3c2f 613e 3c2f 6469 763e 3c2f 6469 763e
    │ │ │ │ -0001d690: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    < │ │ │ │ -0001d770: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0001d780: 6922 3e76 6f69 6420 436f 6d70 7574 6556 i">void ComputeV │ │ │ │ -0001d790: 6572 7465 784c 696d 6974 4d61 736b 2856 ertexLimitMask(V │ │ │ │ -0001d7a0: 4552 5445 5820 636f 6e73 7420 2661 6d70 ERTEX const & │ │ │ │ -0001d7b0: 3b76 6572 7465 784e 6569 6768 626f 7268 ;vertexNeighborh │ │ │ │ -0001d7c0: 6f6f 642c 204d 4153 4b20 2661 6d70 3b70 ood, MASK &p │ │ │ │ -0001d7d0: 6f73 6974 696f 6e4d 6173 6b2c 2043 7265 ositionMask, Cre │ │ │ │ -0001d7e0: 6173 653a 3a52 756c 6520 7665 7274 6578 ase::Rule vertex │ │ │ │ -0001d7f0: 5275 6c65 2920 636f 6e73 743c 2f64 6976 Rule) const
    Limit masks │ │ │ │ -0001d820: 666f 7220 7665 7274 6963 6573 20e2 8093 for vertices ... │ │ │ │ -0001d830: 2070 6f73 6974 696f 6e20 616e 6420 7461 position and ta │ │ │ │ -0001d840: 6e67 656e 7473 2054 6865 7365 2070 7265 ngents These pre │ │ │ │ -0001d850: 7375 6d65 2074 6861 7420 6120 7665 7274 sume that a vert │ │ │ │ -0001d860: 6578 2069 7320 7375 6974 6162 6c79 2069 ex is suitably i │ │ │ │ -0001d870: 736f 6c61 7465 6420 666f 722e 2e2e 3c2f solated for...
    Defini │ │ │ │ -0001d8a0: 7469 6f6e 3c2f 623e 203c 6120 6872 6566 tion sch │ │ │ │ -0001d8d0: 656d 652e 683a 3630 373c 2f61 3e3c 2f64 eme.h:607
    .< │ │ │ │ -0001d9d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0001d9e0: 6922 3e76 6f69 6420 6173 7369 676e 4372 i">void assignCr │ │ │ │ -0001d9f0: 6561 7365 4c69 6d69 7454 616e 6765 6e74 easeLimitTangent │ │ │ │ -0001da00: 4d61 736b 7328 5645 5254 4558 2063 6f6e Masks(VERTEX con │ │ │ │ -0001da10: 7374 2026 616d 703b 7665 7274 6578 2c20 st &vertex, │ │ │ │ -0001da20: 4d41 534b 2026 616d 703b 7461 6e31 2c20 MASK &tan1, │ │ │ │ -0001da30: 4d41 534b 2026 616d 703b 7461 6e32 2c20 MASK &tan2, │ │ │ │ -0001da40: 696e 7420 636f 6e73 7420 6372 6561 7365 int const crease │ │ │ │ -0001da50: 456e 6473 5b32 5d29 2063 6f6e 7374 3c2f Ends[2]) const
    .
    │ │ │ │ -0001dab0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    Open │ │ │ │ -0001db00: 5375 6264 6976 3a3a 4f50 454e 5355 4244 Subdiv::OPENSUBD │ │ │ │ -0001db10: 4956 5f56 4552 5349 4f4e 3a3a 5364 633a IV_VERSION::Sdc: │ │ │ │ -0001db20: 3a53 6368 656d 653a 3a47 6574 5265 6775 :Scheme::GetRegu │ │ │ │ -0001db30: 6c61 7246 6163 6553 697a 653c 2f61 3e3c larFaceSize< │ │ │ │ -0001db40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    static │ │ │ │ -0001db60: 696e 7420 4765 7452 6567 756c 6172 4661 int GetRegularFa │ │ │ │ -0001db70: 6365 5369 7a65 2829 3c2f 6469 763e 3c2f ceSize()
    .
    OpenSubdiv │ │ │ │ -0001dc20: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ -0001dc30: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ -0001dc40: 653a 3a61 7373 6967 6e43 7265 6173 654d e::assignCreaseM │ │ │ │ -0001dc50: 6173 6b46 6f72 4564 6765 3c2f 613e 3c2f askForEdge
    void ass │ │ │ │ -0001dc80: 6967 6e43 7265 6173 654d 6173 6b46 6f72 ignCreaseMaskFor │ │ │ │ -0001dc90: 4564 6765 2845 4447 4520 636f 6e73 7420 Edge(EDGE const │ │ │ │ -0001dca0: 2661 6d70 3b65 6467 652c 204d 4153 4b20 &edge, MASK │ │ │ │ -0001dcb0: 2661 6d70 3b6d 6173 6b29 2063 6f6e 7374 &mask) const │ │ │ │ -0001dcc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -0001dce0: 6e69 7469 6f6e 3c2f 623e 203c 6120 6872 nition s │ │ │ │ -0001dd10: 6368 656d 652e 683a 3331 373c 2f61 3e3c cheme.h:317< │ │ │ │ -0001dd20: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    voi │ │ │ │ -0001de20: 6420 436f 6d70 7574 6545 6467 6556 6572 d ComputeEdgeVer │ │ │ │ -0001de30: 7465 784d 6173 6b28 4544 4745 2063 6f6e texMask(EDGE con │ │ │ │ -0001de40: 7374 2026 616d 703b 6564 6765 4e65 6967 st &edgeNeig │ │ │ │ -0001de50: 6862 6f72 686f 6f64 2c20 4d41 534b 2026 hborhood, MASK & │ │ │ │ -0001de60: 616d 703b 6564 6765 5665 7274 6578 4d61 amp;edgeVertexMa │ │ │ │ -0001de70: 736b 2c20 4372 6561 7365 3a3a 5275 6c65 sk, Crease::Rule │ │ │ │ -0001de80: 2070 6172 656e 7452 756c 653d 4372 6561 parentRule=Crea │ │ │ │ -0001de90: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ -0001dea0: 2c20 4372 6561 7365 3a3a 5275 6c65 2063 , Crease::Rule c │ │ │ │ -0001deb0: 6869 6c64 5275 6c65 3d43 7265 6173 653a hildRule=Crease: │ │ │ │ -0001dec0: 3a52 554c 455f 554e 4b4e 4f57 4e29 2063 :RULE_UNKNOWN) c │ │ │ │ -0001ded0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    │ │ │ │ -0001dfc0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    Definitio │ │ │ │ -0001e0d0: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ -0001e100: 2e68 3a37 303c 2f61 3e3c 2f64 6976 3e3c .h:70
    < │ │ │ │ -0001e110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -0001e170: 6120 6872 6566 3d22 6130 3133 3333 2e68 a href="a01333.h │ │ │ │ -0001e180: 746d 6c23 6137 3336 6331 3039 3434 6362 tml#a736c10944cb │ │ │ │ -0001e190: 3932 3162 3333 3466 6264 3862 3831 3836 921b334fbd8b8186 │ │ │ │ -0001e1a0: 3664 3539 6622 3e4f 7065 6e53 7562 6469 6d59f">OpenSubdi │ │ │ │ -0001e1b0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ -0001e1c0: 5253 494f 4e3a 3a53 6463 3a3a 5363 6865 RSION::Sdc::Sche │ │ │ │ -0001e1d0: 6d65 3a3a 6173 7369 676e 536d 6f6f 7468 me::assignSmooth │ │ │ │ -0001e1e0: 4c69 6d69 744d 6173 6b3c 2f61 3e3c 2f64 LimitMask
    void assi │ │ │ │ -0001e210: 676e 536d 6f6f 7468 4c69 6d69 744d 6173 gnSmoothLimitMas │ │ │ │ -0001e220: 6b28 5645 5254 4558 2063 6f6e 7374 2026 k(VERTEX const & │ │ │ │ -0001e230: 616d 703b 7665 7274 6578 2c20 4d41 534b amp;vertex, MASK │ │ │ │ -0001e240: 2026 616d 703b 706f 7329 2063 6f6e 7374 &pos) const │ │ │ │ -0001e250: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .static int GetL │ │ │ │ -0001e360: 6f63 616c 4e65 6967 6862 6f72 686f 6f64 ocalNeighborhood │ │ │ │ -0001e370: 5369 7a65 2829 3c2f 6469 763e 3c2f 6469 Size()
    .
    OpenSubdiv:: │ │ │ │ -0001e420: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ -0001e430: 4f4e 3a3a 5364 633a 3a53 6368 656d 653a ON::Sdc::Scheme: │ │ │ │ -0001e440: 3a61 7373 6967 6e43 6f72 6e65 724d 6173 :assignCornerMas │ │ │ │ -0001e450: 6b46 6f72 5665 7274 6578 3c2f 613e 3c2f kForVertex
    void ass │ │ │ │ -0001e480: 6967 6e43 6f72 6e65 724d 6173 6b46 6f72 ignCornerMaskFor │ │ │ │ -0001e490: 5665 7274 6578 2856 4552 5445 5820 636f Vertex(VERTEX co │ │ │ │ -0001e4a0: 6e73 7420 2661 6d70 3b65 6467 652c 204d nst &edge, M │ │ │ │ -0001e4b0: 4153 4b20 2661 6d70 3b6d 6173 6b29 2063 ASK &mask) c │ │ │ │ -0001e4c0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    │ │ │ │ -0001e4e0: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ -0001e4f0: 6120 6872 6566 3d22 6130 3037 3334 5f73 a href="a00734_s │ │ │ │ -0001e500: 6f75 7263 652e 6874 6d6c 236c 3030 3333 ource.html#l0033 │ │ │ │ -0001e510: 3122 3e73 6368 656d 652e 683a 3333 313c 1">scheme.h:331< │ │ │ │ -0001e520: 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3e0a /a>
    . │ │ │ │ -0001e530: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void assignCrea │ │ │ │ -0001e630: 7365 4c69 6d69 744d 6173 6b28 5645 5254 seLimitMask(VERT │ │ │ │ -0001e640: 4558 2063 6f6e 7374 2026 616d 703b 7665 EX const &ve │ │ │ │ -0001e650: 7274 6578 2c20 4d41 534b 2026 616d 703b rtex, MASK & │ │ │ │ -0001e660: 706f 732c 2069 6e74 2063 6f6e 7374 2063 pos, int const c │ │ │ │ -0001e670: 7265 6173 6545 6e64 735b 325d 2920 636f reaseEnds[2]) co │ │ │ │ -0001e680: 6e73 743c 2f64 6976 3e3c 2f64 6976 3e0a nst
    . │ │ │ │ -0001e690: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void assign │ │ │ │ -0001e790: 536d 6f6f 7468 4d61 736b 466f 7256 6572 SmoothMaskForVer │ │ │ │ -0001e7a0: 7465 7828 5645 5254 4558 2063 6f6e 7374 tex(VERTEX const │ │ │ │ -0001e7b0: 2026 616d 703b 6564 6765 2c20 4d41 534b &edge, MASK │ │ │ │ -0001e7c0: 2026 616d 703b 6d61 736b 2920 636f 6e73 &mask) cons │ │ │ │ -0001e7d0: 743c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 t
    .static int GetR │ │ │ │ -0001e8e0: 6567 756c 6172 5665 7274 6578 5661 6c65 egularVertexVale │ │ │ │ -0001e8f0: 6e63 6528 293c 2f64 6976 3e3c 2f64 6976 nce()
    .
    OpenSubdiv::O │ │ │ │ -0001e9a0: 5045 4e53 5542 4449 565f 5645 5253 494f PENSUBDIV_VERSIO │ │ │ │ -0001e9b0: 4e3a 3a53 6463 3a3a 5363 6865 6d65 3a3a N::Sdc::Scheme:: │ │ │ │ -0001e9c0: 4765 744f 7074 696f 6e73 3c2f 613e 3c2f GetOptions
    Options │ │ │ │ -0001e9f0: 4765 744f 7074 696f 6e73 2829 2063 6f6e GetOptions() con │ │ │ │ -0001ea00: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    De │ │ │ │ -0001ea20: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:74 │ │ │ │ -0001ea60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    Op │ │ │ │ -0001eb00: 656e 5375 6264 6976 3a3a 4f50 454e 5355 enSubdiv::OPENSU │ │ │ │ -0001eb10: 4244 4956 5f56 4552 5349 4f4e 3a3a 5364 BDIV_VERSION::Sd │ │ │ │ -0001eb20: 633a 3a53 6368 656d 653a 3a61 7373 6967 c::Scheme::assig │ │ │ │ -0001eb30: 6e53 6d6f 6f74 684c 696d 6974 5461 6e67 nSmoothLimitTang │ │ │ │ -0001eb40: 656e 744d 6173 6b73 3c2f 613e 3c2f 6469 entMasks
    void assig │ │ │ │ -0001eb70: 6e53 6d6f 6f74 684c 696d 6974 5461 6e67 nSmoothLimitTang │ │ │ │ -0001eb80: 656e 744d 6173 6b73 2856 4552 5445 5820 entMasks(VERTEX │ │ │ │ -0001eb90: 636f 6e73 7420 2661 6d70 3b76 6572 7465 const &verte │ │ │ │ -0001eba0: 782c 204d 4153 4b20 2661 6d70 3b74 616e x, MASK &tan │ │ │ │ -0001ebb0: 312c 204d 4153 4b20 2661 6d70 3b74 616e 1, MASK &tan │ │ │ │ -0001ebc0: 3229 2063 6f6e 7374 3c2f 6469 763e 3c2f 2) const
    .
    OpenSubdiv │ │ │ │ -0001ec70: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ -0001ec80: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ -0001ec90: 653a 3a61 7373 6967 6e43 6f72 6e65 724c e::assignCornerL │ │ │ │ -0001eca0: 696d 6974 4d61 736b 3c2f 613e 3c2f 6469 imitMask
    void assig │ │ │ │ -0001ecd0: 6e43 6f72 6e65 724c 696d 6974 4d61 736b nCornerLimitMask │ │ │ │ -0001ece0: 2856 4552 5445 5820 636f 6e73 7420 2661 (VERTEX const &a │ │ │ │ -0001ecf0: 6d70 3b76 6572 7465 782c 204d 4153 4b20 mp;vertex, MASK │ │ │ │ -0001ed00: 2661 6d70 3b70 6f73 2920 636f 6e73 743c &pos) const< │ │ │ │ -0001ed10: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    Sc │ │ │ │ -0001ee00: 6865 6d65 284f 7074 696f 6e73 2063 6f6e heme(Options con │ │ │ │ -0001ee10: 7374 2026 616d 703b 6f70 7469 6f6e 7329 st &options) │ │ │ │ -0001ee20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -0001ee40: 6e69 7469 6f6e 3c2f 623e 203c 6120 6872 nition s │ │ │ │ -0001ee70: 6368 656d 652e 683a 3732 3c2f 613e 3c2f cheme.h:72
    .
    │ │ │ │ -0001f090: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void a │ │ │ │ -0001f190: 7373 6967 6e43 6f72 6e65 724c 696d 6974 ssignCornerLimit │ │ │ │ -0001f1a0: 5461 6e67 656e 744d 6173 6b73 2856 4552 TangentMasks(VER │ │ │ │ -0001f1b0: 5445 5820 636f 6e73 7420 2661 6d70 3b76 TEX const &v │ │ │ │ -0001f1c0: 6572 7465 782c 204d 4153 4b20 2661 6d70 ertex, MASK & │ │ │ │ -0001f1d0: 3b74 616e 312c 204d 4153 4b20 2661 6d70 ;tan1, MASK & │ │ │ │ -0001f1e0: 3b74 616e 3229 2063 6f6e 7374 3c2f 6469 ;tan2) const
    .
    v │ │ │ │ -0001f2e0: 6f69 6420 5365 744f 7074 696f 6e73 2863 oid SetOptions(c │ │ │ │ -0001f2f0: 6f6e 7374 204f 7074 696f 6e73 2026 616d onst Options &am │ │ │ │ -0001f300: 703b 6e65 774f 7074 696f 6e73 293c 2f64 p;newOptions)
    Definit │ │ │ │ -0001f330: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ -0001f360: 6d65 2e68 3a37 353c 2f61 3e3c 2f64 6976 me.h:75
    .
    < │ │ │ │ -0001f3b0: 6120 6872 6566 3d22 6130 3133 3337 2e68 a href="a01337.h │ │ │ │ -0001f3c0: 746d 6c22 3e4f 7065 6e53 7562 6469 763a tml">OpenSubdiv: │ │ │ │ -0001f3d0: 3a4f 5045 4e53 5542 4449 565f 5645 5253 :OPENSUBDIV_VERS │ │ │ │ -0001f3e0: 494f 4e3a 3a53 6463 3a3a 5363 6865 6d65 ION::Sdc::Scheme │ │ │ │ -0001f3f0: 3a3a 4c6f 6361 6c4d 6173 6b3c 2f61 3e3c ::LocalMask< │ │ │ │ -0001f400: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -0001f420: 6974 696f 6e3c 2f62 3e20 3c61 2068 7265 ition sc │ │ │ │ -0001f450: 6865 6d65 2e68 3a32 3039 3c2f 613e 3c2f heme.h:209
    .
    │ │ │ │ -0001f4b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 │ │ │ │ -0001f5d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ -0001f6c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool AreFace │ │ │ │ -0001f6e0: 5765 6967 6874 7346 6f72 4661 6365 4365 WeightsForFaceCe │ │ │ │ -0001f6f0: 6e74 6572 7328 2920 636f 6e73 743c 2f64 nters() const
    Definit │ │ │ │ -0001f720: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ -0001f750: 6d65 2e68 3a32 3339 3c2f 613e 3c2f 6469 me.h:239
    .void SetNumEdge │ │ │ │ -0001f870: 5765 6967 6874 7328 696e 7420 636f 756e Weights(int coun │ │ │ │ -0001f880: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    De │ │ │ │ -0001f8a0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:228
    .
    W │ │ │ │ -0001f9e0: 6569 6768 7420 636f 6e73 7420 2661 6d70 eight const & │ │ │ │ -0001f9f0: 3b20 4564 6765 5765 6967 6874 2869 6e74 ; EdgeWeight(int │ │ │ │ -0001fa00: 2069 6e64 6578 2920 636f 6e73 743c 2f64 index) const
    Definit │ │ │ │ -0001fa30: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ -0001fa60: 6d65 2e68 3a32 3332 3c2f 613e 3c2f 6469 me.h:232
    .
    Weight │ │ │ │ -0001fb70: 2026 616d 703b 2045 6467 6557 6569 6768 & EdgeWeigh │ │ │ │ -0001fb80: 7428 696e 7420 696e 6465 7829 3c2f 6469 t(int index)
    Definiti │ │ │ │ -0001fbb0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on schem │ │ │ │ -0001fbe0: 652e 683a 3233 363c 2f61 3e3c 2f64 6976 e.h:236
    .
    OpenSub │ │ │ │ -0001fc90: 6469 763a 3a4f 5045 4e53 5542 4449 565f div::OPENSUBDIV_ │ │ │ │ -0001fca0: 5645 5253 494f 4e3a 3a53 6463 3a3a 5363 VERSION::Sdc::Sc │ │ │ │ -0001fcb0: 6865 6d65 3a3a 4c6f 6361 6c4d 6173 6b3a heme::LocalMask: │ │ │ │ -0001fcc0: 3a43 6f6d 6269 6e65 5665 7274 6578 5665 :CombineVertexVe │ │ │ │ -0001fcd0: 7274 6578 4d61 736b 733c 2f61 3e3c 2f64 rtexMasks
    void Comb │ │ │ │ -0001fd00: 696e 6556 6572 7465 7856 6572 7465 784d ineVertexVertexM │ │ │ │ -0001fd10: 6173 6b73 2857 6569 6768 7420 7468 6973 asks(Weight this │ │ │ │ -0001fd20: 436f 6566 662c 2057 6569 6768 7420 6473 Coeff, Weight ds │ │ │ │ -0001fd30: 7443 6f65 6666 2c20 5553 4552 5f4d 4153 tCoeff, USER_MAS │ │ │ │ -0001fd40: 4b20 2661 6d70 3b64 7374 2920 636f 6e73 K &dst) cons │ │ │ │ -0001fd50: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Def │ │ │ │ -0001fd70: 696e 6974 696f 6e3c 2f62 3e20 3c61 2068 inition │ │ │ │ -0001fda0: 7363 6865 6d65 2e68 3a32 3439 3c2f 613e scheme.h:249 │ │ │ │ -0001fdb0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    ..
    void S │ │ │ │ -00020040: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ -00020050: 2869 6e74 2063 6f75 6e74 293c 2f64 6976 (int count)
    Definitio │ │ │ │ -00020080: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ -000200b0: 2e68 3a32 3239 3c2f 613e 3c2f 6469 763e .h:229
    │ │ │ │ -000200c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00020120: 3c61 2068 7265 663d 2261 3031 3333 372e OpenSubd │ │ │ │ -00020160: 6976 3a3a 4f50 454e 5355 4244 4956 5f56 iv::OPENSUBDIV_V │ │ │ │ -00020170: 4552 5349 4f4e 3a3a 5364 633a 3a53 6368 ERSION::Sdc::Sch │ │ │ │ -00020180: 656d 653a 3a4c 6f63 616c 4d61 736b 3a3a eme::LocalMask:: │ │ │ │ -00020190: 4661 6365 5765 6967 6874 3c2f 613e 3c2f FaceWeight
    Weight c │ │ │ │ -000201c0: 6f6e 7374 2026 616d 703b 2046 6163 6557 onst & FaceW │ │ │ │ -000201d0: 6569 6768 7428 696e 7420 696e 6465 7829 eight(int index) │ │ │ │ -000201e0: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    < │ │ │ │ -00020200: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ -00020210: 203c 6120 6872 6566 3d22 6130 3037 3334 scheme.h:23 │ │ │ │ -00020240: 333c 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3
    .
    int Ge │ │ │ │ -00020350: 744e 756d 4564 6765 5765 6967 6874 7328 tNumEdgeWeights( │ │ │ │ -00020360: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ │ -00020380: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition scheme.h:2 │ │ │ │ -000203c0: 3234 3c2f 613e 3c2f 6469 763e 3c2f 6469 24
    .
    OpenSubdiv:: │ │ │ │ -00020470: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ -00020480: 4f4e 3a3a 5364 633a 3a53 6368 656d 653a ON::Sdc::Scheme: │ │ │ │ -00020490: 3a4c 6f63 616c 4d61 736b 3a3a 5665 7274 :LocalMask::Vert │ │ │ │ -000204a0: 6578 5765 6967 6874 3c2f 613e 3c2f 6469 exWeight
    Weight &am │ │ │ │ -000204d0: 703b 2056 6572 7465 7857 6569 6768 7428 p; VertexWeight( │ │ │ │ -000204e0: 696e 7420 696e 6465 7829 3c2f 6469 763e int index)
    │ │ │ │ -000204f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00020510: 3c2f 623e 203c 6120 6872 6566 3d22 6130 scheme. │ │ │ │ -00020540: 683a 3233 353c 2f61 3e3c 2f64 6976 3e3c h:235
    < │ │ │ │ -00020550: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -000205b0: 6120 6872 6566 3d22 6130 3133 3337 2e68 a href="a01337.h │ │ │ │ -000205c0: 746d 6c23 6139 3366 3537 6535 3333 3733 tml#a93f57e53373 │ │ │ │ -000205d0: 3931 6332 3064 3436 6465 6664 6233 6161 91c20d46defdb3aa │ │ │ │ -000205e0: 3263 3166 6522 3e4f 7065 6e53 7562 6469 2c1fe">OpenSubdi │ │ │ │ -000205f0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ -00020600: 5253 494f 4e3a 3a53 6463 3a3a 5363 6865 RSION::Sdc::Sche │ │ │ │ -00020610: 6d65 3a3a 4c6f 6361 6c4d 6173 6b3a 3a47 me::LocalMask::G │ │ │ │ -00020620: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ -00020630: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    in │ │ │ │ -00020650: 7420 4765 744e 756d 4661 6365 5765 6967 t GetNumFaceWeig │ │ │ │ -00020660: 6874 7328 2920 636f 6e73 743c 2f64 6976 hts() const
    Definitio │ │ │ │ -00020690: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ -000206c0: 2e68 3a32 3235 3c2f 613e 3c2f 6469 763e .h:225
    │ │ │ │ -000206d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void S │ │ │ │ -000207e0: 6574 4661 6365 5765 6967 6874 7346 6f72 etFaceWeightsFor │ │ │ │ -000207f0: 4661 6365 4365 6e74 6572 7328 626f 6f6c FaceCenters(bool │ │ │ │ -00020800: 206f 6e29 3c2f 6469 763e 3c64 6976 2063 on)
    │ │ │ │ -00020820: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ -00020830: 6120 6872 6566 3d22 6130 3037 3334 5f73 a href="a00734_s │ │ │ │ -00020840: 6f75 7263 652e 6874 6d6c 236c 3030 3234 ource.html#l0024 │ │ │ │ -00020850: 3022 3e73 6368 656d 652e 683a 3234 303c 0">scheme.h:240< │ │ │ │ -00020860: 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3e0a /a>
    . │ │ │ │ -00020870: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void S │ │ │ │ -00020970: 6574 4e75 6d56 6572 7465 7857 6569 6768 etNumVertexWeigh │ │ │ │ -00020980: 7473 2869 6e74 2063 6f75 6e74 293c 2f64 ts(int count)
    Definit │ │ │ │ -000209b0: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ -000209e0: 6d65 2e68 3a32 3237 3c2f 613e 3c2f 6469 me.h:227
    .
    OpenSu │ │ │ │ -00020a90: 6264 6976 3a3a 4f50 454e 5355 4244 4956 bdiv::OPENSUBDIV │ │ │ │ -00020aa0: 5f56 4552 5349 4f4e 3a3a 5364 633a 3a53 _VERSION::Sdc::S │ │ │ │ -00020ab0: 6368 656d 653a 3a4c 6f63 616c 4d61 736b cheme::LocalMask │ │ │ │ -00020ac0: 3a3a 4c6f 6361 6c4d 6173 6b3c 2f61 3e3c ::LocalMask< │ │ │ │ -00020ad0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    LocalMa │ │ │ │ -00020af0: 736b 2857 6569 6768 7420 2a76 2c20 5765 sk(Weight *v, We │ │ │ │ -00020b00: 6967 6874 202a 652c 2057 6569 6768 7420 ight *e, Weight │ │ │ │ -00020b10: 2a66 293c 2f64 6976 3e3c 6469 7620 636c *f)
    D │ │ │ │ -00020b30: 6566 696e 6974 696f 6e3c 2f62 3e20 3c61 efinition scheme.h:215
    .< │ │ │ │ -00020b80: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -00020b90: 6964 3d22 6161 3031 3333 375f 6874 6d6c id="aa01337_html │ │ │ │ -00020ba0: 5f61 6563 3563 3261 6266 6466 6264 6534 _aec5c2abfdfbde4 │ │ │ │ -00020bb0: 6464 3933 3463 3036 3136 3235 3939 3437 dd934c0616259947 │ │ │ │ -00020bc0: 3931 223e 3c64 6976 2063 6c61 7373 3d22 91">Weight const & │ │ │ │ -00020c80: 616d 703b 2056 6572 7465 7857 6569 6768 amp; VertexWeigh │ │ │ │ -00020c90: 7428 696e 7420 696e 6465 7829 2063 6f6e t(int index) con │ │ │ │ -00020ca0: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    De │ │ │ │ -00020cc0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:231
    .
    W │ │ │ │ -00020e00: 6569 6768 7420 2661 6d70 3b20 4661 6365 eight & Face │ │ │ │ -00020e10: 5765 6967 6874 2869 6e74 2069 6e64 6578 Weight(int index │ │ │ │ -00020e20: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Def │ │ │ │ -00020e40: 696e 6974 696f 6e3c 2f62 3e20 3c61 2068 inition │ │ │ │ -00020e70: 7363 6865 6d65 2e68 3a32 3337 3c2f 613e scheme.h:237 │ │ │ │ -00020e80: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    ~L │ │ │ │ -00020f80: 6f63 616c 4d61 736b 2829 3c2f 6469 763e ocalMask()
    │ │ │ │ -00020f90: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00020fb0: 3c2f 623e 203c 6120 6872 6566 3d22 6130 scheme. │ │ │ │ -00020fe0: 683a 3231 363c 2f61 3e3c 2f64 6976 3e3c h:216
    < │ │ │ │ -00020ff0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
    .
    . │ │ │ │ -00021040: 3c21 2d2d 2073 7461 7274 2066 6f6f 7465 .... │ │ │ │ +0001b6f0: 3d22 6c69 6e65 6e6f 223e 2031 3330 363c ="lineno"> 1306< │ │ │ │ +0001b700: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001b710: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b720: 2070 6174 6368 5461 626c 652d 2667 743b patchTable-> │ │ │ │ +0001b730: 4765 7450 6174 6368 4172 7261 7942 7566 GetPatchArrayBuf │ │ │ │ +0001b740: 6665 7228 292c 3c2f 6469 763e 0a3c 6469 fer(),
    .< │ │ │ │ +0001b760: 6120 6964 3d22 6c30 3133 3037 2220 6e61 a id="l01307" na │ │ │ │ +0001b770: 6d65 3d22 6c30 3133 3037 223e 3c2f 613e me="l01307"> │ │ │ │ +0001b780: 3c73 7061 6e20 636c 6173 733d 226c 696e 1307 │ │ │ │ +0001b7b0: 2020 2020 2020 2020 2020 2020 7061 7463 patc │ │ │ │ +0001b7c0: 6854 6162 6c65 2d26 6774 3b47 6574 5061 hTable->GetPa │ │ │ │ +0001b7d0: 7463 6849 6e64 6578 4275 6666 6572 2829 tchIndexBuffer() │ │ │ │ +0001b7e0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001b830: 2031 3330 383c 2f73 7061 6e3e 2020 2020 1308 │ │ │ │ +0001b840: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b850: 2020 2020 2020 2070 6174 6368 5461 626c patchTabl │ │ │ │ +0001b860: 652d 2667 743b 4765 7450 6174 6368 5061 e->GetPatchPa │ │ │ │ +0001b870: 7261 6d42 7566 6665 7228 292c 3c2f 6469 ramBuffer(),.
    1309 │ │ │ │ +0001b8d0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0001b8e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b8f0: 2020 6e75 6d53 7461 7274 4576 656e 7473 numStartEvents │ │ │ │ +0001b900: 2c20 7374 6172 7445 7665 6e74 732c 2065 , startEvents, e │ │ │ │ +0001b910: 6e64 4576 656e 7429 3b3c 2f64 6976 3e0a ndEvent);
    . │ │ │ │ +0001b920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +0001b980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001b9d0: 3133 3131 3c2f 7370 616e 3e20 3c2f 6469 1311 .
    1377 │ │ │ │ +0001ba30: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ +0001ba60: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ +0001ba80: 616d 653c 2f73 7061 6e3e 2053 5243 5f42 ame SRC_B │ │ │ │ +0001ba90: 5546 4645 522c 203c 7370 616e 2063 6c61 UFFER, typ │ │ │ │ +0001bab0: 656e 616d 653c 2f73 7061 6e3e 2044 5354 ename DST │ │ │ │ +0001bac0: 5f42 5546 4645 522c 3c2f 6469 763e 0a3c _BUFFER,
    .< │ │ │ │ +0001bad0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001bae0: 3e3c 6120 6964 3d22 6c30 3133 3738 2220 > 1378 │ │ │ │ +0001bb30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +0001bb50: 2f73 7061 6e3e 2050 4154 4348 434f 4f52 /span> PATCHCOOR │ │ │ │ +0001bb60: 445f 4255 4646 4552 2c20 3c73 7061 6e20 D_BUFFER, │ │ │ │ +0001bb80: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +0001bb90: 5041 5443 485f 5441 424c 4526 6774 3b3c PATCH_TABLE>< │ │ │ │ +0001bba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ │ +0001bc20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001bc30: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 1379 bool EvalPatches< │ │ │ │ +0001bd10: 2f61 3e28 3c2f 6469 763e 0a3c 6469 7620 /a>(
    .
    1380 │ │ │ │ +0001bd70: 2020 2020 2020 2053 5243 5f42 5546 4645 SRC_BUFFE │ │ │ │ +0001bd80: 5220 2a73 7263 4275 6666 6572 2c20 3c61 R *srcBuffer, Buffe │ │ │ │ +0001bdc0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +0001bdd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &srcDesc, │ │ │ │ +0001be00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001be50: 3133 3831 3c2f 7370 616e 3e20 2020 2020 1381 │ │ │ │ +0001be60: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ +0001be70: 7374 4275 6666 6572 2c20 3c61 2063 6c61 stBuffer, BufferDes │ │ │ │ +0001beb0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +0001bee0: 616d 703b 6473 7444 6573 632c 3c2f 6469 amp;dstDesc,.
    1382 │ │ │ │ +0001bf40: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +0001bf50: 5354 5f42 5546 4645 5220 2a64 7542 7566 ST_BUFFER *duBuf │ │ │ │ +0001bf60: 6665 722c 2020 3c61 2063 6c61 7373 3d22 fer, BufferDescrip │ │ │ │ +0001bfa0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +0001bfc0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +0001bfd0: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ +0001bff0: 3c61 2069 643d 226c 3031 3338 3322 206e 1383
    DST_BU │ │ │ │ +0001c040: 4646 4552 202a 6476 4275 6666 6572 2c20 FFER *dvBuffer, │ │ │ │ +0001c050: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +0001c080: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dvDes │ │ │ │ +0001c0c0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1384 │ │ │ │ +0001c120: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ +0001c130: 2a64 7575 4275 6666 6572 2c20 3c61 2063 *duuBuffer, BufferD │ │ │ │ +0001c170: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +0001c1a0: 2026 616d 703b 6475 7544 6573 632c 3c2f &duuDesc,.
    13 │ │ │ │ +0001c200: 3835 3c2f 7370 616e 3e20 2020 2020 2020 85 │ │ │ │ +0001c210: 2044 5354 5f42 5546 4645 5220 2a64 7576 DST_BUFFER *duv │ │ │ │ +0001c220: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ +0001c260: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +0001c280: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +0001c290: 703b 6475 7644 6573 632c 3c2f 6469 763e p;duvDesc,
    │ │ │ │ +0001c2a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001c2d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1386 DST │ │ │ │ +0001c300: 5f42 5546 4645 5220 2a64 7676 4275 6666 _BUFFER *dvvBuff │ │ │ │ +0001c310: 6572 2c20 3c61 2063 6c61 7373 3d22 636f er, BufferDescripto │ │ │ │ +0001c350: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +0001c370: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ +0001c380: 7644 6573 632c 3c2f 6469 763e 0a3c 6469 vDesc,
    .< │ │ │ │ +0001c3a0: 6120 6964 3d22 6c30 3133 3837 2220 6e61 a id="l01387" na │ │ │ │ +0001c3b0: 6d65 3d22 6c30 3133 3837 223e 3c2f 613e me="l01387"> │ │ │ │ +0001c3c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1387 int nu │ │ │ │ +0001c410: 6d50 6174 6368 436f 6f72 6473 2c3c 2f64 mPatchCoords,.
    138 │ │ │ │ +0001c470: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0001c480: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +0001c490: 5220 2a70 6174 6368 436f 6f72 6473 2c3c R *patchCoords,< │ │ │ │ +0001c4a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +0001c4f0: 3338 393c 2f73 7061 6e3e 2020 2020 2020 389 │ │ │ │ +0001c500: 2020 5041 5443 485f 5441 424c 4520 2a70 PATCH_TABLE *p │ │ │ │ +0001c510: 6174 6368 5461 626c 652c 3c2f 6469 763e atchTable,
    │ │ │ │ +0001c520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001c550: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1390 unsigned< │ │ │ │ +0001c5a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int numS │ │ │ │ +0001c5d0: 7461 7274 4576 656e 7473 3d30 2c3c 2f64 tartEvents=0,.
    139 │ │ │ │ +0001c630: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0001c640: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cl_event* sta │ │ │ │ +0001c670: 7274 4576 656e 7473 3d4e 554c 4c2c 3c2f rtEvents=NULL,.
    13 │ │ │ │ +0001c6d0: 3932 3c2f 7370 616e 3e20 2020 2020 2020 92 │ │ │ │ +0001c6e0: 2063 6c5f 6576 656e 742a 2065 6e64 4576 cl_event* endEv │ │ │ │ +0001c6f0: 656e 743d 4e55 4c4c 293c 7370 616e 2063 ent=NULL) │ │ │ │ +0001c710: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    13 │ │ │ │ +0001c770: 3933 3c2f 7370 616e 3e20 3c2f 6469 763e 93
    │ │ │ │ +0001c780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001c7b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1394 return EvalPatche │ │ │ │ +0001c860: 733c 2f61 3e28 7372 6342 7566 6665 722d s(srcBuffer- │ │ │ │ +0001c870: 2667 743b 4269 6e64 434c 4275 6666 6572 >BindCLBuffer │ │ │ │ +0001c880: 285f 636c 436f 6d6d 616e 6451 7565 7565 (_clCommandQueue │ │ │ │ +0001c890: 292c 2073 7263 4465 7363 2c3c 2f64 6976 ), srcDesc,
    .
    1395< │ │ │ │ +0001c8f0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001c900: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001c910: 2064 7374 4275 6666 6572 2d26 6774 3b42 dstBuffer->B │ │ │ │ +0001c920: 696e 6443 4c42 7566 6665 7228 5f63 6c43 indCLBuffer(_clC │ │ │ │ +0001c930: 6f6d 6d61 6e64 5175 6575 6529 2c20 6473 ommandQueue), ds │ │ │ │ +0001c940: 7444 6573 632c 3c2f 6469 763e 0a3c 6469 tDesc,
    .< │ │ │ │ +0001c960: 6120 6964 3d22 6c30 3133 3936 2220 6e61 a id="l01396" na │ │ │ │ +0001c970: 6d65 3d22 6c30 3133 3936 223e 3c2f 613e me="l01396"> │ │ │ │ +0001c980: 3c73 7061 6e20 636c 6173 733d 226c 696e 1396 │ │ │ │ +0001c9b0: 2020 2020 2020 2020 2020 2020 6475 4275 duBu │ │ │ │ +0001c9c0: 6666 6572 2d26 6774 3b42 696e 6443 4c42 ffer->BindCLB │ │ │ │ +0001c9d0: 7566 6665 7228 5f63 6c43 6f6d 6d61 6e64 uffer(_clCommand │ │ │ │ +0001c9e0: 5175 6575 6529 2c20 2064 7544 6573 632c Queue), duDesc, │ │ │ │ +0001c9f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001ca40: 3133 3937 3c2f 7370 616e 3e20 2020 2020 1397 │ │ │ │ +0001ca50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ca60: 2020 2020 2020 6476 4275 6666 6572 2d26 dvBuffer-& │ │ │ │ +0001ca70: 6774 3b42 696e 6443 4c42 7566 6665 7228 gt;BindCLBuffer( │ │ │ │ +0001ca80: 5f63 6c43 6f6d 6d61 6e64 5175 6575 6529 _clCommandQueue) │ │ │ │ +0001ca90: 2c20 2064 7644 6573 632c 3c2f 6469 763e , dvDesc,
    │ │ │ │ +0001caa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001cad0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1398 │ │ │ │ +0001cb00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cb10: 6475 7542 7566 6665 722d 2667 743b 4269 duuBuffer->Bi │ │ │ │ +0001cb20: 6e64 434c 4275 6666 6572 285f 636c 436f ndCLBuffer(_clCo │ │ │ │ +0001cb30: 6d6d 616e 6451 7565 7565 292c 2064 7575 mmandQueue), duu │ │ │ │ +0001cb40: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0001cb80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001cb90: 6e6f 223e 2031 3339 393c 2f73 7061 6e3e no"> 1399 │ │ │ │ +0001cba0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cbb0: 2020 2020 2020 2020 2020 2064 7576 4275 duvBu │ │ │ │ +0001cbc0: 6666 6572 2d26 6774 3b42 696e 6443 4c42 ffer->BindCLB │ │ │ │ +0001cbd0: 7566 6665 7228 5f63 6c43 6f6d 6d61 6e64 uffer(_clCommand │ │ │ │ +0001cbe0: 5175 6575 6529 2c20 6475 7644 6573 632c Queue), duvDesc, │ │ │ │ +0001cbf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001cc40: 3134 3030 3c2f 7370 616e 3e20 2020 2020 1400 │ │ │ │ +0001cc50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cc60: 2020 2020 2020 6476 7642 7566 6665 722d dvvBuffer- │ │ │ │ +0001cc70: 2667 743b 4269 6e64 434c 4275 6666 6572 >BindCLBuffer │ │ │ │ +0001cc80: 285f 636c 436f 6d6d 616e 6451 7565 7565 (_clCommandQueue │ │ │ │ +0001cc90: 292c 2064 7676 4465 7363 2c3c 2f64 6976 ), dvvDesc,
    .
    1401< │ │ │ │ +0001ccf0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001cd00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cd10: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ +0001cd20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001cd70: 3134 3032 3c2f 7370 616e 3e20 2020 2020 1402 │ │ │ │ +0001cd80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cd90: 2020 2020 2020 7061 7463 6843 6f6f 7264 patchCoord │ │ │ │ +0001cda0: 732d 2667 743b 4269 6e64 434c 4275 6666 s->BindCLBuff │ │ │ │ +0001cdb0: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +0001cdc0: 7565 292c 3c2f 6469 763e 0a3c 6469 7620 ue),
    .
    1403 │ │ │ │ +0001ce20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ce30: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ +0001ce40: 6162 6c65 2d26 6774 3b47 6574 5061 7463 able->GetPatc │ │ │ │ +0001ce50: 6841 7272 6179 4275 6666 6572 2829 2c3c hArrayBuffer(),< │ │ │ │ +0001ce60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +0001ceb0: 3430 343c 2f73 7061 6e3e 2020 2020 2020 404 │ │ │ │ +0001cec0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ced0: 2020 2020 2070 6174 6368 5461 626c 652d patchTable- │ │ │ │ +0001cee0: 2667 743b 4765 7450 6174 6368 496e 6465 >GetPatchInde │ │ │ │ +0001cef0: 7842 7566 6665 7228 292c 3c2f 6469 763e xBuffer(),
    │ │ │ │ +0001cf00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001cf30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1405 │ │ │ │ +0001cf60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001cf70: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ +0001cf80: 6574 5061 7463 6850 6172 616d 4275 6666 etPatchParamBuff │ │ │ │ +0001cf90: 6572 2829 2c3c 2f64 6976 3e0a 3c64 6976 er(),
    .
    < │ │ │ │ +0001cfd0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001cfe0: 6e6f 223e 2031 3430 363c 2f73 7061 6e3e no"> 1406 │ │ │ │ +0001cff0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001d000: 2020 2020 2020 2020 2020 206e 756d 5374 numSt │ │ │ │ +0001d010: 6172 7445 7665 6e74 732c 2073 7461 7274 artEvents, start │ │ │ │ +0001d020: 4576 656e 7473 2c20 656e 6445 7665 6e74 Events, endEvent │ │ │ │ +0001d030: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    1407 │ │ │ │ +0001d090: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ │ +0001d0a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ +0001d130: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001d140: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 1409 bool EvalPatches< │ │ │ │ +0001d220: 2f61 3e28 636c 5f6d 656d 2073 7263 2c20 /a>(cl_mem src, │ │ │ │ +0001d230: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +0001d260: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &srcDes │ │ │ │ +0001d2a0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1410 │ │ │ │ +0001d300: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001d310: 2020 636c 5f6d 656d 2064 7374 2c20 3c61 cl_mem dst, Buffe │ │ │ │ +0001d350: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +0001d360: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dstDesc, │ │ │ │ +0001d390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001d3e0: 3134 3131 3c2f 7370 616e 3e20 2020 2020 1411 │ │ │ │ +0001d3f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001d400: 636c 5f6d 656d 2064 752c 2020 3c61 2063 cl_mem du, BufferD │ │ │ │ +0001d440: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +0001d470: 2026 616d 703b 6475 4465 7363 2c3c 2f64 &duDesc,.
    141 │ │ │ │ +0001d4d0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +0001d4e0: 2020 2020 2020 2020 2020 2020 2063 6c5f cl_ │ │ │ │ +0001d4f0: 6d65 6d20 6476 2c20 203c 6120 636c 6173 mem dv, BufferDesc │ │ │ │ +0001d530: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +0001d560: 6d70 3b64 7644 6573 632c 3c2f 6469 763e mp;dvDesc,
    │ │ │ │ +0001d570: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001d5a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1413 │ │ │ │ +0001d5d0: 2020 2020 2020 2020 2020 3c73 7061 6e20 int n │ │ │ │ +0001d600: 756d 5061 7463 6843 6f6f 7264 732c 3c2f umPatchCoords,.
    14 │ │ │ │ +0001d660: 3134 3c2f 7370 616e 3e20 2020 2020 2020 14 │ │ │ │ +0001d670: 2020 2020 2020 2020 2020 2020 2020 636c cl │ │ │ │ +0001d680: 5f6d 656d 2070 6174 6368 436f 6f72 6473 _mem patchCoords │ │ │ │ +0001d690: 4275 6666 6572 2c3c 2f64 6976 3e0a 3c64 Buffer,
    . │ │ │ │ +0001d6b0: 3c61 2069 643d 226c 3031 3431 3522 206e 1415 │ │ │ │ +0001d700: 2020 2020 2020 2063 6c5f 6d65 6d20 7061 cl_mem pa │ │ │ │ +0001d710: 7463 6841 7272 6179 4275 6666 6572 2c3c tchArrayBuffer,< │ │ │ │ +0001d720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +0001d770: 3431 363c 2f73 7061 6e3e 2020 2020 2020 416 │ │ │ │ +0001d780: 2020 2020 2020 2020 2020 2020 2020 2063 c │ │ │ │ +0001d790: 6c5f 6d65 6d20 7061 7463 6849 6e64 6578 l_mem patchIndex │ │ │ │ +0001d7a0: 4275 6666 6572 2c3c 2f64 6976 3e0a 3c64 Buffer,
    . │ │ │ │ +0001d7c0: 3c61 2069 643d 226c 3031 3431 3722 206e 1417 │ │ │ │ +0001d810: 2020 2020 2020 2063 6c5f 6d65 6d20 7061 cl_mem pa │ │ │ │ +0001d820: 7463 6850 6172 616d 7342 7566 6665 722c tchParamsBuffer, │ │ │ │ +0001d830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001d880: 3134 3138 3c2f 7370 616e 3e20 2020 2020 1418 │ │ │ │ +0001d890: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001d8a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +0001d8c0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +0001d8f0: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +0001d900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001d950: 3134 3139 3c2f 7370 616e 3e20 2020 2020 1419 │ │ │ │ +0001d960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001d970: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cl_event* sta │ │ │ │ +0001d9a0: 7274 4576 656e 7473 3d4e 554c 4c2c 3c2f rtEvents=NULL,.
    14 │ │ │ │ +0001da00: 3230 3c2f 7370 616e 3e20 2020 2020 2020 20 │ │ │ │ +0001da10: 2020 2020 2020 2020 2020 2020 2020 636c cl │ │ │ │ +0001da20: 5f65 7665 6e74 2a20 656e 6445 7665 6e74 _event* endEvent │ │ │ │ +0001da30: 3d4e 554c 4c29 203c 7370 616e 2063 6c61 =NULL) con │ │ │ │ +0001da50: 7374 3c2f 7370 616e 3e3b 3c2f 6469 763e st;
    │ │ │ │ +0001da60: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0001dad0: 6120 6964 3d22 6c30 3134 3232 2220 6e61 a id="l01422" na │ │ │ │ +0001dae0: 6d65 3d22 6c30 3134 3232 223e 3c2f 613e me="l01422"> │ │ │ │ +0001daf0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1422< │ │ │ │ +0001db50: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> bool EvalPatches │ │ │ │ +0001dbe0: 3c2f 613e 2863 6c5f 6d65 6d20 7372 632c (cl_mem src, │ │ │ │ +0001dbf0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +0001dc20: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ +0001dc60: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1423 │ │ │ │ +0001dcc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001dcd0: 2020 2063 6c5f 6d65 6d20 6473 742c 203c cl_mem dst, < │ │ │ │ +0001dce0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0001dcf0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +0001dd00: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +0001dd10: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +0001dd20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dstDesc │ │ │ │ +0001dd50: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001dda0: 2031 3432 343c 2f73 7061 6e3e 2020 2020 1424 │ │ │ │ +0001ddb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ddc0: 2063 6c5f 6d65 6d20 6475 2c20 203c 6120 cl_mem du, Buffer │ │ │ │ +0001de00: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0001de10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0001de20: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &duDesc,.
    14 │ │ │ │ +0001de90: 3235 3c2f 7370 616e 3e20 2020 2020 2020 25 │ │ │ │ +0001dea0: 2020 2020 2020 2020 2020 2020 2020 636c cl │ │ │ │ +0001deb0: 5f6d 656d 2064 762c 2020 3c61 2063 6c61 _mem dv, BufferDes │ │ │ │ +0001def0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +0001df20: 616d 703b 6476 4465 7363 2c3c 2f64 6976 amp;dvDesc,
    .
    1426< │ │ │ │ +0001df80: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001df90: 2020 2020 2020 2020 2020 2063 6c5f 6d65 cl_me │ │ │ │ +0001dfa0: 6d20 6475 752c 203c 6120 636c 6173 733d m duu, BufferDescri │ │ │ │ +0001dfe0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +0001e000: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +0001e010: 3b64 7575 4465 7363 2c3c 2f64 6976 3e0a ;duuDesc,
    . │ │ │ │ +0001e020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +0001e120: 3c61 2069 643d 226c 3031 3432 3822 206e 1428 │ │ │ │ +0001e170: 2020 2020 2020 2063 6c5f 6d65 6d20 6476 cl_mem dv │ │ │ │ +0001e180: 762c 203c 6120 636c 6173 733d 2263 6f64 v, │ │ │ │ +0001e1b0: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +0001e1c0: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ +0001e1e0: 3c2f 7370 616e 3e20 2661 6d70 3b64 7676 &dvv │ │ │ │ +0001e1f0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0001e230: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001e240: 6e6f 223e 2031 3432 393c 2f73 7061 6e3e no"> 1429 │ │ │ │ +0001e250: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001e260: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +0001e280: 6e74 3c2f 7370 616e 3e20 6e75 6d50 6174 nt numPat │ │ │ │ +0001e290: 6368 436f 6f72 6473 2c3c 2f64 6976 3e0a chCoords,
    . │ │ │ │ +0001e2a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1431 │ │ │ │ +0001e380: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001e390: 2020 636c 5f6d 656d 2070 6174 6368 4172 cl_mem patchAr │ │ │ │ +0001e3a0: 7261 7942 7566 6665 722c 3c2f 6469 763e rayBuffer,
    │ │ │ │ +0001e3b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001e3e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1432 │ │ │ │ +0001e410: 2020 2020 2020 2020 2020 636c 5f6d 656d cl_mem │ │ │ │ +0001e420: 2070 6174 6368 496e 6465 7842 7566 6665 patchIndexBuffe │ │ │ │ +0001e430: 722c 3c2f 6469 763e 0a3c 6469 7620 636c r,
    .
    1433 │ │ │ │ +0001e490: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001e4a0: 2020 636c 5f6d 656d 2070 6174 6368 5061 cl_mem patchPa │ │ │ │ +0001e4b0: 7261 6d73 4275 6666 6572 2c3c 2f64 6976 ramsBuffer,
    .
    1434< │ │ │ │ +0001e510: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001e520: 2020 2020 2020 2020 2020 203c 7370 616e unsigned i │ │ │ │ +0001e570: 6e74 3c2f 7370 616e 3e20 6e75 6d53 7461 nt numSta │ │ │ │ +0001e580: 7274 4576 656e 7473 3d30 2c3c 2f64 6976 rtEvents=0,
    .
    1435< │ │ │ │ +0001e5e0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001e5f0: 2020 2020 2020 2020 2020 203c 7370 616e const cl │ │ │ │ +0001e620: 5f65 7665 6e74 2a20 7374 6172 7445 7665 _event* startEve │ │ │ │ +0001e630: 6e74 733d 4e55 4c4c 2c3c 2f64 6976 3e0a nts=NULL,
    . │ │ │ │ +0001e640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +0001e720: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001e730: 6e6f 223e 2031 3433 373c 2f73 7061 6e3e no"> 1437 │ │ │ │ +0001e740: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +0001e790: 2031 3438 363c 2f73 7061 6e3e 2020 2020 1486 │ │ │ │ +0001e7a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ +0001e7e0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +0001e7f0: 5352 435f 4255 4646 4552 2c20 3c73 7061 SRC_BUFFER, typename DST_BUFFER,.
    148 │ │ │ │ +0001e880: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ │ +0001e890: 2020 2020 2020 3c73 7061 6e20 636c 6173 type │ │ │ │ +0001e8b0: 6e61 6d65 3c2f 7370 616e 3e20 5041 5443 name PATC │ │ │ │ +0001e8c0: 4843 4f4f 5244 5f42 5546 4645 522c 203c HCOORD_BUFFER, < │ │ │ │ +0001e8d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0001e8e0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename PATCH_TABLE │ │ │ │ +0001e900: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001e950: 2031 3438 383c 2f73 7061 6e3e 2020 2020 1488 │ │ │ │ +0001e960: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +0001e980: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +0001e990: 4445 5649 4345 5f43 4f4e 5445 5854 2667 DEVICE_CONTEXT&g │ │ │ │ +0001e9a0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    .< │ │ │ │ +0001e9f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001ea00: 3e3c 6120 6964 3d22 6c30 3134 3839 2220 > 148 │ │ │ │ +0001ea80: 393c 2f61 3e3c 2f73 7061 6e3e 2020 2020 9 │ │ │ │ +0001ea90: 3c73 7061 6e20 636c 6173 733d 226b 6579 static bo │ │ │ │ +0001ead0: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol EvalP │ │ │ │ +0001eb30: 6174 6368 6573 5661 7279 696e 673c 2f61 atchesVarying(
    .
    1490 │ │ │ │ +0001eba0: 2020 2020 2053 5243 5f42 5546 4645 5220 SRC_BUFFER │ │ │ │ +0001ebb0: 2a73 7263 4275 6666 6572 2c20 3c61 2063 *srcBuffer, BufferD │ │ │ │ +0001ebf0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +0001ec20: 2026 616d 703b 7372 6344 6573 632c 3c2f &srcDesc,.
    14 │ │ │ │ +0001ec80: 3931 3c2f 7370 616e 3e20 2020 2020 2020 91 │ │ │ │ +0001ec90: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ +0001eca0: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ +0001ece0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +0001ed00: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +0001ed10: 703b 6473 7444 6573 632c 3c2f 6469 763e p;dstDesc,
    │ │ │ │ +0001ed20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001ed50: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1492 int numPatchCoords │ │ │ │ +0001edb0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001ee00: 2031 3439 333c 2f73 7061 6e3e 2020 2020 1493 │ │ │ │ +0001ee10: 2020 2020 5041 5443 4843 4f4f 5244 5f42 PATCHCOORD_B │ │ │ │ +0001ee20: 5546 4645 5220 2a70 6174 6368 436f 6f72 UFFER *patchCoor │ │ │ │ +0001ee30: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    1494 │ │ │ │ +0001ee90: 2020 2020 2020 5041 5443 485f 5441 424c PATCH_TABL │ │ │ │ +0001eea0: 4520 2a70 6174 6368 5461 626c 652c 3c2f E *patchTable,.
    14 │ │ │ │ +0001ef00: 3935 3c2f 7370 616e 3e20 2020 2020 2020 95 │ │ │ │ +0001ef10: 203c 6120 636c 6173 733d 2263 6f64 6520 CLE │ │ │ │ +0001ef40: 7661 6c75 6174 6f72 3c2f 613e 203c 7370 valuator const │ │ │ │ +0001ef70: 2a69 6e73 7461 6e63 652c 3c2f 6469 763e *instance,
    │ │ │ │ +0001ef80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001efb0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1496 DEV │ │ │ │ +0001efe0: 4943 455f 434f 4e54 4558 5420 6465 7669 ICE_CONTEXT devi │ │ │ │ +0001eff0: 6365 436f 6e74 6578 742c 3c2f 6469 763e ceContext,
    │ │ │ │ +0001f000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001f030: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1497 unsigned< │ │ │ │ +0001f080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int numS │ │ │ │ +0001f0b0: 7461 7274 4576 656e 7473 3d30 2c3c 2f64 tartEvents=0,.
    149 │ │ │ │ +0001f110: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0001f120: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cl_event* sta │ │ │ │ +0001f150: 7274 4576 656e 7473 3d4e 554c 4c2c 3c2f rtEvents=NULL,.
    14 │ │ │ │ +0001f1b0: 3939 3c2f 7370 616e 3e20 2020 2020 2020 99 │ │ │ │ +0001f1c0: 2063 6c5f 6576 656e 742a 2065 6e64 4576 cl_event* endEv │ │ │ │ +0001f1d0: 656e 743d 4e55 4c4c 2920 7b3c 2f64 6976 ent=NULL) {
    .
    1500< │ │ │ │ +0001f230: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0001f250: 3c61 2069 643d 226c 3031 3530 3122 206e 1501 if (i │ │ │ │ +0001f2c0: 6e73 7461 6e63 6529 207b 3c2f 6469 763e nstance) {
    │ │ │ │ +0001f2d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001f300: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1502 │ │ │ │ +0001f330: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +0001f350: 6e3c 2f73 7061 6e3e 2069 6e73 7461 6e63 n instanc │ │ │ │ +0001f360: 652d 2667 743b 3c61 2063 6c61 7373 3d22 e->EvalPatch │ │ │ │ +0001f3c0: 6573 5661 7279 696e 673c 2f61 3e28 3c2f esVarying(.
    15 │ │ │ │ +0001f420: 3033 3c2f 7370 616e 3e20 2020 2020 2020 03 │ │ │ │ +0001f430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f440: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f450: 2020 7372 6342 7566 6665 722c 2073 7263 srcBuffer, src │ │ │ │ +0001f460: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0001f4a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001f4b0: 6e6f 223e 2031 3530 343c 2f73 7061 6e3e no"> 1504 │ │ │ │ +0001f4c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f4d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f4e0: 2020 2020 2020 2020 2064 7374 4275 6666 dstBuff │ │ │ │ +0001f4f0: 6572 2c20 6473 7444 6573 632c 3c2f 6469 er, dstDesc,.
    1505 │ │ │ │ +0001f550: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0001f560: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f580: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ +0001f590: 7061 7463 6843 6f6f 7264 732c 3c2f 6469 patchCoords,.
    1506 │ │ │ │ +0001f5f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0001f600: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f610: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f620: 7061 7463 6854 6162 6c65 2c3c 2f64 6976 patchTable,
    .
    1507< │ │ │ │ +0001f680: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001f690: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f6a0: 2020 2020 2020 2020 2020 2020 2020 206e n │ │ │ │ +0001f6b0: 756d 5374 6172 7445 7665 6e74 732c 2073 umStartEvents, s │ │ │ │ +0001f6c0: 7461 7274 4576 656e 7473 2c20 656e 6445 tartEvents, endE │ │ │ │ +0001f6d0: 7665 6e74 293b 3c2f 6469 763e 0a3c 6469 vent);
    .< │ │ │ │ +0001f6f0: 6120 6964 3d22 6c30 3135 3038 2220 6e61 a id="l01508" na │ │ │ │ +0001f700: 6d65 3d22 6c30 3135 3038 223e 3c2f 613e me="l01508"> │ │ │ │ +0001f710: 3c73 7061 6e20 636c 6173 733d 226c 696e 1508 } else │ │ │ │ +0001f760: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    1509 │ │ │ │ +0001f7c0: 2020 2020 2020 2020 203c 7370 616e 2063 / │ │ │ │ +0001f7e0: 2f20 4372 6561 7465 2061 6e20 696e 7374 / Create an inst │ │ │ │ +0001f7f0: 616e 6365 206f 6e20 6465 6d61 6e64 2028 ance on demand ( │ │ │ │ +0001f800: 736c 6f77 293c 2f73 7061 6e3e 3c2f 6469 slow).
    1510 │ │ │ │ +0001f860: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0001f870: 2020 2028 766f 6964 2964 6576 6963 6543 (void)deviceC │ │ │ │ +0001f880: 6f6e 7465 7874 3b20 203c 7370 616e 2063 ontext; / │ │ │ │ +0001f8a0: 2f20 756e 7573 6564 3c2f 7370 616e 3e3c / unused< │ │ │ │ +0001f8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +0001f900: 3531 313c 2f73 7061 6e3e 2020 2020 2020 511 │ │ │ │ +0001f910: 2020 2020 2020 696e 7374 616e 6365 203d instance = │ │ │ │ +0001f920: 203c 6120 636c 6173 733d 2263 6f64 6520 Create(src │ │ │ │ +0001f980: 4465 7363 2c20 6473 7444 6573 632c 3c2f Desc, dstDesc,.
    15 │ │ │ │ +0001f9e0: 3132 3c2f 7370 616e 3e20 2020 2020 2020 12 │ │ │ │ +0001f9f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fa00: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ +0001fa40: 7074 6f72 3c2f 613e 2829 2c3c 2f64 6976 ptor(),
    .
    1513< │ │ │ │ +0001faa0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001fab0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fac0: 2020 2020 3c61 2063 6c61 7373 3d22 636f BufferDescripto │ │ │ │ +0001fb00: 723c 2f61 3e28 292c 3c2f 6469 763e 0a3c r(),
    .< │ │ │ │ +0001fb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001fb20: 3e3c 6120 6964 3d22 6c30 3135 3134 2220 > 1514 │ │ │ │ +0001fb70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fb80: 2064 6576 6963 6543 6f6e 7465 7874 293b deviceContext); │ │ │ │ +0001fb90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001fbe0: 3135 3135 3c2f 7370 616e 3e20 2020 2020 1515 │ │ │ │ +0001fbf0: 2020 2020 2020 203c 7370 616e 2063 6c61 if (inst │ │ │ │ +0001fc20: 616e 6365 2920 7b3c 2f64 6976 3e0a 3c64 ance) {
    . │ │ │ │ +0001fc40: 3c61 2069 643d 226c 3031 3531 3622 206e 1516 │ │ │ │ +0001fc90: 2020 3c73 7061 6e20 636c 6173 733d 226b bool │ │ │ │ +0001fcb0: 3c2f 7370 616e 3e20 7220 3d20 696e 7374 r = inst │ │ │ │ +0001fcc0: 616e 6365 2d26 6774 3b3c 6120 636c 6173 ance->EvalPa │ │ │ │ +0001fd20: 7463 6865 7356 6172 7969 6e67 3c2f 613e tchesVarying │ │ │ │ +0001fd30: 283c 2f64 6976 3e0a 3c64 6976 2063 6c61 (
    .
    │ │ │ │ +0001fd80: 2031 3531 373c 2f73 7061 6e3e 2020 2020 1517 │ │ │ │ +0001fd90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fda0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fdb0: 2020 2020 2020 2020 2020 2073 7263 4275 srcBu │ │ │ │ +0001fdc0: 6666 6572 2c20 7372 6344 6573 632c 3c2f ffer, srcDesc,.
    15 │ │ │ │ +0001fe20: 3138 3c2f 7370 616e 3e20 2020 2020 2020 18 │ │ │ │ +0001fe30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fe40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fe50: 2020 2020 2020 2020 6473 7442 7566 6665 dstBuffe │ │ │ │ +0001fe60: 722c 2064 7374 4465 7363 2c3c 2f64 6976 r, dstDesc,
    .
    1519< │ │ │ │ +0001fec0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0001fed0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fee0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001fef0: 2020 2020 206e 756d 5061 7463 6843 6f6f numPatchCoo │ │ │ │ +0001ff00: 7264 732c 2070 6174 6368 436f 6f72 6473 rds, patchCoords │ │ │ │ +0001ff10: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0001ff60: 2031 3532 303c 2f73 7061 6e3e 2020 2020 1520 │ │ │ │ +0001ff70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ff80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ff90: 2020 2020 2020 2020 2020 2070 6174 6368 patch │ │ │ │ +0001ffa0: 5461 626c 652c 3c2f 6469 763e 0a3c 6469 Table,
    .< │ │ │ │ +0001ffc0: 6120 6964 3d22 6c30 3135 3231 2220 6e61 a id="l01521" na │ │ │ │ +0001ffd0: 6d65 3d22 6c30 3135 3231 223e 3c2f 613e me="l01521"> │ │ │ │ +0001ffe0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1521 │ │ │ │ +00020010: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00020020: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00020030: 6e75 6d53 7461 7274 4576 656e 7473 2c20 numStartEvents, │ │ │ │ +00020040: 7374 6172 7445 7665 6e74 732c 2065 6e64 startEvents, end │ │ │ │ +00020050: 4576 656e 7429 3b3c 2f64 6976 3e0a 3c64 Event);
    . │ │ │ │ +00020070: 3c61 2069 643d 226c 3031 3532 3222 206e 1522
    │ │ │ │ +000200c0: 2020 3c73 7061 6e20 636c 6173 733d 226b delete instance;< │ │ │ │ +000200f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00020140: 3532 333c 2f73 7061 6e3e 2020 2020 2020 523 │ │ │ │ +00020150: 2020 2020 2020 2020 2020 3c73 7061 6e20 return r;
    .
    1524 │ │ │ │ +000201e0: 2020 2020 2020 2020 2020 207d 3c2f 6469 }.
    1525 │ │ │ │ +00020240: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00020250: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +00020270: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn false;.
    15 │ │ │ │ +000202f0: 3236 3c2f 7370 616e 3e20 2020 2020 2020 26 │ │ │ │ +00020300: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    1527 │ │ │ │ +00020360: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ │ +00020370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00020400: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00020410: 6e6f 223e 2031 3536 363c 2f73 7061 6e3e no"> 1566 │ │ │ │ +00020420: 2020 2020 3c73 7061 6e20 636c 6173 733d templa │ │ │ │ +00020440: 7465 3c2f 7370 616e 3e20 266c 743b 3c73 te <typename SRC_BUFFER, │ │ │ │ +00020480: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename DST_BUFFER │ │ │ │ +000204b0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00020500: 2031 3536 373c 2f73 7061 6e3e 2020 2020 1567 │ │ │ │ +00020510: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +00020530: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +00020540: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +00020550: 522c 203c 7370 616e 2063 6c61 7373 3d22 R, typenam │ │ │ │ +00020570: 653c 2f73 7061 6e3e 2050 4154 4348 5f54 e PATCH_T │ │ │ │ +00020580: 4142 4c45 2667 743b 3c2f 6469 763e 0a3c ABLE>
    .< │ │ │ │ +00020590: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ │ +000205a0: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ │ +000205b0: 6e30 3135 3638 2220 6461 7461 2d73 7461 n01568" data-sta │ │ │ │ +000205c0: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ │ +000205d0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">..
    1569 │ │ │ │ +00020760: 2020 2020 2020 2053 5243 5f42 5546 4645 SRC_BUFFE │ │ │ │ +00020770: 5220 2a73 7263 4275 6666 6572 2c20 3c61 R *srcBuffer, Buffe │ │ │ │ +000207b0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +000207c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &srcDesc, │ │ │ │ +000207f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00020840: 3135 3730 3c2f 7370 616e 3e20 2020 2020 1570 │ │ │ │ +00020850: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ +00020860: 7374 4275 6666 6572 2c20 3c61 2063 6c61 stBuffer, BufferDes │ │ │ │ +000208a0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +000208d0: 616d 703b 6473 7444 6573 632c 3c2f 6469 amp;dstDesc,.
    1571 │ │ │ │ +00020930: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00020940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00020950: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int numPatchCoor │ │ │ │ +00020970: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    1572 │ │ │ │ +000209d0: 2020 2020 2020 5041 5443 4843 4f4f 5244 PATCHCOORD │ │ │ │ +000209e0: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ +000209f0: 6f72 6473 2c3c 2f64 6976 3e0a 3c64 6976 ords,
    .
    < │ │ │ │ +00020a30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00020a40: 6e6f 223e 2031 3537 333c 2f73 7061 6e3e no"> 1573 │ │ │ │ +00020a50: 2020 2020 2020 2020 5041 5443 485f 5441 PATCH_TA │ │ │ │ +00020a60: 424c 4520 2a70 6174 6368 5461 626c 652c BLE *patchTable, │ │ │ │ +00020a70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00020ac0: 3135 3734 3c2f 7370 616e 3e20 2020 2020 1574 │ │ │ │ +00020ad0: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns │ │ │ │ +00020af0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int numStartEvents │ │ │ │ +00020b30: 3d30 2c3c 2f64 6976 3e0a 3c64 6976 2063 =0,
    .
    1575 │ │ │ │ +00020b90: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ +00020bb0: 743c 2f73 7061 6e3e 2063 6c5f 6576 656e t cl_even │ │ │ │ +00020bc0: 742a 2073 7461 7274 4576 656e 7473 3d4e t* startEvents=N │ │ │ │ +00020bd0: 554c 4c2c 3c2f 6469 763e 0a3c 6469 7620 ULL,
    .
    1576 │ │ │ │ +00020c30: 2020 2020 2020 2063 6c5f 6576 656e 742a cl_event* │ │ │ │ +00020c40: 2065 6e64 4576 656e 743d 4e55 4c4c 293c endEvent=NULL)< │ │ │ │ +00020c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00020c60: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    1577 │ │ │ │ +00020cd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00020d20: 3135 3738 3c2f 7370 616e 3e20 2020 2020 1578 │ │ │ │ +00020d30: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +00020d50: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn Eval │ │ │ │ +00020db0: 5061 7463 6865 733c 2f61 3e28 7372 6342 Patches(srcB │ │ │ │ +00020dc0: 7566 6665 722d 2667 743b 4269 6e64 434c uffer->BindCL │ │ │ │ +00020dd0: 4275 6666 6572 285f 636c 436f 6d6d 616e Buffer(_clComman │ │ │ │ +00020de0: 6451 7565 7565 292c 2073 7263 4465 7363 dQueue), srcDesc │ │ │ │ +00020df0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00020e40: 2031 3537 393c 2f73 7061 6e3e 2020 2020 1579 │ │ │ │ +00020e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00020e60: 2020 2020 2020 2064 7374 4275 6666 6572 dstBuffer │ │ │ │ +00020e70: 2d26 6774 3b42 696e 6443 4c42 7566 6665 ->BindCLBuffe │ │ │ │ +00020e80: 7228 5f63 6c43 6f6d 6d61 6e64 5175 6575 r(_clCommandQueu │ │ │ │ +00020e90: 6529 2c20 6473 7444 6573 632c 3c2f 6469 e), dstDesc,.
    1580 │ │ │ │ +00020ef0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00020f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00020f10: 2020 302c 203c 6120 636c 6173 733d 2263 0, BufferDescript │ │ │ │ +00020f50: 6f72 3c2f 613e 2829 2c3c 2f64 6976 3e0a or(),
    . │ │ │ │ +00020f60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00021030: 6120 6964 3d22 6c30 3135 3832 2220 6e61 a id="l01582" na │ │ │ │ +00021040: 6d65 3d22 6c30 3135 3832 223e 3c2f 613e me="l01582"> │ │ │ │ +00021050: 3c73 7061 6e20 636c 6173 733d 226c 696e 1582 │ │ │ │ +00021080: 2020 2020 2020 2020 2020 2020 6e75 6d50 numP │ │ │ │ +00021090: 6174 6368 436f 6f72 6473 2c3c 2f64 6976 atchCoords,
    .
    1583< │ │ │ │ +000210f0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00021100: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00021110: 2070 6174 6368 436f 6f72 6473 2d26 6774 patchCoords-> │ │ │ │ +00021120: 3b42 696e 6443 4c42 7566 6665 7228 5f63 ;BindCLBuffer(_c │ │ │ │ +00021130: 6c43 6f6d 6d61 6e64 5175 6575 6529 2c3c lCommandQueue),< │ │ │ │ +00021140: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00021190: 3538 343c 2f73 7061 6e3e 2020 2020 2020 584 │ │ │ │ +000211a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000211b0: 2020 2020 2070 6174 6368 5461 626c 652d patchTable- │ │ │ │ +000211c0: 2667 743b 4765 7456 6172 7969 6e67 5061 >GetVaryingPa │ │ │ │ +000211d0: 7463 6841 7272 6179 4275 6666 6572 2829 tchArrayBuffer() │ │ │ │ +000211e0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00021230: 2031 3538 353c 2f73 7061 6e3e 2020 2020 1585 │ │ │ │ +00021240: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00021250: 2020 2020 2020 2070 6174 6368 5461 626c patchTabl │ │ │ │ +00021260: 652d 2667 743b 4765 7456 6172 7969 6e67 e->GetVarying │ │ │ │ +00021270: 5061 7463 6849 6e64 6578 4275 6666 6572 PatchIndexBuffer │ │ │ │ +00021280: 2829 2c3c 2f64 6976 3e0a 3c64 6976 2063 (),
    .
    1586 │ │ │ │ +000212e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000212f0: 2020 2020 2020 2020 2070 6174 6368 5461 patchTa │ │ │ │ +00021300: 626c 652d 2667 743b 4765 7450 6174 6368 ble->GetPatch │ │ │ │ +00021310: 5061 7261 6d42 7566 6665 7228 292c 3c2f ParamBuffer(),.
    15 │ │ │ │ +00021370: 3837 3c2f 7370 616e 3e20 2020 2020 2020 87 │ │ │ │ +00021380: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00021390: 2020 2020 6e75 6d53 7461 7274 4576 656e numStartEven │ │ │ │ +000213a0: 7473 2c20 7374 6172 7445 7665 6e74 732c ts, startEvents, │ │ │ │ +000213b0: 2065 6e64 4576 656e 7429 3b3c 2f64 6976 endEvent);
    .
    1588< │ │ │ │ +00021410: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    1589 .
    16 │ │ │ │ +000214d0: 3530 3c2f 7370 616e 3e20 2020 203c 7370 50 template <typ │ │ │ │ +00021520: 656e 616d 653c 2f73 7061 6e3e 2053 5243 ename SRC │ │ │ │ +00021530: 5f42 5546 4645 522c 203c 7370 616e 2063 _BUFFER, t │ │ │ │ +00021550: 7970 656e 616d 653c 2f73 7061 6e3e 2044 ypename D │ │ │ │ +00021560: 5354 5f42 5546 4645 522c 3c2f 6469 763e ST_BUFFER,
    │ │ │ │ +00021570: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000215a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1651 │ │ │ │ +000215d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 typenam │ │ │ │ +000215f0: 653c 2f73 7061 6e3e 2050 4154 4348 434f e PATCHCO │ │ │ │ +00021600: 4f52 445f 4255 4646 4552 2c20 3c73 7061 ORD_BUFFER, typename PATCH_TABLE,.
    16 │ │ │ │ +00021690: 3532 3c2f 7370 616e 3e20 2020 2020 2020 52 │ │ │ │ +000216a0: 2020 2020 2020 203c 7370 616e 2063 6c61 typ │ │ │ │ +000216c0: 656e 616d 653c 2f73 7061 6e3e 2044 4556 ename DEV │ │ │ │ +000216d0: 4943 455f 434f 4e54 4558 5426 6774 3b3c ICE_CONTEXT>< │ │ │ │ +000216e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ │ +00021760: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00021770: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 1653 static │ │ │ │ +000217f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 bool< │ │ │ │ +00021810: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> EvalPatc │ │ │ │ +00021870: 6865 7356 6172 7969 6e67 3c2f 613e 283c hesVarying(< │ │ │ │ +00021880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +000218d0: 3635 343c 2f73 7061 6e3e 2020 2020 2020 654 │ │ │ │ +000218e0: 2020 5352 435f 4255 4646 4552 202a 7372 SRC_BUFFER *sr │ │ │ │ +000218f0: 6342 7566 6665 722c 203c 6120 636c 6173 cBuffer, BufferDesc │ │ │ │ +00021930: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +00021960: 6d70 3b73 7263 4465 7363 2c3c 2f64 6976 mp;srcDesc,
    .
    1655< │ │ │ │ +000219c0: 2f73 7061 6e3e 2020 2020 2020 2020 4453 /span> DS │ │ │ │ +000219d0: 545f 4255 4646 4552 202a 6473 7442 7566 T_BUFFER *dstBuf │ │ │ │ +000219e0: 6665 722c 203c 6120 636c 6173 733d 2263 fer, BufferDescript │ │ │ │ +00021a20: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +00021a40: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ +00021a50: 7374 4465 7363 2c3c 2f64 6976 3e0a 3c64 stDesc,
    . │ │ │ │ +00021a70: 3c61 2069 643d 226c 3031 3635 3622 206e 1656 DST_BU │ │ │ │ +00021ac0: 4646 4552 202a 6475 4275 6666 6572 2c20 FFER *duBuffer, │ │ │ │ +00021ad0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +00021b00: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &duDes │ │ │ │ +00021b40: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1657 │ │ │ │ +00021ba0: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ +00021bb0: 2a64 7642 7566 6665 722c 2020 3c61 2063 *dvBuffer, BufferD │ │ │ │ +00021bf0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +00021c20: 2026 616d 703b 6476 4465 7363 2c3c 2f64 &dvDesc,.
    165 │ │ │ │ +00021c80: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +00021c90: 3c73 7061 6e20 636c 6173 733d 226b 6579 int numPatchCoo │ │ │ │ +00021cc0: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    1659 │ │ │ │ +00021d20: 2020 2020 2020 2050 4154 4348 434f 4f52 PATCHCOOR │ │ │ │ +00021d30: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ +00021d40: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ +00021d60: 6120 6964 3d22 6c30 3136 3630 2220 6e61 a id="l01660" na │ │ │ │ +00021d70: 6d65 3d22 6c30 3136 3630 223e 3c2f 613e me="l01660"> │ │ │ │ +00021d80: 3c73 7061 6e20 636c 6173 733d 226c 696e 1660 PATCH_T │ │ │ │ +00021db0: 4142 4c45 202a 7061 7463 6854 6162 6c65 ABLE *patchTable │ │ │ │ +00021dc0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00021e10: 2031 3636 313c 2f73 7061 6e3e 2020 2020 1661 │ │ │ │ +00021e20: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ +00021e50: 434c 4576 616c 7561 746f 723c 2f61 3e20 CLEvaluator │ │ │ │ +00021e60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const *instance,.
    166 │ │ │ │ +00021ee0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +00021ef0: 4445 5649 4345 5f43 4f4e 5445 5854 2064 DEVICE_CONTEXT d │ │ │ │ +00021f00: 6576 6963 6543 6f6e 7465 7874 2c3c 2f64 eviceContext,.
    166 │ │ │ │ +00021f60: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00021f70: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +00021f90: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +00021fc0: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +00021fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00022020: 3136 3634 3c2f 7370 616e 3e20 2020 2020 1664 │ │ │ │ +00022030: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +00022060: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +00022070: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000220c0: 2031 3636 353c 2f73 7061 6e3e 2020 2020 1665 │ │ │ │ +000220d0: 2020 2020 636c 5f65 7665 6e74 2a20 656e cl_event* en │ │ │ │ +000220e0: 6445 7665 6e74 3d4e 554c 4c29 207b 3c2f dEvent=NULL) {.
    16 │ │ │ │ +00022140: 3636 3c2f 7370 616e 3e20 3c2f 6469 763e 66
    │ │ │ │ +00022150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00022180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1667 if │ │ │ │ +000221d0: 2028 696e 7374 616e 6365 2920 7b3c 2f64 (instance) {.
    166 │ │ │ │ +00022230: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +00022240: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +00022260: 7475 726e 3c2f 7370 616e 3e20 696e 7374 turn inst │ │ │ │ +00022270: 616e 6365 2d26 6774 3b3c 6120 636c 6173 ance->EvalPa │ │ │ │ +000222d0: 7463 6865 7356 6172 7969 6e67 3c2f 613e tchesVarying │ │ │ │ +000222e0: 283c 2f64 6976 3e0a 3c64 6976 2063 6c61 (
    .
    │ │ │ │ +00022330: 2031 3636 393c 2f73 7061 6e3e 2020 2020 1669 │ │ │ │ +00022340: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022350: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022360: 2020 2020 2073 7263 4275 6666 6572 2c20 srcBuffer, │ │ │ │ +00022370: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +00022380: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00022390: 3e3c 6120 6964 3d22 6c30 3136 3730 2220 > 1670 │ │ │ │ +000223e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000223f0: 2020 2020 2020 2020 2020 2020 6473 7442 dstB │ │ │ │ +00022400: 7566 6665 722c 2064 7374 4465 7363 2c3c uffer, dstDesc,< │ │ │ │ +00022410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00022460: 3637 313c 2f73 7061 6e3e 2020 2020 2020 671 │ │ │ │ +00022470: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022480: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022490: 2020 2064 7542 7566 6665 722c 2064 7544 duBuffer, duD │ │ │ │ +000224a0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1672 │ │ │ │ +00022500: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022510: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022520: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +00022530: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +00022540: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +000225e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00022670: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00022680: 3e3c 6120 6964 3d22 6c30 3136 3735 2220 > 1675 │ │ │ │ +000226d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000226e0: 2020 2020 2020 2020 2020 2020 6e75 6d53 numS │ │ │ │ +000226f0: 7461 7274 4576 656e 7473 2c20 7374 6172 tartEvents, star │ │ │ │ +00022700: 7445 7665 6e74 732c 2065 6e64 4576 656e tEvents, endEven │ │ │ │ +00022710: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    1676 │ │ │ │ +00022770: 2020 2020 2020 7d20 3c73 7061 6e20 636c } else {< │ │ │ │ +000227a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +000227f0: 3637 373c 2f73 7061 6e3e 2020 2020 2020 677 │ │ │ │ +00022800: 2020 2020 2020 3c73 7061 6e20 636c 6173 // C │ │ │ │ +00022820: 7265 6174 6520 616e 2069 6e73 7461 6e63 reate an instanc │ │ │ │ +00022830: 6520 6f6e 2064 656d 616e 6420 2873 6c6f e on demand (slo │ │ │ │ +00022840: 7729 3c2f 7370 616e 3e3c 2f64 6976 3e0a w)
    . │ │ │ │ +00022850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00022880: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1678 │ │ │ │ +000228b0: 2876 6f69 6429 6465 7669 6365 436f 6e74 (void)deviceCont │ │ │ │ +000228c0: 6578 743b 2020 3c73 7061 6e20 636c 6173 ext; // u │ │ │ │ +000228e0: 6e75 7365 643c 2f73 7061 6e3e 3c2f 6469 nused.
    1679 │ │ │ │ +00022940: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00022950: 2020 2069 6e73 7461 6e63 6520 3d20 3c61 instance = C │ │ │ │ +000229b0: 7265 6174 653c 2f61 3e28 7372 6344 6573 reate(srcDes │ │ │ │ +000229c0: 632c 2064 7374 4465 7363 2c3c 2f64 6976 c, dstDesc,
    .
    1680< │ │ │ │ +00022a20: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00022a30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022a40: 2020 2020 6475 4465 7363 2c20 6476 4465 duDesc, dvDe │ │ │ │ +00022a50: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1681 │ │ │ │ +00022ab0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022ac0: 2020 2020 2020 2020 2020 2020 6465 7669 devi │ │ │ │ +00022ad0: 6365 436f 6e74 6578 7429 3b3c 2f64 6976 ceContext);
    .
    1682< │ │ │ │ +00022b30: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00022b40: 2020 3c73 7061 6e20 636c 6173 733d 226b if (instance) │ │ │ │ +00022b70: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    1683 │ │ │ │ +00022bd0: 2020 2020 2020 2020 2020 2020 203c 7370 bool r = instance- │ │ │ │ +00022c10: 2667 743b 3c61 2063 6c61 7373 3d22 636f >EvalPatches │ │ │ │ +00022c70: 5661 7279 696e 673c 2f61 3e28 3c2f 6469 Varying(.
    1684 │ │ │ │ +00022cd0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00022ce0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022cf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022d00: 2020 2020 2020 7372 6342 7566 6665 722c srcBuffer, │ │ │ │ +00022d10: 2073 7263 4465 7363 2c3c 2f64 6976 3e0a srcDesc,
    . │ │ │ │ +00022d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00022dd0: 6120 6964 3d22 6c30 3136 3836 2220 6e61 a id="l01686" na │ │ │ │ +00022de0: 6d65 3d22 6c30 3136 3836 223e 3c2f 613e me="l01686"> │ │ │ │ +00022df0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1686 │ │ │ │ +00022e20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022e30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022e40: 6475 4275 6666 6572 2c20 6475 4465 7363 duBuffer, duDesc │ │ │ │ +00022e50: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00022ea0: 2031 3638 373c 2f73 7061 6e3e 2020 2020 1687 │ │ │ │ +00022eb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022ec0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022ed0: 2020 2020 2020 2020 2020 2064 7642 7566 dvBuf │ │ │ │ +00022ee0: 6665 722c 2064 7644 6573 632c 3c2f 6469 fer, dvDesc,.
    1688 │ │ │ │ +00022f40: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00022f50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022f60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00022f70: 2020 2020 2020 6e75 6d50 6174 6368 436f numPatchCo │ │ │ │ +00022f80: 6f72 6473 2c20 7061 7463 6843 6f6f 7264 ords, patchCoord │ │ │ │ +00022f90: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    1689 │ │ │ │ +00022ff0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00023000: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00023010: 2020 2020 2020 2020 2020 2020 7061 7463 patc │ │ │ │ +00023020: 6854 6162 6c65 2c3c 2f64 6976 3e0a 3c64 hTable,
    . │ │ │ │ +00023040: 3c61 2069 643d 226c 3031 3639 3022 206e 1690 │ │ │ │ +00023090: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000230a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000230b0: 206e 756d 5374 6172 7445 7665 6e74 732c numStartEvents, │ │ │ │ +000230c0: 2073 7461 7274 4576 656e 7473 2c20 656e startEvents, en │ │ │ │ +000230d0: 6445 7665 6e74 293b 3c2f 6469 763e 0a3c dEvent);
    .< │ │ │ │ +000230e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000230f0: 3e3c 6120 6964 3d22 6c30 3136 3931 2220 > 1691 │ │ │ │ +00023140: 2020 203c 7370 616e 2063 6c61 7373 3d22 delete< │ │ │ │ +00023160: 2f73 7061 6e3e 2069 6e73 7461 6e63 653b /span> instance; │ │ │ │ +00023170: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000231c0: 3136 3932 3c2f 7370 616e 3e20 2020 2020 1692 │ │ │ │ +000231d0: 2020 2020 2020 2020 2020 203c 7370 616e return r;
    .
    < │ │ │ │ +00023240: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00023250: 6e6f 223e 2031 3639 333c 2f73 7061 6e3e no"> 1693 │ │ │ │ +00023260: 2020 2020 2020 2020 2020 2020 7d3c 2f64 }.
    169 │ │ │ │ +000232c0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ +000232d0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +000232f0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn false;< │ │ │ │ +00023320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00023370: 3639 353c 2f73 7061 6e3e 2020 2020 2020 695 │ │ │ │ +00023380: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    1696 │ │ │ │ +000233e0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ │ +000233f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00023460: 6120 6964 3d22 6c30 3137 3437 2220 6e61 a id="l01747" na │ │ │ │ +00023470: 6d65 3d22 6c30 3137 3437 223e 3c2f 613e me="l01747"> │ │ │ │ +00023480: 3c73 7061 6e20 636c 6173 733d 226c 696e 1747 templ │ │ │ │ +000234c0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +000234d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000234e0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename SRC_BUFFER, │ │ │ │ +00023500: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +00023520: 2f73 7061 6e3e 2044 5354 5f42 5546 4645 /span> DST_BUFFE │ │ │ │ +00023530: 522c 3c2f 6469 763e 0a3c 6469 7620 636c R,
    .
    1748 │ │ │ │ +00023590: 2020 2020 2020 2020 2020 203c 7370 616e typename │ │ │ │ +000235c0: 2050 4154 4348 434f 4f52 445f 4255 4646 PATCHCOORD_BUFF │ │ │ │ +000235d0: 4552 2c20 3c73 7061 6e20 636c 6173 733d ER, typena │ │ │ │ +000235f0: 6d65 3c2f 7370 616e 3e20 5041 5443 485f me PATCH_ │ │ │ │ +00023600: 5441 424c 4526 6774 3b3c 2f64 6976 3e0a TABLE>
    . │ │ │ │ +00023610: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    ..
    < │ │ │ │ +000237c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000237d0: 6e6f 223e 2031 3735 303c 2f73 7061 6e3e no"> 1750 │ │ │ │ +000237e0: 2020 2020 2020 2020 5352 435f 4255 4646 SRC_BUFF │ │ │ │ +000237f0: 4552 202a 7372 6342 7566 6665 722c 203c ER *srcBuffer, < │ │ │ │ +00023800: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00023810: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00023820: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00023830: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00023840: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &srcDesc │ │ │ │ +00023870: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000238c0: 2031 3735 313c 2f73 7061 6e3e 2020 2020 1751 │ │ │ │ +000238d0: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +000238e0: 6473 7442 7566 6665 722c 203c 6120 636c dstBuffer, BufferDe │ │ │ │ +00023920: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00023950: 2661 6d70 3b64 7374 4465 7363 2c3c 2f64 &dstDesc,.
    175 │ │ │ │ +000239b0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +000239c0: 4453 545f 4255 4646 4552 202a 6475 4275 DST_BUFFER *duBu │ │ │ │ +000239d0: 6666 6572 2c20 203c 6120 636c 6173 733d ffer, BufferDescri │ │ │ │ +00023a10: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +00023a30: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +00023a40: 3b64 7544 6573 632c 3c2f 6469 763e 0a3c ;duDesc,
    .< │ │ │ │ +00023a50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00023a60: 3e3c 6120 6964 3d22 6c30 3137 3533 2220 > 1753
    DST_B │ │ │ │ +00023ab0: 5546 4645 5220 2a64 7642 7566 6665 722c UFFER *dvBuffer, │ │ │ │ +00023ac0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 B │ │ │ │ +00023af0: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00023b00: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +00023b20: 2f73 7061 6e3e 2026 616d 703b 6476 4465 /span> &dvDe │ │ │ │ +00023b30: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1754 │ │ │ │ +00023b90: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +00023bb0: 696e 743c 2f73 7061 6e3e 206e 756d 5061 int numPa │ │ │ │ +00023bc0: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ +00023bd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00023c00: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1755 PAT │ │ │ │ +00023c30: 4348 434f 4f52 445f 4255 4646 4552 202a CHCOORD_BUFFER * │ │ │ │ +00023c40: 7061 7463 6843 6f6f 7264 732c 3c2f 6469 patchCoords,.
    1756 │ │ │ │ +00023ca0: 3c2f 7370 616e 3e20 2020 2020 2020 2050 P │ │ │ │ +00023cb0: 4154 4348 5f54 4142 4c45 202a 7061 7463 ATCH_TABLE *patc │ │ │ │ +00023cc0: 6854 6162 6c65 2c3c 2f64 6976 3e0a 3c64 hTable,
    . │ │ │ │ +00023ce0: 3c61 2069 643d 226c 3031 3735 3722 206e 1757 unsigned in │ │ │ │ +00023d70: 743c 2f73 7061 6e3e 206e 756d 5374 6172 t numStar │ │ │ │ +00023d80: 7445 7665 6e74 733d 302c 3c2f 6469 763e tEvents=0,
    │ │ │ │ +00023d90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00023dc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1758 const │ │ │ │ +00023e10: 636c 5f65 7665 6e74 2a20 7374 6172 7445 cl_event* startE │ │ │ │ +00023e20: 7665 6e74 733d 4e55 4c4c 2c3c 2f64 6976 vents=NULL,
    .
    1759< │ │ │ │ +00023e80: 2f73 7061 6e3e 2020 2020 2020 2020 636c /span> cl │ │ │ │ +00023e90: 5f65 7665 6e74 2a20 656e 6445 7665 6e74 _event* endEvent │ │ │ │ +00023ea0: 3d4e 554c 4c29 3c73 7061 6e20 636c 6173 =NULL) con │ │ │ │ +00023ec0: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    1760< │ │ │ │ +00023f20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +00023f40: 3c61 2069 643d 226c 3031 3736 3122 206e 1761 return EvalPatches(srcBuffer-> │ │ │ │ +00024020: 3b42 696e 6443 4c42 7566 6665 7228 5f63 ;BindCLBuffer(_c │ │ │ │ +00024030: 6c43 6f6d 6d61 6e64 5175 6575 6529 2c20 lCommandQueue), │ │ │ │ +00024040: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ +00024050: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00024060: 3e3c 6120 6964 3d22 6c30 3137 3632 2220 > 1762 │ │ │ │ +000240b0: 2020 2020 2020 2020 2020 2020 2020 6473 ds │ │ │ │ +000240c0: 7442 7566 6665 722d 2667 743b 4269 6e64 tBuffer->Bind │ │ │ │ +000240d0: 434c 4275 6666 6572 285f 636c 436f 6d6d CLBuffer(_clComm │ │ │ │ +000240e0: 616e 6451 7565 7565 292c 2064 7374 4465 andQueue), dstDe │ │ │ │ +000240f0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1763 │ │ │ │ +00024150: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00024160: 2020 2020 2020 2020 2064 7542 7566 6665 duBuffe │ │ │ │ +00024170: 722d 2667 743b 4269 6e64 434c 4275 6666 r->BindCLBuff │ │ │ │ +00024180: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +00024190: 7565 292c 2064 7544 6573 632c 3c2f 6469 ue), duDesc,.
    1764 │ │ │ │ +000241f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00024200: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00024210: 2020 6476 4275 6666 6572 2d26 6774 3b42 dvBuffer->B │ │ │ │ +00024220: 696e 6443 4c42 7566 6665 7228 5f63 6c43 indCLBuffer(_clC │ │ │ │ +00024230: 6f6d 6d61 6e64 5175 6575 6529 2c20 6476 ommandQueue), dv │ │ │ │ +00024240: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +00024280: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00024290: 6e6f 223e 2031 3736 353c 2f73 7061 6e3e no"> 1765 │ │ │ │ +000242a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000242b0: 2020 2020 2020 2020 2020 206e 756d 5061 numPa │ │ │ │ +000242c0: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ +000242d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00024300: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1766 │ │ │ │ +00024330: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00024340: 7061 7463 6843 6f6f 7264 732d 2667 743b patchCoords-> │ │ │ │ +00024350: 4269 6e64 434c 4275 6666 6572 285f 636c BindCLBuffer(_cl │ │ │ │ +00024360: 436f 6d6d 616e 6451 7565 7565 292c 3c2f CommandQueue),.
    17 │ │ │ │ +000243c0: 3637 3c2f 7370 616e 3e20 2020 2020 2020 67 │ │ │ │ +000243d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000243e0: 2020 2020 7061 7463 6854 6162 6c65 2d26 patchTable-& │ │ │ │ +000243f0: 6774 3b47 6574 5661 7279 696e 6750 6174 gt;GetVaryingPat │ │ │ │ +00024400: 6368 4172 7261 7942 7566 6665 7228 292c chArrayBuffer(), │ │ │ │ +00024410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00024460: 3137 3638 3c2f 7370 616e 3e20 2020 2020 1768 │ │ │ │ +00024470: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00024480: 2020 2020 2020 7061 7463 6854 6162 6c65 patchTable │ │ │ │ +00024490: 2d26 6774 3b47 6574 5661 7279 696e 6750 ->GetVaryingP │ │ │ │ +000244a0: 6174 6368 496e 6465 7842 7566 6665 7228 atchIndexBuffer( │ │ │ │ +000244b0: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    1769 │ │ │ │ +00024510: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00024520: 2020 2020 2020 2020 7061 7463 6854 6162 patchTab │ │ │ │ +00024530: 6c65 2d26 6774 3b47 6574 5061 7463 6850 le->GetPatchP │ │ │ │ +00024540: 6172 616d 4275 6666 6572 2829 2c3c 2f64 aramBuffer(),.
    177 │ │ │ │ +000245a0: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ +000245b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000245c0: 2020 206e 756d 5374 6172 7445 7665 6e74 numStartEvent │ │ │ │ +000245d0: 732c 2073 7461 7274 4576 656e 7473 2c20 s, startEvents, │ │ │ │ +000245e0: 656e 6445 7665 6e74 293b 3c2f 6469 763e endEvent);
    │ │ │ │ +000245f0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ │ +00024650: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ │ +000246a0: 2031 3737 323c 2f73 7061 6e3e 203c 2f64 1772 .
    185 │ │ │ │ +00024700: 313c 2f73 7061 6e3e 2020 2020 3c73 7061 1 template <type │ │ │ │ +00024750: 6e61 6d65 3c2f 7370 616e 3e20 5352 435f name SRC_ │ │ │ │ +00024760: 4255 4646 4552 2c20 3c73 7061 6e20 636c BUFFER, ty │ │ │ │ +00024780: 7065 6e61 6d65 3c2f 7370 616e 3e20 4453 pename DS │ │ │ │ +00024790: 545f 4255 4646 4552 2c3c 2f64 6976 3e0a T_BUFFER,
    . │ │ │ │ +000247a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000247d0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1852 │ │ │ │ +00024800: 2020 3c73 7061 6e20 636c 6173 733d 226b typename │ │ │ │ +00024820: 3c2f 7370 616e 3e20 5041 5443 4843 4f4f PATCHCOO │ │ │ │ +00024830: 5244 5f42 5546 4645 522c 203c 7370 616e RD_BUFFER, typename │ │ │ │ +00024860: 2050 4154 4348 5f54 4142 4c45 2c3c 2f64 PATCH_TABLE,.
    185 │ │ │ │ +000248c0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +000248d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 type │ │ │ │ +000248f0: 6e61 6d65 3c2f 7370 616e 3e20 4445 5649 name DEVI │ │ │ │ +00024900: 4345 5f43 4f4e 5445 5854 2667 743b 3c2f CE_CONTEXT>.
    .
    1854 static │ │ │ │ +00024a20: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool EvalPatch │ │ │ │ +00024aa0: 6573 5661 7279 696e 673c 2f61 3e28 3c2f esVarying(.
    18 │ │ │ │ +00024b00: 3535 3c2f 7370 616e 3e20 2020 2020 2020 55 │ │ │ │ +00024b10: 2053 5243 5f42 5546 4645 5220 2a73 7263 SRC_BUFFER *src │ │ │ │ +00024b20: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ +00024b60: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +00024b80: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +00024b90: 703b 7372 6344 6573 632c 3c2f 6469 763e p;srcDesc,
    │ │ │ │ +00024ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00024bd0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1856 DST │ │ │ │ +00024c00: 5f42 5546 4645 5220 2a64 7374 4275 6666 _BUFFER *dstBuff │ │ │ │ +00024c10: 6572 2c20 3c61 2063 6c61 7373 3d22 636f er, BufferDescripto │ │ │ │ +00024c50: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00024c70: 743c 2f73 7061 6e3e 2026 616d 703b 6473 t &ds │ │ │ │ +00024c80: 7444 6573 632c 3c2f 6469 763e 0a3c 6469 tDesc,
    .< │ │ │ │ +00024ca0: 6120 6964 3d22 6c30 3138 3537 2220 6e61 a id="l01857" na │ │ │ │ +00024cb0: 6d65 3d22 6c30 3138 3537 223e 3c2f 613e me="l01857"> │ │ │ │ +00024cc0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1857 DST_BUF │ │ │ │ +00024cf0: 4645 5220 2a64 7542 7566 6665 722c 2020 FER *duBuffer, │ │ │ │ +00024d00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +00024d30: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &duDesc │ │ │ │ +00024d70: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00024dc0: 2031 3835 383c 2f73 7061 6e3e 2020 2020 1858 │ │ │ │ +00024dd0: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +00024de0: 6476 4275 6666 6572 2c20 203c 6120 636c dvBuffer, BufferDe │ │ │ │ +00024e20: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00024e50: 2661 6d70 3b64 7644 6573 632c 3c2f 6469 &dvDesc,.
    1859 │ │ │ │ +00024eb0: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ +00024ec0: 5354 5f42 5546 4645 5220 2a64 7575 4275 ST_BUFFER *duuBu │ │ │ │ +00024ed0: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ +00024f10: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00024f30: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ +00024f40: 6475 7544 6573 632c 3c2f 6469 763e 0a3c duuDesc,
    .< │ │ │ │ +00024f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00024f60: 3e3c 6120 6964 3d22 6c30 3138 3630 2220 > 1860
    DST_B │ │ │ │ +00024fb0: 5546 4645 5220 2a64 7576 4275 6666 6572 UFFER *duvBuffer │ │ │ │ +00024fc0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ +00024ff0: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00025000: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +00025020: 2f73 7061 6e3e 2026 616d 703b 6475 7644 /span> &duvD │ │ │ │ +00025030: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1861 │ │ │ │ +00025090: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ +000250a0: 5220 2a64 7676 4275 6666 6572 2c20 3c61 R *dvvBuffer, Buffe │ │ │ │ +000250e0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +000250f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dvvDesc, │ │ │ │ +00025120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00025170: 3138 3632 3c2f 7370 616e 3e20 2020 2020 1862 │ │ │ │ +00025180: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +000251a0: 3c2f 7370 616e 3e20 6e75 6d50 6174 6368 numPatch │ │ │ │ +000251b0: 436f 6f72 6473 2c3c 2f64 6976 3e0a 3c64 Coords,
    . │ │ │ │ +000251d0: 3c61 2069 643d 226c 3031 3836 3322 206e 1863 PATCHC │ │ │ │ +00025220: 4f4f 5244 5f42 5546 4645 5220 2a70 6174 OORD_BUFFER *pat │ │ │ │ +00025230: 6368 436f 6f72 6473 2c3c 2f64 6976 3e0a chCoords,
    . │ │ │ │ +00025240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    1865 │ │ │ │ +00025310: 2020 2020 2020 203c 6120 636c 6173 733d CLEvaluator const *instance, │ │ │ │ +00025380: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000253d0: 3138 3636 3c2f 7370 616e 3e20 2020 2020 1866 │ │ │ │ +000253e0: 2020 2044 4556 4943 455f 434f 4e54 4558 DEVICE_CONTEX │ │ │ │ +000253f0: 5420 6465 7669 6365 436f 6e74 6578 742c T deviceContext, │ │ │ │ +00025400: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00025450: 3138 3637 3c2f 7370 616e 3e20 2020 2020 1867 │ │ │ │ +00025460: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns │ │ │ │ +00025480: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int numStartEvents │ │ │ │ +000254c0: 3d30 2c3c 2f64 6976 3e0a 3c64 6976 2063 =0,
    .
    1868 │ │ │ │ +00025520: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ +00025540: 743c 2f73 7061 6e3e 2063 6c5f 6576 656e t cl_even │ │ │ │ +00025550: 742a 2073 7461 7274 4576 656e 7473 3d4e t* startEvents=N │ │ │ │ +00025560: 554c 4c2c 3c2f 6469 763e 0a3c 6469 7620 ULL,
    .
    1869 │ │ │ │ +000255c0: 2020 2020 2020 2063 6c5f 6576 656e 742a cl_event* │ │ │ │ +000255d0: 2065 6e64 4576 656e 743d 4e55 4c4c 2920 endEvent=NULL) │ │ │ │ +000255e0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00025630: 2031 3837 303c 2f73 7061 6e3e 203c 2f64 1870 .
    187 │ │ │ │ +00025690: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +000256a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (instance) { │ │ │ │ +000256d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00025720: 3138 3732 3c2f 7370 616e 3e20 2020 2020 1872 │ │ │ │ +00025730: 2020 2020 2020 203c 7370 616e 2063 6c61 return i │ │ │ │ +00025760: 6e73 7461 6e63 652d 2667 743b 3c61 2063 nstance->Eva │ │ │ │ +000257c0: 6c50 6174 6368 6573 5661 7279 696e 673c lPatchesVarying< │ │ │ │ +000257d0: 2f61 3e28 3c2f 6469 763e 0a3c 6469 7620 /a>(
    .
    1873 │ │ │ │ +00025830: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025840: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025850: 2020 2020 2020 2020 7372 6342 7566 6665 srcBuffe │ │ │ │ +00025860: 722c 2073 7263 4465 7363 2c3c 2f64 6976 r, srcDesc,
    .
    1874< │ │ │ │ +000258c0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000258d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000258e0: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +000258f0: 7374 4275 6666 6572 2c20 6473 7444 6573 stBuffer, dstDes │ │ │ │ +00025900: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    1875 │ │ │ │ +00025960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025970: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025980: 2020 2020 2020 6475 4275 6666 6572 2c20 duBuffer, │ │ │ │ +00025990: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ +000259b0: 3c61 2069 643d 226c 3031 3837 3622 206e 1876 │ │ │ │ +00025a00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025a10: 2020 2020 2020 2020 2020 2064 7642 7566 dvBuf │ │ │ │ +00025a20: 6665 722c 2064 7644 6573 632c 3c2f 6469 fer, dvDesc,.
    1877 │ │ │ │ +00025a80: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00025a90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025aa0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025ab0: 6475 7542 7566 6665 722c 2064 7575 4465 duuBuffer, duuDe │ │ │ │ +00025ac0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1878 │ │ │ │ +00025b20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025b30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025b40: 2020 2020 2020 2064 7576 4275 6666 6572 duvBuffer │ │ │ │ +00025b50: 2c20 6475 7644 6573 632c 3c2f 6469 763e , duvDesc,
    │ │ │ │ +00025b60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00025b90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1879 │ │ │ │ +00025bc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025bd0: 2020 2020 2020 2020 2020 2020 2020 6476 dv │ │ │ │ +00025be0: 7642 7566 6665 722c 2064 7676 4465 7363 vBuffer, dvvDesc │ │ │ │ +00025bf0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00025c40: 2031 3838 303c 2f73 7061 6e3e 2020 2020 1880 │ │ │ │ +00025c50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025c60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025c70: 2020 2020 206e 756d 5061 7463 6843 6f6f numPatchCoo │ │ │ │ +00025c80: 7264 732c 2070 6174 6368 436f 6f72 6473 rds, patchCoords │ │ │ │ +00025c90: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00025ce0: 2031 3838 313c 2f73 7061 6e3e 2020 2020 1881 │ │ │ │ +00025cf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025d00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025d10: 2020 2020 2070 6174 6368 5461 626c 652c patchTable, │ │ │ │ +00025d20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00025d70: 3138 3832 3c2f 7370 616e 3e20 2020 2020 1882 │ │ │ │ +00025d80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025d90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00025da0: 2020 2020 6e75 6d53 7461 7274 4576 656e numStartEven │ │ │ │ +00025db0: 7473 2c20 7374 6172 7445 7665 6e74 732c ts, startEvents, │ │ │ │ +00025dc0: 2065 6e64 4576 656e 7429 3b3c 2f64 6976 endEvent);
    .
    1883< │ │ │ │ +00025e20: 2f73 7061 6e3e 2020 2020 2020 2020 7d20 /span> } │ │ │ │ +00025e30: 3c73 7061 6e20 636c 6173 733d 226b 6579 else {
    . │ │ │ │ +00025e70: 3c61 2069 643d 226c 3031 3838 3422 206e 1884 // Create an │ │ │ │ +00025ee0: 2069 6e73 7461 6e63 6520 6f6e 2064 656d instance on dem │ │ │ │ +00025ef0: 616e 6420 2873 6c6f 7729 3c2f 7370 616e and (slow)
    .
    │ │ │ │ +00025f50: 2031 3838 353c 2f73 7061 6e3e 2020 2020 1885 │ │ │ │ +00025f60: 2020 2020 2020 2020 2876 6f69 6429 6465 (void)de │ │ │ │ +00025f70: 7669 6365 436f 6e74 6578 743b 2020 3c73 viceContext; // unused
    .
    1886 │ │ │ │ +00026000: 2020 2020 2020 2020 2020 2069 6e73 7461 insta │ │ │ │ +00026010: 6e63 6520 3d20 3c61 2063 6c61 7373 3d22 nce = Create(srcDesc, dstDe │ │ │ │ +00026080: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1887 │ │ │ │ +000260e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000260f0: 2020 2020 2020 2020 2020 2020 6475 4465 duDe │ │ │ │ +00026100: 7363 2c20 6476 4465 7363 2c3c 2f64 6976 sc, dvDesc,
    .
    1888< │ │ │ │ +00026160: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00026170: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026180: 2020 2020 6475 7544 6573 632c 2064 7576 duuDesc, duv │ │ │ │ +00026190: 4465 7363 2c20 6476 7644 6573 632c 3c2f Desc, dvvDesc,.
    18 │ │ │ │ +000261f0: 3839 3c2f 7370 616e 3e20 2020 2020 2020 89 │ │ │ │ +00026200: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026210: 2020 2020 2020 2064 6576 6963 6543 6f6e deviceCon │ │ │ │ +00026220: 7465 7874 293b 3c2f 6469 763e 0a3c 6469 text);
    .< │ │ │ │ +00026240: 6120 6964 3d22 6c30 3138 3930 2220 6e61 a id="l01890" na │ │ │ │ +00026250: 6d65 3d22 6c30 3138 3930 223e 3c2f 613e me="l01890"> │ │ │ │ +00026260: 3c73 7061 6e20 636c 6173 733d 226c 696e 1890 if
    │ │ │ │ +000262b0: 2028 696e 7374 616e 6365 2920 7b3c 2f64 (instance) {.
    189 │ │ │ │ +00026310: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +00026320: 2020 2020 2020 2020 3c73 7061 6e20 636c bool r │ │ │ │ +00026350: 3d20 696e 7374 616e 6365 2d26 6774 3b3c = instance->< │ │ │ │ +00026360: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00026370: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00026380: 2261 3031 3134 312e 6874 6d6c 2361 3932 "a01141.html#a92 │ │ │ │ +00026390: 3764 3861 6165 3836 3833 3233 6435 3230 7d8aae868323d520 │ │ │ │ +000263a0: 3862 3165 3935 6332 3539 3161 6431 223e 8b1e95c2591ad1"> │ │ │ │ +000263b0: 4576 616c 5061 7463 6865 7356 6172 7969 EvalPatchesVaryi │ │ │ │ +000263c0: 6e67 3c2f 613e 283c 2f64 6976 3e0a 3c64 ng(
    . │ │ │ │ +000263e0: 3c61 2069 643d 226c 3031 3839 3222 206e 1892 │ │ │ │ +00026430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026440: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026450: 2073 7263 4275 6666 6572 2c20 7372 6344 srcBuffer, srcD │ │ │ │ +00026460: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1893 │ │ │ │ +000264c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000264d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000264e0: 2020 2020 2020 2020 2020 2020 2020 6473 ds │ │ │ │ +000264f0: 7442 7566 6665 722c 2064 7374 4465 7363 tBuffer, dstDesc │ │ │ │ +00026500: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00026550: 2031 3839 343c 2f73 7061 6e3e 2020 2020 1894 │ │ │ │ +00026560: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026580: 2020 2020 2020 2020 2020 2064 7542 7566 duBuf │ │ │ │ +00026590: 6665 722c 2064 7544 6573 632c 3c2f 6469 fer, duDesc,.
    1895 │ │ │ │ +000265f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00026600: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026610: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026620: 2020 2020 2020 6476 4275 6666 6572 2c20 dvBuffer, │ │ │ │ +00026630: 6476 4465 7363 2c3c 2f64 6976 3e0a 3c64 dvDesc,
    . │ │ │ │ +00026650: 3c61 2069 643d 226c 3031 3839 3622 206e 1896 │ │ │ │ +000266a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000266b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000266c0: 2064 7575 4275 6666 6572 2c20 6475 7544 duuBuffer, duuD │ │ │ │ +000266d0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1897 │ │ │ │ +00026730: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026740: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026750: 2020 2020 2020 2020 2020 2020 2020 6475 du │ │ │ │ +00026760: 7642 7566 6665 722c 2064 7576 4465 7363 vBuffer, duvDesc │ │ │ │ +00026770: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +000267c0: 2031 3839 383c 2f73 7061 6e3e 2020 2020 1898 │ │ │ │ +000267d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000267e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000267f0: 2020 2020 2020 2020 2020 2064 7676 4275 dvvBu │ │ │ │ +00026800: 6666 6572 2c20 6476 7644 6573 632c 3c2f ffer, dvvDesc,.
    18 │ │ │ │ +00026860: 3939 3c2f 7370 616e 3e20 2020 2020 2020 99 │ │ │ │ +00026870: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026880: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026890: 2020 2020 2020 2020 6e75 6d50 6174 6368 numPatch │ │ │ │ +000268a0: 436f 6f72 6473 2c20 7061 7463 6843 6f6f Coords, patchCoo │ │ │ │ +000268b0: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    1900 │ │ │ │ +00026910: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026920: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00026930: 2020 2020 2020 2020 2020 2020 2020 7061 pa │ │ │ │ +00026940: 7463 6854 6162 6c65 2c3c 2f64 6976 3e0a tchTable,
    . │ │ │ │ +00026950: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 │ │ │ │ +00026a00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00026a30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1902 │ │ │ │ +00026a60: 2020 2020 203c 7370 616e 2063 6c61 7373 delet │ │ │ │ +00026a80: 653c 2f73 7061 6e3e 2069 6e73 7461 6e63 e instanc │ │ │ │ +00026a90: 653b 3c2f 6469 763e 0a3c 6469 7620 636c e;
    .
    1903 │ │ │ │ +00026af0: 2020 2020 2020 2020 2020 2020 203c 7370 return r;
    . │ │ │ │ +00026b40: 3c61 2069 643d 226c 3031 3930 3422 206e 1904 }< │ │ │ │ +00026b90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +00026be0: 3930 353c 2f73 7061 6e3e 2020 2020 2020 905 │ │ │ │ +00026bf0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +00026c10: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return false │ │ │ │ +00026c40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00026c90: 2031 3930 363c 2f73 7061 6e3e 2020 2020 1906 │ │ │ │ +00026ca0: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    .
    < │ │ │ │ +00026ce0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00026cf0: 6e6f 223e 2031 3930 373c 2f73 7061 6e3e no"> 1907 │ │ │ │ +00026d00: 2020 2020 7d3c 2f64 6976 3e0a 3c2f 6469 }
    ..
    1908 │ │ │ │ +00026d60: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00026d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00026d80: 3e3c 6120 6964 3d22 6c30 3139 3736 2220 > 1976 tem │ │ │ │ +00026de0: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ +00026df0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ +00026e10: 2f73 7061 6e3e 2053 5243 5f42 5546 4645 /span> SRC_BUFFE │ │ │ │ +00026e20: 522c 203c 7370 616e 2063 6c61 7373 3d22 R, typenam │ │ │ │ +00026e40: 653c 2f73 7061 6e3e 2044 5354 5f42 5546 e DST_BUF │ │ │ │ +00026e50: 4645 522c 3c2f 6469 763e 0a3c 6469 7620 FER,
    .
    1977 │ │ │ │ +00026eb0: 2020 2020 2020 2020 2020 2020 203c 7370 typename PATCHCOORD_BU │ │ │ │ +00026ef0: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ +00026f10: 6e61 6d65 3c2f 7370 616e 3e20 5041 5443 name PATC │ │ │ │ +00026f20: 485f 5441 424c 4526 6774 3b3c 2f64 6976 H_TABLE>
    .
    .
    │ │ │ │ +00026fc0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 1978 bool < │ │ │ │ +00027040: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00027050: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00027060: 2261 3031 3134 312e 6874 6d6c 2361 3232 "a01141.html#a22 │ │ │ │ +00027070: 3233 3432 6132 3538 3164 6338 6136 3336 2342a2581dc8a636 │ │ │ │ +00027080: 3661 3136 3538 3962 3331 3639 3539 223e 6a16589b316959"> │ │ │ │ +00027090: 4576 616c 5061 7463 6865 7356 6172 7969 EvalPatchesVaryi │ │ │ │ +000270a0: 6e67 3c2f 613e 283c 2f64 6976 3e0a 3c64 ng(
    . │ │ │ │ +000270c0: 3c61 2069 643d 226c 3031 3937 3922 206e 1979 SRC_BU │ │ │ │ +00027110: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ +00027120: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +00027150: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ +00027190: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    1980 │ │ │ │ +000271f0: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +00027200: 202a 6473 7442 7566 6665 722c 203c 6120 *dstBuffer, Buffer │ │ │ │ +00027240: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +00027250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00027260: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dstDesc,< │ │ │ │ +00027280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ +000272d0: 3938 313c 2f73 7061 6e3e 2020 2020 2020 981 │ │ │ │ +000272e0: 2020 4453 545f 4255 4646 4552 202a 6475 DST_BUFFER *du │ │ │ │ +000272f0: 4275 6666 6572 2c20 203c 6120 636c 6173 Buffer, BufferDesc │ │ │ │ +00027330: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +00027360: 6d70 3b64 7544 6573 632c 3c2f 6469 763e mp;duDesc,
    │ │ │ │ +00027370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000273a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1982 DST │ │ │ │ +000273d0: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ +000273e0: 722c 2020 3c61 2063 6c61 7373 3d22 636f r, BufferDescripto │ │ │ │ +00027420: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00027440: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ +00027450: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +00027490: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000274a0: 6e6f 223e 2031 3938 333c 2f73 7061 6e3e no"> 1983 │ │ │ │ +000274b0: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ +000274c0: 4552 202a 6475 7542 7566 6665 722c 203c ER *duuBuffer, < │ │ │ │ +000274d0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +000274e0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +000274f0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00027500: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00027510: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duuDesc │ │ │ │ +00027540: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00027590: 2031 3938 343c 2f73 7061 6e3e 2020 2020 1984 │ │ │ │ +000275a0: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +000275b0: 6475 7642 7566 6665 722c 203c 6120 636c duvBuffer, BufferDe │ │ │ │ +000275f0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00027620: 2661 6d70 3b64 7576 4465 7363 2c3c 2f64 &duvDesc,.
    198 │ │ │ │ +00027680: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ │ +00027690: 4453 545f 4255 4646 4552 202a 6476 7642 DST_BUFFER *dvvB │ │ │ │ +000276a0: 7566 6665 722c 203c 6120 636c 6173 733d uffer, BufferDescri │ │ │ │ +000276e0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +00027700: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +00027710: 3b64 7676 4465 7363 2c3c 2f64 6976 3e0a ;dvvDesc,
    . │ │ │ │ +00027720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00027800: 3139 3837 3c2f 7370 616e 3e20 2020 2020 1987 │ │ │ │ +00027810: 2020 2050 4154 4348 434f 4f52 445f 4255 PATCHCOORD_BU │ │ │ │ +00027820: 4646 4552 202a 7061 7463 6843 6f6f 7264 FFER *patchCoord │ │ │ │ +00027830: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    1988 │ │ │ │ +00027890: 2020 2020 2050 4154 4348 5f54 4142 4c45 PATCH_TABLE │ │ │ │ +000278a0: 202a 7061 7463 6854 6162 6c65 2c3c 2f64 *patchTable,.
    198 │ │ │ │ +00027900: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +00027910: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +00027930: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +00027960: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +00027970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000279c0: 3139 3930 3c2f 7370 616e 3e20 2020 2020 1990 │ │ │ │ +000279d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +00027a00: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +00027a10: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00027a60: 2031 3939 313c 2f73 7061 6e3e 2020 2020 1991 │ │ │ │ +00027a70: 2020 2020 636c 5f65 7665 6e74 2a20 656e cl_event* en │ │ │ │ +00027a80: 6445 7665 6e74 3d4e 554c 4c29 3c73 7061 dEvent=NULL) const │ │ │ │ +00027ab0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00027b00: 2031 3939 323c 2f73 7061 6e3e 203c 2f64 1992 .
    199 │ │ │ │ +00027b60: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00027b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +00027b90: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 EvalPat │ │ │ │ +00027bf0: 6368 6573 3c2f 613e 2873 7263 4275 6666 ches(srcBuff │ │ │ │ +00027c00: 6572 2d26 6774 3b42 696e 6443 4c42 7566 er->BindCLBuf │ │ │ │ +00027c10: 6665 7228 5f63 6c43 6f6d 6d61 6e64 5175 fer(_clCommandQu │ │ │ │ +00027c20: 6575 6529 2c20 7372 6344 6573 632c 3c2f eue), srcDesc,.
    19 │ │ │ │ +00027c80: 3934 3c2f 7370 616e 3e20 2020 2020 2020 94 │ │ │ │ +00027c90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027ca0: 2020 2020 6473 7442 7566 6665 722d 2667 dstBuffer-&g │ │ │ │ +00027cb0: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +00027cc0: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +00027cd0: 2064 7374 4465 7363 2c3c 2f64 6976 3e0a dstDesc,
    . │ │ │ │ +00027ce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1996 │ │ │ │ +00027de0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027df0: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +00027e00: 2d26 6774 3b42 696e 6443 4c42 7566 6665 ->BindCLBuffe │ │ │ │ +00027e10: 7228 5f63 6c43 6f6d 6d61 6e64 5175 6575 r(_clCommandQueu │ │ │ │ +00027e20: 6529 2c20 6476 4465 7363 2c3c 2f64 6976 e), dvDesc,
    .
    1997< │ │ │ │ +00027e80: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00027e90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027ea0: 2064 7575 4275 6666 6572 2d26 6774 3b42 duuBuffer->B │ │ │ │ +00027eb0: 696e 6443 4c42 7566 6665 7228 5f63 6c43 indCLBuffer(_clC │ │ │ │ +00027ec0: 6f6d 6d61 6e64 5175 6575 6529 2c20 6475 ommandQueue), du │ │ │ │ +00027ed0: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ +00027ef0: 6120 6964 3d22 6c30 3139 3938 2220 6e61 a id="l01998" na │ │ │ │ +00027f00: 6d65 3d22 6c30 3139 3938 223e 3c2f 613e me="l01998"> │ │ │ │ +00027f10: 3c73 7061 6e20 636c 6173 733d 226c 696e 1998 │ │ │ │ +00027f40: 2020 2020 2020 2020 2020 2020 6475 7642 duvB │ │ │ │ +00027f50: 7566 6665 722d 2667 743b 4269 6e64 434c uffer->BindCL │ │ │ │ +00027f60: 4275 6666 6572 285f 636c 436f 6d6d 616e Buffer(_clComman │ │ │ │ +00027f70: 6451 7565 7565 292c 2064 7576 4465 7363 dQueue), duvDesc │ │ │ │ +00027f80: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00027fd0: 2031 3939 393c 2f73 7061 6e3e 2020 2020 1999 │ │ │ │ +00027fe0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027ff0: 2020 2020 2020 2064 7676 4275 6666 6572 dvvBuffer │ │ │ │ +00028000: 2d26 6774 3b42 696e 6443 4c42 7566 6665 ->BindCLBuffe │ │ │ │ +00028010: 7228 5f63 6c43 6f6d 6d61 6e64 5175 6575 r(_clCommandQueu │ │ │ │ +00028020: 6529 2c20 6476 7644 6573 632c 3c2f 6469 e), dvvDesc,.
    2000 │ │ │ │ +00028080: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00028090: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000280a0: 2020 6e75 6d50 6174 6368 436f 6f72 6473 numPatchCoords │ │ │ │ +000280b0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00028100: 2032 3030 313c 2f73 7061 6e3e 2020 2020 2001 │ │ │ │ +00028110: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00028120: 2020 2020 2020 2070 6174 6368 436f 6f72 patchCoor │ │ │ │ +00028130: 6473 2d26 6774 3b42 696e 6443 4c42 7566 ds->BindCLBuf │ │ │ │ +00028140: 6665 7228 5f63 6c43 6f6d 6d61 6e64 5175 fer(_clCommandQu │ │ │ │ +00028150: 6575 6529 2c3c 2f64 6976 3e0a 3c64 6976 eue),
    .
    < │ │ │ │ +00028190: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000281a0: 6e6f 223e 2032 3030 323c 2f73 7061 6e3e no"> 2002 │ │ │ │ +000281b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000281c0: 2020 2020 2020 2020 2020 2070 6174 6368 patch │ │ │ │ +000281d0: 5461 626c 652d 2667 743b 4765 7456 6172 Table->GetVar │ │ │ │ +000281e0: 7969 6e67 5061 7463 6841 7272 6179 4275 yingPatchArrayBu │ │ │ │ +000281f0: 6666 6572 2829 2c3c 2f64 6976 3e0a 3c64 ffer(),
    . │ │ │ │ +00028210: 3c61 2069 643d 226c 3032 3030 3322 206e 2003 │ │ │ │ +00028260: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ +00028270: 6368 5461 626c 652d 2667 743b 4765 7456 chTable->GetV │ │ │ │ +00028280: 6172 7969 6e67 5061 7463 6849 6e64 6578 aryingPatchIndex │ │ │ │ +00028290: 4275 6666 6572 2829 2c3c 2f64 6976 3e0a Buffer(),
    . │ │ │ │ +000282a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    2005 │ │ │ │ +00028390: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000283a0: 2020 2020 2020 2020 2020 6e75 6d53 7461 numSta │ │ │ │ +000283b0: 7274 4576 656e 7473 2c20 7374 6172 7445 rtEvents, startE │ │ │ │ +000283c0: 7665 6e74 732c 2065 6e64 4576 656e 7429 vents, endEvent) │ │ │ │ +000283d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00028420: 2032 3030 363c 2f73 7061 6e3e 2020 2020 2006 │ │ │ │ +00028430: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ │ +00028440: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00028450: 3e3c 6120 6964 3d22 6c30 3230 3037 2220 > 2007
    .
    2058 │ │ │ │ +000284f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ │ +00028510: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename SRC_BUFFER, < │ │ │ │ +00028550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00028560: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename DST_BUFFER, │ │ │ │ +00028580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000285d0: 3230 3539 3c2f 7370 616e 3e20 2020 2020 2059 │ │ │ │ +000285e0: 2020 2020 2020 2020 203c 7370 616e 2063 t │ │ │ │ +00028600: 7970 656e 616d 653c 2f73 7061 6e3e 2050 ypename P │ │ │ │ +00028610: 4154 4348 434f 4f52 445f 4255 4646 4552 ATCHCOORD_BUFFER │ │ │ │ +00028620: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ +00028640: 3c2f 7370 616e 3e20 5041 5443 485f 5441 PATCH_TA │ │ │ │ +00028650: 424c 452c 3c2f 6469 763e 0a3c 6469 7620 BLE,
    .
    2060 │ │ │ │ +000286b0: 2020 2020 2020 2020 2020 2020 203c 7370 typename DEVICE_CONTEX │ │ │ │ +000286f0: 5426 6774 3b3c 2f64 6976 3e0a 3c64 6976 T>
    .
    .
    │ │ │ │ +000287d0: 3230 3631 3c2f 613e 3c2f 7370 616e 3e20 2061 │ │ │ │ +000287e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 static< │ │ │ │ +00028800: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bool Ev │ │ │ │ +00028880: 616c 5061 7463 6865 7346 6163 6556 6172 alPatchesFaceVar │ │ │ │ +00028890: 7969 6e67 3c2f 613e 283c 2f64 6976 3e0a ying(
    . │ │ │ │ +000288a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +000289c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000289d0: 6e6f 223e 2032 3036 333c 2f73 7061 6e3e no"> 2063 │ │ │ │ +000289e0: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ +000289f0: 4552 202a 6473 7442 7566 6665 722c 203c ER *dstBuffer, < │ │ │ │ +00028a00: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00028a10: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00028a20: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00028a30: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00028a40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dstDesc │ │ │ │ +00028a70: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00028ac0: 2032 3036 343c 2f73 7061 6e3e 2020 2020 2064 │ │ │ │ +00028ad0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ +00028af0: 743c 2f73 7061 6e3e 206e 756d 5061 7463 t numPatc │ │ │ │ +00028b00: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ +00028b10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00028b20: 3e3c 6120 6964 3d22 6c30 3230 3635 2220 > 2065 PATCH │ │ │ │ +00028b70: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ +00028b80: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ +00028b90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00028bc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2066 PAT │ │ │ │ +00028bf0: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ +00028c00: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ +00028c40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00028c50: 6e6f 223e 2032 3036 373c 2f73 7061 6e3e no"> 2067 │ │ │ │ +00028c60: 2020 2020 2020 2020 3c73 7061 6e20 636c int fva │ │ │ │ +00028c90: 7243 6861 6e6e 656c 2c3c 2f64 6976 3e0a rChannel,
    . │ │ │ │ +00028ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00028cd0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2068 CLEvalua │ │ │ │ +00028d30: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ +00028d50: 6e73 743c 2f73 7061 6e3e 202a 696e 7374 nst *inst │ │ │ │ +00028d60: 616e 6365 2c3c 2f64 6976 3e0a 3c64 6976 ance,
    .
    < │ │ │ │ +00028da0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00028db0: 6e6f 223e 2032 3036 393c 2f73 7061 6e3e no"> 2069 │ │ │ │ +00028dc0: 2020 2020 2020 2020 4445 5649 4345 5f43 DEVICE_C │ │ │ │ +00028dd0: 4f4e 5445 5854 2064 6576 6963 6543 6f6e ONTEXT deviceCon │ │ │ │ +00028de0: 7465 7874 2c3c 2f64 6976 3e0a 3c64 6976 text,
    .
    < │ │ │ │ +00028e20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00028e30: 6e6f 223e 2032 3037 303c 2f73 7061 6e3e no"> 2070 │ │ │ │ +00028e40: 2020 2020 2020 2020 3c73 7061 6e20 636c unsigned int< │ │ │ │ +00028e90: 2f73 7061 6e3e 206e 756d 5374 6172 7445 /span> numStartE │ │ │ │ +00028ea0: 7665 6e74 733d 302c 3c2f 6469 763e 0a3c vents=0,
    .< │ │ │ │ +00028eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00028ec0: 3e3c 6120 6964 3d22 6c30 3230 3731 2220 > 2071 const cl │ │ │ │ +00028f30: 5f65 7665 6e74 2a20 7374 6172 7445 7665 _event* startEve │ │ │ │ +00028f40: 6e74 733d 4e55 4c4c 2c3c 2f64 6976 3e0a nts=NULL,
    . │ │ │ │ +00028f50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00028fe0: 6120 6964 3d22 6c30 3230 3733 2220 6e61 a id="l02073" na │ │ │ │ +00028ff0: 6d65 3d22 6c30 3230 3733 223e 3c2f 613e me="l02073"> │ │ │ │ +00029000: 3c73 7061 6e20 636c 6173 733d 226c 696e 2073
    .
    2074 │ │ │ │ +00029080: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +000290a0: 663c 2f73 7061 6e3e 2028 696e 7374 616e f (instan │ │ │ │ +000290b0: 6365 2920 7b3c 2f64 6976 3e0a 3c64 6976 ce) {
    .
    < │ │ │ │ +000290f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00029100: 6e6f 223e 2032 3037 353c 2f73 7061 6e3e no"> 2075 │ │ │ │ +00029110: 2020 2020 2020 2020 2020 2020 3c73 7061 return instance-> │ │ │ │ +00029150: 3b3c 6120 636c 6173 733d 2263 6f64 6520 ;EvalPatchesFac │ │ │ │ +000291b0: 6556 6172 7969 6e67 3c2f 613e 283c 2f64 eVarying(.
    207 │ │ │ │ +00029210: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ +00029220: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029230: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029240: 2073 7263 4275 6666 6572 2c20 7372 6344 srcBuffer, srcD │ │ │ │ +00029250: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    2077 │ │ │ │ +000292b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000292c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000292d0: 2020 2020 2020 2020 6473 7442 7566 6665 dstBuffe │ │ │ │ +000292e0: 722c 2064 7374 4465 7363 2c3c 2f64 6976 r, dstDesc,
    .
    2078< │ │ │ │ +00029340: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00029350: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029360: 2020 2020 2020 2020 2020 2020 2020 206e n │ │ │ │ +00029370: 756d 5061 7463 6843 6f6f 7264 732c 2070 umPatchCoords, p │ │ │ │ +00029380: 6174 6368 436f 6f72 6473 2c3c 2f64 6976 atchCoords,
    .
    2079< │ │ │ │ +000293e0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000293f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029400: 2020 2020 2020 2020 2020 2020 2020 2070 p │ │ │ │ +00029410: 6174 6368 5461 626c 652c 2066 7661 7243 atchTable, fvarC │ │ │ │ +00029420: 6861 6e6e 656c 2c3c 2f64 6976 3e0a 3c64 hannel,
    . │ │ │ │ +00029440: 3c61 2069 643d 226c 3032 3038 3022 206e 2080
    │ │ │ │ +00029490: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000294a0: 2020 2020 2020 2020 2020 206e 756d 5374 numSt │ │ │ │ +000294b0: 6172 7445 7665 6e74 732c 2073 7461 7274 artEvents, start │ │ │ │ +000294c0: 4576 656e 7473 2c20 656e 6445 7665 6e74 Events, endEvent │ │ │ │ +000294d0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    2081 │ │ │ │ +00029530: 2020 2020 207d 203c 7370 616e 2063 6c61 } else {.
    20 │ │ │ │ +000295b0: 3832 3c2f 7370 616e 3e20 2020 2020 2020 82 │ │ │ │ +000295c0: 2020 2020 203c 7370 616e 2063 6c61 7373 // Cr │ │ │ │ +000295e0: 6561 7465 2061 6e20 696e 7374 616e 6365 eate an instance │ │ │ │ +000295f0: 206f 6e20 6465 6d61 6e64 2028 736c 6f77 on demand (slow │ │ │ │ +00029600: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ │ +00029610: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00029620: 3e3c 6120 6964 3d22 6c30 3230 3833 2220 > 2083 ( │ │ │ │ +00029670: 766f 6964 2964 6576 6963 6543 6f6e 7465 void)deviceConte │ │ │ │ +00029680: 7874 3b20 203c 7370 616e 2063 6c61 7373 xt; // un │ │ │ │ +000296a0: 7573 6564 3c2f 7370 616e 3e3c 2f64 6976 used
    .
    2084< │ │ │ │ +00029700: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00029710: 2020 696e 7374 616e 6365 203d 203c 6120 instance = Cr │ │ │ │ +00029770: 6561 7465 3c2f 613e 2873 7263 4465 7363 eate(srcDesc │ │ │ │ +00029780: 2c20 6473 7444 6573 632c 3c2f 6469 763e , dstDesc,
    │ │ │ │ +00029790: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ +00029860: 3c61 2069 643d 226c 3032 3038 3622 206e 2086 │ │ │ │ +000298b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000298c0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +000298f0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor(),
    .
    2087 │ │ │ │ +00029960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029970: 2020 2020 2020 2020 2020 2020 2064 6576 dev │ │ │ │ +00029980: 6963 6543 6f6e 7465 7874 293b 3c2f 6469 iceContext);.
    2088 │ │ │ │ +000299e0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +000299f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +00029a10: 2f73 7061 6e3e 2028 696e 7374 616e 6365 /span> (instance │ │ │ │ +00029a20: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    2089 │ │ │ │ +00029a80: 2020 2020 2020 2020 2020 2020 2020 3c73 bool r = instance │ │ │ │ +00029ac0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->EvalPatche │ │ │ │ +00029b20: 7346 6163 6556 6172 7969 6e67 3c2f 613e sFaceVarying │ │ │ │ +00029b30: 283c 2f64 6976 3e0a 3c64 6976 2063 6c61 (
    .
    │ │ │ │ +00029b80: 2032 3039 303c 2f73 7061 6e3e 2020 2020 2090 │ │ │ │ +00029b90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029ba0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029bb0: 2020 2020 2020 2020 2020 2073 7263 4275 srcBu │ │ │ │ +00029bc0: 6666 6572 2c20 7372 6344 6573 632c 3c2f ffer, srcDesc,.
    20 │ │ │ │ +00029c20: 3931 3c2f 7370 616e 3e20 2020 2020 2020 91 │ │ │ │ +00029c30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029c40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029c50: 2020 2020 2020 2020 6473 7442 7566 6665 dstBuffe │ │ │ │ +00029c60: 722c 2064 7374 4465 7363 2c3c 2f64 6976 r, dstDesc,
    .
    2092< │ │ │ │ +00029cc0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00029cd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029ce0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029cf0: 2020 2020 206e 756d 5061 7463 6843 6f6f numPatchCoo │ │ │ │ +00029d00: 7264 732c 2070 6174 6368 436f 6f72 6473 rds, patchCoords │ │ │ │ +00029d10: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00029d60: 2032 3039 333c 2f73 7061 6e3e 2020 2020 2093 │ │ │ │ +00029d70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029d80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029d90: 2020 2020 2020 2020 2020 2070 6174 6368 patch │ │ │ │ +00029da0: 5461 626c 652c 2066 7661 7243 6861 6e6e Table, fvarChann │ │ │ │ +00029db0: 656c 2c3c 2f64 6976 3e0a 3c64 6976 2063 el,
    .
    2094 │ │ │ │ +00029e10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029e20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00029e30: 2020 2020 2020 2020 2020 2020 206e 756d num │ │ │ │ +00029e40: 5374 6172 7445 7665 6e74 732c 2073 7461 StartEvents, sta │ │ │ │ +00029e50: 7274 4576 656e 7473 2c20 656e 6445 7665 rtEvents, endEve │ │ │ │ +00029e60: 6e74 293b 3c2f 6469 763e 0a3c 6469 7620 nt);
    .
    2095 │ │ │ │ +00029ec0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00029ed0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00029ee0: 6f72 6422 3e64 656c 6574 653c 2f73 7061 ord">delete instance;.
    2096 │ │ │ │ +00029f50: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00029f60: 2020 2020 2020 203c 7370 616e 2063 6c61 return r │ │ │ │ +00029f90: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00029fe0: 2032 3039 373c 2f73 7061 6e3e 2020 2020 2097 │ │ │ │ +00029ff0: 2020 2020 2020 2020 7d3c 2f64 6976 3e0a }
    . │ │ │ │ +0002a000: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    2099< │ │ │ │ +0002a100: 2f73 7061 6e3e 2020 2020 2020 2020 7d3c /span> }< │ │ │ │ +0002a110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002a160: 3130 303c 2f73 7061 6e3e 2020 2020 7d3c 100 }< │ │ │ │ +0002a170: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ │ +0002a190: 6120 6964 3d22 6c30 3231 3031 2220 6e61 a id="l02101" na │ │ │ │ +0002a1a0: 6d65 3d22 6c30 3231 3031 223e 3c2f 613e me="l02101"> │ │ │ │ +0002a1b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 2101
    .
    2141 │ │ │ │ +0002a230: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +0002a250: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +0002a280: 2053 5243 5f42 5546 4645 522c 203c 7370 SRC_BUFFER, typename DST_BUFFER,.
    21 │ │ │ │ +0002a310: 3432 3c2f 7370 616e 3e20 2020 2020 2020 42 │ │ │ │ +0002a320: 2020 2020 2020 203c 7370 616e 2063 6c61 typ │ │ │ │ +0002a340: 656e 616d 653c 2f73 7061 6e3e 2050 4154 ename PAT │ │ │ │ +0002a350: 4348 434f 4f52 445f 4255 4646 4552 2c20 CHCOORD_BUFFER, │ │ │ │ +0002a360: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename PATCH_TABL │ │ │ │ +0002a390: 4526 6774 3b3c 2f64 6976 3e0a 3c64 6976 E>
    .
    ..
    < │ │ │ │ +0002a550: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002a560: 6e6f 223e 2032 3134 343c 2f73 7061 6e3e no"> 2144 │ │ │ │ +0002a570: 2020 2020 2020 2020 5352 435f 4255 4646 SRC_BUFF │ │ │ │ +0002a580: 4552 202a 7372 6342 7566 6665 722c 203c ER *srcBuffer, < │ │ │ │ +0002a590: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0002a5a0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +0002a5b0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +0002a5c0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +0002a5d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &srcDesc │ │ │ │ +0002a600: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002a650: 2032 3134 353c 2f73 7061 6e3e 2020 2020 2145 │ │ │ │ +0002a660: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +0002a670: 6473 7442 7566 6665 722c 203c 6120 636c dstBuffer, BufferDe │ │ │ │ +0002a6b0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +0002a6e0: 2661 6d70 3b64 7374 4465 7363 2c3c 2f64 &dstDesc,.
    214 │ │ │ │ +0002a740: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ +0002a750: 3c73 7061 6e20 636c 6173 733d 226b 6579 int numPatchCoo │ │ │ │ +0002a780: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    2147 │ │ │ │ +0002a7e0: 2020 2020 2020 2050 4154 4348 434f 4f52 PATCHCOOR │ │ │ │ +0002a7f0: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ +0002a800: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ +0002a820: 6120 6964 3d22 6c30 3231 3438 2220 6e61 a id="l02148" na │ │ │ │ +0002a830: 6d65 3d22 6c30 3231 3438 223e 3c2f 613e me="l02148"> │ │ │ │ +0002a840: 3c73 7061 6e20 636c 6173 733d 226c 696e 2148 PATCH_T │ │ │ │ +0002a870: 4142 4c45 202a 7061 7463 6854 6162 6c65 ABLE *patchTable │ │ │ │ +0002a880: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002a8d0: 2032 3134 393c 2f73 7061 6e3e 2020 2020 2149 │ │ │ │ +0002a8e0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ +0002a900: 743c 2f73 7061 6e3e 2066 7661 7243 6861 t fvarCha │ │ │ │ +0002a910: 6e6e 656c 203d 2030 2c3c 2f64 6976 3e0a nnel = 0,
    . │ │ │ │ +0002a920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0002a950: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2150 unsigned │ │ │ │ +0002a9c0: 696e 743c 2f73 7061 6e3e 206e 756d 5374 int numSt │ │ │ │ +0002a9d0: 6172 7445 7665 6e74 733d 302c 3c2f 6469 artEvents=0,.
    2151 │ │ │ │ +0002aa30: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +0002aa40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002aa50: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const cl_event* star │ │ │ │ +0002aa70: 7445 7665 6e74 733d 4e55 4c4c 2c3c 2f64 tEvents=NULL,.
    215 │ │ │ │ +0002aad0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +0002aae0: 636c 5f65 7665 6e74 2a20 656e 6445 7665 cl_event* endEve │ │ │ │ +0002aaf0: 6e74 3d4e 554c 4c29 3c73 7061 6e20 636c nt=NULL) c │ │ │ │ +0002ab10: 6f6e 7374 203c 2f73 7061 6e3e 7b3c 2f64 onst {.
    215 │ │ │ │ +0002ab70: 333c 2f73 7061 6e3e 203c 2f64 6976 3e0a 3
    . │ │ │ │ +0002ab80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0002abb0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2154 return EvalPatches │ │ │ │ +0002ac60: 3c2f 613e 2873 7263 4275 6666 6572 2d26 (srcBuffer-& │ │ │ │ +0002ac70: 6774 3b42 696e 6443 4c42 7566 6665 7228 gt;BindCLBuffer( │ │ │ │ +0002ac80: 5f63 6c43 6f6d 6d61 6e64 5175 6575 6529 _clCommandQueue) │ │ │ │ +0002ac90: 2c20 7372 6344 6573 632c 3c2f 6469 763e , srcDesc,
    │ │ │ │ +0002aca0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002acd0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2155 │ │ │ │ +0002ad00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002ad10: 6473 7442 7566 6665 722d 2667 743b 4269 dstBuffer->Bi │ │ │ │ +0002ad20: 6e64 434c 4275 6666 6572 285f 636c 436f ndCLBuffer(_clCo │ │ │ │ +0002ad30: 6d6d 616e 6451 7565 7565 292c 2064 7374 mmandQueue), dst │ │ │ │ +0002ad40: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0002ad80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002ad90: 6e6f 223e 2032 3135 363c 2f73 7061 6e3e no"> 2156 │ │ │ │ +0002ada0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002adb0: 2020 2020 2020 2020 2020 2030 2c20 3c61 0, Buffe │ │ │ │ +0002adf0: 7244 6573 6372 6970 746f 723c 2f61 3e28 rDescriptor( │ │ │ │ +0002ae00: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    2157 │ │ │ │ +0002ae60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002ae70: 2020 2020 2020 2020 302c 203c 6120 636c 0, BufferDe │ │ │ │ +0002aeb0: 7363 7269 7074 6f72 3c2f 613e 2829 2c3c scriptor(),< │ │ │ │ +0002aec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002af10: 3135 383c 2f73 7061 6e3e 2020 2020 2020 158 │ │ │ │ +0002af20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002af30: 2020 2020 206e 756d 5061 7463 6843 6f6f numPatchCoo │ │ │ │ +0002af40: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    2159 │ │ │ │ +0002afa0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002afb0: 2020 2020 2020 2020 2020 7061 7463 6843 patchC │ │ │ │ +0002afc0: 6f6f 7264 732d 2667 743b 4269 6e64 434c oords->BindCL │ │ │ │ +0002afd0: 4275 6666 6572 285f 636c 436f 6d6d 616e Buffer(_clComman │ │ │ │ +0002afe0: 6451 7565 7565 292c 3c2f 6469 763e 0a3c dQueue),
    .< │ │ │ │ +0002aff0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0002b000: 3e3c 6120 6964 3d22 6c30 3231 3630 2220 > 2160 │ │ │ │ +0002b050: 2020 2020 2020 2020 2020 2020 2020 7061 pa │ │ │ │ +0002b060: 7463 6854 6162 6c65 2d26 6774 3b47 6574 tchTable->Get │ │ │ │ +0002b070: 4656 6172 5061 7463 6841 7272 6179 4275 FVarPatchArrayBu │ │ │ │ +0002b080: 6666 6572 2866 7661 7243 6861 6e6e 656c ffer(fvarChannel │ │ │ │ +0002b090: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    2161 │ │ │ │ +0002b0f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002b100: 2020 2020 2020 2020 7061 7463 6854 6162 patchTab │ │ │ │ +0002b110: 6c65 2d26 6774 3b47 6574 4656 6172 5061 le->GetFVarPa │ │ │ │ +0002b120: 7463 6849 6e64 6578 4275 6666 6572 2866 tchIndexBuffer(f │ │ │ │ +0002b130: 7661 7243 6861 6e6e 656c 292c 3c2f 6469 varChannel),.
    2162 │ │ │ │ +0002b190: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0002b1a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002b1b0: 2020 7061 7463 6854 6162 6c65 2d26 6774 patchTable-> │ │ │ │ +0002b1c0: 3b47 6574 4656 6172 5061 7463 6850 6172 ;GetFVarPatchPar │ │ │ │ +0002b1d0: 616d 4275 6666 6572 2866 7661 7243 6861 amBuffer(fvarCha │ │ │ │ +0002b1e0: 6e6e 656c 292c 3c2f 6469 763e 0a3c 6469 nnel),
    .< │ │ │ │ +0002b200: 6120 6964 3d22 6c30 3231 3633 2220 6e61 a id="l02163" na │ │ │ │ +0002b210: 6d65 3d22 6c30 3231 3633 223e 3c2f 613e me="l02163"> │ │ │ │ +0002b220: 3c73 7061 6e20 636c 6173 733d 226c 696e 2163 │ │ │ │ +0002b250: 2020 2020 2020 2020 2020 2020 6e75 6d53 numS │ │ │ │ +0002b260: 7461 7274 4576 656e 7473 2c20 7374 6172 tartEvents, star │ │ │ │ +0002b270: 7445 7665 6e74 732c 2065 6e64 4576 656e tEvents, endEven │ │ │ │ +0002b280: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    2164 │ │ │ │ +0002b2e0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ │ +0002b2f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0002b360: 6120 6964 3d22 6c30 3232 3238 2220 6e61 a id="l02228" na │ │ │ │ +0002b370: 6d65 3d22 6c30 3232 3238 223e 3c2f 613e me="l02228"> │ │ │ │ +0002b380: 3c73 7061 6e20 636c 6173 733d 226c 696e 2228 templ │ │ │ │ +0002b3c0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +0002b3d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002b3e0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename SRC_BUFFER, │ │ │ │ +0002b400: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +0002b420: 2f73 7061 6e3e 2044 5354 5f42 5546 4645 /span> DST_BUFFE │ │ │ │ +0002b430: 522c 3c2f 6469 763e 0a3c 6469 7620 636c R,
    .
    2229 │ │ │ │ +0002b490: 2020 2020 2020 2020 2020 203c 7370 616e typename │ │ │ │ +0002b4c0: 2050 4154 4348 434f 4f52 445f 4255 4646 PATCHCOORD_BUFF │ │ │ │ +0002b4d0: 4552 2c20 3c73 7061 6e20 636c 6173 733d ER, typena │ │ │ │ +0002b4f0: 6d65 3c2f 7370 616e 3e20 5041 5443 485f me PATCH_ │ │ │ │ +0002b500: 5441 424c 452c 3c2f 6469 763e 0a3c 6469 TABLE,
    .< │ │ │ │ +0002b520: 6120 6964 3d22 6c30 3232 3330 2220 6e61 a id="l02230" na │ │ │ │ +0002b530: 6d65 3d22 6c30 3232 3330 223e 3c2f 613e me="l02230"> │ │ │ │ +0002b540: 3c73 7061 6e20 636c 6173 733d 226c 696e 2230 < │ │ │ │ +0002b570: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002b580: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    DEVICE_CONT │ │ │ │ +0002b5a0: 4558 5426 6774 3b3c 2f64 6976 3e0a 3c64 EXT>
    ..
    2231 stati │ │ │ │ +0002b6b0: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c bool < │ │ │ │ +0002b6e0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0002b6f0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0002b700: 2261 3031 3134 312e 6874 6d6c 2361 3166 "a01141.html#a1f │ │ │ │ +0002b710: 3636 6365 3134 6633 3335 6434 6135 3735 66ce14f335d4a575 │ │ │ │ +0002b720: 6663 3935 3336 3562 6638 3131 6439 223e fc95365bf811d9"> │ │ │ │ +0002b730: 4576 616c 5061 7463 6865 7346 6163 6556 EvalPatchesFaceV │ │ │ │ +0002b740: 6172 7969 6e67 3c2f 613e 283c 2f64 6976 arying(
    .
    2232< │ │ │ │ +0002b7a0: 2f73 7061 6e3e 2020 2020 2020 2020 5352 /span> SR │ │ │ │ +0002b7b0: 435f 4255 4646 4552 202a 7372 6342 7566 C_BUFFER *srcBuf │ │ │ │ +0002b7c0: 6665 722c 203c 6120 636c 6173 733d 2263 fer, BufferDescript │ │ │ │ +0002b800: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +0002b820: 7374 3c2f 7370 616e 3e20 2661 6d70 3b73 st &s │ │ │ │ +0002b830: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ +0002b850: 3c61 2069 643d 226c 3032 3233 3322 206e 2233 DST_BU │ │ │ │ +0002b8a0: 4646 4552 202a 6473 7442 7566 6665 722c FFER *dstBuffer, │ │ │ │ +0002b8b0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +0002b8e0: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dstDe │ │ │ │ +0002b920: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2234 │ │ │ │ +0002b980: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +0002b990: 202a 6475 4275 6666 6572 2c20 203c 6120 *duBuffer, Buffer │ │ │ │ +0002b9d0: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0002b9e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002b9f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &duDesc,.
    22 │ │ │ │ +0002ba60: 3335 3c2f 7370 616e 3e20 2020 2020 2020 35 │ │ │ │ +0002ba70: 2044 5354 5f42 5546 4645 5220 2a64 7642 DST_BUFFER *dvB │ │ │ │ +0002ba80: 7566 6665 722c 2020 3c61 2063 6c61 7373 uffer, BufferDescr │ │ │ │ +0002bac0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ +0002bae0: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ +0002baf0: 703b 6476 4465 7363 2c3c 2f64 6976 3e0a p;dvDesc,
    . │ │ │ │ +0002bb00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +0002bbe0: 3232 3337 3c2f 7370 616e 3e20 2020 2020 2237 │ │ │ │ +0002bbf0: 2020 2050 4154 4348 434f 4f52 445f 4255 PATCHCOORD_BU │ │ │ │ +0002bc00: 4646 4552 202a 7061 7463 6843 6f6f 7264 FFER *patchCoord │ │ │ │ +0002bc10: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    2238 │ │ │ │ +0002bc70: 2020 2020 2050 4154 4348 5f54 4142 4c45 PATCH_TABLE │ │ │ │ +0002bc80: 202a 7061 7463 6854 6162 6c65 2c3c 2f64 *patchTable,.
    223 │ │ │ │ +0002bce0: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ +0002bcf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int fvarChannel │ │ │ │ +0002bd20: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002bd70: 2032 3234 303c 2f73 7061 6e3e 2020 2020 2240 │ │ │ │ +0002bd80: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ +0002bdb0: 434c 4576 616c 7561 746f 723c 2f61 3e20 CLEvaluator │ │ │ │ +0002bdc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const *instance,.
    224 │ │ │ │ +0002be40: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0002be50: 4445 5649 4345 5f43 4f4e 5445 5854 2064 DEVICE_CONTEXT d │ │ │ │ +0002be60: 6576 6963 6543 6f6e 7465 7874 2c3c 2f64 eviceContext,.
    224 │ │ │ │ +0002bec0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +0002bed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +0002bef0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +0002bf20: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +0002bf30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002bf80: 3232 3433 3c2f 7370 616e 3e20 2020 2020 2243 │ │ │ │ +0002bf90: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +0002bfc0: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +0002bfd0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002c020: 2032 3234 343c 2f73 7061 6e3e 2020 2020 2244 │ │ │ │ +0002c030: 2020 2020 636c 5f65 7665 6e74 2a20 656e cl_event* en │ │ │ │ +0002c040: 6445 7665 6e74 3d4e 554c 4c29 207b 3c2f dEvent=NULL) {.
    22 │ │ │ │ +0002c0a0: 3435 3c2f 7370 616e 3e20 3c2f 6469 763e 45
    │ │ │ │ +0002c0b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002c0e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2246 if │ │ │ │ +0002c130: 2028 696e 7374 616e 6365 2920 7b3c 2f64 (instance) {.
    224 │ │ │ │ +0002c190: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ │ +0002c1a0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +0002c1c0: 7475 726e 3c2f 7370 616e 3e20 696e 7374 turn inst │ │ │ │ +0002c1d0: 616e 6365 2d26 6774 3b3c 6120 636c 6173 ance->EvalPa │ │ │ │ +0002c230: 7463 6865 7346 6163 6556 6172 7969 6e67 tchesFaceVarying │ │ │ │ +0002c240: 3c2f 613e 283c 2f64 6976 3e0a 3c64 6976 (
    .
    < │ │ │ │ +0002c280: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002c290: 6e6f 223e 2032 3234 383c 2f73 7061 6e3e no"> 2248 │ │ │ │ +0002c2a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c2b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c2c0: 2020 2020 2020 2020 2073 7263 4275 6666 srcBuff │ │ │ │ +0002c2d0: 6572 2c20 7372 6344 6573 632c 3c2f 6469 er, srcDesc,.
    2249 │ │ │ │ +0002c330: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0002c340: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c350: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c360: 6473 7442 7566 6665 722c 2064 7374 4465 dstBuffer, dstDe │ │ │ │ +0002c370: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2250 │ │ │ │ +0002c3d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c3e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c3f0: 2020 2020 2020 2064 7542 7566 6665 722c duBuffer, │ │ │ │ +0002c400: 2064 7544 6573 632c 3c2f 6469 763e 0a3c duDesc,
    .< │ │ │ │ +0002c410: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0002c420: 3e3c 6120 6964 3d22 6c30 3232 3531 2220 > 2251 │ │ │ │ +0002c470: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c480: 2020 2020 2020 2020 2020 2020 6476 4275 dvBu │ │ │ │ +0002c490: 6666 6572 2c20 6476 4465 7363 2c3c 2f64 ffer, dvDesc,.
    225 │ │ │ │ +0002c4f0: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +0002c500: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c510: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c520: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ +0002c530: 2070 6174 6368 436f 6f72 6473 2c3c 2f64 patchCoords,.
    225 │ │ │ │ +0002c590: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +0002c5a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c5b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c5c0: 2070 6174 6368 5461 626c 652c 2066 7661 patchTable, fva │ │ │ │ +0002c5d0: 7243 6861 6e6e 656c 2c3c 2f64 6976 3e0a rChannel,
    . │ │ │ │ +0002c5e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    2255 │ │ │ │ +0002c6e0: 2020 2020 2020 207d 203c 7370 616e 2063 } else { │ │ │ │ +0002c710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002c760: 3232 3536 3c2f 7370 616e 3e20 2020 2020 2256 │ │ │ │ +0002c770: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ +0002c790: 4372 6561 7465 2061 6e20 696e 7374 616e Create an instan │ │ │ │ +0002c7a0: 6365 206f 6e20 6465 6d61 6e64 2028 736c ce on demand (sl │ │ │ │ +0002c7b0: 6f77 293c 2f73 7061 6e3e 3c2f 6469 763e ow)
    │ │ │ │ +0002c7c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002c7f0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2257 │ │ │ │ +0002c820: 2028 766f 6964 2964 6576 6963 6543 6f6e (void)deviceCon │ │ │ │ +0002c830: 7465 7874 3b20 203c 7370 616e 2063 6c61 text; // │ │ │ │ +0002c850: 756e 7573 6564 3c2f 7370 616e 3e3c 2f64 unused.
    225 │ │ │ │ +0002c8b0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0002c8c0: 2020 2020 696e 7374 616e 6365 203d 203c instance = < │ │ │ │ +0002c8d0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0002c8e0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0002c8f0: 2261 3031 3134 312e 6874 6d6c 2361 3361 "a01141.html#a3a │ │ │ │ +0002c900: 3266 6161 3131 3730 6365 6464 3835 3166 2faa1170cedd851f │ │ │ │ +0002c910: 6561 3732 3636 6530 6666 3765 6461 223e ea7266e0ff7eda"> │ │ │ │ +0002c920: 4372 6561 7465 3c2f 613e 2873 7263 4465 Create(srcDe │ │ │ │ +0002c930: 7363 2c20 6473 7444 6573 632c 3c2f 6469 sc, dstDesc,.
    2259 │ │ │ │ +0002c990: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0002c9a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002c9b0: 2020 2020 2064 7544 6573 632c 2064 7644 duDesc, dvD │ │ │ │ +0002c9c0: 6573 632c 2064 6576 6963 6543 6f6e 7465 esc, deviceConte │ │ │ │ +0002c9d0: 7874 293b 3c2f 6469 763e 0a3c 6469 7620 xt);
    .
    2260 │ │ │ │ +0002ca30: 2020 2020 2020 2020 2020 203c 7370 616e if ( │ │ │ │ +0002ca60: 696e 7374 616e 6365 2920 7b3c 2f64 6976 instance) {
    .
    2261< │ │ │ │ +0002cac0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0002cad0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +0002caf0: 626f 6f6c 3c2f 7370 616e 3e20 7220 3d20 bool r = │ │ │ │ +0002cb00: 696e 7374 616e 6365 2d26 6774 3b3c 6120 instance->Ev │ │ │ │ +0002cb60: 616c 5061 7463 6865 7346 6163 6556 6172 alPatchesFaceVar │ │ │ │ +0002cb70: 7969 6e67 3c2f 613e 283c 2f64 6976 3e0a ying(
    . │ │ │ │ +0002cb80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +0002cc30: 6120 6964 3d22 6c30 3232 3633 2220 6e61 a id="l02263" na │ │ │ │ +0002cc40: 6d65 3d22 6c30 3232 3633 223e 3c2f 613e me="l02263"> │ │ │ │ +0002cc50: 3c73 7061 6e20 636c 6173 733d 226c 696e 2263 │ │ │ │ +0002cc80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cc90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cca0: 6473 7442 7566 6665 722c 2064 7374 4465 dstBuffer, dstDe │ │ │ │ +0002ccb0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2264 │ │ │ │ +0002cd10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cd20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cd30: 2020 2020 2020 2020 2020 2020 2064 7542 duB │ │ │ │ +0002cd40: 7566 6665 722c 2064 7544 6573 632c 3c2f uffer, duDesc,.
    22 │ │ │ │ +0002cda0: 3635 3c2f 7370 616e 3e20 2020 2020 2020 65 │ │ │ │ +0002cdb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cdc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cdd0: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +0002cde0: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +0002cdf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0002ce20: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2266 │ │ │ │ +0002ce50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002ce60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002ce70: 2020 206e 756d 5061 7463 6843 6f6f 7264 numPatchCoord │ │ │ │ +0002ce80: 732c 2070 6174 6368 436f 6f72 6473 2c3c s, patchCoords,< │ │ │ │ +0002ce90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002cee0: 3236 373c 2f73 7061 6e3e 2020 2020 2020 267 │ │ │ │ +0002cef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cf00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cf10: 2020 2020 2020 2020 2070 6174 6368 5461 patchTa │ │ │ │ +0002cf20: 626c 652c 2066 7661 7243 6861 6e6e 656c ble, fvarChannel │ │ │ │ +0002cf30: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002cf80: 2032 3236 383c 2f73 7061 6e3e 2020 2020 2268 │ │ │ │ +0002cf90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cfa0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002cfb0: 2020 2020 2020 2020 2020 206e 756d 5374 numSt │ │ │ │ +0002cfc0: 6172 7445 7665 6e74 732c 2073 7461 7274 artEvents, start │ │ │ │ +0002cfd0: 4576 656e 7473 2c20 656e 6445 7665 6e74 Events, endEvent │ │ │ │ +0002cfe0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    2269 │ │ │ │ +0002d040: 2020 2020 2020 2020 2020 2020 203c 7370 delete │ │ │ │ +0002d070: 2069 6e73 7461 6e63 653b 3c2f 6469 763e instance;
    │ │ │ │ +0002d080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002d0b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2270 │ │ │ │ +0002d0e0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +0002d100: 6574 7572 6e3c 2f73 7061 6e3e 2072 3b3c eturn r;< │ │ │ │ +0002d110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002d160: 3237 313c 2f73 7061 6e3e 2020 2020 2020 271 │ │ │ │ +0002d170: 2020 2020 2020 7d3c 2f64 6976 3e0a 3c64 }
    . │ │ │ │ +0002d190: 3c61 2069 643d 226c 3032 3237 3222 206e 2272 return fals │ │ │ │ +0002d220: 653c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a e;
    . │ │ │ │ +0002d230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0002d260: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2273 }.
    227 │ │ │ │ +0002d2e0: 343c 2f73 7061 6e3e 2020 2020 7d3c 2f64 4 }.
    .
    2275 │ │ │ │ +0002d350: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002d3a0: 3233 3237 3c2f 7370 616e 3e20 2020 203c 2327 < │ │ │ │ +0002d3b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002d3c0: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ │ +0002d3f0: 7970 656e 616d 653c 2f73 7061 6e3e 2053 ypename S │ │ │ │ +0002d400: 5243 5f42 5546 4645 522c 203c 7370 616e RC_BUFFER, typename │ │ │ │ +0002d430: 2044 5354 5f42 5546 4645 522c 3c2f 6469 DST_BUFFER,.
    2328 │ │ │ │ +0002d490: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0002d4a0: 2020 2020 203c 7370 616e 2063 6c61 7373 typen │ │ │ │ +0002d4c0: 616d 653c 2f73 7061 6e3e 2050 4154 4348 ame PATCH │ │ │ │ +0002d4d0: 434f 4f52 445f 4255 4646 4552 2c20 3c73 COORD_BUFFER, typename PATCH_TABLE& │ │ │ │ +0002d510: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ │ +0002d560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    2330 │ │ │ │ +0002d6f0: 2020 2020 2020 5352 435f 4255 4646 4552 SRC_BUFFER │ │ │ │ +0002d700: 202a 7372 6342 7566 6665 722c 203c 6120 *srcBuffer, Buffer │ │ │ │ +0002d740: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0002d750: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002d760: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &srcDesc,< │ │ │ │ +0002d780: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002d7d0: 3333 313c 2f73 7061 6e3e 2020 2020 2020 331 │ │ │ │ +0002d7e0: 2020 4453 545f 4255 4646 4552 202a 6473 DST_BUFFER *ds │ │ │ │ +0002d7f0: 7442 7566 6665 722c 203c 6120 636c 6173 tBuffer, BufferDesc │ │ │ │ +0002d830: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +0002d860: 6d70 3b64 7374 4465 7363 2c3c 2f64 6976 mp;dstDesc,
    .
    2332< │ │ │ │ +0002d8c0: 2f73 7061 6e3e 2020 2020 2020 2020 4453 /span> DS │ │ │ │ +0002d8d0: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ +0002d8e0: 6572 2c20 203c 6120 636c 6173 733d 2263 er, BufferDescript │ │ │ │ +0002d920: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +0002d940: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ +0002d950: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ +0002d970: 6120 6964 3d22 6c30 3233 3333 2220 6e61 a id="l02333" na │ │ │ │ +0002d980: 6d65 3d22 6c30 3233 3333 223e 3c2f 613e me="l02333"> │ │ │ │ +0002d990: 3c73 7061 6e20 636c 6173 733d 226c 696e 2333 DST_BUF │ │ │ │ +0002d9c0: 4645 5220 2a64 7642 7566 6665 722c 2020 FER *dvBuffer, │ │ │ │ +0002d9d0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +0002da00: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &dvDesc │ │ │ │ +0002da40: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002da90: 2032 3333 343c 2f73 7061 6e3e 2020 2020 2334 │ │ │ │ +0002daa0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ +0002dac0: 743c 2f73 7061 6e3e 206e 756d 5061 7463 t numPatc │ │ │ │ +0002dad0: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ +0002dae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0002daf0: 3e3c 6120 6964 3d22 6c30 3233 3335 2220 > 2335 PATCH │ │ │ │ +0002db40: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ +0002db50: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ +0002db60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002db90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2336 PAT │ │ │ │ +0002dbc0: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ +0002dbd0: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ +0002dc10: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002dc20: 6e6f 223e 2032 3333 373c 2f73 7061 6e3e no"> 2337 │ │ │ │ +0002dc30: 2020 2020 2020 2020 3c73 7061 6e20 636c int fva │ │ │ │ +0002dc60: 7243 6861 6e6e 656c 203d 2030 2c3c 2f64 rChannel = 0,.
    233 │ │ │ │ +0002dcc0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0002dcd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +0002dcf0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +0002dd20: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +0002dd30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002dd80: 3233 3339 3c2f 7370 616e 3e20 2020 2020 2339 │ │ │ │ +0002dd90: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +0002ddc0: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +0002ddd0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002de20: 2032 3334 303c 2f73 7061 6e3e 2020 2020 2340 │ │ │ │ +0002de30: 2020 2020 636c 5f65 7665 6e74 2a20 656e cl_event* en │ │ │ │ +0002de40: 6445 7665 6e74 3d4e 554c 4c29 3c73 7061 dEvent=NULL) const │ │ │ │ +0002de70: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +0002dec0: 2032 3334 313c 2f73 7061 6e3e 203c 2f64 2341 .
    234 │ │ │ │ +0002df20: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ +0002df30: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +0002df50: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 EvalPat │ │ │ │ +0002dfb0: 6368 6573 3c2f 613e 2873 7263 4275 6666 ches(srcBuff │ │ │ │ +0002dfc0: 6572 2d26 6774 3b42 696e 6443 4c42 7566 er->BindCLBuf │ │ │ │ +0002dfd0: 6665 7228 5f63 6c43 6f6d 6d61 6e64 5175 fer(_clCommandQu │ │ │ │ +0002dfe0: 6575 6529 2c20 7372 6344 6573 632c 3c2f eue), srcDesc,.
    23 │ │ │ │ +0002e040: 3433 3c2f 7370 616e 3e20 2020 2020 2020 43 │ │ │ │ +0002e050: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e060: 2020 2020 6473 7442 7566 6665 722d 2667 dstBuffer-&g │ │ │ │ +0002e070: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +0002e080: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +0002e090: 2064 7374 4465 7363 2c3c 2f64 6976 3e0a dstDesc,
    . │ │ │ │ +0002e0a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    2345 │ │ │ │ +0002e1a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e1b0: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +0002e1c0: 2d26 6774 3b42 696e 6443 4c42 7566 6665 ->BindCLBuffe │ │ │ │ +0002e1d0: 7228 5f63 6c43 6f6d 6d61 6e64 5175 6575 r(_clCommandQueu │ │ │ │ +0002e1e0: 6529 2c20 6476 4465 7363 2c3c 2f64 6976 e), dvDesc,
    .
    2346< │ │ │ │ +0002e240: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0002e250: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e260: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ +0002e270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002e2c0: 3233 3437 3c2f 7370 616e 3e20 2020 2020 2347 │ │ │ │ +0002e2d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e2e0: 2020 2020 2020 7061 7463 6843 6f6f 7264 patchCoord │ │ │ │ +0002e2f0: 732d 2667 743b 4269 6e64 434c 4275 6666 s->BindCLBuff │ │ │ │ +0002e300: 6572 285f 636c 436f 6d6d 616e 6451 7565 er(_clCommandQue │ │ │ │ +0002e310: 7565 292c 3c2f 6469 763e 0a3c 6469 7620 ue),
    .
    2348 │ │ │ │ +0002e370: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e380: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ +0002e390: 6162 6c65 2d26 6774 3b47 6574 4656 6172 able->GetFVar │ │ │ │ +0002e3a0: 5061 7463 6841 7272 6179 4275 6666 6572 PatchArrayBuffer │ │ │ │ +0002e3b0: 2866 7661 7243 6861 6e6e 656c 292c 3c2f (fvarChannel),.
    23 │ │ │ │ +0002e410: 3439 3c2f 7370 616e 3e20 2020 2020 2020 49 │ │ │ │ +0002e420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e430: 2020 2020 7061 7463 6854 6162 6c65 2d26 patchTable-& │ │ │ │ +0002e440: 6774 3b47 6574 4656 6172 5061 7463 6849 gt;GetFVarPatchI │ │ │ │ +0002e450: 6e64 6578 4275 6666 6572 2866 7661 7243 ndexBuffer(fvarC │ │ │ │ +0002e460: 6861 6e6e 656c 292c 3c2f 6469 763e 0a3c hannel),
    .< │ │ │ │ +0002e470: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0002e480: 3e3c 6120 6964 3d22 6c30 3233 3530 2220 > 2350 │ │ │ │ +0002e4d0: 2020 2020 2020 2020 2020 2020 2020 7061 pa │ │ │ │ +0002e4e0: 7463 6854 6162 6c65 2d26 6774 3b47 6574 tchTable->Get │ │ │ │ +0002e4f0: 4656 6172 5061 7463 6850 6172 616d 4275 FVarPatchParamBu │ │ │ │ +0002e500: 6666 6572 2866 7661 7243 6861 6e6e 656c ffer(fvarChannel │ │ │ │ +0002e510: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    2351 │ │ │ │ +0002e570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002e580: 2020 2020 2020 2020 6e75 6d53 7461 7274 numStart │ │ │ │ +0002e590: 4576 656e 7473 2c20 7374 6172 7445 7665 Events, startEve │ │ │ │ +0002e5a0: 6e74 732c 2065 6e64 4576 656e 7429 3b3c nts, endEvent);< │ │ │ │ +0002e5b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002e600: 3335 323c 2f73 7061 6e3e 2020 2020 7d3c 352 }< │ │ │ │ +0002e610: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ │ +0002e630: 6120 6964 3d22 6c30 3233 3533 2220 6e61 a id="l02353" na │ │ │ │ +0002e640: 6d65 3d22 6c30 3233 3533 223e 3c2f 613e me="l02353"> │ │ │ │ +0002e650: 3c73 7061 6e20 636c 6173 733d 226c 696e 2353
    .
    2434 │ │ │ │ +0002e6d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +0002e6f0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +0002e720: 2053 5243 5f42 5546 4645 522c 203c 7370 SRC_BUFFER, typename DST_BUFFER,.
    24 │ │ │ │ +0002e7b0: 3335 3c2f 7370 616e 3e20 2020 2020 2020 35 │ │ │ │ +0002e7c0: 2020 2020 2020 203c 7370 616e 2063 6c61 typ │ │ │ │ +0002e7e0: 656e 616d 653c 2f73 7061 6e3e 2050 4154 ename PAT │ │ │ │ +0002e7f0: 4348 434f 4f52 445f 4255 4646 4552 2c20 CHCOORD_BUFFER, │ │ │ │ +0002e800: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename PATCH_TABL │ │ │ │ +0002e830: 452c 3c2f 6469 763e 0a3c 6469 7620 636c E,
    .
    2436 │ │ │ │ +0002e890: 2020 2020 2020 2020 2020 203c 7370 616e typename │ │ │ │ +0002e8c0: 2044 4556 4943 455f 434f 4e54 4558 5426 DEVICE_CONTEXT& │ │ │ │ +0002e8d0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ │ +0002e920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +0002ea90: 3c61 2069 643d 226c 3032 3433 3822 206e 2438 SRC_BU │ │ │ │ +0002eae0: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ +0002eaf0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +0002eb20: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ +0002eb60: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2439 │ │ │ │ +0002ebc0: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ +0002ebd0: 202a 6473 7442 7566 6665 722c 203c 6120 *dstBuffer, Buffer │ │ │ │ +0002ec10: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ +0002ec20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0002ec30: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dstDesc,< │ │ │ │ +0002ec50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002eca0: 3434 303c 2f73 7061 6e3e 2020 2020 2020 440 │ │ │ │ +0002ecb0: 2020 4453 545f 4255 4646 4552 202a 6475 DST_BUFFER *du │ │ │ │ +0002ecc0: 4275 6666 6572 2c20 203c 6120 636c 6173 Buffer, BufferDesc │ │ │ │ +0002ed00: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ +0002ed30: 6d70 3b64 7544 6573 632c 3c2f 6469 763e mp;duDesc,
    │ │ │ │ +0002ed40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002ed70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2441 DST │ │ │ │ +0002eda0: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ +0002edb0: 722c 2020 3c61 2063 6c61 7373 3d22 636f r, BufferDescripto │ │ │ │ +0002edf0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +0002ee10: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ +0002ee20: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +0002ee60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002ee70: 6e6f 223e 2032 3434 323c 2f73 7061 6e3e no"> 2442 │ │ │ │ +0002ee80: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ +0002ee90: 4552 202a 6475 7542 7566 6665 722c 203c ER *duuBuffer, < │ │ │ │ +0002eea0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0002eeb0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +0002eec0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +0002eed0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +0002eee0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duuDesc │ │ │ │ +0002ef10: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002ef60: 2032 3434 333c 2f73 7061 6e3e 2020 2020 2443 │ │ │ │ +0002ef70: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ +0002ef80: 6475 7642 7566 6665 722c 203c 6120 636c duvBuffer, BufferDe │ │ │ │ +0002efc0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +0002eff0: 2661 6d70 3b64 7576 4465 7363 2c3c 2f64 &duvDesc,.
    244 │ │ │ │ +0002f050: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ +0002f060: 4453 545f 4255 4646 4552 202a 6476 7642 DST_BUFFER *dvvB │ │ │ │ +0002f070: 7566 6665 722c 203c 6120 636c 6173 733d uffer, BufferDescri │ │ │ │ +0002f0b0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +0002f0d0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +0002f0e0: 3b64 7676 4465 7363 2c3c 2f64 6976 3e0a ;dvvDesc,
    . │ │ │ │ +0002f0f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +0002f1d0: 3234 3436 3c2f 7370 616e 3e20 2020 2020 2446 │ │ │ │ +0002f1e0: 2020 2050 4154 4348 434f 4f52 445f 4255 PATCHCOORD_BU │ │ │ │ +0002f1f0: 4646 4552 202a 7061 7463 6843 6f6f 7264 FFER *patchCoord │ │ │ │ +0002f200: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    2447 │ │ │ │ +0002f260: 2020 2020 2050 4154 4348 5f54 4142 4c45 PATCH_TABLE │ │ │ │ +0002f270: 202a 7061 7463 6854 6162 6c65 2c3c 2f64 *patchTable,.
    244 │ │ │ │ +0002f2d0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +0002f2e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int fvarChannel │ │ │ │ +0002f310: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002f360: 2032 3434 393c 2f73 7061 6e3e 2020 2020 2449 │ │ │ │ +0002f370: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ +0002f3a0: 434c 4576 616c 7561 746f 723c 2f61 3e20 CLEvaluator │ │ │ │ +0002f3b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const *instance,.
    245 │ │ │ │ +0002f430: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ +0002f440: 4445 5649 4345 5f43 4f4e 5445 5854 2064 DEVICE_CONTEXT d │ │ │ │ +0002f450: 6576 6963 6543 6f6e 7465 7874 2c3c 2f64 eviceContext,.
    245 │ │ │ │ +0002f4b0: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0002f4c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +0002f4e0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int n │ │ │ │ +0002f510: 756d 5374 6172 7445 7665 6e74 733d 302c umStartEvents=0, │ │ │ │ +0002f520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0002f570: 3234 3532 3c2f 7370 616e 3e20 2020 2020 2452 │ │ │ │ +0002f580: 2020 203c 7370 616e 2063 6c61 7373 3d22 const cl_event* │ │ │ │ +0002f5b0: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +0002f5c0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +0002f610: 2032 3435 333c 2f73 7061 6e3e 2020 2020 2453 │ │ │ │ +0002f620: 2020 2020 636c 5f65 7665 6e74 2a20 656e cl_event* en │ │ │ │ +0002f630: 6445 7665 6e74 3d4e 554c 4c29 207b 3c2f dEvent=NULL) {.
    24 │ │ │ │ +0002f690: 3534 3c2f 7370 616e 3e20 3c2f 6469 763e 54
    │ │ │ │ +0002f6a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0002f6d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2455 if │ │ │ │ +0002f720: 2028 696e 7374 616e 6365 2920 7b3c 2f64 (instance) {.
    245 │ │ │ │ +0002f780: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ +0002f790: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +0002f7b0: 7475 726e 3c2f 7370 616e 3e20 696e 7374 turn inst │ │ │ │ +0002f7c0: 616e 6365 2d26 6774 3b3c 6120 636c 6173 ance->EvalPa │ │ │ │ +0002f820: 7463 6865 7346 6163 6556 6172 7969 6e67 tchesFaceVarying │ │ │ │ +0002f830: 3c2f 613e 283c 2f64 6976 3e0a 3c64 6976 (
    .
    < │ │ │ │ +0002f870: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002f880: 6e6f 223e 2032 3435 373c 2f73 7061 6e3e no"> 2457 │ │ │ │ +0002f890: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f8a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f8b0: 2020 2020 2020 2020 2073 7263 4275 6666 srcBuff │ │ │ │ +0002f8c0: 6572 2c20 7372 6344 6573 632c 3c2f 6469 er, srcDesc,.
    2458 │ │ │ │ +0002f920: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0002f930: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f940: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f950: 6473 7442 7566 6665 722c 2064 7374 4465 dstBuffer, dstDe │ │ │ │ +0002f960: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2459 │ │ │ │ +0002f9c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f9d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002f9e0: 2020 2020 2020 2064 7542 7566 6665 722c duBuffer, │ │ │ │ +0002f9f0: 2064 7544 6573 632c 3c2f 6469 763e 0a3c duDesc,
    .< │ │ │ │ +0002fa00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0002fa10: 3e3c 6120 6964 3d22 6c30 3234 3630 2220 > 2460 │ │ │ │ +0002fa60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fa70: 2020 2020 2020 2020 2020 2020 6476 4275 dvBu │ │ │ │ +0002fa80: 6666 6572 2c20 6476 4465 7363 2c3c 2f64 ffer, dvDesc,.
    246 │ │ │ │ +0002fae0: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ +0002faf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fb00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fb10: 2064 7575 4275 6666 6572 2c20 6475 7544 duuBuffer, duuD │ │ │ │ +0002fb20: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    2462 │ │ │ │ +0002fb80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fb90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fba0: 2020 2020 2020 2020 6475 7642 7566 6665 duvBuffe │ │ │ │ +0002fbb0: 722c 2064 7576 4465 7363 2c3c 2f64 6976 r, duvDesc,
    .
    2463< │ │ │ │ +0002fc10: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0002fc20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fc30: 2020 2020 2020 2020 2020 2020 2020 2064 d │ │ │ │ +0002fc40: 7676 4275 6666 6572 2c20 6476 7644 6573 vvBuffer, dvvDes │ │ │ │ +0002fc50: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    2464 │ │ │ │ +0002fcb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fcc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fcd0: 2020 2020 2020 6e75 6d50 6174 6368 436f numPatchCo │ │ │ │ +0002fce0: 6f72 6473 2c20 7061 7463 6843 6f6f 7264 ords, patchCoord │ │ │ │ +0002fcf0: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    2465 │ │ │ │ +0002fd50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fd60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fd70: 2020 2020 2020 7061 7463 6854 6162 6c65 patchTable │ │ │ │ +0002fd80: 2c20 6676 6172 4368 616e 6e65 6c2c 3c2f , fvarChannel,.
    24 │ │ │ │ +0002fde0: 3636 3c2f 7370 616e 3e20 2020 2020 2020 66 │ │ │ │ +0002fdf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fe00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0002fe10: 2020 6e75 6d53 7461 7274 4576 656e 7473 numStartEvents │ │ │ │ +0002fe20: 2c20 7374 6172 7445 7665 6e74 732c 2065 , startEvents, e │ │ │ │ +0002fe30: 6e64 4576 656e 7429 3b3c 2f64 6976 3e0a ndEvent);
    . │ │ │ │ +0002fe40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +0002ff00: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0002ff10: 6e6f 223e 2032 3436 383c 2f73 7061 6e3e no"> 2468 │ │ │ │ +0002ff20: 2020 2020 2020 2020 2020 2020 3c73 7061 // Create an i │ │ │ │ +0002ff50: 6e73 7461 6e63 6520 6f6e 2064 656d 616e nstance on deman │ │ │ │ +0002ff60: 6420 2873 6c6f 7729 3c2f 7370 616e 3e3c d (slow)< │ │ │ │ +0002ff70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +0002ffc0: 3436 393c 2f73 7061 6e3e 2020 2020 2020 469 │ │ │ │ +0002ffd0: 2020 2020 2020 2876 6f69 6429 6465 7669 (void)devi │ │ │ │ +0002ffe0: 6365 436f 6e74 6578 743b 2020 3c73 7061 ceContext; // unused
    .
    2470 │ │ │ │ +00030070: 2020 2020 2020 2020 2069 6e73 7461 6e63 instanc │ │ │ │ +00030080: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = Create( │ │ │ │ +000300e0: 7372 6344 6573 632c 2064 7374 4465 7363 srcDesc, dstDesc │ │ │ │ +000300f0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00030140: 2032 3437 313c 2f73 7061 6e3e 2020 2020 2471 │ │ │ │ +00030150: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030160: 2020 2020 2020 2020 2020 6475 4465 7363 duDesc │ │ │ │ +00030170: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +00030180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000301b0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2472 │ │ │ │ +000301e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000301f0: 2020 6475 7544 6573 632c 2064 7576 4465 duuDesc, duvDe │ │ │ │ +00030200: 7363 2c20 6476 7644 6573 632c 3c2f 6469 sc, dvvDesc,.
    2473 │ │ │ │ +00030260: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00030270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030280: 2020 2020 2064 6576 6963 6543 6f6e 7465 deviceConte │ │ │ │ +00030290: 7874 293b 3c2f 6469 763e 0a3c 6469 7620 xt);
    .
    2474 │ │ │ │ +000302f0: 2020 2020 2020 2020 2020 203c 7370 616e if ( │ │ │ │ +00030320: 696e 7374 616e 6365 2920 7b3c 2f64 6976 instance) {
    .
    2475< │ │ │ │ +00030380: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00030390: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +000303b0: 626f 6f6c 3c2f 7370 616e 3e20 7220 3d20 bool r = │ │ │ │ +000303c0: 696e 7374 616e 6365 2d26 6774 3b3c 6120 instance->Ev │ │ │ │ +00030420: 616c 5061 7463 6865 7346 6163 6556 6172 alPatchesFaceVar │ │ │ │ +00030430: 7969 6e67 3c2f 613e 283c 2f64 6976 3e0a ying(
    . │ │ │ │ +00030440: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +000304f0: 6120 6964 3d22 6c30 3234 3737 2220 6e61 a id="l02477" na │ │ │ │ +00030500: 6d65 3d22 6c30 3234 3737 223e 3c2f 613e me="l02477"> │ │ │ │ +00030510: 3c73 7061 6e20 636c 6173 733d 226c 696e 2477 │ │ │ │ +00030540: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030550: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030560: 6473 7442 7566 6665 722c 2064 7374 4465 dstBuffer, dstDe │ │ │ │ +00030570: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2478 │ │ │ │ +000305d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000305e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000305f0: 2020 2020 2020 2020 2020 2020 2064 7542 duB │ │ │ │ +00030600: 7566 6665 722c 2064 7544 6573 632c 3c2f uffer, duDesc,.
    24 │ │ │ │ +00030660: 3739 3c2f 7370 616e 3e20 2020 2020 2020 79 │ │ │ │ +00030670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030690: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ +000306a0: 2c20 6476 4465 7363 2c3c 2f64 6976 3e0a , dvDesc,
    . │ │ │ │ +000306b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ +00030760: 6120 6964 3d22 6c30 3234 3831 2220 6e61 a id="l02481" na │ │ │ │ +00030770: 6d65 3d22 6c30 3234 3831 223e 3c2f 613e me="l02481"> │ │ │ │ +00030780: 3c73 7061 6e20 636c 6173 733d 226c 696e 2481 │ │ │ │ +000307b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000307c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000307d0: 6475 7642 7566 6665 722c 2064 7576 4465 duvBuffer, duvDe │ │ │ │ +000307e0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    2482 │ │ │ │ +00030840: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030850: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030860: 2020 2020 2020 2020 2020 2020 2064 7676 dvv │ │ │ │ +00030870: 4275 6666 6572 2c20 6476 7644 6573 632c Buffer, dvvDesc, │ │ │ │ +00030880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000308d0: 3234 3833 3c2f 7370 616e 3e20 2020 2020 2483 │ │ │ │ +000308e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000308f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030900: 2020 2020 2020 2020 2020 6e75 6d50 6174 numPat │ │ │ │ +00030910: 6368 436f 6f72 6473 2c20 7061 7463 6843 chCoords, patchC │ │ │ │ +00030920: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ +00030940: 6120 6964 3d22 6c30 3234 3834 2220 6e61 a id="l02484" na │ │ │ │ +00030950: 6d65 3d22 6c30 3234 3834 223e 3c2f 613e me="l02484"> │ │ │ │ +00030960: 3c73 7061 6e20 636c 6173 733d 226c 696e 2484 │ │ │ │ +00030990: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000309a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000309b0: 7061 7463 6854 6162 6c65 2c20 6676 6172 patchTable, fvar │ │ │ │ +000309c0: 4368 616e 6e65 6c2c 3c2f 6469 763e 0a3c Channel,
    .< │ │ │ │ +000309d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000309e0: 3e3c 6120 6964 3d22 6c30 3234 3835 2220 > 2485 │ │ │ │ +00030a30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030a40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030a50: 2020 6e75 6d53 7461 7274 4576 656e 7473 numStartEvents │ │ │ │ +00030a60: 2c20 7374 6172 7445 7665 6e74 732c 2065 , startEvents, e │ │ │ │ +00030a70: 6e64 4576 656e 7429 3b3c 2f64 6976 3e0a ndEvent);
    . │ │ │ │ +00030a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ +00030b60: 2032 3438 373c 2f73 7061 6e3e 2020 2020 2487 │ │ │ │ +00030b70: 2020 2020 2020 2020 2020 2020 3c73 7061 return r;
    .< │ │ │ │ +00030bc0: 6120 6964 3d22 6c30 3234 3838 2220 6e61 a id="l02488" na │ │ │ │ +00030bd0: 6d65 3d22 6c30 3234 3838 223e 3c2f 613e me="l02488"> │ │ │ │ +00030be0: 3c73 7061 6e20 636c 6173 733d 226c 696e 2488 }.
    24 │ │ │ │ +00030c60: 3839 3c2f 7370 616e 3e20 2020 2020 2020 89 │ │ │ │ +00030c70: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +00030c90: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn false; │ │ │ │ +00030cc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00030d10: 3234 3930 3c2f 7370 616e 3e20 2020 2020 2490 │ │ │ │ +00030d20: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    2491 │ │ │ │ +00030d80: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    2492< │ │ │ │ +00030de0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +00030e00: 3c61 2069 643d 226c 3032 3536 3222 206e 2562 temp │ │ │ │ +00030e60: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ +00030e70: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename SRC_BUFFER │ │ │ │ +00030ea0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ +00030ec0: 3c2f 7370 616e 3e20 4453 545f 4255 4646 DST_BUFF │ │ │ │ +00030ed0: 4552 2c3c 2f64 6976 3e0a 3c64 6976 2063 ER,
    .
    2563 │ │ │ │ +00030f30: 2020 2020 2020 2020 2020 2020 3c73 7061 typename PATCHCOORD_BUF │ │ │ │ +00030f70: 4645 522c 203c 7370 616e 2063 6c61 7373 FER, typen │ │ │ │ +00030f90: 616d 653c 2f73 7061 6e3e 2050 4154 4348 ame PATCH │ │ │ │ +00030fa0: 5f54 4142 4c45 2667 743b 3c2f 6469 763e _TABLE>
    │ │ │ │ +00030fb0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ +00031040: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +00031050: 7265 663d 2261 3031 3134 312e 6874 6d6c ref="a01141.html │ │ │ │ +00031060: 2361 3637 6235 3966 3538 3466 3035 6538 #a67b59f584f05e8 │ │ │ │ +00031070: 3765 3931 6233 3731 6362 3337 3434 6631 7e91b371cb3744f1 │ │ │ │ +00031080: 3337 223e 2032 3536 343c 2f61 3e3c 2f73 37"> 2564 bool E │ │ │ │ +00031110: 7661 6c50 6174 6368 6573 4661 6365 5661 valPatchesFaceVa │ │ │ │ +00031120: 7279 696e 673c 2f61 3e28 3c2f 6469 763e rying(
    │ │ │ │ +00031130: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00031160: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2565 SRC │ │ │ │ +00031190: 5f42 5546 4645 5220 2a73 7263 4275 6666 _BUFFER *srcBuff │ │ │ │ +000311a0: 6572 2c20 3c61 2063 6c61 7373 3d22 636f er, BufferDescripto │ │ │ │ +000311e0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00031200: 743c 2f73 7061 6e3e 2026 616d 703b 7372 t &sr │ │ │ │ +00031210: 6344 6573 632c 3c2f 6469 763e 0a3c 6469 cDesc,
    .< │ │ │ │ +00031230: 6120 6964 3d22 6c30 3235 3636 2220 6e61 a id="l02566" na │ │ │ │ +00031240: 6d65 3d22 6c30 3235 3636 223e 3c2f 613e me="l02566"> │ │ │ │ +00031250: 3c73 7061 6e20 636c 6173 733d 226c 696e 2566 DST_BUF │ │ │ │ +00031280: 4645 5220 2a64 7374 4275 6666 6572 2c20 FER *dstBuffer, │ │ │ │ +00031290: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ +000312c0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const &dstDes │ │ │ │ +00031300: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    2567 │ │ │ │ +00031360: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ +00031370: 2a64 7542 7566 6665 722c 2020 3c61 2063 *duBuffer, BufferD │ │ │ │ +000313b0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ +000313e0: 2026 616d 703b 6475 4465 7363 2c3c 2f64 &duDesc,.
    256 │ │ │ │ +00031440: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +00031450: 4453 545f 4255 4646 4552 202a 6476 4275 DST_BUFFER *dvBu │ │ │ │ +00031460: 6666 6572 2c20 203c 6120 636c 6173 733d ffer, BufferDescri │ │ │ │ +000314a0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +000314c0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +000314d0: 3b64 7644 6573 632c 3c2f 6469 763e 0a3c ;dvDesc,
    .< │ │ │ │ +000314e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000314f0: 3e3c 6120 6964 3d22 6c30 3235 3639 2220 > 2569 DST_B │ │ │ │ +00031540: 5546 4645 5220 2a64 7575 4275 6666 6572 UFFER *duuBuffer │ │ │ │ +00031550: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ +00031580: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ +00031590: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ +000315b0: 2f73 7061 6e3e 2026 616d 703b 6475 7544 /span> &duuD │ │ │ │ +000315c0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    2570 │ │ │ │ +00031620: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ +00031630: 5220 2a64 7576 4275 6666 6572 2c20 3c61 R *duvBuffer, Buffe │ │ │ │ +00031670: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ +00031680: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &duvDesc, │ │ │ │ +000316b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00031700: 3235 3731 3c2f 7370 616e 3e20 2020 2020 2571 │ │ │ │ +00031710: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ +00031720: 7676 4275 6666 6572 2c20 3c61 2063 6c61 vvBuffer, BufferDes │ │ │ │ +00031760: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ +00031790: 616d 703b 6476 7644 6573 632c 3c2f 6469 amp;dvvDesc,.
    2572 │ │ │ │ +000317f0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00031800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00031810: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int numPatchCoor │ │ │ │ +00031830: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    2573 │ │ │ │ +00031890: 2020 2020 2020 5041 5443 4843 4f4f 5244 PATCHCOORD │ │ │ │ +000318a0: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ +000318b0: 6f72 6473 2c3c 2f64 6976 3e0a 3c64 6976 ords,
    .
    < │ │ │ │ +000318f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00031900: 6e6f 223e 2032 3537 343c 2f73 7061 6e3e no"> 2574 │ │ │ │ +00031910: 2020 2020 2020 2020 5041 5443 485f 5441 PATCH_TA │ │ │ │ +00031920: 424c 4520 2a70 6174 6368 5461 626c 652c BLE *patchTable, │ │ │ │ +00031930: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00031980: 3235 3735 3c2f 7370 616e 3e20 2020 2020 2575 │ │ │ │ +00031990: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +000319b0: 3c2f 7370 616e 3e20 6676 6172 4368 616e fvarChan │ │ │ │ +000319c0: 6e65 6c20 3d20 302c 3c2f 6469 763e 0a3c nel = 0,
    .< │ │ │ │ +000319d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000319e0: 3e3c 6120 6964 3d22 6c30 3235 3736 2220 > 2576 unsigned
    i │ │ │ │ +00031a70: 6e74 3c2f 7370 616e 3e20 6e75 6d53 7461 nt numSta │ │ │ │ +00031a80: 7274 4576 656e 7473 3d30 2c3c 2f64 6976 rtEvents=0,
    .
    2577< │ │ │ │ +00031ae0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> const │ │ │ │ +00031b10: 2063 6c5f 6576 656e 742a 2073 7461 7274 cl_event* start │ │ │ │ +00031b20: 4576 656e 7473 3d4e 554c 4c2c 3c2f 6469 Events=NULL,.
    2578 │ │ │ │ +00031b80: 3c2f 7370 616e 3e20 2020 2020 2020 2063 c │ │ │ │ +00031b90: 6c5f 6576 656e 742a 2065 6e64 4576 656e l_event* endEven │ │ │ │ +00031ba0: 743d 4e55 4c4c 293c 7370 616e 2063 6c61 t=NULL) co │ │ │ │ +00031bc0: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    2579 │ │ │ │ +00031c20: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00031c30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00031c40: 3e3c 6120 6964 3d22 6c30 3235 3830 2220 > 2580 return EvalPatches< │ │ │ │ +00031d10: 2f61 3e28 7372 6342 7566 6665 722d 2667 /a>(srcBuffer-&g │ │ │ │ +00031d20: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +00031d30: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +00031d40: 2073 7263 4465 7363 2c3c 2f64 6976 3e0a srcDesc,
    . │ │ │ │ +00031d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    2582 │ │ │ │ +00031e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00031e60: 2020 2020 2020 2020 2020 6475 4275 6666 duBuff │ │ │ │ +00031e70: 6572 2d26 6774 3b42 696e 6443 4c42 7566 er->BindCLBuf │ │ │ │ +00031e80: 6665 7228 5f63 6c43 6f6d 6d61 6e64 5175 fer(_clCommandQu │ │ │ │ +00031e90: 6575 6529 2c20 6475 4465 7363 2c3c 2f64 eue), duDesc,.
    258 │ │ │ │ +00031ef0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ +00031f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00031f10: 2020 2064 7642 7566 6665 722d 2667 743b dvBuffer-> │ │ │ │ +00031f20: 4269 6e64 434c 4275 6666 6572 285f 636c BindCLBuffer(_cl │ │ │ │ +00031f30: 436f 6d6d 616e 6451 7565 7565 292c 2064 CommandQueue), d │ │ │ │ +00031f40: 7644 6573 632c 3c2f 6469 763e 0a3c 6469 vDesc,
    .< │ │ │ │ +00031f60: 6120 6964 3d22 6c30 3235 3834 2220 6e61 a id="l02584" na │ │ │ │ +00031f70: 6d65 3d22 6c30 3235 3834 223e 3c2f 613e me="l02584"> │ │ │ │ +00031f80: 3c73 7061 6e20 636c 6173 733d 226c 696e 2584 │ │ │ │ +00031fb0: 2020 2020 2020 2020 2020 2020 6475 7542 duuB │ │ │ │ +00031fc0: 7566 6665 722d 2667 743b 4269 6e64 434c uffer->BindCL │ │ │ │ +00031fd0: 4275 6666 6572 285f 636c 436f 6d6d 616e Buffer(_clComman │ │ │ │ +00031fe0: 6451 7565 7565 292c 2064 7575 4465 7363 dQueue), duuDesc │ │ │ │ +00031ff0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ +00032040: 2032 3538 353c 2f73 7061 6e3e 2020 2020 2585 │ │ │ │ +00032050: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032060: 2020 2020 2020 2064 7576 4275 6666 6572 duvBuffer │ │ │ │ +00032070: 2d26 6774 3b42 696e 6443 4c42 7566 6665 ->BindCLBuffe │ │ │ │ +00032080: 7228 5f63 6c43 6f6d 6d61 6e64 5175 6575 r(_clCommandQueu │ │ │ │ +00032090: 6529 2c20 6475 7644 6573 632c 3c2f 6469 e), duvDesc,.
    2586 │ │ │ │ +000320f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00032100: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032110: 2020 6476 7642 7566 6665 722d 2667 743b dvvBuffer-> │ │ │ │ +00032120: 4269 6e64 434c 4275 6666 6572 285f 636c BindCLBuffer(_cl │ │ │ │ +00032130: 436f 6d6d 616e 6451 7565 7565 292c 2064 CommandQueue), d │ │ │ │ +00032140: 7676 4465 7363 2c3c 2f64 6976 3e0a 3c64 vvDesc,
    . │ │ │ │ +00032160: 3c61 2069 643d 226c 3032 3538 3722 206e 2587 │ │ │ │ +000321b0: 2020 2020 2020 2020 2020 2020 206e 756d num │ │ │ │ +000321c0: 5061 7463 6843 6f6f 7264 732c 3c2f 6469 PatchCoords,.
    2588 │ │ │ │ +00032220: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +00032230: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032240: 2020 7061 7463 6843 6f6f 7264 732d 2667 patchCoords-&g │ │ │ │ +00032250: 743b 4269 6e64 434c 4275 6666 6572 285f t;BindCLBuffer(_ │ │ │ │ +00032260: 636c 436f 6d6d 616e 6451 7565 7565 292c clCommandQueue), │ │ │ │ +00032270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000322c0: 3235 3839 3c2f 7370 616e 3e20 2020 2020 2589 │ │ │ │ +000322d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000322e0: 2020 2020 2020 7061 7463 6854 6162 6c65 patchTable │ │ │ │ +000322f0: 2d26 6774 3b47 6574 4656 6172 5061 7463 ->GetFVarPatc │ │ │ │ +00032300: 6841 7272 6179 4275 6666 6572 2866 7661 hArrayBuffer(fva │ │ │ │ +00032310: 7243 6861 6e6e 656c 292c 3c2f 6469 763e rChannel),
    │ │ │ │ +00032320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00032350: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2590 │ │ │ │ +00032380: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032390: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ +000323a0: 6574 4656 6172 5061 7463 6849 6e64 6578 etFVarPatchIndex │ │ │ │ +000323b0: 4275 6666 6572 2866 7661 7243 6861 6e6e Buffer(fvarChann │ │ │ │ +000323c0: 656c 292c 3c2f 6469 763e 0a3c 6469 7620 el),
    .
    2591 │ │ │ │ +00032420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032430: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ +00032440: 6162 6c65 2d26 6774 3b47 6574 4656 6172 able->GetFVar │ │ │ │ +00032450: 5061 7463 6850 6172 616d 4275 6666 6572 PatchParamBuffer │ │ │ │ +00032460: 2866 7661 7243 6861 6e6e 656c 292c 3c2f (fvarChannel),.
    25 │ │ │ │ +000324c0: 3932 3c2f 7370 616e 3e20 2020 2020 2020 92 │ │ │ │ +000324d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000324e0: 2020 2020 6e75 6d53 7461 7274 4576 656e numStartEven │ │ │ │ +000324f0: 7473 2c20 7374 6172 7445 7665 6e74 732c ts, startEvents, │ │ │ │ +00032500: 2065 6e64 4576 656e 7429 3b3c 2f64 6976 endEvent);
    .
    2593< │ │ │ │ +00032560: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    2594 .
    26 │ │ │ │ +00032620: 3030 3c2f 7370 616e 3e20 3c2f 6469 763e 00
    │ │ │ │ +00032630: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00032660: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 2 │ │ │ │ +000326c0: 3630 333c 2f61 3e3c 2f73 7061 6e3e 2020 603 │ │ │ │ +000326d0: 2020 3c73 7061 6e20 636c 6173 733d 226b bool │ │ │ │ +000326f0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Compile │ │ │ │ +00032750: 3c2f 613e 283c 6120 636c 6173 733d 2263 (BufferDescript │ │ │ │ +00032790: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ +000327b0: 7374 3c2f 7370 616e 3e20 2661 6d70 3b73 st &s │ │ │ │ +000327c0: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ +000327e0: 3c61 2069 643d 226c 3032 3630 3422 206e 2604
    │ │ │ │ +00032830: 2020 203c 6120 636c 6173 733d 2263 6f64 │ │ │ │ +00032860: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00032870: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ +00032890: 3c2f 7370 616e 3e20 2661 6d70 3b64 7374 &dst │ │ │ │ +000328a0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ +000328e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000328f0: 6e6f 223e 2032 3630 353c 2f73 7061 6e3e no"> 2605 │ │ │ │ +00032900: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00032910: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ +00032940: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &duDes │ │ │ │ +00032980: 6320 3d20 3c61 2063 6c61 7373 3d22 636f c = BufferDescripto │ │ │ │ +000329c0: 723c 2f61 3e28 292c 3c2f 6469 763e 0a3c r(),
    .< │ │ │ │ +000329d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000329e0: 3e3c 6120 6964 3d22 6c30 3236 3036 2220 > 2606 │ │ │ │ +00032a30: 2020 2020 3c61 2063 6c61 7373 3d22 636f BufferDescripto │ │ │ │ +00032a70: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ +00032a90: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ +00032aa0: 4465 7363 203d 203c 6120 636c 6173 733d Desc = BufferDescri │ │ │ │ +00032ae0: 7074 6f72 3c2f 613e 2829 2c3c 2f64 6976 ptor(),
    .
    2607< │ │ │ │ +00032b40: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00032b50: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ +00032b90: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ +00032bb0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ +00032bc0: 3b64 7575 4465 7363 203d 203c 6120 636c ;duuDesc = BufferDe │ │ │ │ +00032c00: 7363 7269 7074 6f72 3c2f 613e 2829 2c3c scriptor(),< │ │ │ │ +00032c10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    2 │ │ │ │ +00032c60: 3630 383c 2f73 7061 6e3e 2020 2020 2020 608 │ │ │ │ +00032c70: 2020 2020 2020 2020 2020 203c 6120 636c BufferDe │ │ │ │ +00032cb0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ +00032ce0: 2661 6d70 3b64 7576 4465 7363 203d 203c &duvDesc = < │ │ │ │ +00032cf0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00032d00: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00032d10: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00032d20: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00032d30: 2829 2c3c 2f64 6976 3e0a 3c64 6976 2063 (),
    .
    2609 │ │ │ │ +00032d90: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00032da0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00032db0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ +00032dc0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ +00032dd0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ +00032de0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dvvDesc │ │ │ │ +00032e10: 203d 203c 6120 636c 6173 733d 2263 6f64 = │ │ │ │ +00032e40: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00032e50: 3c2f 613e 2829 293b 3c2f 6469 763e 0a3c ());
    .< │ │ │ │ +00032e60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00032e70: 3e3c 6120 6964 3d22 6c30 3236 3130 2220 > 2610
    .
    2612 │ │ │ │ +00032f10: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ │ +00032f30: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename DEVICE_CONTEX │ │ │ │ +00032f70: 5426 6774 3b3c 2f64 6976 3e0a 3c64 6976 T>
    .
    .
    │ │ │ │ +00033050: 3236 3133 3c2f 613e 3c2f 7370 616e 3e20 2613 │ │ │ │ +00033060: 2020 203c 7370 616e 2063 6c61 7373 3d22 static< │ │ │ │ +00033080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> void Sy │ │ │ │ +00033100: 6e63 6872 6f6e 697a 653c 2f61 3e28 4445 nchronize(DE │ │ │ │ +00033110: 5649 4345 5f43 4f4e 5445 5854 2064 6576 VICE_CONTEXT dev │ │ │ │ +00033120: 6963 6543 6f6e 7465 7874 2920 7b3c 2f64 iceContext) {.
    261 │ │ │ │ +00033180: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ +00033190: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Synchronize │ │ │ │ +000331f0: 2864 6576 6963 6543 6f6e 7465 7874 2d26 (deviceContext-& │ │ │ │ +00033200: 6774 3b47 6574 436f 6d6d 616e 6451 7565 gt;GetCommandQue │ │ │ │ +00033210: 7565 2829 293b 3c2f 6469 763e 0a3c 6469 ue());
    .< │ │ │ │ +00033230: 6120 6964 3d22 6c30 3236 3135 2220 6e61 a id="l02615" na │ │ │ │ +00033240: 6d65 3d22 6c30 3236 3135 223e 3c2f 613e me="l02615"> │ │ │ │ +00033250: 3c73 7061 6e20 636c 6173 733d 226c 696e 2615 }
    ..
    261 │ │ │ │ +000332d0: 363c 2f73 7061 6e3e 203c 2f64 6976 3e0a 6
    . │ │ │ │ +000332e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00033310: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 26 │ │ │ │ +00033370: 3137 3c2f 613e 3c2f 7370 616e 3e20 2020 17 │ │ │ │ +00033380: 203c 7370 616e 2063 6c61 7373 3d22 6b65 static v │ │ │ │ +000333c0: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid Sync │ │ │ │ +00033420: 6872 6f6e 697a 653c 2f61 3e28 636c 5f63 hronize(cl_c │ │ │ │ +00033430: 6f6d 6d61 6e64 5f71 7565 7565 2071 7565 ommand_queue que │ │ │ │ +00033440: 7565 293b 3c2f 6469 763e 0a3c 6469 7620 ue);
    .
    2618 │ │ │ │ +000334a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000334f0: 3236 3139 3c2f 7370 616e 3e3c 7370 616e 2619private: │ │ │ │ +00033520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00033570: 3236 3230 3c2f 7370 616e 3e20 2020 2063 2620 c │ │ │ │ +00033580: 6c5f 636f 6e74 6578 7420 5f63 6c43 6f6e l_context _clCon │ │ │ │ +00033590: 7465 7874 3b3c 2f64 6976 3e0a 3c64 6976 text;
    .
    < │ │ │ │ +000335d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000335e0: 6e6f 223e 2032 3632 313c 2f73 7061 6e3e no"> 2621 │ │ │ │ +000335f0: 2020 2020 636c 5f63 6f6d 6d61 6e64 5f71 cl_command_q │ │ │ │ +00033600: 7565 7565 205f 636c 436f 6d6d 616e 6451 ueue _clCommandQ │ │ │ │ +00033610: 7565 7565 3b3c 2f64 6976 3e0a 3c64 6976 ueue;
    .
    < │ │ │ │ +00033650: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00033660: 6e6f 223e 2032 3632 323c 2f73 7061 6e3e no"> 2622 │ │ │ │ +00033670: 2020 2020 636c 5f70 726f 6772 616d 205f cl_program _ │ │ │ │ +00033680: 7072 6f67 7261 6d3b 3c2f 6469 763e 0a3c program;
    .< │ │ │ │ +00033690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000336a0: 3e3c 6120 6964 3d22 6c30 3236 3233 2220 > 2623 cl_kernel │ │ │ │ +000336f0: 205f 7374 656e 6369 6c4b 6572 6e65 6c3b _stencilKernel; │ │ │ │ +00033700: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00033750: 3236 3234 3c2f 7370 616e 3e20 2020 2063 2624 c │ │ │ │ +00033760: 6c5f 6b65 726e 656c 205f 7374 656e 6369 l_kernel _stenci │ │ │ │ +00033770: 6c44 6572 6976 4b65 726e 656c 3b3c 2f64 lDerivKernel;.
    262 │ │ │ │ +000337d0: 353c 2f73 7061 6e3e 2020 2020 636c 5f6b 5 cl_k │ │ │ │ +000337e0: 6572 6e65 6c20 5f70 6174 6368 4b65 726e ernel _patchKern │ │ │ │ +000337f0: 656c 3b3c 2f64 6976 3e0a 3c64 6976 2063 el;
    .
    2626}; │ │ │ │ +00033850: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ +00033870: 3c61 2069 643d 226c 3032 3632 3722 206e 2627
    .
    2628} │ │ │ │ +00033910: 203c 7370 616e 2063 6c61 7373 3d22 636f // end na │ │ │ │ +00033930: 6d65 7370 6163 6520 4f73 643c 2f73 7061 mespace Osd
    .
    2629 .
    26 │ │ │ │ +000339f0: 3330 3c2f 7370 616e 3e7d 2020 3c73 7061 30} // end namespa │ │ │ │ +00033a20: 6365 204f 5045 4e53 5542 4449 565f 5645 ce OPENSUBDIV_VE │ │ │ │ +00033a30: 5253 494f 4e3c 2f73 7061 6e3e 3c2f 6469 RSION.
    2631 │ │ │ │ +00033a90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 usi │ │ │ │ +00033ab0: 6e67 206e 616d 6573 7061 6365 203c 2f73 ng namespace OPENSUBDIV_V │ │ │ │ +00033ad0: 4552 5349 4f4e 3b3c 2f64 6976 3e0a 3c64 ERSION;
    . │ │ │ │ +00033af0: 3c61 2069 643d 226c 3032 3633 3222 206e 2632
    .
    2633} │ │ │ │ +00033b90: 203c 7370 616e 2063 6c61 7373 3d22 636f // end na │ │ │ │ +00033bb0: 6d65 7370 6163 6520 4f70 656e 5375 6264 mespace OpenSubd │ │ │ │ +00033bc0: 6976 3c2f 7370 616e 3e3c 2f64 6976 3e0a iv
    . │ │ │ │ +00033bd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00033c60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00033c70: 6e6f 223e 2032 3633 353c 2f73 7061 6e3e no"> 2635 │ │ │ │ +00033c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +00033cd0: 2032 3633 363c 2f73 7061 6e3e 3c73 7061 2636#endif < │ │ │ │ +00033d00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// O │ │ │ │ +00033d20: 5045 4e53 5542 4449 5633 5f4f 5344 5f43 PENSUBDIV3_OSD_C │ │ │ │ +00033d30: 4c5f 4556 414c 5541 544f 525f 483c 2f73 L_EVALUATOR_H
    .
    < │ │ │ │ +00033dc0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ +00033dd0: 203c 6120 6872 6566 3d22 6130 3038 3630 limits.h:32 │ │ │ │ +00033e00: 3c2f 613e 3c2f 6469 763e 3c2f 6469 763e
    │ │ │ │ +00033e10: 0a3c 6469 7620 636c 6173 733d 2274 7463 ..
    Limit │ │ │ │ +00034000: 7374 656e 6369 6c20 7461 626c 6520 636c stencil table cl │ │ │ │ +00034010: 6173 7320 7772 6170 7069 6e67 2074 6865 ass wrapping the │ │ │ │ +00034020: 2074 656d 706c 6174 6520 666f 7220 636f template for co │ │ │ │ +00034030: 6d70 6174 6962 696c 6974 792e 3c2f 6469 mpatibility.
    Definiti │ │ │ │ +00034060: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on stenc │ │ │ │ +00034090: 696c 5461 626c 652e 683a 3538 333c 2f61 ilTable.h:583
    .
    Buf │ │ │ │ +00034150: 6665 7244 6573 6372 6970 746f 7220 6973 ferDescriptor is │ │ │ │ +00034160: 2061 2073 7472 7563 7420 7768 6963 6820 a struct which │ │ │ │ +00034170: 6465 7363 7269 6265 7320 6275 6666 6572 describes buffer │ │ │ │ +00034180: 2065 6c65 6d65 6e74 7320 696e 2069 6e74 elements in int │ │ │ │ +00034190: 6572 6c65 6176 6564 2064 6174 6120 6275 erleaved data bu │ │ │ │ +000341a0: 6666 6572 732e 2e2e 2e3c 2f64 6976 3e3c ffers....
    < │ │ │ │ +000341b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +000341c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +000341d0: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> bufferDe │ │ │ │ +00034200: 7363 7269 7074 6f72 2e68 3a36 313c 2f61 scriptor.h:61
    .
    . │ │ │ │ +00034340: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    OpenSubdiv::OPE │ │ │ │ +000343e0: 4e53 5542 4449 565f 5645 5253 494f 4e3a NSUBDIV_VERSION: │ │ │ │ +000343f0: 3a4f 7364 3a3a 434c 5374 656e 6369 6c54 :Osd::CLStencilT │ │ │ │ +00034400: 6162 6c65 3a3a 4765 7444 7676 5765 6967 able::GetDvvWeig │ │ │ │ +00034410: 6874 7342 7566 6665 723c 2f61 3e3c 2f64 htsBuffer
    cl_mem Ge │ │ │ │ +00034440: 7444 7676 5765 6967 6874 7342 7566 6665 tDvvWeightsBuffe │ │ │ │ +00034450: 7228 2920 636f 6e73 743c 2f64 6976 3e3c r() const
    < │ │ │ │ +00034460: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00034470: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +00034480: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +000344b0: 746f 722e 683a 3832 3c2f 613e 3c2f 6469 tor.h:82
    .
    CLSte │ │ │ │ +000345c0: 6e63 696c 5461 626c 6528 4661 723a 3a53 ncilTable(Far::S │ │ │ │ +000345d0: 7465 6e63 696c 5461 626c 6520 636f 6e73 tencilTable cons │ │ │ │ +000345e0: 7420 2a73 7465 6e63 696c 5461 626c 652c t *stencilTable, │ │ │ │ +000345f0: 2063 6c5f 636f 6e74 6578 7420 636c 436f cl_context clCo │ │ │ │ +00034600: 6e74 6578 7429 3c2f 6469 763e 3c2f 6469 ntext)
    .
    OpenSubdiv:: │ │ │ │ +000346b0: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ +000346c0: 4f4e 3a3a 4f73 643a 3a43 4c53 7465 6e63 ON::Osd::CLStenc │ │ │ │ +000346d0: 696c 5461 626c 653a 3a47 6574 4f66 6673 ilTable::GetOffs │ │ │ │ +000346e0: 6574 7342 7566 6665 723c 2f61 3e3c 2f64 etsBuffer
    cl_mem Ge │ │ │ │ +00034710: 744f 6666 7365 7473 4275 6666 6572 2829 tOffsetsBuffer() │ │ │ │ +00034720: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    < │ │ │ │ +00034740: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ +00034750: 203c 6120 6872 6566 3d22 6130 3037 3334 clEvaluator │ │ │ │ +00034780: 2e68 3a37 353c 2f61 3e3c 2f64 6976 3e3c .h:75
    < │ │ │ │ +00034790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +000347f0: 6120 6872 6566 3d22 6130 3131 3337 2e68 a href="a01137.h │ │ │ │ +00034800: 746d 6c23 6134 3734 6564 6339 3333 3633 tml#a474edc93363 │ │ │ │ +00034810: 3561 6361 3831 3434 3731 6238 6434 3839 5aca814471b8d489 │ │ │ │ +00034820: 3530 6130 6522 3e4f 7065 6e53 7562 6469 50a0e">OpenSubdi │ │ │ │ +00034830: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +00034840: 5253 494f 4e3a 3a4f 7364 3a3a 434c 5374 RSION::Osd::CLSt │ │ │ │ +00034850: 656e 6369 6c54 6162 6c65 3a3a 4372 6561 encilTable::Crea │ │ │ │ +00034860: 7465 3c2f 613e 3c2f 6469 763e 3c64 6976 te
    │ │ │ │ +00034880: 7374 6174 6963 2043 4c53 7465 6e63 696c static CLStencil │ │ │ │ +00034890: 5461 626c 6520 2a20 4372 6561 7465 2846 Table * Create(F │ │ │ │ +000348a0: 6172 3a3a 4c69 6d69 7453 7465 6e63 696c ar::LimitStencil │ │ │ │ +000348b0: 5461 626c 6520 636f 6e73 7420 2a6c 696d Table const *lim │ │ │ │ +000348c0: 6974 5374 656e 6369 6c54 6162 6c65 2c20 itStencilTable, │ │ │ │ +000348d0: 4445 5649 4345 5f43 4f4e 5445 5854 2063 DEVICE_CONTEXT c │ │ │ │ +000348e0: 6f6e 7465 7874 293c 2f64 6976 3e3c 6469 ontext)
    │ │ │ │ +00034900: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition clEvaluato │ │ │ │ +00034940: 722e 683a 3631 3c2f 613e 3c2f 6469 763e r.h:61
    │ │ │ │ +00034950: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    cl_me │ │ │ │ +00034a50: 6d20 4765 7449 6e64 6963 6573 4275 6666 m GetIndicesBuff │ │ │ │ +00034a60: 6572 2829 2063 6f6e 7374 3c2f 6469 763e er() const
    │ │ │ │ +00034a70: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00034a90: 3c2f 623e 203c 6120 6872 6566 3d22 6130 clEvalu │ │ │ │ +00034ac0: 6174 6f72 2e68 3a37 363c 2f61 3e3c 2f64 ator.h:76
    .
    < │ │ │ │ +00034c50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00034cb0: 6120 6872 6566 3d22 6130 3131 3337 2e68 a href="a01137.h │ │ │ │ +00034cc0: 746d 6c23 6136 3565 3532 3537 3265 6664 tml#a65e52572efd │ │ │ │ +00034cd0: 6562 6238 3038 3434 3138 3561 6164 6138 ebb80844185aada8 │ │ │ │ +00034ce0: 6435 3935 3122 3e4f 7065 6e53 7562 6469 d5951">OpenSubdi │ │ │ │ +00034cf0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +00034d00: 5253 494f 4e3a 3a4f 7364 3a3a 434c 5374 RSION::Osd::CLSt │ │ │ │ +00034d10: 656e 6369 6c54 6162 6c65 3a3a 4765 7453 encilTable::GetS │ │ │ │ +00034d20: 697a 6573 4275 6666 6572 3c2f 613e 3c2f izesBuffer
    cl_mem G │ │ │ │ +00034d50: 6574 5369 7a65 7342 7566 6665 7228 2920 etSizesBuffer() │ │ │ │ +00034d60: 636f 6e73 743c 2f64 6976 3e3c 6469 7620 const
    Definition │ │ │ │ +00034d90: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +00034dc0: 683a 3734 3c2f 613e 3c2f 6469 763e 3c2f h:74
    .
    . │ │ │ │ +00035040: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    cl_mem GetDv │ │ │ │ +00035060: 5765 6967 6874 7342 7566 6665 7228 2920 WeightsBuffer() │ │ │ │ +00035070: 636f 6e73 743c 2f64 6976 3e3c 6469 7620 const
    Definition │ │ │ │ +000350a0: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +000350d0: 683a 3739 3c2f 613e 3c2f 6469 763e 3c2f h:79
    .
    . │ │ │ │ +00035350: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    cl_mem GetDu │ │ │ │ +00035370: 5765 6967 6874 7342 7566 6665 7228 2920 WeightsBuffer() │ │ │ │ +00035380: 636f 6e73 743c 2f64 6976 3e3c 6469 7620 const
    Definition │ │ │ │ +000353b0: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +000353e0: 683a 3738 3c2f 613e 3c2f 6469 763e 3c2f h:78
    .
    OpenSubdiv │ │ │ │ +00035490: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ +000354a0: 5349 4f4e 3a3a 4f73 643a 3a43 4c53 7465 SION::Osd::CLSte │ │ │ │ +000354b0: 6e63 696c 5461 626c 653a 3a7e 434c 5374 ncilTable::~CLSt │ │ │ │ +000354c0: 656e 6369 6c54 6162 6c65 3c2f 613e 3c2f encilTable
    ~CLStenc │ │ │ │ +000354f0: 696c 5461 626c 6528 293c 2f64 6976 3e3c ilTable()
    < │ │ │ │ +00035500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00035560: 6120 6872 6566 3d22 6130 3131 3337 2e68 a href="a01137.h │ │ │ │ +00035570: 746d 6c23 6164 3465 3035 6332 3064 3939 tml#ad4e05c20d99 │ │ │ │ +00035580: 6236 3462 3231 3630 6331 6130 6339 3663 b64b2160c1a0c96c │ │ │ │ +00035590: 6230 6330 3122 3e4f 7065 6e53 7562 6469 b0c01">OpenSubdi │ │ │ │ +000355a0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +000355b0: 5253 494f 4e3a 3a4f 7364 3a3a 434c 5374 RSION::Osd::CLSt │ │ │ │ +000355c0: 656e 6369 6c54 6162 6c65 3a3a 4372 6561 encilTable::Crea │ │ │ │ +000355d0: 7465 3c2f 613e 3c2f 6469 763e 3c64 6976 te
    │ │ │ │ +000355f0: 7374 6174 6963 2043 4c53 7465 6e63 696c static CLStencil │ │ │ │ +00035600: 5461 626c 6520 2a20 4372 6561 7465 2846 Table * Create(F │ │ │ │ +00035610: 6172 3a3a 5374 656e 6369 6c54 6162 6c65 ar::StencilTable │ │ │ │ +00035620: 2063 6f6e 7374 202a 7374 656e 6369 6c54 const *stencilT │ │ │ │ +00035630: 6162 6c65 2c20 4445 5649 4345 5f43 4f4e able, DEVICE_CON │ │ │ │ +00035640: 5445 5854 2063 6f6e 7465 7874 293c 2f64 TEXT context)
    Definit │ │ │ │ +00035670: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion clEv │ │ │ │ +000356a0: 616c 7561 746f 722e 683a 3535 3c2f 613e aluator.h:55 │ │ │ │ +000356b0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    C │ │ │ │ +000357b0: 4c53 7465 6e63 696c 5461 626c 6528 4661 LStencilTable(Fa │ │ │ │ +000357c0: 723a 3a4c 696d 6974 5374 656e 6369 6c54 r::LimitStencilT │ │ │ │ +000357d0: 6162 6c65 2063 6f6e 7374 202a 6c69 6d69 able const *limi │ │ │ │ +000357e0: 7453 7465 6e63 696c 5461 626c 652c 2063 tStencilTable, c │ │ │ │ +000357f0: 6c5f 636f 6e74 6578 7420 636c 436f 6e74 l_context clCont │ │ │ │ +00035800: 6578 7429 3c2f 6469 763e 3c2f 6469 763e ext)
    │ │ │ │ +00035810: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    cl_mem GetW │ │ │ │ +00035910: 6569 6768 7473 4275 6666 6572 2829 2063 eightsBuffer() c │ │ │ │ +00035920: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    │ │ │ │ +00035940: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ +00035950: 6120 6872 6566 3d22 6130 3037 3334 5f73 a href="a00734_s │ │ │ │ +00035960: 6f75 7263 652e 6874 6d6c 236c 3030 3037 ource.html#l0007 │ │ │ │ +00035970: 3722 3e63 6c45 7661 6c75 6174 6f72 2e68 7">clEvaluator.h │ │ │ │ +00035980: 3a37 373c 2f61 3e3c 2f64 6976 3e3c 2f64 :77
    .
    Definition │ │ │ │ +00035a40: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +00035a70: 683a 3130 303c 2f61 3e3c 2f64 6976 3e3c h:100
    < │ │ │ │ +00035a80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00035ae0: 6120 6872 6566 3d22 6130 3131 3431 2e68 a href="a01141.h │ │ │ │ +00035af0: 746d 6c23 6130 3335 6162 3735 6531 3035 tml#a035ab75e105 │ │ │ │ +00035b00: 3536 3738 3032 3637 3464 3836 3733 3665 567802674d86736e │ │ │ │ +00035b10: 3039 3539 6122 3e4f 7065 6e53 7562 6469 0959a">OpenSubdi │ │ │ │ +00035b20: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +00035b30: 5253 494f 4e3a 3a4f 7364 3a3a 434c 4576 RSION::Osd::CLEv │ │ │ │ +00035b40: 616c 7561 746f 723a 3a45 7661 6c53 7465 aluator::EvalSte │ │ │ │ +00035b50: 6e63 696c 733c 2f61 3e3c 2f64 6976 3e3c ncils
    < │ │ │ │ +00035b60: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00035b70: 6922 3e73 7461 7469 6320 626f 6f6c 2045 i">static bool E │ │ │ │ +00035b80: 7661 6c53 7465 6e63 696c 7328 5352 435f valStencils(SRC_ │ │ │ │ +00035b90: 4255 4646 4552 202a 7372 6342 7566 6665 BUFFER *srcBuffe │ │ │ │ +00035ba0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00035bb0: 746f 7220 636f 6e73 7420 2661 6d70 3b73 tor const &s │ │ │ │ +00035bc0: 7263 4465 7363 2c20 4453 545f 4255 4646 rcDesc, DST_BUFF │ │ │ │ +00035bd0: 4552 202a 6473 7442 7566 6665 722c 2042 ER *dstBuffer, B │ │ │ │ +00035be0: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +00035bf0: 636f 6e73 7420 2661 6d70 3b64 7374 4465 const &dstDe │ │ │ │ +00035c00: 7363 2c20 4453 545f 4255 4646 4552 202a sc, DST_BUFFER * │ │ │ │ +00035c10: 6475 4275 6666 6572 2c20 4275 6666 6572 duBuffer, Buffer │ │ │ │ +00035c20: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00035c30: 2026 616d 703b 6475 4465 7363 2c20 4453 &duDesc, DS │ │ │ │ +00035c40: 545f 4255 4646 4552 202a 6476 4275 6666 T_BUFFER *dvBuff │ │ │ │ +00035c50: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +00035c60: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +00035c70: 6476 4465 7363 2c20 5354 454e 4349 4c5f dvDesc, STENCIL_ │ │ │ │ +00035c80: 5441 424c 4520 636f 6e73 7420 2a73 7465 TABLE const *ste │ │ │ │ +00035c90: 6e63 696c 5461 626c 652c 2043 4c45 7661 ncilTable, CLEva │ │ │ │ +00035ca0: 6c75 6174 6f72 2063 6f6e 7374 202a 696e luator const *in │ │ │ │ +00035cb0: 7374 616e 6365 2c20 4445 5649 4345 5f43 stance, DEVICE_C │ │ │ │ +00035cc0: 4f4e 5445 5854 2064 6576 6963 6543 6f6e ONTEXT deviceCon │ │ │ │ +00035cd0: 7465 7874 2c20 756e 7369 676e 6564 2069 text, unsigned i │ │ │ │ +00035ce0: 6e74 206e 756d 5374 6172 7445 7665 6e74 nt numStartEvent │ │ │ │ +00035cf0: 733d 302c 2063 6f6e 7374 2063 6c5f 6576 s=0, const cl_ev │ │ │ │ +00035d00: 656e 7420 2a73 7461 7274 4576 656e 7473 ent *startEvents │ │ │ │ +00035d10: 3d4e 554c 4c2c 2063 6c5f 6576 656e 7420 =NULL, cl_event │ │ │ │ +00035d20: 2a65 6e64 4576 656e 743d 4e55 4c4c 293c *endEvent=NULL)< │ │ │ │ +00035d30: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Generic │ │ │ │ +00035d50: 7374 6174 6963 2073 7465 6e63 696c 2066 static stencil f │ │ │ │ +00035d60: 756e 6374 696f 6e2e 2054 6869 7320 6675 unction. This fu │ │ │ │ +00035d70: 6e63 7469 6f6e 2068 6173 2061 2073 616d nction has a sam │ │ │ │ +00035d80: 6520 7369 676e 6174 7572 6520 6173 206f e signature as o │ │ │ │ +00035d90: 7468 6572 2064 6576 6963 6520 6b65 726e ther device kern │ │ │ │ +00035da0: 656c 7320 6861 7665 2073 6f20 742e 2e2e els have so t... │ │ │ │ +00035db0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    │ │ │ │ +00035e20: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    .
    OpenSu │ │ │ │ +00035fe0: 6264 6976 3a3a 4f50 454e 5355 4244 4956 bdiv::OPENSUBDIV │ │ │ │ +00035ff0: 5f56 4552 5349 4f4e 3a3a 4f73 643a 3a43 _VERSION::Osd::C │ │ │ │ +00036000: 4c45 7661 6c75 6174 6f72 3a3a 7e43 4c45 LEvaluator::~CLE │ │ │ │ +00036010: 7661 6c75 6174 6f72 3c2f 613e 3c2f 6469 valuator
    ~CLEvaluat │ │ │ │ +00036040: 6f72 2829 3c2f 6469 763e 3c64 6976 2063 or()
    Des │ │ │ │ +00036060: 7472 7563 746f 722e 3c2f 6469 763e 3c2f tructor.
    .
    bool EvalStenc │ │ │ │ +00036170: 696c 7328 636c 5f6d 656d 2073 7263 2c20 ils(cl_mem src, │ │ │ │ +00036180: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00036190: 2063 6f6e 7374 2026 616d 703b 7372 6344 const &srcD │ │ │ │ +000361a0: 6573 632c 2063 6c5f 6d65 6d20 6473 742c esc, cl_mem dst, │ │ │ │ +000361b0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +000361c0: 7220 636f 6e73 7420 2661 6d70 3b64 7374 r const &dst │ │ │ │ +000361d0: 4465 7363 2c20 636c 5f6d 656d 2064 752c Desc, cl_mem du, │ │ │ │ +000361e0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +000361f0: 7220 636f 6e73 7420 2661 6d70 3b64 7544 r const &duD │ │ │ │ +00036200: 6573 632c 2063 6c5f 6d65 6d20 6476 2c20 esc, cl_mem dv, │ │ │ │ +00036210: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00036220: 2063 6f6e 7374 2026 616d 703b 6476 4465 const &dvDe │ │ │ │ +00036230: 7363 2c20 636c 5f6d 656d 2073 697a 6573 sc, cl_mem sizes │ │ │ │ +00036240: 2c20 636c 5f6d 656d 206f 6666 7365 7473 , cl_mem offsets │ │ │ │ +00036250: 2c20 636c 5f6d 656d 2069 6e64 6963 6573 , cl_mem indices │ │ │ │ +00036260: 2c20 636c 5f6d 656d 2077 6569 6768 7473 , cl_mem weights │ │ │ │ +00036270: 2c20 636c 5f6d 656d 2064 7557 6569 6768 , cl_mem duWeigh │ │ │ │ +00036280: 7473 2c20 636c 5f6d 656d 2064 7657 6569 ts, cl_mem dvWei │ │ │ │ +00036290: 6768 7473 2c20 696e 7420 7374 6172 742c ghts, int start, │ │ │ │ +000362a0: 2069 6e74 2065 6e64 2c20 756e 7369 676e int end, unsign │ │ │ │ +000362b0: 6564 2069 6e74 206e 756d 5374 6172 7445 ed int numStartE │ │ │ │ +000362c0: 7665 6e74 733d 302c 2063 6f6e 7374 2063 vents=0, const c │ │ │ │ +000362d0: 6c5f 6576 656e 7420 2a73 7461 7274 4576 l_event *startEv │ │ │ │ +000362e0: 656e 7473 3d4e 554c 4c2c 2063 6c5f 6576 ents=NULL, cl_ev │ │ │ │ +000362f0: 656e 7420 2a65 6e64 4576 656e 743d 4e55 ent *endEvent=NU │ │ │ │ +00036300: 4c4c 2920 636f 6e73 743c 2f64 6976 3e3c LL) const
    < │ │ │ │ +00036310: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00036320: 223e 4469 7370 6174 6368 2074 6865 2043 ">Dispatch the C │ │ │ │ +00036330: 4c20 636f 6d70 7574 6520 6b65 726e 656c L compute kernel │ │ │ │ +00036340: 2061 7379 6e63 6872 6f6e 6f75 736c 792e asynchronously. │ │ │ │ +00036350: 2072 6574 7572 6e73 2066 616c 7365 2069 returns false i │ │ │ │ +00036360: 6620 7468 6520 6b65 726e 656c 2068 6173 f the kernel has │ │ │ │ +00036370: 6e27 7420 6265 656e 2063 6f6d 7069 6c65 n't been compile │ │ │ │ +00036380: 6420 7965 742e 3c2f 6469 763e 3c2f 6469 d yet.
    .
    │ │ │ │ +00036480: 7374 6174 6963 2062 6f6f 6c20 4576 616c static bool Eval │ │ │ │ +00036490: 5374 656e 6369 6c73 2853 5243 5f42 5546 Stencils(SRC_BUF │ │ │ │ +000364a0: 4645 5220 2a73 7263 4275 6666 6572 2c20 FER *srcBuffer, │ │ │ │ +000364b0: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +000364c0: 2063 6f6e 7374 2026 616d 703b 7372 6344 const &srcD │ │ │ │ +000364d0: 6573 632c 2044 5354 5f42 5546 4645 5220 esc, DST_BUFFER │ │ │ │ +000364e0: 2a64 7374 4275 6666 6572 2c20 4275 6666 *dstBuffer, Buff │ │ │ │ +000364f0: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +00036500: 7374 2026 616d 703b 6473 7444 6573 632c st &dstDesc, │ │ │ │ +00036510: 2053 5445 4e43 494c 5f54 4142 4c45 2063 STENCIL_TABLE c │ │ │ │ +00036520: 6f6e 7374 202a 7374 656e 6369 6c54 6162 onst *stencilTab │ │ │ │ +00036530: 6c65 2c20 434c 4576 616c 7561 746f 7220 le, CLEvaluator │ │ │ │ +00036540: 636f 6e73 7420 2a69 6e73 7461 6e63 652c const *instance, │ │ │ │ +00036550: 2044 4556 4943 455f 434f 4e54 4558 5420 DEVICE_CONTEXT │ │ │ │ +00036560: 6465 7669 6365 436f 6e74 6578 742c 2075 deviceContext, u │ │ │ │ +00036570: 6e73 6967 6e65 6420 696e 7420 6e75 6d53 nsigned int numS │ │ │ │ +00036580: 7461 7274 4576 656e 7473 3d30 2c20 636f tartEvents=0, co │ │ │ │ +00036590: 6e73 7420 636c 5f65 7665 6e74 202a 7374 nst cl_event *st │ │ │ │ +000365a0: 6172 7445 7665 6e74 733d 4e55 4c4c 2c20 artEvents=NULL, │ │ │ │ +000365b0: 636c 5f65 7665 6e74 202a 656e 6445 7665 cl_event *endEve │ │ │ │ +000365c0: 6e74 3d4e 554c 4c29 3c2f 6469 763e 3c64 nt=NULL)
    Generic static │ │ │ │ +000365f0: 7374 656e 6369 6c20 6675 6e63 7469 6f6e stencil function │ │ │ │ +00036600: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ │ +00036610: 6861 7320 6120 7361 6d65 2073 6967 6e61 has a same signa │ │ │ │ +00036620: 7475 7265 2061 7320 6f74 6865 7220 6465 ture as other de │ │ │ │ +00036630: 7669 6365 206b 6572 6e65 6c73 2068 6176 vice kernels hav │ │ │ │ +00036640: 6520 736f 2074 2e2e 2e3c 2f64 6976 3e3c e so t...
    < │ │ │ │ +00036650: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00036660: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +00036670: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +000366a0: 746f 722e 683a 3231 393c 2f61 3e3c 2f64 tor.h:219
    .static CLEvalua │ │ │ │ +000367b0: 746f 7220 2a20 4372 6561 7465 2842 7566 tor * Create(Buf │ │ │ │ +000367c0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +000367d0: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ +000367e0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +000367f0: 6f72 2063 6f6e 7374 2026 616d 703b 6473 or const &ds │ │ │ │ +00036800: 7444 6573 632c 2042 7566 6665 7244 6573 tDesc, BufferDes │ │ │ │ +00036810: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00036820: 6d70 3b64 7544 6573 632c 2042 7566 6665 mp;duDesc, Buffe │ │ │ │ +00036830: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +00036840: 7420 2661 6d70 3b64 7644 6573 632c 2063 t &dvDesc, c │ │ │ │ +00036850: 6c5f 636f 6e74 6578 7420 636c 436f 6e74 l_context clCont │ │ │ │ +00036860: 6578 742c 2063 6c5f 636f 6d6d 616e 645f ext, cl_command_ │ │ │ │ +00036870: 7175 6575 6520 636c 436f 6d6d 616e 6451 queue clCommandQ │ │ │ │ +00036880: 7565 7565 293c 2f64 6976 3e3c 6469 7620 ueue)
    Definition │ │ │ │ +000368b0: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +000368e0: 683a 3131 363c 2f61 3e3c 2f64 6976 3e3c h:116
    < │ │ │ │ +000368f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00036950: 6120 6872 6566 3d22 6130 3131 3431 2e68 a href="a01141.h │ │ │ │ +00036960: 746d 6c23 6131 6636 3663 6531 3466 3333 tml#a1f66ce14f33 │ │ │ │ +00036970: 3564 3461 3537 3566 6339 3533 3635 6266 5d4a575fc95365bf │ │ │ │ +00036980: 3831 3164 3922 3e4f 7065 6e53 7562 6469 811d9">OpenSubdi │ │ │ │ +00036990: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +000369a0: 5253 494f 4e3a 3a4f 7364 3a3a 434c 4576 RSION::Osd::CLEv │ │ │ │ +000369b0: 616c 7561 746f 723a 3a45 7661 6c50 6174 aluator::EvalPat │ │ │ │ +000369c0: 6368 6573 4661 6365 5661 7279 696e 673c chesFaceVarying< │ │ │ │ +000369d0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    sta │ │ │ │ +000369f0: 7469 6320 626f 6f6c 2045 7661 6c50 6174 tic bool EvalPat │ │ │ │ +00036a00: 6368 6573 4661 6365 5661 7279 696e 6728 chesFaceVarying( │ │ │ │ +00036a10: 5352 435f 4255 4646 4552 202a 7372 6342 SRC_BUFFER *srcB │ │ │ │ +00036a20: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +00036a30: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00036a40: 6d70 3b73 7263 4465 7363 2c20 4453 545f mp;srcDesc, DST_ │ │ │ │ +00036a50: 4255 4646 4552 202a 6473 7442 7566 6665 BUFFER *dstBuffe │ │ │ │ +00036a60: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00036a70: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00036a80: 7374 4465 7363 2c20 4453 545f 4255 4646 stDesc, DST_BUFF │ │ │ │ +00036a90: 4552 202a 6475 4275 6666 6572 2c20 4275 ER *duBuffer, Bu │ │ │ │ +00036aa0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00036ab0: 6f6e 7374 2026 616d 703b 6475 4465 7363 onst &duDesc │ │ │ │ +00036ac0: 2c20 4453 545f 4255 4646 4552 202a 6476 , DST_BUFFER *dv │ │ │ │ +00036ad0: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +00036ae0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +00036af0: 616d 703b 6476 4465 7363 2c20 696e 7420 amp;dvDesc, int │ │ │ │ +00036b00: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ +00036b10: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +00036b20: 5220 2a70 6174 6368 436f 6f72 6473 2c20 R *patchCoords, │ │ │ │ +00036b30: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ +00036b40: 6368 5461 626c 652c 2069 6e74 2066 7661 chTable, int fva │ │ │ │ +00036b50: 7243 6861 6e6e 656c 2c20 434c 4576 616c rChannel, CLEval │ │ │ │ +00036b60: 7561 746f 7220 636f 6e73 7420 2a69 6e73 uator const *ins │ │ │ │ +00036b70: 7461 6e63 652c 2044 4556 4943 455f 434f tance, DEVICE_CO │ │ │ │ +00036b80: 4e54 4558 5420 6465 7669 6365 436f 6e74 NTEXT deviceCont │ │ │ │ +00036b90: 6578 742c 2075 6e73 6967 6e65 6420 696e ext, unsigned in │ │ │ │ +00036ba0: 7420 6e75 6d53 7461 7274 4576 656e 7473 t numStartEvents │ │ │ │ +00036bb0: 3d30 2c20 636f 6e73 7420 636c 5f65 7665 =0, const cl_eve │ │ │ │ +00036bc0: 6e74 202a 7374 6172 7445 7665 6e74 733d nt *startEvents= │ │ │ │ +00036bd0: 4e55 4c4c 2c20 636c 5f65 7665 6e74 202a NULL, cl_event * │ │ │ │ +00036be0: 656e 6445 7665 6e74 3d4e 554c 4c29 3c2f endEvent=NULL)
    Generic l │ │ │ │ +00036c10: 696d 6974 2065 7661 6c20 6675 6e63 7469 imit eval functi │ │ │ │ +00036c20: 6f6e 2e20 5468 6973 2066 756e 6374 696f on. This functio │ │ │ │ +00036c30: 6e20 6861 7320 6120 7361 6d65 2073 6967 n has a same sig │ │ │ │ +00036c40: 6e61 7475 7265 2061 7320 6f74 6865 7220 nature as other │ │ │ │ +00036c50: 6465 7669 6365 206b 6572 6e65 6c73 2068 device kernels h │ │ │ │ +00036c60: 6176 6520 736f 2074 6861 7420 2e2e 2e3c ave so that ...< │ │ │ │ +00036c70: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    │ │ │ │ +00036ce0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    boo │ │ │ │ +00036dd0: 6c20 4576 616c 5061 7463 6865 7328 636c l EvalPatches(cl │ │ │ │ +00036de0: 5f6d 656d 2073 7263 2c20 4275 6666 6572 _mem src, Buffer │ │ │ │ +00036df0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00036e00: 2026 616d 703b 7372 6344 6573 632c 2063 &srcDesc, c │ │ │ │ +00036e10: 6c5f 6d65 6d20 6473 742c 2042 7566 6665 l_mem dst, Buffe │ │ │ │ +00036e20: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +00036e30: 7420 2661 6d70 3b64 7374 4465 7363 2c20 t &dstDesc, │ │ │ │ +00036e40: 636c 5f6d 656d 2064 752c 2042 7566 6665 cl_mem du, Buffe │ │ │ │ +00036e50: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +00036e60: 7420 2661 6d70 3b64 7544 6573 632c 2063 t &duDesc, c │ │ │ │ +00036e70: 6c5f 6d65 6d20 6476 2c20 4275 6666 6572 l_mem dv, Buffer │ │ │ │ +00036e80: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00036e90: 2026 616d 703b 6476 4465 7363 2c20 696e &dvDesc, in │ │ │ │ +00036ea0: 7420 6e75 6d50 6174 6368 436f 6f72 6473 t numPatchCoords │ │ │ │ +00036eb0: 2c20 636c 5f6d 656d 2070 6174 6368 436f , cl_mem patchCo │ │ │ │ +00036ec0: 6f72 6473 4275 6666 6572 2c20 636c 5f6d ordsBuffer, cl_m │ │ │ │ +00036ed0: 656d 2070 6174 6368 4172 7261 7942 7566 em patchArrayBuf │ │ │ │ +00036ee0: 6665 722c 2063 6c5f 6d65 6d20 7061 7463 fer, cl_mem patc │ │ │ │ +00036ef0: 6849 6e64 6578 4275 6666 6572 2c20 636c hIndexBuffer, cl │ │ │ │ +00036f00: 5f6d 656d 2070 6174 6368 5061 7261 6d73 _mem patchParams │ │ │ │ +00036f10: 4275 6666 6572 2c20 756e 7369 676e 6564 Buffer, unsigned │ │ │ │ +00036f20: 2069 6e74 206e 756d 5374 6172 7445 7665 int numStartEve │ │ │ │ +00036f30: 6e74 733d 302c 2063 6f6e 7374 2063 6c5f nts=0, const cl_ │ │ │ │ +00036f40: 6576 656e 7420 2a73 7461 7274 4576 656e event *startEven │ │ │ │ +00036f50: 7473 3d4e 554c 4c2c 2063 6c5f 6576 656e ts=NULL, cl_even │ │ │ │ +00036f60: 7420 2a65 6e64 4576 656e 743d 4e55 4c4c t *endEvent=NULL │ │ │ │ +00036f70: 2920 636f 6e73 743c 2f64 6976 3e3c 2f64 ) const
    .
    OpenSubdiv: │ │ │ │ +00037020: 3a4f 5045 4e53 5542 4449 565f 5645 5253 :OPENSUBDIV_VERS │ │ │ │ +00037030: 494f 4e3a 3a4f 7364 3a3a 434c 4576 616c ION::Osd::CLEval │ │ │ │ +00037040: 7561 746f 723a 3a45 7661 6c50 6174 6368 uator::EvalPatch │ │ │ │ +00037050: 6573 5661 7279 696e 673c 2f61 3e3c 2f64 esVarying
    bool Eval │ │ │ │ +00037080: 5061 7463 6865 7356 6172 7969 6e67 2853 PatchesVarying(S │ │ │ │ +00037090: 5243 5f42 5546 4645 5220 2a73 7263 4275 RC_BUFFER *srcBu │ │ │ │ +000370a0: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +000370b0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +000370c0: 703b 7372 6344 6573 632c 2044 5354 5f42 p;srcDesc, DST_B │ │ │ │ +000370d0: 5546 4645 5220 2a64 7374 4275 6666 6572 UFFER *dstBuffer │ │ │ │ +000370e0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +000370f0: 6f72 2063 6f6e 7374 2026 616d 703b 6473 or const &ds │ │ │ │ +00037100: 7444 6573 632c 2044 5354 5f42 5546 4645 tDesc, DST_BUFFE │ │ │ │ +00037110: 5220 2a64 7542 7566 6665 722c 2042 7566 R *duBuffer, Buf │ │ │ │ +00037120: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +00037130: 6e73 7420 2661 6d70 3b64 7544 6573 632c nst &duDesc, │ │ │ │ +00037140: 2044 5354 5f42 5546 4645 5220 2a64 7642 DST_BUFFER *dvB │ │ │ │ +00037150: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +00037160: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00037170: 6d70 3b64 7644 6573 632c 2044 5354 5f42 mp;dvDesc, DST_B │ │ │ │ +00037180: 5546 4645 5220 2a64 7575 4275 6666 6572 UFFER *duuBuffer │ │ │ │ +00037190: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +000371a0: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ +000371b0: 7544 6573 632c 2044 5354 5f42 5546 4645 uDesc, DST_BUFFE │ │ │ │ +000371c0: 5220 2a64 7576 4275 6666 6572 2c20 4275 R *duvBuffer, Bu │ │ │ │ +000371d0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +000371e0: 6f6e 7374 2026 616d 703b 6475 7644 6573 onst &duvDes │ │ │ │ +000371f0: 632c 2044 5354 5f42 5546 4645 5220 2a64 c, DST_BUFFER *d │ │ │ │ +00037200: 7676 4275 6666 6572 2c20 4275 6666 6572 vvBuffer, Buffer │ │ │ │ +00037210: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00037220: 2026 616d 703b 6476 7644 6573 632c 2069 &dvvDesc, i │ │ │ │ +00037230: 6e74 206e 756d 5061 7463 6843 6f6f 7264 nt numPatchCoord │ │ │ │ +00037240: 732c 2050 4154 4348 434f 4f52 445f 4255 s, PATCHCOORD_BU │ │ │ │ +00037250: 4646 4552 202a 7061 7463 6843 6f6f 7264 FFER *patchCoord │ │ │ │ +00037260: 732c 2050 4154 4348 5f54 4142 4c45 202a s, PATCH_TABLE * │ │ │ │ +00037270: 7061 7463 6854 6162 6c65 2c20 756e 7369 patchTable, unsi │ │ │ │ +00037280: 676e 6564 2069 6e74 206e 756d 5374 6172 gned int numStar │ │ │ │ +00037290: 7445 7665 6e74 733d 302c 2063 6f6e 7374 tEvents=0, const │ │ │ │ +000372a0: 2063 6c5f 6576 656e 7420 2a73 7461 7274 cl_event *start │ │ │ │ +000372b0: 4576 656e 7473 3d4e 554c 4c2c 2063 6c5f Events=NULL, cl_ │ │ │ │ +000372c0: 6576 656e 7420 2a65 6e64 4576 656e 743d event *endEvent= │ │ │ │ +000372d0: 4e55 4c4c 2920 636f 6e73 743c 2f64 6976 NULL) const
    Generic limi │ │ │ │ +00037300: 7420 6576 616c 2066 756e 6374 696f 6e2e t eval function. │ │ │ │ +00037310: 2054 6869 7320 6675 6e63 7469 6f6e 2068 This function h │ │ │ │ +00037320: 6173 2061 2073 616d 6520 7369 676e 6174 as a same signat │ │ │ │ +00037330: 7572 6520 6173 206f 7468 6572 2064 6576 ure as other dev │ │ │ │ +00037340: 6963 6520 6b65 726e 656c 7320 6861 7665 ice kernels have │ │ │ │ +00037350: 2073 6f20 7468 6174 202e 2e2e 3c2f 6469 so that ...
    Definiti │ │ │ │ +00037380: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on clEva │ │ │ │ +000373b0: 6c75 6174 6f72 2e68 3a31 3937 383c 2f61 luator.h:1978
    .
    bool │ │ │ │ +000374c0: 4576 616c 5374 656e 6369 6c73 2853 5243 EvalStencils(SRC │ │ │ │ +000374d0: 5f42 5546 4645 5220 2a73 7263 4275 6666 _BUFFER *srcBuff │ │ │ │ +000374e0: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +000374f0: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +00037500: 7372 6344 6573 632c 2044 5354 5f42 5546 srcDesc, DST_BUF │ │ │ │ +00037510: 4645 5220 2a64 7374 4275 6666 6572 2c20 FER *dstBuffer, │ │ │ │ +00037520: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00037530: 2063 6f6e 7374 2026 616d 703b 6473 7444 const &dstD │ │ │ │ +00037540: 6573 632c 2044 5354 5f42 5546 4645 5220 esc, DST_BUFFER │ │ │ │ +00037550: 2a64 7542 7566 6665 722c 2042 7566 6665 *duBuffer, Buffe │ │ │ │ +00037560: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +00037570: 7420 2661 6d70 3b64 7544 6573 632c 2044 t &duDesc, D │ │ │ │ +00037580: 5354 5f42 5546 4645 5220 2a64 7642 7566 ST_BUFFER *dvBuf │ │ │ │ +00037590: 6665 722c 2042 7566 6665 7244 6573 6372 fer, BufferDescr │ │ │ │ +000375a0: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +000375b0: 3b64 7644 6573 632c 2053 5445 4e43 494c ;dvDesc, STENCIL │ │ │ │ +000375c0: 5f54 4142 4c45 2063 6f6e 7374 202a 7374 _TABLE const *st │ │ │ │ +000375d0: 656e 6369 6c54 6162 6c65 2c20 756e 7369 encilTable, unsi │ │ │ │ +000375e0: 676e 6564 2069 6e74 206e 756d 5374 6172 gned int numStar │ │ │ │ +000375f0: 7445 7665 6e74 733d 302c 2063 6f6e 7374 tEvents=0, const │ │ │ │ +00037600: 2063 6c5f 6576 656e 7420 2a73 7461 7274 cl_event *start │ │ │ │ +00037610: 4576 656e 7473 3d4e 554c 4c2c 2063 6c5f Events=NULL, cl_ │ │ │ │ +00037620: 6576 656e 7420 2a65 6e64 4576 656e 743d event *endEvent= │ │ │ │ +00037630: 4e55 4c4c 2920 636f 6e73 743c 2f64 6976 NULL) const
    Generic sten │ │ │ │ +00037660: 6369 6c20 6675 6e63 7469 6f6e 2e3c 2f64 cil function.
    Definit │ │ │ │ +00037690: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion clEv │ │ │ │ +000376c0: 616c 7561 746f 722e 683a 3536 313c 2f61 aluator.h:561
    .
    bool E │ │ │ │ +000377d0: 7661 6c50 6174 6368 6573 2853 5243 5f42 valPatches(SRC_B │ │ │ │ +000377e0: 5546 4645 5220 2a73 7263 4275 6666 6572 UFFER *srcBuffer │ │ │ │ +000377f0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +00037800: 6f72 2063 6f6e 7374 2026 616d 703b 7372 or const &sr │ │ │ │ +00037810: 6344 6573 632c 2044 5354 5f42 5546 4645 cDesc, DST_BUFFE │ │ │ │ +00037820: 5220 2a64 7374 4275 6666 6572 2c20 4275 R *dstBuffer, Bu │ │ │ │ +00037830: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00037840: 6f6e 7374 2026 616d 703b 6473 7444 6573 onst &dstDes │ │ │ │ +00037850: 632c 2044 5354 5f42 5546 4645 5220 2a64 c, DST_BUFFER *d │ │ │ │ +00037860: 7542 7566 6665 722c 2042 7566 6665 7244 uBuffer, BufferD │ │ │ │ +00037870: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +00037880: 2661 6d70 3b64 7544 6573 632c 2044 5354 &duDesc, DST │ │ │ │ +00037890: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ +000378a0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +000378b0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +000378c0: 7644 6573 632c 2044 5354 5f42 5546 4645 vDesc, DST_BUFFE │ │ │ │ +000378d0: 5220 2a64 7575 4275 6666 6572 2c20 4275 R *duuBuffer, Bu │ │ │ │ +000378e0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +000378f0: 6f6e 7374 2026 616d 703b 6475 7544 6573 onst &duuDes │ │ │ │ +00037900: 632c 2044 5354 5f42 5546 4645 5220 2a64 c, DST_BUFFER *d │ │ │ │ +00037910: 7576 4275 6666 6572 2c20 4275 6666 6572 uvBuffer, Buffer │ │ │ │ +00037920: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00037930: 2026 616d 703b 6475 7644 6573 632c 2044 &duvDesc, D │ │ │ │ +00037940: 5354 5f42 5546 4645 5220 2a64 7676 4275 ST_BUFFER *dvvBu │ │ │ │ +00037950: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +00037960: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +00037970: 703b 6476 7644 6573 632c 2069 6e74 206e p;dvvDesc, int n │ │ │ │ +00037980: 756d 5061 7463 6843 6f6f 7264 732c 2050 umPatchCoords, P │ │ │ │ +00037990: 4154 4348 434f 4f52 445f 4255 4646 4552 ATCHCOORD_BUFFER │ │ │ │ +000379a0: 202a 7061 7463 6843 6f6f 7264 732c 2050 *patchCoords, P │ │ │ │ +000379b0: 4154 4348 5f54 4142 4c45 202a 7061 7463 ATCH_TABLE *patc │ │ │ │ +000379c0: 6854 6162 6c65 2c20 756e 7369 676e 6564 hTable, unsigned │ │ │ │ +000379d0: 2069 6e74 206e 756d 5374 6172 7445 7665 int numStartEve │ │ │ │ +000379e0: 6e74 733d 302c 2063 6f6e 7374 2063 6c5f nts=0, const cl_ │ │ │ │ +000379f0: 6576 656e 7420 2a73 7461 7274 4576 656e event *startEven │ │ │ │ +00037a00: 7473 3d4e 554c 4c2c 2063 6c5f 6576 656e ts=NULL, cl_even │ │ │ │ +00037a10: 7420 2a65 6e64 4576 656e 743d 4e55 4c4c t *endEvent=NULL │ │ │ │ +00037a20: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ │ +00037a40: 4765 6e65 7269 6320 6c69 6d69 7420 6576 Generic limit ev │ │ │ │ +00037a50: 616c 2066 756e 6374 696f 6e20 7769 7468 al function with │ │ │ │ +00037a60: 2064 6572 6976 6174 6976 6573 2e20 5468 derivatives. Th │ │ │ │ +00037a70: 6973 2066 756e 6374 696f 6e20 6861 7320 is function has │ │ │ │ +00037a80: 6120 7361 6d65 2073 6967 6e61 7475 7265 a same signature │ │ │ │ +00037a90: 2061 7320 6f74 6865 7220 6465 7669 6365 as other device │ │ │ │ +00037aa0: 206b 6572 6e2e 2e2e 3c2f 6469 763e 3c64 kern...
    Definition clEvaluat │ │ │ │ +00037b00: 6f72 2e68 3a31 3337 393c 2f61 3e3c 2f64 or.h:1379
    .
    < │ │ │ │ +00037b60: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +00037b70: 6522 3e3c 6120 6872 6566 3d22 6130 3131 e">OpenS │ │ │ │ +00037bb0: 7562 6469 763a 3a4f 5045 4e53 5542 4449 ubdiv::OPENSUBDI │ │ │ │ +00037bc0: 565f 5645 5253 494f 4e3a 3a4f 7364 3a3a V_VERSION::Osd:: │ │ │ │ +00037bd0: 434c 4576 616c 7561 746f 723a 3a49 6e73 CLEvaluator::Ins │ │ │ │ +00037be0: 7461 6e74 6961 7461 626c 653c 2f61 3e3c tantiatable< │ │ │ │ +00037bf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    bool In │ │ │ │ +00037c10: 7374 616e 7469 6174 6162 6c65 3c2f 6469 stantiatable
    Definiti │ │ │ │ +00037c40: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on clEva │ │ │ │ +00037c70: 6c75 6174 6f72 2e68 3a31 3032 3c2f 613e luator.h:102 │ │ │ │ +00037c80: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ │ +00037d60: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    static CLEva │ │ │ │ +00037d80: 6c75 6174 6f72 202a 2043 7265 6174 6528 luator * Create( │ │ │ │ +00037d90: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00037da0: 2063 6f6e 7374 2026 616d 703b 7372 6344 const &srcD │ │ │ │ +00037db0: 6573 632c 2042 7566 6665 7244 6573 6372 esc, BufferDescr │ │ │ │ +00037dc0: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +00037dd0: 3b64 7374 4465 7363 2c20 4275 6666 6572 ;dstDesc, Buffer │ │ │ │ +00037de0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00037df0: 2026 616d 703b 6475 4465 7363 2c20 4275 &duDesc, Bu │ │ │ │ +00037e00: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00037e10: 6f6e 7374 2026 616d 703b 6476 4465 7363 onst &dvDesc │ │ │ │ +00037e20: 2c20 4445 5649 4345 5f43 4f4e 5445 5854 , DEVICE_CONTEXT │ │ │ │ +00037e30: 2064 6576 6963 6543 6f6e 7465 7874 293c deviceContext)< │ │ │ │ +00037e40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Generic │ │ │ │ +00037e60: 6372 6561 746f 7220 7465 6d70 6c61 7465 creator template │ │ │ │ +00037e70: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    .
    OpenSubdiv::O │ │ │ │ +00037f80: 5045 4e53 5542 4449 565f 5645 5253 494f PENSUBDIV_VERSIO │ │ │ │ +00037f90: 4e3a 3a4f 7364 3a3a 434c 4576 616c 7561 N::Osd::CLEvalua │ │ │ │ +00037fa0: 746f 723a 3a45 7661 6c50 6174 6368 6573 tor::EvalPatches │ │ │ │ +00037fb0: 4661 6365 5661 7279 696e 673c 2f61 3e3c FaceVarying< │ │ │ │ +00037fc0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    static │ │ │ │ +00037fe0: 626f 6f6c 2045 7661 6c50 6174 6368 6573 bool EvalPatches │ │ │ │ +00037ff0: 4661 6365 5661 7279 696e 6728 5352 435f FaceVarying(SRC_ │ │ │ │ +00038000: 4255 4646 4552 202a 7372 6342 7566 6665 BUFFER *srcBuffe │ │ │ │ +00038010: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00038020: 746f 7220 636f 6e73 7420 2661 6d70 3b73 tor const &s │ │ │ │ +00038030: 7263 4465 7363 2c20 4453 545f 4255 4646 rcDesc, DST_BUFF │ │ │ │ +00038040: 4552 202a 6473 7442 7566 6665 722c 2042 ER *dstBuffer, B │ │ │ │ +00038050: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +00038060: 636f 6e73 7420 2661 6d70 3b64 7374 4465 const &dstDe │ │ │ │ +00038070: 7363 2c20 696e 7420 6e75 6d50 6174 6368 sc, int numPatch │ │ │ │ +00038080: 436f 6f72 6473 2c20 5041 5443 4843 4f4f Coords, PATCHCOO │ │ │ │ +00038090: 5244 5f42 5546 4645 5220 2a70 6174 6368 RD_BUFFER *patch │ │ │ │ +000380a0: 436f 6f72 6473 2c20 5041 5443 485f 5441 Coords, PATCH_TA │ │ │ │ +000380b0: 424c 4520 2a70 6174 6368 5461 626c 652c BLE *patchTable, │ │ │ │ +000380c0: 2069 6e74 2066 7661 7243 6861 6e6e 656c int fvarChannel │ │ │ │ +000380d0: 2c20 434c 4576 616c 7561 746f 7220 636f , CLEvaluator co │ │ │ │ +000380e0: 6e73 7420 2a69 6e73 7461 6e63 652c 2044 nst *instance, D │ │ │ │ +000380f0: 4556 4943 455f 434f 4e54 4558 5420 6465 EVICE_CONTEXT de │ │ │ │ +00038100: 7669 6365 436f 6e74 6578 742c 2075 6e73 viceContext, uns │ │ │ │ +00038110: 6967 6e65 6420 696e 7420 6e75 6d53 7461 igned int numSta │ │ │ │ +00038120: 7274 4576 656e 7473 3d30 2c20 636f 6e73 rtEvents=0, cons │ │ │ │ +00038130: 7420 636c 5f65 7665 6e74 202a 7374 6172 t cl_event *star │ │ │ │ +00038140: 7445 7665 6e74 733d 4e55 4c4c 2c20 636c tEvents=NULL, cl │ │ │ │ +00038150: 5f65 7665 6e74 202a 656e 6445 7665 6e74 _event *endEvent │ │ │ │ +00038160: 3d4e 554c 4c29 3c2f 6469 763e 3c64 6976 =NULL)
    G │ │ │ │ +00038180: 656e 6572 6963 206c 696d 6974 2065 7661 eneric limit eva │ │ │ │ +00038190: 6c20 6675 6e63 7469 6f6e 2e20 5468 6973 l function. This │ │ │ │ +000381a0: 2066 756e 6374 696f 6e20 6861 7320 6120 function has a │ │ │ │ +000381b0: 7361 6d65 2073 6967 6e61 7475 7265 2061 same signature a │ │ │ │ +000381c0: 7320 6f74 6865 7220 6465 7669 6365 206b s other device k │ │ │ │ +000381d0: 6572 6e65 6c73 2068 6176 6520 736f 2074 ernels have so t │ │ │ │ +000381e0: 6861 7420 2e2e 2e3c 2f64 6976 3e3c 6469 hat ...
    │ │ │ │ +00038200: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition clEvaluato │ │ │ │ +00038240: 722e 683a 3230 3631 3c2f 613e 3c2f 6469 r.h:2061
    .
    │ │ │ │ +00038340: 7374 6174 6963 2043 4c45 7661 6c75 6174 static CLEvaluat │ │ │ │ +00038350: 6f72 202a 2043 7265 6174 6528 4275 6666 or * Create(Buff │ │ │ │ +00038360: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +00038370: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ +00038380: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +00038390: 7220 636f 6e73 7420 2661 6d70 3b64 7374 r const &dst │ │ │ │ +000383a0: 4465 7363 2c20 4275 6666 6572 4465 7363 Desc, BufferDesc │ │ │ │ +000383b0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +000383c0: 703b 6475 4465 7363 2c20 4275 6666 6572 p;duDesc, Buffer │ │ │ │ +000383d0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +000383e0: 2026 616d 703b 6476 4465 7363 2c20 4275 &dvDesc, Bu │ │ │ │ +000383f0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00038400: 6f6e 7374 2026 616d 703b 6475 7544 6573 onst &duuDes │ │ │ │ +00038410: 632c 2042 7566 6665 7244 6573 6372 6970 c, BufferDescrip │ │ │ │ +00038420: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00038430: 7576 4465 7363 2c20 4275 6666 6572 4465 uvDesc, BufferDe │ │ │ │ +00038440: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +00038450: 616d 703b 6476 7644 6573 632c 2044 4556 amp;dvvDesc, DEV │ │ │ │ +00038460: 4943 455f 434f 4e54 4558 5420 6465 7669 ICE_CONTEXT devi │ │ │ │ +00038470: 6365 436f 6e74 6578 7429 3c2f 6469 763e ceContext)
    │ │ │ │ +00038480: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Generic creat │ │ │ │ +000384a0: 6f72 2074 656d 706c 6174 652e 3c2f 6469 or template.
    Definiti │ │ │ │ +000384d0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on clEva │ │ │ │ +00038500: 6c75 6174 6f72 2e68 3a31 3331 3c2f 613e luator.h:131 │ │ │ │ +00038510: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    Op │ │ │ │ +000385b0: 656e 5375 6264 6976 3a3a 4f50 454e 5355 enSubdiv::OPENSU │ │ │ │ +000385c0: 4244 4956 5f56 4552 5349 4f4e 3a3a 4f73 BDIV_VERSION::Os │ │ │ │ +000385d0: 643a 3a43 4c45 7661 6c75 6174 6f72 3a3a d::CLEvaluator:: │ │ │ │ +000385e0: 4576 616c 5061 7463 6865 733c 2f61 3e3c EvalPatches< │ │ │ │ +000385f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    bool Ev │ │ │ │ +00038610: 616c 5061 7463 6865 7328 636c 5f6d 656d alPatches(cl_mem │ │ │ │ +00038620: 2073 7263 2c20 4275 6666 6572 4465 7363 src, BufferDesc │ │ │ │ +00038630: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +00038640: 703b 7372 6344 6573 632c 2063 6c5f 6d65 p;srcDesc, cl_me │ │ │ │ +00038650: 6d20 6473 742c 2042 7566 6665 7244 6573 m dst, BufferDes │ │ │ │ +00038660: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00038670: 6d70 3b64 7374 4465 7363 2c20 636c 5f6d mp;dstDesc, cl_m │ │ │ │ +00038680: 656d 2064 752c 2042 7566 6665 7244 6573 em du, BufferDes │ │ │ │ +00038690: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +000386a0: 6d70 3b64 7544 6573 632c 2063 6c5f 6d65 mp;duDesc, cl_me │ │ │ │ +000386b0: 6d20 6476 2c20 4275 6666 6572 4465 7363 m dv, BufferDesc │ │ │ │ +000386c0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +000386d0: 703b 6476 4465 7363 2c20 636c 5f6d 656d p;dvDesc, cl_mem │ │ │ │ +000386e0: 2064 7575 2c20 4275 6666 6572 4465 7363 duu, BufferDesc │ │ │ │ +000386f0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +00038700: 703b 6475 7544 6573 632c 2063 6c5f 6d65 p;duuDesc, cl_me │ │ │ │ +00038710: 6d20 6475 762c 2042 7566 6665 7244 6573 m duv, BufferDes │ │ │ │ +00038720: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00038730: 6d70 3b64 7576 4465 7363 2c20 636c 5f6d mp;duvDesc, cl_m │ │ │ │ +00038740: 656d 2064 7676 2c20 4275 6666 6572 4465 em dvv, BufferDe │ │ │ │ +00038750: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +00038760: 616d 703b 6476 7644 6573 632c 2069 6e74 amp;dvvDesc, int │ │ │ │ +00038770: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ +00038780: 2063 6c5f 6d65 6d20 7061 7463 6843 6f6f cl_mem patchCoo │ │ │ │ +00038790: 7264 7342 7566 6665 722c 2063 6c5f 6d65 rdsBuffer, cl_me │ │ │ │ +000387a0: 6d20 7061 7463 6841 7272 6179 4275 6666 m patchArrayBuff │ │ │ │ +000387b0: 6572 2c20 636c 5f6d 656d 2070 6174 6368 er, cl_mem patch │ │ │ │ +000387c0: 496e 6465 7842 7566 6665 722c 2063 6c5f IndexBuffer, cl_ │ │ │ │ +000387d0: 6d65 6d20 7061 7463 6850 6172 616d 7342 mem patchParamsB │ │ │ │ +000387e0: 7566 6665 722c 2075 6e73 6967 6e65 6420 uffer, unsigned │ │ │ │ +000387f0: 696e 7420 6e75 6d53 7461 7274 4576 656e int numStartEven │ │ │ │ +00038800: 7473 3d30 2c20 636f 6e73 7420 636c 5f65 ts=0, const cl_e │ │ │ │ +00038810: 7665 6e74 202a 7374 6172 7445 7665 6e74 vent *startEvent │ │ │ │ +00038820: 733d 4e55 4c4c 2c20 636c 5f65 7665 6e74 s=NULL, cl_event │ │ │ │ +00038830: 202a 656e 6445 7665 6e74 3d4e 554c 4c29 *endEvent=NULL) │ │ │ │ +00038840: 2063 6f6e 7374 3c2f 6469 763e 3c2f 6469 const
    .
    │ │ │ │ +00038940: 626f 6f6c 2045 7661 6c53 7465 6e63 696c bool EvalStencil │ │ │ │ +00038950: 7328 636c 5f6d 656d 2073 7263 2c20 4275 s(cl_mem src, Bu │ │ │ │ +00038960: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00038970: 6f6e 7374 2026 616d 703b 7372 6344 6573 onst &srcDes │ │ │ │ +00038980: 632c 2063 6c5f 6d65 6d20 6473 742c 2042 c, cl_mem dst, B │ │ │ │ +00038990: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +000389a0: 636f 6e73 7420 2661 6d70 3b64 7374 4465 const &dstDe │ │ │ │ +000389b0: 7363 2c20 636c 5f6d 656d 2064 752c 2042 sc, cl_mem du, B │ │ │ │ +000389c0: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +000389d0: 636f 6e73 7420 2661 6d70 3b64 7544 6573 const &duDes │ │ │ │ +000389e0: 632c 2063 6c5f 6d65 6d20 6476 2c20 4275 c, cl_mem dv, Bu │ │ │ │ +000389f0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00038a00: 6f6e 7374 2026 616d 703b 6476 4465 7363 onst &dvDesc │ │ │ │ +00038a10: 2c20 636c 5f6d 656d 2064 7575 2c20 4275 , cl_mem duu, Bu │ │ │ │ +00038a20: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00038a30: 6f6e 7374 2026 616d 703b 6475 7544 6573 onst &duuDes │ │ │ │ +00038a40: 632c 2063 6c5f 6d65 6d20 6475 762c 2042 c, cl_mem duv, B │ │ │ │ +00038a50: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +00038a60: 636f 6e73 7420 2661 6d70 3b64 7576 4465 const &duvDe │ │ │ │ +00038a70: 7363 2c20 636c 5f6d 656d 2064 7676 2c20 sc, cl_mem dvv, │ │ │ │ +00038a80: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00038a90: 2063 6f6e 7374 2026 616d 703b 6476 7644 const &dvvD │ │ │ │ +00038aa0: 6573 632c 2063 6c5f 6d65 6d20 7369 7a65 esc, cl_mem size │ │ │ │ +00038ab0: 732c 2063 6c5f 6d65 6d20 6f66 6673 6574 s, cl_mem offset │ │ │ │ +00038ac0: 732c 2063 6c5f 6d65 6d20 696e 6469 6365 s, cl_mem indice │ │ │ │ +00038ad0: 732c 2063 6c5f 6d65 6d20 7765 6967 6874 s, cl_mem weight │ │ │ │ +00038ae0: 732c 2063 6c5f 6d65 6d20 6475 5765 6967 s, cl_mem duWeig │ │ │ │ +00038af0: 6874 732c 2063 6c5f 6d65 6d20 6476 5765 hts, cl_mem dvWe │ │ │ │ +00038b00: 6967 6874 732c 2063 6c5f 6d65 6d20 6475 ights, cl_mem du │ │ │ │ +00038b10: 7557 6569 6768 7473 2c20 636c 5f6d 656d uWeights, cl_mem │ │ │ │ +00038b20: 2064 7576 5765 6967 6874 732c 2063 6c5f duvWeights, cl_ │ │ │ │ +00038b30: 6d65 6d20 6476 7657 6569 6768 7473 2c20 mem dvvWeights, │ │ │ │ +00038b40: 696e 7420 7374 6172 742c 2069 6e74 2065 int start, int e │ │ │ │ +00038b50: 6e64 2c20 756e 7369 676e 6564 2069 6e74 nd, unsigned int │ │ │ │ +00038b60: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +00038b70: 302c 2063 6f6e 7374 2063 6c5f 6576 656e 0, const cl_even │ │ │ │ +00038b80: 7420 2a73 7461 7274 4576 656e 7473 3d4e t *startEvents=N │ │ │ │ +00038b90: 554c 4c2c 2063 6c5f 6576 656e 7420 2a65 ULL, cl_event *e │ │ │ │ +00038ba0: 6e64 4576 656e 743d 4e55 4c4c 2920 636f ndEvent=NULL) co │ │ │ │ +00038bb0: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    Disp │ │ │ │ +00038bd0: 6174 6368 2074 6865 2043 4c20 636f 6d70 atch the CL comp │ │ │ │ +00038be0: 7574 6520 6b65 726e 656c 2061 7379 6e63 ute kernel async │ │ │ │ +00038bf0: 6872 6f6e 6f75 736c 792e 2072 6574 7572 hronously. retur │ │ │ │ +00038c00: 6e73 2066 616c 7365 2069 6620 7468 6520 ns false if the │ │ │ │ +00038c10: 6b65 726e 656c 2068 6173 6e27 7420 6265 kernel hasn't be │ │ │ │ +00038c20: 656e 2063 6f6d 7069 6c65 6420 7965 742e en compiled yet. │ │ │ │ +00038c30: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ │ +00038d20: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool EvalPat │ │ │ │ +00038d40: 6368 6573 4661 6365 5661 7279 696e 6728 chesFaceVarying( │ │ │ │ +00038d50: 5352 435f 4255 4646 4552 202a 7372 6342 SRC_BUFFER *srcB │ │ │ │ +00038d60: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +00038d70: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +00038d80: 6d70 3b73 7263 4465 7363 2c20 4453 545f mp;srcDesc, DST_ │ │ │ │ +00038d90: 4255 4646 4552 202a 6473 7442 7566 6665 BUFFER *dstBuffe │ │ │ │ +00038da0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00038db0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00038dc0: 7374 4465 7363 2c20 4453 545f 4255 4646 stDesc, DST_BUFF │ │ │ │ +00038dd0: 4552 202a 6475 4275 6666 6572 2c20 4275 ER *duBuffer, Bu │ │ │ │ +00038de0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00038df0: 6f6e 7374 2026 616d 703b 6475 4465 7363 onst &duDesc │ │ │ │ +00038e00: 2c20 4453 545f 4255 4646 4552 202a 6476 , DST_BUFFER *dv │ │ │ │ +00038e10: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +00038e20: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +00038e30: 616d 703b 6476 4465 7363 2c20 4453 545f amp;dvDesc, DST_ │ │ │ │ +00038e40: 4255 4646 4552 202a 6475 7542 7566 6665 BUFFER *duuBuffe │ │ │ │ +00038e50: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00038e60: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00038e70: 7575 4465 7363 2c20 4453 545f 4255 4646 uuDesc, DST_BUFF │ │ │ │ +00038e80: 4552 202a 6475 7642 7566 6665 722c 2042 ER *duvBuffer, B │ │ │ │ +00038e90: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +00038ea0: 636f 6e73 7420 2661 6d70 3b64 7576 4465 const &duvDe │ │ │ │ +00038eb0: 7363 2c20 4453 545f 4255 4646 4552 202a sc, DST_BUFFER * │ │ │ │ +00038ec0: 6476 7642 7566 6665 722c 2042 7566 6665 dvvBuffer, Buffe │ │ │ │ +00038ed0: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +00038ee0: 7420 2661 6d70 3b64 7676 4465 7363 2c20 t &dvvDesc, │ │ │ │ +00038ef0: 696e 7420 6e75 6d50 6174 6368 436f 6f72 int numPatchCoor │ │ │ │ +00038f00: 6473 2c20 5041 5443 4843 4f4f 5244 5f42 ds, PATCHCOORD_B │ │ │ │ +00038f10: 5546 4645 5220 2a70 6174 6368 436f 6f72 UFFER *patchCoor │ │ │ │ +00038f20: 6473 2c20 5041 5443 485f 5441 424c 4520 ds, PATCH_TABLE │ │ │ │ +00038f30: 2a70 6174 6368 5461 626c 652c 2069 6e74 *patchTable, int │ │ │ │ +00038f40: 2066 7661 7243 6861 6e6e 656c 3d30 2c20 fvarChannel=0, │ │ │ │ +00038f50: 756e 7369 676e 6564 2069 6e74 206e 756d unsigned int num │ │ │ │ +00038f60: 5374 6172 7445 7665 6e74 733d 302c 2063 StartEvents=0, c │ │ │ │ +00038f70: 6f6e 7374 2063 6c5f 6576 656e 7420 2a73 onst cl_event *s │ │ │ │ +00038f80: 7461 7274 4576 656e 7473 3d4e 554c 4c2c tartEvents=NULL, │ │ │ │ +00038f90: 2063 6c5f 6576 656e 7420 2a65 6e64 4576 cl_event *endEv │ │ │ │ +00038fa0: 656e 743d 4e55 4c4c 2920 636f 6e73 743c ent=NULL) const< │ │ │ │ +00038fb0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Generic │ │ │ │ +00038fd0: 6c69 6d69 7420 6576 616c 2066 756e 6374 limit eval funct │ │ │ │ +00038fe0: 696f 6e2e 2054 6869 7320 6675 6e63 7469 ion. This functi │ │ │ │ +00038ff0: 6f6e 2068 6173 2061 2073 616d 6520 7369 on has a same si │ │ │ │ +00039000: 676e 6174 7572 6520 6173 206f 7468 6572 gnature as other │ │ │ │ +00039010: 2064 6576 6963 6520 6b65 726e 656c 7320 device kernels │ │ │ │ +00039020: 6861 7665 2073 6f20 7468 6174 202e 2e2e have so that ... │ │ │ │ +00039030: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    .
    bo │ │ │ │ +00039190: 6f6c 2045 7661 6c50 6174 6368 6573 2853 ol EvalPatches(S │ │ │ │ +000391a0: 5243 5f42 5546 4645 5220 2a73 7263 4275 RC_BUFFER *srcBu │ │ │ │ +000391b0: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +000391c0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +000391d0: 703b 7372 6344 6573 632c 2044 5354 5f42 p;srcDesc, DST_B │ │ │ │ +000391e0: 5546 4645 5220 2a64 7374 4275 6666 6572 UFFER *dstBuffer │ │ │ │ +000391f0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +00039200: 6f72 2063 6f6e 7374 2026 616d 703b 6473 or const &ds │ │ │ │ +00039210: 7444 6573 632c 2069 6e74 206e 756d 5061 tDesc, int numPa │ │ │ │ +00039220: 7463 6843 6f6f 7264 732c 2050 4154 4348 tchCoords, PATCH │ │ │ │ +00039230: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ +00039240: 7463 6843 6f6f 7264 732c 2050 4154 4348 tchCoords, PATCH │ │ │ │ +00039250: 5f54 4142 4c45 202a 7061 7463 6854 6162 _TABLE *patchTab │ │ │ │ +00039260: 6c65 2c20 756e 7369 676e 6564 2069 6e74 le, unsigned int │ │ │ │ +00039270: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +00039280: 302c 2063 6f6e 7374 2063 6c5f 6576 656e 0, const cl_even │ │ │ │ +00039290: 7420 2a73 7461 7274 4576 656e 7473 3d4e t *startEvents=N │ │ │ │ +000392a0: 554c 4c2c 2063 6c5f 6576 656e 7420 2a65 ULL, cl_event *e │ │ │ │ +000392b0: 6e64 4576 656e 743d 4e55 4c4c 2920 636f ndEvent=NULL) co │ │ │ │ +000392c0: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    Gene │ │ │ │ +000392e0: 7269 6320 6c69 6d69 7420 6576 616c 2066 ric limit eval f │ │ │ │ +000392f0: 756e 6374 696f 6e2e 2054 6869 7320 6675 unction. This fu │ │ │ │ +00039300: 6e63 7469 6f6e 2068 6173 2061 2073 616d nction has a sam │ │ │ │ +00039310: 6520 7369 676e 6174 7572 6520 6173 206f e signature as o │ │ │ │ +00039320: 7468 6572 2064 6576 6963 6520 6b65 726e ther device kern │ │ │ │ +00039330: 656c 7320 6861 7665 2073 6f20 7468 6174 els have so that │ │ │ │ +00039340: 202e 2e2e 3c2f 6469 763e 3c64 6976 2063 ...
    │ │ │ │ +00039360: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ +00039370: 6120 6872 6566 3d22 6130 3037 3334 5f73 a href="a00734_s │ │ │ │ +00039380: 6f75 7263 652e 6874 6d6c 236c 3031 3231 ource.html#l0121 │ │ │ │ +00039390: 3722 3e63 6c45 7661 6c75 6174 6f72 2e68 7">clEvaluator.h │ │ │ │ +000393a0: 3a31 3231 373c 2f61 3e3c 2f64 6976 3e3c :1217
    < │ │ │ │ +000393b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00039410: 6120 6872 6566 3d22 6130 3131 3431 2e68 a href="a01141.h │ │ │ │ +00039420: 746d 6c23 6137 3462 3266 3431 3036 3066 tml#a74b2f41060f │ │ │ │ +00039430: 3462 6331 3766 3335 3232 3434 3464 3330 4bc17f3522444d30 │ │ │ │ +00039440: 3132 3662 3622 3e4f 7065 6e53 7562 6469 126b6">OpenSubdi │ │ │ │ +00039450: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +00039460: 5253 494f 4e3a 3a4f 7364 3a3a 434c 4576 RSION::Osd::CLEv │ │ │ │ +00039470: 616c 7561 746f 723a 3a45 7661 6c53 7465 aluator::EvalSte │ │ │ │ +00039480: 6e63 696c 733c 2f61 3e3c 2f64 6976 3e3c ncils
    < │ │ │ │ +00039490: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +000394a0: 6922 3e62 6f6f 6c20 4576 616c 5374 656e i">bool EvalSten │ │ │ │ +000394b0: 6369 6c73 2853 5243 5f42 5546 4645 5220 cils(SRC_BUFFER │ │ │ │ +000394c0: 2a73 7263 4275 6666 6572 2c20 4275 6666 *srcBuffer, Buff │ │ │ │ +000394d0: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +000394e0: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ +000394f0: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ +00039500: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +00039510: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +00039520: 616d 703b 6473 7444 6573 632c 2044 5354 amp;dstDesc, DST │ │ │ │ +00039530: 5f42 5546 4645 5220 2a64 7542 7566 6665 _BUFFER *duBuffe │ │ │ │ +00039540: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00039550: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00039560: 7544 6573 632c 2044 5354 5f42 5546 4645 uDesc, DST_BUFFE │ │ │ │ +00039570: 5220 2a64 7642 7566 6665 722c 2042 7566 R *dvBuffer, Buf │ │ │ │ +00039580: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +00039590: 6e73 7420 2661 6d70 3b64 7644 6573 632c nst &dvDesc, │ │ │ │ +000395a0: 2044 5354 5f42 5546 4645 5220 2a64 7575 DST_BUFFER *duu │ │ │ │ +000395b0: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +000395c0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +000395d0: 616d 703b 6475 7544 6573 632c 2044 5354 amp;duuDesc, DST │ │ │ │ +000395e0: 5f42 5546 4645 5220 2a64 7576 4275 6666 _BUFFER *duvBuff │ │ │ │ +000395f0: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +00039600: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +00039610: 6475 7644 6573 632c 2044 5354 5f42 5546 duvDesc, DST_BUF │ │ │ │ +00039620: 4645 5220 2a64 7676 4275 6666 6572 2c20 FER *dvvBuffer, │ │ │ │ +00039630: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +00039640: 2063 6f6e 7374 2026 616d 703b 6476 7644 const &dvvD │ │ │ │ +00039650: 6573 632c 2053 5445 4e43 494c 5f54 4142 esc, STENCIL_TAB │ │ │ │ +00039660: 4c45 2063 6f6e 7374 202a 7374 656e 6369 LE const *stenci │ │ │ │ +00039670: 6c54 6162 6c65 2c20 756e 7369 676e 6564 lTable, unsigned │ │ │ │ +00039680: 2069 6e74 206e 756d 5374 6172 7445 7665 int numStartEve │ │ │ │ +00039690: 6e74 733d 302c 2063 6f6e 7374 2063 6c5f nts=0, const cl_ │ │ │ │ +000396a0: 6576 656e 7420 2a73 7461 7274 4576 656e event *startEven │ │ │ │ +000396b0: 7473 3d4e 554c 4c2c 2063 6c5f 6576 656e ts=NULL, cl_even │ │ │ │ +000396c0: 7420 2a65 6e64 4576 656e 743d 4e55 4c4c t *endEvent=NULL │ │ │ │ +000396d0: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ │ +000396f0: 4765 6e65 7269 6320 7374 656e 6369 6c20 Generic stencil │ │ │ │ +00039700: 6675 6e63 7469 6f6e 2e3c 2f64 6976 3e3c function.
    < │ │ │ │ +00039710: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00039720: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +00039730: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +00039760: 746f 722e 683a 3634 363c 2f61 3e3c 2f64 tor.h:646
    .
    sta │ │ │ │ +00039870: 7469 6320 626f 6f6c 2045 7661 6c50 6174 tic bool EvalPat │ │ │ │ +00039880: 6368 6573 5661 7279 696e 6728 5352 435f chesVarying(SRC_ │ │ │ │ +00039890: 4255 4646 4552 202a 7372 6342 7566 6665 BUFFER *srcBuffe │ │ │ │ +000398a0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +000398b0: 746f 7220 636f 6e73 7420 2661 6d70 3b73 tor const &s │ │ │ │ +000398c0: 7263 4465 7363 2c20 4453 545f 4255 4646 rcDesc, DST_BUFF │ │ │ │ +000398d0: 4552 202a 6473 7442 7566 6665 722c 2042 ER *dstBuffer, B │ │ │ │ +000398e0: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +000398f0: 636f 6e73 7420 2661 6d70 3b64 7374 4465 const &dstDe │ │ │ │ +00039900: 7363 2c20 4453 545f 4255 4646 4552 202a sc, DST_BUFFER * │ │ │ │ +00039910: 6475 4275 6666 6572 2c20 4275 6666 6572 duBuffer, Buffer │ │ │ │ +00039920: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00039930: 2026 616d 703b 6475 4465 7363 2c20 4453 &duDesc, DS │ │ │ │ +00039940: 545f 4255 4646 4552 202a 6476 4275 6666 T_BUFFER *dvBuff │ │ │ │ +00039950: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +00039960: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +00039970: 6476 4465 7363 2c20 696e 7420 6e75 6d50 dvDesc, int numP │ │ │ │ +00039980: 6174 6368 436f 6f72 6473 2c20 5041 5443 atchCoords, PATC │ │ │ │ +00039990: 4843 4f4f 5244 5f42 5546 4645 5220 2a70 HCOORD_BUFFER *p │ │ │ │ +000399a0: 6174 6368 436f 6f72 6473 2c20 5041 5443 atchCoords, PATC │ │ │ │ +000399b0: 485f 5441 424c 4520 2a70 6174 6368 5461 H_TABLE *patchTa │ │ │ │ +000399c0: 626c 652c 2043 4c45 7661 6c75 6174 6f72 ble, CLEvaluator │ │ │ │ +000399d0: 2063 6f6e 7374 202a 696e 7374 616e 6365 const *instance │ │ │ │ +000399e0: 2c20 4445 5649 4345 5f43 4f4e 5445 5854 , DEVICE_CONTEXT │ │ │ │ +000399f0: 2064 6576 6963 6543 6f6e 7465 7874 2c20 deviceContext, │ │ │ │ +00039a00: 756e 7369 676e 6564 2069 6e74 206e 756d unsigned int num │ │ │ │ +00039a10: 5374 6172 7445 7665 6e74 733d 302c 2063 StartEvents=0, c │ │ │ │ +00039a20: 6f6e 7374 2063 6c5f 6576 656e 7420 2a73 onst cl_event *s │ │ │ │ +00039a30: 7461 7274 4576 656e 7473 3d4e 554c 4c2c tartEvents=NULL, │ │ │ │ +00039a40: 2063 6c5f 6576 656e 7420 2a65 6e64 4576 cl_event *endEv │ │ │ │ +00039a50: 656e 743d 4e55 4c4c 293c 2f64 6976 3e3c ent=NULL)
    < │ │ │ │ +00039a60: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00039a70: 223e 4765 6e65 7269 6320 6c69 6d69 7420 ">Generic limit │ │ │ │ +00039a80: 6576 616c 2066 756e 6374 696f 6e2e 2054 eval function. T │ │ │ │ +00039a90: 6869 7320 6675 6e63 7469 6f6e 2068 6173 his function has │ │ │ │ +00039aa0: 2061 2073 616d 6520 7369 676e 6174 7572 a same signatur │ │ │ │ +00039ab0: 6520 6173 206f 7468 6572 2064 6576 6963 e as other devic │ │ │ │ +00039ac0: 6520 6b65 726e 656c 7320 6861 7665 2073 e kernels have s │ │ │ │ +00039ad0: 6f20 7468 6174 202e 2e2e 3c2f 6469 763e o that ...
    │ │ │ │ +00039ae0: 3c64 6976 2063 6c61 7373 3d22 7474 6465 .
    Ope │ │ │ │ +00039be0: 6e53 7562 6469 763a 3a4f 5045 4e53 5542 nSubdiv::OPENSUB │ │ │ │ +00039bf0: 4449 565f 5645 5253 494f 4e3a 3a4f 7364 DIV_VERSION::Osd │ │ │ │ +00039c00: 3a3a 434c 4576 616c 7561 746f 723a 3a53 ::CLEvaluator::S │ │ │ │ +00039c10: 796e 6368 726f 6e69 7a65 3c2f 613e 3c2f ynchronize
    static v │ │ │ │ +00039c40: 6f69 6420 5379 6e63 6872 6f6e 697a 6528 oid Synchronize( │ │ │ │ +00039c50: 4445 5649 4345 5f43 4f4e 5445 5854 2064 DEVICE_CONTEXT d │ │ │ │ +00039c60: 6576 6963 6543 6f6e 7465 7874 293c 2f64 eviceContext)
    Wait the O │ │ │ │ +00039c90: 7065 6e43 4c20 6b65 726e 656c 7320 6669 penCL kernels fi │ │ │ │ +00039ca0: 6e69 7368 2e3c 2f64 6976 3e3c 6469 7620 nish.
    Definition │ │ │ │ +00039cd0: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +00039d00: 683a 3236 3133 3c2f 613e 3c2f 6469 763e h:2613
    │ │ │ │ +00039d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +00039df0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00039e00: 6922 3e73 7461 7469 6320 626f 6f6c 2045 i">static bool E │ │ │ │ +00039e10: 7661 6c50 6174 6368 6573 2853 5243 5f42 valPatches(SRC_B │ │ │ │ +00039e20: 5546 4645 5220 2a73 7263 4275 6666 6572 UFFER *srcBuffer │ │ │ │ +00039e30: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +00039e40: 6f72 2063 6f6e 7374 2026 616d 703b 7372 or const &sr │ │ │ │ +00039e50: 6344 6573 632c 2044 5354 5f42 5546 4645 cDesc, DST_BUFFE │ │ │ │ +00039e60: 5220 2a64 7374 4275 6666 6572 2c20 4275 R *dstBuffer, Bu │ │ │ │ +00039e70: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00039e80: 6f6e 7374 2026 616d 703b 6473 7444 6573 onst &dstDes │ │ │ │ +00039e90: 632c 2044 5354 5f42 5546 4645 5220 2a64 c, DST_BUFFER *d │ │ │ │ +00039ea0: 7542 7566 6665 722c 2042 7566 6665 7244 uBuffer, BufferD │ │ │ │ +00039eb0: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +00039ec0: 2661 6d70 3b64 7544 6573 632c 2044 5354 &duDesc, DST │ │ │ │ +00039ed0: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ +00039ee0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +00039ef0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +00039f00: 7644 6573 632c 2044 5354 5f42 5546 4645 vDesc, DST_BUFFE │ │ │ │ +00039f10: 5220 2a64 7575 4275 6666 6572 2c20 4275 R *duuBuffer, Bu │ │ │ │ +00039f20: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +00039f30: 6f6e 7374 2026 616d 703b 6475 7544 6573 onst &duuDes │ │ │ │ +00039f40: 632c 2044 5354 5f42 5546 4645 5220 2a64 c, DST_BUFFER *d │ │ │ │ +00039f50: 7576 4275 6666 6572 2c20 4275 6666 6572 uvBuffer, Buffer │ │ │ │ +00039f60: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +00039f70: 2026 616d 703b 6475 7644 6573 632c 2044 &duvDesc, D │ │ │ │ +00039f80: 5354 5f42 5546 4645 5220 2a64 7676 4275 ST_BUFFER *dvvBu │ │ │ │ +00039f90: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +00039fa0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +00039fb0: 703b 6476 7644 6573 632c 2069 6e74 206e p;dvvDesc, int n │ │ │ │ +00039fc0: 756d 5061 7463 6843 6f6f 7264 732c 2050 umPatchCoords, P │ │ │ │ +00039fd0: 4154 4348 434f 4f52 445f 4255 4646 4552 ATCHCOORD_BUFFER │ │ │ │ +00039fe0: 202a 7061 7463 6843 6f6f 7264 732c 2050 *patchCoords, P │ │ │ │ +00039ff0: 4154 4348 5f54 4142 4c45 202a 7061 7463 ATCH_TABLE *patc │ │ │ │ +0003a000: 6854 6162 6c65 2c20 434c 4576 616c 7561 hTable, CLEvalua │ │ │ │ +0003a010: 746f 7220 636f 6e73 7420 2a69 6e73 7461 tor const *insta │ │ │ │ +0003a020: 6e63 652c 2044 4556 4943 455f 434f 4e54 nce, DEVICE_CONT │ │ │ │ +0003a030: 4558 5420 6465 7669 6365 436f 6e74 6578 EXT deviceContex │ │ │ │ +0003a040: 742c 2075 6e73 6967 6e65 6420 696e 7420 t, unsigned int │ │ │ │ +0003a050: 6e75 6d53 7461 7274 4576 656e 7473 3d30 numStartEvents=0 │ │ │ │ +0003a060: 2c20 636f 6e73 7420 636c 5f65 7665 6e74 , const cl_event │ │ │ │ +0003a070: 202a 7374 6172 7445 7665 6e74 733d 4e55 *startEvents=NU │ │ │ │ +0003a080: 4c4c 2c20 636c 5f65 7665 6e74 202a 656e LL, cl_event *en │ │ │ │ +0003a090: 6445 7665 6e74 3d4e 554c 4c29 3c2f 6469 dEvent=NULL)
    Generic lim │ │ │ │ +0003a0c0: 6974 2065 7661 6c20 6675 6e63 7469 6f6e it eval function │ │ │ │ +0003a0d0: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ │ +0003a0e0: 6861 7320 6120 7361 6d65 2073 6967 6e61 has a same signa │ │ │ │ +0003a0f0: 7475 7265 2061 7320 6f74 6865 7220 6465 ture as other de │ │ │ │ +0003a100: 7669 6365 206b 6572 6e65 6c73 2068 6176 vice kernels hav │ │ │ │ +0003a110: 6520 736f 2074 6861 7420 2e2e 2e3c 2f64 e so that ...
    Definit │ │ │ │ +0003a140: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion clEv │ │ │ │ +0003a170: 616c 7561 746f 722e 683a 3131 3235 3c2f aluator.h:1125
    .< │ │ │ │ +0003a190: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0003a1a0: 6964 3d22 6161 3031 3134 315f 6874 6d6c id="aa01141_html │ │ │ │ +0003a1b0: 5f61 3830 3465 3737 6464 6435 3464 3064 _a804e77ddd54d0d │ │ │ │ +0003a1c0: 3030 3666 3232 3734 6430 3435 3063 6361 006f2274d0450cca │ │ │ │ +0003a1d0: 3662 223e 3c64 6976 2063 6c61 7373 3d22 6b">
    stat │ │ │ │ +0003a280: 6963 2062 6f6f 6c20 4576 616c 5374 656e ic bool EvalSten │ │ │ │ +0003a290: 6369 6c73 2853 5243 5f42 5546 4645 5220 cils(SRC_BUFFER │ │ │ │ +0003a2a0: 2a73 7263 4275 6666 6572 2c20 4275 6666 *srcBuffer, Buff │ │ │ │ +0003a2b0: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +0003a2c0: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ +0003a2d0: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ +0003a2e0: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +0003a2f0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003a300: 616d 703b 6473 7444 6573 632c 2044 5354 amp;dstDesc, DST │ │ │ │ +0003a310: 5f42 5546 4645 5220 2a64 7542 7566 6665 _BUFFER *duBuffe │ │ │ │ +0003a320: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +0003a330: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +0003a340: 7544 6573 632c 2044 5354 5f42 5546 4645 uDesc, DST_BUFFE │ │ │ │ +0003a350: 5220 2a64 7642 7566 6665 722c 2042 7566 R *dvBuffer, Buf │ │ │ │ +0003a360: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003a370: 6e73 7420 2661 6d70 3b64 7644 6573 632c nst &dvDesc, │ │ │ │ +0003a380: 2044 5354 5f42 5546 4645 5220 2a64 7575 DST_BUFFER *duu │ │ │ │ +0003a390: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +0003a3a0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003a3b0: 616d 703b 6475 7544 6573 632c 2044 5354 amp;duuDesc, DST │ │ │ │ +0003a3c0: 5f42 5546 4645 5220 2a64 7576 4275 6666 _BUFFER *duvBuff │ │ │ │ +0003a3d0: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +0003a3e0: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +0003a3f0: 6475 7644 6573 632c 2044 5354 5f42 5546 duvDesc, DST_BUF │ │ │ │ +0003a400: 4645 5220 2a64 7676 4275 6666 6572 2c20 FER *dvvBuffer, │ │ │ │ +0003a410: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +0003a420: 2063 6f6e 7374 2026 616d 703b 6476 7644 const &dvvD │ │ │ │ +0003a430: 6573 632c 2053 5445 4e43 494c 5f54 4142 esc, STENCIL_TAB │ │ │ │ +0003a440: 4c45 2063 6f6e 7374 202a 7374 656e 6369 LE const *stenci │ │ │ │ +0003a450: 6c54 6162 6c65 2c20 434c 4576 616c 7561 lTable, CLEvalua │ │ │ │ +0003a460: 746f 7220 636f 6e73 7420 2a69 6e73 7461 tor const *insta │ │ │ │ +0003a470: 6e63 652c 2044 4556 4943 455f 434f 4e54 nce, DEVICE_CONT │ │ │ │ +0003a480: 4558 5420 6465 7669 6365 436f 6e74 6578 EXT deviceContex │ │ │ │ +0003a490: 742c 2075 6e73 6967 6e65 6420 696e 7420 t, unsigned int │ │ │ │ +0003a4a0: 6e75 6d53 7461 7274 4576 656e 7473 3d30 numStartEvents=0 │ │ │ │ +0003a4b0: 2c20 636f 6e73 7420 636c 5f65 7665 6e74 , const cl_event │ │ │ │ +0003a4c0: 202a 7374 6172 7445 7665 6e74 733d 4e55 *startEvents=NU │ │ │ │ +0003a4d0: 4c4c 2c20 636c 5f65 7665 6e74 202a 656e LL, cl_event *en │ │ │ │ +0003a4e0: 6445 7665 6e74 3d4e 554c 4c29 3c2f 6469 dEvent=NULL).
    bool │ │ │ │ +0003a6d0: 4576 616c 5374 656e 6369 6c73 2863 6c5f EvalStencils(cl_ │ │ │ │ +0003a6e0: 6d65 6d20 7372 632c 2042 7566 6665 7244 mem src, BufferD │ │ │ │ +0003a6f0: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +0003a700: 2661 6d70 3b73 7263 4465 7363 2c20 636c &srcDesc, cl │ │ │ │ +0003a710: 5f6d 656d 2064 7374 2c20 4275 6666 6572 _mem dst, Buffer │ │ │ │ +0003a720: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +0003a730: 2026 616d 703b 6473 7444 6573 632c 2063 &dstDesc, c │ │ │ │ +0003a740: 6c5f 6d65 6d20 7369 7a65 732c 2063 6c5f l_mem sizes, cl_ │ │ │ │ +0003a750: 6d65 6d20 6f66 6673 6574 732c 2063 6c5f mem offsets, cl_ │ │ │ │ +0003a760: 6d65 6d20 696e 6469 6365 732c 2063 6c5f mem indices, cl_ │ │ │ │ +0003a770: 6d65 6d20 7765 6967 6874 732c 2069 6e74 mem weights, int │ │ │ │ +0003a780: 2073 7461 7274 2c20 696e 7420 656e 642c start, int end, │ │ │ │ +0003a790: 2075 6e73 6967 6e65 6420 696e 7420 6e75 unsigned int nu │ │ │ │ +0003a7a0: 6d53 7461 7274 4576 656e 7473 3d30 2c20 mStartEvents=0, │ │ │ │ +0003a7b0: 636f 6e73 7420 636c 5f65 7665 6e74 202a const cl_event * │ │ │ │ +0003a7c0: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +0003a7d0: 2c20 636c 5f65 7665 6e74 202a 656e 6445 , cl_event *endE │ │ │ │ +0003a7e0: 7665 6e74 3d4e 554c 4c29 2063 6f6e 7374 vent=NULL) const │ │ │ │ +0003a7f0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    │ │ │ │ +0003a8f0: 7374 6174 6963 2062 6f6f 6c20 4576 616c static bool Eval │ │ │ │ +0003a900: 5061 7463 6865 7356 6172 7969 6e67 2853 PatchesVarying(S │ │ │ │ +0003a910: 5243 5f42 5546 4645 5220 2a73 7263 4275 RC_BUFFER *srcBu │ │ │ │ +0003a920: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +0003a930: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +0003a940: 703b 7372 6344 6573 632c 2044 5354 5f42 p;srcDesc, DST_B │ │ │ │ +0003a950: 5546 4645 5220 2a64 7374 4275 6666 6572 UFFER *dstBuffer │ │ │ │ +0003a960: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +0003a970: 6f72 2063 6f6e 7374 2026 616d 703b 6473 or const &ds │ │ │ │ +0003a980: 7444 6573 632c 2069 6e74 206e 756d 5061 tDesc, int numPa │ │ │ │ +0003a990: 7463 6843 6f6f 7264 732c 2050 4154 4348 tchCoords, PATCH │ │ │ │ +0003a9a0: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ +0003a9b0: 7463 6843 6f6f 7264 732c 2050 4154 4348 tchCoords, PATCH │ │ │ │ +0003a9c0: 5f54 4142 4c45 202a 7061 7463 6854 6162 _TABLE *patchTab │ │ │ │ +0003a9d0: 6c65 2c20 434c 4576 616c 7561 746f 7220 le, CLEvaluator │ │ │ │ +0003a9e0: 636f 6e73 7420 2a69 6e73 7461 6e63 652c const *instance, │ │ │ │ +0003a9f0: 2044 4556 4943 455f 434f 4e54 4558 5420 DEVICE_CONTEXT │ │ │ │ +0003aa00: 6465 7669 6365 436f 6e74 6578 742c 2075 deviceContext, u │ │ │ │ +0003aa10: 6e73 6967 6e65 6420 696e 7420 6e75 6d53 nsigned int numS │ │ │ │ +0003aa20: 7461 7274 4576 656e 7473 3d30 2c20 636f tartEvents=0, co │ │ │ │ +0003aa30: 6e73 7420 636c 5f65 7665 6e74 202a 7374 nst cl_event *st │ │ │ │ +0003aa40: 6172 7445 7665 6e74 733d 4e55 4c4c 2c20 artEvents=NULL, │ │ │ │ +0003aa50: 636c 5f65 7665 6e74 202a 656e 6445 7665 cl_event *endEve │ │ │ │ +0003aa60: 6e74 3d4e 554c 4c29 3c2f 6469 763e 3c64 nt=NULL)
    Generic limit e │ │ │ │ +0003aa90: 7661 6c20 6675 6e63 7469 6f6e 2e20 5468 val function. Th │ │ │ │ +0003aaa0: 6973 2066 756e 6374 696f 6e20 6861 7320 is function has │ │ │ │ +0003aab0: 6120 7361 6d65 2073 6967 6e61 7475 7265 a same signature │ │ │ │ +0003aac0: 2061 7320 6f74 6865 7220 6465 7669 6365 as other device │ │ │ │ +0003aad0: 206b 6572 6e65 6c73 2068 6176 6520 736f kernels have so │ │ │ │ +0003aae0: 2074 6861 7420 2e2e 2e3c 2f64 6976 3e3c that ...
    < │ │ │ │ +0003aaf0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +0003ab00: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +0003ab10: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +0003ab40: 746f 722e 683a 3134 3839 3c2f 613e 3c2f tor.h:1489
    .
    │ │ │ │ +0003aba0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 bool EvalPatch │ │ │ │ +0003ac60: 6573 4661 6365 5661 7279 696e 6728 5352 esFaceVarying(SR │ │ │ │ +0003ac70: 435f 4255 4646 4552 202a 7372 6342 7566 C_BUFFER *srcBuf │ │ │ │ +0003ac80: 6665 722c 2042 7566 6665 7244 6573 6372 fer, BufferDescr │ │ │ │ +0003ac90: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +0003aca0: 3b73 7263 4465 7363 2c20 4453 545f 4255 ;srcDesc, DST_BU │ │ │ │ +0003acb0: 4646 4552 202a 6473 7442 7566 6665 722c FFER *dstBuffer, │ │ │ │ +0003acc0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +0003acd0: 7220 636f 6e73 7420 2661 6d70 3b64 7374 r const &dst │ │ │ │ +0003ace0: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ +0003acf0: 202a 6475 4275 6666 6572 2c20 4275 6666 *duBuffer, Buff │ │ │ │ +0003ad00: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +0003ad10: 7374 2026 616d 703b 6475 4465 7363 2c20 st &duDesc, │ │ │ │ +0003ad20: 4453 545f 4255 4646 4552 202a 6476 4275 DST_BUFFER *dvBu │ │ │ │ +0003ad30: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +0003ad40: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +0003ad50: 703b 6476 4465 7363 2c20 696e 7420 6e75 p;dvDesc, int nu │ │ │ │ +0003ad60: 6d50 6174 6368 436f 6f72 6473 2c20 5041 mPatchCoords, PA │ │ │ │ +0003ad70: 5443 4843 4f4f 5244 5f42 5546 4645 5220 TCHCOORD_BUFFER │ │ │ │ +0003ad80: 2a70 6174 6368 436f 6f72 6473 2c20 5041 *patchCoords, PA │ │ │ │ +0003ad90: 5443 485f 5441 424c 4520 2a70 6174 6368 TCH_TABLE *patch │ │ │ │ +0003ada0: 5461 626c 652c 2069 6e74 2066 7661 7243 Table, int fvarC │ │ │ │ +0003adb0: 6861 6e6e 656c 3d30 2c20 756e 7369 676e hannel=0, unsign │ │ │ │ +0003adc0: 6564 2069 6e74 206e 756d 5374 6172 7445 ed int numStartE │ │ │ │ +0003add0: 7665 6e74 733d 302c 2063 6f6e 7374 2063 vents=0, const c │ │ │ │ +0003ade0: 6c5f 6576 656e 7420 2a73 7461 7274 4576 l_event *startEv │ │ │ │ +0003adf0: 656e 7473 3d4e 554c 4c2c 2063 6c5f 6576 ents=NULL, cl_ev │ │ │ │ +0003ae00: 656e 7420 2a65 6e64 4576 656e 743d 4e55 ent *endEvent=NU │ │ │ │ +0003ae10: 4c4c 2920 636f 6e73 743c 2f64 6976 3e3c LL) const
    < │ │ │ │ +0003ae20: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0003ae30: 223e 4765 6e65 7269 6320 6c69 6d69 7420 ">Generic limit │ │ │ │ +0003ae40: 6576 616c 2066 756e 6374 696f 6e2e 2054 eval function. T │ │ │ │ +0003ae50: 6869 7320 6675 6e63 7469 6f6e 2068 6173 his function has │ │ │ │ +0003ae60: 2061 2073 616d 6520 7369 676e 6174 7572 a same signatur │ │ │ │ +0003ae70: 6520 6173 206f 7468 6572 2064 6576 6963 e as other devic │ │ │ │ +0003ae80: 6520 6b65 726e 656c 7320 6861 7665 2073 e kernels have s │ │ │ │ +0003ae90: 6f20 7468 6174 202e 2e2e 3c2f 6469 763e o that ...
    │ │ │ │ +0003aea0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +0003aec0: 3c2f 623e 203c 6120 6872 6566 3d22 6130 clEvalu │ │ │ │ +0003aef0: 6174 6f72 2e68 3a32 3332 393c 2f61 3e3c ator.h:2329< │ │ │ │ +0003af00: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    < │ │ │ │ +0003aff0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0003b000: 6922 3e73 7461 7469 6320 626f 6f6c 2045 i">static bool E │ │ │ │ +0003b010: 7661 6c50 6174 6368 6573 4661 6365 5661 valPatchesFaceVa │ │ │ │ +0003b020: 7279 696e 6728 5352 435f 4255 4646 4552 rying(SRC_BUFFER │ │ │ │ +0003b030: 202a 7372 6342 7566 6665 722c 2042 7566 *srcBuffer, Buf │ │ │ │ +0003b040: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003b050: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ +0003b060: 2c20 4453 545f 4255 4646 4552 202a 6473 , DST_BUFFER *ds │ │ │ │ +0003b070: 7442 7566 6665 722c 2042 7566 6665 7244 tBuffer, BufferD │ │ │ │ +0003b080: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +0003b090: 2661 6d70 3b64 7374 4465 7363 2c20 4453 &dstDesc, DS │ │ │ │ +0003b0a0: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ +0003b0b0: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ +0003b0c0: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ +0003b0d0: 6475 4465 7363 2c20 4453 545f 4255 4646 duDesc, DST_BUFF │ │ │ │ +0003b0e0: 4552 202a 6476 4275 6666 6572 2c20 4275 ER *dvBuffer, Bu │ │ │ │ +0003b0f0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +0003b100: 6f6e 7374 2026 616d 703b 6476 4465 7363 onst &dvDesc │ │ │ │ +0003b110: 2c20 4453 545f 4255 4646 4552 202a 6475 , DST_BUFFER *du │ │ │ │ +0003b120: 7542 7566 6665 722c 2042 7566 6665 7244 uBuffer, BufferD │ │ │ │ +0003b130: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +0003b140: 2661 6d70 3b64 7575 4465 7363 2c20 4453 &duuDesc, DS │ │ │ │ +0003b150: 545f 4255 4646 4552 202a 6475 7642 7566 T_BUFFER *duvBuf │ │ │ │ +0003b160: 6665 722c 2042 7566 6665 7244 6573 6372 fer, BufferDescr │ │ │ │ +0003b170: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +0003b180: 3b64 7576 4465 7363 2c20 4453 545f 4255 ;duvDesc, DST_BU │ │ │ │ +0003b190: 4646 4552 202a 6476 7642 7566 6665 722c FFER *dvvBuffer, │ │ │ │ +0003b1a0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +0003b1b0: 7220 636f 6e73 7420 2661 6d70 3b64 7676 r const &dvv │ │ │ │ +0003b1c0: 4465 7363 2c20 696e 7420 6e75 6d50 6174 Desc, int numPat │ │ │ │ +0003b1d0: 6368 436f 6f72 6473 2c20 5041 5443 4843 chCoords, PATCHC │ │ │ │ +0003b1e0: 4f4f 5244 5f42 5546 4645 5220 2a70 6174 OORD_BUFFER *pat │ │ │ │ +0003b1f0: 6368 436f 6f72 6473 2c20 5041 5443 485f chCoords, PATCH_ │ │ │ │ +0003b200: 5441 424c 4520 2a70 6174 6368 5461 626c TABLE *patchTabl │ │ │ │ +0003b210: 652c 2069 6e74 2066 7661 7243 6861 6e6e e, int fvarChann │ │ │ │ +0003b220: 656c 2c20 434c 4576 616c 7561 746f 7220 el, CLEvaluator │ │ │ │ +0003b230: 636f 6e73 7420 2a69 6e73 7461 6e63 652c const *instance, │ │ │ │ +0003b240: 2044 4556 4943 455f 434f 4e54 4558 5420 DEVICE_CONTEXT │ │ │ │ +0003b250: 6465 7669 6365 436f 6e74 6578 742c 2075 deviceContext, u │ │ │ │ +0003b260: 6e73 6967 6e65 6420 696e 7420 6e75 6d53 nsigned int numS │ │ │ │ +0003b270: 7461 7274 4576 656e 7473 3d30 2c20 636f tartEvents=0, co │ │ │ │ +0003b280: 6e73 7420 636c 5f65 7665 6e74 202a 7374 nst cl_event *st │ │ │ │ +0003b290: 6172 7445 7665 6e74 733d 4e55 4c4c 2c20 artEvents=NULL, │ │ │ │ +0003b2a0: 636c 5f65 7665 6e74 202a 656e 6445 7665 cl_event *endEve │ │ │ │ +0003b2b0: 6e74 3d4e 554c 4c29 3c2f 6469 763e 3c64 nt=NULL)
    Generic limit e │ │ │ │ +0003b2e0: 7661 6c20 6675 6e63 7469 6f6e 2e20 5468 val function. Th │ │ │ │ +0003b2f0: 6973 2066 756e 6374 696f 6e20 6861 7320 is function has │ │ │ │ +0003b300: 6120 7361 6d65 2073 6967 6e61 7475 7265 a same signature │ │ │ │ +0003b310: 2061 7320 6f74 6865 7220 6465 7669 6365 as other device │ │ │ │ +0003b320: 206b 6572 6e65 6c73 2068 6176 6520 736f kernels have so │ │ │ │ +0003b330: 2074 6861 7420 2e2e 2e3c 2f64 6976 3e3c that ...
    < │ │ │ │ +0003b340: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +0003b350: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +0003b360: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +0003b390: 746f 722e 683a 3234 3337 3c2f 613e 3c2f tor.h:2437
    .
    │ │ │ │ +0003b3f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 static CLEvalu │ │ │ │ +0003b4a0: 6174 6f72 202a 2043 7265 6174 6528 4275 ator * Create(Bu │ │ │ │ +0003b4b0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +0003b4c0: 6f6e 7374 2026 616d 703b 7372 6344 6573 onst &srcDes │ │ │ │ +0003b4d0: 632c 2042 7566 6665 7244 6573 6372 6970 c, BufferDescrip │ │ │ │ +0003b4e0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +0003b4f0: 7374 4465 7363 2c20 4275 6666 6572 4465 stDesc, BufferDe │ │ │ │ +0003b500: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003b510: 616d 703b 6475 4465 7363 2c20 4275 6666 amp;duDesc, Buff │ │ │ │ +0003b520: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +0003b530: 7374 2026 616d 703b 6476 4465 7363 2c20 st &dvDesc, │ │ │ │ +0003b540: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ +0003b550: 2063 6f6e 7374 2026 616d 703b 6475 7544 const &duuD │ │ │ │ +0003b560: 6573 632c 2042 7566 6665 7244 6573 6372 esc, BufferDescr │ │ │ │ +0003b570: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +0003b580: 3b64 7576 4465 7363 2c20 4275 6666 6572 ;duvDesc, Buffer │ │ │ │ +0003b590: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +0003b5a0: 2026 616d 703b 6476 7644 6573 632c 2063 &dvvDesc, c │ │ │ │ +0003b5b0: 6c5f 636f 6e74 6578 7420 636c 436f 6e74 l_context clCont │ │ │ │ +0003b5c0: 6578 742c 2063 6c5f 636f 6d6d 616e 645f ext, cl_command_ │ │ │ │ +0003b5d0: 7175 6575 6520 636c 436f 6d6d 616e 6451 queue clCommandQ │ │ │ │ +0003b5e0: 7565 7565 293c 2f64 6976 3e3c 6469 7620 ueue)
    Definition │ │ │ │ +0003b610: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +0003b640: 683a 3134 353c 2f61 3e3c 2f64 6976 3e3c h:145
    < │ │ │ │ +0003b650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +0003b6b0: 6120 6872 6566 3d22 6130 3131 3431 2e68 a href="a01141.h │ │ │ │ +0003b6c0: 746d 6c23 6162 3031 3166 3637 3164 3835 tml#ab011f671d85 │ │ │ │ +0003b6d0: 3938 3831 3166 3065 6433 3961 3238 3631 98811f0ed39a2861 │ │ │ │ +0003b6e0: 3666 3930 3822 3e4f 7065 6e53 7562 6469 6f908">OpenSubdi │ │ │ │ +0003b6f0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +0003b700: 5253 494f 4e3a 3a4f 7364 3a3a 434c 4576 RSION::Osd::CLEv │ │ │ │ +0003b710: 616c 7561 746f 723a 3a45 7661 6c50 6174 aluator::EvalPat │ │ │ │ +0003b720: 6368 6573 3c2f 613e 3c2f 6469 763e 3c64 ches
    static bool Ev │ │ │ │ +0003b750: 616c 5061 7463 6865 7328 5352 435f 4255 alPatches(SRC_BU │ │ │ │ +0003b760: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ +0003b770: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +0003b780: 7220 636f 6e73 7420 2661 6d70 3b73 7263 r const &src │ │ │ │ +0003b790: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ +0003b7a0: 202a 6473 7442 7566 6665 722c 2042 7566 *dstBuffer, Buf │ │ │ │ +0003b7b0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003b7c0: 6e73 7420 2661 6d70 3b64 7374 4465 7363 nst &dstDesc │ │ │ │ +0003b7d0: 2c20 4453 545f 4255 4646 4552 202a 6475 , DST_BUFFER *du │ │ │ │ +0003b7e0: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +0003b7f0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003b800: 616d 703b 6475 4465 7363 2c20 4453 545f amp;duDesc, DST_ │ │ │ │ +0003b810: 4255 4646 4552 202a 6476 4275 6666 6572 BUFFER *dvBuffer │ │ │ │ +0003b820: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +0003b830: 6f72 2063 6f6e 7374 2026 616d 703b 6476 or const &dv │ │ │ │ +0003b840: 4465 7363 2c20 696e 7420 6e75 6d50 6174 Desc, int numPat │ │ │ │ +0003b850: 6368 436f 6f72 6473 2c20 5041 5443 4843 chCoords, PATCHC │ │ │ │ +0003b860: 4f4f 5244 5f42 5546 4645 5220 2a70 6174 OORD_BUFFER *pat │ │ │ │ +0003b870: 6368 436f 6f72 6473 2c20 5041 5443 485f chCoords, PATCH_ │ │ │ │ +0003b880: 5441 424c 4520 2a70 6174 6368 5461 626c TABLE *patchTabl │ │ │ │ +0003b890: 652c 2043 4c45 7661 6c75 6174 6f72 2063 e, CLEvaluator c │ │ │ │ +0003b8a0: 6f6e 7374 202a 696e 7374 616e 6365 2c20 onst *instance, │ │ │ │ +0003b8b0: 4445 5649 4345 5f43 4f4e 5445 5854 2064 DEVICE_CONTEXT d │ │ │ │ +0003b8c0: 6576 6963 6543 6f6e 7465 7874 2c20 756e eviceContext, un │ │ │ │ +0003b8d0: 7369 676e 6564 2069 6e74 206e 756d 5374 signed int numSt │ │ │ │ +0003b8e0: 6172 7445 7665 6e74 733d 302c 2063 6f6e artEvents=0, con │ │ │ │ +0003b8f0: 7374 2063 6c5f 6576 656e 7420 2a73 7461 st cl_event *sta │ │ │ │ +0003b900: 7274 4576 656e 7473 3d4e 554c 4c2c 2063 rtEvents=NULL, c │ │ │ │ +0003b910: 6c5f 6576 656e 7420 2a65 6e64 4576 656e l_event *endEven │ │ │ │ +0003b920: 743d 4e55 4c4c 293c 2f64 6976 3e3c 6469 t=NULL)
    │ │ │ │ +0003b940: 4765 6e65 7269 6320 6c69 6d69 7420 6576 Generic limit ev │ │ │ │ +0003b950: 616c 2066 756e 6374 696f 6e2e 2054 6869 al function. Thi │ │ │ │ +0003b960: 7320 6675 6e63 7469 6f6e 2068 6173 2061 s function has a │ │ │ │ +0003b970: 2073 616d 6520 7369 676e 6174 7572 6520 same signature │ │ │ │ +0003b980: 6173 206f 7468 6572 2064 6576 6963 6520 as other device │ │ │ │ +0003b990: 6b65 726e 656c 7320 6861 7665 2073 6f20 kernels have so │ │ │ │ +0003b9a0: 7468 6174 202e 2e2e 3c2f 6469 763e 3c64 that ...
    Definition clEvaluat │ │ │ │ +0003ba00: 6f72 2e68 3a31 3030 333c 2f61 3e3c 2f64 or.h:1003
    .
    boo │ │ │ │ +0003bb10: 6c20 4576 616c 5061 7463 6865 7356 6172 l EvalPatchesVar │ │ │ │ +0003bb20: 7969 6e67 2853 5243 5f42 5546 4645 5220 ying(SRC_BUFFER │ │ │ │ +0003bb30: 2a73 7263 4275 6666 6572 2c20 4275 6666 *srcBuffer, Buff │ │ │ │ +0003bb40: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ +0003bb50: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ +0003bb60: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ +0003bb70: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +0003bb80: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003bb90: 616d 703b 6473 7444 6573 632c 2044 5354 amp;dstDesc, DST │ │ │ │ +0003bba0: 5f42 5546 4645 5220 2a64 7542 7566 6665 _BUFFER *duBuffe │ │ │ │ +0003bbb0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +0003bbc0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +0003bbd0: 7544 6573 632c 2044 5354 5f42 5546 4645 uDesc, DST_BUFFE │ │ │ │ +0003bbe0: 5220 2a64 7642 7566 6665 722c 2042 7566 R *dvBuffer, Buf │ │ │ │ +0003bbf0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003bc00: 6e73 7420 2661 6d70 3b64 7644 6573 632c nst &dvDesc, │ │ │ │ +0003bc10: 2069 6e74 206e 756d 5061 7463 6843 6f6f int numPatchCoo │ │ │ │ +0003bc20: 7264 732c 2050 4154 4348 434f 4f52 445f rds, PATCHCOORD_ │ │ │ │ +0003bc30: 4255 4646 4552 202a 7061 7463 6843 6f6f BUFFER *patchCoo │ │ │ │ +0003bc40: 7264 732c 2050 4154 4348 5f54 4142 4c45 rds, PATCH_TABLE │ │ │ │ +0003bc50: 202a 7061 7463 6854 6162 6c65 2c20 756e *patchTable, un │ │ │ │ +0003bc60: 7369 676e 6564 2069 6e74 206e 756d 5374 signed int numSt │ │ │ │ +0003bc70: 6172 7445 7665 6e74 733d 302c 2063 6f6e artEvents=0, con │ │ │ │ +0003bc80: 7374 2063 6c5f 6576 656e 7420 2a73 7461 st cl_event *sta │ │ │ │ +0003bc90: 7274 4576 656e 7473 3d4e 554c 4c2c 2063 rtEvents=NULL, c │ │ │ │ +0003bca0: 6c5f 6576 656e 7420 2a65 6e64 4576 656e l_event *endEven │ │ │ │ +0003bcb0: 743d 4e55 4c4c 2920 636f 6e73 743c 2f64 t=NULL) const. │ │ │ │ +0003bdb0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    stat │ │ │ │ +0003bea0: 6963 2062 6f6f 6c20 4576 616c 5061 7463 ic bool EvalPatc │ │ │ │ +0003beb0: 6865 7328 5352 435f 4255 4646 4552 202a hes(SRC_BUFFER * │ │ │ │ +0003bec0: 7372 6342 7566 6665 722c 2042 7566 6665 srcBuffer, Buffe │ │ │ │ +0003bed0: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +0003bee0: 7420 2661 6d70 3b73 7263 4465 7363 2c20 t &srcDesc, │ │ │ │ +0003bef0: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ +0003bf00: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +0003bf10: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +0003bf20: 6d70 3b64 7374 4465 7363 2c20 696e 7420 mp;dstDesc, int │ │ │ │ +0003bf30: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ +0003bf40: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +0003bf50: 5220 2a70 6174 6368 436f 6f72 6473 2c20 R *patchCoords, │ │ │ │ +0003bf60: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ +0003bf70: 6368 5461 626c 652c 2043 4c45 7661 6c75 chTable, CLEvalu │ │ │ │ +0003bf80: 6174 6f72 2063 6f6e 7374 202a 696e 7374 ator const *inst │ │ │ │ +0003bf90: 616e 6365 2c20 4445 5649 4345 5f43 4f4e ance, DEVICE_CON │ │ │ │ +0003bfa0: 5445 5854 2064 6576 6963 6543 6f6e 7465 TEXT deviceConte │ │ │ │ +0003bfb0: 7874 2c20 756e 7369 676e 6564 2069 6e74 xt, unsigned int │ │ │ │ +0003bfc0: 206e 756d 5374 6172 7445 7665 6e74 733d numStartEvents= │ │ │ │ +0003bfd0: 302c 2063 6f6e 7374 2063 6c5f 6576 656e 0, const cl_even │ │ │ │ +0003bfe0: 7420 2a73 7461 7274 4576 656e 7473 3d4e t *startEvents=N │ │ │ │ +0003bff0: 554c 4c2c 2063 6c5f 6576 656e 7420 2a65 ULL, cl_event *e │ │ │ │ +0003c000: 6e64 4576 656e 743d 4e55 4c4c 293c 2f64 ndEvent=NULL).< │ │ │ │ +0003c100: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0003c110: 6964 3d22 6161 3031 3134 315f 6874 6d6c id="aa01141_html │ │ │ │ +0003c120: 5f61 6331 3566 3834 3361 3036 6563 6361 _ac15f843a06ecca │ │ │ │ +0003c130: 3239 6139 3232 3133 3261 6235 3965 3338 29a922132ab59e38 │ │ │ │ +0003c140: 3930 223e 3c64 6976 2063 6c61 7373 3d22 90">bool EvalPatch │ │ │ │ +0003c200: 6573 5661 7279 696e 6728 5352 435f 4255 esVarying(SRC_BU │ │ │ │ +0003c210: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ +0003c220: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +0003c230: 7220 636f 6e73 7420 2661 6d70 3b73 7263 r const &src │ │ │ │ +0003c240: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ +0003c250: 202a 6473 7442 7566 6665 722c 2042 7566 *dstBuffer, Buf │ │ │ │ +0003c260: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003c270: 6e73 7420 2661 6d70 3b64 7374 4465 7363 nst &dstDesc │ │ │ │ +0003c280: 2c20 696e 7420 6e75 6d50 6174 6368 436f , int numPatchCo │ │ │ │ +0003c290: 6f72 6473 2c20 5041 5443 4843 4f4f 5244 ords, PATCHCOORD │ │ │ │ +0003c2a0: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ +0003c2b0: 6f72 6473 2c20 5041 5443 485f 5441 424c ords, PATCH_TABL │ │ │ │ +0003c2c0: 4520 2a70 6174 6368 5461 626c 652c 2075 E *patchTable, u │ │ │ │ +0003c2d0: 6e73 6967 6e65 6420 696e 7420 6e75 6d53 nsigned int numS │ │ │ │ +0003c2e0: 7461 7274 4576 656e 7473 3d30 2c20 636f tartEvents=0, co │ │ │ │ +0003c2f0: 6e73 7420 636c 5f65 7665 6e74 202a 7374 nst cl_event *st │ │ │ │ +0003c300: 6172 7445 7665 6e74 733d 4e55 4c4c 2c20 artEvents=NULL, │ │ │ │ +0003c310: 636c 5f65 7665 6e74 202a 656e 6445 7665 cl_event *endEve │ │ │ │ +0003c320: 6e74 3d4e 554c 4c29 2063 6f6e 7374 3c2f nt=NULL) const
    Generic l │ │ │ │ +0003c350: 696d 6974 2065 7661 6c20 6675 6e63 7469 imit eval functi │ │ │ │ +0003c360: 6f6e 2e20 5468 6973 2066 756e 6374 696f on. This functio │ │ │ │ +0003c370: 6e20 6861 7320 6120 7361 6d65 2073 6967 n has a same sig │ │ │ │ +0003c380: 6e61 7475 7265 2061 7320 6f74 6865 7220 nature as other │ │ │ │ +0003c390: 6465 7669 6365 206b 6572 6e65 6c73 2068 device kernels h │ │ │ │ +0003c3a0: 6176 6520 736f 2074 6861 7420 2e2e 2e3c ave so that ...< │ │ │ │ +0003c3b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    │ │ │ │ +0003c420: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ +0003c500: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    static bool │ │ │ │ +0003c520: 4576 616c 5061 7463 6865 7356 6172 7969 EvalPatchesVaryi │ │ │ │ +0003c530: 6e67 2853 5243 5f42 5546 4645 5220 2a73 ng(SRC_BUFFER *s │ │ │ │ +0003c540: 7263 4275 6666 6572 2c20 4275 6666 6572 rcBuffer, Buffer │ │ │ │ +0003c550: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +0003c560: 2026 616d 703b 7372 6344 6573 632c 2044 &srcDesc, D │ │ │ │ +0003c570: 5354 5f42 5546 4645 5220 2a64 7374 4275 ST_BUFFER *dstBu │ │ │ │ +0003c580: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +0003c590: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +0003c5a0: 703b 6473 7444 6573 632c 2044 5354 5f42 p;dstDesc, DST_B │ │ │ │ +0003c5b0: 5546 4645 5220 2a64 7542 7566 6665 722c UFFER *duBuffer, │ │ │ │ +0003c5c0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ +0003c5d0: 7220 636f 6e73 7420 2661 6d70 3b64 7544 r const &duD │ │ │ │ +0003c5e0: 6573 632c 2044 5354 5f42 5546 4645 5220 esc, DST_BUFFER │ │ │ │ +0003c5f0: 2a64 7642 7566 6665 722c 2042 7566 6665 *dvBuffer, Buffe │ │ │ │ +0003c600: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +0003c610: 7420 2661 6d70 3b64 7644 6573 632c 2044 t &dvDesc, D │ │ │ │ +0003c620: 5354 5f42 5546 4645 5220 2a64 7575 4275 ST_BUFFER *duuBu │ │ │ │ +0003c630: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ +0003c640: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +0003c650: 703b 6475 7544 6573 632c 2044 5354 5f42 p;duuDesc, DST_B │ │ │ │ +0003c660: 5546 4645 5220 2a64 7576 4275 6666 6572 UFFER *duvBuffer │ │ │ │ +0003c670: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ +0003c680: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ +0003c690: 7644 6573 632c 2044 5354 5f42 5546 4645 vDesc, DST_BUFFE │ │ │ │ +0003c6a0: 5220 2a64 7676 4275 6666 6572 2c20 4275 R *dvvBuffer, Bu │ │ │ │ +0003c6b0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +0003c6c0: 6f6e 7374 2026 616d 703b 6476 7644 6573 onst &dvvDes │ │ │ │ +0003c6d0: 632c 2069 6e74 206e 756d 5061 7463 6843 c, int numPatchC │ │ │ │ +0003c6e0: 6f6f 7264 732c 2050 4154 4348 434f 4f52 oords, PATCHCOOR │ │ │ │ +0003c6f0: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ +0003c700: 6f6f 7264 732c 2050 4154 4348 5f54 4142 oords, PATCH_TAB │ │ │ │ +0003c710: 4c45 202a 7061 7463 6854 6162 6c65 2c20 LE *patchTable, │ │ │ │ +0003c720: 434c 4576 616c 7561 746f 7220 636f 6e73 CLEvaluator cons │ │ │ │ +0003c730: 7420 2a69 6e73 7461 6e63 652c 2044 4556 t *instance, DEV │ │ │ │ +0003c740: 4943 455f 434f 4e54 4558 5420 6465 7669 ICE_CONTEXT devi │ │ │ │ +0003c750: 6365 436f 6e74 6578 742c 2075 6e73 6967 ceContext, unsig │ │ │ │ +0003c760: 6e65 6420 696e 7420 6e75 6d53 7461 7274 ned int numStart │ │ │ │ +0003c770: 4576 656e 7473 3d30 2c20 636f 6e73 7420 Events=0, const │ │ │ │ +0003c780: 636c 5f65 7665 6e74 202a 7374 6172 7445 cl_event *startE │ │ │ │ +0003c790: 7665 6e74 733d 4e55 4c4c 2c20 636c 5f65 vents=NULL, cl_e │ │ │ │ +0003c7a0: 7665 6e74 202a 656e 6445 7665 6e74 3d4e vent *endEvent=N │ │ │ │ +0003c7b0: 554c 4c29 3c2f 6469 763e 3c64 6976 2063 ULL)
    Gen │ │ │ │ +0003c7d0: 6572 6963 206c 696d 6974 2065 7661 6c20 eric limit eval │ │ │ │ +0003c7e0: 6675 6e63 7469 6f6e 2e20 5468 6973 2066 function. This f │ │ │ │ +0003c7f0: 756e 6374 696f 6e20 6861 7320 6120 7361 unction has a sa │ │ │ │ +0003c800: 6d65 2073 6967 6e61 7475 7265 2061 7320 me signature as │ │ │ │ +0003c810: 6f74 6865 7220 6465 7669 6365 206b 6572 other device ker │ │ │ │ +0003c820: 6e65 6c73 2068 6176 6520 736f 2074 6861 nels have so tha │ │ │ │ +0003c830: 7420 2e2e 2e3c 2f64 6976 3e3c 6469 7620 t ...
    Definition │ │ │ │ +0003c860: 3c61 2068 7265 663d 2261 3030 3733 345f clEvaluator. │ │ │ │ +0003c890: 683a 3138 3534 3c2f 613e 3c2f 6469 763e h:1854
    │ │ │ │ +0003c8a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0003c980: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool EvalSte │ │ │ │ +0003c9a0: 6e63 696c 7328 5352 435f 4255 4646 4552 ncils(SRC_BUFFER │ │ │ │ +0003c9b0: 202a 7372 6342 7566 6665 722c 2042 7566 *srcBuffer, Buf │ │ │ │ +0003c9c0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003c9d0: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ +0003c9e0: 2c20 4453 545f 4255 4646 4552 202a 6473 , DST_BUFFER *ds │ │ │ │ +0003c9f0: 7442 7566 6665 722c 2042 7566 6665 7244 tBuffer, BufferD │ │ │ │ +0003ca00: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ +0003ca10: 2661 6d70 3b64 7374 4465 7363 2c20 5354 &dstDesc, ST │ │ │ │ +0003ca20: 454e 4349 4c5f 5441 424c 4520 636f 6e73 ENCIL_TABLE cons │ │ │ │ +0003ca30: 7420 2a73 7465 6e63 696c 5461 626c 652c t *stencilTable, │ │ │ │ +0003ca40: 2075 6e73 6967 6e65 6420 696e 7420 6e75 unsigned int nu │ │ │ │ +0003ca50: 6d53 7461 7274 4576 656e 7473 3d30 2c20 mStartEvents=0, │ │ │ │ +0003ca60: 636f 6e73 7420 636c 5f65 7665 6e74 202a const cl_event * │ │ │ │ +0003ca70: 7374 6172 7445 7665 6e74 733d 4e55 4c4c startEvents=NULL │ │ │ │ +0003ca80: 2c20 636c 5f65 7665 6e74 202a 656e 6445 , cl_event *endE │ │ │ │ +0003ca90: 7665 6e74 3d4e 554c 4c29 2063 6f6e 7374 vent=NULL) const │ │ │ │ +0003caa0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Generic │ │ │ │ +0003cac0: 2073 7465 6e63 696c 2066 756e 6374 696f stencil functio │ │ │ │ +0003cad0: 6e2e 3c2f 6469 763e 3c64 6976 2063 6c61 n.
    De │ │ │ │ +0003caf0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition clEvaluator.h:5 │ │ │ │ +0003cb30: 3030 3c2f 613e 3c2f 6469 763e 3c2f 6469 00
    .
    b │ │ │ │ +0003cc30: 6f6f 6c20 4576 616c 5061 7463 6865 7328 ool EvalPatches( │ │ │ │ +0003cc40: 5352 435f 4255 4646 4552 202a 7372 6342 SRC_BUFFER *srcB │ │ │ │ +0003cc50: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +0003cc60: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +0003cc70: 6d70 3b73 7263 4465 7363 2c20 4453 545f mp;srcDesc, DST_ │ │ │ │ +0003cc80: 4255 4646 4552 202a 6473 7442 7566 6665 BUFFER *dstBuffe │ │ │ │ +0003cc90: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ +0003cca0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ +0003ccb0: 7374 4465 7363 2c20 4453 545f 4255 4646 stDesc, DST_BUFF │ │ │ │ +0003ccc0: 4552 202a 6475 4275 6666 6572 2c20 4275 ER *duBuffer, Bu │ │ │ │ +0003ccd0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ +0003cce0: 6f6e 7374 2026 616d 703b 6475 4465 7363 onst &duDesc │ │ │ │ +0003ccf0: 2c20 4453 545f 4255 4646 4552 202a 6476 , DST_BUFFER *dv │ │ │ │ +0003cd00: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ +0003cd10: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ +0003cd20: 616d 703b 6476 4465 7363 2c20 696e 7420 amp;dvDesc, int │ │ │ │ +0003cd30: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ +0003cd40: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +0003cd50: 5220 2a70 6174 6368 436f 6f72 6473 2c20 R *patchCoords, │ │ │ │ +0003cd60: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ +0003cd70: 6368 5461 626c 652c 2075 6e73 6967 6e65 chTable, unsigne │ │ │ │ +0003cd80: 6420 696e 7420 6e75 6d53 7461 7274 4576 d int numStartEv │ │ │ │ +0003cd90: 656e 7473 3d30 2c20 636f 6e73 7420 636c ents=0, const cl │ │ │ │ +0003cda0: 5f65 7665 6e74 202a 7374 6172 7445 7665 _event *startEve │ │ │ │ +0003cdb0: 6e74 733d 4e55 4c4c 2c20 636c 5f65 7665 nts=NULL, cl_eve │ │ │ │ +0003cdc0: 6e74 202a 656e 6445 7665 6e74 3d4e 554c nt *endEvent=NUL │ │ │ │ +0003cdd0: 4c29 2063 6f6e 7374 3c2f 6469 763e 3c64 L) const
    Generic limit e │ │ │ │ +0003ce00: 7661 6c20 6675 6e63 7469 6f6e 2077 6974 val function wit │ │ │ │ +0003ce10: 6820 6465 7269 7661 7469 7665 732e 2054 h derivatives. T │ │ │ │ +0003ce20: 6869 7320 6675 6e63 7469 6f6e 2068 6173 his function has │ │ │ │ +0003ce30: 2061 2073 616d 6520 7369 676e 6174 7572 a same signatur │ │ │ │ +0003ce40: 6520 6173 206f 7468 6572 2064 6576 6963 e as other devic │ │ │ │ +0003ce50: 6520 6b65 726e 2e2e 2e3c 2f64 6976 3e3c e kern...
    < │ │ │ │ +0003ce60: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +0003ce70: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ +0003ce80: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> clEvalua │ │ │ │ +0003ceb0: 746f 722e 683a 3132 3838 3c2f 613e 3c2f tor.h:1288
    .
    │ │ │ │ +0003cf10: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    Open │ │ │ │ +0003cf60: 5375 6264 6976 3a3a 4f50 454e 5355 4244 Subdiv::OPENSUBD │ │ │ │ +0003cf70: 4956 5f56 4552 5349 4f4e 3a3a 4f73 643a IV_VERSION::Osd: │ │ │ │ +0003cf80: 3a43 4c45 7661 6c75 6174 6f72 3a3a 434c :CLEvaluator::CL │ │ │ │ +0003cf90: 4576 616c 7561 746f 723c 2f61 3e3c 2f64 Evaluator
    CLEvaluat │ │ │ │ +0003cfc0: 6f72 2863 6c5f 636f 6e74 6578 7420 636f or(cl_context co │ │ │ │ +0003cfd0: 6e74 6578 742c 2063 6c5f 636f 6d6d 616e ntext, cl_comman │ │ │ │ +0003cfe0: 645f 7175 6575 6520 7175 6575 6529 3c2f d_queue queue)
    Construct │ │ │ │ +0003d010: 6f72 2e3c 2f64 6976 3e3c 2f64 6976 3e0a or.
    . │ │ │ │ +0003d020: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    OpenSubdiv::OPE │ │ │ │ +0003d0c0: 4e53 5542 4449 565f 5645 5253 494f 4e3a NSUBDIV_VERSION: │ │ │ │ +0003d0d0: 3a4f 7364 3a3a 434c 4576 616c 7561 746f :Osd::CLEvaluato │ │ │ │ +0003d0e0: 723a 3a43 6f6d 7069 6c65 3c2f 613e 3c2f r::Compile
    bool Com │ │ │ │ +0003d110: 7069 6c65 2842 7566 6665 7244 6573 6372 pile(BufferDescr │ │ │ │ +0003d120: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +0003d130: 3b73 7263 4465 7363 2c20 4275 6666 6572 ;srcDesc, Buffer │ │ │ │ +0003d140: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ +0003d150: 2026 616d 703b 6473 7444 6573 632c 2042 &dstDesc, B │ │ │ │ +0003d160: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ +0003d170: 636f 6e73 7420 2661 6d70 3b64 7544 6573 const &duDes │ │ │ │ +0003d180: 633d 4275 6666 6572 4465 7363 7269 7074 c=BufferDescript │ │ │ │ +0003d190: 6f72 2829 2c20 4275 6666 6572 4465 7363 or(), BufferDesc │ │ │ │ +0003d1a0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ +0003d1b0: 703b 6476 4465 7363 3d42 7566 6665 7244 p;dvDesc=BufferD │ │ │ │ +0003d1c0: 6573 6372 6970 746f 7228 292c 2042 7566 escriptor(), Buf │ │ │ │ +0003d1d0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003d1e0: 6e73 7420 2661 6d70 3b64 7575 4465 7363 nst &duuDesc │ │ │ │ +0003d1f0: 3d42 7566 6665 7244 6573 6372 6970 746f =BufferDescripto │ │ │ │ +0003d200: 7228 292c 2042 7566 6665 7244 6573 6372 r(), BufferDescr │ │ │ │ +0003d210: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ +0003d220: 3b64 7576 4465 7363 3d42 7566 6665 7244 ;duvDesc=BufferD │ │ │ │ +0003d230: 6573 6372 6970 746f 7228 292c 2042 7566 escriptor(), Buf │ │ │ │ +0003d240: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ +0003d250: 6e73 7420 2661 6d70 3b64 7676 4465 7363 nst &dvvDesc │ │ │ │ +0003d260: 3d42 7566 6665 7244 6573 6372 6970 746f =BufferDescripto │ │ │ │ +0003d270: 7228 2929 3c2f 6469 763e 3c2f 6469 763e r())
    │ │ │ │ +0003d280: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    OpenSubdiv::OP │ │ │ │ +0003d320: 454e 5355 4244 4956 5f56 4552 5349 4f4e ENSUBDIV_VERSION │ │ │ │ +0003d330: 3a3a 4f73 643a 3a43 4c45 7661 6c75 6174 ::Osd::CLEvaluat │ │ │ │ +0003d340: 6f72 3a3a 4576 616c 5061 7463 6865 7346 or::EvalPatchesF │ │ │ │ +0003d350: 6163 6556 6172 7969 6e67 3c2f 613e 3c2f aceVarying
    bool Eva │ │ │ │ +0003d380: 6c50 6174 6368 6573 4661 6365 5661 7279 lPatchesFaceVary │ │ │ │ +0003d390: 696e 6728 5352 435f 4255 4646 4552 202a ing(SRC_BUFFER * │ │ │ │ +0003d3a0: 7372 6342 7566 6665 722c 2042 7566 6665 srcBuffer, Buffe │ │ │ │ +0003d3b0: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ +0003d3c0: 7420 2661 6d70 3b73 7263 4465 7363 2c20 t &srcDesc, │ │ │ │ +0003d3d0: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ +0003d3e0: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ +0003d3f0: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ +0003d400: 6d70 3b64 7374 4465 7363 2c20 696e 7420 mp;dstDesc, int │ │ │ │ +0003d410: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ +0003d420: 5041 5443 4843 4f4f 5244 5f42 5546 4645 PATCHCOORD_BUFFE │ │ │ │ +0003d430: 5220 2a70 6174 6368 436f 6f72 6473 2c20 R *patchCoords, │ │ │ │ +0003d440: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ +0003d450: 6368 5461 626c 652c 2069 6e74 2066 7661 chTable, int fva │ │ │ │ +0003d460: 7243 6861 6e6e 656c 3d30 2c20 756e 7369 rChannel=0, unsi │ │ │ │ +0003d470: 676e 6564 2069 6e74 206e 756d 5374 6172 gned int numStar │ │ │ │ +0003d480: 7445 7665 6e74 733d 302c 2063 6f6e 7374 tEvents=0, const │ │ │ │ +0003d490: 2063 6c5f 6576 656e 7420 2a73 7461 7274 cl_event *start │ │ │ │ +0003d4a0: 4576 656e 7473 3d4e 554c 4c2c 2063 6c5f Events=NULL, cl_ │ │ │ │ +0003d4b0: 6576 656e 7420 2a65 6e64 4576 656e 743d event *endEvent= │ │ │ │ +0003d4c0: 4e55 4c4c 2920 636f 6e73 743c 2f64 6976 NULL) const
    Generic limi │ │ │ │ +0003d4f0: 7420 6576 616c 2066 756e 6374 696f 6e2e t eval function. │ │ │ │ +0003d500: 2054 6869 7320 6675 6e63 7469 6f6e 2068 This function h │ │ │ │ +0003d510: 6173 2061 2073 616d 6520 7369 676e 6174 as a same signat │ │ │ │ +0003d520: 7572 6520 6173 206f 7468 6572 2064 6576 ure as other dev │ │ │ │ +0003d530: 6963 6520 6b65 726e 656c 7320 6861 7665 ice kernels have │ │ │ │ +0003d540: 2073 6f20 7468 6174 202e 2e2e 3c2f 6469 so that ...
    Definiti │ │ │ │ +0003d570: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on clEva │ │ │ │ +0003d5a0: 6c75 6174 6f72 2e68 3a32 3134 333c 2f61 luator.h:2143
    .
    .. │ │ │ │
    │ │ │ │ -
    #include "../version.h"
    │ │ │ │ -#include "../sdc/scheme.h"
    │ │ │ │ -#include <cassert>
    │ │ │ │ -#include <cmath>
    │ │ │ │ +
    #include <GL/gl.h>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,11 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_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 │ │ │ │ │ +opengl.h File Reference │ │ │ │ │ +#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_:_:_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_s_d │ │ │ │ │ + * _o_p_e_n_g_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00737_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/loopScheme.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/opengl.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    loopScheme.h
    │ │ │ │ +
    opengl.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,618 +118,48 @@ │ │ │ │
    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
    │ │ │ │ -
    26
    │ │ │ │ -
    27#include "../version.h"
    │ │ │ │ -
    28
    │ │ │ │ -
    29#include "../sdc/scheme.h"
    │ │ │ │ -
    30
    │ │ │ │ -
    31#include <cassert>
    │ │ │ │ -
    32#include <cmath>
    │ │ │ │ -
    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 <>
    │ │ │ │ - │ │ │ │ +
    24
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_OPENGL_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_OPENGL_H
    │ │ │ │ +
    27
    │ │ │ │ +
    28#if defined(__APPLE__)
    │ │ │ │ +
    29 #include "TargetConditionals.h"
    │ │ │ │ +
    30 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
    │ │ │ │ +
    31 #include <OpenGLES/ES2/gl.h>
    │ │ │ │ +
    32 #else
    │ │ │ │ +
    33 #if defined(OSD_USES_GLEW)
    │ │ │ │ +
    34 #include <GL/glew.h>
    │ │ │ │ +
    35 #else
    │ │ │ │ +
    36 #include <OpenGL/gl3.h>
    │ │ │ │ +
    37 #endif
    │ │ │ │ +
    38 #endif
    │ │ │ │ +
    39#elif defined(ANDROID)
    │ │ │ │ +
    40 #include <GLES2/gl2.h>
    │ │ │ │ +
    41#else
    │ │ │ │ +
    42 #if defined(_WIN32)
    │ │ │ │ +
    43 #define WIN32_LEAN_AND_MEAN
    │ │ │ │ +
    44 #include <windows.h>
    │ │ │ │ +
    45 #endif
    │ │ │ │ +
    46 #if defined(OSD_USES_GLEW)
    │ │ │ │ +
    47 #include <GL/glew.h>
    │ │ │ │ +
    48 #else
    │ │ │ │ +
    49 #include <GL/gl.h>
    │ │ │ │ +
    50 #endif
    │ │ │ │ +
    51#endif
    │ │ │ │
    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
    │ │ │ │ -
    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
    │ │ │ │ -
    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
    │ │ │ │ -
    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
    │ │ │ │ +
    53#endif // OPENSUBDIV3_OSD_OPENGL_H
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -loopScheme.h │ │ │ │ │ +opengl.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,671 +23,41 @@ │ │ │ │ │ 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 │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../sdc/scheme.h" │ │ │ │ │ -30 │ │ │ │ │ -31#include │ │ │ │ │ -32#include │ │ │ │ │ -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; } │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_OPENGL_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_OPENGL_H │ │ │ │ │ +27 │ │ │ │ │ +28#if defined(__APPLE__) │ │ │ │ │ +29 #include "TargetConditionals.h" │ │ │ │ │ +30 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR │ │ │ │ │ +31 #include │ │ │ │ │ +32 #else │ │ │ │ │ +33 #if defined(OSD_USES_GLEW) │ │ │ │ │ +34 #include │ │ │ │ │ +35 #else │ │ │ │ │ +36 #include │ │ │ │ │ +37 #endif │ │ │ │ │ +38 #endif │ │ │ │ │ +39#elif defined(ANDROID) │ │ │ │ │ +40 #include │ │ │ │ │ +41#else │ │ │ │ │ +42 #if defined(_WIN32) │ │ │ │ │ +43 #define WIN32_LEAN_AND_MEAN │ │ │ │ │ +44 #include │ │ │ │ │ +45 #endif │ │ │ │ │ +46 #if defined(OSD_USES_GLEW) │ │ │ │ │ +47 #include │ │ │ │ │ +48 #else │ │ │ │ │ +49 #include │ │ │ │ │ +50 #endif │ │ │ │ │ +51#endif │ │ │ │ │ 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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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_:_:_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 │ │ │ │ │ +53#endif // OPENSUBDIV3_OSD_OPENGL_H │ │ │ │ │ * _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_s_d │ │ │ │ │ + * _o_p_e_n_g_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00740.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/catmarkScheme.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,38 +88,44 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ +Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    catmarkScheme.h File Reference
    │ │ │ │ +
    cpuGLVertexBuffer.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../sdc/scheme.h"
    │ │ │ │ -#include <cassert>
    │ │ │ │ -#include <cmath>
    │ │ │ │ +#include <cstddef>
    │ │ │ │ +#include "../osd/opengl.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::Sdc
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,26 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -catmarkScheme.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +cpuGLVertexBuffer.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_s_c_h_e_m_e_._h" │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#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   _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_:_:_S_d_c │ │ │ │ │ +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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _c_a_t_m_a_r_k_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00740_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/catmarkScheme.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    catmarkScheme.h
    │ │ │ │ +
    cpuGLVertexBuffer.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,566 +118,84 @@ │ │ │ │
    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_CATMARK_SCHEME_H
    │ │ │ │ -
    25#define OPENSUBDIV3_SDC_CATMARK_SCHEME_H
    │ │ │ │ -
    26
    │ │ │ │ -
    27#include "../version.h"
    │ │ │ │ -
    28
    │ │ │ │ -
    29#include "../sdc/scheme.h"
    │ │ │ │ -
    30
    │ │ │ │ -
    31#include <cassert>
    │ │ │ │ -
    32#include <cmath>
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Sdc {
    │ │ │ │ -
    38
    │ │ │ │ -
    39//
    │ │ │ │ -
    40// Specializations for Scheme<SCHEME_CATMARK>:
    │ │ │ │ -
    41//
    │ │ │ │ -
    42
    │ │ │ │ -
    43//
    │ │ │ │ -
    44// Catmark traits:
    │ │ │ │ -
    45//
    │ │ │ │ -
    46template <>
    │ │ │ │ - │ │ │ │ -
    48
    │ │ │ │ -
    49template <>
    │ │ │ │ - │ │ │ │ -
    51
    │ │ │ │ -
    52template <>
    │ │ │ │ - │ │ │ │ -
    54
    │ │ │ │ -
    55template <>
    │ │ │ │ - │ │ │ │ -
    57
    │ │ │ │ -
    58
    │ │ │ │ -
    59//
    │ │ │ │ -
    60// Masks for edge-vertices: the hard Crease mask does not need to be specialized
    │ │ │ │ -
    61// (simply the midpoint), so all that is left is the Smooth case:
    │ │ │ │ -
    62//
    │ │ │ │ -
    63// The Smooth mask is complicated by the need to support the "triangle subdivision"
    │ │ │ │ -
    64// option, which applies different weighting in the presence of triangles. It is
    │ │ │ │ -
    65// up for debate as to whether this is useful or not -- we may be able to deprecate
    │ │ │ │ -
    66// this option.
    │ │ │ │ -
    67//
    │ │ │ │ -
    68template <>
    │ │ │ │ -
    69template <typename EDGE, typename MASK>
    │ │ │ │ -
    70inline void
    │ │ │ │ -
    │ │ │ │ -
    71Scheme<SCHEME_CATMARK>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const {
    │ │ │ │ -
    72
    │ │ │ │ -
    73 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    24
    │ │ │ │ +
    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 <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
    │ │ │ │ +
    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
    │ │ │ │ -
    75 int faceCount = edge.GetNumFaces();
    │ │ │ │ -
    76
    │ │ │ │ -
    77 mask.SetNumVertexWeights(2);
    │ │ │ │ -
    78 mask.SetNumEdgeWeights(0);
    │ │ │ │ -
    79 mask.SetNumFaceWeights(faceCount);
    │ │ │ │ -
    80 mask.SetFaceWeightsForFaceCenters(true);
    │ │ │ │ +
    75protected:
    │ │ │ │ +
    77 CpuGLVertexBuffer(int numElements, int numVertices);
    │ │ │ │ +
    78
    │ │ │ │ +
    80 bool allocate();
    │ │ │ │
    81
    │ │ │ │ -
    82 //
    │ │ │ │ -
    83 // Determine if we need to inspect incident faces and apply alternate weighting for
    │ │ │ │ -
    84 // triangles -- and if so, determine which of the two are triangles.
    │ │ │ │ -
    85 //
    │ │ │ │ -
    86 bool face0IsTri = false;
    │ │ │ │ -
    87 bool face1IsTri = false;
    │ │ │ │ -
    88 bool useTriangleOption = (_options.GetTriangleSubdivision() == Options::TRI_SUB_SMOOTH);
    │ │ │ │ -
    89 if (useTriangleOption) {
    │ │ │ │ -
    90 if (faceCount == 2) {
    │ │ │ │ -
    91 //
    │ │ │ │ -
    92 // Ideally we want to avoid this inspection when we have already subdivided at
    │ │ │ │ -
    93 // least once -- need something in the Edge interface to help avoid this, e.g.
    │ │ │ │ -
    94 // an IsRegular() query, the subdivision level...
    │ │ │ │ -
    95 //
    │ │ │ │ -
    96 int vertsPerFace[2];
    │ │ │ │ -
    97 edge.GetNumVerticesPerFace(vertsPerFace);
    │ │ │ │ -
    98
    │ │ │ │ -
    99 face0IsTri = (vertsPerFace[0] == 3);
    │ │ │ │ -
    100 face1IsTri = (vertsPerFace[1] == 3);
    │ │ │ │ -
    101 useTriangleOption = face0IsTri || face1IsTri;
    │ │ │ │ -
    102 } else {
    │ │ │ │ -
    103 useTriangleOption = false;
    │ │ │ │ -
    104 }
    │ │ │ │ -
    105 }
    │ │ │ │ -
    106
    │ │ │ │ -
    107 if (! useTriangleOption) {
    │ │ │ │ -
    108 mask.VertexWeight(0) = 0.25f;
    │ │ │ │ -
    109 mask.VertexWeight(1) = 0.25f;
    │ │ │ │ -
    110
    │ │ │ │ -
    111 if (faceCount == 2) {
    │ │ │ │ -
    112 mask.FaceWeight(0) = 0.25f;
    │ │ │ │ -
    113 mask.FaceWeight(1) = 0.25f;
    │ │ │ │ -
    114 } else {
    │ │ │ │ -
    115 Weight fWeight = 0.5f / (Weight)faceCount;
    │ │ │ │ -
    116 for (int i = 0; i < faceCount; ++i) {
    │ │ │ │ -
    117 mask.FaceWeight(i) = fWeight;
    │ │ │ │ -
    118 }
    │ │ │ │ -
    119 }
    │ │ │ │ -
    120 } else {
    │ │ │ │ -
    121 //
    │ │ │ │ -
    122 // This mimics the implementation in Hbr in terms of order of operations.
    │ │ │ │ -
    123 //
    │ │ │ │ -
    124 const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470;
    │ │ │ │ -
    125
    │ │ │ │ -
    126 Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
    │ │ │ │ -
    127 Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
    │ │ │ │ -
    128
    │ │ │ │ -
    129 Weight fWeight = 0.5f * (f0Weight + f1Weight);
    │ │ │ │ -
    130 Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight);
    │ │ │ │ -
    131
    │ │ │ │ -
    132 mask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    133 mask.VertexWeight(1) = vWeight;
    │ │ │ │ -
    134
    │ │ │ │ -
    135 mask.FaceWeight(0) = fWeight;
    │ │ │ │ -
    136 mask.FaceWeight(1) = fWeight;
    │ │ │ │ -
    137 }
    │ │ │ │ -
    138}
    │ │ │ │ -
    │ │ │ │ -
    139
    │ │ │ │ -
    140
    │ │ │ │ -
    141//
    │ │ │ │ -
    142// Masks for vertex-vertices: the hard Corner mask does not need to be specialized
    │ │ │ │ -
    143// (simply the vertex itself), leaving the Crease and Smooth cases (Dart is smooth):
    │ │ │ │ -
    144//
    │ │ │ │ -
    145template <>
    │ │ │ │ -
    146template <typename VERTEX, typename MASK>
    │ │ │ │ -
    147inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    149 int const creaseEnds[2]) const {
    │ │ │ │ -
    150 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    151
    │ │ │ │ -
    152 int valence = vertex.GetNumEdges();
    │ │ │ │ -
    153
    │ │ │ │ -
    154 mask.SetNumVertexWeights(1);
    │ │ │ │ -
    155 mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    156 mask.SetNumFaceWeights(0);
    │ │ │ │ -
    157 mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    158
    │ │ │ │ -
    159 Weight vWeight = 0.75f;
    │ │ │ │ -
    160 Weight eWeight = 0.125f;
    │ │ │ │ -
    161
    │ │ │ │ -
    162 mask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    163 for (int i = 0; i < valence; ++i) {
    │ │ │ │ -
    164 mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    165 }
    │ │ │ │ -
    166 mask.EdgeWeight(creaseEnds[0]) = eWeight;
    │ │ │ │ -
    167 mask.EdgeWeight(creaseEnds[1]) = eWeight;
    │ │ │ │ -
    168}
    │ │ │ │ -
    │ │ │ │ -
    169
    │ │ │ │ -
    170template <>
    │ │ │ │ -
    171template <typename VERTEX, typename MASK>
    │ │ │ │ -
    172inline void
    │ │ │ │ -
    │ │ │ │ -
    173Scheme<SCHEME_CATMARK>::assignSmoothMaskForVertex(VERTEX const& vertex, MASK& mask) const {
    │ │ │ │ -
    174
    │ │ │ │ -
    175 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    176
    │ │ │ │ -
    177 //
    │ │ │ │ -
    178 // A Smooth vertex must be manifold and interior -- manifold boundary vertices will be
    │ │ │ │ -
    179 // Creases and non-manifold vertices of any kind will be Corners or Creases. If smooth
    │ │ │ │ -
    180 // rules for non-manifold vertices are ever defined, this will need adjusting:
    │ │ │ │ -
    181 //
    │ │ │ │ -
    182 assert(vertex.GetNumFaces() == vertex.GetNumEdges());
    │ │ │ │ -
    183
    │ │ │ │ -
    184 int valence = vertex.GetNumFaces();
    │ │ │ │ -
    185
    │ │ │ │ -
    186 mask.SetNumVertexWeights(1);
    │ │ │ │ -
    187 mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    188 mask.SetNumFaceWeights(valence);
    │ │ │ │ -
    189 mask.SetFaceWeightsForFaceCenters(true);
    │ │ │ │ -
    190
    │ │ │ │ -
    191 Weight vWeight = (Weight)(valence - 2) / (Weight)valence;
    │ │ │ │ -
    192 Weight fWeight = 1.0f / (Weight)(valence * valence);
    │ │ │ │ -
    193 Weight eWeight = fWeight;
    │ │ │ │ -
    194
    │ │ │ │ -
    195 mask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    196 for (int i = 0; i < valence; ++i) {
    │ │ │ │ -
    197 mask.EdgeWeight(i) = eWeight;
    │ │ │ │ -
    198 mask.FaceWeight(i) = fWeight;
    │ │ │ │ -
    199 }
    │ │ │ │ -
    200}
    │ │ │ │ -
    │ │ │ │ -
    201
    │ │ │ │ -
    202//
    │ │ │ │ -
    203// Limit masks for position:
    │ │ │ │ -
    204//
    │ │ │ │ -
    205template <>
    │ │ │ │ -
    206template <typename VERTEX, typename MASK>
    │ │ │ │ -
    207inline void
    │ │ │ │ -
    │ │ │ │ -
    208Scheme<SCHEME_CATMARK>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
    │ │ │ │ -
    209
    │ │ │ │ -
    210 posMask.SetNumVertexWeights(1);
    │ │ │ │ -
    211 posMask.SetNumEdgeWeights(0);
    │ │ │ │ -
    212 posMask.SetNumFaceWeights(0);
    │ │ │ │ -
    213 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    214
    │ │ │ │ -
    215 posMask.VertexWeight(0) = 1.0f;
    │ │ │ │ -
    216}
    │ │ │ │ -
    │ │ │ │ -
    217
    │ │ │ │ -
    218template <>
    │ │ │ │ -
    219template <typename VERTEX, typename MASK>
    │ │ │ │ -
    220inline void
    │ │ │ │ -
    │ │ │ │ -
    221Scheme<SCHEME_CATMARK>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
    │ │ │ │ -
    222 int const creaseEnds[2]) const {
    │ │ │ │ -
    223
    │ │ │ │ -
    224 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    225
    │ │ │ │ -
    226 int valence = vertex.GetNumEdges();
    │ │ │ │ -
    227
    │ │ │ │ -
    228 posMask.SetNumVertexWeights(1);
    │ │ │ │ -
    229 posMask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    230 posMask.SetNumFaceWeights(0);
    │ │ │ │ -
    231 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    232
    │ │ │ │ -
    233 Weight vWeight = (Weight)(2.0 / 3.0);
    │ │ │ │ -
    234 Weight eWeight = (Weight)(1.0 / 6.0);
    │ │ │ │ -
    235
    │ │ │ │ -
    236 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    237 for (int i = 0; i < valence; ++i) {
    │ │ │ │ -
    238 posMask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    239 }
    │ │ │ │ -
    240 posMask.EdgeWeight(creaseEnds[0]) = eWeight;
    │ │ │ │ -
    241 posMask.EdgeWeight(creaseEnds[1]) = eWeight;
    │ │ │ │ -
    242}
    │ │ │ │ -
    │ │ │ │ -
    243
    │ │ │ │ -
    244template <>
    │ │ │ │ -
    245template <typename VERTEX, typename MASK>
    │ │ │ │ -
    246inline void
    │ │ │ │ -
    │ │ │ │ -
    247Scheme<SCHEME_CATMARK>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
    │ │ │ │ -
    248
    │ │ │ │ -
    249 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    250
    │ │ │ │ -
    251 int valence = vertex.GetNumFaces();
    │ │ │ │ -
    252 if (valence == 2) {
    │ │ │ │ -
    253 assignCornerLimitMask(vertex, posMask);
    │ │ │ │ -
    254 return;
    │ │ │ │ -
    255 }
    │ │ │ │ -
    256
    │ │ │ │ -
    257 posMask.SetNumVertexWeights(1);
    │ │ │ │ -
    258 posMask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    259 posMask.SetNumFaceWeights(valence);
    │ │ │ │ -
    260 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    261
    │ │ │ │ -
    262 // Specialize for the regular case:
    │ │ │ │ -
    263 if (valence == 4) {
    │ │ │ │ -
    264 Weight fWeight = (Weight)(1.0 / 36.0);
    │ │ │ │ -
    265 Weight eWeight = (Weight)(1.0 / 9.0);
    │ │ │ │ -
    266 Weight vWeight = (Weight)(4.0 / 9.0);
    │ │ │ │ -
    267
    │ │ │ │ -
    268 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    269
    │ │ │ │ -
    270 posMask.EdgeWeight(0) = eWeight;
    │ │ │ │ -
    271 posMask.EdgeWeight(1) = eWeight;
    │ │ │ │ -
    272 posMask.EdgeWeight(2) = eWeight;
    │ │ │ │ -
    273 posMask.EdgeWeight(3) = eWeight;
    │ │ │ │ -
    274
    │ │ │ │ -
    275 posMask.FaceWeight(0) = fWeight;
    │ │ │ │ -
    276 posMask.FaceWeight(1) = fWeight;
    │ │ │ │ -
    277 posMask.FaceWeight(2) = fWeight;
    │ │ │ │ -
    278 posMask.FaceWeight(3) = fWeight;
    │ │ │ │ -
    279 } else {
    │ │ │ │ -
    280 Weight Valence = (Weight) valence;
    │ │ │ │ -
    281
    │ │ │ │ -
    282 Weight fWeight = 1.0f / (Valence * (Valence + 5.0f));
    │ │ │ │ -
    283 Weight eWeight = 4.0f * fWeight;
    │ │ │ │ -
    284 Weight vWeight = 1.0f - Valence * (eWeight + fWeight);
    │ │ │ │ -
    285
    │ │ │ │ -
    286 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ -
    287 for (int i = 0; i < valence; ++i) {
    │ │ │ │ -
    288 posMask.EdgeWeight(i) = eWeight;
    │ │ │ │ -
    289 posMask.FaceWeight(i) = fWeight;
    │ │ │ │ -
    290 }
    │ │ │ │ -
    291 }
    │ │ │ │ -
    292}
    │ │ │ │ -
    │ │ │ │ -
    293
    │ │ │ │ -
    294//
    │ │ │ │ -
    295// Limit masks for tangents -- these are stubs for now, or have a temporary
    │ │ │ │ -
    296// implementation
    │ │ │ │ -
    297//
    │ │ │ │ -
    298template <>
    │ │ │ │ -
    299template <typename VERTEX, typename MASK>
    │ │ │ │ -
    300inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    302 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ -
    303
    │ │ │ │ -
    304 int valence = vertex.GetNumEdges();
    │ │ │ │ -
    305
    │ │ │ │ -
    306 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    307 tan1Mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    308 tan1Mask.SetNumFaceWeights(0);
    │ │ │ │ -
    309 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    310
    │ │ │ │ -
    311 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    312 tan2Mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    313 tan2Mask.SetNumFaceWeights(0);
    │ │ │ │ -
    314 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    315
    │ │ │ │ -
    316 // Should be at least 2 edges -- be sure to clear weights for any more:
    │ │ │ │ -
    317 tan1Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ -
    318 tan1Mask.EdgeWeight(0) = 1.0f;
    │ │ │ │ -
    319 tan1Mask.EdgeWeight(1) = 0.0f;
    │ │ │ │ -
    320
    │ │ │ │ -
    321 tan2Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ -
    322 tan2Mask.EdgeWeight(0) = 0.0f;
    │ │ │ │ -
    323 tan2Mask.EdgeWeight(1) = 1.0f;
    │ │ │ │ -
    324
    │ │ │ │ -
    325 for (int i = 2; i < valence; ++i) {
    │ │ │ │ -
    326 tan1Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    327 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    328 }
    │ │ │ │ -
    329}
    │ │ │ │ -
    │ │ │ │ -
    330
    │ │ │ │ -
    331template <>
    │ │ │ │ -
    332template <typename VERTEX, typename MASK>
    │ │ │ │ -
    333inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    335 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const {
    │ │ │ │ -
    336
    │ │ │ │ -
    337 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    338
    │ │ │ │ -
    339 //
    │ │ │ │ -
    340 // First, the tangent along the crease:
    │ │ │ │ -
    341 // The first crease edge is considered the "leading" edge of the span
    │ │ │ │ -
    342 // of surface for which we are evaluating tangents and the second edge the
    │ │ │ │ -
    343 // "trailing edge". By convention, the tangent along the crease is oriented
    │ │ │ │ -
    344 // in the direction of the leading edge.
    │ │ │ │ -
    345 //
    │ │ │ │ -
    346 int numEdges = vertex.GetNumEdges();
    │ │ │ │ -
    347 int numFaces = vertex.GetNumFaces();
    │ │ │ │ -
    348
    │ │ │ │ -
    349 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    350 tan1Mask.SetNumEdgeWeights(numEdges);
    │ │ │ │ -
    351 tan1Mask.SetNumFaceWeights(numFaces);
    │ │ │ │ -
    352 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    353
    │ │ │ │ -
    354 tan1Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ -
    355 for (int i = 0; i < numEdges; ++i) {
    │ │ │ │ -
    356 tan1Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    357 }
    │ │ │ │ -
    358 for (int i = 0; i < numFaces; ++i) {
    │ │ │ │ -
    359 tan1Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ -
    360 }
    │ │ │ │ -
    361
    │ │ │ │ -
    362 tan1Mask.EdgeWeight(creaseEnds[0]) = 0.5f;
    │ │ │ │ -
    363 tan1Mask.EdgeWeight(creaseEnds[1]) = -0.5f;
    │ │ │ │ -
    364
    │ │ │ │ -
    365 //
    │ │ │ │ -
    366 // Second, the tangent across the interior faces:
    │ │ │ │ -
    367 // Note this is ambiguous for an interior vertex. We currently return
    │ │ │ │ -
    368 // the tangent for the surface in the counter-clockwise span between the
    │ │ │ │ -
    369 // leading and trailing edges that form the crease. Given the expected
    │ │ │ │ -
    370 // computation of a surface normal as Tan1 X Tan2, this tangent should be
    │ │ │ │ -
    371 // oriented "inward" from the crease/boundary -- across the surface rather
    │ │ │ │ -
    372 // than outward and away from it.
    │ │ │ │ -
    373 //
    │ │ │ │ -
    374 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    375 tan2Mask.SetNumEdgeWeights(numEdges);
    │ │ │ │ -
    376 tan2Mask.SetNumFaceWeights(numFaces);
    │ │ │ │ -
    377 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    378
    │ │ │ │ -
    379 // Prepend weights of 0 preceding the crease:
    │ │ │ │ -
    380 for (int i = 0; i < creaseEnds[0]; ++i) {
    │ │ │ │ -
    381 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    382 tan2Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ -
    383 }
    │ │ │ │ -
    384
    │ │ │ │ -
    385 // Assign weights to crease edge and interior points:
    │ │ │ │ -
    386 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1;
    │ │ │ │ -
    387 if (interiorEdgeCount == 1) {
    │ │ │ │ -
    388 // The regular case -- uniform B-spline cross-tangent:
    │ │ │ │ -
    389
    │ │ │ │ -
    390 tan2Mask.VertexWeight(0) = (Weight)(-4.0 / 6.0);
    │ │ │ │ -
    391
    │ │ │ │ -
    392 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight)(-1.0 / 6.0);
    │ │ │ │ -
    393 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = (Weight)( 4.0 / 6.0);
    │ │ │ │ -
    394 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight)(-1.0 / 6.0);
    │ │ │ │ -
    395
    │ │ │ │ -
    396 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight)(1.0 / 6.0);
    │ │ │ │ -
    397 tan2Mask.FaceWeight(creaseEnds[0] + 1) = (Weight)(1.0 / 6.0);
    │ │ │ │ -
    398 } else if (interiorEdgeCount > 1) {
    │ │ │ │ -
    399 // The irregular case -- formulae from Biermann et al:
    │ │ │ │ -
    400
    │ │ │ │ -
    401 double k = (double) (interiorEdgeCount + 1);
    │ │ │ │ -
    402 double theta = M_PI / k;
    │ │ │ │ -
    403
    │ │ │ │ -
    404 double cosTheta = std::cos(theta);
    │ │ │ │ -
    405 double sinTheta = std::sin(theta);
    │ │ │ │ -
    406
    │ │ │ │ -
    407 // Loop/Schaefer use a different divisor here (3*k + cos(theta)):
    │ │ │ │ -
    408 double commonDenom = 1.0f / (k * (3.0f + cosTheta));
    │ │ │ │ -
    409 double R = (cosTheta + 1.0f) / sinTheta;
    │ │ │ │ -
    410
    │ │ │ │ -
    411 double vertexWeight = 4.0f * R * (cosTheta - 1.0f);
    │ │ │ │ -
    412 double creaseWeight = -R * (1.0f + 2.0f * cosTheta);
    │ │ │ │ -
    413
    │ │ │ │ -
    414 tan2Mask.VertexWeight(0) = (Weight) (vertexWeight * commonDenom);
    │ │ │ │ -
    415
    │ │ │ │ -
    416 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight) (creaseWeight * commonDenom);
    │ │ │ │ -
    417 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight) (creaseWeight * commonDenom);
    │ │ │ │ -
    418
    │ │ │ │ -
    419 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight) (sinTheta * commonDenom);
    │ │ │ │ -
    420
    │ │ │ │ -
    421 double sinThetaI = 0.0f;
    │ │ │ │ -
    422 double sinThetaIplus1 = sinTheta;
    │ │ │ │ -
    423 for (int i = 1; i < k; ++i) {
    │ │ │ │ -
    424 sinThetaI = sinThetaIplus1;
    │ │ │ │ -
    425 sinThetaIplus1 = std::sin((i+1)*theta);
    │ │ │ │ -
    426
    │ │ │ │ -
    427 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) ((4.0f * sinThetaI) * commonDenom);
    │ │ │ │ -
    428 tan2Mask.FaceWeight(creaseEnds[0] + i) = (Weight) ((sinThetaI + sinThetaIplus1) * commonDenom);
    │ │ │ │ -
    429 }
    │ │ │ │ -
    430 } else {
    │ │ │ │ -
    431 // Special case for a single face -- simple average of boundary edges:
    │ │ │ │ -
    432
    │ │ │ │ -
    433 tan2Mask.VertexWeight(0) = -6.0f;
    │ │ │ │ -
    434
    │ │ │ │ -
    435 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f;
    │ │ │ │ -
    436 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f;
    │ │ │ │ -
    437
    │ │ │ │ -
    438 tan2Mask.FaceWeight(creaseEnds[0]) = 0.0f;
    │ │ │ │ -
    439 }
    │ │ │ │ -
    440
    │ │ │ │ -
    441 // Append weights of 0 following the crease:
    │ │ │ │ -
    442 for (int i = creaseEnds[1]; i < numFaces; ++i) {
    │ │ │ │ -
    443 tan2Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ -
    444 }
    │ │ │ │ -
    445 for (int i = creaseEnds[1] + 1; i < numEdges; ++i) {
    │ │ │ │ -
    446 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ -
    447 }
    │ │ │ │ -
    448}
    │ │ │ │ -
    │ │ │ │ -
    449
    │ │ │ │ -
    450template <>
    │ │ │ │ -
    451template <typename VERTEX, typename MASK>
    │ │ │ │ -
    452inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    454 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ -
    455
    │ │ │ │ -
    456 typedef typename MASK::Weight Weight;
    │ │ │ │ -
    457
    │ │ │ │ -
    458 int valence = vertex.GetNumFaces();
    │ │ │ │ -
    459 if (valence == 2) {
    │ │ │ │ -
    460 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
    │ │ │ │ -
    461 return;
    │ │ │ │ -
    462 }
    │ │ │ │ -
    463
    │ │ │ │ -
    464 // Compute tan1 initially -- tan2 is simply a rotation:
    │ │ │ │ -
    465 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    466 tan1Mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    467 tan1Mask.SetNumFaceWeights(valence);
    │ │ │ │ -
    468 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    469
    │ │ │ │ -
    470 tan1Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ -
    471
    │ │ │ │ -
    472 if (valence == 4) {
    │ │ │ │ -
    473 tan1Mask.EdgeWeight(0) = 4.0f;
    │ │ │ │ -
    474 tan1Mask.EdgeWeight(1) = 0.0f;
    │ │ │ │ -
    475 tan1Mask.EdgeWeight(2) = -4.0f;
    │ │ │ │ -
    476 tan1Mask.EdgeWeight(3) = 0.0f;
    │ │ │ │ -
    477
    │ │ │ │ -
    478 tan1Mask.FaceWeight(0) = 1.0f;
    │ │ │ │ -
    479 tan1Mask.FaceWeight(1) = -1.0f;
    │ │ │ │ -
    480 tan1Mask.FaceWeight(2) = -1.0f;
    │ │ │ │ -
    481 tan1Mask.FaceWeight(3) = 1.0f;
    │ │ │ │ -
    482 } else {
    │ │ │ │ -
    483 double theta = 2.0f * M_PI / (double)valence;
    │ │ │ │ -
    484
    │ │ │ │ -
    485 double cosTheta = std::cos(theta);
    │ │ │ │ -
    486 double cosHalfTheta = std::cos(theta * 0.5f);
    │ │ │ │ -
    487
    │ │ │ │ -
    488 double lambda = (5.0 / 16.0) + (1.0 / 16.0) *
    │ │ │ │ -
    489 (cosTheta + cosHalfTheta * std::sqrt(2.0f * (9.0f + cosTheta)));
    │ │ │ │ -
    490
    │ │ │ │ -
    491 double edgeWeightScale = 4.0f;
    │ │ │ │ -
    492 double faceWeightScale = 1.0f / (4.0f * lambda - 1.0f);
    │ │ │ │ -
    493
    │ │ │ │ -
    494 for (int i = 0; i < valence; ++i) {
    │ │ │ │ -
    495 double cosThetaI = std::cos( i * theta);
    │ │ │ │ -
    496 double cosThetaIplus1 = std::cos((i+1)* theta);
    │ │ │ │ -
    497
    │ │ │ │ -
    498 tan1Mask.EdgeWeight(i) = (Weight) (edgeWeightScale * cosThetaI);
    │ │ │ │ -
    499 tan1Mask.FaceWeight(i) = (Weight) (faceWeightScale * (cosThetaI + cosThetaIplus1));
    │ │ │ │ -
    500 }
    │ │ │ │ -
    501 }
    │ │ │ │ -
    502
    │ │ │ │ -
    503 // Now rotate/copy tan1 weights to tan2:
    │ │ │ │ -
    504 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ -
    505 tan2Mask.SetNumEdgeWeights(valence);
    │ │ │ │ -
    506 tan2Mask.SetNumFaceWeights(valence);
    │ │ │ │ -
    507 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ -
    508
    │ │ │ │ -
    509 tan2Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ -
    510 if (valence == 4) {
    │ │ │ │ -
    511 tan2Mask.EdgeWeight(0) = 0.0f;
    │ │ │ │ -
    512 tan2Mask.EdgeWeight(1) = 4.0f;
    │ │ │ │ -
    513 tan2Mask.EdgeWeight(2) = 0.0f;
    │ │ │ │ -
    514 tan2Mask.EdgeWeight(3) = -4.0f;
    │ │ │ │ -
    515
    │ │ │ │ -
    516 tan2Mask.FaceWeight(0) = 1.0f;
    │ │ │ │ -
    517 tan2Mask.FaceWeight(1) = 1.0f;
    │ │ │ │ -
    518 tan2Mask.FaceWeight(2) = -1.0f;
    │ │ │ │ -
    519 tan2Mask.FaceWeight(3) = -1.0f;
    │ │ │ │ -
    520 } else {
    │ │ │ │ -
    521 tan2Mask.EdgeWeight(0) = tan1Mask.EdgeWeight(valence-1);
    │ │ │ │ -
    522 tan2Mask.FaceWeight(0) = tan1Mask.FaceWeight(valence-1);
    │ │ │ │ -
    523 for (int i = 1; i < valence; ++i) {
    │ │ │ │ -
    524 tan2Mask.EdgeWeight(i) = tan1Mask.EdgeWeight(i-1);
    │ │ │ │ -
    525 tan2Mask.FaceWeight(i) = tan1Mask.FaceWeight(i-1);
    │ │ │ │ -
    526 }
    │ │ │ │ -
    527 }
    │ │ │ │ -
    528}
    │ │ │ │ -
    │ │ │ │ -
    529
    │ │ │ │ -
    530} // end namespace sdc
    │ │ │ │ -
    531
    │ │ │ │ -
    532} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    533using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    534} // end namespace OpenSubdiv
    │ │ │ │ -
    535
    │ │ │ │ -
    536#endif /* OPENSUBDIV3_SDC_CATMARK_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
    │ │ │ │ -
    @ TRI_SUB_SMOOTH
    "smooth triangle" weights (Catmark scheme only)
    Definition options.h:74
    │ │ │ │ -
    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 assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
    │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ +
    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 │ │ │ │ │ -catmarkScheme.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 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,592 +23,95 @@ │ │ │ │ │ 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_CATMARK_SCHEME_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_CATMARK_SCHEME_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../sdc/scheme.h" │ │ │ │ │ -30 │ │ │ │ │ -31#include │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Sdc { │ │ │ │ │ -38 │ │ │ │ │ -39// │ │ │ │ │ -40// Specializations for Scheme: │ │ │ │ │ -41// │ │ │ │ │ -42 │ │ │ │ │ -43// │ │ │ │ │ -44// Catmark traits: │ │ │ │ │ -45// │ │ │ │ │ -46template <> │ │ │ │ │ -_4_7inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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___Q_U_A_D_S; } │ │ │ │ │ -48 │ │ │ │ │ -49template <> │ │ │ │ │ -_5_0inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 4; } │ │ │ │ │ -51 │ │ │ │ │ -52template <> │ │ │ │ │ -_5_3inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 4; } │ │ │ │ │ -54 │ │ │ │ │ -55template <> │ │ │ │ │ -_5_6inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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; } │ │ │ │ │ -57 │ │ │ │ │ -58 │ │ │ │ │ -59// │ │ │ │ │ -60// Masks for edge-vertices: the hard Crease mask does not need to be │ │ │ │ │ -specialized │ │ │ │ │ -61// (simply the midpoint), so all that is left is the Smooth case: │ │ │ │ │ -62// │ │ │ │ │ -63// The Smooth mask is complicated by the need to support the "triangle │ │ │ │ │ -subdivision" │ │ │ │ │ -64// option, which applies different weighting in the presence of triangles. It │ │ │ │ │ -is │ │ │ │ │ -65// up for debate as to whether this is useful or not -- we may be able to │ │ │ │ │ -deprecate │ │ │ │ │ -66// this option. │ │ │ │ │ -67// │ │ │ │ │ -68template <> │ │ │ │ │ -69template │ │ │ │ │ -70inline void │ │ │ │ │ -_7_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ -72 │ │ │ │ │ -73 typedef typename MASK::Weight Weight; │ │ │ │ │ +24 │ │ │ │ │ +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 │ │ │ │ │ +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_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 │ │ │ │ │ -75 int faceCount = edge.GetNumFaces(); │ │ │ │ │ -76 │ │ │ │ │ -77 mask.SetNumVertexWeights(2); │ │ │ │ │ -78 mask.SetNumEdgeWeights(0); │ │ │ │ │ -79 mask.SetNumFaceWeights(faceCount); │ │ │ │ │ -80 mask.SetFaceWeightsForFaceCenters(true); │ │ │ │ │ +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 │ │ │ │ │ -82 // │ │ │ │ │ -83 // Determine if we need to inspect incident faces and apply alternate │ │ │ │ │ -weighting for │ │ │ │ │ -84 // triangles -- and if so, determine which of the two are triangles. │ │ │ │ │ -85 // │ │ │ │ │ -86 bool face0IsTri = false; │ │ │ │ │ -87 bool face1IsTri = false; │ │ │ │ │ -88 bool useTriangleOption = (_options.GetTriangleSubdivision() == _O_p_t_i_o_n_s_:_: │ │ │ │ │ -_T_R_I___S_U_B___S_M_O_O_T_H); │ │ │ │ │ -89 if (useTriangleOption) { │ │ │ │ │ -90 if (faceCount == 2) { │ │ │ │ │ -91 // │ │ │ │ │ -92 // Ideally we want to avoid this inspection when we have already subdivided │ │ │ │ │ -at │ │ │ │ │ -93 // least once -- need something in the Edge interface to help avoid this, │ │ │ │ │ -e.g. │ │ │ │ │ -94 // an IsRegular() query, the subdivision level... │ │ │ │ │ -95 // │ │ │ │ │ -96 int vertsPerFace[2]; │ │ │ │ │ -97 edge.GetNumVerticesPerFace(vertsPerFace); │ │ │ │ │ -98 │ │ │ │ │ -99 face0IsTri = (vertsPerFace[0] == 3); │ │ │ │ │ -100 face1IsTri = (vertsPerFace[1] == 3); │ │ │ │ │ -101 useTriangleOption = face0IsTri || face1IsTri; │ │ │ │ │ -102 } else { │ │ │ │ │ -103 useTriangleOption = false; │ │ │ │ │ -104 } │ │ │ │ │ -105 } │ │ │ │ │ -106 │ │ │ │ │ -107 if (! useTriangleOption) { │ │ │ │ │ -108 mask.VertexWeight(0) = 0.25f; │ │ │ │ │ -109 mask.VertexWeight(1) = 0.25f; │ │ │ │ │ -110 │ │ │ │ │ -111 if (faceCount == 2) { │ │ │ │ │ -112 mask.FaceWeight(0) = 0.25f; │ │ │ │ │ -113 mask.FaceWeight(1) = 0.25f; │ │ │ │ │ -114 } else { │ │ │ │ │ -115 Weight fWeight = 0.5f / (Weight)faceCount; │ │ │ │ │ -116 for (int i = 0; i < faceCount; ++i) { │ │ │ │ │ -117 mask.FaceWeight(i) = fWeight; │ │ │ │ │ -118 } │ │ │ │ │ -119 } │ │ │ │ │ -120 } else { │ │ │ │ │ -121 // │ │ │ │ │ -122 // This mimics the implementation in Hbr in terms of order of operations. │ │ │ │ │ -123 // │ │ │ │ │ -124 const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470; │ │ │ │ │ -125 │ │ │ │ │ -126 Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f; │ │ │ │ │ -127 Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f; │ │ │ │ │ -128 │ │ │ │ │ -129 Weight fWeight = 0.5f * (f0Weight + f1Weight); │ │ │ │ │ -130 Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight); │ │ │ │ │ -131 │ │ │ │ │ -132 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -133 mask.VertexWeight(1) = vWeight; │ │ │ │ │ -134 │ │ │ │ │ -135 mask.FaceWeight(0) = fWeight; │ │ │ │ │ -136 mask.FaceWeight(1) = fWeight; │ │ │ │ │ -137 } │ │ │ │ │ -138} │ │ │ │ │ -139 │ │ │ │ │ -140 │ │ │ │ │ -141// │ │ │ │ │ -142// Masks for vertex-vertices: the hard Corner mask does not need to be │ │ │ │ │ -specialized │ │ │ │ │ -143// (simply the vertex itself), leaving the Crease and Smooth cases (Dart is │ │ │ │ │ -smooth): │ │ │ │ │ -144// │ │ │ │ │ -145template <> │ │ │ │ │ -146template │ │ │ │ │ -147inline void │ │ │ │ │ -_1_4_8_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ -149 int const creaseEnds[2]) const { │ │ │ │ │ -150 typedef typename MASK::Weight Weight; │ │ │ │ │ -151 │ │ │ │ │ -152 int valence = vertex.GetNumEdges(); │ │ │ │ │ -153 │ │ │ │ │ -154 mask.SetNumVertexWeights(1); │ │ │ │ │ -155 mask.SetNumEdgeWeights(valence); │ │ │ │ │ -156 mask.SetNumFaceWeights(0); │ │ │ │ │ -157 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -158 │ │ │ │ │ -159 Weight vWeight = 0.75f; │ │ │ │ │ -160 Weight eWeight = 0.125f; │ │ │ │ │ -161 │ │ │ │ │ -162 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -163 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -164 mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -165 } │ │ │ │ │ -166 mask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ -167 mask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ -168} │ │ │ │ │ -169 │ │ │ │ │ -170template <> │ │ │ │ │ -171template │ │ │ │ │ -172inline void │ │ │ │ │ -_1_7_3_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ -174 │ │ │ │ │ -175 typedef typename MASK::Weight Weight; │ │ │ │ │ -176 │ │ │ │ │ -177 // │ │ │ │ │ -178 // A Smooth vertex must be manifold and interior -- manifold boundary │ │ │ │ │ -vertices will be │ │ │ │ │ -179 // Creases and non-manifold vertices of any kind will be Corners or │ │ │ │ │ -Creases. If smooth │ │ │ │ │ -180 // rules for non-manifold vertices are ever defined, this will need │ │ │ │ │ -adjusting: │ │ │ │ │ -181 // │ │ │ │ │ -182 assert(vertex.GetNumFaces() == vertex.GetNumEdges()); │ │ │ │ │ -183 │ │ │ │ │ -184 int valence = vertex.GetNumFaces(); │ │ │ │ │ -185 │ │ │ │ │ -186 mask.SetNumVertexWeights(1); │ │ │ │ │ -187 mask.SetNumEdgeWeights(valence); │ │ │ │ │ -188 mask.SetNumFaceWeights(valence); │ │ │ │ │ -189 mask.SetFaceWeightsForFaceCenters(true); │ │ │ │ │ -190 │ │ │ │ │ -191 Weight vWeight = (Weight)(valence - 2) / (Weight)valence; │ │ │ │ │ -192 Weight fWeight = 1.0f / (Weight)(valence * valence); │ │ │ │ │ -193 Weight eWeight = fWeight; │ │ │ │ │ -194 │ │ │ │ │ -195 mask.VertexWeight(0) = vWeight; │ │ │ │ │ -196 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -197 mask.EdgeWeight(i) = eWeight; │ │ │ │ │ -198 mask.FaceWeight(i) = fWeight; │ │ │ │ │ -199 } │ │ │ │ │ -200} │ │ │ │ │ -201 │ │ │ │ │ -202// │ │ │ │ │ -203// Limit masks for position: │ │ │ │ │ -204// │ │ │ │ │ -205template <> │ │ │ │ │ -206template │ │ │ │ │ -207inline void │ │ │ │ │ -_2_0_8_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ -209 │ │ │ │ │ -210 posMask.SetNumVertexWeights(1); │ │ │ │ │ -211 posMask.SetNumEdgeWeights(0); │ │ │ │ │ -212 posMask.SetNumFaceWeights(0); │ │ │ │ │ -213 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -214 │ │ │ │ │ -215 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ -216} │ │ │ │ │ -217 │ │ │ │ │ -218template <> │ │ │ │ │ -219template │ │ │ │ │ -220inline void │ │ │ │ │ -_2_2_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ -222 int const creaseEnds[2]) const { │ │ │ │ │ -223 │ │ │ │ │ -224 typedef typename MASK::Weight Weight; │ │ │ │ │ -225 │ │ │ │ │ -226 int valence = vertex.GetNumEdges(); │ │ │ │ │ -227 │ │ │ │ │ -228 posMask.SetNumVertexWeights(1); │ │ │ │ │ -229 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ -230 posMask.SetNumFaceWeights(0); │ │ │ │ │ -231 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -232 │ │ │ │ │ -233 Weight vWeight = (Weight)(2.0 / 3.0); │ │ │ │ │ -234 Weight eWeight = (Weight)(1.0 / 6.0); │ │ │ │ │ -235 │ │ │ │ │ -236 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -237 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -238 posMask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -239 } │ │ │ │ │ -240 posMask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ -241 posMask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ -242} │ │ │ │ │ -243 │ │ │ │ │ -244template <> │ │ │ │ │ -245template │ │ │ │ │ -246inline void │ │ │ │ │ -_2_4_7_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ -248 │ │ │ │ │ -249 typedef typename MASK::Weight Weight; │ │ │ │ │ -250 │ │ │ │ │ -251 int valence = vertex.GetNumFaces(); │ │ │ │ │ -252 if (valence == 2) { │ │ │ │ │ -253 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ -254 return; │ │ │ │ │ -255 } │ │ │ │ │ -256 │ │ │ │ │ -257 posMask.SetNumVertexWeights(1); │ │ │ │ │ -258 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ -259 posMask.SetNumFaceWeights(valence); │ │ │ │ │ -260 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -261 │ │ │ │ │ -262 // Specialize for the regular case: │ │ │ │ │ -263 if (valence == 4) { │ │ │ │ │ -264 Weight fWeight = (Weight)(1.0 / 36.0); │ │ │ │ │ -265 Weight eWeight = (Weight)(1.0 / 9.0); │ │ │ │ │ -266 Weight vWeight = (Weight)(4.0 / 9.0); │ │ │ │ │ -267 │ │ │ │ │ -268 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -269 │ │ │ │ │ -270 posMask.EdgeWeight(0) = eWeight; │ │ │ │ │ -271 posMask.EdgeWeight(1) = eWeight; │ │ │ │ │ -272 posMask.EdgeWeight(2) = eWeight; │ │ │ │ │ -273 posMask.EdgeWeight(3) = eWeight; │ │ │ │ │ -274 │ │ │ │ │ -275 posMask.FaceWeight(0) = fWeight; │ │ │ │ │ -276 posMask.FaceWeight(1) = fWeight; │ │ │ │ │ -277 posMask.FaceWeight(2) = fWeight; │ │ │ │ │ -278 posMask.FaceWeight(3) = fWeight; │ │ │ │ │ -279 } else { │ │ │ │ │ -280 Weight Valence = (Weight) valence; │ │ │ │ │ -281 │ │ │ │ │ -282 Weight fWeight = 1.0f / (Valence * (Valence + 5.0f)); │ │ │ │ │ -283 Weight eWeight = 4.0f * fWeight; │ │ │ │ │ -284 Weight vWeight = 1.0f - Valence * (eWeight + fWeight); │ │ │ │ │ -285 │ │ │ │ │ -286 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ -287 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -288 posMask.EdgeWeight(i) = eWeight; │ │ │ │ │ -289 posMask.FaceWeight(i) = fWeight; │ │ │ │ │ -290 } │ │ │ │ │ -291 } │ │ │ │ │ -292} │ │ │ │ │ -293 │ │ │ │ │ -294// │ │ │ │ │ -295// Limit masks for tangents -- these are stubs for now, or have a temporary │ │ │ │ │ -296// implementation │ │ │ │ │ -297// │ │ │ │ │ -298template <> │ │ │ │ │ -299template │ │ │ │ │ -300inline void │ │ │ │ │ -_3_0_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ -302 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -303 │ │ │ │ │ -304 int valence = vertex.GetNumEdges(); │ │ │ │ │ -305 │ │ │ │ │ -306 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -307 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -308 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ -309 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -310 │ │ │ │ │ -311 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -312 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -313 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ -314 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -315 │ │ │ │ │ -316 // Should be at least 2 edges -- be sure to clear weights for any more: │ │ │ │ │ -317 tan1Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ -318 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ -319 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ -320 │ │ │ │ │ -321 tan2Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ -322 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ -323 tan2Mask.EdgeWeight(1) = 1.0f; │ │ │ │ │ -324 │ │ │ │ │ -325 for (int i = 2; i < valence; ++i) { │ │ │ │ │ -326 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -327 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -328 } │ │ │ │ │ -329} │ │ │ │ │ -330 │ │ │ │ │ -331template <> │ │ │ │ │ -332template │ │ │ │ │ -333inline void │ │ │ │ │ -_3_3_4_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ -335 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const { │ │ │ │ │ -336 │ │ │ │ │ -337 typedef typename MASK::Weight Weight; │ │ │ │ │ -338 │ │ │ │ │ -339 // │ │ │ │ │ -340 // First, the tangent along the crease: │ │ │ │ │ -341 // The first crease edge is considered the "leading" edge of the span │ │ │ │ │ -342 // of surface for which we are evaluating tangents and the second edge the │ │ │ │ │ -343 // "trailing edge". By convention, the tangent along the crease is oriented │ │ │ │ │ -344 // in the direction of the leading edge. │ │ │ │ │ -345 // │ │ │ │ │ -346 int numEdges = vertex.GetNumEdges(); │ │ │ │ │ -347 int numFaces = vertex.GetNumFaces(); │ │ │ │ │ -348 │ │ │ │ │ -349 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -350 tan1Mask.SetNumEdgeWeights(numEdges); │ │ │ │ │ -351 tan1Mask.SetNumFaceWeights(numFaces); │ │ │ │ │ -352 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -353 │ │ │ │ │ -354 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -355 for (int i = 0; i < numEdges; ++i) { │ │ │ │ │ -356 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -357 } │ │ │ │ │ -358 for (int i = 0; i < numFaces; ++i) { │ │ │ │ │ -359 tan1Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ -360 } │ │ │ │ │ -361 │ │ │ │ │ -362 tan1Mask.EdgeWeight(creaseEnds[0]) = 0.5f; │ │ │ │ │ -363 tan1Mask.EdgeWeight(creaseEnds[1]) = -0.5f; │ │ │ │ │ -364 │ │ │ │ │ -365 // │ │ │ │ │ -366 // Second, the tangent across the interior faces: │ │ │ │ │ -367 // Note this is ambiguous for an interior vertex. We currently return │ │ │ │ │ -368 // the tangent for the surface in the counter-clockwise span between the │ │ │ │ │ -369 // leading and trailing edges that form the crease. Given the expected │ │ │ │ │ -370 // computation of a surface normal as Tan1 X Tan2, this tangent should be │ │ │ │ │ -371 // oriented "inward" from the crease/boundary -- across the surface rather │ │ │ │ │ -372 // than outward and away from it. │ │ │ │ │ -373 // │ │ │ │ │ -374 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -375 tan2Mask.SetNumEdgeWeights(numEdges); │ │ │ │ │ -376 tan2Mask.SetNumFaceWeights(numFaces); │ │ │ │ │ -377 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -378 │ │ │ │ │ -379 // Prepend weights of 0 preceding the crease: │ │ │ │ │ -380 for (int i = 0; i < creaseEnds[0]; ++i) { │ │ │ │ │ -381 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -382 tan2Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ -383 } │ │ │ │ │ -384 │ │ │ │ │ -385 // Assign weights to crease edge and interior points: │ │ │ │ │ -386 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1; │ │ │ │ │ -387 if (interiorEdgeCount == 1) { │ │ │ │ │ -388 // The regular case -- uniform B-spline cross-tangent: │ │ │ │ │ -389 │ │ │ │ │ -390 tan2Mask.VertexWeight(0) = (Weight)(-4.0 / 6.0); │ │ │ │ │ -391 │ │ │ │ │ -392 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight)(-1.0 / 6.0); │ │ │ │ │ -393 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = (Weight)( 4.0 / 6.0); │ │ │ │ │ -394 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight)(-1.0 / 6.0); │ │ │ │ │ -395 │ │ │ │ │ -396 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight)(1.0 / 6.0); │ │ │ │ │ -397 tan2Mask.FaceWeight(creaseEnds[0] + 1) = (Weight)(1.0 / 6.0); │ │ │ │ │ -398 } else if (interiorEdgeCount > 1) { │ │ │ │ │ -399 // The irregular case -- formulae from Biermann et al: │ │ │ │ │ -400 │ │ │ │ │ -401 double k = (double) (interiorEdgeCount + 1); │ │ │ │ │ -402 double theta = M_PI / k; │ │ │ │ │ -403 │ │ │ │ │ -404 double cosTheta = std::cos(theta); │ │ │ │ │ -405 double sinTheta = std::sin(theta); │ │ │ │ │ -406 │ │ │ │ │ -407 // Loop/Schaefer use a different divisor here (3*k + cos(theta)): │ │ │ │ │ -408 double commonDenom = 1.0f / (k * (3.0f + cosTheta)); │ │ │ │ │ -409 double R = (cosTheta + 1.0f) / sinTheta; │ │ │ │ │ -410 │ │ │ │ │ -411 double vertexWeight = 4.0f * R * (cosTheta - 1.0f); │ │ │ │ │ -412 double creaseWeight = -R * (1.0f + 2.0f * cosTheta); │ │ │ │ │ -413 │ │ │ │ │ -414 tan2Mask.VertexWeight(0) = (Weight) (vertexWeight * commonDenom); │ │ │ │ │ -415 │ │ │ │ │ -416 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight) (creaseWeight * commonDenom); │ │ │ │ │ -417 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight) (creaseWeight * commonDenom); │ │ │ │ │ -418 │ │ │ │ │ -419 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight) (sinTheta * commonDenom); │ │ │ │ │ -420 │ │ │ │ │ -421 double sinThetaI = 0.0f; │ │ │ │ │ -422 double sinThetaIplus1 = sinTheta; │ │ │ │ │ -423 for (int i = 1; i < k; ++i) { │ │ │ │ │ -424 sinThetaI = sinThetaIplus1; │ │ │ │ │ -425 sinThetaIplus1 = std::sin((i+1)*theta); │ │ │ │ │ -426 │ │ │ │ │ -427 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) ((4.0f * sinThetaI) * │ │ │ │ │ -commonDenom); │ │ │ │ │ -428 tan2Mask.FaceWeight(creaseEnds[0] + i) = (Weight) ((sinThetaI + │ │ │ │ │ -sinThetaIplus1) * commonDenom); │ │ │ │ │ -429 } │ │ │ │ │ -430 } else { │ │ │ │ │ -431 // Special case for a single face -- simple average of boundary edges: │ │ │ │ │ -432 │ │ │ │ │ -433 tan2Mask.VertexWeight(0) = -6.0f; │ │ │ │ │ -434 │ │ │ │ │ -435 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f; │ │ │ │ │ -436 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f; │ │ │ │ │ -437 │ │ │ │ │ -438 tan2Mask.FaceWeight(creaseEnds[0]) = 0.0f; │ │ │ │ │ -439 } │ │ │ │ │ -440 │ │ │ │ │ -441 // Append weights of 0 following the crease: │ │ │ │ │ -442 for (int i = creaseEnds[1]; i < numFaces; ++i) { │ │ │ │ │ -443 tan2Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ -444 } │ │ │ │ │ -445 for (int i = creaseEnds[1] + 1; i < numEdges; ++i) { │ │ │ │ │ -446 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ -447 } │ │ │ │ │ -448} │ │ │ │ │ -449 │ │ │ │ │ -450template <> │ │ │ │ │ -451template │ │ │ │ │ -452inline void │ │ │ │ │ -_4_5_3_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ -454 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ -455 │ │ │ │ │ -456 typedef typename MASK::Weight Weight; │ │ │ │ │ -457 │ │ │ │ │ -458 int valence = vertex.GetNumFaces(); │ │ │ │ │ -459 if (valence == 2) { │ │ │ │ │ -460 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ -461 return; │ │ │ │ │ -462 } │ │ │ │ │ -463 │ │ │ │ │ -464 // Compute tan1 initially -- tan2 is simply a rotation: │ │ │ │ │ -465 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ -466 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -467 tan1Mask.SetNumFaceWeights(valence); │ │ │ │ │ -468 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -469 │ │ │ │ │ -470 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -471 │ │ │ │ │ -472 if (valence == 4) { │ │ │ │ │ -473 tan1Mask.EdgeWeight(0) = 4.0f; │ │ │ │ │ -474 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ -475 tan1Mask.EdgeWeight(2) = -4.0f; │ │ │ │ │ -476 tan1Mask.EdgeWeight(3) = 0.0f; │ │ │ │ │ -477 │ │ │ │ │ -478 tan1Mask.FaceWeight(0) = 1.0f; │ │ │ │ │ -479 tan1Mask.FaceWeight(1) = -1.0f; │ │ │ │ │ -480 tan1Mask.FaceWeight(2) = -1.0f; │ │ │ │ │ -481 tan1Mask.FaceWeight(3) = 1.0f; │ │ │ │ │ -482 } else { │ │ │ │ │ -483 double theta = 2.0f * M_PI / (double)valence; │ │ │ │ │ -484 │ │ │ │ │ -485 double cosTheta = std::cos(theta); │ │ │ │ │ -486 double cosHalfTheta = std::cos(theta * 0.5f); │ │ │ │ │ -487 │ │ │ │ │ -488 double lambda = (5.0 / 16.0) + (1.0 / 16.0) * │ │ │ │ │ -489 (cosTheta + cosHalfTheta * std::sqrt(2.0f * (9.0f + cosTheta))); │ │ │ │ │ -490 │ │ │ │ │ -491 double edgeWeightScale = 4.0f; │ │ │ │ │ -492 double faceWeightScale = 1.0f / (4.0f * lambda - 1.0f); │ │ │ │ │ -493 │ │ │ │ │ -494 for (int i = 0; i < valence; ++i) { │ │ │ │ │ -495 double cosThetaI = std::cos( i * theta); │ │ │ │ │ -496 double cosThetaIplus1 = std::cos((i+1)* theta); │ │ │ │ │ -497 │ │ │ │ │ -498 tan1Mask.EdgeWeight(i) = (Weight) (edgeWeightScale * cosThetaI); │ │ │ │ │ -499 tan1Mask.FaceWeight(i) = (Weight) (faceWeightScale * (cosThetaI + │ │ │ │ │ -cosThetaIplus1)); │ │ │ │ │ -500 } │ │ │ │ │ -501 } │ │ │ │ │ -502 │ │ │ │ │ -503 // Now rotate/copy tan1 weights to tan2: │ │ │ │ │ -504 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ -505 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ -506 tan2Mask.SetNumFaceWeights(valence); │ │ │ │ │ -507 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ -508 │ │ │ │ │ -509 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ -510 if (valence == 4) { │ │ │ │ │ -511 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ -512 tan2Mask.EdgeWeight(1) = 4.0f; │ │ │ │ │ -513 tan2Mask.EdgeWeight(2) = 0.0f; │ │ │ │ │ -514 tan2Mask.EdgeWeight(3) = -4.0f; │ │ │ │ │ -515 │ │ │ │ │ -516 tan2Mask.FaceWeight(0) = 1.0f; │ │ │ │ │ -517 tan2Mask.FaceWeight(1) = 1.0f; │ │ │ │ │ -518 tan2Mask.FaceWeight(2) = -1.0f; │ │ │ │ │ -519 tan2Mask.FaceWeight(3) = -1.0f; │ │ │ │ │ -520 } else { │ │ │ │ │ -521 tan2Mask.EdgeWeight(0) = tan1Mask.EdgeWeight(valence-1); │ │ │ │ │ -522 tan2Mask.FaceWeight(0) = tan1Mask.FaceWeight(valence-1); │ │ │ │ │ -523 for (int i = 1; i < valence; ++i) { │ │ │ │ │ -524 tan2Mask.EdgeWeight(i) = tan1Mask.EdgeWeight(i-1); │ │ │ │ │ -525 tan2Mask.FaceWeight(i) = tan1Mask.FaceWeight(i-1); │ │ │ │ │ -526 } │ │ │ │ │ -527 } │ │ │ │ │ -528} │ │ │ │ │ -529 │ │ │ │ │ -530} // end namespace sdc │ │ │ │ │ -531 │ │ │ │ │ -532} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -533using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -534} // end namespace OpenSubdiv │ │ │ │ │ -535 │ │ │ │ │ -536#endif /* OPENSUBDIV3_SDC_CATMARK_SCHEME_H */ │ │ │ │ │ +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_:_:_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___Q_U_A_D_S │ │ │ │ │ -@ SPLIT_TO_QUADS │ │ │ │ │ -Used by Catmark and Bilinear. │ │ │ │ │ -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_:_:_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_:_:_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_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_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_:_:_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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _c_a_t_m_a_r_k_S_c_h_e_m_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00743.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/crease.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,45 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    crease.h File Reference
    │ │ │ │ +
    cudaPatchTable.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../sdc/options.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...
    class  CudaPatchTable
     CUDA patch table. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +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 │ │ │ │ │ -crease.h File Reference │ │ │ │ │ +cudaPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._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_r_e_a_s_e │ │ │ │ │ -  Types, constants and utilities related to semi-sharp creasing – whose │ │ │ │ │ - implementation is independent of the subdivision scheme. _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_:_:_S_d_c │ │ │ │ │ +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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _c_r_e_a_s_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00743.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00743 = [ │ │ │ │ │ - ["Crease", "a01325.html", "a01325"] │ │ │ │ │ + ["CudaPatchTable", "a01181.html", "a01181"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00743_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/sdc/crease.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    crease.h
    │ │ │ │ +
    cudaPatchTable.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2014 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,221 +118,132 @@ │ │ │ │
    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_CREASE_H
    │ │ │ │ -
    25#define OPENSUBDIV3_SDC_CREASE_H
    │ │ │ │ -
    26
    │ │ │ │ -
    27#include "../version.h"
    │ │ │ │ -
    28
    │ │ │ │ -
    29#include "../sdc/options.h"
    │ │ │ │ -
    30
    │ │ │ │ -
    31namespace OpenSubdiv {
    │ │ │ │ -
    32namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace Sdc {
    │ │ │ │ -
    35
    │ │ │ │ +
    24
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_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
    │ │ │ │ -
    │ │ │ │ -
    62class Crease {
    │ │ │ │ -
    63public:
    │ │ │ │ -
    65
    │ │ │ │ -
    67 static float const SHARPNESS_SMOOTH; // = 0.0f, do we really need this?
    │ │ │ │ -
    68 static float const SHARPNESS_INFINITE; // = 10.0f;
    │ │ │ │ -
    69
    │ │ │ │ -
    70 static bool IsSmooth(float sharpness) { return sharpness <= SHARPNESS_SMOOTH; }
    │ │ │ │ -
    71 static bool IsSharp(float sharpness) { return sharpness > SHARPNESS_SMOOTH; }
    │ │ │ │ -
    72 static bool IsInfinite(float sharpness) { return sharpness >= SHARPNESS_INFINITE; }
    │ │ │ │ -
    73 static bool IsSemiSharp(float sharpness) { return (SHARPNESS_SMOOTH < sharpness) && (sharpness < SHARPNESS_INFINITE); }
    │ │ │ │ -
    75
    │ │ │ │ -
    │ │ │ │ -
    82 enum Rule {
    │ │ │ │ - │ │ │ │ -
    84 RULE_SMOOTH = (1 << 0),
    │ │ │ │ -
    85 RULE_DART = (1 << 1),
    │ │ │ │ -
    86 RULE_CREASE = (1 << 2),
    │ │ │ │ -
    87 RULE_CORNER = (1 << 3)
    │ │ │ │ -
    88 };
    │ │ │ │ +
    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
    │ │ │ │ -
    90public:
    │ │ │ │ -
    91 Crease() : _options() { }
    │ │ │ │ -
    92 Crease(Options const& options) : _options(options) { }
    │ │ │ │ -
    93 ~Crease() { }
    │ │ │ │ +
    │ │ │ │ +
    91 void *GetFVarPatchParamBuffer(int fvarChannel = 0) const {
    │ │ │ │ +
    92 return _fvarParamBuffers[fvarChannel];
    │ │ │ │ +
    93 }
    │ │ │ │ +
    │ │ │ │
    94
    │ │ │ │ -
    95 bool IsUniform() const { return _options.GetCreasingMethod() == Options::CREASE_UNIFORM; }
    │ │ │ │ -
    96
    │ │ │ │ -
    98
    │ │ │ │ -
    104 float SharpenBoundaryEdge(float edgeSharpness) const;
    │ │ │ │ -
    105 float SharpenBoundaryVertex(float edgeSharpness) const;
    │ │ │ │ +
    95protected:
    │ │ │ │ + │ │ │ │ +
    97
    │ │ │ │ +
    98 bool allocate(Far::PatchTable const *patchTable);
    │ │ │ │ +
    99
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    103
    │ │ │ │ + │ │ │ │ + │ │ │ │
    106
    │ │ │ │ -
    107 // For future consideration
    │ │ │ │ -
    108 //float SharpenNonManifoldEdge(float edgeSharpness) const;
    │ │ │ │ -
    109 //float SharpenNonManifoldVertex(float edgeSharpness) const;
    │ │ │ │ +
    107 std::vector<void *> _fvarPatchArrays;
    │ │ │ │ +
    108 std::vector<void *> _fvarIndexBuffers;
    │ │ │ │ +
    109 std::vector<void *> _fvarParamBuffers;
    │ │ │ │ +
    110};
    │ │ │ │ +
    │ │ │ │
    111
    │ │ │ │ +
    112} // end namespace Osd
    │ │ │ │
    113
    │ │ │ │ -
    124 float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const;
    │ │ │ │ -
    125
    │ │ │ │ -
    126 float SubdivideVertexSharpness(float vertexSharpness) const;
    │ │ │ │ -
    127
    │ │ │ │ -
    128 float SubdivideEdgeSharpnessAtVertex(float edgeSharpness,
    │ │ │ │ -
    129 int incidentEdgeCountAtEndVertex,
    │ │ │ │ -
    130 float const* edgeSharpnessAroundEndVertex) const;
    │ │ │ │ -
    131
    │ │ │ │ -
    132 void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex,
    │ │ │ │ -
    133 float const* incidentEdgeSharpnessAroundVertex,
    │ │ │ │ -
    134 float* childEdgesSharpnessAroundVertex) const;
    │ │ │ │ -
    136
    │ │ │ │ -
    138
    │ │ │ │ -
    144 Rule DetermineVertexVertexRule(float vertexSharpness,
    │ │ │ │ -
    145 int incidentEdgeCount,
    │ │ │ │ -
    146 float const* incidentEdgeSharpness) const;
    │ │ │ │ -
    147 Rule DetermineVertexVertexRule(float vertexSharpness,
    │ │ │ │ -
    148 int sharpEdgeCount) const;
    │ │ │ │ -
    150
    │ │ │ │ -
    162 float ComputeFractionalWeightAtVertex(float vertexSharpness,
    │ │ │ │ -
    163 float childVertexSharpness,
    │ │ │ │ -
    164 int incidentEdgeCount,
    │ │ │ │ -
    165 float const* incidentEdgeSharpness,
    │ │ │ │ -
    166 float const* childEdgesSharpness) const;
    │ │ │ │ -
    167
    │ │ │ │ -
    168 void GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness,
    │ │ │ │ -
    169 int incidentEdgeCount,
    │ │ │ │ -
    170 int sharpEdgePair[2]) const;
    │ │ │ │ -
    171
    │ │ │ │ -
    172 // Would these really help? Maybe only need Rules for the vertex-vertex case...
    │ │ │ │ -
    173 //
    │ │ │ │ -
    174 // Rule DetermineEdgeVertexRule(float parentEdgeSharpness) const;
    │ │ │ │ -
    175 // Rule DetermineEdgeVertexRule(float childEdge1Sharpness, float childEdge2Sharpness) const;
    │ │ │ │ -
    176
    │ │ │ │ -
    177protected:
    │ │ │ │ -
    178 float decrementSharpness(float sharpness) const;
    │ │ │ │ -
    179
    │ │ │ │ -
    180private:
    │ │ │ │ -
    181 Options _options;
    │ │ │ │ -
    182};
    │ │ │ │ -
    │ │ │ │ -
    183
    │ │ │ │ -
    184
    │ │ │ │ -
    185//
    │ │ │ │ -
    186// Inline declarations:
    │ │ │ │ -
    187//
    │ │ │ │ -
    188inline float
    │ │ │ │ -
    │ │ │ │ -
    189Crease::SharpenBoundaryEdge(float /* edgeSharpness */) const {
    │ │ │ │ -
    190
    │ │ │ │ -
    191 //
    │ │ │ │ -
    192 // Despite the presence of the BOUNDARY_NONE option, boundary edges are always sharpened.
    │ │ │ │ -
    193 // Much of the code relies on sharpness to indicate boundaries to avoid the more complex
    │ │ │ │ -
    194 // topological inspection
    │ │ │ │ -
    195 //
    │ │ │ │ -
    196 return SHARPNESS_INFINITE;
    │ │ │ │ -
    197}
    │ │ │ │ -
    │ │ │ │ -
    198
    │ │ │ │ -
    199inline float
    │ │ │ │ -
    │ │ │ │ -
    200Crease::SharpenBoundaryVertex(float vertexSharpness) const {
    │ │ │ │ -
    201
    │ │ │ │ - │ │ │ │ -
    203 SHARPNESS_INFINITE : vertexSharpness;
    │ │ │ │ -
    204}
    │ │ │ │ -
    │ │ │ │ -
    205
    │ │ │ │ -
    206inline float
    │ │ │ │ -
    │ │ │ │ -
    207Crease::decrementSharpness(float sharpness) const {
    │ │ │ │ -
    208
    │ │ │ │ -
    209 if (IsSmooth(sharpness)) return Crease::SHARPNESS_SMOOTH; // redundant but most common
    │ │ │ │ -
    210 if (IsInfinite(sharpness)) return Crease::SHARPNESS_INFINITE;
    │ │ │ │ -
    211 if (sharpness > 1.0f) return (sharpness - 1.0f);
    │ │ │ │ - │ │ │ │ -
    213}
    │ │ │ │ -
    │ │ │ │ -
    214
    │ │ │ │ -
    215inline float
    │ │ │ │ -
    │ │ │ │ -
    216Crease::SubdivideUniformSharpness(float vertexOrEdgeSharpness) const {
    │ │ │ │ -
    217
    │ │ │ │ -
    218 return decrementSharpness(vertexOrEdgeSharpness);
    │ │ │ │ -
    219}
    │ │ │ │ -
    │ │ │ │ -
    220
    │ │ │ │ -
    221inline float
    │ │ │ │ -
    │ │ │ │ -
    222Crease::SubdivideVertexSharpness(float vertexSharpness) const {
    │ │ │ │ -
    223
    │ │ │ │ -
    224 return decrementSharpness(vertexSharpness);
    │ │ │ │ -
    225}
    │ │ │ │ -
    │ │ │ │ -
    226
    │ │ │ │ -
    227inline void
    │ │ │ │ -
    │ │ │ │ -
    228Crease::GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness, int incidentEdgeCount,
    │ │ │ │ -
    229 int sharpEdgePair[2]) const {
    │ │ │ │ -
    230
    │ │ │ │ -
    231 // Only to be called when a crease is present at a vertex -- exactly two sharp
    │ │ │ │ -
    232 // edges are expected here:
    │ │ │ │ -
    233 //
    │ │ │ │ -
    234 sharpEdgePair[0] = 0;
    │ │ │ │ -
    235 while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair[0];
    │ │ │ │ -
    236
    │ │ │ │ -
    237 sharpEdgePair[1] = incidentEdgeCount - 1;
    │ │ │ │ -
    238 while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair[1];
    │ │ │ │ -
    239}
    │ │ │ │ -
    │ │ │ │ -
    240
    │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    float SharpenBoundaryVertex(float edgeSharpness) const
    Definition crease.h:200
    │ │ │ │ - │ │ │ │ -
    void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int incidentEdgeCount, int sharpEdgePair[2]) const
    Definition crease.h:228
    │ │ │ │ - │ │ │ │ -
    Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness) const
    │ │ │ │ -
    float decrementSharpness(float sharpness) const
    Definition crease.h:207
    │ │ │ │ -
    static bool IsSmooth(float sharpness)
    Definition crease.h:70
    │ │ │ │ -
    Rule DetermineVertexVertexRule(float vertexSharpness, int sharpEdgeCount) const
    │ │ │ │ - │ │ │ │ -
    static bool IsSemiSharp(float sharpness)
    Definition crease.h:73
    │ │ │ │ - │ │ │ │ -
    void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float const *incidentEdgeSharpnessAroundVertex, float *childEdgesSharpnessAroundVertex) const
    │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -crease.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 2014 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,289 +23,168 @@ │ │ │ │ │ 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_CREASE_H │ │ │ │ │ -25#define OPENSUBDIV3_SDC_CREASE_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../sdc/options.h" │ │ │ │ │ -30 │ │ │ │ │ -31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -32namespace OPENSUBDIV_VERSION { │ │ │ │ │ -33 │ │ │ │ │ -34namespace Sdc { │ │ │ │ │ -35 │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CUDA_PATCH_TABLE_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_2class _C_r_e_a_s_e { │ │ │ │ │ -63public: │ │ │ │ │ -65 │ │ │ │ │ -_6_7 static float const _S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; // = 0.0f, do we really need this? │ │ │ │ │ -_6_8 static float const _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; // = 10.0f; │ │ │ │ │ -69 │ │ │ │ │ -_7_0 static bool _I_s_S_m_o_o_t_h(float sharpness) { return sharpness <= │ │ │ │ │ -_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; } │ │ │ │ │ -_7_1 static bool _I_s_S_h_a_r_p(float sharpness) { return sharpness > _S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; │ │ │ │ │ -} │ │ │ │ │ -_7_2 static bool _I_s_I_n_f_i_n_i_t_e(float sharpness) { return sharpness >= │ │ │ │ │ -_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; } │ │ │ │ │ -_7_3 static bool _I_s_S_e_m_i_S_h_a_r_p(float sharpness) { return (_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H < │ │ │ │ │ -sharpness) && (sharpness < _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E); } │ │ │ │ │ -75 │ │ │ │ │ -_8_2 enum _R_u_l_e { │ │ │ │ │ -_8_3 _R_U_L_E___U_N_K_N_O_W_N = 0, │ │ │ │ │ -_8_4 _R_U_L_E___S_M_O_O_T_H = (1 << 0), │ │ │ │ │ -_8_5 _R_U_L_E___D_A_R_T = (1 << 1), │ │ │ │ │ -_8_6 _R_U_L_E___C_R_E_A_S_E = (1 << 2), │ │ │ │ │ -87 _R_U_L_E___C_O_R_N_E_R = (1 << 3) │ │ │ │ │ -_8_8 }; │ │ │ │ │ +_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 │ │ │ │ │ -90public: │ │ │ │ │ -_9_1 _C_r_e_a_s_e() : _options() { } │ │ │ │ │ -_9_2 _C_r_e_a_s_e(_O_p_t_i_o_n_s const& options) : _options(options) { } │ │ │ │ │ -_9_3 _~_C_r_e_a_s_e() { } │ │ │ │ │ +_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 │ │ │ │ │ -_9_5 bool _I_s_U_n_i_f_o_r_m() const { return _options._G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d() == _O_p_t_i_o_n_s_:_: │ │ │ │ │ -_C_R_E_A_S_E___U_N_I_F_O_R_M; } │ │ │ │ │ -96 │ │ │ │ │ -98 │ │ │ │ │ -104 float _S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e(float edgeSharpness) const; │ │ │ │ │ -105 float _S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x(float edgeSharpness) const; │ │ │ │ │ +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 │ │ │ │ │ -107 // For future consideration │ │ │ │ │ -108 //float SharpenNonManifoldEdge(float edgeSharpness) const; │ │ │ │ │ -109 //float SharpenNonManifoldVertex(float edgeSharpness) const; │ │ │ │ │ +_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 │ │ │ │ │ -124 float _S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s(float vertexOrEdgeSharpness) const; │ │ │ │ │ -125 │ │ │ │ │ -126 float _S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertexSharpness) const; │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 float _S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_A_t_V_e_r_t_e_x(float edgeSharpness, │ │ │ │ │ -129 int incidentEdgeCountAtEndVertex, │ │ │ │ │ -130 float const* edgeSharpnessAroundEndVertex) const; │ │ │ │ │ -131 │ │ │ │ │ -_1_3_2 void _S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_e_s_A_r_o_u_n_d_V_e_r_t_e_x(int incidentEdgeCountAtVertex, │ │ │ │ │ -133 float const* incidentEdgeSharpnessAroundVertex, │ │ │ │ │ -134 float* childEdgesSharpnessAroundVertex) const; │ │ │ │ │ -136 │ │ │ │ │ -138 │ │ │ │ │ -_1_4_4 _R_u_l_e _D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(float vertexSharpness, │ │ │ │ │ -145 int incidentEdgeCount, │ │ │ │ │ -146 float const* incidentEdgeSharpness) const; │ │ │ │ │ -_1_4_7 _R_u_l_e _D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(float vertexSharpness, │ │ │ │ │ -148 int sharpEdgeCount) const; │ │ │ │ │ -150 │ │ │ │ │ -_1_6_2 float _C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x(float vertexSharpness, │ │ │ │ │ -163 float childVertexSharpness, │ │ │ │ │ -164 int incidentEdgeCount, │ │ │ │ │ -165 float const* incidentEdgeSharpness, │ │ │ │ │ -166 float const* childEdgesSharpness) const; │ │ │ │ │ -167 │ │ │ │ │ -168 void _G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(float const * incidentEdgeSharpness, │ │ │ │ │ -169 int incidentEdgeCount, │ │ │ │ │ -170 int sharpEdgePair[2]) const; │ │ │ │ │ -171 │ │ │ │ │ -172 // Would these really help? Maybe only need Rules for the vertex-vertex │ │ │ │ │ -case... │ │ │ │ │ -173 // │ │ │ │ │ -174 // Rule DetermineEdgeVertexRule(float parentEdgeSharpness) const; │ │ │ │ │ -175 // Rule DetermineEdgeVertexRule(float childEdge1Sharpness, float │ │ │ │ │ -childEdge2Sharpness) const; │ │ │ │ │ -176 │ │ │ │ │ -177protected: │ │ │ │ │ -178 float _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(float sharpness) const; │ │ │ │ │ -179 │ │ │ │ │ -180private: │ │ │ │ │ -181 _O_p_t_i_o_n_s _options; │ │ │ │ │ -182}; │ │ │ │ │ -183 │ │ │ │ │ -184 │ │ │ │ │ -185// │ │ │ │ │ -186// Inline declarations: │ │ │ │ │ -187// │ │ │ │ │ -188inline float │ │ │ │ │ -_1_8_9_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e(float /* edgeSharpness */) const { │ │ │ │ │ -190 │ │ │ │ │ -191 // │ │ │ │ │ -192 // Despite the presence of the BOUNDARY_NONE option, boundary edges are │ │ │ │ │ -always sharpened. │ │ │ │ │ -193 // Much of the code relies on sharpness to indicate boundaries to avoid the │ │ │ │ │ -more complex │ │ │ │ │ -194 // topological inspection │ │ │ │ │ -195 // │ │ │ │ │ -196 return _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; │ │ │ │ │ -197} │ │ │ │ │ -198 │ │ │ │ │ -199inline float │ │ │ │ │ -_2_0_0_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x(float vertexSharpness) const { │ │ │ │ │ -201 │ │ │ │ │ -202 return (_options._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() == _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) ? │ │ │ │ │ -203 _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E : vertexSharpness; │ │ │ │ │ -204} │ │ │ │ │ -205 │ │ │ │ │ -206inline float │ │ │ │ │ -_2_0_7_C_r_e_a_s_e_:_:_d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(float sharpness) const { │ │ │ │ │ -208 │ │ │ │ │ -209 if (_I_s_S_m_o_o_t_h(sharpness)) return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; // redundant but │ │ │ │ │ -most common │ │ │ │ │ -210 if (_I_s_I_n_f_i_n_i_t_e(sharpness)) return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; │ │ │ │ │ -211 if (sharpness > 1.0f) return (sharpness - 1.0f); │ │ │ │ │ -212 return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; │ │ │ │ │ -213} │ │ │ │ │ -214 │ │ │ │ │ -215inline float │ │ │ │ │ -_2_1_6_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s(float vertexOrEdgeSharpness) const { │ │ │ │ │ -217 │ │ │ │ │ -218 return _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(vertexOrEdgeSharpness); │ │ │ │ │ -219} │ │ │ │ │ -220 │ │ │ │ │ -221inline float │ │ │ │ │ -_2_2_2_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertexSharpness) const { │ │ │ │ │ -223 │ │ │ │ │ -224 return _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(vertexSharpness); │ │ │ │ │ -225} │ │ │ │ │ -226 │ │ │ │ │ -227inline void │ │ │ │ │ -_2_2_8_C_r_e_a_s_e_:_:_G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(float const * incidentEdgeSharpness, int │ │ │ │ │ -incidentEdgeCount, │ │ │ │ │ -229 int sharpEdgePair[2]) const { │ │ │ │ │ -230 │ │ │ │ │ -231 // Only to be called when a crease is present at a vertex -- exactly two │ │ │ │ │ -sharp │ │ │ │ │ -232 // edges are expected here: │ │ │ │ │ -233 // │ │ │ │ │ -234 sharpEdgePair[0] = 0; │ │ │ │ │ -235 while (_I_s_S_m_o_o_t_h(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair │ │ │ │ │ -[0]; │ │ │ │ │ -236 │ │ │ │ │ -237 sharpEdgePair[1] = incidentEdgeCount - 1; │ │ │ │ │ -238 while (_I_s_S_m_o_o_t_h(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair │ │ │ │ │ -[1]; │ │ │ │ │ -239} │ │ │ │ │ -240 │ │ │ │ │ -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 */ │ │ │ │ │ +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_:_:_S_d_c_:_:_C_r_e_a_s_e │ │ │ │ │ -Types, constants and utilities related to semi-sharp creasing – whose │ │ │ │ │ -implementation is independent o... │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float SubdivideVertexSharpness(float vertexSharpness) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_I_n_f_i_n_i_t_e │ │ │ │ │ -static bool IsInfinite(float sharpness) │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_O_R_N_E_R │ │ │ │ │ -@ RULE_CORNER │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T │ │ │ │ │ -@ RULE_DART │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H │ │ │ │ │ -@ RULE_SMOOTH │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N │ │ │ │ │ -@ RULE_UNKNOWN │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x │ │ │ │ │ -float SharpenBoundaryVertex(float edgeSharpness) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_2_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H │ │ │ │ │ -static float const SHARPNESS_SMOOTH │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e │ │ │ │ │ -void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int │ │ │ │ │ -incidentEdgeCount, int sharpEdgePair[2]) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E │ │ │ │ │ -static float const SHARPNESS_INFINITE │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ -Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, │ │ │ │ │ -float const *incidentEdgeSharpness) 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_:_:_C_r_e_a_s_e_:_:_d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float decrementSharpness(float sharpness) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_S_m_o_o_t_h │ │ │ │ │ -static bool IsSmooth(float sharpness) │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ -Rule DetermineVertexVertexRule(float vertexSharpness, int sharpEdgeCount) 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_:_:_C_r_e_a_s_e_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ -bool IsUniform() const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_S_e_m_i_S_h_a_r_p │ │ │ │ │ -static bool IsSemiSharp(float sharpness) │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_C_r_e_a_s_e │ │ │ │ │ -Crease(Options const &options) │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_: │ │ │ │ │ -_S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_e_s_A_r_o_u_n_d_V_e_r_t_e_x │ │ │ │ │ -void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float │ │ │ │ │ -const *incidentEdgeSharpnessAroundVertex, float │ │ │ │ │ -*childEdgesSharpnessAroundVertex) 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_:_:_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_C_r_e_a_s_e │ │ │ │ │ -Crease() │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e │ │ │ │ │ -float SharpenBoundaryEdge(float edgeSharpness) const │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_1_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_:_:_C_r_e_a_s_e_:_:_C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x │ │ │ │ │ -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,... │ │ │ │ │ -_O_p_e_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_:_:_S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_A_t_V_e_r_t_e_x │ │ │ │ │ -float SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int │ │ │ │ │ -incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) 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_:_:_C_r_e_a_s_e_:_:_I_s_S_h_a_r_p │ │ │ │ │ -static bool IsSharp(float sharpness) │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_~_C_r_e_a_s_e │ │ │ │ │ -~Crease() │ │ │ │ │ -DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_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 │ │ │ │ │ - * _s_d_c │ │ │ │ │ - * _c_r_e_a_s_e_._h │ │ │ │ │ + * _o_s_d │ │ │ │ │ + * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00746.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11VertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,25 +90,27 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    d3d11VertexBuffer.h File Reference
    │ │ │ │ +
    mtlLegacyGregoryPatchTable.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include "../far/patchTable.h"
    │ │ │ │ +#include "../osd/nonCopyable.h"
    │ │ │ │ +#include "../osd/mtlCommon.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  D3D11VertexBuffer
     Concrete vertex buffer class for DirectX subdivision and DirectX drawing. More...
    class  MTLLegacyGregoryPatchTable
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -117,13 +119,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +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 │ │ │ │ │ -d3d11VertexBuffer.h File Reference │ │ │ │ │ +mtlLegacyGregoryPatchTable.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_/_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   _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for DirectX subdivision and DirectX │ │ │ │ │ - drawing. _M_o_r_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_:_:_O_s_d │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._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 Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00746.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00746 = [ │ │ │ │ │ - ["D3D11VertexBuffer", "a01205.html", "a01205"] │ │ │ │ │ + ["MTLLegacyGregoryPatchTable", "a01289.html", "a01289"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00746_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11VertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    d3d11VertexBuffer.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,93 +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_D3D11_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_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
    │ │ │ │ -
    30struct ID3D11Buffer;
    │ │ │ │ -
    31struct ID3D11Device;
    │ │ │ │ -
    32struct ID3D11DeviceContext;
    │ │ │ │ -
    33struct ID3D11UnorderedAccessView;
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace Osd {
    │ │ │ │ -
    39
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    47public:
    │ │ │ │ -
    49 static D3D11VertexBuffer * Create(int numElements, int numVertices,
    │ │ │ │ -
    50 ID3D11DeviceContext *deviceContext);
    │ │ │ │ +
    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 {
    │ │ │ │ +
    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
    │ │ │ │ - │ │ │ │ -
    54
    │ │ │ │ -
    57 void UpdateData(const float *src, int startVertex, int numVertices,
    │ │ │ │ -
    58 ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    59
    │ │ │ │ -
    61 int GetNumElements() const;
    │ │ │ │ -
    62
    │ │ │ │ -
    64 int GetNumVertices() const;
    │ │ │ │ -
    65
    │ │ │ │ -
    67 ID3D11Buffer *BindD3D11Buffer(ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    68
    │ │ │ │ -
    │ │ │ │ -
    70 ID3D11Buffer *BindVBO(ID3D11DeviceContext *deviceContext) {
    │ │ │ │ -
    71 return BindD3D11Buffer(deviceContext);
    │ │ │ │ -
    72 }
    │ │ │ │ -
    │ │ │ │ -
    73
    │ │ │ │ -
    75 ID3D11UnorderedAccessView *BindD3D11UAV(ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    76
    │ │ │ │ -
    77protected:
    │ │ │ │ -
    79 D3D11VertexBuffer(int numElements, int numVertices);
    │ │ │ │ -
    80
    │ │ │ │ -
    81 // Allocates D3D11 buffer
    │ │ │ │ -
    82 bool allocate(ID3D11Device *device);
    │ │ │ │ -
    83
    │ │ │ │ -
    84private:
    │ │ │ │ -
    85 int _numElements;
    │ │ │ │ -
    86 int _numVertices;
    │ │ │ │ -
    87 ID3D11Buffer *_buffer;
    │ │ │ │ -
    88 ID3D11Buffer *_uploadBuffer;
    │ │ │ │ -
    89 ID3D11UnorderedAccessView *_uav;
    │ │ │ │ -
    90};
    │ │ │ │ +
    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 }
    │ │ │ │ +
    │ │ │ │ +
    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} // end namespace Osd
    │ │ │ │ -
    93
    │ │ │ │ -
    94} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    95using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    96
    │ │ │ │ -
    97} // end namespace OpenSubdiv
    │ │ │ │ -
    98
    │ │ │ │ -
    99#endif // OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_H
    │ │ │ │ - │ │ │ │ -
    Concrete vertex buffer class for DirectX subdivision and DirectX drawing.
    │ │ │ │ -
    int GetNumElements() const
    Returns how many elements defined in this vertex buffer.
    │ │ │ │ -
    void UpdateData(const float *src, int startVertex, int numVertices, ID3D11DeviceContext *deviceContext)
    │ │ │ │ -
    static D3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11DeviceContext *deviceContext)
    Creator. Returns NULL if error.
    │ │ │ │ -
    D3D11VertexBuffer(int numElements, int numVertices)
    Constructor.
    │ │ │ │ -
    int GetNumVertices() const
    Returns how many vertices allocated in this vertex buffer.
    │ │ │ │ -
    ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
    Returns the D3D11 buffer object.
    │ │ │ │ - │ │ │ │ -
    ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext)
    Returns the D3D11 UAV.
    │ │ │ │ - │ │ │ │ -
    ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext)
    Returns the D3D11 buffer object (for Osd::Mesh interface)
    │ │ │ │ +
    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)
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11VertexBuffer.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,106 +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_D3D11_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_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 │ │ │ │ │ -30struct ID3D11Buffer; │ │ │ │ │ -31struct ID3D11Device; │ │ │ │ │ -32struct ID3D11DeviceContext; │ │ │ │ │ -33struct ID3D11UnorderedAccessView; │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Osd { │ │ │ │ │ -39 │ │ │ │ │ -_4_6class _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -47public: │ │ │ │ │ -_4_9 static _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -50 ID3D11DeviceContext *deviceContext); │ │ │ │ │ +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 { │ │ │ │ │ +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_3 virtual _~_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ -54 │ │ │ │ │ -_5_7 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -58 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -59 │ │ │ │ │ -_6_1 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -62 │ │ │ │ │ -_6_4 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +_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 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_7 ID3D11Buffer *_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(ID3D11DeviceContext *deviceContext); │ │ │ │ │ -68 │ │ │ │ │ -_7_0 ID3D11Buffer *_B_i_n_d_V_B_O(ID3D11DeviceContext *deviceContext) { │ │ │ │ │ -71 return _B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(deviceContext); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_5 ID3D11UnorderedAccessView *_B_i_n_d_D_3_D_1_1_U_A_V(ID3D11DeviceContext *deviceContext); │ │ │ │ │ -76 │ │ │ │ │ -77protected: │ │ │ │ │ -_7_9 _D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -80 │ │ │ │ │ -81 // Allocates D3D11 buffer │ │ │ │ │ -_8_2 bool _a_l_l_o_c_a_t_e(ID3D11Device *device); │ │ │ │ │ -83 │ │ │ │ │ -84private: │ │ │ │ │ -85 int _numElements; │ │ │ │ │ -86 int _numVertices; │ │ │ │ │ -87 ID3D11Buffer *_buffer; │ │ │ │ │ -88 ID3D11Buffer *_uploadBuffer; │ │ │ │ │ -89 ID3D11UnorderedAccessView *_uav; │ │ │ │ │ -90}; │ │ │ │ │ +_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} // end namespace Osd │ │ │ │ │ -93 │ │ │ │ │ -94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -96 │ │ │ │ │ -97} // end namespace OpenSubdiv │ │ │ │ │ -98 │ │ │ │ │ -99#endif // OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for DirectX subdivision and DirectX drawing. │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._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_:_:_D_3_D_1_1_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_:_:_D_3_D_1_1_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, │ │ │ │ │ -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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static D3D11VertexBuffer * Create(int numElements, int numVertices, │ │ │ │ │ -ID3D11DeviceContext *deviceContext) │ │ │ │ │ -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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -D3D11VertexBuffer(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_:_:_D_3_D_1_1_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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r │ │ │ │ │ -ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Returns the D3D11 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_:_:_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual ~D3D11VertexBuffer() │ │ │ │ │ -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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_U_A_V │ │ │ │ │ -ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Returns the D3D11 UAV. │ │ │ │ │ -_O_p_e_n_S_u_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(ID3D11Device *device) │ │ │ │ │ -_O_p_e_n_S_u_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ -ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Returns the D3D11 buffer object (for Osd::Mesh interface) │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_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_:_:_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_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 │ │ │ │ │ - * _d_3_d_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._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 Thu Feb 29 2024 12:58:19 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/osd/mtlComputeEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/hlslPatchShaderSource.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,46 +90,41 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlComputeEvaluator.h File Reference
    │ │ │ │ +
    hlslPatchShaderSource.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include "../osd/bufferDescriptor.h"
    │ │ │ │ -#include "../osd/mtlCommon.h"
    │ │ │ │ +#include <string>
    │ │ │ │ +#include "../far/patchDescriptor.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  MTLStencilTable
     
    class  MTLComputeEvaluator
    class  HLSLPatchShaderSource
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +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 │ │ │ │ │ -mtlComputeEvaluator.h File Reference │ │ │ │ │ +hlslPatchShaderSource.h File Reference │ │ │ │ │ #include "../version.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" │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_f_a_r_/_p_a_t_c_h_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   _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   _H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_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 │ │ │ │ │ + * _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00749.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00749 = [ │ │ │ │ │ - ["MTLStencilTable", "a01281.html", "a01281"], │ │ │ │ │ - ["MTLComputeEvaluator", "a01285.html", "a01285"] │ │ │ │ │ + ["HLSLPatchShaderSource", "a01257.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00749_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/hlslPatchShaderSource.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlComputeEvaluator.h
    │ │ │ │ +
    hlslPatchShaderSource.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,1138 +119,61 @@ │ │ │ │
    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_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    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 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 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 }
    │ │ │ │ +
    29#include <string>
    │ │ │ │ +
    30#include "../far/patchDescriptor.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    34
    │ │ │ │ +
    35namespace Osd {
    │ │ │ │ +
    36
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    38public:
    │ │ │ │ +
    39 static std::string GetCommonShaderSource();
    │ │ │ │ +
    40
    │ │ │ │ +
    41 static std::string GetPatchBasisShaderSource();
    │ │ │ │ +
    42
    │ │ │ │ + │ │ │ │ +
    44
    │ │ │ │ + │ │ │ │ +
    46
    │ │ │ │ + │ │ │ │ +
    48};
    │ │ │ │
    │ │ │ │ -
    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
    │ │ │ │ +
    49
    │ │ │ │ +
    50} // end namespace Osd
    │ │ │ │ +
    51
    │ │ │ │ +
    52} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    53using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    54
    │ │ │ │ +
    55} // end namespace OpenSubdiv
    │ │ │ │ +
    56
    │ │ │ │ +
    57#endif // OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ +
    static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ +
    static std::string GetHullShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlComputeEvaluator.h │ │ │ │ │ +hlslPatchShaderSource.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,1382 +24,65 @@ │ │ │ │ │ 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_HLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -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 _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 { │ │ │ │ │ +29#include │ │ │ │ │ +30#include "../far/patchDescriptor.h" │ │ │ │ │ +31 │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +35namespace Osd { │ │ │ │ │ +36 │ │ │ │ │ +_3_7class _H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ +38public: │ │ │ │ │ +_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +40 │ │ │ │ │ +_4_1 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(); │ │ │ │ │ +42 │ │ │ │ │ +_4_3 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); │ │ │ │ │ +44 │ │ │ │ │ +_4_5 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); │ │ │ │ │ +46 │ │ │ │ │ +_4_7 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); │ │ │ │ │ +48}; │ │ │ │ │ 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 _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 │ │ │ │ │ +50} // end namespace Osd │ │ │ │ │ +51 │ │ │ │ │ +52} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +53using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +54 │ │ │ │ │ +55} // end namespace OpenSubdiv │ │ │ │ │ +56 │ │ │ │ │ +57#endif // OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_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_:_:_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 │ │ │ │ │ -*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_:_:_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_:_:_H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +DDeeffiinniittiioonn _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_O_s_d_:_:_H_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_:_:_H_L_S_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_:_:_H_L_S_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_:_:_H_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() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_H_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_s_d │ │ │ │ │ - * _m_t_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/osd/glslPatchShaderSource.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11Mesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,43 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    glslPatchShaderSource.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Typedefs
    │ │ │ │ +
    d3d11Mesh.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <string>
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ +#include "../osd/mesh.h"
    │ │ │ │ +#include "../osd/d3d11PatchTable.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  GLSLPatchShaderSource
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ │ Namespaces

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

    │ │ │ │ +Typedefs

    typedef MeshInterface< D3D11PatchTableD3D11MeshInterface
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -glslPatchShaderSource.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +d3d11Mesh.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 "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ +#include "_._._/_o_s_d_/_d_3_d_1_1_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   _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_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< _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e >  _D_3_D_1_1_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 │ │ │ │ │ - * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _d_3_d_1_1_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00752.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00752 = [ │ │ │ │ │ - ["GLSLPatchShaderSource", "a01233.html", null] │ │ │ │ │ + ["D3D11MeshInterface", "a00752.html#ae5c8e80d05d6eaee105d8eecfa9ab609", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00752_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glslPatchShaderSource.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11Mesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    glslPatchShaderSource.h
    │ │ │ │ +
    d3d11Mesh.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,64 +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_GLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_D3D11MESH_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_D3D11MESH_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include <string>
    │ │ │ │ -
    30#include "../far/patchDescriptor.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace Osd {
    │ │ │ │ -
    36
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    38public:
    │ │ │ │ -
    39 static std::string GetCommonShaderSource();
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../osd/mesh.h"
    │ │ │ │ +
    31#include "../osd/d3d11PatchTable.h"
    │ │ │ │ +
    32
    │ │ │ │ +
    33namespace OpenSubdiv {
    │ │ │ │ +
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    35
    │ │ │ │ +
    36namespace Osd {
    │ │ │ │ +
    37
    │ │ │ │ + │ │ │ │ +
    39
    │ │ │ │
    40
    │ │ │ │ -
    41 static std::string GetPatchBasisShaderSource();
    │ │ │ │ +
    41} // end namespace Osd
    │ │ │ │
    42
    │ │ │ │ -
    43 static std::string GetVertexShaderSource(
    │ │ │ │ - │ │ │ │ +
    43} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    44using namespace OPENSUBDIV_VERSION;
    │ │ │ │
    45
    │ │ │ │ -
    46 static std::string GetTessControlShaderSource(
    │ │ │ │ - │ │ │ │ -
    48
    │ │ │ │ -
    49 static std::string GetTessEvalShaderSource(
    │ │ │ │ - │ │ │ │ -
    51};
    │ │ │ │ -
    │ │ │ │ -
    52
    │ │ │ │ -
    53} // end namespace Osd
    │ │ │ │ -
    54
    │ │ │ │ -
    55} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    56using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    57
    │ │ │ │ -
    58} // end namespace OpenSubdiv
    │ │ │ │ -
    59
    │ │ │ │ -
    60#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ -
    static std::string GetTessEvalShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static std::string GetTessControlShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ +
    46} // end namespace OpenSubdiv
    │ │ │ │ +
    47
    │ │ │ │ +
    48#endif // OPENSUBDIV3_OSD_D3D11MESH_H
    │ │ │ │ + │ │ │ │ +
    MeshInterface< D3D11PatchTable > D3D11MeshInterface
    Definition d3d11Mesh.h:38
    │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glslPatchShaderSource.h │ │ │ │ │ +d3d11Mesh.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,69 +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_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_D3D11MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_D3D11MESH_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include │ │ │ │ │ -30#include "../far/patchDescriptor.h" │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ -36 │ │ │ │ │ -_3_7class _G_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ -38public: │ │ │ │ │ -_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ +29 │ │ │ │ │ +30#include "../osd/mesh.h" │ │ │ │ │ +31#include "../osd/d3d11PatchTable.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_<_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_> _D_3_D_1_1_M_e_s_h_I_n_t_e_r_f_a_c_e; │ │ │ │ │ +39 │ │ │ │ │ 40 │ │ │ │ │ -_4_1 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(); │ │ │ │ │ +41} // end namespace Osd │ │ │ │ │ 42 │ │ │ │ │ -_4_3 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -44 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ +43} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +44using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 45 │ │ │ │ │ -_4_6 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( │ │ │ │ │ -47 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -48 │ │ │ │ │ -_4_9 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( │ │ │ │ │ -50 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type); │ │ │ │ │ -51}; │ │ │ │ │ -52 │ │ │ │ │ -53} // end namespace Osd │ │ │ │ │ -54 │ │ │ │ │ -55} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -56using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -57 │ │ │ │ │ -58} // end namespace OpenSubdiv │ │ │ │ │ -59 │ │ │ │ │ -60#endif // OPENSUBDIV3_OSD_GLSL_PATCH_SHADER_SOURCE │ │ │ │ │ +46} // end namespace OpenSubdiv │ │ │ │ │ +47 │ │ │ │ │ +48#endif // OPENSUBDIV3_OSD_D3D11MESH_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 │ │ │ │ │ -DDeeffiinniittiioonn _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_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_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() │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_D_3_D_1_1_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ +MeshInterface< D3D11PatchTable > D3D11MeshInterface │ │ │ │ │ +DDeeffiinniittiioonn _d_3_d_1_1_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 │ │ │ │ │ - * _g_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _d_3_d_1_1_M_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/osd/glComputeEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/ompKernel.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,49 +88,45 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    glComputeEvaluator.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Functions
    │ │ │ │ +
    ompKernel.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.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
     
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

    │ │ │ │ +Functions

    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)
     
    void OmpEvalStencils (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 OmpEvalStencils (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)
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +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 │ │ │ │ │ -glComputeEvaluator.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +ompKernel.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" │ │ │ │ │ _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_:_:_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  _O_m_p_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  _O_m_p_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  _O_m_p_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) │ │ │ │ │ +  │ │ │ │ │ * _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 │ │ │ │ │ + * _o_m_p_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00755.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ │ var a00755 = [ │ │ │ │ │ - ["GLStencilTableSSBO", "a01209.html", "a01209"], │ │ │ │ │ - ["GLComputeEvaluator", "a01213.html", "a01213"] │ │ │ │ │ + ["OmpEvalStencils", "a00755.html#a44a05502feb5015035bc81b93cffb99c", null], │ │ │ │ │ + ["OmpEvalStencils", "a00755.html#a907dc53421460557871ddc35f77751f5", null], │ │ │ │ │ + ["OmpEvalStencils", "a00755.html#a870745ff3e883b32547d4db42b3be2bd", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00755_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/ompKernel.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    glComputeEvaluator.h
    │ │ │ │ +
    ompKernel.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,1132 +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_GL_COMPUTE_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_OMP_KERNEL_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_OMP_KERNEL_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../osd/opengl.h"
    │ │ │ │ -
    31#include "../osd/types.h"
    │ │ │ │ -
    32#include "../osd/bufferDescriptor.h"
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    30namespace OpenSubdiv {
    │ │ │ │ +
    31namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    32
    │ │ │ │ +
    33namespace Osd {
    │ │ │ │ +
    34
    │ │ │ │ +
    35struct BufferDescriptor;
    │ │ │ │
    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 }
    │ │ │ │ -
    │ │ │ │ -
    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 ...
    │ │ │ │ +
    37void
    │ │ │ │ +
    38OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ +
    39 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ +
    40 int const * sizes,
    │ │ │ │ +
    41 int const * offsets,
    │ │ │ │ +
    42 int const * indices,
    │ │ │ │ +
    43 float const * weights,
    │ │ │ │ +
    44 int start, int end);
    │ │ │ │ +
    45
    │ │ │ │ +
    46void
    │ │ │ │ +
    47OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ +
    48 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ +
    49 float * dstDu, BufferDescriptor const &dstDuDesc,
    │ │ │ │ +
    50 float * dstDv, BufferDescriptor const &dstDvDesc,
    │ │ │ │ +
    51 int const * sizes,
    │ │ │ │ +
    52 int const * offsets,
    │ │ │ │ +
    53 int const * indices,
    │ │ │ │ +
    54 float const * weights,
    │ │ │ │ +
    55 float const * duWeights,
    │ │ │ │ +
    56 float const * dvWeights,
    │ │ │ │ +
    57 int start, int end);
    │ │ │ │ +
    58
    │ │ │ │ +
    59void
    │ │ │ │ +
    60OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ +
    61 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ +
    62 float * dstDu, BufferDescriptor const &dstDuDesc,
    │ │ │ │ +
    63 float * dstDv, BufferDescriptor const &dstDvDesc,
    │ │ │ │ +
    64 float * dstDuu, BufferDescriptor const &dstDuuDesc,
    │ │ │ │ +
    65 float * dstDuv, BufferDescriptor const &dstDuvDesc,
    │ │ │ │ +
    66 float * dstDvv, BufferDescriptor const &dstDvvDesc,
    │ │ │ │ +
    67 int const * sizes,
    │ │ │ │ +
    68 int const * offsets,
    │ │ │ │ +
    69 int const * indices,
    │ │ │ │ +
    70 float const * weights,
    │ │ │ │ +
    71 float const * duWeights,
    │ │ │ │ +
    72 float const * dvWeights,
    │ │ │ │ +
    73 float const * duuWeights,
    │ │ │ │ +
    74 float const * duvWeights,
    │ │ │ │ +
    75 float const * dvvWeights,
    │ │ │ │ +
    76 int start, int end);
    │ │ │ │ +
    77
    │ │ │ │ +
    78} // end namespace Osd
    │ │ │ │ +
    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....
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glComputeEvaluator.h │ │ │ │ │ +ompKernel.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,1359 +24,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_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_OMP_KERNEL_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_OMP_KERNEL_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -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 { │ │ │ │ │ +30namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +31namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32 │ │ │ │ │ +33namespace Osd { │ │ │ │ │ +34 │ │ │ │ │ +35struct BufferDescriptor; │ │ │ │ │ 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 } │ │ │ │ │ -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 │ │ │ │ │ +37void │ │ │ │ │ +_3_8_O_m_p_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, │ │ │ │ │ +39 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +40 int const * sizes, │ │ │ │ │ +41 int const * offsets, │ │ │ │ │ +42 int const * indices, │ │ │ │ │ +43 float const * weights, │ │ │ │ │ +44 int start, int end); │ │ │ │ │ +45 │ │ │ │ │ +46void │ │ │ │ │ +_4_7_O_m_p_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, │ │ │ │ │ +48 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +49 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +50 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +51 int const * sizes, │ │ │ │ │ +52 int const * offsets, │ │ │ │ │ +53 int const * indices, │ │ │ │ │ +54 float const * weights, │ │ │ │ │ +55 float const * duWeights, │ │ │ │ │ +56 float const * dvWeights, │ │ │ │ │ +57 int start, int end); │ │ │ │ │ +58 │ │ │ │ │ +59void │ │ │ │ │ +_6_0_O_m_p_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, │ │ │ │ │ +61 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +62 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ +63 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ +64 float * dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ +65 float * dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ +66 float * dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ +67 int const * sizes, │ │ │ │ │ +68 int const * offsets, │ │ │ │ │ +69 int const * indices, │ │ │ │ │ +70 float const * weights, │ │ │ │ │ +71 float const * duWeights, │ │ │ │ │ +72 float const * dvWeights, │ │ │ │ │ +73 float const * duuWeights, │ │ │ │ │ +74 float const * duvWeights, │ │ │ │ │ +75 float const * dvvWeights, │ │ │ │ │ +76 int start, int end); │ │ │ │ │ +77 │ │ │ │ │ +78} // end namespace Osd │ │ │ │ │ +79 │ │ │ │ │ +80} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +81using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +82 │ │ │ │ │ +83} // end namespace OpenSubdiv │ │ │ │ │ +84 │ │ │ │ │ +85#endif // OPENSUBDIV3_OSD_OMP_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_:_:_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_:_:_O_m_p_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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) │ │ │ │ │ _O_p_e_n_S_u_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_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _o_m_p_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/osd/cpuVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,27 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cpuVertexBuffer.h File Reference
    │ │ │ │ +
    tbbEvaluator.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  CpuVertexBuffer
     Concrete vertex buffer class for CPU subdivision. More...
    class  TbbEvaluator
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +119,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +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 │ │ │ │ │ -cpuVertexBuffer.h File Reference │ │ │ │ │ +tbbEvaluator.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_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for CPU subdivision. _M_o_r_e_._._. │ │ │ │ │ +class   _T_b_b_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 │ │ │ │ │ - * _c_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _t_b_b_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00758.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00758 = [ │ │ │ │ │ - ["CpuVertexBuffer", "a01169.html", "a01169"] │ │ │ │ │ + ["TbbEvaluator", "a01309.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00758_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    cpuVertexBuffer.h
    │ │ │ │ +
    tbbEvaluator.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,528 @@ │ │ │ │
    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_TBB_EVALUATOR_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_TBB_EVALUATOR_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include <cstddef>
    │ │ │ │ +
    29#include "../osd/bufferDescriptor.h"
    │ │ │ │ +
    30#include "../osd/types.h"
    │ │ │ │
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace Osd {
    │ │ │ │ +
    32#include <cstddef>
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │
    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);
    │ │ │ │ -
    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.
    │ │ │ │ +
    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 TbbEvaluator const *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 TbbEvaluator *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 TbbEvaluator *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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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
    │ │ │ │ +
    1234 static void SetNumThreads(int numThreads);
    │ │ │ │ +
    1235};
    │ │ │ │ +
    │ │ │ │ +
    1236
    │ │ │ │ +
    1237
    │ │ │ │ +
    1238} // end namespace Osd
    │ │ │ │ +
    1239
    │ │ │ │ +
    1240} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    1241using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    1242
    │ │ │ │ +
    1243} // end namespace OpenSubdiv
    │ │ │ │ +
    1244
    │ │ │ │ +
    1245
    │ │ │ │ +
    1246#endif // OPENSUBDIV3_OSD_TBB_EVALUATOR_H
    │ │ │ │ + │ │ │ │ +
    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...
    │ │ │ │ +
    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 void Synchronize(void *deviceContext=NULL)
    synchronize all asynchronous computation invoked on this device.
    │ │ │ │ +
    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, 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 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, 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, 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...
    │ │ │ │ +
    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, 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(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 void SetNumThreads(int numThreads)
    initialize tbb task schedular (optional: client may use tbb::task_scheduler_init)
    │ │ │ │ +
    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 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 TbbEvaluator *instance=NULL, void *deviceContext=NULL)
    Generic static eval stencils function with derivatives. This function has a same signature as other d...
    │ │ │ │ +
    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, 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 EvalPatchesVarying(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 ...
    │ │ │ │ +
    Coordinates set on a patch table.
    Definition types.h:42
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuVertexBuffer.h │ │ │ │ │ +tbbEvaluator.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,658 @@ │ │ │ │ │ 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_TBB_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_TBB_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include │ │ │ │ │ +29#include "../osd/bufferDescriptor.h" │ │ │ │ │ +30#include "../osd/types.h" │ │ │ │ │ 31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ 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); │ │ │ │ │ -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 │ │ │ │ │ +37namespace Osd { │ │ │ │ │ +38 │ │ │ │ │ +_3_9class _T_b_b_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 _T_b_b_E_v_a_l_u_a_t_o_r const *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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 │ │ │ │ │ +_1_2_3_4 static void _S_e_t_N_u_m_T_h_r_e_a_d_s(int numThreads); │ │ │ │ │ +1235}; │ │ │ │ │ +1236 │ │ │ │ │ +1237 │ │ │ │ │ +1238} // end namespace Osd │ │ │ │ │ +1239 │ │ │ │ │ +1240} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +1241using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +1242 │ │ │ │ │ +1243} // end namespace OpenSubdiv │ │ │ │ │ +1244 │ │ │ │ │ +1245 │ │ │ │ │ +1246#endif // OPENSUBDIV3_OSD_TBB_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_:_:_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 │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, 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 │ │ │ │ │ +Generic static eval stencils function. This function has a same signature as │ │ │ │ │ +other device kernels hav... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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 TbbEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, 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) │ │ │ │ │ -Constructor. │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, void │ │ │ │ │ +*deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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_:_:_T_b_b_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_:_:_T_b_b_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_:_:_T_b_b_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) │ │ │ │ │ +synchronize all asynchronous computation invoked on this device. │ │ │ │ │ +_O_p_e_n_S_u_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_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, TbbEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const │ │ │ │ │ +*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function with derivatives. This function has a same │ │ │ │ │ +signature as other device kern... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_S_e_t_N_u_m_T_h_r_e_a_d_s │ │ │ │ │ +static void SetNumThreads(int numThreads) │ │ │ │ │ +initialize tbb task schedular (optional: client may use tbb:: │ │ │ │ │ +task_scheduler_init) │ │ │ │ │ +_O_p_e_n_S_u_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_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_:_:_T_b_b_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 │ │ │ │ │ +TbbEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ +same signature as other d... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, │ │ │ │ │ +TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, │ │ │ │ │ +TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +Generic limit eval function. This function has a same signature as other device │ │ │ │ │ +kernels have so that ... │ │ │ │ │ +DDeeffiinniittiioonn _t_b_b_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_:_:_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_p_u_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _t_b_b_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00761.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,108 +89,43 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs | │ │ │ │ -Enumerations | │ │ │ │ -Functions
    │ │ │ │ -
    mesh.h File Reference
    │ │ │ │ +Namespaces
    │ │ │ │ +
    glLegacyGregoryPatchTable.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/patchTable.h"
    │ │ │ │ +#include "../osd/nonCopyable.h"
    │ │ │ │ +#include "../osd/opengl.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  GLLegacyGregoryPatchTable
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    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,25 @@ │ │ │ │ │ [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 │ │ │ │ │ +glLegacyGregoryPatchTable.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_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   _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   _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 │ │ │ │ │   │ │ │ │ │ -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 │ │ │ │ │ - * _m_e_s_h_._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 Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00761.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,25 +1,3 @@ │ │ │ │ │ var a00761 = [ │ │ │ │ │ - ["MeshInterface< PATCH_TABLE >", "a01261.html", "a01261"], │ │ │ │ │ - ["EvaluatorCacheT< EVALUATOR >", "a01265.html", "a01265"], │ │ │ │ │ - ["Entry", "a01269.html", "a01269"], │ │ │ │ │ - ["Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >", "a01273.html", "a01273"], │ │ │ │ │ - ["MeshBitset", "a00761.html#a85ba9df501aea9af1ec9da1558c255bc", null], │ │ │ │ │ - ["MeshBits", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492", [ │ │ │ │ │ - ["MeshAdaptive", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492adef344bcbdd50a1a93136eb53183c718", null], │ │ │ │ │ - ["MeshInterleaveVarying", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9313c644b9b2a998bcb55cfcc4582b1a", null], │ │ │ │ │ - ["MeshFVarData", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ac10e41fef659f3b3a1b730319bdedb45", null], │ │ │ │ │ - ["MeshFVarAdaptive", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9b8a23ab039e120012bc7c622308d603", null], │ │ │ │ │ - ["MeshUseSmoothCornerPatch", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ab32b8ef595539e14041e2fb0e619e3f9", null], │ │ │ │ │ - ["MeshUseSingleCreasePatch", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9058d69e1089fc77f1974a76c34e2071", null], │ │ │ │ │ - ["MeshUseInfSharpPatch", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a8fab1b3018f94b5b2432c7435e795925", null], │ │ │ │ │ - ["MeshEndCapBilinearBasis", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a4124233e4f787f999c7975afceab34f3", null], │ │ │ │ │ - ["MeshEndCapBSplineBasis", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2f41b6ba0393698bb3af283283737f7", null], │ │ │ │ │ - ["MeshEndCapGregoryBasis", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2878e1a215530f5f6fb89f1e06f91ee", null], │ │ │ │ │ - ["MeshEndCapLegacyGregory", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aad7b3fb2be609abdbfafaf5b1c834158", null], │ │ │ │ │ - ["NUM_MESH_BITS", "a00761.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a5676712c77d29cfdd330e2802db1c464", null] │ │ │ │ │ - ]], │ │ │ │ │ - ["convertToCompatibleStencilTable", "a00761.html#a06ceddf21c024b341a5b946049cd701a", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >", "a00761.html#a4c2520cc1a8a5a03e3f53584629d7318", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >", "a00761.html#ab5753a2b0a0995c8e2259d2c4765f7df", null], │ │ │ │ │ - ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >", "a00761.html#a33f9830228f847fae1c30c9dffe02b5a", null] │ │ │ │ │ + ["GLLegacyGregoryPatchTable", "a01225.html", "a01225"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00761_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    mesh.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,885 +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_MESH_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MESH_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
    │ │ │ │ -
    30#include <bitset>
    │ │ │ │ -
    31#include <cassert>
    │ │ │ │ -
    32#include <cstring>
    │ │ │ │ -
    33#include <vector>
    │ │ │ │ -
    34
    │ │ │ │ -
    35#include "../far/topologyRefiner.h"
    │ │ │ │ -
    36#include "../far/patchTableFactory.h"
    │ │ │ │ -
    37#include "../far/stencilTable.h"
    │ │ │ │ -
    38#include "../far/stencilTableFactory.h"
    │ │ │ │ -
    39
    │ │ │ │ -
    40#include "../osd/bufferDescriptor.h"
    │ │ │ │ -
    41
    │ │ │ │ -
    42struct ID3D11DeviceContext;
    │ │ │ │ +
    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
    │ │ │ │ -
    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// ---------------------------------------------------------------------------
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ -
    67template <class PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    69public:
    │ │ │ │ -
    70 typedef PATCH_TABLE PatchTable;
    │ │ │ │ -
    71 typedef typename PatchTable::VertexBufferBinding VertexBufferBinding;
    │ │ │ │ -
    72
    │ │ │ │ -
    73public:
    │ │ │ │ - │ │ │ │ -
    75
    │ │ │ │ -
    76 virtual ~MeshInterface() { }
    │ │ │ │ +
    67protected:
    │ │ │ │ + │ │ │ │ +
    69
    │ │ │ │ +
    70private:
    │ │ │ │ +
    71 GLuint _vertexTextureBuffer;
    │ │ │ │ +
    72 GLuint _vertexValenceTextureBuffer;
    │ │ │ │ +
    73 GLuint _quadOffsetsTextureBuffer;
    │ │ │ │ +
    74 GLuint _quadOffsetsBase[2]; // gregory, boundaryGregory
    │ │ │ │ +
    75};
    │ │ │ │ +
    │ │ │ │ +
    76
    │ │ │ │
    77
    │ │ │ │ -
    78 virtual int GetNumVertices() const = 0;
    │ │ │ │ -
    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 }
    │ │ │ │ -
    │ │ │ │ -
    134};
    │ │ │ │ -
    │ │ │ │ -
    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
    │ │ │ │ -
    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:730
    │ │ │ │ -
    StencilTable const * GetLocalPointVaryingStencilTable() const
    Returns the stencil table to compute local point varying values.
    Definition patchTable.h:735
    │ │ │ │ -
    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
    │ │ │ │ +
    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 │ │ │ │ │ -mesh.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,1093 +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_MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MESH_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 │ │ │ │ │ -30#include │ │ │ │ │ -31#include │ │ │ │ │ -32#include │ │ │ │ │ -33#include │ │ │ │ │ -34 │ │ │ │ │ -35#include "../far/topologyRefiner.h" │ │ │ │ │ -36#include "../far/patchTableFactory.h" │ │ │ │ │ -37#include "../far/stencilTable.h" │ │ │ │ │ -38#include "../far/stencilTableFactory.h" │ │ │ │ │ -39 │ │ │ │ │ -40#include "../osd/bufferDescriptor.h" │ │ │ │ │ -41 │ │ │ │ │ -42struct ID3D11DeviceContext; │ │ │ │ │ +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 │ │ │ │ │ -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// -------------------------------------------------------------------------- │ │ │ │ │ -- │ │ │ │ │ +_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 │ │ │ │ │ -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() { } │ │ │ │ │ +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 │ │ │ │ │ -_7_8 virtual int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const = 0; │ │ │ │ │ -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; │ │ │ │ │ -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// ------------------------------------------------------------------------- │ │ │ │ │ --- │ │ │ │ │ -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 │ │ │ │ │ +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_:_:_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_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_:_:_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_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_:_:_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_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_:_:_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 │ │ │ │ │ -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_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 │ │ │ │ │ - * _m_e_s_h_._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 Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00764.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuD3D11VertexBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,26 +90,26 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    d3d11LegacyGregoryPatchTable.h File Reference
    │ │ │ │ +
    cpuD3D11VertexBuffer.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ +#include <cstddef>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  D3D11LegacyGregoryPatchTable
    class  CpuD3D11VertexBuffer
     Concrete vertex buffer class for Cpu subdivision and DirectX drawing. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,13 +118,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +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 │ │ │ │ │ -d3d11LegacyGregoryPatchTable.h File Reference │ │ │ │ │ +cpuD3D11VertexBuffer.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 │ │ │ │ │ _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   _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +  Concrete vertex buffer class for Cpu subdivision and DirectX 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 │ │ │ │ │ - * _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 │ │ │ │ │ + * _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00764.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00764 = [ │ │ │ │ │ - ["D3D11LegacyGregoryPatchTable", "a01197.html", "a01197"] │ │ │ │ │ + ["CpuD3D11VertexBuffer", "a01153.html", "a01153"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00764_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11LegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cpuD3D11VertexBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    d3d11LegacyGregoryPatchTable.h
    │ │ │ │ +
    cpuD3D11VertexBuffer.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,122 +119,91 @@ │ │ │ │
    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_CPU_D3D11_VERTEX_BUFFER_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_CPU_D3D11_VERTEX_BUFFER_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;
    │ │ │ │ +
    29#include <cstddef>
    │ │ │ │ +
    30
    │ │ │ │ +
    31struct ID3D11Buffer;
    │ │ │ │ +
    32struct ID3D11Device;
    │ │ │ │ +
    33struct ID3D11DeviceContext;
    │ │ │ │ +
    34
    │ │ │ │ +
    35namespace OpenSubdiv {
    │ │ │ │ +
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │
    37
    │ │ │ │ -
    38namespace OpenSubdiv {
    │ │ │ │ -
    39namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    40
    │ │ │ │ -
    41namespace Osd {
    │ │ │ │ -
    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 }
    │ │ │ │ -
    │ │ │ │ +
    38namespace Osd {
    │ │ │ │ +
    39
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    49public:
    │ │ │ │ +
    51 static CpuD3D11VertexBuffer * Create(int numElements, int numVertices,
    │ │ │ │ +
    52 ID3D11DeviceContext *deviceContext);
    │ │ │ │
    53
    │ │ │ │ - │ │ │ │ -
    55 Far::PatchTable const *farPatchTable,
    │ │ │ │ -
    56 ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    57
    │ │ │ │ -
    58 void UpdateVertexBuffer(ID3D11Buffer *vbo,
    │ │ │ │ -
    59 int numVertices, int numVertexElements,
    │ │ │ │ -
    60 ID3D11DeviceContext *pd3d11DeviceContext);
    │ │ │ │ + │ │ │ │ +
    56
    │ │ │ │ +
    59 void UpdateData(const float *src, int startVertex, int numVertices,
    │ │ │ │ +
    60 void *deviceContext = NULL);
    │ │ │ │
    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 }
    │ │ │ │ -
    │ │ │ │ +
    63 int GetNumElements() const;
    │ │ │ │ +
    64
    │ │ │ │ +
    66 int GetNumVertices() const;
    │ │ │ │ +
    67
    │ │ │ │ +
    69 float * BindCpuBuffer();
    │ │ │ │ +
    70
    │ │ │ │ +
    72 ID3D11Buffer *BindD3D11Buffer(ID3D11DeviceContext *deviceContext);
    │ │ │ │
    73
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    76 return _quadOffsetsBase[1];
    │ │ │ │ -
    77 }
    │ │ │ │ -
    78 return _quadOffsetsBase[0];
    │ │ │ │ -
    79 }
    │ │ │ │ -
    │ │ │ │ -
    80
    │ │ │ │ -
    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};
    │ │ │ │ +
    │ │ │ │ +
    75 ID3D11Buffer *BindVBO(ID3D11DeviceContext *deviceContext) {
    │ │ │ │ +
    76 return BindD3D11Buffer(deviceContext);
    │ │ │ │ +
    77 }
    │ │ │ │ +
    │ │ │ │ +
    78
    │ │ │ │ +
    79protected:
    │ │ │ │ +
    81 CpuD3D11VertexBuffer(int numElements, int numVertices);
    │ │ │ │ +
    82
    │ │ │ │ +
    83 bool allocate(ID3D11Device *device);
    │ │ │ │ +
    84
    │ │ │ │ +
    85private:
    │ │ │ │ +
    86 int _numElements;
    │ │ │ │ +
    87 int _numVertices;
    │ │ │ │ +
    88 ID3D11Buffer *_d3d11Buffer;
    │ │ │ │ +
    89 float *_cpuBuffer;
    │ │ │ │ +
    90};
    │ │ │ │
    │ │ │ │ -
    92
    │ │ │ │ +
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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)
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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.
    │ │ │ │ +
    float * BindCpuBuffer()
    Returns the address of CPU buffer.
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext)
    Returns the D3D11 buffer object (for Osd::Mesh interface)
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11LegacyGregoryPatchTable.h │ │ │ │ │ +cpuD3D11VertexBuffer.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,134 +24,105 @@ │ │ │ │ │ 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_CPU_D3D11_VERTEX_BUFFER_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CPU_D3D11_VERTEX_BUFFER_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; │ │ │ │ │ +29#include │ │ │ │ │ +30 │ │ │ │ │ +31struct ID3D11Buffer; │ │ │ │ │ +32struct ID3D11Device; │ │ │ │ │ +33struct ID3D11DeviceContext; │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ 37 │ │ │ │ │ -38namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -39namespace OPENSUBDIV_VERSION { │ │ │ │ │ -40 │ │ │ │ │ -41namespace Osd { │ │ │ │ │ -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 } │ │ │ │ │ +38namespace Osd { │ │ │ │ │ +39 │ │ │ │ │ +_4_8class _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ +49public: │ │ │ │ │ +_5_1 static _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ +52 ID3D11DeviceContext *deviceContext); │ │ │ │ │ 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); │ │ │ │ │ +_5_5 virtual _~_C_p_u_D_3_D_1_1_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, │ │ │ │ │ +60 void *deviceContext = NULL); │ │ │ │ │ 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 } │ │ │ │ │ +_6_3 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ +64 │ │ │ │ │ +_6_6 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +67 │ │ │ │ │ +_6_9 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ +70 │ │ │ │ │ +_7_2 ID3D11Buffer *_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(ID3D11DeviceContext *deviceContext); │ │ │ │ │ 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 ID3D11Buffer *_B_i_n_d_V_B_O(ID3D11DeviceContext *deviceContext) { │ │ │ │ │ +76 return _B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(deviceContext); │ │ │ │ │ 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(); │ │ │ │ │ -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 │ │ │ │ │ +78 │ │ │ │ │ +79protected: │ │ │ │ │ +_8_1 _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ +82 │ │ │ │ │ +_8_3 bool _a_l_l_o_c_a_t_e(ID3D11Device *device); │ │ │ │ │ +84 │ │ │ │ │ +85private: │ │ │ │ │ +86 int _numElements; │ │ │ │ │ +87 int _numVertices; │ │ │ │ │ +88 ID3D11Buffer *_d3d11Buffer; │ │ │ │ │ +89 float *_cpuBuffer; │ │ │ │ │ +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_CPU_D3D11_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_:_:_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_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +Concrete vertex buffer class for Cpu subdivision and DirectX drawing. │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_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_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ +static CpuD3D11VertexBuffer * Create(int numElements, int numVertices, │ │ │ │ │ +ID3D11DeviceContext *deviceContext) │ │ │ │ │ +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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +CpuD3D11VertexBuffer(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_D_3_D_1_1_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_D_3_D_1_1_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_D_3_D_1_1_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r │ │ │ │ │ +ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Returns the D3D11 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_:_:_C_p_u_D_3_D_1_1_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(ID3D11Device *device) │ │ │ │ │ +_O_p_e_n_S_u_b_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_: │ │ │ │ │ +_~_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ +virtual ~CpuD3D11VertexBuffer() │ │ │ │ │ +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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ +ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext) │ │ │ │ │ +Returns the D3D11 buffer object (for Osd::Mesh interface) │ │ │ │ │ +DDeeffiinniittiioonn _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h_:_7_5 │ │ │ │ │ * _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 │ │ │ │ │ + * _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00767.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mesh.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,48 +89,108 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    cudaEvaluator.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Typedefs | │ │ │ │ +Enumerations | │ │ │ │ +Functions
    │ │ │ │ +
    mesh.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include <bitset>
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstring>
    │ │ │ │ #include <vector>
    │ │ │ │ -#include "../osd/bufferDescriptor.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

    class  CudaStencilTable
     CUDA stencil table. More...
    class  MeshInterface< PATCH_TABLE >
     
    class  CudaEvaluator
    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,30 +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 │ │ │ │ │ -cudaEvaluator.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_/_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 "_._._/_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_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  CUDA stencil 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   _C_u_d_a_E_v_a_l_u_a_t_o_r │ │ │ │ │ + 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_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _m_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00767.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,25 @@ │ │ │ │ │ var a00767 = [ │ │ │ │ │ - ["CudaStencilTable", "a01173.html", "a01173"], │ │ │ │ │ - ["CudaEvaluator", "a01177.html", null] │ │ │ │ │ + ["MeshInterface< PATCH_TABLE >", "a01261.html", "a01261"], │ │ │ │ │ + ["EvaluatorCacheT< EVALUATOR >", "a01265.html", "a01265"], │ │ │ │ │ + ["Entry", "a01269.html", "a01269"], │ │ │ │ │ + ["Mesh< VERTEX_BUFFER, STENCIL_TABLE, EVALUATOR, PATCH_TABLE, DEVICE_CONTEXT >", "a01273.html", "a01273"], │ │ │ │ │ + ["MeshBitset", "a00767.html#a85ba9df501aea9af1ec9da1558c255bc", null], │ │ │ │ │ + ["MeshBits", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492", [ │ │ │ │ │ + ["MeshAdaptive", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492adef344bcbdd50a1a93136eb53183c718", null], │ │ │ │ │ + ["MeshInterleaveVarying", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9313c644b9b2a998bcb55cfcc4582b1a", null], │ │ │ │ │ + ["MeshFVarData", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ac10e41fef659f3b3a1b730319bdedb45", null], │ │ │ │ │ + ["MeshFVarAdaptive", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9b8a23ab039e120012bc7c622308d603", null], │ │ │ │ │ + ["MeshUseSmoothCornerPatch", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492ab32b8ef595539e14041e2fb0e619e3f9", null], │ │ │ │ │ + ["MeshUseSingleCreasePatch", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a9058d69e1089fc77f1974a76c34e2071", null], │ │ │ │ │ + ["MeshUseInfSharpPatch", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a8fab1b3018f94b5b2432c7435e795925", null], │ │ │ │ │ + ["MeshEndCapBilinearBasis", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a4124233e4f787f999c7975afceab34f3", null], │ │ │ │ │ + ["MeshEndCapBSplineBasis", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2f41b6ba0393698bb3af283283737f7", null], │ │ │ │ │ + ["MeshEndCapGregoryBasis", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aa2878e1a215530f5f6fb89f1e06f91ee", null], │ │ │ │ │ + ["MeshEndCapLegacyGregory", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492aad7b3fb2be609abdbfafaf5b1c834158", null], │ │ │ │ │ + ["NUM_MESH_BITS", "a00767.html#a1af6b50e9f8ae13d3d2f9d5b03b35492a5676712c77d29cfdd330e2802db1c464", null] │ │ │ │ │ + ]], │ │ │ │ │ + ["convertToCompatibleStencilTable", "a00767.html#a06ceddf21c024b341a5b946049cd701a", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::LimitStencilTable, Far::LimitStencilTable, void >", "a00767.html#a4c2520cc1a8a5a03e3f53584629d7318", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, ID3D11DeviceContext >", "a00767.html#ab5753a2b0a0995c8e2259d2c4765f7df", null], │ │ │ │ │ + ["convertToCompatibleStencilTable< Far::StencilTable, Far::StencilTable, void >", "a00767.html#a33f9830228f847fae1c30c9dffe02b5a", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00767_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mesh.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    cudaEvaluator.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,582 +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_CUDA_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_MESH_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_MESH_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    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 }
    │ │ │ │ +
    30#include <bitset>
    │ │ │ │ +
    31#include <cassert>
    │ │ │ │ +
    32#include <cstring>
    │ │ │ │ +
    33#include <vector>
    │ │ │ │ +
    34
    │ │ │ │ +
    35#include "../far/topologyRefiner.h"
    │ │ │ │ +
    36#include "../far/patchTableFactory.h"
    │ │ │ │ +
    37#include "../far/stencilTable.h"
    │ │ │ │ +
    38#include "../far/stencilTableFactory.h"
    │ │ │ │ +
    39
    │ │ │ │ +
    40#include "../osd/bufferDescriptor.h"
    │ │ │ │ +
    41
    │ │ │ │ +
    42struct ID3D11DeviceContext;
    │ │ │ │ +
    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 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};
    │ │ │ │ -
    │ │ │ │ +
    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;
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    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) {
    │ │ │ │ +
    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
    │ │ │ │ +
    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 (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
    │ │ │ │ +
    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 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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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
    │ │ │ │ +
    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:730
    │ │ │ │ +
    StencilTable const * GetLocalPointVaryingStencilTable() const
    Returns the stencil table to compute local point varying values.
    Definition patchTable.h:735
    │ │ │ │ +
    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 │ │ │ │ │ -cudaEvaluator.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,737 +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_CUDA_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MESH_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -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 } │ │ │ │ │ +30#include │ │ │ │ │ +31#include │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ +34 │ │ │ │ │ +35#include "../far/topologyRefiner.h" │ │ │ │ │ +36#include "../far/patchTableFactory.h" │ │ │ │ │ +37#include "../far/stencilTable.h" │ │ │ │ │ +38#include "../far/stencilTableFactory.h" │ │ │ │ │ +39 │ │ │ │ │ +40#include "../osd/bufferDescriptor.h" │ │ │ │ │ +41 │ │ │ │ │ +42struct ID3D11DeviceContext; │ │ │ │ │ +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 │ │ │ │ │ -_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}; │ │ │ │ │ +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; │ │ │ │ │ +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; │ │ │ │ │ +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_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) { │ │ │ │ │ +_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 │ │ │ │ │ +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 (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 │ │ │ │ │ +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 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 │ │ │ │ │ +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_:_:_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_:_:_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_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_:_:_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_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_:_:_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 │ │ │ │ │ +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_:_:_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_:_:_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_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _m_e_s_h_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00770.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,28 +90,28 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlPatchTable.h File Reference
    │ │ │ │ +
    d3d11ComputeEvaluator.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include "../osd/mtlCommon.h"
    │ │ │ │ +#include "../osd/bufferDescriptor.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  MTLPatchTable
    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 │ │ │ │ │ -mtlPatchTable.h File Reference │ │ │ │ │ +d3d11ComputeEvaluator.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_/_m_t_l_C_o_m_m_o_n_._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   _M_T_L_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 │ │ │ │ │ - * _m_t_l_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 Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00770.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00770 = [ │ │ │ │ │ - ["MTLPatchTable", "a01297.html", "a01297"] │ │ │ │ │ + ["D3D11StencilTable", "a01189.html", "a01189"], │ │ │ │ │ + ["D3D11ComputeEvaluator", "a01193.html", "a01193"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00770_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlPatchTable.h
    │ │ │ │ +
    d3d11ComputeEvaluator.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,123 +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_MTL_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_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#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
    │ │ │ │ -
    37namespace OpenSubdiv {
    │ │ │ │ -
    38namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    29
    │ │ │ │ +
    30struct ID3D11DeviceContext;
    │ │ │ │ +
    31struct ID3D11Buffer;
    │ │ │ │ +
    32struct ID3D11ComputeShader;
    │ │ │ │ +
    33struct ID3D11ClassLinkage;
    │ │ │ │ +
    34struct ID3D11ClassInstance;
    │ │ │ │ +
    35struct ID3D11ShaderResourceView;
    │ │ │ │ +
    36struct ID3D11UnorderedAccessView;
    │ │ │ │ +
    37
    │ │ │ │ +
    38#include "../osd/bufferDescriptor.h"
    │ │ │ │
    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 }
    │ │ │ │ -
    │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ -
    77
    │ │ │ │ -
    78 id<MTLBuffer> _indexBuffer;
    │ │ │ │ -
    79 id<MTLBuffer> _patchParamBuffer;
    │ │ │ │ +
    40namespace OpenSubdiv {
    │ │ │ │ +
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ +
    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; }
    │ │ │ │
    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
    │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ +
    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};
    │ │ │ │ +
    │ │ │ │ +
    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
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlPatchTable.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 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,170 +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_MTL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_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#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 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +29 │ │ │ │ │ +30struct ID3D11DeviceContext; │ │ │ │ │ +31struct ID3D11Buffer; │ │ │ │ │ +32struct ID3D11ComputeShader; │ │ │ │ │ +33struct ID3D11ClassLinkage; │ │ │ │ │ +34struct ID3D11ClassInstance; │ │ │ │ │ +35struct ID3D11ShaderResourceView; │ │ │ │ │ +36struct ID3D11UnorderedAccessView; │ │ │ │ │ +37 │ │ │ │ │ +38#include "../osd/bufferDescriptor.h" │ │ │ │ │ 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); │ │ │ │ │ -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; │ │ │ │ │ -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; │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +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(); │ │ │ │ │ +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; } │ │ │ │ │ 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 │ │ │ │ │ +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}; │ │ │ │ │ +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 │ │ │ │ │ _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_:_:_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, │ │ │ │ │ +_O_p_e_n_S_u_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 _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 │ │ │ │ │ +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_s_d │ │ │ │ │ - * _m_t_l_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 Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00773.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbKernel.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,51 +88,47 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Namespaces | │ │ │ │ -Functions
    │ │ │ │ -
    tbbKernel.h File Reference
    │ │ │ │ +Classes | │ │ │ │ +Namespaces
    │ │ │ │ +
    d3d11PatchTable.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ -#include "../far/patchParam.h"
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include "../far/patchDescriptor.h"
    │ │ │ │ +#include "../osd/nonCopyable.h"
    │ │ │ │ +#include "../osd/types.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ +Classes

    class  D3D11PatchTable
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ │ 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,59 +1,28 @@ │ │ │ │ │ [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 │ │ │ │ │ +d3d11PatchTable.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 "_._._/_f_a_r_/_p_a_t_c_h_P_a_r_a_m_._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_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) │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ -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) │ │ │ │ │ +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 │ │ │ │ │ - * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ + * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00773.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,7 +1,3 @@ │ │ │ │ │ var a00773 = [ │ │ │ │ │ - ["TbbEvalPatches", "a00773.html#aa0c3c264a43eeddc5cb3a58b006d3d32", null], │ │ │ │ │ - ["TbbEvalPatches", "a00773.html#a20e08be34d6183b6943ed7a1586eca4a", null], │ │ │ │ │ - ["TbbEvalStencils", "a00773.html#aa65ed860a2fa5935d99129a898a8f0b6", null], │ │ │ │ │ - ["TbbEvalStencils", "a00773.html#af23c35537952bfdd493441e5c42ff2ed", null], │ │ │ │ │ - ["TbbEvalStencils", "a00773.html#a4a6a0fcc01638f2a0316b32ad158b485", null] │ │ │ │ │ + ["D3D11PatchTable", "a01201.html", "a01201"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00773_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbKernel.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    tbbKernel.h
    │ │ │ │ +
    d3d11PatchTable.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,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_TBB_KERNEL_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_TBB_KERNEL_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include "../far/patchDescriptor.h"
    │ │ │ │ -
    30#include "../far/patchParam.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include <vector>
    │ │ │ │ +
    31#include "../far/patchDescriptor.h"
    │ │ │ │ +
    32#include "../osd/nonCopyable.h"
    │ │ │ │ +
    33#include "../osd/types.h"
    │ │ │ │
    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
    │ │ │ │ -
    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);
    │ │ │ │ +
    35struct ID3D11Buffer;
    │ │ │ │ +
    36struct ID3D11ShaderResourceView;
    │ │ │ │ +
    37struct ID3D11Device;
    │ │ │ │ +
    38struct ID3D11DeviceContext;
    │ │ │ │ +
    39
    │ │ │ │ +
    40namespace OpenSubdiv {
    │ │ │ │ +
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    42
    │ │ │ │ +
    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 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
    │ │ │ │ +
    63 ID3D11DeviceContext *deviceContext);
    │ │ │ │ +
    64
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    66 return _patchArrays;
    │ │ │ │ +
    67 }
    │ │ │ │ +
    │ │ │ │ +
    68
    │ │ │ │ +
    │ │ │ │ +
    70 ID3D11Buffer* GetPatchIndexBuffer() const {
    │ │ │ │ +
    71 return _indexBuffer;
    │ │ │ │ +
    72 }
    │ │ │ │ +
    │ │ │ │ +
    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};
    │ │ │ │ +
    │ │ │ │ +
    90
    │ │ │ │ +
    91
    │ │ │ │ +
    92} // end namespace Osd
    │ │ │ │
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -tbbKernel.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 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,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_TBB_KERNEL_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_GL_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 { │ │ │ │ │ +29 │ │ │ │ │ +30#include │ │ │ │ │ +31#include "../far/patchDescriptor.h" │ │ │ │ │ +32#include "../osd/nonCopyable.h" │ │ │ │ │ +33#include "../osd/types.h" │ │ │ │ │ 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 │ │ │ │ │ -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); │ │ │ │ │ +35struct ID3D11Buffer; │ │ │ │ │ +36struct ID3D11ShaderResourceView; │ │ │ │ │ +37struct ID3D11Device; │ │ │ │ │ +38struct ID3D11DeviceContext; │ │ │ │ │ +39 │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ +42 │ │ │ │ │ +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 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_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}; │ │ │ │ │ +90 │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace Osd │ │ │ │ │ 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 │ │ │ │ │ +94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +96 │ │ │ │ │ +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_:_:_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_:_:_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, │ │ │ │ │ +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 │ │ │ │ │ - * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ + * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/osd/glXFBEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,30 +90,30 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    glXFBEvaluator.h File Reference
    │ │ │ │ +
    glComputeEvaluator.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/opengl.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.

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

    │ │ │ │ Classes

    class  GLStencilTableTBO
     GL TextureBuffer stencil table. More...
    class  GLStencilTableSSBO
     GL stencil table (Shader Storage buffer) More...
     
    class  GLXFBEvaluator
    class  GLComputeEvaluator
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -124,13 +124,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +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 │ │ │ │ │ -glXFBEvaluator.h File Reference │ │ │ │ │ +glComputeEvaluator.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" │ │ │ │ │ _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_T_B_O │ │ │ │ │ -  GL TextureBuffer stencil table. _M_o_r_e_._._. │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ +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_:_:_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_X_F_B_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00776.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00776 = [ │ │ │ │ │ - ["GLStencilTableTBO", "a01241.html", "a01241"], │ │ │ │ │ - ["GLXFBEvaluator", "a01245.html", "a01245"] │ │ │ │ │ + ["GLStencilTableSSBO", "a01209.html", "a01209"], │ │ │ │ │ + ["GLComputeEvaluator", "a01213.html", "a01213"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00776_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glXFBEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/glComputeEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    glXFBEvaluator.h
    │ │ │ │ +
    glComputeEvaluator.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,16 +119,16 @@ │ │ │ │
    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_XFB_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_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/opengl.h"
    │ │ │ │
    31#include "../osd/types.h"
    │ │ │ │
    32#include "../osd/bufferDescriptor.h"
    │ │ │ │
    33
    │ │ │ │ @@ -139,1185 +139,1112 @@ │ │ │ │
    38 class PatchTable;
    │ │ │ │
    39 class StencilTable;
    │ │ │ │
    40 class LimitStencilTable;
    │ │ │ │
    41}
    │ │ │ │
    42
    │ │ │ │
    43namespace Osd {
    │ │ │ │
    44
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    53public:
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    55 Far::StencilTable const *stencilTable, void *deviceContext = NULL) {
    │ │ │ │ -
    56 (void)deviceContext; // unused
    │ │ │ │ -
    57 return new GLStencilTableTBO(stencilTable);
    │ │ │ │ -
    58 }
    │ │ │ │ -
    │ │ │ │ -
    59
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    61 Far::LimitStencilTable const *limitStencilTable,
    │ │ │ │ -
    62 void *deviceContext = NULL) {
    │ │ │ │ -
    63 (void)deviceContext; // unused
    │ │ │ │ -
    64 return new GLStencilTableTBO(limitStencilTable);
    │ │ │ │ -
    65 }
    │ │ │ │ -
    │ │ │ │ -
    66
    │ │ │ │ -
    67 explicit GLStencilTableTBO(Far::StencilTable const *stencilTable);
    │ │ │ │ -
    68 explicit GLStencilTableTBO(Far::LimitStencilTable const *limitStencilTable);
    │ │ │ │ - │ │ │ │ -
    70
    │ │ │ │ -
    71 // interfaces needed for GLSLTransformFeedbackKernel
    │ │ │ │ -
    72 GLuint GetSizesTexture() const { return _sizes; }
    │ │ │ │ -
    73 GLuint GetOffsetsTexture() const { return _offsets; }
    │ │ │ │ -
    74 GLuint GetIndicesTexture() const { return _indices; }
    │ │ │ │ -
    75 GLuint GetWeightsTexture() const { return _weights; }
    │ │ │ │ -
    76 GLuint GetDuWeightsTexture() const { return _duWeights; }
    │ │ │ │ -
    77 GLuint GetDvWeightsTexture() const { return _dvWeights; }
    │ │ │ │ -
    78 GLuint GetDuuWeightsTexture() const { return _duuWeights; }
    │ │ │ │ -
    79 GLuint GetDuvWeightsTexture() const { return _duvWeights; }
    │ │ │ │ -
    80 GLuint GetDvvWeightsTexture() const { return _dvvWeights; }
    │ │ │ │ -
    81 int GetNumStencils() const { return _numStencils; }
    │ │ │ │ -
    82
    │ │ │ │ -
    83private:
    │ │ │ │ -
    84 GLuint _sizes;
    │ │ │ │ -
    85 GLuint _offsets;
    │ │ │ │ -
    86 GLuint _indices;
    │ │ │ │ -
    87 GLuint _weights;
    │ │ │ │ -
    88 GLuint _duWeights;
    │ │ │ │ -
    89 GLuint _dvWeights;
    │ │ │ │ -
    90 GLuint _duuWeights;
    │ │ │ │ -
    91 GLuint _duvWeights;
    │ │ │ │ -
    92 GLuint _dvvWeights;
    │ │ │ │ -
    93 int _numStencils;
    │ │ │ │ -
    94};
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ -
    96// ---------------------------------------------------------------------------
    │ │ │ │ -
    97
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    99public:
    │ │ │ │ -
    100 typedef bool Instantiatable;
    │ │ │ │ -
    101
    │ │ │ │ -
    103 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    104 static GLXFBEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    105 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    106 BufferDescriptor const &duDesc,
    │ │ │ │ -
    107 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    108 DEVICE_CONTEXT deviceContext) {
    │ │ │ │ -
    109 bool interleavedDerivativeBuffers = deviceContext
    │ │ │ │ -
    110 ? deviceContext->AreInterleavedDerivativeBuffers()
    │ │ │ │ -
    111 : false;
    │ │ │ │ -
    112 return Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    113 interleavedDerivativeBuffers);
    │ │ │ │ -
    114 }
    │ │ │ │ -
    │ │ │ │ -
    115
    │ │ │ │ -
    │ │ │ │ -
    117 static GLXFBEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    118 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    119 BufferDescriptor const &duDesc,
    │ │ │ │ -
    120 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    121 void * deviceContext) {
    │ │ │ │ -
    122 (void)deviceContext; // not used
    │ │ │ │ -
    123 return Create(srcDesc, dstDesc, duDesc, dvDesc);
    │ │ │ │ -
    124 }
    │ │ │ │ -
    │ │ │ │ -
    125
    │ │ │ │ -
    │ │ │ │ -
    126 static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    127 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    128 BufferDescriptor const &duDesc,
    │ │ │ │ -
    129 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    130 bool interleavedDerivativeBuffers = false) {
    │ │ │ │ -
    131 GLXFBEvaluator *instance = new GLXFBEvaluator(interleavedDerivativeBuffers);
    │ │ │ │ -
    132 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc))
    │ │ │ │ -
    133 return instance;
    │ │ │ │ -
    134 delete instance;
    │ │ │ │ -
    135 return NULL;
    │ │ │ │ -
    136 }
    │ │ │ │ -
    │ │ │ │ -
    137
    │ │ │ │ -
    139 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    140 static GLXFBEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    141 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    142 BufferDescriptor const &duDesc,
    │ │ │ │ -
    143 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    144 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    145 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    146 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    147 DEVICE_CONTEXT deviceContext) {
    │ │ │ │ -
    148 bool interleavedDerivativeBuffers = deviceContext
    │ │ │ │ -
    149 ? deviceContext->AreInterleavedDerivativeBuffers()
    │ │ │ │ -
    150 : false;
    │ │ │ │ -
    151 return Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    152 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    153 interleavedDerivativeBuffers);
    │ │ │ │ -
    154 }
    │ │ │ │ -
    │ │ │ │ -
    155
    │ │ │ │ -
    │ │ │ │ -
    157 static GLXFBEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    158 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    159 BufferDescriptor const &duDesc,
    │ │ │ │ -
    160 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    161 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    162 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    163 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    164 void * deviceContext) {
    │ │ │ │ -
    165 (void)deviceContext; // not used
    │ │ │ │ -
    166 return Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    167 duuDesc, duvDesc, dvvDesc);
    │ │ │ │ -
    168 }
    │ │ │ │ -
    │ │ │ │ -
    169
    │ │ │ │ -
    │ │ │ │ -
    170 static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    171 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    172 BufferDescriptor const &duDesc,
    │ │ │ │ -
    173 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    174 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    175 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    176 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    177 bool interleavedDerivativeBuffers = false) {
    │ │ │ │ -
    178 GLXFBEvaluator *instance = new GLXFBEvaluator(interleavedDerivativeBuffers);
    │ │ │ │ -
    179 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    180 duuDesc, duvDesc, dvvDesc))
    │ │ │ │ -
    181 return instance;
    │ │ │ │ -
    182 delete instance;
    │ │ │ │ -
    183 return NULL;
    │ │ │ │ -
    184 }
    │ │ │ │ -
    │ │ │ │ -
    185
    │ │ │ │ -
    199 GLXFBEvaluator(bool interleavedDerivativeBuffers = false);
    │ │ │ │ -
    200
    │ │ │ │ - │ │ │ │ -
    203
    │ │ │ │ -
    209
    │ │ │ │ -
    237 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ -
    238 static bool EvalStencils(
    │ │ │ │ -
    239 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    240 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    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 GLXFBEvaluator const *instance,
    │ │ │ │ +
    242 GLComputeEvaluator const *instance,
    │ │ │ │
    243 void * deviceContext = NULL) {
    │ │ │ │
    244
    │ │ │ │
    245 if (instance) {
    │ │ │ │ -
    246 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ +
    246 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │
    247 dstBuffer, dstDesc,
    │ │ │ │ -
    248 stencilTable);
    │ │ │ │ -
    249 } else {
    │ │ │ │ -
    250 // Create an instance on demand (slow)
    │ │ │ │ -
    251 (void)deviceContext; // unused
    │ │ │ │ -
    252 instance = Create(srcDesc, 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,
    │ │ │ │ +
    256 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │
    257 dstBuffer, dstDesc,
    │ │ │ │ -
    258 stencilTable);
    │ │ │ │ -
    259 delete instance;
    │ │ │ │ -
    260 return r;
    │ │ │ │ -
    261 }
    │ │ │ │ -
    262 return false;
    │ │ │ │ -
    263 }
    │ │ │ │ -
    264 }
    │ │ │ │ -
    │ │ │ │ -
    265
    │ │ │ │ -
    305 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ -
    306 static bool EvalStencils(
    │ │ │ │ -
    307 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    308 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    309 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    310 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    311 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    312 GLXFBEvaluator const *instance,
    │ │ │ │ -
    313 void * deviceContext = NULL) {
    │ │ │ │ -
    314
    │ │ │ │ -
    315 if (instance) {
    │ │ │ │ -
    316 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    317 dstBuffer, dstDesc,
    │ │ │ │ -
    318 duBuffer, duDesc,
    │ │ │ │ -
    319 dvBuffer, dvDesc,
    │ │ │ │ -
    320 stencilTable);
    │ │ │ │ -
    321 } else {
    │ │ │ │ -
    322 // Create an instance on demand (slow)
    │ │ │ │ -
    323 (void)deviceContext; // unused
    │ │ │ │ -
    324 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
    │ │ │ │ -
    325 if (instance) {
    │ │ │ │ -
    326 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    327 dstBuffer, dstDesc,
    │ │ │ │ -
    328 duBuffer, duDesc,
    │ │ │ │ -
    329 dvBuffer, dvDesc,
    │ │ │ │ -
    330 stencilTable);
    │ │ │ │ -
    331 delete instance;
    │ │ │ │ -
    332 return r;
    │ │ │ │ -
    333 }
    │ │ │ │ -
    334 return false;
    │ │ │ │ -
    335 }
    │ │ │ │ -
    336 }
    │ │ │ │ -
    │ │ │ │ +
    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
    │ │ │ │ -
    395 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ -
    396 static bool EvalStencils(
    │ │ │ │ -
    397 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    398 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    399 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    400 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    401 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    402 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    403 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    404 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    405 GLXFBEvaluator const *instance,
    │ │ │ │ -
    406 void * deviceContext = NULL) {
    │ │ │ │ -
    407
    │ │ │ │ -
    408 if (instance) {
    │ │ │ │ -
    409 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    410 dstBuffer, dstDesc,
    │ │ │ │ -
    411 duBuffer, duDesc,
    │ │ │ │ -
    412 dvBuffer, dvDesc,
    │ │ │ │ -
    413 duuBuffer, duuDesc,
    │ │ │ │ -
    414 duvBuffer, duvDesc,
    │ │ │ │ -
    415 dvvBuffer, dvvDesc,
    │ │ │ │ -
    416 stencilTable);
    │ │ │ │ -
    417 } else {
    │ │ │ │ -
    418 // Create an instance on demand (slow)
    │ │ │ │ -
    419 (void)deviceContext; // unused
    │ │ │ │ -
    420 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    421 duDesc, dvDesc,
    │ │ │ │ -
    422 duuDesc, duvDesc, dvvDesc);
    │ │ │ │ -
    423 if (instance) {
    │ │ │ │ -
    424 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    425 dstBuffer, dstDesc,
    │ │ │ │ -
    426 duBuffer, duDesc,
    │ │ │ │ -
    427 dvBuffer, dvDesc,
    │ │ │ │ -
    428 duuBuffer, duuDesc,
    │ │ │ │ -
    429 duvBuffer, duvDesc,
    │ │ │ │ -
    430 dvvBuffer, dvvDesc,
    │ │ │ │ -
    431 stencilTable);
    │ │ │ │ -
    432 delete instance;
    │ │ │ │ -
    433 return r;
    │ │ │ │ -
    434 }
    │ │ │ │ -
    435 return false;
    │ │ │ │ -
    436 }
    │ │ │ │ -
    437 }
    │ │ │ │ -
    │ │ │ │ -
    438
    │ │ │ │ -
    456 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    458 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    459 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    460 STENCIL_TABLE const *stencilTable) const {
    │ │ │ │ -
    461
    │ │ │ │ -
    462 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    463 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    464 0, BufferDescriptor(),
    │ │ │ │ -
    465 0, BufferDescriptor(),
    │ │ │ │ -
    466 stencilTable->GetSizesTexture(),
    │ │ │ │ -
    467 stencilTable->GetOffsetsTexture(),
    │ │ │ │ -
    468 stencilTable->GetIndicesTexture(),
    │ │ │ │ -
    469 stencilTable->GetWeightsTexture(),
    │ │ │ │ -
    470 0,
    │ │ │ │ -
    471 0,
    │ │ │ │ -
    472 /* start = */ 0,
    │ │ │ │ -
    473 /* end = */ stencilTable->GetNumStencils());
    │ │ │ │ -
    474 }
    │ │ │ │ -
    │ │ │ │ -
    475
    │ │ │ │ -
    505 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    507 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    508 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    509 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    510 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    511 STENCIL_TABLE const *stencilTable) const {
    │ │ │ │ -
    512
    │ │ │ │ -
    513 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    514 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    515 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    516 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    517 stencilTable->GetSizesTexture(),
    │ │ │ │ -
    518 stencilTable->GetOffsetsTexture(),
    │ │ │ │ -
    519 stencilTable->GetIndicesTexture(),
    │ │ │ │ -
    520 stencilTable->GetWeightsTexture(),
    │ │ │ │ -
    521 stencilTable->GetDuWeightsTexture(),
    │ │ │ │ -
    522 stencilTable->GetDvWeightsTexture(),
    │ │ │ │ -
    523 /* start = */ 0,
    │ │ │ │ -
    524 /* end = */ stencilTable->GetNumStencils());
    │ │ │ │ -
    525 }
    │ │ │ │ -
    │ │ │ │ -
    526
    │ │ │ │ -
    574 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    576 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    577 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    578 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    579 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    580 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    581 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    582 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    583 STENCIL_TABLE const *stencilTable) const {
    │ │ │ │ -
    584
    │ │ │ │ -
    585 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    586 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    587 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    588 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    589 duuBuffer->BindVBO(), duuDesc,
    │ │ │ │ -
    590 duvBuffer->BindVBO(), duvDesc,
    │ │ │ │ -
    591 dvvBuffer->BindVBO(), dvvDesc,
    │ │ │ │ -
    592 stencilTable->GetSizesTexture(),
    │ │ │ │ -
    593 stencilTable->GetOffsetsTexture(),
    │ │ │ │ -
    594 stencilTable->GetIndicesTexture(),
    │ │ │ │ -
    595 stencilTable->GetWeightsTexture(),
    │ │ │ │ -
    596 stencilTable->GetDuWeightsTexture(),
    │ │ │ │ -
    597 stencilTable->GetDvWeightsTexture(),
    │ │ │ │ -
    598 stencilTable->GetDuuWeightsTexture(),
    │ │ │ │ -
    599 stencilTable->GetDuvWeightsTexture(),
    │ │ │ │ -
    600 stencilTable->GetDvvWeightsTexture(),
    │ │ │ │ -
    601 /* start = */ 0,
    │ │ │ │ -
    602 /* end = */ stencilTable->GetNumStencils());
    │ │ │ │ -
    603 }
    │ │ │ │ -
    │ │ │ │ -
    604
    │ │ │ │ -
    640 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    641 GLuint dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    642 GLuint duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    643 GLuint dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    644 GLuint sizesBuffer,
    │ │ │ │ -
    645 GLuint offsetsBuffer,
    │ │ │ │ -
    646 GLuint indicesBuffer,
    │ │ │ │ -
    647 GLuint weightsBuffer,
    │ │ │ │ -
    648 GLuint duWeightsBuffer,
    │ │ │ │ -
    649 GLuint dvWeightsBuffer,
    │ │ │ │ -
    650 int start,
    │ │ │ │ -
    651 int end) const;
    │ │ │ │ -
    652
    │ │ │ │ -
    706 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    707 GLuint dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    708 GLuint duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    709 GLuint dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    710 GLuint duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    711 GLuint duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    712 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    713 GLuint sizesBuffer,
    │ │ │ │ -
    714 GLuint offsetsBuffer,
    │ │ │ │ -
    715 GLuint indicesBuffer,
    │ │ │ │ -
    716 GLuint weightsBuffer,
    │ │ │ │ -
    717 GLuint duWeightsBuffer,
    │ │ │ │ -
    718 GLuint dvWeightsBuffer,
    │ │ │ │ -
    719 GLuint duuWeightsBuffer,
    │ │ │ │ -
    720 GLuint duvWeightsBuffer,
    │ │ │ │ -
    721 GLuint dvvWeightsBuffer,
    │ │ │ │ -
    722 int start,
    │ │ │ │ -
    723 int end) const;
    │ │ │ │ -
    724
    │ │ │ │ -
    730
    │ │ │ │ -
    763 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    764 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ -
    765 static bool EvalPatches(
    │ │ │ │ -
    766 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    767 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    768 int numPatchCoords,
    │ │ │ │ -
    769 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    770 PATCH_TABLE *patchTable,
    │ │ │ │ -
    771 GLXFBEvaluator const *instance,
    │ │ │ │ -
    772 void * deviceContext = NULL) {
    │ │ │ │ -
    773
    │ │ │ │ -
    774 if (instance) {
    │ │ │ │ -
    775 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    776 dstBuffer, dstDesc,
    │ │ │ │ -
    777 numPatchCoords, patchCoords,
    │ │ │ │ -
    778 patchTable);
    │ │ │ │ -
    779 } else {
    │ │ │ │ -
    780 // Create an instance on demand (slow)
    │ │ │ │ -
    781 (void)deviceContext; // unused
    │ │ │ │ -
    782 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    785 if (instance) {
    │ │ │ │ -
    786 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    787 dstBuffer, dstDesc,
    │ │ │ │ -
    788 numPatchCoords, patchCoords,
    │ │ │ │ -
    789 patchTable);
    │ │ │ │ -
    790 delete instance;
    │ │ │ │ -
    791 return r;
    │ │ │ │ -
    792 }
    │ │ │ │ -
    793 return false;
    │ │ │ │ -
    794 }
    │ │ │ │ -
    795 }
    │ │ │ │ -
    │ │ │ │ -
    796
    │ │ │ │ -
    841 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    842 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ -
    843 static bool EvalPatches(
    │ │ │ │ -
    844 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    845 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    846 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    847 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    848 int numPatchCoords,
    │ │ │ │ -
    849 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    850 PATCH_TABLE *patchTable,
    │ │ │ │ -
    851 GLXFBEvaluator const *instance,
    │ │ │ │ -
    852 void * deviceContext = NULL) {
    │ │ │ │ -
    853
    │ │ │ │ -
    854 if (instance) {
    │ │ │ │ -
    855 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    856 dstBuffer, dstDesc,
    │ │ │ │ -
    857 duBuffer, duDesc,
    │ │ │ │ -
    858 dvBuffer, dvDesc,
    │ │ │ │ -
    859 numPatchCoords, patchCoords,
    │ │ │ │ -
    860 patchTable);
    │ │ │ │ -
    861 } else {
    │ │ │ │ -
    862 // Create an instance on demand (slow)
    │ │ │ │ -
    863 (void)deviceContext; // unused
    │ │ │ │ -
    864 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
    │ │ │ │ -
    865 if (instance) {
    │ │ │ │ -
    866 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    867 dstBuffer, dstDesc,
    │ │ │ │ -
    868 duBuffer, duDesc,
    │ │ │ │ -
    869 dvBuffer, dvDesc,
    │ │ │ │ -
    870 numPatchCoords, patchCoords,
    │ │ │ │ -
    871 patchTable);
    │ │ │ │ -
    872 delete instance;
    │ │ │ │ -
    873 return r;
    │ │ │ │ -
    874 }
    │ │ │ │ -
    875 return false;
    │ │ │ │ -
    876 }
    │ │ │ │ -
    877 }
    │ │ │ │ +
    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 }
    │ │ │ │
    │ │ │ │ -
    878
    │ │ │ │ +
    916
    │ │ │ │
    941 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │
    942 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │
    │ │ │ │ -
    943 static bool EvalPatches(
    │ │ │ │ + │ │ │ │
    944 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │
    945 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    946 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    947 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    948 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    949 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    950 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    951 int numPatchCoords,
    │ │ │ │ -
    952 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    953 PATCH_TABLE *patchTable,
    │ │ │ │ -
    954 GLXFBEvaluator const *instance,
    │ │ │ │ -
    955 void * deviceContext = NULL) {
    │ │ │ │ -
    956
    │ │ │ │ -
    957 if (instance) {
    │ │ │ │ -
    958 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    959 dstBuffer, dstDesc,
    │ │ │ │ -
    960 duBuffer, duDesc,
    │ │ │ │ -
    961 dvBuffer, dvDesc,
    │ │ │ │ -
    962 duuBuffer, duuDesc,
    │ │ │ │ -
    963 duvBuffer, duvDesc,
    │ │ │ │ -
    964 dvvBuffer, dvvDesc,
    │ │ │ │ -
    965 numPatchCoords, patchCoords,
    │ │ │ │ -
    966 patchTable);
    │ │ │ │ -
    967 } else {
    │ │ │ │ -
    968 // Create an instance on demand (slow)
    │ │ │ │ -
    969 (void)deviceContext; // unused
    │ │ │ │ -
    970 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    971 duDesc, dvDesc,
    │ │ │ │ -
    972 duuDesc, duvDesc, dvvDesc);
    │ │ │ │ -
    973 if (instance) {
    │ │ │ │ -
    974 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    975 dstBuffer, dstDesc,
    │ │ │ │ -
    976 duBuffer, duDesc,
    │ │ │ │ -
    977 dvBuffer, dvDesc,
    │ │ │ │ -
    978 duuBuffer, duuDesc,
    │ │ │ │ -
    979 duvBuffer, duvDesc,
    │ │ │ │ -
    980 dvvBuffer, dvvDesc,
    │ │ │ │ -
    981 numPatchCoords, patchCoords,
    │ │ │ │ -
    982 patchTable);
    │ │ │ │ -
    983 delete instance;
    │ │ │ │ -
    984 return r;
    │ │ │ │ -
    985 }
    │ │ │ │ -
    986 return false;
    │ │ │ │ -
    987 }
    │ │ │ │ -
    988 }
    │ │ │ │ -
    │ │ │ │ -
    989
    │ │ │ │ -
    1014 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1015 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1017 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1018 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1019 int numPatchCoords,
    │ │ │ │ -
    1020 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1021 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1022
    │ │ │ │ -
    1023 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1024 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1025 0, BufferDescriptor(),
    │ │ │ │ -
    1026 0, BufferDescriptor(),
    │ │ │ │ -
    1027 numPatchCoords,
    │ │ │ │ -
    1028 patchCoords->BindVBO(),
    │ │ │ │ -
    1029 patchTable->GetPatchArrays(),
    │ │ │ │ -
    1030 patchTable->GetPatchIndexTextureBuffer(),
    │ │ │ │ -
    1031 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1032 }
    │ │ │ │ -
    │ │ │ │ -
    1033
    │ │ │ │ -
    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 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1074 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1075 int numPatchCoords,
    │ │ │ │ -
    1076 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1077 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1078
    │ │ │ │ -
    1079 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1080 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1081 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    1082 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    1083 numPatchCoords,
    │ │ │ │ -
    1084 patchCoords->BindVBO(),
    │ │ │ │ -
    1085 patchTable->GetPatchArrays(),
    │ │ │ │ -
    1086 patchTable->GetPatchIndexTextureBuffer(),
    │ │ │ │ -
    1087 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1088 }
    │ │ │ │ -
    │ │ │ │ -
    1089
    │ │ │ │ -
    1142 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1143 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1145 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1146 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1147 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1148 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1149 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1150 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1151 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1152 int numPatchCoords,
    │ │ │ │ -
    1153 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1154 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1155
    │ │ │ │ -
    1156 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1157 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1158 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    1159 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    1160 duuBuffer->BindVBO(), duuDesc,
    │ │ │ │ -
    1161 duvBuffer->BindVBO(), duvDesc,
    │ │ │ │ -
    1162 dvvBuffer->BindVBO(), dvvDesc,
    │ │ │ │ -
    1163 numPatchCoords,
    │ │ │ │ -
    1164 patchCoords->BindVBO(),
    │ │ │ │ -
    1165 patchTable->GetPatchArrays(),
    │ │ │ │ -
    1166 patchTable->GetPatchIndexTextureBuffer(),
    │ │ │ │ -
    1167 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1168 }
    │ │ │ │ -
    │ │ │ │ -
    1169
    │ │ │ │ -
    1170 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1171 GLuint dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1172 GLuint duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1173 GLuint dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1174 int numPatchCoords,
    │ │ │ │ -
    1175 GLuint patchCoordsBuffer,
    │ │ │ │ -
    1176 const PatchArrayVector &patchArrays,
    │ │ │ │ -
    1177 GLuint patchIndexBuffer,
    │ │ │ │ -
    1178 GLuint patchParamsBuffer) const;
    │ │ │ │ -
    1179
    │ │ │ │ -
    1180 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1181 GLuint dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1182 GLuint duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1183 GLuint dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1184 GLuint duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1185 GLuint duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1186 GLuint dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1187 int numPatchCoords,
    │ │ │ │ -
    1188 GLuint patchCoordsBuffer,
    │ │ │ │ -
    1189 const PatchArrayVector &patchArrays,
    │ │ │ │ -
    1190 GLuint patchIndexBuffer,
    │ │ │ │ -
    1191 GLuint patchParamsBuffer) const;
    │ │ │ │ -
    1192
    │ │ │ │ -
    1225 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1226 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1228 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1229 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1230 int numPatchCoords,
    │ │ │ │ -
    1231 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1232 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1233 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1234 void * deviceContext = NULL) {
    │ │ │ │ -
    1235
    │ │ │ │ -
    1236 if (instance) {
    │ │ │ │ -
    1237 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1238 srcBuffer, srcDesc,
    │ │ │ │ -
    1239 dstBuffer, dstDesc,
    │ │ │ │ -
    1240 numPatchCoords, patchCoords,
    │ │ │ │ -
    1241 patchTable);
    │ │ │ │ -
    1242 } else {
    │ │ │ │ -
    1243 // Create an instance on demand (slow)
    │ │ │ │ -
    1244 (void)deviceContext; // unused
    │ │ │ │ -
    1245 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    1248 if (instance) {
    │ │ │ │ -
    1249 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1250 srcBuffer, srcDesc,
    │ │ │ │ -
    1251 dstBuffer, dstDesc,
    │ │ │ │ -
    1252 numPatchCoords, patchCoords,
    │ │ │ │ -
    1253 patchTable);
    │ │ │ │ -
    1254 delete instance;
    │ │ │ │ -
    1255 return r;
    │ │ │ │ -
    1256 }
    │ │ │ │ -
    1257 return false;
    │ │ │ │ -
    1258 }
    │ │ │ │ -
    1259 }
    │ │ │ │ -
    │ │ │ │ -
    1260
    │ │ │ │ -
    1285 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1286 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1288 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1289 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1290 int numPatchCoords,
    │ │ │ │ -
    1291 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1292 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1293
    │ │ │ │ -
    1294 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1295 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1296 0, BufferDescriptor(),
    │ │ │ │ -
    1297 0, BufferDescriptor(),
    │ │ │ │ -
    1298 numPatchCoords,
    │ │ │ │ -
    1299 patchCoords->BindVBO(),
    │ │ │ │ -
    1300 patchTable->GetVaryingPatchArrays(),
    │ │ │ │ -
    1301 patchTable->GetVaryingPatchIndexTextureBuffer(),
    │ │ │ │ -
    1302 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1303 }
    │ │ │ │ -
    │ │ │ │ -
    1304
    │ │ │ │ -
    1349 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1350 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1352 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1353 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1354 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1355 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1356 int numPatchCoords,
    │ │ │ │ -
    1357 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1358 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1359 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1360 void * deviceContext = NULL) {
    │ │ │ │ -
    1361
    │ │ │ │ -
    1362 if (instance) {
    │ │ │ │ -
    1363 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1364 srcBuffer, srcDesc,
    │ │ │ │ -
    1365 dstBuffer, dstDesc,
    │ │ │ │ -
    1366 duBuffer, duDesc,
    │ │ │ │ -
    1367 dvBuffer, dvDesc,
    │ │ │ │ -
    1368 numPatchCoords, patchCoords,
    │ │ │ │ -
    1369 patchTable);
    │ │ │ │ -
    1370 } else {
    │ │ │ │ -
    1371 // Create an instance on demand (slow)
    │ │ │ │ -
    1372 (void)deviceContext; // unused
    │ │ │ │ -
    1373 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1374 duDesc, dvDesc);
    │ │ │ │ -
    1375 if (instance) {
    │ │ │ │ -
    1376 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1377 srcBuffer, srcDesc,
    │ │ │ │ -
    1378 dstBuffer, dstDesc,
    │ │ │ │ -
    1379 duBuffer, duDesc,
    │ │ │ │ -
    1380 dvBuffer, dvDesc,
    │ │ │ │ -
    1381 numPatchCoords, patchCoords,
    │ │ │ │ -
    1382 patchTable);
    │ │ │ │ -
    1383 delete instance;
    │ │ │ │ -
    1384 return r;
    │ │ │ │ -
    1385 }
    │ │ │ │ -
    1386 return false;
    │ │ │ │ -
    1387 }
    │ │ │ │ -
    1388 }
    │ │ │ │ -
    │ │ │ │ -
    1389
    │ │ │ │ -
    1426 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1427 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1429 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1430 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1431 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1432 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1433 int numPatchCoords,
    │ │ │ │ -
    1434 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1435 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1436
    │ │ │ │ -
    1437 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1438 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1439 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    1440 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    1441 numPatchCoords,
    │ │ │ │ -
    1442 patchCoords->BindVBO(),
    │ │ │ │ -
    1443 patchTable->GetVaryingPatchArrays(),
    │ │ │ │ -
    1444 patchTable->GetVaryingPatchIndexTextureBuffer(),
    │ │ │ │ -
    1445 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1446 }
    │ │ │ │ -
    │ │ │ │ -
    1447
    │ │ │ │ -
    1510 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1511 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1513 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1514 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1515 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1516 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1517 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1518 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1519 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1520 int numPatchCoords,
    │ │ │ │ -
    1521 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1522 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1523 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1524 void * deviceContext = NULL) {
    │ │ │ │ -
    1525
    │ │ │ │ -
    1526 if (instance) {
    │ │ │ │ -
    1527 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1528 srcBuffer, srcDesc,
    │ │ │ │ -
    1529 dstBuffer, dstDesc,
    │ │ │ │ -
    1530 duBuffer, duDesc,
    │ │ │ │ -
    1531 dvBuffer, dvDesc,
    │ │ │ │ -
    1532 duuBuffer, duuDesc,
    │ │ │ │ -
    1533 duvBuffer, duvDesc,
    │ │ │ │ -
    1534 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1535 numPatchCoords, patchCoords,
    │ │ │ │ -
    1536 patchTable);
    │ │ │ │ -
    1537 } else {
    │ │ │ │ -
    1538 // Create an instance on demand (slow)
    │ │ │ │ -
    1539 (void)deviceContext; // unused
    │ │ │ │ -
    1540 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1541 duDesc, dvDesc,
    │ │ │ │ -
    1542 duuDesc, duvDesc, dvvDesc);
    │ │ │ │ -
    1543 if (instance) {
    │ │ │ │ -
    1544 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1545 srcBuffer, srcDesc,
    │ │ │ │ -
    1546 dstBuffer, dstDesc,
    │ │ │ │ -
    1547 duBuffer, duDesc,
    │ │ │ │ -
    1548 dvBuffer, dvDesc,
    │ │ │ │ -
    1549 duuBuffer, duuDesc,
    │ │ │ │ -
    1550 duvBuffer, duvDesc,
    │ │ │ │ -
    1551 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1552 numPatchCoords, patchCoords,
    │ │ │ │ -
    1553 patchTable);
    │ │ │ │ -
    1554 delete instance;
    │ │ │ │ -
    1555 return r;
    │ │ │ │ -
    1556 }
    │ │ │ │ -
    1557 return false;
    │ │ │ │ -
    1558 }
    │ │ │ │ -
    1559 }
    │ │ │ │ -
    │ │ │ │ -
    1560
    │ │ │ │ -
    1615 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1616 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1618 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1619 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1620 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1621 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1622 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1623 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1624 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1625 int numPatchCoords,
    │ │ │ │ -
    1626 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1627 PATCH_TABLE *patchTable) const {
    │ │ │ │ -
    1628
    │ │ │ │ -
    1629 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1630 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1631 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    1632 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    1633 duuBuffer->BindVBO(), duuDesc,
    │ │ │ │ -
    1634 duvBuffer->BindVBO(), duvDesc,
    │ │ │ │ -
    1635 dvvBuffer->BindVBO(), dvvDesc,
    │ │ │ │ -
    1636 numPatchCoords,
    │ │ │ │ -
    1637 patchCoords->BindVBO(),
    │ │ │ │ -
    1638 patchTable->GetVaryingPatchArrays(),
    │ │ │ │ -
    1639 patchTable->GetVaryingPatchIndexTextureBuffer(),
    │ │ │ │ -
    1640 patchTable->GetPatchParamTextureBuffer());
    │ │ │ │ -
    1641 }
    │ │ │ │ -
    │ │ │ │ -
    1642
    │ │ │ │ -
    1677 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1678 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1680 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1681 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1682 int numPatchCoords,
    │ │ │ │ -
    1683 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1684 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1685 int fvarChannel,
    │ │ │ │ -
    1686 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1687 void * deviceContext = NULL) {
    │ │ │ │ -
    1688
    │ │ │ │ -
    1689 if (instance) {
    │ │ │ │ -
    1690 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    1691 srcBuffer, srcDesc,
    │ │ │ │ -
    1692 dstBuffer, dstDesc,
    │ │ │ │ -
    1693 numPatchCoords, patchCoords,
    │ │ │ │ -
    1694 patchTable, fvarChannel);
    │ │ │ │ -
    1695 } else {
    │ │ │ │ -
    1696 // Create an instance on demand (slow)
    │ │ │ │ -
    1697 (void)deviceContext; // unused
    │ │ │ │ -
    1698 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    1701 if (instance) {
    │ │ │ │ -
    1702 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    1703 srcBuffer, srcDesc,
    │ │ │ │ -
    1704 dstBuffer, dstDesc,
    │ │ │ │ -
    1705 numPatchCoords, patchCoords,
    │ │ │ │ -
    1706 patchTable, fvarChannel);
    │ │ │ │ -
    1707 delete instance;
    │ │ │ │ -
    1708 return r;
    │ │ │ │ -
    1709 }
    │ │ │ │ -
    1710 return false;
    │ │ │ │ -
    1711 }
    │ │ │ │ -
    1712 }
    │ │ │ │ -
    │ │ │ │ -
    1713
    │ │ │ │ -
    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 = 0) const {
    │ │ │ │ -
    1749
    │ │ │ │ -
    1750 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1751 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1752 0, BufferDescriptor(),
    │ │ │ │ -
    1753 0, BufferDescriptor(),
    │ │ │ │ -
    1754 numPatchCoords,
    │ │ │ │ -
    1755 patchCoords->BindVBO(),
    │ │ │ │ -
    1756 patchTable->GetFVarPatchArrays(fvarChannel),
    │ │ │ │ -
    1757 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
    │ │ │ │ -
    1758 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
    │ │ │ │ -
    1759 }
    │ │ │ │ -
    │ │ │ │ -
    1760
    │ │ │ │ -
    1807 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1808 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1810 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1811 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1812 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1813 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1814 int numPatchCoords,
    │ │ │ │ -
    1815 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1816 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1817 int fvarChannel,
    │ │ │ │ -
    1818 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1819 void * deviceContext = NULL) {
    │ │ │ │ -
    1820
    │ │ │ │ -
    1821 if (instance) {
    │ │ │ │ -
    1822 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    1823 srcBuffer, srcDesc,
    │ │ │ │ -
    1824 dstBuffer, dstDesc,
    │ │ │ │ -
    1825 duBuffer, duDesc,
    │ │ │ │ -
    1826 dvBuffer, dvDesc,
    │ │ │ │ -
    1827 numPatchCoords, patchCoords,
    │ │ │ │ -
    1828 patchTable, fvarChannel);
    │ │ │ │ -
    1829 } else {
    │ │ │ │ -
    1830 // Create an instance on demand (slow)
    │ │ │ │ -
    1831 (void)deviceContext; // unused
    │ │ │ │ -
    1832 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1833 duDesc, dvDesc);
    │ │ │ │ -
    1834 if (instance) {
    │ │ │ │ -
    1835 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    1836 srcBuffer, srcDesc,
    │ │ │ │ -
    1837 dstBuffer, dstDesc,
    │ │ │ │ -
    1838 duBuffer, duDesc,
    │ │ │ │ -
    1839 dvBuffer, dvDesc,
    │ │ │ │ -
    1840 numPatchCoords, patchCoords,
    │ │ │ │ -
    1841 patchTable, fvarChannel);
    │ │ │ │ -
    1842 delete instance;
    │ │ │ │ -
    1843 return r;
    │ │ │ │ -
    1844 }
    │ │ │ │ -
    1845 return false;
    │ │ │ │ -
    1846 }
    │ │ │ │ -
    1847 }
    │ │ │ │ -
    │ │ │ │ -
    1848
    │ │ │ │ -
    1887 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1888 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1890 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1891 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1892 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1893 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1894 int numPatchCoords,
    │ │ │ │ -
    1895 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1896 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1897 int fvarChannel = 0) const {
    │ │ │ │ -
    1898
    │ │ │ │ -
    1899 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    1900 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    1901 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    1902 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    1903 numPatchCoords,
    │ │ │ │ -
    1904 patchCoords->BindVBO(),
    │ │ │ │ -
    1905 patchTable->GetFVarPatchArrays(fvarChannel),
    │ │ │ │ -
    1906 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
    │ │ │ │ -
    1907 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
    │ │ │ │ -
    1908 }
    │ │ │ │ -
    │ │ │ │ -
    1909
    │ │ │ │ -
    1974 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1975 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1977 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1978 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1979 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1980 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1981 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1982 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1983 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1984 int numPatchCoords,
    │ │ │ │ -
    1985 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1986 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1987 int fvarChannel,
    │ │ │ │ -
    1988 GLXFBEvaluator const *instance,
    │ │ │ │ -
    1989 void * deviceContext = NULL) {
    │ │ │ │ -
    1990
    │ │ │ │ -
    1991 if (instance) {
    │ │ │ │ -
    1992 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    1993 srcBuffer, srcDesc,
    │ │ │ │ -
    1994 dstBuffer, dstDesc,
    │ │ │ │ -
    1995 duBuffer, duDesc,
    │ │ │ │ -
    1996 dvBuffer, dvDesc,
    │ │ │ │ -
    1997 duuBuffer, duuDesc,
    │ │ │ │ -
    1998 duvBuffer, duvDesc,
    │ │ │ │ -
    1999 dvvBuffer, dvvDesc,
    │ │ │ │ -
    2000 numPatchCoords, patchCoords,
    │ │ │ │ -
    2001 patchTable, fvarChannel);
    │ │ │ │ -
    2002 } else {
    │ │ │ │ -
    2003 // Create an instance on demand (slow)
    │ │ │ │ -
    2004 (void)deviceContext; // unused
    │ │ │ │ -
    2005 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    2006 duDesc, dvDesc,
    │ │ │ │ -
    2007 duuDesc, duvDesc, dvvDesc);
    │ │ │ │ -
    2008 if (instance) {
    │ │ │ │ -
    2009 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2010 srcBuffer, srcDesc,
    │ │ │ │ -
    2011 dstBuffer, dstDesc,
    │ │ │ │ -
    2012 duBuffer, duDesc,
    │ │ │ │ -
    2013 dvBuffer, dvDesc,
    │ │ │ │ -
    2014 duuBuffer, duuDesc,
    │ │ │ │ -
    2015 duvBuffer, duvDesc,
    │ │ │ │ -
    2016 dvvBuffer, dvvDesc,
    │ │ │ │ -
    2017 numPatchCoords, patchCoords,
    │ │ │ │ -
    2018 patchTable, fvarChannel);
    │ │ │ │ -
    2019 delete instance;
    │ │ │ │ -
    2020 return r;
    │ │ │ │ -
    2021 }
    │ │ │ │ -
    2022 return false;
    │ │ │ │ -
    2023 }
    │ │ │ │ -
    2024 }
    │ │ │ │ -
    │ │ │ │ -
    2025
    │ │ │ │ -
    2082 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2083 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2085 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2086 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2087 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    2088 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2089 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    2090 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    2091 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    2092 int numPatchCoords,
    │ │ │ │ -
    2093 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2094 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2095 int fvarChannel = 0) const {
    │ │ │ │ -
    2096
    │ │ │ │ -
    2097 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
    │ │ │ │ -
    2098 dstBuffer->BindVBO(), dstDesc,
    │ │ │ │ -
    2099 duBuffer->BindVBO(), duDesc,
    │ │ │ │ -
    2100 dvBuffer->BindVBO(), dvDesc,
    │ │ │ │ -
    2101 duuBuffer->BindVBO(), duuDesc,
    │ │ │ │ -
    2102 duvBuffer->BindVBO(), duvDesc,
    │ │ │ │ -
    2103 dvvBuffer->BindVBO(), dvvDesc,
    │ │ │ │ -
    2104 numPatchCoords,
    │ │ │ │ -
    2105 patchCoords->BindVBO(),
    │ │ │ │ -
    2106 patchTable->GetFVarPatchArrays(fvarChannel),
    │ │ │ │ -
    2107 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
    │ │ │ │ -
    2108 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
    │ │ │ │ -
    2109 }
    │ │ │ │ -
    │ │ │ │ -
    2110
    │ │ │ │ -
    2116
    │ │ │ │ -
    2119 bool Compile(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2120 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2121 BufferDescriptor const &duDesc = BufferDescriptor(),
    │ │ │ │ -
    2122 BufferDescriptor const &dvDesc = BufferDescriptor(),
    │ │ │ │ -
    2123 BufferDescriptor const &duuDesc = BufferDescriptor(),
    │ │ │ │ -
    2124 BufferDescriptor const &duvDesc = BufferDescriptor(),
    │ │ │ │ -
    2125 BufferDescriptor const &dvvDesc = BufferDescriptor());
    │ │ │ │ -
    2126
    │ │ │ │ -
    2128 static void Synchronize(void *kernel);
    │ │ │ │ -
    2129
    │ │ │ │ -
    2130private:
    │ │ │ │ -
    2131 GLuint _srcBufferTexture;
    │ │ │ │ -
    2132 GLuint _patchArraysUBO;
    │ │ │ │ -
    2133 bool _interleavedDerivativeBuffers;
    │ │ │ │ -
    2134
    │ │ │ │ -
    2135 struct _StencilKernel {
    │ │ │ │ -
    2136 _StencilKernel();
    │ │ │ │ -
    2137 ~_StencilKernel();
    │ │ │ │ -
    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 bool interleavedDerivativeBuffers);
    │ │ │ │ -
    2146 GLuint program;
    │ │ │ │ -
    2147 GLint uniformSrcBufferTexture;
    │ │ │ │ -
    2148 GLint uniformSrcOffset; // src buffer offset (in elements)
    │ │ │ │ -
    2149
    │ │ │ │ -
    2150 GLint uniformSizesTexture;
    │ │ │ │ -
    2151 GLint uniformOffsetsTexture;
    │ │ │ │ -
    2152 GLint uniformIndicesTexture;
    │ │ │ │ -
    2153 GLint uniformWeightsTexture;
    │ │ │ │ -
    2154 GLint uniformDuWeightsTexture;
    │ │ │ │ -
    2155 GLint uniformDvWeightsTexture;
    │ │ │ │ -
    2156 GLint uniformDuuWeightsTexture;
    │ │ │ │ -
    2157 GLint uniformDuvWeightsTexture;
    │ │ │ │ -
    2158 GLint uniformDvvWeightsTexture;
    │ │ │ │ -
    2159 GLint uniformStart; // range
    │ │ │ │ -
    2160 GLint uniformEnd;
    │ │ │ │ -
    2161 } _stencilKernel;
    │ │ │ │ -
    2162
    │ │ │ │ -
    2163 struct _PatchKernel {
    │ │ │ │ -
    2164 _PatchKernel();
    │ │ │ │ -
    2165 ~_PatchKernel();
    │ │ │ │ -
    2166 bool Compile(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2167 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2168 BufferDescriptor const &duDesc,
    │ │ │ │ -
    2169 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2170 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    2171 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    2172 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    2173 bool interleavedDerivativeBuffers);
    │ │ │ │ -
    2174 GLuint program;
    │ │ │ │ -
    2175 GLint uniformSrcBufferTexture;
    │ │ │ │ -
    2176 GLint uniformSrcOffset; // src buffer offset (in elements)
    │ │ │ │ -
    2177
    │ │ │ │ -
    2178 GLint uniformPatchArraysUBOBinding;
    │ │ │ │ -
    2179 GLint uniformPatchParamTexture;
    │ │ │ │ -
    2180 GLint uniformPatchIndexTexture;
    │ │ │ │ -
    2181 } _patchKernel;
    │ │ │ │ -
    2182
    │ │ │ │ -
    2183};
    │ │ │ │ -
    │ │ │ │ -
    2184
    │ │ │ │ -
    2185} // end namespace Osd
    │ │ │ │ -
    2186
    │ │ │ │ -
    2187} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    2188using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    2189
    │ │ │ │ -
    2190} // end namespace OpenSubdiv
    │ │ │ │ -
    2191
    │ │ │ │ -
    2192
    │ │ │ │ -
    2193#endif // OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
    │ │ │ │ - │ │ │ │ +
    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....
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static GLStencilTableTBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    GLStencilTableTBO(Far::StencilTable const *stencilTable)
    │ │ │ │ -
    GLStencilTableTBO(Far::LimitStencilTable const *limitStencilTable)
    │ │ │ │ - │ │ │ │ -
    static GLStencilTableTBO * Create(Far::LimitStencilTable const *limitStencilTable, 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 GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, bool interleavedDerivativeBuffers=false)
    │ │ │ │ -
    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.
    │ │ │ │ -
    GLXFBEvaluator(bool interleavedDerivativeBuffers=false)
    Constructor.
    │ │ │ │ -
    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.
    │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ -
    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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic static stencil function. This function has a same signature as other device kernels have so t...
    │ │ │ │ -
    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 GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, bool interleavedDerivativeBuffers=false)
    │ │ │ │ -
    static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext)
    Specialization to allow creation without a device context.
    │ │ │ │ -
    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, GLXFBEvaluator 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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    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 XFB kernel on 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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT deviceContext)
    Generic creator template.
    │ │ │ │ -
    static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, DEVICE_CONTEXT deviceContext)
    Generic creator template.
    │ │ │ │ -
    static void Synchronize(void *kernel)
    Wait the dispatched kernel finishes.
    │ │ │ │ -
    static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator 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 ...
    │ │ │ │ -
    static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator 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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    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 ...
    │ │ │ │ -
    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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    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...
    │ │ │ │ -
    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
    │ │ │ │ -
    static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void *deviceContext)
    Specialization to allow creation without a device context.
    │ │ │ │ -
    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 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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    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 XFB kernel on 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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLXFBEvaluator 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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic static stencil function. This function has a same signature as other device kernels have so t...
    │ │ │ │ -
    ~GLXFBEvaluator()
    Destructor. note that the GL context must be made current.
    │ │ │ │ -
    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 ...
    │ │ │ │ -
    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 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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ +
    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,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glXFBEvaluator.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 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,16 +24,16 @@ │ │ │ │ │ 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_XFB_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_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/opengl.h" │ │ │ │ │ 31#include "../osd/types.h" │ │ │ │ │ 32#include "../osd/bufferDescriptor.h" │ │ │ │ │ 33 │ │ │ │ │ @@ -44,1055 +44,993 @@ │ │ │ │ │ 38 class PatchTable; │ │ │ │ │ 39 class StencilTable; │ │ │ │ │ 40 class LimitStencilTable; │ │ │ │ │ 41} │ │ │ │ │ 42 │ │ │ │ │ 43namespace Osd { │ │ │ │ │ 44 │ │ │ │ │ -_5_2class _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O { │ │ │ │ │ -53public: │ │ │ │ │ -_5_4 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O *_C_r_e_a_t_e( │ │ │ │ │ -55 _F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable, void *deviceContext = NULL) { │ │ │ │ │ -56 (void)deviceContext; // unused │ │ │ │ │ -57 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O(stencilTable); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -_6_0 static _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O *_C_r_e_a_t_e( │ │ │ │ │ -61 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable, │ │ │ │ │ -62 void *deviceContext = NULL) { │ │ │ │ │ -63 (void)deviceContext; // unused │ │ │ │ │ -64 return new _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O(limitStencilTable); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_7 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O(_F_a_r_:_:_S_t_e_n_c_i_l_T_a_b_l_e const *stencilTable); │ │ │ │ │ -_6_8 explicit _G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_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_9 _~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O(); │ │ │ │ │ -70 │ │ │ │ │ -71 // interfaces needed for GLSLTransformFeedbackKernel │ │ │ │ │ -_7_2 GLuint _G_e_t_S_i_z_e_s_T_e_x_t_u_r_e() const { return _sizes; } │ │ │ │ │ -_7_3 GLuint _G_e_t_O_f_f_s_e_t_s_T_e_x_t_u_r_e() const { return _offsets; } │ │ │ │ │ -_7_4 GLuint _G_e_t_I_n_d_i_c_e_s_T_e_x_t_u_r_e() const { return _indices; } │ │ │ │ │ -_7_5 GLuint _G_e_t_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _weights; } │ │ │ │ │ -_7_6 GLuint _G_e_t_D_u_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _duWeights; } │ │ │ │ │ -_7_7 GLuint _G_e_t_D_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _dvWeights; } │ │ │ │ │ -_7_8 GLuint _G_e_t_D_u_u_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _duuWeights; } │ │ │ │ │ -_7_9 GLuint _G_e_t_D_u_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _duvWeights; } │ │ │ │ │ -_8_0 GLuint _G_e_t_D_v_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e() const { return _dvvWeights; } │ │ │ │ │ -_8_1 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ -82 │ │ │ │ │ -83private: │ │ │ │ │ -84 GLuint _sizes; │ │ │ │ │ -85 GLuint _offsets; │ │ │ │ │ -86 GLuint _indices; │ │ │ │ │ -87 GLuint _weights; │ │ │ │ │ -88 GLuint _duWeights; │ │ │ │ │ -89 GLuint _dvWeights; │ │ │ │ │ -90 GLuint _duuWeights; │ │ │ │ │ -91 GLuint _duvWeights; │ │ │ │ │ -92 GLuint _dvvWeights; │ │ │ │ │ -93 int _numStencils; │ │ │ │ │ -94}; │ │ │ │ │ -95 │ │ │ │ │ -96// -------------------------------------------------------------------------- │ │ │ │ │ +_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// -------------------------------------------------------------------------- │ │ │ │ │ - │ │ │ │ │ -97 │ │ │ │ │ -_9_8class _G_L_X_F_B_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -99public: │ │ │ │ │ -_1_0_0 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ -101 │ │ │ │ │ -103 template │ │ │ │ │ -_1_0_4 static _G_L_X_F_B_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, │ │ │ │ │ -105 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -106 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -108 DEVICE_CONTEXT deviceContext) { │ │ │ │ │ -109 bool interleavedDerivativeBuffers = deviceContext │ │ │ │ │ -110 ? deviceContext->AreInterleavedDerivativeBuffers() │ │ │ │ │ -111 : false; │ │ │ │ │ -112 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -113 interleavedDerivativeBuffers); │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_7 static _G_L_X_F_B_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, │ │ │ │ │ -118 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -119 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -120 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -121 void * deviceContext) { │ │ │ │ │ -122 (void)deviceContext; // not used │ │ │ │ │ -123 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc); │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_6 static _G_L_X_F_B_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, │ │ │ │ │ -127 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -128 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -129 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -130 bool interleavedDerivativeBuffers = false) { │ │ │ │ │ -131 _G_L_X_F_B_E_v_a_l_u_a_t_o_r *instance = new _G_L_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ -(interleavedDerivativeBuffers); │ │ │ │ │ -132 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc)) │ │ │ │ │ -133 return instance; │ │ │ │ │ -134 delete instance; │ │ │ │ │ -135 return NULL; │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -139 template │ │ │ │ │ -_1_4_0 static _G_L_X_F_B_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, │ │ │ │ │ -141 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -142 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -143 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -144 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -145 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -146 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -147 DEVICE_CONTEXT deviceContext) { │ │ │ │ │ -148 bool interleavedDerivativeBuffers = deviceContext │ │ │ │ │ -149 ? deviceContext->AreInterleavedDerivativeBuffers() │ │ │ │ │ -150 : false; │ │ │ │ │ -151 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -152 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -153 interleavedDerivativeBuffers); │ │ │ │ │ -154 } │ │ │ │ │ -155 │ │ │ │ │ -_1_5_7 static _G_L_X_F_B_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, │ │ │ │ │ -158 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -159 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -160 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -161 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -162 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -163 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -164 void * deviceContext) { │ │ │ │ │ -165 (void)deviceContext; // not used │ │ │ │ │ -166 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -167 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -_1_7_0 static _G_L_X_F_B_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, │ │ │ │ │ -171 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -172 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -173 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -174 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -175 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -176 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -177 bool interleavedDerivativeBuffers = false) { │ │ │ │ │ -178 _G_L_X_F_B_E_v_a_l_u_a_t_o_r *instance = new _G_L_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ -(interleavedDerivativeBuffers); │ │ │ │ │ -179 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -180 duuDesc, duvDesc, dvvDesc)) │ │ │ │ │ -181 return instance; │ │ │ │ │ -182 delete instance; │ │ │ │ │ -183 return NULL; │ │ │ │ │ -184 } │ │ │ │ │ -185 │ │ │ │ │ -_1_9_9 _G_L_X_F_B_E_v_a_l_u_a_t_o_r(bool interleavedDerivativeBuffers = false); │ │ │ │ │ -200 │ │ │ │ │ -_2_0_2 _~_G_L_X_F_B_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ -203 │ │ │ │ │ -209 │ │ │ │ │ -237 template │ │ │ │ │ -_2_3_8 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -239 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -240 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ +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 stencilTable); │ │ │ │ │ -249 } else { │ │ │ │ │ -250 // Create an instance on demand (slow) │ │ │ │ │ -251 (void)deviceContext; // unused │ │ │ │ │ -252 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -253 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -254 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ +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 stencilTable); │ │ │ │ │ -259 delete instance; │ │ │ │ │ -260 return r; │ │ │ │ │ -261 } │ │ │ │ │ -262 return false; │ │ │ │ │ +258 duBuffer, duDesc, │ │ │ │ │ +259 dvBuffer, dvDesc, │ │ │ │ │ +260 stencilTable); │ │ │ │ │ +261 delete instance; │ │ │ │ │ +262 return r; │ │ │ │ │ 263 } │ │ │ │ │ -264 } │ │ │ │ │ -265 │ │ │ │ │ -305 template │ │ │ │ │ -_3_0_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -307 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -308 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -309 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -310 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -311 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -312 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -313 void * deviceContext = NULL) { │ │ │ │ │ -314 │ │ │ │ │ -315 if (instance) { │ │ │ │ │ -316 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -317 dstBuffer, dstDesc, │ │ │ │ │ -318 duBuffer, duDesc, │ │ │ │ │ -319 dvBuffer, dvDesc, │ │ │ │ │ -320 stencilTable); │ │ │ │ │ -321 } else { │ │ │ │ │ -322 // Create an instance on demand (slow) │ │ │ │ │ -323 (void)deviceContext; // unused │ │ │ │ │ -324 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc); │ │ │ │ │ -325 if (instance) { │ │ │ │ │ -326 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -327 dstBuffer, dstDesc, │ │ │ │ │ -328 duBuffer, duDesc, │ │ │ │ │ -329 dvBuffer, dvDesc, │ │ │ │ │ -330 stencilTable); │ │ │ │ │ -331 delete instance; │ │ │ │ │ -332 return r; │ │ │ │ │ -333 } │ │ │ │ │ -334 return false; │ │ │ │ │ -335 } │ │ │ │ │ -336 } │ │ │ │ │ +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 │ │ │ │ │ -395 template │ │ │ │ │ -_3_9_6 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -397 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -398 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -399 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -400 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -401 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -402 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -403 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -404 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -405 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -406 void * deviceContext = NULL) { │ │ │ │ │ -407 │ │ │ │ │ -408 if (instance) { │ │ │ │ │ -409 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -410 dstBuffer, dstDesc, │ │ │ │ │ -411 duBuffer, duDesc, │ │ │ │ │ -412 dvBuffer, dvDesc, │ │ │ │ │ -413 duuBuffer, duuDesc, │ │ │ │ │ -414 duvBuffer, duvDesc, │ │ │ │ │ -415 dvvBuffer, dvvDesc, │ │ │ │ │ -416 stencilTable); │ │ │ │ │ -417 } else { │ │ │ │ │ -418 // Create an instance on demand (slow) │ │ │ │ │ -419 (void)deviceContext; // unused │ │ │ │ │ -420 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -421 duDesc, dvDesc, │ │ │ │ │ -422 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -423 if (instance) { │ │ │ │ │ -424 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -425 dstBuffer, dstDesc, │ │ │ │ │ -426 duBuffer, duDesc, │ │ │ │ │ -427 dvBuffer, dvDesc, │ │ │ │ │ -428 duuBuffer, duuDesc, │ │ │ │ │ -429 duvBuffer, duvDesc, │ │ │ │ │ -430 dvvBuffer, dvvDesc, │ │ │ │ │ -431 stencilTable); │ │ │ │ │ -432 delete instance; │ │ │ │ │ -433 return r; │ │ │ │ │ -434 } │ │ │ │ │ -435 return false; │ │ │ │ │ -436 } │ │ │ │ │ -437 } │ │ │ │ │ -438 │ │ │ │ │ -456 template │ │ │ │ │ -_4_5_7 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -458 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -459 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -460 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -461 │ │ │ │ │ -462 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -463 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -464 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -465 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -466 stencilTable->GetSizesTexture(), │ │ │ │ │ -467 stencilTable->GetOffsetsTexture(), │ │ │ │ │ -468 stencilTable->GetIndicesTexture(), │ │ │ │ │ -469 stencilTable->GetWeightsTexture(), │ │ │ │ │ -470 0, │ │ │ │ │ -471 0, │ │ │ │ │ -472 /* start = */ 0, │ │ │ │ │ -473 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -474 } │ │ │ │ │ -475 │ │ │ │ │ -505 template │ │ │ │ │ -_5_0_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -507 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -508 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -509 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -510 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -511 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -512 │ │ │ │ │ -513 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -514 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -515 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -516 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -517 stencilTable->GetSizesTexture(), │ │ │ │ │ -518 stencilTable->GetOffsetsTexture(), │ │ │ │ │ -519 stencilTable->GetIndicesTexture(), │ │ │ │ │ -520 stencilTable->GetWeightsTexture(), │ │ │ │ │ -521 stencilTable->GetDuWeightsTexture(), │ │ │ │ │ -522 stencilTable->GetDvWeightsTexture(), │ │ │ │ │ -523 /* start = */ 0, │ │ │ │ │ -524 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -525 } │ │ │ │ │ -526 │ │ │ │ │ -574 template │ │ │ │ │ -_5_7_5 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -576 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -577 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -578 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -579 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -580 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -581 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -582 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -583 STENCIL_TABLE const *stencilTable) const { │ │ │ │ │ -584 │ │ │ │ │ -585 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -586 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -587 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -588 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -589 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -590 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -591 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -592 stencilTable->GetSizesTexture(), │ │ │ │ │ -593 stencilTable->GetOffsetsTexture(), │ │ │ │ │ -594 stencilTable->GetIndicesTexture(), │ │ │ │ │ -595 stencilTable->GetWeightsTexture(), │ │ │ │ │ -596 stencilTable->GetDuWeightsTexture(), │ │ │ │ │ -597 stencilTable->GetDvWeightsTexture(), │ │ │ │ │ -598 stencilTable->GetDuuWeightsTexture(), │ │ │ │ │ -599 stencilTable->GetDuvWeightsTexture(), │ │ │ │ │ -600 stencilTable->GetDvvWeightsTexture(), │ │ │ │ │ -601 /* start = */ 0, │ │ │ │ │ -602 /* end = */ stencilTable->GetNumStencils()); │ │ │ │ │ -603 } │ │ │ │ │ -604 │ │ │ │ │ -_6_4_0 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, │ │ │ │ │ -641 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -642 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -643 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -644 GLuint sizesBuffer, │ │ │ │ │ -645 GLuint offsetsBuffer, │ │ │ │ │ -646 GLuint indicesBuffer, │ │ │ │ │ -647 GLuint weightsBuffer, │ │ │ │ │ -648 GLuint duWeightsBuffer, │ │ │ │ │ -649 GLuint dvWeightsBuffer, │ │ │ │ │ -650 int start, │ │ │ │ │ -651 int end) const; │ │ │ │ │ -652 │ │ │ │ │ -_7_0_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, │ │ │ │ │ -707 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -708 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -709 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -710 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -711 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -712 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -713 GLuint sizesBuffer, │ │ │ │ │ -714 GLuint offsetsBuffer, │ │ │ │ │ -715 GLuint indicesBuffer, │ │ │ │ │ -716 GLuint weightsBuffer, │ │ │ │ │ -717 GLuint duWeightsBuffer, │ │ │ │ │ -718 GLuint dvWeightsBuffer, │ │ │ │ │ -719 GLuint duuWeightsBuffer, │ │ │ │ │ -720 GLuint duvWeightsBuffer, │ │ │ │ │ -721 GLuint dvvWeightsBuffer, │ │ │ │ │ -722 int start, │ │ │ │ │ -723 int end) const; │ │ │ │ │ -724 │ │ │ │ │ -730 │ │ │ │ │ -763 template │ │ │ │ │ -_7_6_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -766 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -767 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -768 int numPatchCoords, │ │ │ │ │ -769 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -770 PATCH_TABLE *patchTable, │ │ │ │ │ -771 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -772 void * deviceContext = NULL) { │ │ │ │ │ -773 │ │ │ │ │ -774 if (instance) { │ │ │ │ │ -775 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -776 dstBuffer, dstDesc, │ │ │ │ │ -777 numPatchCoords, patchCoords, │ │ │ │ │ -778 patchTable); │ │ │ │ │ -779 } else { │ │ │ │ │ -780 // Create an instance on demand (slow) │ │ │ │ │ -781 (void)deviceContext; // unused │ │ │ │ │ -782 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -783 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -784 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -785 if (instance) { │ │ │ │ │ -786 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -787 dstBuffer, dstDesc, │ │ │ │ │ -788 numPatchCoords, patchCoords, │ │ │ │ │ -789 patchTable); │ │ │ │ │ -790 delete instance; │ │ │ │ │ -791 return r; │ │ │ │ │ -792 } │ │ │ │ │ -793 return false; │ │ │ │ │ -794 } │ │ │ │ │ -795 } │ │ │ │ │ -796 │ │ │ │ │ -841 template │ │ │ │ │ -_8_4_3 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -844 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -845 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -846 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -847 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -848 int numPatchCoords, │ │ │ │ │ -849 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -850 PATCH_TABLE *patchTable, │ │ │ │ │ -851 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -852 void * deviceContext = NULL) { │ │ │ │ │ -853 │ │ │ │ │ -854 if (instance) { │ │ │ │ │ -855 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -856 dstBuffer, dstDesc, │ │ │ │ │ -857 duBuffer, duDesc, │ │ │ │ │ -858 dvBuffer, dvDesc, │ │ │ │ │ -859 numPatchCoords, patchCoords, │ │ │ │ │ -860 patchTable); │ │ │ │ │ -861 } else { │ │ │ │ │ -862 // Create an instance on demand (slow) │ │ │ │ │ -863 (void)deviceContext; // unused │ │ │ │ │ -864 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc); │ │ │ │ │ -865 if (instance) { │ │ │ │ │ -866 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -867 dstBuffer, dstDesc, │ │ │ │ │ -868 duBuffer, duDesc, │ │ │ │ │ -869 dvBuffer, dvDesc, │ │ │ │ │ -870 numPatchCoords, patchCoords, │ │ │ │ │ -871 patchTable); │ │ │ │ │ -872 delete instance; │ │ │ │ │ -873 return r; │ │ │ │ │ -874 } │ │ │ │ │ -875 return false; │ │ │ │ │ -876 } │ │ │ │ │ -877 } │ │ │ │ │ -878 │ │ │ │ │ +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 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ +_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 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -947 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -948 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -949 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -950 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -951 int numPatchCoords, │ │ │ │ │ -952 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -953 PATCH_TABLE *patchTable, │ │ │ │ │ -954 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -955 void * deviceContext = NULL) { │ │ │ │ │ -956 │ │ │ │ │ -957 if (instance) { │ │ │ │ │ -958 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -959 dstBuffer, dstDesc, │ │ │ │ │ -960 duBuffer, duDesc, │ │ │ │ │ -961 dvBuffer, dvDesc, │ │ │ │ │ -962 duuBuffer, duuDesc, │ │ │ │ │ -963 duvBuffer, duvDesc, │ │ │ │ │ -964 dvvBuffer, dvvDesc, │ │ │ │ │ -965 numPatchCoords, patchCoords, │ │ │ │ │ -966 patchTable); │ │ │ │ │ -967 } else { │ │ │ │ │ -968 // Create an instance on demand (slow) │ │ │ │ │ -969 (void)deviceContext; // unused │ │ │ │ │ -970 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -971 duDesc, dvDesc, │ │ │ │ │ -972 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -973 if (instance) { │ │ │ │ │ -974 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -975 dstBuffer, dstDesc, │ │ │ │ │ -976 duBuffer, duDesc, │ │ │ │ │ -977 dvBuffer, dvDesc, │ │ │ │ │ -978 duuBuffer, duuDesc, │ │ │ │ │ -979 duvBuffer, duvDesc, │ │ │ │ │ -980 dvvBuffer, dvvDesc, │ │ │ │ │ -981 numPatchCoords, patchCoords, │ │ │ │ │ -982 patchTable); │ │ │ │ │ -983 delete instance; │ │ │ │ │ -984 return r; │ │ │ │ │ -985 } │ │ │ │ │ -986 return false; │ │ │ │ │ -987 } │ │ │ │ │ -988 } │ │ │ │ │ -989 │ │ │ │ │ -1014 template │ │ │ │ │ -_1_0_1_6 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1017 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1018 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1019 int numPatchCoords, │ │ │ │ │ -1020 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1021 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1022 │ │ │ │ │ -1023 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1024 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1025 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1026 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1027 numPatchCoords, │ │ │ │ │ -1028 patchCoords->BindVBO(), │ │ │ │ │ -1029 patchTable->GetPatchArrays(), │ │ │ │ │ -1030 patchTable->GetPatchIndexTextureBuffer(), │ │ │ │ │ -1031 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1032 } │ │ │ │ │ -1033 │ │ │ │ │ -1068 template │ │ │ │ │ -_1_0_7_0 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -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 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1074 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1075 int numPatchCoords, │ │ │ │ │ -1076 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1077 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1078 │ │ │ │ │ -1079 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1080 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1081 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1082 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1083 numPatchCoords, │ │ │ │ │ -1084 patchCoords->BindVBO(), │ │ │ │ │ -1085 patchTable->GetPatchArrays(), │ │ │ │ │ -1086 patchTable->GetPatchIndexTextureBuffer(), │ │ │ │ │ -1087 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1088 } │ │ │ │ │ -1089 │ │ │ │ │ -1142 template │ │ │ │ │ -_1_1_4_4 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1145 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1146 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1147 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1148 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1149 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1150 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1151 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1152 int numPatchCoords, │ │ │ │ │ -1153 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1154 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1155 │ │ │ │ │ -1156 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1157 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1158 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1159 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1160 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -1161 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -1162 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -1163 numPatchCoords, │ │ │ │ │ -1164 patchCoords->BindVBO(), │ │ │ │ │ -1165 patchTable->GetPatchArrays(), │ │ │ │ │ -1166 patchTable->GetPatchIndexTextureBuffer(), │ │ │ │ │ -1167 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1168 } │ │ │ │ │ -1169 │ │ │ │ │ -_1_1_7_0 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, │ │ │ │ │ -1171 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1172 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1173 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1174 int numPatchCoords, │ │ │ │ │ -1175 GLuint patchCoordsBuffer, │ │ │ │ │ -1176 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1177 GLuint patchIndexBuffer, │ │ │ │ │ -1178 GLuint patchParamsBuffer) const; │ │ │ │ │ -1179 │ │ │ │ │ -_1_1_8_0 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, │ │ │ │ │ -1181 GLuint dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1182 GLuint duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1183 GLuint dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1184 GLuint duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1185 GLuint duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1186 GLuint dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1187 int numPatchCoords, │ │ │ │ │ -1188 GLuint patchCoordsBuffer, │ │ │ │ │ -1189 const _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r &patchArrays, │ │ │ │ │ -1190 GLuint patchIndexBuffer, │ │ │ │ │ -1191 GLuint patchParamsBuffer) const; │ │ │ │ │ -1192 │ │ │ │ │ -1225 template │ │ │ │ │ -_1_2_2_7 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1228 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1229 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1230 int numPatchCoords, │ │ │ │ │ -1231 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1232 PATCH_TABLE *patchTable, │ │ │ │ │ -1233 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1234 void * deviceContext = NULL) { │ │ │ │ │ -1235 │ │ │ │ │ -1236 if (instance) { │ │ │ │ │ -1237 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1238 srcBuffer, srcDesc, │ │ │ │ │ -1239 dstBuffer, dstDesc, │ │ │ │ │ -1240 numPatchCoords, patchCoords, │ │ │ │ │ -1241 patchTable); │ │ │ │ │ -1242 } else { │ │ │ │ │ -1243 // Create an instance on demand (slow) │ │ │ │ │ -1244 (void)deviceContext; // unused │ │ │ │ │ -1245 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1246 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1247 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -1248 if (instance) { │ │ │ │ │ -1249 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1250 srcBuffer, srcDesc, │ │ │ │ │ -1251 dstBuffer, dstDesc, │ │ │ │ │ -1252 numPatchCoords, patchCoords, │ │ │ │ │ -1253 patchTable); │ │ │ │ │ -1254 delete instance; │ │ │ │ │ -1255 return r; │ │ │ │ │ -1256 } │ │ │ │ │ -1257 return false; │ │ │ │ │ -1258 } │ │ │ │ │ -1259 } │ │ │ │ │ -1260 │ │ │ │ │ -1285 template │ │ │ │ │ -_1_2_8_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1288 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1289 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1290 int numPatchCoords, │ │ │ │ │ -1291 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1292 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1293 │ │ │ │ │ -1294 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1295 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1296 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1297 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1298 numPatchCoords, │ │ │ │ │ -1299 patchCoords->BindVBO(), │ │ │ │ │ -1300 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1301 patchTable->GetVaryingPatchIndexTextureBuffer(), │ │ │ │ │ -1302 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1303 } │ │ │ │ │ -1304 │ │ │ │ │ -1349 template │ │ │ │ │ -_1_3_5_1 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1352 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1353 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1354 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1355 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1356 int numPatchCoords, │ │ │ │ │ -1357 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1358 PATCH_TABLE *patchTable, │ │ │ │ │ -1359 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1360 void * deviceContext = NULL) { │ │ │ │ │ -1361 │ │ │ │ │ -1362 if (instance) { │ │ │ │ │ -1363 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1364 srcBuffer, srcDesc, │ │ │ │ │ -1365 dstBuffer, dstDesc, │ │ │ │ │ -1366 duBuffer, duDesc, │ │ │ │ │ -1367 dvBuffer, dvDesc, │ │ │ │ │ -1368 numPatchCoords, patchCoords, │ │ │ │ │ -1369 patchTable); │ │ │ │ │ -1370 } else { │ │ │ │ │ -1371 // Create an instance on demand (slow) │ │ │ │ │ -1372 (void)deviceContext; // unused │ │ │ │ │ -1373 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1374 duDesc, dvDesc); │ │ │ │ │ -1375 if (instance) { │ │ │ │ │ -1376 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1377 srcBuffer, srcDesc, │ │ │ │ │ -1378 dstBuffer, dstDesc, │ │ │ │ │ -1379 duBuffer, duDesc, │ │ │ │ │ -1380 dvBuffer, dvDesc, │ │ │ │ │ -1381 numPatchCoords, patchCoords, │ │ │ │ │ -1382 patchTable); │ │ │ │ │ -1383 delete instance; │ │ │ │ │ -1384 return r; │ │ │ │ │ -1385 } │ │ │ │ │ -1386 return false; │ │ │ │ │ -1387 } │ │ │ │ │ -1388 } │ │ │ │ │ -1389 │ │ │ │ │ -1426 template │ │ │ │ │ -_1_4_2_8 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1429 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1430 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1431 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1432 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1433 int numPatchCoords, │ │ │ │ │ -1434 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1435 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1436 │ │ │ │ │ -1437 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1438 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1439 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1440 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1441 numPatchCoords, │ │ │ │ │ -1442 patchCoords->BindVBO(), │ │ │ │ │ -1443 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1444 patchTable->GetVaryingPatchIndexTextureBuffer(), │ │ │ │ │ -1445 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1446 } │ │ │ │ │ -1447 │ │ │ │ │ -1510 template │ │ │ │ │ -_1_5_1_2 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1513 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1514 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1515 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1516 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1517 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1518 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1519 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1520 int numPatchCoords, │ │ │ │ │ -1521 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1522 PATCH_TABLE *patchTable, │ │ │ │ │ -1523 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1524 void * deviceContext = NULL) { │ │ │ │ │ -1525 │ │ │ │ │ -1526 if (instance) { │ │ │ │ │ -1527 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1528 srcBuffer, srcDesc, │ │ │ │ │ -1529 dstBuffer, dstDesc, │ │ │ │ │ -1530 duBuffer, duDesc, │ │ │ │ │ -1531 dvBuffer, dvDesc, │ │ │ │ │ -1532 duuBuffer, duuDesc, │ │ │ │ │ -1533 duvBuffer, duvDesc, │ │ │ │ │ -1534 dvvBuffer, dvvDesc, │ │ │ │ │ -1535 numPatchCoords, patchCoords, │ │ │ │ │ -1536 patchTable); │ │ │ │ │ -1537 } else { │ │ │ │ │ -1538 // Create an instance on demand (slow) │ │ │ │ │ -1539 (void)deviceContext; // unused │ │ │ │ │ -1540 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1541 duDesc, dvDesc, │ │ │ │ │ -1542 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -1543 if (instance) { │ │ │ │ │ -1544 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1545 srcBuffer, srcDesc, │ │ │ │ │ -1546 dstBuffer, dstDesc, │ │ │ │ │ -1547 duBuffer, duDesc, │ │ │ │ │ -1548 dvBuffer, dvDesc, │ │ │ │ │ -1549 duuBuffer, duuDesc, │ │ │ │ │ -1550 duvBuffer, duvDesc, │ │ │ │ │ -1551 dvvBuffer, dvvDesc, │ │ │ │ │ -1552 numPatchCoords, patchCoords, │ │ │ │ │ -1553 patchTable); │ │ │ │ │ -1554 delete instance; │ │ │ │ │ -1555 return r; │ │ │ │ │ -1556 } │ │ │ │ │ -1557 return false; │ │ │ │ │ -1558 } │ │ │ │ │ -1559 } │ │ │ │ │ -1560 │ │ │ │ │ -1615 template │ │ │ │ │ -_1_6_1_7 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1618 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1619 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1620 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1621 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1622 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1623 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1624 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1625 int numPatchCoords, │ │ │ │ │ -1626 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1627 PATCH_TABLE *patchTable) const { │ │ │ │ │ -1628 │ │ │ │ │ -1629 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1630 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1631 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1632 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1633 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -1634 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -1635 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -1636 numPatchCoords, │ │ │ │ │ -1637 patchCoords->BindVBO(), │ │ │ │ │ -1638 patchTable->GetVaryingPatchArrays(), │ │ │ │ │ -1639 patchTable->GetVaryingPatchIndexTextureBuffer(), │ │ │ │ │ -1640 patchTable->GetPatchParamTextureBuffer()); │ │ │ │ │ -1641 } │ │ │ │ │ -1642 │ │ │ │ │ -1677 template │ │ │ │ │ -_1_6_7_9 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1680 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1681 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1682 int numPatchCoords, │ │ │ │ │ -1683 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1684 PATCH_TABLE *patchTable, │ │ │ │ │ -1685 int fvarChannel, │ │ │ │ │ -1686 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1687 void * deviceContext = NULL) { │ │ │ │ │ -1688 │ │ │ │ │ -1689 if (instance) { │ │ │ │ │ -1690 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1691 srcBuffer, srcDesc, │ │ │ │ │ -1692 dstBuffer, dstDesc, │ │ │ │ │ -1693 numPatchCoords, patchCoords, │ │ │ │ │ -1694 patchTable, fvarChannel); │ │ │ │ │ -1695 } else { │ │ │ │ │ -1696 // Create an instance on demand (slow) │ │ │ │ │ -1697 (void)deviceContext; // unused │ │ │ │ │ -1698 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1699 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1700 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r()); │ │ │ │ │ -1701 if (instance) { │ │ │ │ │ -1702 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( │ │ │ │ │ -1703 srcBuffer, srcDesc, │ │ │ │ │ -1704 dstBuffer, dstDesc, │ │ │ │ │ -1705 numPatchCoords, patchCoords, │ │ │ │ │ -1706 patchTable, fvarChannel); │ │ │ │ │ -1707 delete instance; │ │ │ │ │ -1708 return r; │ │ │ │ │ -1709 } │ │ │ │ │ -1710 return false; │ │ │ │ │ -1711 } │ │ │ │ │ -1712 } │ │ │ │ │ -1713 │ │ │ │ │ -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 = 0) const { │ │ │ │ │ -1749 │ │ │ │ │ -1750 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1751 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1752 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1753 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1754 numPatchCoords, │ │ │ │ │ -1755 patchCoords->BindVBO(), │ │ │ │ │ -1756 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1757 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel), │ │ │ │ │ -1758 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel)); │ │ │ │ │ -1759 } │ │ │ │ │ -1760 │ │ │ │ │ -1807 template │ │ │ │ │ -_1_8_0_9 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1810 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1811 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1812 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1813 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1814 int numPatchCoords, │ │ │ │ │ -1815 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1816 PATCH_TABLE *patchTable, │ │ │ │ │ -1817 int fvarChannel, │ │ │ │ │ -1818 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1819 void * deviceContext = NULL) { │ │ │ │ │ -1820 │ │ │ │ │ -1821 if (instance) { │ │ │ │ │ -1822 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1823 srcBuffer, srcDesc, │ │ │ │ │ -1824 dstBuffer, dstDesc, │ │ │ │ │ -1825 duBuffer, duDesc, │ │ │ │ │ -1826 dvBuffer, dvDesc, │ │ │ │ │ -1827 numPatchCoords, patchCoords, │ │ │ │ │ -1828 patchTable, fvarChannel); │ │ │ │ │ -1829 } else { │ │ │ │ │ -1830 // Create an instance on demand (slow) │ │ │ │ │ -1831 (void)deviceContext; // unused │ │ │ │ │ -1832 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1833 duDesc, dvDesc); │ │ │ │ │ -1834 if (instance) { │ │ │ │ │ -1835 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( │ │ │ │ │ -1836 srcBuffer, srcDesc, │ │ │ │ │ -1837 dstBuffer, dstDesc, │ │ │ │ │ -1838 duBuffer, duDesc, │ │ │ │ │ -1839 dvBuffer, dvDesc, │ │ │ │ │ -1840 numPatchCoords, patchCoords, │ │ │ │ │ -1841 patchTable, fvarChannel); │ │ │ │ │ -1842 delete instance; │ │ │ │ │ -1843 return r; │ │ │ │ │ -1844 } │ │ │ │ │ -1845 return false; │ │ │ │ │ -1846 } │ │ │ │ │ -1847 } │ │ │ │ │ -1848 │ │ │ │ │ -1887 template │ │ │ │ │ -_1_8_8_9 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1890 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1891 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1892 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1893 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1894 int numPatchCoords, │ │ │ │ │ -1895 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1896 PATCH_TABLE *patchTable, │ │ │ │ │ -1897 int fvarChannel = 0) const { │ │ │ │ │ -1898 │ │ │ │ │ -1899 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -1900 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -1901 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -1902 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -1903 numPatchCoords, │ │ │ │ │ -1904 patchCoords->BindVBO(), │ │ │ │ │ -1905 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -1906 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel), │ │ │ │ │ -1907 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel)); │ │ │ │ │ -1908 } │ │ │ │ │ -1909 │ │ │ │ │ -1974 template │ │ │ │ │ -_1_9_7_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( │ │ │ │ │ -1977 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1978 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1979 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1980 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1981 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1982 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1983 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1984 int numPatchCoords, │ │ │ │ │ -1985 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1986 PATCH_TABLE *patchTable, │ │ │ │ │ -1987 int fvarChannel, │ │ │ │ │ -1988 _G_L_X_F_B_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1989 void * deviceContext = NULL) { │ │ │ │ │ -1990 │ │ │ │ │ -1991 if (instance) { │ │ │ │ │ -1992 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -1993 srcBuffer, srcDesc, │ │ │ │ │ -1994 dstBuffer, dstDesc, │ │ │ │ │ -1995 duBuffer, duDesc, │ │ │ │ │ -1996 dvBuffer, dvDesc, │ │ │ │ │ -1997 duuBuffer, duuDesc, │ │ │ │ │ -1998 duvBuffer, duvDesc, │ │ │ │ │ -1999 dvvBuffer, dvvDesc, │ │ │ │ │ -2000 numPatchCoords, patchCoords, │ │ │ │ │ -2001 patchTable, fvarChannel); │ │ │ │ │ -2002 } else { │ │ │ │ │ -2003 // Create an instance on demand (slow) │ │ │ │ │ -2004 (void)deviceContext; // unused │ │ │ │ │ -2005 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -2006 duDesc, dvDesc, │ │ │ │ │ -2007 duuDesc, duvDesc, dvvDesc); │ │ │ │ │ -2008 if (instance) { │ │ │ │ │ -2009 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( │ │ │ │ │ -2010 srcBuffer, srcDesc, │ │ │ │ │ -2011 dstBuffer, dstDesc, │ │ │ │ │ -2012 duBuffer, duDesc, │ │ │ │ │ -2013 dvBuffer, dvDesc, │ │ │ │ │ -2014 duuBuffer, duuDesc, │ │ │ │ │ -2015 duvBuffer, duvDesc, │ │ │ │ │ -2016 dvvBuffer, dvvDesc, │ │ │ │ │ -2017 numPatchCoords, patchCoords, │ │ │ │ │ -2018 patchTable, fvarChannel); │ │ │ │ │ -2019 delete instance; │ │ │ │ │ -2020 return r; │ │ │ │ │ -2021 } │ │ │ │ │ -2022 return false; │ │ │ │ │ -2023 } │ │ │ │ │ -2024 } │ │ │ │ │ -2025 │ │ │ │ │ -2082 template │ │ │ │ │ -_2_0_8_4 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2085 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2086 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2087 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2088 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2089 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2090 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2091 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2092 int numPatchCoords, │ │ │ │ │ -2093 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2094 PATCH_TABLE *patchTable, │ │ │ │ │ -2095 int fvarChannel = 0) const { │ │ │ │ │ -2096 │ │ │ │ │ -2097 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindVBO(), srcDesc, │ │ │ │ │ -2098 dstBuffer->BindVBO(), dstDesc, │ │ │ │ │ -2099 duBuffer->BindVBO(), duDesc, │ │ │ │ │ -2100 dvBuffer->BindVBO(), dvDesc, │ │ │ │ │ -2101 duuBuffer->BindVBO(), duuDesc, │ │ │ │ │ -2102 duvBuffer->BindVBO(), duvDesc, │ │ │ │ │ -2103 dvvBuffer->BindVBO(), dvvDesc, │ │ │ │ │ -2104 numPatchCoords, │ │ │ │ │ -2105 patchCoords->BindVBO(), │ │ │ │ │ -2106 patchTable->GetFVarPatchArrays(fvarChannel), │ │ │ │ │ -2107 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel), │ │ │ │ │ -2108 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel)); │ │ │ │ │ -2109 } │ │ │ │ │ -2110 │ │ │ │ │ -2116 │ │ │ │ │ -_2_1_1_9 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, │ │ │ │ │ -2120 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2121 _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(), │ │ │ │ │ -2122 _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(), │ │ │ │ │ -2123 _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(), │ │ │ │ │ -2124 _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(), │ │ │ │ │ -2125 _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()); │ │ │ │ │ -2126 │ │ │ │ │ -_2_1_2_8 static void _S_y_n_c_h_r_o_n_i_z_e(void *kernel); │ │ │ │ │ -2129 │ │ │ │ │ -2130private: │ │ │ │ │ -2131 GLuint _srcBufferTexture; │ │ │ │ │ -2132 GLuint _patchArraysUBO; │ │ │ │ │ -2133 bool _interleavedDerivativeBuffers; │ │ │ │ │ -2134 │ │ │ │ │ -2135 struct _StencilKernel { │ │ │ │ │ -2136 _StencilKernel(); │ │ │ │ │ -2137 ~_StencilKernel(); │ │ │ │ │ -2138 bool Compile(_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 bool interleavedDerivativeBuffers); │ │ │ │ │ -2146 GLuint program; │ │ │ │ │ -2147 GLint uniformSrcBufferTexture; │ │ │ │ │ -2148 GLint uniformSrcOffset; // src buffer offset (in elements) │ │ │ │ │ -2149 │ │ │ │ │ -2150 GLint uniformSizesTexture; │ │ │ │ │ -2151 GLint uniformOffsetsTexture; │ │ │ │ │ -2152 GLint uniformIndicesTexture; │ │ │ │ │ -2153 GLint uniformWeightsTexture; │ │ │ │ │ -2154 GLint uniformDuWeightsTexture; │ │ │ │ │ -2155 GLint uniformDvWeightsTexture; │ │ │ │ │ -2156 GLint uniformDuuWeightsTexture; │ │ │ │ │ -2157 GLint uniformDuvWeightsTexture; │ │ │ │ │ -2158 GLint uniformDvvWeightsTexture; │ │ │ │ │ -2159 GLint uniformStart; // range │ │ │ │ │ -2160 GLint uniformEnd; │ │ │ │ │ -2161 } _stencilKernel; │ │ │ │ │ -2162 │ │ │ │ │ -2163 struct _PatchKernel { │ │ │ │ │ -2164 _PatchKernel(); │ │ │ │ │ -2165 ~_PatchKernel(); │ │ │ │ │ -2166 bool Compile(_B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2167 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2168 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2169 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2170 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2171 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2172 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2173 bool interleavedDerivativeBuffers); │ │ │ │ │ -2174 GLuint program; │ │ │ │ │ -2175 GLint uniformSrcBufferTexture; │ │ │ │ │ -2176 GLint uniformSrcOffset; // src buffer offset (in elements) │ │ │ │ │ -2177 │ │ │ │ │ -2178 GLint uniformPatchArraysUBOBinding; │ │ │ │ │ -2179 GLint uniformPatchParamTexture; │ │ │ │ │ -2180 GLint uniformPatchIndexTexture; │ │ │ │ │ -2181 } _patchKernel; │ │ │ │ │ -2182 │ │ │ │ │ -2183}; │ │ │ │ │ -2184 │ │ │ │ │ -2185} // end namespace Osd │ │ │ │ │ -2186 │ │ │ │ │ -2187} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -2188using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -2189 │ │ │ │ │ -2190} // end namespace OpenSubdiv │ │ │ │ │ -2191 │ │ │ │ │ -2192 │ │ │ │ │ -2193#endif // OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H │ │ │ │ │ +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_:_:_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. │ │ │ │ │ @@ -1100,372 +1038,345 @@ │ │ │ │ │ _O_p_e_n_S_u_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_T_B_O │ │ │ │ │ -GL TextureBuffer stencil table. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O_:_:_G_e_t_S_i_z_e_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetSizesTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLStencilTableTBO * Create(Far::StencilTable const *stencilTable, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O_:_:_G_e_t_D_v_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetDvvWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_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_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O_:_:_G_e_t_N_u_m_S_t_e_n_c_i_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_:_:_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_X_F_B_E_v_a_l_u_a_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_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O_:_:_G_e_t_D_u_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetDuvWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_G_e_t_D_u_u_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetDuuWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_G_e_t_I_n_d_i_c_e_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetIndicesTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_~_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O │ │ │ │ │ -~GLStencilTableTBO() │ │ │ │ │ -_O_p_e_n_S_u_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_T_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O │ │ │ │ │ -GLStencilTableTBO(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_T_B_O_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O │ │ │ │ │ -GLStencilTableTBO(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_T_B_O_:_:_G_e_t_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLStencilTableTBO * Create(Far::LimitStencilTable 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_X_F_B_E_v_a_l_u_a_t_o_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_:_:_O_s_d_:_:_G_L_S_t_e_n_c_i_l_T_a_b_l_e_T_B_O_:_:_G_e_t_D_v_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetDvWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_G_e_t_D_u_W_e_i_g_h_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetDuWeightsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_T_B_O_:_:_G_e_t_O_f_f_s_e_t_s_T_e_x_t_u_r_e │ │ │ │ │ -GLuint GetOffsetsTexture() const │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_X_F_B_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 │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, bool interleavedDerivativeBuffers=false) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_5_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ -GLXFBEvaluator(bool interleavedDerivativeBuffers=false) │ │ │ │ │ -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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_5_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_I_n_s_t_a_n_t_i_a_t_a_b_l_e │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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_X_F_B_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, │ │ │ │ │ -GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_3_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_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_:_:_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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, bool │ │ │ │ │ -interleavedDerivativeBuffers=false) │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, void *deviceContext) │ │ │ │ │ -Specialization to allow creation without a device context. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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, │ │ │ │ │ -GLXFBEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_3_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_X_F_B_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, GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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 XFB kernel on 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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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, GLXFBEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +*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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_8_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, │ │ │ │ │ -DEVICE_CONTEXT deviceContext) │ │ │ │ │ -Generic creator template. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_r_._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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, DEVICE_CONTEXT deviceContext) │ │ │ │ │ -Generic creator template. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(void *kernel) │ │ │ │ │ -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_X_F_B_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, │ │ │ │ │ -GLXFBEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +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_X_F_B_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_:_:_G_L_X_F_B_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 │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_6_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_:_:_G_L_X_F_B_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 │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_G_L_X_F_B_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, GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_7_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_X_F_B_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, GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_8_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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_0_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_X_F_B_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, GLXFBEvaluator 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_X_F_B_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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_X_F_B_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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, │ │ │ │ │ -BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, │ │ │ │ │ -BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, │ │ │ │ │ -BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void │ │ │ │ │ -*deviceContext) │ │ │ │ │ -Specialization to allow creation without a device context. │ │ │ │ │ -DDeeffiinniittiioonn _g_l_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_G_L_X_F_B_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 │ │ │ │ │ +_O_p_e_n_S_u_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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_2_0_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_:_:_G_L_X_F_B_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, GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_5_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_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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 XFB kernel on 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_:_:_G_L_X_F_B_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, GLXFBEvaluator 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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_6_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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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, GLXFBEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +&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_X_F_B_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_G_L_X_F_B_E_v_a_l_u_a_t_o_r_:_:_~_G_L_X_F_B_E_v_a_l_u_a_t_o_r │ │ │ │ │ -~GLXFBEvaluator() │ │ │ │ │ -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_X_F_B_E_v_a_l_u_a_t_o_r_:_:_C_o_m_p_i_l_e │ │ │ │ │ +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_X_F_B_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 │ │ │ │ │ +_O_p_e_n_S_u_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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_G_L_X_F_B_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 │ │ │ │ │ +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_X_F_B_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_:_:_G_L_X_F_B_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, │ │ │ │ │ -GLXFBEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h_:_1_9_7_6 │ │ │ │ │ +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_X_F_B_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _g_l_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00779.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaEvaluator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    tbbEvaluator.h File Reference
    │ │ │ │ +
    cudaEvaluator.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/bufferDescriptor.h"
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include "../osd/bufferDescriptor.h"
    │ │ │ │ #include "../osd/types.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  TbbEvaluator
    class  CudaStencilTable
     CUDA stencil table. More...
     
    class  CudaEvaluator
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +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 │ │ │ │ │ -tbbEvaluator.h File Reference │ │ │ │ │ +cudaEvaluator.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 │ │ │ │ │ -class   _T_b_b_E_v_a_l_u_a_t_o_r │ │ │ │ │ +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 │ │ │ │ │ - * _t_b_b_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00779.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00779 = [ │ │ │ │ │ - ["TbbEvaluator", "a01309.html", null] │ │ │ │ │ + ["CudaStencilTable", "a01173.html", "a01173"], │ │ │ │ │ + ["CudaEvaluator", "a01177.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00779_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/tbbEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/cudaEvaluator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    tbbEvaluator.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,528 +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_TBB_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_TBB_EVALUATOR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include "../osd/bufferDescriptor.h"
    │ │ │ │ -
    30#include "../osd/types.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32#include <cstddef>
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include <vector>
    │ │ │ │ +
    31#include "../osd/bufferDescriptor.h"
    │ │ │ │ +
    32#include "../osd/types.h"
    │ │ │ │
    33
    │ │ │ │
    34namespace OpenSubdiv {
    │ │ │ │
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │
    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 TbbEvaluator const *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 TbbEvaluator *instance = NULL,
    │ │ │ │ -
    175 void * deviceContext = NULL) {
    │ │ │ │ -
    176
    │ │ │ │ -
    177 (void)instance; // unused
    │ │ │ │ -
    178 (void)deviceContext; // unused
    │ │ │ │ +
    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);
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ -
    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 TbbEvaluator *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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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);
    │ │ │ │ +
    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
    │ │ │ │ -
    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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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 TbbEvaluator 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
    │ │ │ │ -
    1234 static void SetNumThreads(int numThreads);
    │ │ │ │ -
    1235};
    │ │ │ │ -
    │ │ │ │ -
    1236
    │ │ │ │ -
    1237
    │ │ │ │ -
    1238} // end namespace Osd
    │ │ │ │ -
    1239
    │ │ │ │ -
    1240} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    1241using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    1242
    │ │ │ │ -
    1243} // end namespace OpenSubdiv
    │ │ │ │ -
    1244
    │ │ │ │ -
    1245
    │ │ │ │ -
    1246#endif // OPENSUBDIV3_OSD_TBB_EVALUATOR_H
    │ │ │ │ - │ │ │ │ -
    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...
    │ │ │ │ -
    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 void Synchronize(void *deviceContext=NULL)
    synchronize all asynchronous computation invoked on this device.
    │ │ │ │ -
    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, 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 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, 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, 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...
    │ │ │ │ -
    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, 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(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 void SetNumThreads(int numThreads)
    initialize tbb task schedular (optional: client may use tbb::task_scheduler_init)
    │ │ │ │ -
    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 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 TbbEvaluator *instance=NULL, void *deviceContext=NULL)
    Generic static eval stencils function with derivatives. This function has a same signature as other d...
    │ │ │ │ -
    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, 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 EvalPatchesVarying(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 ...
    │ │ │ │ +
    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 │ │ │ │ │ -tbbEvaluator.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,658 +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_TBB_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_TBB_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../osd/bufferDescriptor.h" │ │ │ │ │ -30#include "../osd/types.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ +29 │ │ │ │ │ +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 Osd { │ │ │ │ │ -38 │ │ │ │ │ -_3_9class _T_b_b_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 _T_b_b_E_v_a_l_u_a_t_o_r const *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 _T_b_b_E_v_a_l_u_a_t_o_r *instance = NULL, │ │ │ │ │ -175 void * deviceContext = NULL) { │ │ │ │ │ -176 │ │ │ │ │ -177 (void)instance; // unused │ │ │ │ │ -178 (void)deviceContext; // unused │ │ │ │ │ +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(); │ │ │ │ │ +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 │ │ │ │ │ -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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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); │ │ │ │ │ +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_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 _T_b_b_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 │ │ │ │ │ -_1_2_3_4 static void _S_e_t_N_u_m_T_h_r_e_a_d_s(int numThreads); │ │ │ │ │ -1235}; │ │ │ │ │ -1236 │ │ │ │ │ -1237 │ │ │ │ │ -1238} // end namespace Osd │ │ │ │ │ -1239 │ │ │ │ │ -1240} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -1241using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -1242 │ │ │ │ │ -1243} // end namespace OpenSubdiv │ │ │ │ │ -1244 │ │ │ │ │ -1245 │ │ │ │ │ -1246#endif // OPENSUBDIV3_OSD_TBB_EVALUATOR_H │ │ │ │ │ +_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_:_:_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator 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_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 static eval stencils function. This function has a same signature as │ │ │ │ │ -other device kernels hav... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ Generic limit eval function. This function has a same signature as other device │ │ │ │ │ kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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 TbbEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +const CudaEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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 CPU pointers for input and │ │ │ │ │ +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_:_:_T_b_b_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 │ │ │ │ │ +_O_p_e_n_S_u_b_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, TbbEvaluator const *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ +*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 _t_b_b_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_:_:_T_b_b_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, TbbEvaluator const *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ +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 CPU pointers │ │ │ │ │ +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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_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_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 CPU pointers │ │ │ │ │ +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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_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_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, 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) │ │ │ │ │ +&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_:_:_T_b_b_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) │ │ │ │ │ -synchronize all asynchronous computation invoked on this device. │ │ │ │ │ -_O_p_e_n_S_u_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_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g │ │ │ │ │ +_O_p_e_n_S_u_b_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, TbbEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +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 _t_b_b_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_:_:_T_b_b_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 │ │ │ │ │ +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, int numPatchCoords, PATCHCOORD_BUFFER │ │ │ │ │ -*patchCoords, PATCH_TABLE *patchTable, int fvarChannel, TbbEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +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 _t_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ +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, TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +*patchTable, CudaEvaluator const *instance, void *deviceContext=NULL) │ │ │ │ │ Generic limit eval function with derivatives. This function has a same │ │ │ │ │ signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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 │ │ │ │ │ +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, TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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_:_:_T_b_b_E_v_a_l_u_a_t_o_r_:_:_S_e_t_N_u_m_T_h_r_e_a_d_s │ │ │ │ │ -static void SetNumThreads(int numThreads) │ │ │ │ │ -initialize tbb task schedular (optional: client may use tbb:: │ │ │ │ │ -task_scheduler_init) │ │ │ │ │ -_O_p_e_n_S_u_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_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_:_:_T_b_b_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 │ │ │ │ │ -TbbEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, │ │ │ │ │ -TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _t_b_b_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_:_:_T_b_b_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, │ │ │ │ │ -TbbEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ +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 _t_b_b_E_v_a_l_u_a_t_o_r_._h_:_8_2_3 │ │ │ │ │ +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 │ │ │ │ │ - * _t_b_b_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _c_u_d_a_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00782.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlCommon.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,27 +90,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cpuGLVertexBuffer.h File Reference
    │ │ │ │ +
    mtlCommon.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ #include <cstddef>
    │ │ │ │ -#include "../osd/opengl.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

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

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +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 │ │ │ │ │ -cpuGLVertexBuffer.h File Reference │ │ │ │ │ +mtlCommon.h File Reference │ │ │ │ │ #include "../version.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   _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_._._. │ │ │ │ │ +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 │ │ │ │ │ - * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00782.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00782 = [ │ │ │ │ │ - ["CpuGLVertexBuffer", "a01161.html", "a01161"] │ │ │ │ │ + ["MTLContext", "a01277.html", "a01277"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00782_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuGLVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/mtlCommon.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    cpuGLVertexBuffer.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,83 +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_CPU_GL_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │
    30#include <cstddef>
    │ │ │ │ -
    31#include "../osd/opengl.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33namespace OpenSubdiv {
    │ │ │ │ -
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    35
    │ │ │ │ -
    36namespace Osd {
    │ │ │ │ +
    31
    │ │ │ │ +
    32@protocol MTLDevice;
    │ │ │ │ +
    33@protocol MTLCommandQueue;
    │ │ │ │ +
    34
    │ │ │ │ +
    35namespace OpenSubdiv {
    │ │ │ │ +
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │
    37
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    48public:
    │ │ │ │ -
    50 static CpuGLVertexBuffer * Create(int numElements, int numVertices,
    │ │ │ │ -
    51 void *deviceContext = NULL);
    │ │ │ │ +
    38namespace Osd {
    │ │ │ │ +
    39
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ - │ │ │ │ -
    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.
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuGLVertexBuffer.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,94 +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_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ 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 { │ │ │ │ │ +31 │ │ │ │ │ +32@protocol MTLDevice; │ │ │ │ │ +33@protocol MTLCommandQueue; │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ 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); │ │ │ │ │ +38namespace Osd { │ │ │ │ │ +39 │ │ │ │ │ +_4_0class _M_T_L_C_o_n_t_e_x_t { │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ - * _c_p_u_G_L_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00785.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/bufferDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbKernel.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    bufferDescriptor.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Functions
    │ │ │ │ +
    tbbKernel.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <string.h>
    │ │ │ │ +#include "../far/patchDescriptor.h"
    │ │ │ │ +#include "../far/patchParam.h"
    │ │ │ │
    │ │ │ │

    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...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ │ 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,26 +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 │ │ │ │ │ -bufferDescriptor.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 │ │ │ │ │ +#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 │ │ │ │ │ -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 │ │ │ │ │   │ │ │ │ │ +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 │ │ │ │ │ - * _b_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00785.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,7 @@ │ │ │ │ │ var a00785 = [ │ │ │ │ │ - ["BufferDescriptor", "a01133.html", "a01133"] │ │ │ │ │ + ["TbbEvalPatches", "a00785.html#aa0c3c264a43eeddc5cb3a58b006d3d32", null], │ │ │ │ │ + ["TbbEvalPatches", "a00785.html#a20e08be34d6183b6943ed7a1586eca4a", null], │ │ │ │ │ + ["TbbEvalStencils", "a00785.html#aa65ed860a2fa5935d99129a898a8f0b6", null], │ │ │ │ │ + ["TbbEvalStencils", "a00785.html#af23c35537952bfdd493441e5c42ff2ed", null], │ │ │ │ │ + ["TbbEvalStencils", "a00785.html#a4a6a0fcc01638f2a0316b32ad158b485", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00785_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/bufferDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/tbbKernel.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    bufferDescriptor.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,112 +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_BUFFER_DESCRIPTOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_TBB_KERNEL_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    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
    │ │ │ │ -
    │ │ │ │ -
    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;
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ -
    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.
    │ │ │ │ - │ │ │ │ +
    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 │ │ │ │ │ -bufferDescriptor.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,125 +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_BUFFER_DESCRIPTOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_TBB_KERNEL_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -111 │ │ │ │ │ -112#endif // OPENSUBDIV3_OSD_BUFFER_DESCRIPTOR_H │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ + * _t_b_b_K_e_r_n_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00788.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlMesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/osd/clPatchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
    │ │ │ │ -
    mtlMesh.h File Reference
    │ │ │ │ +Classes | │ │ │ │ +Namespaces
    │ │ │ │ +
    clPatchTable.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/mesh.h"
    │ │ │ │ -#include "../osd/mtlPatchTable.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  CLPatchTable
     CL patch table. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

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

    │ │ │ │ -Typedefs

    typedef MeshInterface< MTLPatchTableMTLMeshInterface
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,29 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -mtlMesh.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +clPatchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_m_t_l_P_a_t_c_h_T_a_b_l_e_._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_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +  CL 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 │ │ │ │ │ +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< _M_T_L_P_a_t_c_h_T_a_b_l_e >  _M_T_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 │ │ │ │ │ - * _m_t_l_M_e_s_h_._h │ │ │ │ │ + * _c_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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 = [ │ │ │ │ │ - ["MTLMeshInterface", "a00788.html#aa41e5b43fe46eeb0f97ff6ebdb1935aa", null] │ │ │ │ │ + ["CLPatchTable", "a01145.html", "a01145"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00788_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlMesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/osd/clPatchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlMesh.h
    │ │ │ │ +
    clPatchTable.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,44 +119,124 @@ │ │ │ │
    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_MESH_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_MESH_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include "../osd/mesh.h"
    │ │ │ │ -
    30#include "../osd/mtlPatchTable.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32
    │ │ │ │ -
    33namespace OpenSubdiv {
    │ │ │ │ -
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../osd/opencl.h"
    │ │ │ │ +
    31#include "../osd/nonCopyable.h"
    │ │ │ │ +
    32#include "../osd/types.h"
    │ │ │ │ +
    33
    │ │ │ │ +
    34#include <vector>
    │ │ │ │
    35
    │ │ │ │ -
    36namespace Osd {
    │ │ │ │ -
    37
    │ │ │ │ - │ │ │ │ -
    39
    │ │ │ │ -
    40} // end namespace Osd
    │ │ │ │ -
    41
    │ │ │ │ -
    42} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    43using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    36namespace OpenSubdiv {
    │ │ │ │ +
    37namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    38
    │ │ │ │ +
    39namespace Far{
    │ │ │ │ +
    40 class PatchTable;
    │ │ │ │ +
    41};
    │ │ │ │ +
    42
    │ │ │ │ +
    43namespace Osd {
    │ │ │ │
    44
    │ │ │ │ -
    45} // end namespace OpenSubdiv
    │ │ │ │ -
    46
    │ │ │ │ -
    47#endif // OPENSUBDIV3_OSD_MTL_MESH_H
    │ │ │ │ - │ │ │ │ -
    MeshInterface< MTLPatchTable > MTLMeshInterface
    Definition mtlMesh.h:38
    │ │ │ │ - │ │ │ │ +
    │ │ │ │ +
    52class CLPatchTable : private NonCopyable<CLPatchTable> {
    │ │ │ │ +
    53public:
    │ │ │ │ +
    55 static CLPatchTable *Create(Far::PatchTable const *patchTable,
    │ │ │ │ +
    56 cl_context clContext);
    │ │ │ │ +
    57
    │ │ │ │ +
    58 template <typename DEVICE_CONTEXT>
    │ │ │ │ +
    │ │ │ │ +
    59 static CLPatchTable * Create(Far::PatchTable const *patchTable,
    │ │ │ │ +
    60 DEVICE_CONTEXT context) {
    │ │ │ │ +
    61 return Create(patchTable, context->GetContext());
    │ │ │ │ +
    62 }
    │ │ │ │ +
    │ │ │ │ +
    63
    │ │ │ │ + │ │ │ │ +
    66
    │ │ │ │ +
    68 cl_mem GetPatchArrayBuffer() const { return _patchArrays; }
    │ │ │ │ +
    69
    │ │ │ │ +
    71 cl_mem GetPatchIndexBuffer() const { return _indexBuffer; }
    │ │ │ │ +
    72
    │ │ │ │ +
    74 cl_mem GetPatchParamBuffer() const { return _patchParamBuffer; }
    │ │ │ │ +
    75
    │ │ │ │ + │ │ │ │ +
    78
    │ │ │ │ + │ │ │ │ +
    81
    │ │ │ │ +
    83 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
    │ │ │ │ +
    84
    │ │ │ │ +
    86 cl_mem GetFVarPatchArrayBuffer(int fvarChannel = 0) const { return _fvarPatchArrays[fvarChannel]; }
    │ │ │ │ +
    87
    │ │ │ │ +
    89 cl_mem GetFVarPatchIndexBuffer(int fvarChannel = 0) const { return _fvarIndexBuffers[fvarChannel]; }
    │ │ │ │ +
    90
    │ │ │ │ +
    92 cl_mem GetFVarPatchParamBuffer(int fvarChannel = 0) const { return _fvarParamBuffers[fvarChannel]; }
    │ │ │ │ +
    93
    │ │ │ │ +
    94protected:
    │ │ │ │ + │ │ │ │ +
    96
    │ │ │ │ +
    97 bool allocate(Far::PatchTable const *patchTable, cl_context clContext);
    │ │ │ │ +
    98
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    102
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    105
    │ │ │ │ +
    106 std::vector<cl_mem> _fvarPatchArrays;
    │ │ │ │ +
    107 std::vector<cl_mem> _fvarIndexBuffers;
    │ │ │ │ +
    108 std::vector<cl_mem> _fvarParamBuffers;
    │ │ │ │ +
    109
    │ │ │ │ +
    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_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.
    │ │ │ │ + │ │ │ │ +
    cl_mem GetFVarPatchArrayBuffer(int fvarChannel=0) const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │ +
    cl_mem GetPatchArrayBuffer() const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │ +
    static CLPatchTable * Create(Far::PatchTable const *patchTable, cl_context clContext)
    Creator. Returns NULL if error.
    │ │ │ │ + │ │ │ │ +
    cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const
    Returns the CL memory of the face-varying control vertices.
    │ │ │ │ + │ │ │ │ +
    cl_mem GetVaryingPatchIndexBuffer() const
    Returns the CL memory of the varying control vertices.
    │ │ │ │ +
    int GetNumFVarChannels() const
    Returns the number of face-varying channel buffers.
    │ │ │ │ +
    cl_mem GetPatchIndexBuffer() const
    Returns the CL memory of the patch control vertices.
    │ │ │ │ +
    static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT context)
    │ │ │ │ +
    cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const
    Returns the CL memory of the array of Osd::PatchParam buffer.
    │ │ │ │ + │ │ │ │ +
    bool allocate(Far::PatchTable const *patchTable, cl_context clContext)
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    cl_mem GetVaryingPatchArrayBuffer() const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlMesh.h │ │ │ │ │ +clPatchTable.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,41 +24,174 @@ │ │ │ │ │ 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_MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_MESH_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_OSD_CL_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_OSD_CL_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include "../osd/mesh.h" │ │ │ │ │ -30#include "../osd/mtlPatchTable.h" │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +29 │ │ │ │ │ +30#include "../osd/opencl.h" │ │ │ │ │ +31#include "../osd/nonCopyable.h" │ │ │ │ │ +32#include "../osd/types.h" │ │ │ │ │ +33 │ │ │ │ │ +34#include │ │ │ │ │ 35 │ │ │ │ │ -36namespace Osd { │ │ │ │ │ -37 │ │ │ │ │ -_3_8typedef _M_e_s_h_I_n_t_e_r_f_a_c_e_<_M_T_L_P_a_t_c_h_T_a_b_l_e_> _M_T_L_M_e_s_h_I_n_t_e_r_f_a_c_e; │ │ │ │ │ -39 │ │ │ │ │ -40} // end namespace Osd │ │ │ │ │ -41 │ │ │ │ │ -42} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -43using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +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 │ │ │ │ │ -45} // end namespace OpenSubdiv │ │ │ │ │ -46 │ │ │ │ │ -47#endif // OPENSUBDIV3_OSD_MTL_MESH_H │ │ │ │ │ +_5_2class _C_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ +53public: │ │ │ │ │ +_5_5 static _C_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 *patchTable, │ │ │ │ │ +56 cl_context clContext); │ │ │ │ │ +57 │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 static _C_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 *patchTable, │ │ │ │ │ +60 DEVICE_CONTEXT context) { │ │ │ │ │ +61 return _C_r_e_a_t_e(patchTable, context->GetContext()); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 _~_C_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +66 │ │ │ │ │ +_6_8 cl_mem _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; } │ │ │ │ │ +69 │ │ │ │ │ +_7_1 cl_mem _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; } │ │ │ │ │ +72 │ │ │ │ │ +_7_4 cl_mem _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; } │ │ │ │ │ +75 │ │ │ │ │ +_7_7 cl_mem _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 { return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ +78 │ │ │ │ │ +_8_0 cl_mem _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_I_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 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(); } │ │ │ │ │ +84 │ │ │ │ │ +_8_6 cl_mem _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 { return │ │ │ │ │ +___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; } │ │ │ │ │ +87 │ │ │ │ │ +_8_9 cl_mem _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]; } │ │ │ │ │ +90 │ │ │ │ │ +_9_2 cl_mem _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]; } │ │ │ │ │ +93 │ │ │ │ │ +94protected: │ │ │ │ │ +_9_5 _C_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +96 │ │ │ │ │ +_9_7 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable, cl_context clContext); │ │ │ │ │ +98 │ │ │ │ │ +_9_9 cl_mem ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_0 cl_mem ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +_1_0_1 cl_mem ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ +102 │ │ │ │ │ +_1_0_3 cl_mem ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_4 cl_mem ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ +_1_0_7 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ +_1_0_8 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ +109 │ │ │ │ │ +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_CL_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_:_:_M_T_L_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -MeshInterface< MTLPatchTable > MTLMeshInterface │ │ │ │ │ -DDeeffiinniittiioonn _m_t_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_:_:_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_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +CL patch table. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_:_:_C_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< cl_mem > _fvarPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_L_P_a_t_c_h_T_a_b_l_e_:_:_~_C_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~CLPatchTable() │ │ │ │ │ +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_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 │ │ │ │ │ +cl_mem _patchParamBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_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 │ │ │ │ │ +cl_mem GetPatchParamBuffer() const │ │ │ │ │ +Returns the CL memory of the array of Osd::PatchParam buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ +cl_mem _indexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_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_B_u_f_f_e_r │ │ │ │ │ +cl_mem GetFVarPatchArrayBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_L_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 │ │ │ │ │ +cl_mem GetPatchArrayBuffer() const │ │ │ │ │ +Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CLPatchTable * Create(Far::PatchTable const *patchTable, 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_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ +cl_mem _patchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_e_._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_:_:_C_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 │ │ │ │ │ +cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the CL memory of the face-varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_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_:_:_O_s_d_:_:_C_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 │ │ │ │ │ +cl_mem _varyingIndexBuffer │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ +cl_mem GetVaryingPatchIndexBuffer() const │ │ │ │ │ +Returns the CL memory of the varying control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_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 _c_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_:_:_C_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 │ │ │ │ │ +cl_mem GetPatchIndexBuffer() const │ │ │ │ │ +Returns the CL memory of the patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ +static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT │ │ │ │ │ +context) │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ +cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ +Returns the CL memory of the array of Osd::PatchParam buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_:_:_O_s_d_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +CLPatchTable() │ │ │ │ │ +_O_p_e_n_S_u_b_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_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ +bool allocate(Far::PatchTable const *patchTable, 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_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< cl_mem > _fvarParamBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_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< cl_mem > _fvarIndexBuffers │ │ │ │ │ +DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ +cl_mem _varyingPatchArrays │ │ │ │ │ +DDeeffiinniittiioonn _c_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_:_:_C_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_B_u_f_f_e_r │ │ │ │ │ +cl_mem GetVaryingPatchArrayBuffer() const │ │ │ │ │ +Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ +DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_e_._h_:_7_7 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _o_s_d │ │ │ │ │ - * _m_t_l_M_e_s_h_._h │ │ │ │ │ + * _c_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/d3d11Mesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/array.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
    │ │ │ │ -
    d3d11Mesh.h File Reference
    │ │ │ │ +Classes | │ │ │ │ +Namespaces
    │ │ │ │ +
    array.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/mesh.h"
    │ │ │ │ -#include "../osd/d3d11PatchTable.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ +Classes

    class  ConstArray< TYPE >
     
    class  Array< TYPE >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

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

    │ │ │ │ -Typedefs

    typedef MeshInterface< D3D11PatchTableD3D11MeshInterface
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,25 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -d3d11Mesh.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +array.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_m_e_s_h_._h" │ │ │ │ │ -#include "_._._/_o_s_d_/_d_3_d_1_1_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 │ │ │ │ │ +class   _C_o_n_s_t_A_r_r_a_y_<_ _T_Y_P_E_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _A_r_r_a_y_<_ _T_Y_P_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< _D_3_D_1_1_P_a_t_c_h_T_a_b_l_e >  _D_3_D_1_1_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_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_M_e_s_h_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _a_r_r_a_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00794.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00794 = [ │ │ │ │ │ - ["D3D11MeshInterface", "a00794.html#ae5c8e80d05d6eaee105d8eecfa9ab609", null] │ │ │ │ │ + ["ConstArray< TYPE >", "a01345.html", "a01345"], │ │ │ │ │ + ["Array< TYPE >", "a01349.html", "a01349"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00794_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11Mesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/array.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    d3d11Mesh.h
    │ │ │ │ +
    array.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,46 +118,192 @@ │ │ │ │
    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_OSD_D3D11MESH_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_D3D11MESH_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include "../osd/mesh.h"
    │ │ │ │ -
    31#include "../osd/d3d11PatchTable.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33namespace OpenSubdiv {
    │ │ │ │ -
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_ARRAY_INTERFACE_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_ARRAY_INTERFACE_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include <cassert>
    │ │ │ │ +
    30
    │ │ │ │ +
    31namespace OpenSubdiv {
    │ │ │ │ +
    32namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace Vtr {
    │ │ │ │
    35
    │ │ │ │ -
    36namespace Osd {
    │ │ │ │ -
    37
    │ │ │ │ - │ │ │ │ -
    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_D3D11MESH_H
    │ │ │ │ - │ │ │ │ -
    MeshInterface< D3D11PatchTable > D3D11MeshInterface
    Definition d3d11Mesh.h:38
    │ │ │ │ - │ │ │ │ +
    36//
    │ │ │ │ +
    37// This class provides a simple array-like interface -- a subset std::vector's interface -- for
    │ │ │ │ +
    38// a sequence of elements stored in contiguous memory. It provides a unified representation for
    │ │ │ │ +
    39// referencing data on the stack, all or a subset of std::vector<>, or anywhere else in memory.
    │ │ │ │ +
    40//
    │ │ │ │ +
    41// Note that its members are head/size rather than begin/end as in std::vector -- we frequently
    │ │ │ │ +
    42// need only the size for many queries, and that is most often what is stored elsewhere in other
    │ │ │ │ +
    43// classes, so we hope to reduce unnecessary address arithmetic constructing the interface and
    │ │ │ │ +
    44// accessing the size. The size type is also specifically 32-bit (rather than size_t) to match
    │ │ │ │ +
    45// internal usage and avoid unnecessary conversion to/from 64-bit.
    │ │ │ │ +
    46//
    │ │ │ │ +
    47// Question:
    │ │ │ │ +
    48// Naming is at issue here... formerly called ArrayInterface until that was shot down it has
    │ │ │ │ +
    49// been simplified to Array but needs to be distanced from std::array as it DOES NOT store its
    │ │ │ │ +
    50// own memory and is simply an interface to memory stored elsewhere.
    │ │ │ │ +
    51//
    │ │ │ │ +
    52template <typename TYPE>
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    54
    │ │ │ │ +
    55public:
    │ │ │ │ +
    56 typedef TYPE value_type;
    │ │ │ │ +
    57 typedef int size_type;
    │ │ │ │ +
    58
    │ │ │ │ +
    59 typedef TYPE const& const_reference;
    │ │ │ │ +
    60 typedef TYPE const* const_iterator;
    │ │ │ │ +
    61
    │ │ │ │ +
    62 typedef TYPE& reference;
    │ │ │ │ +
    63 typedef TYPE* iterator;
    │ │ │ │ +
    64
    │ │ │ │ +
    65public:
    │ │ │ │ +
    66
    │ │ │ │ +
    67 ConstArray() : _begin(0), _size(0) { }
    │ │ │ │ +
    68
    │ │ │ │ +
    │ │ │ │ +
    69 ConstArray(value_type const * ptr, size_type sizeArg) :
    │ │ │ │ +
    70 _begin(ptr), _size(sizeArg) { }
    │ │ │ │ +
    │ │ │ │ +
    71
    │ │ │ │ +
    72 size_type size() const { return _size; }
    │ │ │ │ +
    73
    │ │ │ │ +
    74 bool empty() const { return _size==0; }
    │ │ │ │ +
    75
    │ │ │ │ +
    76 const_reference operator[](int index) const { return _begin[index]; }
    │ │ │ │ +
    77 const_iterator begin() const { return _begin; }
    │ │ │ │ +
    78 const_iterator end() const { return _begin + _size; }
    │ │ │ │ +
    79
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    81 assert(_size>=4);
    │ │ │ │ +
    82 if (value == _begin[0]) return 0;
    │ │ │ │ +
    83 if (value == _begin[1]) return 1;
    │ │ │ │ +
    84 if (value == _begin[2]) return 2;
    │ │ │ │ +
    85 if (value == _begin[3]) return 3;
    │ │ │ │ +
    86 assert("FindIndexIn4Tuple() did not find expected value!" == 0);
    │ │ │ │ +
    87 return -1;
    │ │ │ │ +
    88 }
    │ │ │ │ +
    │ │ │ │ +
    89
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    91 for (size_type i=0; i<size(); ++i) {
    │ │ │ │ +
    92 if (value==_begin[i]) {
    │ │ │ │ +
    93 return i;
    │ │ │ │ +
    94 }
    │ │ │ │ +
    95 }
    │ │ │ │ +
    96 return -1;
    │ │ │ │ +
    97 }
    │ │ │ │ +
    │ │ │ │ +
    98
    │ │ │ │ +
    99protected:
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    102};
    │ │ │ │ +
    │ │ │ │ +
    103
    │ │ │ │ +
    104template <typename TYPE>
    │ │ │ │ +
    │ │ │ │ +
    105class Array : public ConstArray<TYPE> {
    │ │ │ │ +
    106
    │ │ │ │ +
    107public:
    │ │ │ │ +
    108 typedef TYPE value_type;
    │ │ │ │ +
    109 typedef int size_type;
    │ │ │ │ +
    110
    │ │ │ │ +
    111 typedef TYPE const& const_reference;
    │ │ │ │ +
    112
    │ │ │ │ +
    113 typedef TYPE& reference;
    │ │ │ │ +
    114 typedef TYPE* iterator;
    │ │ │ │ +
    115
    │ │ │ │ +
    116public:
    │ │ │ │ +
    117
    │ │ │ │ +
    118 Array() : ConstArray<TYPE>() { }
    │ │ │ │ +
    119
    │ │ │ │ +
    120 Array(value_type * ptr, size_type sizeArg) : ConstArray<TYPE>(ptr, sizeArg) { }
    │ │ │ │ +
    121
    │ │ │ │ +
    122public:
    │ │ │ │ +
    123
    │ │ │ │ +
    │ │ │ │ +
    124 const_reference operator[](int index) const {
    │ │ │ │ +
    125 return ConstArray<TYPE>::_begin[index];
    │ │ │ │ +
    126 }
    │ │ │ │ +
    │ │ │ │ +
    127
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    129 return const_cast<reference>(ConstArray<TYPE>::_begin[index]);
    │ │ │ │ +
    130 }
    │ │ │ │ +
    │ │ │ │ +
    131
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    133 return const_cast<iterator>(ConstArray<TYPE>::_begin);
    │ │ │ │ +
    134 }
    │ │ │ │ +
    │ │ │ │ +
    135
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    137 return const_cast<iterator>(ConstArray<TYPE>::_begin +
    │ │ │ │ + │ │ │ │ +
    139 }
    │ │ │ │ +
    │ │ │ │ +
    140};
    │ │ │ │ +
    │ │ │ │ +
    141
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    ConstArray(value_type const *ptr, size_type sizeArg)
    Definition array.h:69
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    size_type FindIndex(value_type value) const
    Definition array.h:90
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    const_reference operator[](int index) const
    Definition array.h:124
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    Array(value_type *ptr, size_type sizeArg)
    Definition array.h:120
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11Mesh.h │ │ │ │ │ +array.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,43 +23,236 @@ │ │ │ │ │ 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_OSD_D3D11MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_D3D11MESH_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../osd/mesh.h" │ │ │ │ │ -31#include "../osd/d3d11PatchTable.h" │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_ARRAY_INTERFACE_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_ARRAY_INTERFACE_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +33 │ │ │ │ │ +34namespace Vtr { │ │ │ │ │ 35 │ │ │ │ │ -36namespace Osd { │ │ │ │ │ -37 │ │ │ │ │ -_3_8typedef _M_e_s_h_I_n_t_e_r_f_a_c_e_<_D_3_D_1_1_P_a_t_c_h_T_a_b_l_e_> _D_3_D_1_1_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_D3D11MESH_H │ │ │ │ │ +36// │ │ │ │ │ +37// This class provides a simple array-like interface -- a subset std:: │ │ │ │ │ +vector's interface -- for │ │ │ │ │ +38// a sequence of elements stored in contiguous memory. It provides a unified │ │ │ │ │ +representation for │ │ │ │ │ +39// referencing data on the stack, all or a subset of std::vector<>, or │ │ │ │ │ +anywhere else in memory. │ │ │ │ │ +40// │ │ │ │ │ +41// Note that its members are head/size rather than begin/end as in std:: │ │ │ │ │ +vector -- we frequently │ │ │ │ │ +42// need only the size for many queries, and that is most often what is stored │ │ │ │ │ +elsewhere in other │ │ │ │ │ +43// classes, so we hope to reduce unnecessary address arithmetic constructing │ │ │ │ │ +the interface and │ │ │ │ │ +44// accessing the size. The size type is also specifically 32-bit (rather than │ │ │ │ │ +size_t) to match │ │ │ │ │ +45// internal usage and avoid unnecessary conversion to/from 64-bit. │ │ │ │ │ +46// │ │ │ │ │ +47// Question: │ │ │ │ │ +48// Naming is at issue here... formerly called ArrayInterface until that was │ │ │ │ │ +shot down it has │ │ │ │ │ +49// been simplified to Array but needs to be distanced from std::array as it │ │ │ │ │ +DOES NOT store its │ │ │ │ │ +50// own memory and is simply an interface to memory stored elsewhere. │ │ │ │ │ +51// │ │ │ │ │ +52template │ │ │ │ │ +_5_3class _C_o_n_s_t_A_r_r_a_y { │ │ │ │ │ +54 │ │ │ │ │ +55public: │ │ │ │ │ +_5_6 typedef TYPE _v_a_l_u_e___t_y_p_e; │ │ │ │ │ +_5_7 typedef int _s_i_z_e___t_y_p_e; │ │ │ │ │ +58 │ │ │ │ │ +_5_9 typedef TYPE const& _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ │ +_6_0 typedef TYPE const* _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ │ +61 │ │ │ │ │ +_6_2 typedef TYPE& _r_e_f_e_r_e_n_c_e; │ │ │ │ │ +_6_3 typedef TYPE* _i_t_e_r_a_t_o_r; │ │ │ │ │ +64 │ │ │ │ │ +65public: │ │ │ │ │ +66 │ │ │ │ │ +_6_7 _C_o_n_s_t_A_r_r_a_y() : ___b_e_g_i_n(0), ___s_i_z_e(0) { } │ │ │ │ │ +68 │ │ │ │ │ +_6_9 _C_o_n_s_t_A_r_r_a_y(_v_a_l_u_e___t_y_p_e const * ptr, _s_i_z_e___t_y_p_e sizeArg) : │ │ │ │ │ +70 ___b_e_g_i_n(ptr), ___s_i_z_e(sizeArg) { } │ │ │ │ │ +71 │ │ │ │ │ +_7_2 _s_i_z_e___t_y_p_e _s_i_z_e() const { return ___s_i_z_e; } │ │ │ │ │ +73 │ │ │ │ │ +_7_4 bool _e_m_p_t_y() const { return ___s_i_z_e==0; } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 _c_o_n_s_t___r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) const { return ___b_e_g_i_n[index]; } │ │ │ │ │ +_7_7 _c_o_n_s_t___i_t_e_r_a_t_o_r _b_e_g_i_n() const { return ___b_e_g_i_n; } │ │ │ │ │ +_7_8 _c_o_n_s_t___i_t_e_r_a_t_o_r _e_n_d() const { return ___b_e_g_i_n + ___s_i_z_e; } │ │ │ │ │ +79 │ │ │ │ │ +_8_0 _s_i_z_e___t_y_p_e _F_i_n_d_I_n_d_e_x_I_n_4_T_u_p_l_e(_v_a_l_u_e___t_y_p_e value) const { │ │ │ │ │ +81 assert(___s_i_z_e>=4); │ │ │ │ │ +82 if (value == ___b_e_g_i_n[0]) return 0; │ │ │ │ │ +83 if (value == ___b_e_g_i_n[1]) return 1; │ │ │ │ │ +84 if (value == ___b_e_g_i_n[2]) return 2; │ │ │ │ │ +85 if (value == ___b_e_g_i_n[3]) return 3; │ │ │ │ │ +86 assert("FindIndexIn4Tuple() did not find expected value!" == 0); │ │ │ │ │ +87 return -1; │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +_9_0 _s_i_z_e___t_y_p_e _F_i_n_d_I_n_d_e_x(_v_a_l_u_e___t_y_p_e value) const { │ │ │ │ │ +91 for (_s_i_z_e___t_y_p_e i=0; i<_s_i_z_e(); ++i) { │ │ │ │ │ +92 if (value==___b_e_g_i_n[i]) { │ │ │ │ │ +93 return i; │ │ │ │ │ +94 } │ │ │ │ │ +95 } │ │ │ │ │ +96 return -1; │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99protected: │ │ │ │ │ +_1_0_0 _v_a_l_u_e___t_y_p_e const * ___b_e_g_i_n; │ │ │ │ │ +_1_0_1 _s_i_z_e___t_y_p_e ___s_i_z_e; │ │ │ │ │ +102}; │ │ │ │ │ +103 │ │ │ │ │ +104template │ │ │ │ │ +_1_0_5class _A_r_r_a_y : public _C_o_n_s_t_A_r_r_a_y { │ │ │ │ │ +106 │ │ │ │ │ +107public: │ │ │ │ │ +_1_0_8 typedef TYPE _v_a_l_u_e___t_y_p_e; │ │ │ │ │ +_1_0_9 typedef int _s_i_z_e___t_y_p_e; │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 typedef TYPE const& _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 typedef TYPE& _r_e_f_e_r_e_n_c_e; │ │ │ │ │ +_1_1_4 typedef TYPE* _i_t_e_r_a_t_o_r; │ │ │ │ │ +115 │ │ │ │ │ +116public: │ │ │ │ │ +117 │ │ │ │ │ +_1_1_8 _A_r_r_a_y() : _C_o_n_s_t_A_r_r_a_y() { } │ │ │ │ │ +119 │ │ │ │ │ +_1_2_0 _A_r_r_a_y(_v_a_l_u_e___t_y_p_e * ptr, _s_i_z_e___t_y_p_e sizeArg) : _C_o_n_s_t_A_r_r_a_y(ptr, sizeArg) │ │ │ │ │ +{ } │ │ │ │ │ +121 │ │ │ │ │ +122public: │ │ │ │ │ +123 │ │ │ │ │ +_1_2_4 _c_o_n_s_t___r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) const { │ │ │ │ │ +125 return _C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n[index]; │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 _r_e_f_e_r_e_n_c_e _o_p_e_r_a_t_o_r_[_](int index) { │ │ │ │ │ +129 return const_cast<_r_e_f_e_r_e_n_c_e>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n[index]); │ │ │ │ │ +130 } │ │ │ │ │ +131 │ │ │ │ │ +_1_3_2 _i_t_e_r_a_t_o_r _b_e_g_i_n() { │ │ │ │ │ +133 return const_cast<_i_t_e_r_a_t_o_r>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n); │ │ │ │ │ +134 } │ │ │ │ │ +135 │ │ │ │ │ +_1_3_6 _i_t_e_r_a_t_o_r _e_n_d() { │ │ │ │ │ +137 return const_cast<_i_t_e_r_a_t_o_r>(_C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___b_e_g_i_n + │ │ │ │ │ +138 _C_o_n_s_t_A_r_r_a_y_<_T_Y_P_E_>_:_:___s_i_z_e); │ │ │ │ │ +139 } │ │ │ │ │ +140}; │ │ │ │ │ +141 │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_D_3_D_1_1_M_e_s_h_I_n_t_e_r_f_a_c_e │ │ │ │ │ -MeshInterface< D3D11PatchTable > D3D11MeshInterface │ │ │ │ │ -DDeeffiinniittiioonn _d_3_d_1_1_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_:_:_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_:_:___b_e_g_i_n │ │ │ │ │ +value_type const * _begin │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ │ +TYPE value_type │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_b_e_g_i_n │ │ │ │ │ +const_iterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const_reference operator[](int index) const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ │ +TYPE const * const_iterator │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_F_i_n_d_I_n_d_e_x_I_n_4_T_u_p_l_e │ │ │ │ │ +size_type FindIndexIn4Tuple(value_type value) const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_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_:_:_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_:_:_e_m_p_t_y │ │ │ │ │ +bool empty() const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ +ConstArray(value_type const *ptr, size_type sizeArg) │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ │ +TYPE & reference │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:___s_i_z_e │ │ │ │ │ +size_type _size │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_F_i_n_d_I_n_d_e_x │ │ │ │ │ +size_type FindIndex(value_type value) const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ +int size_type │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ │ +TYPE const & const_reference │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_e_n_d │ │ │ │ │ +const_iterator end() const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_i_t_e_r_a_t_o_r │ │ │ │ │ +TYPE * iterator │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_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_:_:_V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_:_:_C_o_n_s_t_A_r_r_a_y │ │ │ │ │ +ConstArray() │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ │ +TYPE value_type │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const_reference operator[](int index) const │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ │ +TYPE & reference │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_s_i_z_e___t_y_p_e │ │ │ │ │ +int size_type │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ │ +TYPE const & const_reference │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_e_n_d │ │ │ │ │ +iterator end() │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_b_e_g_i_n │ │ │ │ │ +iterator begin() │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_A_r_r_a_y │ │ │ │ │ +Array(value_type *ptr, size_type sizeArg) │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_i_t_e_r_a_t_o_r │ │ │ │ │ +TYPE * iterator │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +reference operator[](int index) │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_V_t_r_:_:_A_r_r_a_y_:_:_A_r_r_a_y │ │ │ │ │ +Array() │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_1_8 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_M_e_s_h_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _a_r_r_a_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00797.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/componentInterfaces.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,48 +88,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cpuPatchTable.h File Reference
    │ │ │ │ +
    componentInterfaces.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/crease.h"
    │ │ │ │ +#include "../vtr/types.h"
    │ │ │ │ +#include "../vtr/stackBuffer.h"
    │ │ │ │ #include <vector>
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  CpuPatchTable
     Cpu patch table. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +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 │ │ │ │ │ -cpuPatchTable.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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 "_._._/_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 "_._._/_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   _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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00797_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/componentInterfaces.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    cpuPatchTable.h
    │ │ │ │ +
    componentInterfaces.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,194 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CPU_PATCH_TABLE_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
    │ │ │ │ -
    35#include <vector>
    │ │ │ │ +
    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 "../vtr/types.h"
    │ │ │ │ +
    32#include "../vtr/stackBuffer.h"
    │ │ │ │ +
    33
    │ │ │ │ +
    34#include <vector>
    │ │ │ │ +
    35
    │ │ │ │
    36
    │ │ │ │
    37namespace OpenSubdiv {
    │ │ │ │
    38namespace OPENSUBDIV_VERSION {
    │ │ │ │
    39
    │ │ │ │ -
    40namespace Far{
    │ │ │ │ -
    41 class PatchTable;
    │ │ │ │ -
    42};
    │ │ │ │ -
    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 }
    │ │ │ │ -
    │ │ │ │ -
    66
    │ │ │ │ -
    67 explicit CpuPatchTable(const Far::PatchTable *patchTable);
    │ │ │ │ - │ │ │ │ +
    40namespace Vtr {
    │ │ │ │ +
    41namespace internal {
    │ │ │ │ +
    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//
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    71 return &_patchArrays[0];
    │ │ │ │ -
    72 }
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    73 const int *GetPatchIndexBuffer() const {
    │ │ │ │ -
    74 return &_indexBuffer[0];
    │ │ │ │ -
    75 }
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    77 return &_patchParamBuffer[0];
    │ │ │ │ -
    78 }
    │ │ │ │ -
    │ │ │ │ -
    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();
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    91 if (_varyingPatchArrays.empty()) {
    │ │ │ │ -
    92 return NULL;
    │ │ │ │ -
    93 }
    │ │ │ │ -
    94 return &_varyingPatchArrays[0];
    │ │ │ │ +
    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 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;
    │ │ │ │ +
    96
    │ │ │ │ +
    97private:
    │ │ │ │ +
    98 const Level* _level;
    │ │ │ │ +
    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 std::vector< PatchArrayVector > _fvarPatchArrays;
    │ │ │ │ -
    134 std::vector< std::vector<int> > _fvarIndexBuffers;
    │ │ │ │ -
    135 std::vector< PatchParamVector > _fvarParamBuffers;
    │ │ │ │ -
    136};
    │ │ │ │ -
    │ │ │ │ -
    137
    │ │ │ │ -
    138} // end namespace Osd
    │ │ │ │ -
    139
    │ │ │ │ -
    140} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    141using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    142
    │ │ │ │ -
    143} // end namespace OpenSubdiv
    │ │ │ │ +
    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#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
    │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuPatchTable.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 2015 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,216 +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 │ │ │ │ │ -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 "../far/patchDescriptor.h" │ │ │ │ │ -32#include "../osd/nonCopyable.h" │ │ │ │ │ -33#include "../osd/types.h" │ │ │ │ │ -34 │ │ │ │ │ -35#include │ │ │ │ │ +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 "../vtr/types.h" │ │ │ │ │ +32#include "../vtr/stackBuffer.h" │ │ │ │ │ +33 │ │ │ │ │ +34#include │ │ │ │ │ +35 │ │ │ │ │ 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 │ │ │ │ │ -_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 │ │ │ │ │ -_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() {} │ │ │ │ │ +40namespace Vtr { │ │ │ │ │ +41namespace internal { │ │ │ │ │ +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// │ │ │ │ │ +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 │ │ │ │ │ -_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 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(); │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -_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]; │ │ │ │ │ +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 } │ │ │ │ │ -_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; │ │ │ │ │ +96 │ │ │ │ │ +97private: │ │ │ │ │ +98 const Level* _level; │ │ │ │ │ +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; │ │ │ │ │ +131 } │ │ │ │ │ 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 │ │ │ │ │ -138} // end namespace Osd │ │ │ │ │ -139 │ │ │ │ │ -140} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -141using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -142 │ │ │ │ │ -143} // end namespace OpenSubdiv │ │ │ │ │ +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#endif // OPENSUBDIV3_OSD_CPU_PATCH_TABLE_H │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ -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_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_s_d │ │ │ │ │ - * _c_p_u_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _c_o_m_p_o_n_e_n_t_I_n_t_e_r_f_a_c_e_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00800.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/refinement.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlPatchShaderSource.h File Reference
    │ │ │ │ +
    refinement.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ -
    import "../version.h"
    │ │ │ │ -import "../far/patchDescriptor.h"
    │ │ │ │ -import <string>
    │ │ │ │ +
    #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  MTLPatchShaderSource
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -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 │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00800_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlPatchShaderSource.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/refinement.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlPatchShaderSource.h
    │ │ │ │ +
    refinement.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,75 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#import "../version.h"
    │ │ │ │ -
    29#import "../far/patchDescriptor.h"
    │ │ │ │ -
    30#import <string>
    │ │ │ │ -
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace Osd {
    │ │ │ │ -
    36
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    38 public:
    │ │ │ │ -
    39 static std::string GetCommonShaderSource();
    │ │ │ │ -
    40
    │ │ │ │ -
    41 static std::string GetPatchBasisShaderSource();
    │ │ │ │ -
    42
    │ │ │ │ - │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_REFINEMENT_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
    │ │ │ │ - │ │ │ │ -
    48
    │ │ │ │ -
    53 static std::string GetVertexShaderSource(
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    56 static std::string GetHullShaderSource(
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    59 static std::string GetDomainShaderSource(
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    62};
    │ │ │ │ -
    │ │ │ │ -
    63
    │ │ │ │ -
    64} // end namespace Osd
    │ │ │ │ -
    65
    │ │ │ │ -
    66} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    67using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    68
    │ │ │ │ -
    69} // end namespace OpenSubdiv
    │ │ │ │ +
    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
    │ │ │ │ -
    71#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ -
    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)
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    71public:
    │ │ │ │ +
    72 Refinement(Level const & parent, Level & child, Sdc::Options const& schemeOptions);
    │ │ │ │ +
    73 virtual ~Refinement();
    │ │ │ │ +
    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 { }
    │ │ │ │ +
    112
    │ │ │ │ +
    113 unsigned int _sparse : 1;
    │ │ │ │ +
    114 unsigned int _faceVertsFirst : 1;
    │ │ │ │ +
    115 unsigned int _minimalTopology : 1;
    │ │ │ │ +
    116
    │ │ │ │ +
    117 // Still under consideration:
    │ │ │ │ +
    118 //unsigned int _childToParentMap : 1;
    │ │ │ │ +
    119 };
    │ │ │ │ +
    120
    │ │ │ │ +
    121 void refine(Options options = Options());
    │ │ │ │ +
    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:
    │ │ │ │ +
    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) { }
    │ │ │ │ +
    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
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlPatchShaderSource.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 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,88 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -27 │ │ │ │ │ -28#import "../version.h" │ │ │ │ │ -29#import "../far/patchDescriptor.h" │ │ │ │ │ -30#import │ │ │ │ │ -31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ -36 │ │ │ │ │ -_3_7class _M_T_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ -38 public: │ │ │ │ │ -_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -40 │ │ │ │ │ -_4_1 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(); │ │ │ │ │ -42 │ │ │ │ │ -_4_3 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); │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_REFINEMENT_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_REFINEMENT_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 │ │ │ │ │ -_4_5 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); │ │ │ │ │ +45class FVarRefinement; │ │ │ │ │ 46 │ │ │ │ │ -_4_7 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); │ │ │ │ │ -48 │ │ │ │ │ -_5_3 static std::string _G_e_t_V_e_r_t_e_x_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -54 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -55 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -_5_6 static std::string _G_e_t_H_u_l_l_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -57 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -58 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -_5_9 static std::string _G_e_t_D_o_m_a_i_n_S_h_a_d_e_r_S_o_u_r_c_e( │ │ │ │ │ -60 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e type, │ │ │ │ │ -61 _F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_y_p_e fvarType); │ │ │ │ │ -62}; │ │ │ │ │ -63 │ │ │ │ │ -64} // end namespace Osd │ │ │ │ │ -65 │ │ │ │ │ -66} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -67using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -68 │ │ │ │ │ -69} // end namespace OpenSubdiv │ │ │ │ │ +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 │ │ │ │ │ -71#endif // OPENSUBDIV3_OSD_MTL_PATCH_SHADER_SOURCE │ │ │ │ │ +71public: │ │ │ │ │ +72 Refinement(Level const & parent, Level & child, Sdc::Options const& │ │ │ │ │ +schemeOptions); │ │ │ │ │ +73 virtual ~Refinement(); │ │ │ │ │ +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 { } │ │ │ │ │ +112 │ │ │ │ │ +113 unsigned int _sparse : 1; │ │ │ │ │ +114 unsigned int _faceVertsFirst : 1; │ │ │ │ │ +115 unsigned int _minimalTopology : 1; │ │ │ │ │ +116 │ │ │ │ │ +117 // Still under consideration: │ │ │ │ │ +118 //unsigned int _childToParentMap : 1; │ │ │ │ │ +119 }; │ │ │ │ │ +120 │ │ │ │ │ +121 void refine(Options options = Options()); │ │ │ │ │ +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: │ │ │ │ │ +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) { } │ │ │ │ │ +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 */ │ │ │ │ │ _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 │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_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_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() │ │ │ │ │ -_O_p_e_n_S_u_b_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_:_:_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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _m_t_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _r_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00803.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/level.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,49 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    clEvaluator.h File Reference
    │ │ │ │ +
    level.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/opencl.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include "../osd/bufferDescriptor.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/crease.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │ +#include "../vtr/types.h"
    │ │ │ │ +#include <algorithm>
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstring>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

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

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,27 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -clEvaluator.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +level.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_c_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 "_._._/_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 │ │ │ │ │ +#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_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -  OpenCL stencil table. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _C_L_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_l_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _l_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00803_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/level.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    clEvaluator.h
    │ │ │ │ +
    level.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,1284 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_CL_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CL_EVALUATOR_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include "../osd/opencl.h"
    │ │ │ │ -
    31#include "../osd/types.h"
    │ │ │ │ -
    32#include "../osd/bufferDescriptor.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 "../sdc/options.h"
    │ │ │ │ +
    32#include "../vtr/types.h"
    │ │ │ │
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Far {
    │ │ │ │ -
    38 class PatchTable;
    │ │ │ │ -
    39 class StencilTable;
    │ │ │ │ -
    40 class LimitStencilTable;
    │ │ │ │ -
    41}
    │ │ │ │ +
    34#include <algorithm>
    │ │ │ │ +
    35#include <vector>
    │ │ │ │ +
    36#include <cassert>
    │ │ │ │ +
    37#include <cstring>
    │ │ │ │ +
    38
    │ │ │ │ +
    39
    │ │ │ │ +
    40namespace OpenSubdiv {
    │ │ │ │ +
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │
    42
    │ │ │ │ -
    43namespace Osd {
    │ │ │ │ -
    44
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    53public:
    │ │ │ │ -
    54 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    55 static CLStencilTable *Create(Far::StencilTable const *stencilTable,
    │ │ │ │ -
    56 DEVICE_CONTEXT context) {
    │ │ │ │ -
    57 return new CLStencilTable(stencilTable, context->GetContext());
    │ │ │ │ -
    58 }
    │ │ │ │ -
    │ │ │ │ -
    59
    │ │ │ │ -
    60 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    62 Far::LimitStencilTable const *limitStencilTable,
    │ │ │ │ -
    63 DEVICE_CONTEXT context) {
    │ │ │ │ -
    64 return new CLStencilTable(limitStencilTable, context->GetContext());
    │ │ │ │ -
    65 }
    │ │ │ │ -
    │ │ │ │ -
    66
    │ │ │ │ -
    67 CLStencilTable(Far::StencilTable const *stencilTable,
    │ │ │ │ -
    68 cl_context clContext);
    │ │ │ │ -
    69 CLStencilTable(Far::LimitStencilTable const *limitStencilTable,
    │ │ │ │ -
    70 cl_context clContext);
    │ │ │ │ - │ │ │ │ -
    72
    │ │ │ │ -
    73 // interfaces needed for CLComputeKernel
    │ │ │ │ -
    74 cl_mem GetSizesBuffer() const { return _sizes; }
    │ │ │ │ -
    75 cl_mem GetOffsetsBuffer() const { return _offsets; }
    │ │ │ │ -
    76 cl_mem GetIndicesBuffer() const { return _indices; }
    │ │ │ │ -
    77 cl_mem GetWeightsBuffer() const { return _weights; }
    │ │ │ │ -
    78 cl_mem GetDuWeightsBuffer() const { return _duWeights; }
    │ │ │ │ -
    79 cl_mem GetDvWeightsBuffer() const { return _dvWeights; }
    │ │ │ │ -
    80 cl_mem GetDuuWeightsBuffer() const { return _duuWeights; }
    │ │ │ │ -
    81 cl_mem GetDuvWeightsBuffer() const { return _duvWeights; }
    │ │ │ │ -
    82 cl_mem GetDvvWeightsBuffer() const { return _dvvWeights; }
    │ │ │ │ -
    83 int GetNumStencils() const { return _numStencils; }
    │ │ │ │ +
    43namespace Vtr {
    │ │ │ │ +
    44namespace internal {
    │ │ │ │ +
    45
    │ │ │ │ +
    46class Refinement;
    │ │ │ │ +
    47class TriRefinement;
    │ │ │ │ +
    48class QuadRefinement;
    │ │ │ │ +
    49class FVarRefinement;
    │ │ │ │ +
    50class FVarLevel;
    │ │ │ │ +
    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 {
    │ │ │ │
    84
    │ │ │ │ -
    85private:
    │ │ │ │ -
    86 cl_mem _sizes;
    │ │ │ │ -
    87 cl_mem _offsets;
    │ │ │ │ -
    88 cl_mem _indices;
    │ │ │ │ -
    89 cl_mem _weights;
    │ │ │ │ -
    90 cl_mem _duWeights;
    │ │ │ │ -
    91 cl_mem _dvWeights;
    │ │ │ │ -
    92 cl_mem _duuWeights;
    │ │ │ │ -
    93 cl_mem _duvWeights;
    │ │ │ │ -
    94 cl_mem _dvvWeights;
    │ │ │ │ -
    95 int _numStencils;
    │ │ │ │ -
    96};
    │ │ │ │ -
    │ │ │ │ -
    97
    │ │ │ │ -
    98// ---------------------------------------------------------------------------
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    101public:
    │ │ │ │ -
    102 typedef bool Instantiatable;
    │ │ │ │ -
    103
    │ │ │ │ -
    105 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    106 static CLEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    107 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    108 BufferDescriptor const &duDesc,
    │ │ │ │ -
    109 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    110 DEVICE_CONTEXT deviceContext) {
    │ │ │ │ -
    111 return Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    112 deviceContext->GetContext(),
    │ │ │ │ -
    113 deviceContext->GetCommandQueue());
    │ │ │ │ -
    114 }
    │ │ │ │ -
    │ │ │ │ +
    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 static CLEvaluator * Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    117 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    118 BufferDescriptor const &duDesc,
    │ │ │ │ -
    119 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    120 cl_context clContext,
    │ │ │ │ -
    121 cl_command_queue clCommandQueue) {
    │ │ │ │ -
    122 CLEvaluator *instance = new CLEvaluator(clContext, clCommandQueue);
    │ │ │ │ -
    123 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc))
    │ │ │ │ -
    124 return instance;
    │ │ │ │ -
    125 delete instance;
    │ │ │ │ -
    126 return NULL;
    │ │ │ │ -
    127 }
    │ │ │ │ -
    │ │ │ │ -
    128
    │ │ │ │ -
    130 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    131 static CLEvaluator *Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    132 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    133 BufferDescriptor const &duDesc,
    │ │ │ │ -
    134 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    135 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    136 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    137 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    138 DEVICE_CONTEXT deviceContext) {
    │ │ │ │ -
    139 return Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    140 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    141 deviceContext->GetContext(),
    │ │ │ │ -
    142 deviceContext->GetCommandQueue());
    │ │ │ │ -
    143 }
    │ │ │ │ -
    │ │ │ │ -
    144
    │ │ │ │ -
    │ │ │ │ -
    145 static CLEvaluator * Create(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    146 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    147 BufferDescriptor const &duDesc,
    │ │ │ │ -
    148 BufferDescriptor const &dvDesc,
    │ │ │ │ -
    149 BufferDescriptor const &duuDesc,
    │ │ │ │ -
    150 BufferDescriptor const &duvDesc,
    │ │ │ │ -
    151 BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    152 cl_context clContext,
    │ │ │ │ -
    153 cl_command_queue clCommandQueue) {
    │ │ │ │ -
    154 CLEvaluator *instance = new CLEvaluator(clContext, clCommandQueue);
    │ │ │ │ -
    155 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    156 duuDesc, duvDesc, dvvDesc))
    │ │ │ │ -
    157 return instance;
    │ │ │ │ -
    158 delete instance;
    │ │ │ │ -
    159 return NULL;
    │ │ │ │ -
    160 }
    │ │ │ │ -
    │ │ │ │ -
    161
    │ │ │ │ -
    163 CLEvaluator(cl_context context, cl_command_queue queue);
    │ │ │ │ -
    164
    │ │ │ │ - │ │ │ │ +
    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
    │ │ │ │ -
    217 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    218 typename STENCIL_TABLE, typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    219 static bool EvalStencils(
    │ │ │ │ -
    220 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    221 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    222 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    223 CLEvaluator const *instance,
    │ │ │ │ -
    224 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    225 unsigned int numStartEvents=0,
    │ │ │ │ -
    226 const cl_event* startEvents=NULL,
    │ │ │ │ -
    227 cl_event* endEvent=NULL) {
    │ │ │ │ +
    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 if (instance) {
    │ │ │ │ -
    230 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    231 dstBuffer, dstDesc,
    │ │ │ │ -
    232 stencilTable,
    │ │ │ │ -
    233 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    234 } else {
    │ │ │ │ -
    235 // Create an instance on demand (slow)
    │ │ │ │ -
    236 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    239 deviceContext);
    │ │ │ │ -
    240 if (instance) {
    │ │ │ │ -
    241 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    242 dstBuffer, dstDesc,
    │ │ │ │ -
    243 stencilTable,
    │ │ │ │ -
    244 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    245 delete instance;
    │ │ │ │ -
    246 return r;
    │ │ │ │ -
    247 }
    │ │ │ │ -
    248 return false;
    │ │ │ │ -
    249 }
    │ │ │ │ -
    250 }
    │ │ │ │ -
    │ │ │ │ -
    251
    │ │ │ │ -
    307 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    308 typename STENCIL_TABLE, typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    309 static bool EvalStencils(
    │ │ │ │ -
    310 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    311 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    312 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    313 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    314 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    315 CLEvaluator const *instance,
    │ │ │ │ -
    316 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    317 unsigned int numStartEvents=0,
    │ │ │ │ -
    318 const cl_event* startEvents=NULL,
    │ │ │ │ -
    319 cl_event* endEvent=NULL) {
    │ │ │ │ +
    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
    │ │ │ │ -
    321 if (instance) {
    │ │ │ │ -
    322 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    323 dstBuffer, dstDesc,
    │ │ │ │ -
    324 duBuffer, duDesc,
    │ │ │ │ -
    325 dvBuffer, dvDesc,
    │ │ │ │ -
    326 stencilTable,
    │ │ │ │ -
    327 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    328 } else {
    │ │ │ │ -
    329 // Create an instance on demand (slow)
    │ │ │ │ -
    330 instance = Create(srcDesc, dstDesc, duDesc, dvDesc,
    │ │ │ │ -
    331 deviceContext);
    │ │ │ │ -
    332 if (instance) {
    │ │ │ │ -
    333 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    334 dstBuffer, dstDesc,
    │ │ │ │ -
    335 duBuffer, duDesc,
    │ │ │ │ -
    336 dvBuffer, dvDesc,
    │ │ │ │ -
    337 stencilTable,
    │ │ │ │ -
    338 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    339 delete instance;
    │ │ │ │ -
    340 return r;
    │ │ │ │ -
    341 }
    │ │ │ │ -
    342 return false;
    │ │ │ │ -
    343 }
    │ │ │ │ -
    344 }
    │ │ │ │ -
    │ │ │ │ -
    345
    │ │ │ │ -
    419 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    420 typename STENCIL_TABLE, typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    421 static bool EvalStencils(
    │ │ │ │ -
    422 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    423 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    424 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    425 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    426 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    427 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    428 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    429 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    430 CLEvaluator const *instance,
    │ │ │ │ -
    431 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    432 unsigned int numStartEvents=0,
    │ │ │ │ -
    433 const cl_event* startEvents=NULL,
    │ │ │ │ -
    434 cl_event* endEvent=NULL) {
    │ │ │ │ -
    435
    │ │ │ │ -
    436 if (instance) {
    │ │ │ │ -
    437 return instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    438 dstBuffer, dstDesc,
    │ │ │ │ -
    439 duBuffer, duDesc,
    │ │ │ │ -
    440 dvBuffer, dvDesc,
    │ │ │ │ -
    441 duuBuffer, duuDesc,
    │ │ │ │ -
    442 duvBuffer, duvDesc,
    │ │ │ │ -
    443 dvvBuffer, dvvDesc,
    │ │ │ │ -
    444 stencilTable,
    │ │ │ │ -
    445 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    446 } else {
    │ │ │ │ -
    447 // Create an instance on demand (slow)
    │ │ │ │ -
    448 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    449 duDesc, dvDesc,
    │ │ │ │ -
    450 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    451 deviceContext);
    │ │ │ │ -
    452 if (instance) {
    │ │ │ │ -
    453 bool r = instance->EvalStencils(srcBuffer, srcDesc,
    │ │ │ │ -
    454 dstBuffer, dstDesc,
    │ │ │ │ -
    455 duBuffer, duDesc,
    │ │ │ │ -
    456 dvBuffer, dvDesc,
    │ │ │ │ -
    457 duuBuffer, duuDesc,
    │ │ │ │ -
    458 duvBuffer, duvDesc,
    │ │ │ │ -
    459 dvvBuffer, dvvDesc,
    │ │ │ │ -
    460 stencilTable,
    │ │ │ │ -
    461 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    462 delete instance;
    │ │ │ │ -
    463 return r;
    │ │ │ │ -
    464 }
    │ │ │ │ -
    465 return false;
    │ │ │ │ -
    466 }
    │ │ │ │ -
    467 }
    │ │ │ │ -
    │ │ │ │ -
    468
    │ │ │ │ -
    499 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    501 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    502 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    503 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    504 unsigned int numStartEvents=0,
    │ │ │ │ -
    505 const cl_event* startEvents=NULL,
    │ │ │ │ -
    506 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    507 return EvalStencils(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    508 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    509 stencilTable->GetSizesBuffer(),
    │ │ │ │ -
    510 stencilTable->GetOffsetsBuffer(),
    │ │ │ │ -
    511 stencilTable->GetIndicesBuffer(),
    │ │ │ │ -
    512 stencilTable->GetWeightsBuffer(),
    │ │ │ │ -
    513 0,
    │ │ │ │ -
    514 stencilTable->GetNumStencils(),
    │ │ │ │ -
    515 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    516 }
    │ │ │ │ -
    │ │ │ │ -
    517
    │ │ │ │ -
    560 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    562 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    563 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    564 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    565 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    566 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    567 unsigned int numStartEvents=0,
    │ │ │ │ -
    568 const cl_event* startEvents=NULL,
    │ │ │ │ -
    569 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    570 return EvalStencils(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    571 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    572 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    573 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    574 stencilTable->GetSizesBuffer(),
    │ │ │ │ -
    575 stencilTable->GetOffsetsBuffer(),
    │ │ │ │ -
    576 stencilTable->GetIndicesBuffer(),
    │ │ │ │ -
    577 stencilTable->GetWeightsBuffer(),
    │ │ │ │ -
    578 stencilTable->GetDuWeightsBuffer(),
    │ │ │ │ -
    579 stencilTable->GetDvWeightsBuffer(),
    │ │ │ │ -
    580 0,
    │ │ │ │ -
    581 stencilTable->GetNumStencils(),
    │ │ │ │ -
    582 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    583 }
    │ │ │ │ -
    │ │ │ │ -
    584
    │ │ │ │ -
    645 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    647 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    648 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    649 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    650 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    651 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    652 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    653 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    654 STENCIL_TABLE const *stencilTable,
    │ │ │ │ -
    655 unsigned int numStartEvents=0,
    │ │ │ │ -
    656 const cl_event* startEvents=NULL,
    │ │ │ │ -
    657 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    658 return EvalStencils(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    659 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    660 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    661 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    662 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc,
    │ │ │ │ -
    663 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc,
    │ │ │ │ -
    664 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc,
    │ │ │ │ -
    665 stencilTable->GetSizesBuffer(),
    │ │ │ │ -
    666 stencilTable->GetOffsetsBuffer(),
    │ │ │ │ -
    667 stencilTable->GetIndicesBuffer(),
    │ │ │ │ -
    668 stencilTable->GetWeightsBuffer(),
    │ │ │ │ -
    669 stencilTable->GetDuWeightsBuffer(),
    │ │ │ │ -
    670 stencilTable->GetDvWeightsBuffer(),
    │ │ │ │ -
    671 stencilTable->GetDuuWeightsBuffer(),
    │ │ │ │ -
    672 stencilTable->GetDuvWeightsBuffer(),
    │ │ │ │ -
    673 stencilTable->GetDvvWeightsBuffer(),
    │ │ │ │ -
    674 0,
    │ │ │ │ -
    675 stencilTable->GetNumStencils(),
    │ │ │ │ -
    676 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    677 }
    │ │ │ │ -
    │ │ │ │ -
    678
    │ │ │ │ -
    681 bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    682 cl_mem dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    683 cl_mem sizes,
    │ │ │ │ -
    684 cl_mem offsets,
    │ │ │ │ -
    685 cl_mem indices,
    │ │ │ │ -
    686 cl_mem weights,
    │ │ │ │ -
    687 int start,
    │ │ │ │ -
    688 int end,
    │ │ │ │ -
    689 unsigned int numStartEvents=0,
    │ │ │ │ -
    690 const cl_event* startEvents=NULL,
    │ │ │ │ -
    691 cl_event* endEvent=NULL) const;
    │ │ │ │ +
    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
    │ │ │ │ -
    741 bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    742 cl_mem dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    743 cl_mem du, BufferDescriptor const &duDesc,
    │ │ │ │ -
    744 cl_mem dv, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    745 cl_mem sizes,
    │ │ │ │ -
    746 cl_mem offsets,
    │ │ │ │ -
    747 cl_mem indices,
    │ │ │ │ -
    748 cl_mem weights,
    │ │ │ │ -
    749 cl_mem duWeights,
    │ │ │ │ -
    750 cl_mem dvWeights,
    │ │ │ │ -
    751 int start,
    │ │ │ │ -
    752 int end,
    │ │ │ │ -
    753 unsigned int numStartEvents=0,
    │ │ │ │ -
    754 const cl_event* startEvents=NULL,
    │ │ │ │ -
    755 cl_event* endEvent=NULL) const;
    │ │ │ │ +
    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
    │ │ │ │ -
    823 bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    824 cl_mem dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    825 cl_mem du, BufferDescriptor const &duDesc,
    │ │ │ │ -
    826 cl_mem dv, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    827 cl_mem duu, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    828 cl_mem duv, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    829 cl_mem dvv, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    830 cl_mem sizes,
    │ │ │ │ -
    831 cl_mem offsets,
    │ │ │ │ -
    832 cl_mem indices,
    │ │ │ │ -
    833 cl_mem weights,
    │ │ │ │ -
    834 cl_mem duWeights,
    │ │ │ │ -
    835 cl_mem dvWeights,
    │ │ │ │ -
    836 cl_mem duuWeights,
    │ │ │ │ -
    837 cl_mem duvWeights,
    │ │ │ │ -
    838 cl_mem dvvWeights,
    │ │ │ │ -
    839 int start,
    │ │ │ │ -
    840 int end,
    │ │ │ │ -
    841 unsigned int numStartEvents=0,
    │ │ │ │ -
    842 const cl_event* startEvents=NULL,
    │ │ │ │ -
    843 cl_event* endEvent=NULL) const;
    │ │ │ │ -
    844
    │ │ │ │ -
    850
    │ │ │ │ -
    899 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    900 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    901 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    902 static bool EvalPatches(
    │ │ │ │ -
    903 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    904 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    905 int numPatchCoords,
    │ │ │ │ -
    906 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    907 PATCH_TABLE *patchTable,
    │ │ │ │ -
    908 CLEvaluator const *instance,
    │ │ │ │ -
    909 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    910 unsigned int numStartEvents=0,
    │ │ │ │ -
    911 const cl_event* startEvents=NULL,
    │ │ │ │ -
    912 cl_event* endEvent=NULL) {
    │ │ │ │ -
    913
    │ │ │ │ -
    914 if (instance) {
    │ │ │ │ -
    915 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    916 dstBuffer, dstDesc,
    │ │ │ │ -
    917 numPatchCoords, patchCoords,
    │ │ │ │ -
    918 patchTable,
    │ │ │ │ -
    919 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    920 } else {
    │ │ │ │ -
    921 // Create an instance on demand (slow)
    │ │ │ │ -
    922 (void)deviceContext; // unused
    │ │ │ │ -
    923 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    926 deviceContext);
    │ │ │ │ -
    927 if (instance) {
    │ │ │ │ -
    928 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    929 dstBuffer, dstDesc,
    │ │ │ │ -
    930 numPatchCoords, patchCoords,
    │ │ │ │ -
    931 patchTable,
    │ │ │ │ -
    932 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    933 delete instance;
    │ │ │ │ -
    934 return r;
    │ │ │ │ -
    935 }
    │ │ │ │ -
    936 return false;
    │ │ │ │ -
    937 }
    │ │ │ │ -
    938 }
    │ │ │ │ -
    │ │ │ │ -
    939
    │ │ │ │ -
    1000 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1001 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    1002 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    1003 static bool EvalPatches(
    │ │ │ │ -
    1004 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1005 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1006 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1007 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1008 int numPatchCoords,
    │ │ │ │ -
    1009 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1010 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1011 CLEvaluator const *instance,
    │ │ │ │ -
    1012 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    1013 unsigned int numStartEvents=0,
    │ │ │ │ -
    1014 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1015 cl_event* endEvent=NULL) {
    │ │ │ │ -
    1016
    │ │ │ │ -
    1017 if (instance) {
    │ │ │ │ -
    1018 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    1019 dstBuffer, dstDesc,
    │ │ │ │ -
    1020 duBuffer, duDesc,
    │ │ │ │ -
    1021 dvBuffer, dvDesc,
    │ │ │ │ -
    1022 numPatchCoords, patchCoords,
    │ │ │ │ -
    1023 patchTable,
    │ │ │ │ -
    1024 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1025 } else {
    │ │ │ │ -
    1026 // Create an instance on demand (slow)
    │ │ │ │ -
    1027 (void)deviceContext; // unused
    │ │ │ │ -
    1028 instance = Create(srcDesc, dstDesc, duDesc, dvDesc, deviceContext);
    │ │ │ │ -
    1029 if (instance) {
    │ │ │ │ -
    1030 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    1031 dstBuffer, dstDesc,
    │ │ │ │ -
    1032 duBuffer, duDesc,
    │ │ │ │ -
    1033 dvBuffer, dvDesc,
    │ │ │ │ -
    1034 numPatchCoords, patchCoords,
    │ │ │ │ -
    1035 patchTable,
    │ │ │ │ -
    1036 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1037 delete instance;
    │ │ │ │ -
    1038 return r;
    │ │ │ │ -
    1039 }
    │ │ │ │ -
    1040 return false;
    │ │ │ │ -
    1041 }
    │ │ │ │ -
    1042 }
    │ │ │ │ -
    │ │ │ │ -
    1043
    │ │ │ │ -
    1122 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1123 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    1124 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    1125 static bool EvalPatches(
    │ │ │ │ -
    1126 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1127 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1128 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1129 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1130 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1131 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1132 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1133 int numPatchCoords,
    │ │ │ │ -
    1134 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1135 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1136 CLEvaluator const *instance,
    │ │ │ │ -
    1137 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    1138 unsigned int numStartEvents=0,
    │ │ │ │ -
    1139 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1140 cl_event* endEvent=NULL) {
    │ │ │ │ -
    1141
    │ │ │ │ -
    1142 if (instance) {
    │ │ │ │ -
    1143 return instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    1144 dstBuffer, dstDesc,
    │ │ │ │ -
    1145 duBuffer, duDesc,
    │ │ │ │ -
    1146 dvBuffer, dvDesc,
    │ │ │ │ -
    1147 duuBuffer, duuDesc,
    │ │ │ │ -
    1148 duvBuffer, duvDesc,
    │ │ │ │ -
    1149 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1150 numPatchCoords, patchCoords,
    │ │ │ │ -
    1151 patchTable,
    │ │ │ │ -
    1152 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1153 } else {
    │ │ │ │ -
    1154 // Create an instance on demand (slow)
    │ │ │ │ -
    1155 (void)deviceContext; // unused
    │ │ │ │ -
    1156 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1157 duDesc, dvDesc,
    │ │ │ │ -
    1158 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    1159 deviceContext);
    │ │ │ │ -
    1160 if (instance) {
    │ │ │ │ -
    1161 bool r = instance->EvalPatches(srcBuffer, srcDesc,
    │ │ │ │ -
    1162 dstBuffer, dstDesc,
    │ │ │ │ -
    1163 duBuffer, duDesc,
    │ │ │ │ -
    1164 dvBuffer, dvDesc,
    │ │ │ │ -
    1165 duuBuffer, duuDesc,
    │ │ │ │ -
    1166 duvBuffer, duvDesc,
    │ │ │ │ -
    1167 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1168 numPatchCoords, patchCoords,
    │ │ │ │ -
    1169 patchTable,
    │ │ │ │ -
    1170 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1171 delete instance;
    │ │ │ │ -
    1172 return r;
    │ │ │ │ -
    1173 }
    │ │ │ │ -
    1174 return false;
    │ │ │ │ -
    1175 }
    │ │ │ │ -
    1176 }
    │ │ │ │ -
    │ │ │ │ -
    1177
    │ │ │ │ -
    1215 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1216 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1218 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1219 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1220 int numPatchCoords,
    │ │ │ │ -
    1221 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1222 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1223 unsigned int numStartEvents=0,
    │ │ │ │ -
    1224 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1225 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1226
    │ │ │ │ -
    1227 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1228 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1229 0, BufferDescriptor(),
    │ │ │ │ -
    1230 0, BufferDescriptor(),
    │ │ │ │ -
    1231 numPatchCoords,
    │ │ │ │ -
    1232 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    1233 patchTable->GetPatchArrayBuffer(),
    │ │ │ │ -
    1234 patchTable->GetPatchIndexBuffer(),
    │ │ │ │ -
    1235 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    1236 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1237 }
    │ │ │ │ -
    │ │ │ │ -
    1238
    │ │ │ │ -
    1286 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1287 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1289 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1290 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1291 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1292 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1293 int numPatchCoords,
    │ │ │ │ -
    1294 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1295 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1296 unsigned int numStartEvents=0,
    │ │ │ │ -
    1297 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1298 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1299
    │ │ │ │ -
    1300 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1301 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1302 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    1303 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    1304 numPatchCoords,
    │ │ │ │ -
    1305 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    1306 patchTable->GetPatchArrayBuffer(),
    │ │ │ │ -
    1307 patchTable->GetPatchIndexBuffer(),
    │ │ │ │ -
    1308 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    1309 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1310 }
    │ │ │ │ -
    │ │ │ │ -
    1311
    │ │ │ │ -
    1377 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1378 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1380 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1381 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1382 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1383 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1384 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1385 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1386 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1387 int numPatchCoords,
    │ │ │ │ -
    1388 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1389 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1390 unsigned int numStartEvents=0,
    │ │ │ │ -
    1391 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1392 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1393
    │ │ │ │ -
    1394 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1395 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1396 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    1397 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    1398 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc,
    │ │ │ │ -
    1399 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc,
    │ │ │ │ -
    1400 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc,
    │ │ │ │ -
    1401 numPatchCoords,
    │ │ │ │ -
    1402 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    1403 patchTable->GetPatchArrayBuffer(),
    │ │ │ │ -
    1404 patchTable->GetPatchIndexBuffer(),
    │ │ │ │ -
    1405 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    1406 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1407 }
    │ │ │ │ -
    │ │ │ │ -
    1408
    │ │ │ │ -
    1409 bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1410 cl_mem dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1411 cl_mem du, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1412 cl_mem dv, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1413 int numPatchCoords,
    │ │ │ │ -
    1414 cl_mem patchCoordsBuffer,
    │ │ │ │ -
    1415 cl_mem patchArrayBuffer,
    │ │ │ │ -
    1416 cl_mem patchIndexBuffer,
    │ │ │ │ -
    1417 cl_mem patchParamsBuffer,
    │ │ │ │ -
    1418 unsigned int numStartEvents=0,
    │ │ │ │ -
    1419 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1420 cl_event* endEvent=NULL) const;
    │ │ │ │ -
    1421
    │ │ │ │ -
    1422 bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1423 cl_mem dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1424 cl_mem du, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1425 cl_mem dv, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1426 cl_mem duu, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1427 cl_mem duv, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1428 cl_mem dvv, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1429 int numPatchCoords,
    │ │ │ │ -
    1430 cl_mem patchCoordsBuffer,
    │ │ │ │ -
    1431 cl_mem patchArrayBuffer,
    │ │ │ │ -
    1432 cl_mem patchIndexBuffer,
    │ │ │ │ -
    1433 cl_mem patchParamsBuffer,
    │ │ │ │ -
    1434 unsigned int numStartEvents=0,
    │ │ │ │ -
    1435 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1436 cl_event* endEvent=NULL) const;
    │ │ │ │ -
    1437
    │ │ │ │ -
    1486 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1487 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    1488 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1490 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1491 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1492 int numPatchCoords,
    │ │ │ │ -
    1493 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1494 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1495 CLEvaluator const *instance,
    │ │ │ │ -
    1496 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    1497 unsigned int numStartEvents=0,
    │ │ │ │ -
    1498 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1499 cl_event* endEvent=NULL) {
    │ │ │ │ -
    1500
    │ │ │ │ -
    1501 if (instance) {
    │ │ │ │ -
    1502 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1503 srcBuffer, srcDesc,
    │ │ │ │ -
    1504 dstBuffer, dstDesc,
    │ │ │ │ -
    1505 numPatchCoords, patchCoords,
    │ │ │ │ -
    1506 patchTable,
    │ │ │ │ -
    1507 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1508 } else {
    │ │ │ │ -
    1509 // Create an instance on demand (slow)
    │ │ │ │ -
    1510 (void)deviceContext; // unused
    │ │ │ │ -
    1511 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    1514 deviceContext);
    │ │ │ │ -
    1515 if (instance) {
    │ │ │ │ -
    1516 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1517 srcBuffer, srcDesc,
    │ │ │ │ -
    1518 dstBuffer, dstDesc,
    │ │ │ │ -
    1519 numPatchCoords, patchCoords,
    │ │ │ │ -
    1520 patchTable,
    │ │ │ │ -
    1521 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1522 delete instance;
    │ │ │ │ -
    1523 return r;
    │ │ │ │ -
    1524 }
    │ │ │ │ -
    1525 return false;
    │ │ │ │ -
    1526 }
    │ │ │ │ -
    1527 }
    │ │ │ │ -
    │ │ │ │ -
    1528
    │ │ │ │ -
    1566 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1567 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1569 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1570 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1571 int numPatchCoords,
    │ │ │ │ -
    1572 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1573 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1574 unsigned int numStartEvents=0,
    │ │ │ │ -
    1575 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1576 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1577
    │ │ │ │ -
    1578 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1579 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1580 0, BufferDescriptor(),
    │ │ │ │ -
    1581 0, BufferDescriptor(),
    │ │ │ │ -
    1582 numPatchCoords,
    │ │ │ │ -
    1583 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    1584 patchTable->GetVaryingPatchArrayBuffer(),
    │ │ │ │ -
    1585 patchTable->GetVaryingPatchIndexBuffer(),
    │ │ │ │ -
    1586 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    1587 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1588 }
    │ │ │ │ -
    │ │ │ │ -
    1589
    │ │ │ │ -
    1650 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1651 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    1652 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1654 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1655 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1656 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1657 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1658 int numPatchCoords,
    │ │ │ │ -
    1659 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1660 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1661 CLEvaluator const *instance,
    │ │ │ │ -
    1662 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    1663 unsigned int numStartEvents=0,
    │ │ │ │ -
    1664 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1665 cl_event* endEvent=NULL) {
    │ │ │ │ -
    1666
    │ │ │ │ -
    1667 if (instance) {
    │ │ │ │ -
    1668 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1669 srcBuffer, srcDesc,
    │ │ │ │ -
    1670 dstBuffer, dstDesc,
    │ │ │ │ -
    1671 duBuffer, duDesc,
    │ │ │ │ -
    1672 dvBuffer, dvDesc,
    │ │ │ │ -
    1673 numPatchCoords, patchCoords,
    │ │ │ │ -
    1674 patchTable,
    │ │ │ │ -
    1675 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1676 } else {
    │ │ │ │ -
    1677 // Create an instance on demand (slow)
    │ │ │ │ -
    1678 (void)deviceContext; // unused
    │ │ │ │ -
    1679 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1680 duDesc, dvDesc,
    │ │ │ │ -
    1681 deviceContext);
    │ │ │ │ -
    1682 if (instance) {
    │ │ │ │ -
    1683 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1684 srcBuffer, srcDesc,
    │ │ │ │ -
    1685 dstBuffer, dstDesc,
    │ │ │ │ -
    1686 duBuffer, duDesc,
    │ │ │ │ -
    1687 dvBuffer, dvDesc,
    │ │ │ │ -
    1688 numPatchCoords, patchCoords,
    │ │ │ │ -
    1689 patchTable,
    │ │ │ │ -
    1690 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1691 delete instance;
    │ │ │ │ -
    1692 return r;
    │ │ │ │ -
    1693 }
    │ │ │ │ -
    1694 return false;
    │ │ │ │ -
    1695 }
    │ │ │ │ -
    1696 }
    │ │ │ │ -
    │ │ │ │ -
    1697
    │ │ │ │ -
    1747 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1748 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1750 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1751 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1752 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1753 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1754 int numPatchCoords,
    │ │ │ │ -
    1755 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1756 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1757 unsigned int numStartEvents=0,
    │ │ │ │ -
    1758 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1759 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1760
    │ │ │ │ -
    1761 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1762 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1763 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    1764 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    1765 numPatchCoords,
    │ │ │ │ -
    1766 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    1767 patchTable->GetVaryingPatchArrayBuffer(),
    │ │ │ │ -
    1768 patchTable->GetVaryingPatchIndexBuffer(),
    │ │ │ │ -
    1769 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    1770 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1771 }
    │ │ │ │ -
    │ │ │ │ -
    1772
    │ │ │ │ -
    1851 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1852 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    1853 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1855 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1856 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1857 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1858 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1859 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1860 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1861 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1862 int numPatchCoords,
    │ │ │ │ -
    1863 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1864 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1865 CLEvaluator const *instance,
    │ │ │ │ -
    1866 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    1867 unsigned int numStartEvents=0,
    │ │ │ │ -
    1868 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1869 cl_event* endEvent=NULL) {
    │ │ │ │ -
    1870
    │ │ │ │ -
    1871 if (instance) {
    │ │ │ │ -
    1872 return instance->EvalPatchesVarying(
    │ │ │ │ -
    1873 srcBuffer, srcDesc,
    │ │ │ │ -
    1874 dstBuffer, dstDesc,
    │ │ │ │ -
    1875 duBuffer, duDesc,
    │ │ │ │ -
    1876 dvBuffer, dvDesc,
    │ │ │ │ -
    1877 duuBuffer, duuDesc,
    │ │ │ │ -
    1878 duvBuffer, duvDesc,
    │ │ │ │ -
    1879 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1880 numPatchCoords, patchCoords,
    │ │ │ │ -
    1881 patchTable,
    │ │ │ │ -
    1882 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1883 } else {
    │ │ │ │ -
    1884 // Create an instance on demand (slow)
    │ │ │ │ -
    1885 (void)deviceContext; // unused
    │ │ │ │ -
    1886 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    1887 duDesc, dvDesc,
    │ │ │ │ -
    1888 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    1889 deviceContext);
    │ │ │ │ -
    1890 if (instance) {
    │ │ │ │ -
    1891 bool r = instance->EvalPatchesVarying(
    │ │ │ │ -
    1892 srcBuffer, srcDesc,
    │ │ │ │ -
    1893 dstBuffer, dstDesc,
    │ │ │ │ -
    1894 duBuffer, duDesc,
    │ │ │ │ -
    1895 dvBuffer, dvDesc,
    │ │ │ │ -
    1896 duuBuffer, duuDesc,
    │ │ │ │ -
    1897 duvBuffer, duvDesc,
    │ │ │ │ -
    1898 dvvBuffer, dvvDesc,
    │ │ │ │ -
    1899 numPatchCoords, patchCoords,
    │ │ │ │ -
    1900 patchTable,
    │ │ │ │ -
    1901 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    1902 delete instance;
    │ │ │ │ -
    1903 return r;
    │ │ │ │ -
    1904 }
    │ │ │ │ -
    1905 return false;
    │ │ │ │ -
    1906 }
    │ │ │ │ -
    1907 }
    │ │ │ │ -
    │ │ │ │ -
    1908
    │ │ │ │ -
    1976 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    1977 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    1979 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    1980 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    1981 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    1982 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    1983 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    1984 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    1985 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    1986 int numPatchCoords,
    │ │ │ │ -
    1987 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    1988 PATCH_TABLE *patchTable,
    │ │ │ │ -
    1989 unsigned int numStartEvents=0,
    │ │ │ │ -
    1990 const cl_event* startEvents=NULL,
    │ │ │ │ -
    1991 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    1992
    │ │ │ │ -
    1993 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    1994 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    1995 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    1996 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    1997 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc,
    │ │ │ │ -
    1998 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc,
    │ │ │ │ -
    1999 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc,
    │ │ │ │ -
    2000 numPatchCoords,
    │ │ │ │ -
    2001 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    2002 patchTable->GetVaryingPatchArrayBuffer(),
    │ │ │ │ -
    2003 patchTable->GetVaryingPatchIndexBuffer(),
    │ │ │ │ -
    2004 patchTable->GetPatchParamBuffer(),
    │ │ │ │ -
    2005 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2006 }
    │ │ │ │ -
    │ │ │ │ -
    2007
    │ │ │ │ -
    2058 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2059 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    2060 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2062 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2063 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2064 int numPatchCoords,
    │ │ │ │ -
    2065 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2066 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2067 int fvarChannel,
    │ │ │ │ -
    2068 CLEvaluator const *instance,
    │ │ │ │ -
    2069 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    2070 unsigned int numStartEvents=0,
    │ │ │ │ -
    2071 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2072 cl_event* endEvent=NULL) {
    │ │ │ │ -
    2073
    │ │ │ │ -
    2074 if (instance) {
    │ │ │ │ -
    2075 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2076 srcBuffer, srcDesc,
    │ │ │ │ -
    2077 dstBuffer, dstDesc,
    │ │ │ │ -
    2078 numPatchCoords, patchCoords,
    │ │ │ │ -
    2079 patchTable, fvarChannel,
    │ │ │ │ -
    2080 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2081 } else {
    │ │ │ │ -
    2082 // Create an instance on demand (slow)
    │ │ │ │ -
    2083 (void)deviceContext; // unused
    │ │ │ │ -
    2084 instance = Create(srcDesc, dstDesc,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    2087 deviceContext);
    │ │ │ │ -
    2088 if (instance) {
    │ │ │ │ -
    2089 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2090 srcBuffer, srcDesc,
    │ │ │ │ -
    2091 dstBuffer, dstDesc,
    │ │ │ │ -
    2092 numPatchCoords, patchCoords,
    │ │ │ │ -
    2093 patchTable, fvarChannel,
    │ │ │ │ -
    2094 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2095 delete instance;
    │ │ │ │ -
    2096 return r;
    │ │ │ │ -
    2097 }
    │ │ │ │ -
    2098 return false;
    │ │ │ │ -
    2099 }
    │ │ │ │ -
    2100 }
    │ │ │ │ -
    │ │ │ │ -
    2101
    │ │ │ │ -
    2141 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2142 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2144 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2145 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2146 int numPatchCoords,
    │ │ │ │ -
    2147 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2148 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2149 int fvarChannel = 0,
    │ │ │ │ -
    2150 unsigned int numStartEvents=0,
    │ │ │ │ -
    2151 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2152 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    2153
    │ │ │ │ -
    2154 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    2155 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    2156 0, BufferDescriptor(),
    │ │ │ │ -
    2157 0, BufferDescriptor(),
    │ │ │ │ -
    2158 numPatchCoords,
    │ │ │ │ -
    2159 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    2160 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
    │ │ │ │ -
    2161 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
    │ │ │ │ -
    2162 patchTable->GetFVarPatchParamBuffer(fvarChannel),
    │ │ │ │ -
    2163 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2164 }
    │ │ │ │ -
    │ │ │ │ -
    2165
    │ │ │ │ -
    2228 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2229 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    2230 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2232 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2233 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2234 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    2235 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2236 int numPatchCoords,
    │ │ │ │ -
    2237 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2238 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2239 int fvarChannel,
    │ │ │ │ -
    2240 CLEvaluator const *instance,
    │ │ │ │ -
    2241 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    2242 unsigned int numStartEvents=0,
    │ │ │ │ -
    2243 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2244 cl_event* endEvent=NULL) {
    │ │ │ │ -
    2245
    │ │ │ │ -
    2246 if (instance) {
    │ │ │ │ -
    2247 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2248 srcBuffer, srcDesc,
    │ │ │ │ -
    2249 dstBuffer, dstDesc,
    │ │ │ │ -
    2250 duBuffer, duDesc,
    │ │ │ │ -
    2251 dvBuffer, dvDesc,
    │ │ │ │ -
    2252 numPatchCoords, patchCoords,
    │ │ │ │ -
    2253 patchTable, fvarChannel,
    │ │ │ │ -
    2254 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2255 } else {
    │ │ │ │ -
    2256 // Create an instance on demand (slow)
    │ │ │ │ -
    2257 (void)deviceContext; // unused
    │ │ │ │ -
    2258 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    2259 duDesc, dvDesc, deviceContext);
    │ │ │ │ -
    2260 if (instance) {
    │ │ │ │ -
    2261 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2262 srcBuffer, srcDesc,
    │ │ │ │ -
    2263 dstBuffer, dstDesc,
    │ │ │ │ -
    2264 duBuffer, duDesc,
    │ │ │ │ -
    2265 dvBuffer, dvDesc,
    │ │ │ │ -
    2266 numPatchCoords, patchCoords,
    │ │ │ │ -
    2267 patchTable, fvarChannel,
    │ │ │ │ -
    2268 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2269 delete instance;
    │ │ │ │ -
    2270 return r;
    │ │ │ │ -
    2271 }
    │ │ │ │ -
    2272 return false;
    │ │ │ │ -
    2273 }
    │ │ │ │ -
    2274 }
    │ │ │ │ -
    │ │ │ │ -
    2275
    │ │ │ │ -
    2327 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2328 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2330 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2331 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2332 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    2333 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2334 int numPatchCoords,
    │ │ │ │ -
    2335 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2336 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2337 int fvarChannel = 0,
    │ │ │ │ -
    2338 unsigned int numStartEvents=0,
    │ │ │ │ -
    2339 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2340 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    2341
    │ │ │ │ -
    2342 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    2343 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    2344 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    2345 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    2346 numPatchCoords,
    │ │ │ │ -
    2347 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    2348 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
    │ │ │ │ -
    2349 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
    │ │ │ │ -
    2350 patchTable->GetFVarPatchParamBuffer(fvarChannel),
    │ │ │ │ -
    2351 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2352 }
    │ │ │ │ -
    │ │ │ │ -
    2353
    │ │ │ │ -
    2434 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2435 typename PATCHCOORD_BUFFER, typename PATCH_TABLE,
    │ │ │ │ -
    2436 typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2438 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2439 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2440 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    2441 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2442 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    2443 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    2444 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    2445 int numPatchCoords,
    │ │ │ │ -
    2446 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2447 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2448 int fvarChannel,
    │ │ │ │ -
    2449 CLEvaluator const *instance,
    │ │ │ │ -
    2450 DEVICE_CONTEXT deviceContext,
    │ │ │ │ -
    2451 unsigned int numStartEvents=0,
    │ │ │ │ -
    2452 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2453 cl_event* endEvent=NULL) {
    │ │ │ │ -
    2454
    │ │ │ │ -
    2455 if (instance) {
    │ │ │ │ -
    2456 return instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2457 srcBuffer, srcDesc,
    │ │ │ │ -
    2458 dstBuffer, dstDesc,
    │ │ │ │ -
    2459 duBuffer, duDesc,
    │ │ │ │ -
    2460 dvBuffer, dvDesc,
    │ │ │ │ -
    2461 duuBuffer, duuDesc,
    │ │ │ │ -
    2462 duvBuffer, duvDesc,
    │ │ │ │ -
    2463 dvvBuffer, dvvDesc,
    │ │ │ │ -
    2464 numPatchCoords, patchCoords,
    │ │ │ │ -
    2465 patchTable, fvarChannel,
    │ │ │ │ -
    2466 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2467 } else {
    │ │ │ │ -
    2468 // Create an instance on demand (slow)
    │ │ │ │ -
    2469 (void)deviceContext; // unused
    │ │ │ │ -
    2470 instance = Create(srcDesc, dstDesc,
    │ │ │ │ -
    2471 duDesc, dvDesc,
    │ │ │ │ -
    2472 duuDesc, duvDesc, dvvDesc,
    │ │ │ │ -
    2473 deviceContext);
    │ │ │ │ -
    2474 if (instance) {
    │ │ │ │ -
    2475 bool r = instance->EvalPatchesFaceVarying(
    │ │ │ │ -
    2476 srcBuffer, srcDesc,
    │ │ │ │ -
    2477 dstBuffer, dstDesc,
    │ │ │ │ -
    2478 duBuffer, duDesc,
    │ │ │ │ -
    2479 dvBuffer, dvDesc,
    │ │ │ │ -
    2480 duuBuffer, duuDesc,
    │ │ │ │ -
    2481 duvBuffer, duvDesc,
    │ │ │ │ -
    2482 dvvBuffer, dvvDesc,
    │ │ │ │ -
    2483 numPatchCoords, patchCoords,
    │ │ │ │ -
    2484 patchTable, fvarChannel,
    │ │ │ │ -
    2485 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2486 delete instance;
    │ │ │ │ -
    2487 return r;
    │ │ │ │ -
    2488 }
    │ │ │ │ -
    2489 return false;
    │ │ │ │ -
    2490 }
    │ │ │ │ -
    2491 }
    │ │ │ │ -
    │ │ │ │ -
    2492
    │ │ │ │ -
    2562 template <typename SRC_BUFFER, typename DST_BUFFER,
    │ │ │ │ -
    2563 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    2565 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2566 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2567 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
    │ │ │ │ -
    2568 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
    │ │ │ │ -
    2569 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
    │ │ │ │ -
    2570 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
    │ │ │ │ -
    2571 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
    │ │ │ │ -
    2572 int numPatchCoords,
    │ │ │ │ -
    2573 PATCHCOORD_BUFFER *patchCoords,
    │ │ │ │ -
    2574 PATCH_TABLE *patchTable,
    │ │ │ │ -
    2575 int fvarChannel = 0,
    │ │ │ │ -
    2576 unsigned int numStartEvents=0,
    │ │ │ │ -
    2577 const cl_event* startEvents=NULL,
    │ │ │ │ -
    2578 cl_event* endEvent=NULL) const {
    │ │ │ │ -
    2579
    │ │ │ │ -
    2580 return EvalPatches(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc,
    │ │ │ │ -
    2581 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc,
    │ │ │ │ -
    2582 duBuffer->BindCLBuffer(_clCommandQueue), duDesc,
    │ │ │ │ -
    2583 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc,
    │ │ │ │ -
    2584 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc,
    │ │ │ │ -
    2585 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc,
    │ │ │ │ -
    2586 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc,
    │ │ │ │ -
    2587 numPatchCoords,
    │ │ │ │ -
    2588 patchCoords->BindCLBuffer(_clCommandQueue),
    │ │ │ │ -
    2589 patchTable->GetFVarPatchArrayBuffer(fvarChannel),
    │ │ │ │ -
    2590 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
    │ │ │ │ -
    2591 patchTable->GetFVarPatchParamBuffer(fvarChannel),
    │ │ │ │ -
    2592 numStartEvents, startEvents, endEvent);
    │ │ │ │ -
    2593 }
    │ │ │ │ -
    │ │ │ │ -
    2594
    │ │ │ │ -
    2600
    │ │ │ │ -
    2603 bool Compile(BufferDescriptor const &srcDesc,
    │ │ │ │ -
    2604 BufferDescriptor const &dstDesc,
    │ │ │ │ -
    2605 BufferDescriptor const &duDesc = BufferDescriptor(),
    │ │ │ │ -
    2606 BufferDescriptor const &dvDesc = BufferDescriptor(),
    │ │ │ │ -
    2607 BufferDescriptor const &duuDesc = BufferDescriptor(),
    │ │ │ │ -
    2608 BufferDescriptor const &duvDesc = BufferDescriptor(),
    │ │ │ │ -
    2609 BufferDescriptor const &dvvDesc = BufferDescriptor());
    │ │ │ │ -
    2610
    │ │ │ │ -
    2612 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    2613 static void Synchronize(DEVICE_CONTEXT deviceContext) {
    │ │ │ │ -
    2614 Synchronize(deviceContext->GetCommandQueue());
    │ │ │ │ -
    2615 }
    │ │ │ │ -
    │ │ │ │ -
    2616
    │ │ │ │ -
    2617 static void Synchronize(cl_command_queue queue);
    │ │ │ │ -
    2618
    │ │ │ │ -
    2619private:
    │ │ │ │ -
    2620 cl_context _clContext;
    │ │ │ │ -
    2621 cl_command_queue _clCommandQueue;
    │ │ │ │ -
    2622 cl_program _program;
    │ │ │ │ -
    2623 cl_kernel _stencilKernel;
    │ │ │ │ -
    2624 cl_kernel _stencilDerivKernel;
    │ │ │ │ -
    2625 cl_kernel _patchKernel;
    │ │ │ │ -
    2626};
    │ │ │ │ -
    │ │ │ │ -
    2627
    │ │ │ │ -
    2628} // end namespace Osd
    │ │ │ │ -
    2629
    │ │ │ │ -
    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....
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    CLStencilTable(Far::StencilTable const *stencilTable, cl_context clContext)
    │ │ │ │ - │ │ │ │ -
    static CLStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, DEVICE_CONTEXT context)
    Definition clEvaluator.h:61
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static CLStencilTable * Create(Far::StencilTable const *stencilTable, DEVICE_CONTEXT context)
    Definition clEvaluator.h:55
    │ │ │ │ -
    CLStencilTable(Far::LimitStencilTable const *limitStencilTable, cl_context clContext)
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic static stencil function. This function has a same signature as other device kernels have so t...
    │ │ │ │ -
    static void Synchronize(cl_command_queue queue)
    │ │ │ │ - │ │ │ │ -
    bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, cl_mem dv, BufferDescriptor const &dvDesc, cl_mem sizes, cl_mem offsets, cl_mem indices, cl_mem weights, cl_mem duWeights, cl_mem dvWeights, int start, int end, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Dispatch the CL compute kernel asynchronously. returns false if the kernel hasn't been compiled yet.
    │ │ │ │ -
    static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic static stencil function. This function has a same signature as other device kernels have so t...
    │ │ │ │ -
    static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, cl_context clContext, cl_command_queue clCommandQueue)
    │ │ │ │ -
    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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, cl_mem dv, BufferDescriptor const &dvDesc, int numPatchCoords, cl_mem patchCoordsBuffer, cl_mem patchArrayBuffer, cl_mem patchIndexBuffer, cl_mem patchParamsBuffer, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    │ │ │ │ -
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Generic stencil function.
    │ │ │ │ -
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Generic limit eval function with derivatives. This function has a same signature as other device kern...
    │ │ │ │ - │ │ │ │ -
    static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, DEVICE_CONTEXT deviceContext)
    Generic creator template.
    │ │ │ │ -
    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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT deviceContext)
    Generic creator template.
    │ │ │ │ -
    bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, cl_mem dv, BufferDescriptor const &dvDesc, cl_mem duu, BufferDescriptor const &duuDesc, cl_mem duv, BufferDescriptor const &duvDesc, cl_mem dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, cl_mem patchCoordsBuffer, cl_mem patchArrayBuffer, cl_mem patchIndexBuffer, cl_mem patchParamsBuffer, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    │ │ │ │ -
    bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, cl_mem dv, BufferDescriptor const &dvDesc, cl_mem duu, BufferDescriptor const &duuDesc, cl_mem duv, BufferDescriptor const &duvDesc, cl_mem dvv, BufferDescriptor const &dvvDesc, cl_mem sizes, cl_mem offsets, cl_mem indices, cl_mem weights, cl_mem duWeights, cl_mem dvWeights, cl_mem duuWeights, cl_mem duvWeights, cl_mem dvvWeights, int start, int end, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Dispatch the CL compute kernel asynchronously. returns false if the kernel hasn't been compiled yet.
    │ │ │ │ -
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    static void Synchronize(DEVICE_CONTEXT deviceContext)
    Wait the OpenCL kernels finish.
    │ │ │ │ -
    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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic static stencil function. This function has a same signature as other device kernels have so t...
    │ │ │ │ -
    bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, BufferDescriptor const &dstDesc, cl_mem sizes, cl_mem offsets, cl_mem indices, cl_mem weights, int start, int end, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    │ │ │ │ -
    static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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, 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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL)
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ -
    static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, cl_context clContext, cl_command_queue clCommandQueue)
    │ │ │ │ -
    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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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, 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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Generic stencil function.
    │ │ │ │ -
    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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Generic limit eval function with derivatives. This function has a same signature as other device kern...
    │ │ │ │ -
    CLEvaluator(cl_context context, cl_command_queue queue)
    Constructor.
    │ │ │ │ -
    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 EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const
    Generic limit eval function. This function has a same signature as other device kernels have so that ...
    │ │ │ │ + │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -clEvaluator.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 2015 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,1554 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_CL_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CL_EVALUATOR_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../osd/opencl.h" │ │ │ │ │ -31#include "../osd/types.h" │ │ │ │ │ -32#include "../osd/bufferDescriptor.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 "../sdc/options.h" │ │ │ │ │ +32#include "../vtr/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} │ │ │ │ │ +34#include │ │ │ │ │ +35#include │ │ │ │ │ +36#include │ │ │ │ │ +37#include │ │ │ │ │ +38 │ │ │ │ │ +39 │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -43namespace Osd { │ │ │ │ │ -44 │ │ │ │ │ -_5_2class _C_L_S_t_e_n_c_i_l_T_a_b_l_e { │ │ │ │ │ -53public: │ │ │ │ │ -54 template │ │ │ │ │ -_5_5 static _C_L_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, │ │ │ │ │ -56 DEVICE_CONTEXT context) { │ │ │ │ │ -57 return new _C_L_S_t_e_n_c_i_l_T_a_b_l_e(stencilTable, context->GetContext()); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 template │ │ │ │ │ -_6_1 static _C_L_S_t_e_n_c_i_l_T_a_b_l_e *_C_r_e_a_t_e( │ │ │ │ │ -62 _F_a_r_:_:_L_i_m_i_t_S_t_e_n_c_i_l_T_a_b_l_e const *limitStencilTable, │ │ │ │ │ -63 DEVICE_CONTEXT context) { │ │ │ │ │ -64 return new _C_L_S_t_e_n_c_i_l_T_a_b_l_e(limitStencilTable, context->GetContext()); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_7 _C_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, │ │ │ │ │ -68 cl_context clContext); │ │ │ │ │ -_6_9 _C_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 *limitStencilTable, │ │ │ │ │ -70 cl_context clContext); │ │ │ │ │ -_7_1 _~_C_L_S_t_e_n_c_i_l_T_a_b_l_e(); │ │ │ │ │ -72 │ │ │ │ │ -73 // interfaces needed for CLComputeKernel │ │ │ │ │ -_7_4 cl_mem _G_e_t_S_i_z_e_s_B_u_f_f_e_r() const { return _sizes; } │ │ │ │ │ -_7_5 cl_mem _G_e_t_O_f_f_s_e_t_s_B_u_f_f_e_r() const { return _offsets; } │ │ │ │ │ -_7_6 cl_mem _G_e_t_I_n_d_i_c_e_s_B_u_f_f_e_r() const { return _indices; } │ │ │ │ │ -_7_7 cl_mem _G_e_t_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _weights; } │ │ │ │ │ -_7_8 cl_mem _G_e_t_D_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duWeights; } │ │ │ │ │ -_7_9 cl_mem _G_e_t_D_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvWeights; } │ │ │ │ │ -_8_0 cl_mem _G_e_t_D_u_u_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duuWeights; } │ │ │ │ │ -_8_1 cl_mem _G_e_t_D_u_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _duvWeights; } │ │ │ │ │ -_8_2 cl_mem _G_e_t_D_v_v_W_e_i_g_h_t_s_B_u_f_f_e_r() const { return _dvvWeights; } │ │ │ │ │ -_8_3 int _G_e_t_N_u_m_S_t_e_n_c_i_l_s() const { return _numStencils; } │ │ │ │ │ +43namespace Vtr { │ │ │ │ │ +44namespace internal { │ │ │ │ │ +45 │ │ │ │ │ +46class Refinement; │ │ │ │ │ +47class TriRefinement; │ │ │ │ │ +48class QuadRefinement; │ │ │ │ │ +49class FVarRefinement; │ │ │ │ │ +50class FVarLevel; │ │ │ │ │ +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 { │ │ │ │ │ 84 │ │ │ │ │ -85private: │ │ │ │ │ -86 cl_mem _sizes; │ │ │ │ │ -87 cl_mem _offsets; │ │ │ │ │ -88 cl_mem _indices; │ │ │ │ │ -89 cl_mem _weights; │ │ │ │ │ -90 cl_mem _duWeights; │ │ │ │ │ -91 cl_mem _dvWeights; │ │ │ │ │ -92 cl_mem _duuWeights; │ │ │ │ │ -93 cl_mem _duvWeights; │ │ │ │ │ -94 cl_mem _dvvWeights; │ │ │ │ │ -95 int _numStencils; │ │ │ │ │ -96}; │ │ │ │ │ -97 │ │ │ │ │ -98// -------------------------------------------------------------------------- │ │ │ │ │ -- │ │ │ │ │ +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 │ │ │ │ │ -_1_0_0class _C_L_E_v_a_l_u_a_t_o_r { │ │ │ │ │ -101public: │ │ │ │ │ -_1_0_2 typedef bool _I_n_s_t_a_n_t_i_a_t_a_b_l_e; │ │ │ │ │ -103 │ │ │ │ │ -105 template │ │ │ │ │ -_1_0_6 static _C_L_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, │ │ │ │ │ -107 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -108 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -109 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -110 DEVICE_CONTEXT deviceContext) { │ │ │ │ │ -111 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -112 deviceContext->GetContext(), │ │ │ │ │ -113 deviceContext->GetCommandQueue()); │ │ │ │ │ -114 } │ │ │ │ │ +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 │ │ │ │ │ -_1_1_6 static _C_L_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, │ │ │ │ │ -117 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -118 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -119 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -120 cl_context clContext, │ │ │ │ │ -121 cl_command_queue clCommandQueue) { │ │ │ │ │ -122 _C_L_E_v_a_l_u_a_t_o_r *instance = new _C_L_E_v_a_l_u_a_t_o_r(clContext, clCommandQueue); │ │ │ │ │ -123 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc)) │ │ │ │ │ -124 return instance; │ │ │ │ │ -125 delete instance; │ │ │ │ │ -126 return NULL; │ │ │ │ │ -127 } │ │ │ │ │ -128 │ │ │ │ │ -130 template │ │ │ │ │ -_1_3_1 static _C_L_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, │ │ │ │ │ -132 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -133 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -134 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -135 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -136 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -137 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -138 DEVICE_CONTEXT deviceContext) { │ │ │ │ │ -139 return _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -140 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -141 deviceContext->GetContext(), │ │ │ │ │ -142 deviceContext->GetCommandQueue()); │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -_1_4_5 static _C_L_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, │ │ │ │ │ -146 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -147 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -148 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -149 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -150 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -151 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -152 cl_context clContext, │ │ │ │ │ -153 cl_command_queue clCommandQueue) { │ │ │ │ │ -154 _C_L_E_v_a_l_u_a_t_o_r *instance = new _C_L_E_v_a_l_u_a_t_o_r(clContext, clCommandQueue); │ │ │ │ │ -155 if (instance->_C_o_m_p_i_l_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -156 duuDesc, duvDesc, dvvDesc)) │ │ │ │ │ -157 return instance; │ │ │ │ │ -158 delete instance; │ │ │ │ │ -159 return NULL; │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -_1_6_3 _C_L_E_v_a_l_u_a_t_o_r(cl_context context, cl_command_queue queue); │ │ │ │ │ -164 │ │ │ │ │ -_1_6_6 _~_C_L_E_v_a_l_u_a_t_o_r(); │ │ │ │ │ +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 │ │ │ │ │ -217 template │ │ │ │ │ -_2_1_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -220 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -221 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -222 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -223 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -224 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -225 unsigned int numStartEvents=0, │ │ │ │ │ -226 const cl_event* startEvents=NULL, │ │ │ │ │ -227 cl_event* endEvent=NULL) { │ │ │ │ │ +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 if (instance) { │ │ │ │ │ -230 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -231 dstBuffer, dstDesc, │ │ │ │ │ -232 stencilTable, │ │ │ │ │ -233 numStartEvents, startEvents, endEvent); │ │ │ │ │ -234 } else { │ │ │ │ │ -235 // Create an instance on demand (slow) │ │ │ │ │ -236 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -237 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -238 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -239 deviceContext); │ │ │ │ │ -240 if (instance) { │ │ │ │ │ -241 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -242 dstBuffer, dstDesc, │ │ │ │ │ -243 stencilTable, │ │ │ │ │ -244 numStartEvents, startEvents, endEvent); │ │ │ │ │ -245 delete instance; │ │ │ │ │ -246 return r; │ │ │ │ │ -247 } │ │ │ │ │ -248 return false; │ │ │ │ │ -249 } │ │ │ │ │ -250 } │ │ │ │ │ -251 │ │ │ │ │ -307 template │ │ │ │ │ -_3_0_9 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -310 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -311 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -312 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -313 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -314 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -315 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -316 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -317 unsigned int numStartEvents=0, │ │ │ │ │ -318 const cl_event* startEvents=NULL, │ │ │ │ │ -319 cl_event* endEvent=NULL) { │ │ │ │ │ +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 │ │ │ │ │ -321 if (instance) { │ │ │ │ │ -322 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -323 dstBuffer, dstDesc, │ │ │ │ │ -324 duBuffer, duDesc, │ │ │ │ │ -325 dvBuffer, dvDesc, │ │ │ │ │ -326 stencilTable, │ │ │ │ │ -327 numStartEvents, startEvents, endEvent); │ │ │ │ │ -328 } else { │ │ │ │ │ -329 // Create an instance on demand (slow) │ │ │ │ │ -330 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, │ │ │ │ │ -331 deviceContext); │ │ │ │ │ -332 if (instance) { │ │ │ │ │ -333 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -334 dstBuffer, dstDesc, │ │ │ │ │ -335 duBuffer, duDesc, │ │ │ │ │ -336 dvBuffer, dvDesc, │ │ │ │ │ -337 stencilTable, │ │ │ │ │ -338 numStartEvents, startEvents, endEvent); │ │ │ │ │ -339 delete instance; │ │ │ │ │ -340 return r; │ │ │ │ │ -341 } │ │ │ │ │ -342 return false; │ │ │ │ │ -343 } │ │ │ │ │ -344 } │ │ │ │ │ -345 │ │ │ │ │ -419 template │ │ │ │ │ -_4_2_1 static bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -422 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -423 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -424 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -425 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -426 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -427 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -428 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -429 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -430 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -431 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -432 unsigned int numStartEvents=0, │ │ │ │ │ -433 const cl_event* startEvents=NULL, │ │ │ │ │ -434 cl_event* endEvent=NULL) { │ │ │ │ │ -435 │ │ │ │ │ -436 if (instance) { │ │ │ │ │ -437 return instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -438 dstBuffer, dstDesc, │ │ │ │ │ -439 duBuffer, duDesc, │ │ │ │ │ -440 dvBuffer, dvDesc, │ │ │ │ │ -441 duuBuffer, duuDesc, │ │ │ │ │ -442 duvBuffer, duvDesc, │ │ │ │ │ -443 dvvBuffer, dvvDesc, │ │ │ │ │ -444 stencilTable, │ │ │ │ │ -445 numStartEvents, startEvents, endEvent); │ │ │ │ │ -446 } else { │ │ │ │ │ -447 // Create an instance on demand (slow) │ │ │ │ │ -448 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -449 duDesc, dvDesc, │ │ │ │ │ -450 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -451 deviceContext); │ │ │ │ │ -452 if (instance) { │ │ │ │ │ -453 bool r = instance->_E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer, srcDesc, │ │ │ │ │ -454 dstBuffer, dstDesc, │ │ │ │ │ -455 duBuffer, duDesc, │ │ │ │ │ -456 dvBuffer, dvDesc, │ │ │ │ │ -457 duuBuffer, duuDesc, │ │ │ │ │ -458 duvBuffer, duvDesc, │ │ │ │ │ -459 dvvBuffer, dvvDesc, │ │ │ │ │ -460 stencilTable, │ │ │ │ │ -461 numStartEvents, startEvents, endEvent); │ │ │ │ │ -462 delete instance; │ │ │ │ │ -463 return r; │ │ │ │ │ -464 } │ │ │ │ │ -465 return false; │ │ │ │ │ -466 } │ │ │ │ │ -467 } │ │ │ │ │ -468 │ │ │ │ │ -499 template │ │ │ │ │ -_5_0_0 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -501 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -502 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -503 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -504 unsigned int numStartEvents=0, │ │ │ │ │ -505 const cl_event* startEvents=NULL, │ │ │ │ │ -506 cl_event* endEvent=NULL) const { │ │ │ │ │ -507 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -508 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -509 stencilTable->GetSizesBuffer(), │ │ │ │ │ -510 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -511 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -512 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -513 0, │ │ │ │ │ -514 stencilTable->GetNumStencils(), │ │ │ │ │ -515 numStartEvents, startEvents, endEvent); │ │ │ │ │ -516 } │ │ │ │ │ -517 │ │ │ │ │ -560 template │ │ │ │ │ -_5_6_1 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -562 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -563 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -564 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -565 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -566 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -567 unsigned int numStartEvents=0, │ │ │ │ │ -568 const cl_event* startEvents=NULL, │ │ │ │ │ -569 cl_event* endEvent=NULL) const { │ │ │ │ │ -570 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -571 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -572 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -573 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -574 stencilTable->GetSizesBuffer(), │ │ │ │ │ -575 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -576 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -577 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -578 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -579 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -580 0, │ │ │ │ │ -581 stencilTable->GetNumStencils(), │ │ │ │ │ -582 numStartEvents, startEvents, endEvent); │ │ │ │ │ -583 } │ │ │ │ │ -584 │ │ │ │ │ -645 template │ │ │ │ │ -_6_4_6 bool _E_v_a_l_S_t_e_n_c_i_l_s( │ │ │ │ │ -647 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -648 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -649 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -650 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -651 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -652 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -653 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -654 STENCIL_TABLE const *stencilTable, │ │ │ │ │ -655 unsigned int numStartEvents=0, │ │ │ │ │ -656 const cl_event* startEvents=NULL, │ │ │ │ │ -657 cl_event* endEvent=NULL) const { │ │ │ │ │ -658 return _E_v_a_l_S_t_e_n_c_i_l_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -659 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -660 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -661 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -662 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc, │ │ │ │ │ -663 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc, │ │ │ │ │ -664 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc, │ │ │ │ │ -665 stencilTable->GetSizesBuffer(), │ │ │ │ │ -666 stencilTable->GetOffsetsBuffer(), │ │ │ │ │ -667 stencilTable->GetIndicesBuffer(), │ │ │ │ │ -668 stencilTable->GetWeightsBuffer(), │ │ │ │ │ -669 stencilTable->GetDuWeightsBuffer(), │ │ │ │ │ -670 stencilTable->GetDvWeightsBuffer(), │ │ │ │ │ -671 stencilTable->GetDuuWeightsBuffer(), │ │ │ │ │ -672 stencilTable->GetDuvWeightsBuffer(), │ │ │ │ │ -673 stencilTable->GetDvvWeightsBuffer(), │ │ │ │ │ -674 0, │ │ │ │ │ -675 stencilTable->GetNumStencils(), │ │ │ │ │ -676 numStartEvents, startEvents, endEvent); │ │ │ │ │ -677 } │ │ │ │ │ -678 │ │ │ │ │ -_6_8_1 bool _E_v_a_l_S_t_e_n_c_i_l_s(cl_mem src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -682 cl_mem dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -683 cl_mem sizes, │ │ │ │ │ -684 cl_mem offsets, │ │ │ │ │ -685 cl_mem indices, │ │ │ │ │ -686 cl_mem weights, │ │ │ │ │ -687 int start, │ │ │ │ │ -688 int end, │ │ │ │ │ -689 unsigned int numStartEvents=0, │ │ │ │ │ -690 const cl_event* startEvents=NULL, │ │ │ │ │ -691 cl_event* endEvent=NULL) const; │ │ │ │ │ +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 │ │ │ │ │ -_7_4_1 bool _E_v_a_l_S_t_e_n_c_i_l_s(cl_mem src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -742 cl_mem dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -743 cl_mem du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -744 cl_mem dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -745 cl_mem sizes, │ │ │ │ │ -746 cl_mem offsets, │ │ │ │ │ -747 cl_mem indices, │ │ │ │ │ -748 cl_mem weights, │ │ │ │ │ -749 cl_mem duWeights, │ │ │ │ │ -750 cl_mem dvWeights, │ │ │ │ │ -751 int start, │ │ │ │ │ -752 int end, │ │ │ │ │ -753 unsigned int numStartEvents=0, │ │ │ │ │ -754 const cl_event* startEvents=NULL, │ │ │ │ │ -755 cl_event* endEvent=NULL) const; │ │ │ │ │ +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 │ │ │ │ │ -_8_2_3 bool _E_v_a_l_S_t_e_n_c_i_l_s(cl_mem src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -824 cl_mem dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -825 cl_mem du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -826 cl_mem dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -827 cl_mem duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -828 cl_mem duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -829 cl_mem dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -830 cl_mem sizes, │ │ │ │ │ -831 cl_mem offsets, │ │ │ │ │ -832 cl_mem indices, │ │ │ │ │ -833 cl_mem weights, │ │ │ │ │ -834 cl_mem duWeights, │ │ │ │ │ -835 cl_mem dvWeights, │ │ │ │ │ -836 cl_mem duuWeights, │ │ │ │ │ -837 cl_mem duvWeights, │ │ │ │ │ -838 cl_mem dvvWeights, │ │ │ │ │ -839 int start, │ │ │ │ │ -840 int end, │ │ │ │ │ -841 unsigned int numStartEvents=0, │ │ │ │ │ -842 const cl_event* startEvents=NULL, │ │ │ │ │ -843 cl_event* endEvent=NULL) const; │ │ │ │ │ -844 │ │ │ │ │ -850 │ │ │ │ │ -899 template │ │ │ │ │ -_9_0_2 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -903 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -904 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -905 int numPatchCoords, │ │ │ │ │ -906 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -907 PATCH_TABLE *patchTable, │ │ │ │ │ -908 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -909 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -910 unsigned int numStartEvents=0, │ │ │ │ │ -911 const cl_event* startEvents=NULL, │ │ │ │ │ -912 cl_event* endEvent=NULL) { │ │ │ │ │ -913 │ │ │ │ │ -914 if (instance) { │ │ │ │ │ -915 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -916 dstBuffer, dstDesc, │ │ │ │ │ -917 numPatchCoords, patchCoords, │ │ │ │ │ -918 patchTable, │ │ │ │ │ -919 numStartEvents, startEvents, endEvent); │ │ │ │ │ -920 } else { │ │ │ │ │ -921 // Create an instance on demand (slow) │ │ │ │ │ -922 (void)deviceContext; // unused │ │ │ │ │ -923 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -924 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -925 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -926 deviceContext); │ │ │ │ │ -927 if (instance) { │ │ │ │ │ -928 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -929 dstBuffer, dstDesc, │ │ │ │ │ -930 numPatchCoords, patchCoords, │ │ │ │ │ -931 patchTable, │ │ │ │ │ -932 numStartEvents, startEvents, endEvent); │ │ │ │ │ -933 delete instance; │ │ │ │ │ -934 return r; │ │ │ │ │ -935 } │ │ │ │ │ -936 return false; │ │ │ │ │ -937 } │ │ │ │ │ -938 } │ │ │ │ │ -939 │ │ │ │ │ -1000 template │ │ │ │ │ -_1_0_0_3 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1004 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1005 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1006 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1007 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1008 int numPatchCoords, │ │ │ │ │ -1009 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1010 PATCH_TABLE *patchTable, │ │ │ │ │ -1011 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1012 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -1013 unsigned int numStartEvents=0, │ │ │ │ │ -1014 const cl_event* startEvents=NULL, │ │ │ │ │ -1015 cl_event* endEvent=NULL) { │ │ │ │ │ -1016 │ │ │ │ │ -1017 if (instance) { │ │ │ │ │ -1018 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -1019 dstBuffer, dstDesc, │ │ │ │ │ -1020 duBuffer, duDesc, │ │ │ │ │ -1021 dvBuffer, dvDesc, │ │ │ │ │ -1022 numPatchCoords, patchCoords, │ │ │ │ │ -1023 patchTable, │ │ │ │ │ -1024 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1025 } else { │ │ │ │ │ -1026 // Create an instance on demand (slow) │ │ │ │ │ -1027 (void)deviceContext; // unused │ │ │ │ │ -1028 instance = _C_r_e_a_t_e(srcDesc, dstDesc, duDesc, dvDesc, deviceContext); │ │ │ │ │ -1029 if (instance) { │ │ │ │ │ -1030 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -1031 dstBuffer, dstDesc, │ │ │ │ │ -1032 duBuffer, duDesc, │ │ │ │ │ -1033 dvBuffer, dvDesc, │ │ │ │ │ -1034 numPatchCoords, patchCoords, │ │ │ │ │ -1035 patchTable, │ │ │ │ │ -1036 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1037 delete instance; │ │ │ │ │ -1038 return r; │ │ │ │ │ -1039 } │ │ │ │ │ -1040 return false; │ │ │ │ │ -1041 } │ │ │ │ │ -1042 } │ │ │ │ │ -1043 │ │ │ │ │ -1122 template │ │ │ │ │ -_1_1_2_5 static bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1126 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1127 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1128 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1129 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1130 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1131 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1132 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1133 int numPatchCoords, │ │ │ │ │ -1134 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1135 PATCH_TABLE *patchTable, │ │ │ │ │ -1136 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1137 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -1138 unsigned int numStartEvents=0, │ │ │ │ │ -1139 const cl_event* startEvents=NULL, │ │ │ │ │ -1140 cl_event* endEvent=NULL) { │ │ │ │ │ -1141 │ │ │ │ │ -1142 if (instance) { │ │ │ │ │ -1143 return instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -1144 dstBuffer, dstDesc, │ │ │ │ │ -1145 duBuffer, duDesc, │ │ │ │ │ -1146 dvBuffer, dvDesc, │ │ │ │ │ -1147 duuBuffer, duuDesc, │ │ │ │ │ -1148 duvBuffer, duvDesc, │ │ │ │ │ -1149 dvvBuffer, dvvDesc, │ │ │ │ │ -1150 numPatchCoords, patchCoords, │ │ │ │ │ -1151 patchTable, │ │ │ │ │ -1152 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1153 } else { │ │ │ │ │ -1154 // Create an instance on demand (slow) │ │ │ │ │ -1155 (void)deviceContext; // unused │ │ │ │ │ -1156 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1157 duDesc, dvDesc, │ │ │ │ │ -1158 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -1159 deviceContext); │ │ │ │ │ -1160 if (instance) { │ │ │ │ │ -1161 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s(srcBuffer, srcDesc, │ │ │ │ │ -1162 dstBuffer, dstDesc, │ │ │ │ │ -1163 duBuffer, duDesc, │ │ │ │ │ -1164 dvBuffer, dvDesc, │ │ │ │ │ -1165 duuBuffer, duuDesc, │ │ │ │ │ -1166 duvBuffer, duvDesc, │ │ │ │ │ -1167 dvvBuffer, dvvDesc, │ │ │ │ │ -1168 numPatchCoords, patchCoords, │ │ │ │ │ -1169 patchTable, │ │ │ │ │ -1170 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1171 delete instance; │ │ │ │ │ -1172 return r; │ │ │ │ │ -1173 } │ │ │ │ │ -1174 return false; │ │ │ │ │ -1175 } │ │ │ │ │ -1176 } │ │ │ │ │ -1177 │ │ │ │ │ -1215 template │ │ │ │ │ -_1_2_1_7 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1218 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1219 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1220 int numPatchCoords, │ │ │ │ │ -1221 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1222 PATCH_TABLE *patchTable, │ │ │ │ │ -1223 unsigned int numStartEvents=0, │ │ │ │ │ -1224 const cl_event* startEvents=NULL, │ │ │ │ │ -1225 cl_event* endEvent=NULL) const { │ │ │ │ │ -1226 │ │ │ │ │ -1227 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1228 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1229 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1230 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1231 numPatchCoords, │ │ │ │ │ -1232 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -1233 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -1234 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1235 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1236 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1237 } │ │ │ │ │ -1238 │ │ │ │ │ -1286 template │ │ │ │ │ -_1_2_8_8 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1289 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1290 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1291 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1292 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1293 int numPatchCoords, │ │ │ │ │ -1294 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1295 PATCH_TABLE *patchTable, │ │ │ │ │ -1296 unsigned int numStartEvents=0, │ │ │ │ │ -1297 const cl_event* startEvents=NULL, │ │ │ │ │ -1298 cl_event* endEvent=NULL) const { │ │ │ │ │ -1299 │ │ │ │ │ -1300 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1301 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1302 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -1303 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -1304 numPatchCoords, │ │ │ │ │ -1305 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -1306 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -1307 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1308 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1309 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1310 } │ │ │ │ │ -1311 │ │ │ │ │ -1377 template │ │ │ │ │ -_1_3_7_9 bool _E_v_a_l_P_a_t_c_h_e_s( │ │ │ │ │ -1380 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1381 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1382 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1383 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1384 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1385 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1386 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1387 int numPatchCoords, │ │ │ │ │ -1388 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1389 PATCH_TABLE *patchTable, │ │ │ │ │ -1390 unsigned int numStartEvents=0, │ │ │ │ │ -1391 const cl_event* startEvents=NULL, │ │ │ │ │ -1392 cl_event* endEvent=NULL) const { │ │ │ │ │ -1393 │ │ │ │ │ -1394 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1395 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1396 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -1397 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -1398 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc, │ │ │ │ │ -1399 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc, │ │ │ │ │ -1400 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc, │ │ │ │ │ -1401 numPatchCoords, │ │ │ │ │ -1402 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -1403 patchTable->GetPatchArrayBuffer(), │ │ │ │ │ -1404 patchTable->GetPatchIndexBuffer(), │ │ │ │ │ -1405 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1406 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1407 } │ │ │ │ │ -1408 │ │ │ │ │ -_1_4_0_9 bool _E_v_a_l_P_a_t_c_h_e_s(cl_mem src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1410 cl_mem dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1411 cl_mem du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1412 cl_mem dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1413 int numPatchCoords, │ │ │ │ │ -1414 cl_mem patchCoordsBuffer, │ │ │ │ │ -1415 cl_mem patchArrayBuffer, │ │ │ │ │ -1416 cl_mem patchIndexBuffer, │ │ │ │ │ -1417 cl_mem patchParamsBuffer, │ │ │ │ │ -1418 unsigned int numStartEvents=0, │ │ │ │ │ -1419 const cl_event* startEvents=NULL, │ │ │ │ │ -1420 cl_event* endEvent=NULL) const; │ │ │ │ │ -1421 │ │ │ │ │ -_1_4_2_2 bool _E_v_a_l_P_a_t_c_h_e_s(cl_mem src, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1423 cl_mem dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1424 cl_mem du, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1425 cl_mem dv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1426 cl_mem duu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1427 cl_mem duv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1428 cl_mem dvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1429 int numPatchCoords, │ │ │ │ │ -1430 cl_mem patchCoordsBuffer, │ │ │ │ │ -1431 cl_mem patchArrayBuffer, │ │ │ │ │ -1432 cl_mem patchIndexBuffer, │ │ │ │ │ -1433 cl_mem patchParamsBuffer, │ │ │ │ │ -1434 unsigned int numStartEvents=0, │ │ │ │ │ -1435 const cl_event* startEvents=NULL, │ │ │ │ │ -1436 cl_event* endEvent=NULL) const; │ │ │ │ │ -1437 │ │ │ │ │ -1486 template │ │ │ │ │ -_1_4_8_9 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1490 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1491 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1492 int numPatchCoords, │ │ │ │ │ -1493 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1494 PATCH_TABLE *patchTable, │ │ │ │ │ -1495 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1496 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -1497 unsigned int numStartEvents=0, │ │ │ │ │ -1498 const cl_event* startEvents=NULL, │ │ │ │ │ -1499 cl_event* endEvent=NULL) { │ │ │ │ │ -1500 │ │ │ │ │ -1501 if (instance) { │ │ │ │ │ -1502 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1503 srcBuffer, srcDesc, │ │ │ │ │ -1504 dstBuffer, dstDesc, │ │ │ │ │ -1505 numPatchCoords, patchCoords, │ │ │ │ │ -1506 patchTable, │ │ │ │ │ -1507 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1508 } else { │ │ │ │ │ -1509 // Create an instance on demand (slow) │ │ │ │ │ -1510 (void)deviceContext; // unused │ │ │ │ │ -1511 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1512 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1513 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1514 deviceContext); │ │ │ │ │ -1515 if (instance) { │ │ │ │ │ -1516 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1517 srcBuffer, srcDesc, │ │ │ │ │ -1518 dstBuffer, dstDesc, │ │ │ │ │ -1519 numPatchCoords, patchCoords, │ │ │ │ │ -1520 patchTable, │ │ │ │ │ -1521 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1522 delete instance; │ │ │ │ │ -1523 return r; │ │ │ │ │ -1524 } │ │ │ │ │ -1525 return false; │ │ │ │ │ -1526 } │ │ │ │ │ -1527 } │ │ │ │ │ -1528 │ │ │ │ │ -1566 template │ │ │ │ │ -_1_5_6_8 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1569 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1570 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1571 int numPatchCoords, │ │ │ │ │ -1572 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1573 PATCH_TABLE *patchTable, │ │ │ │ │ -1574 unsigned int numStartEvents=0, │ │ │ │ │ -1575 const cl_event* startEvents=NULL, │ │ │ │ │ -1576 cl_event* endEvent=NULL) const { │ │ │ │ │ -1577 │ │ │ │ │ -1578 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1579 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1580 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1581 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -1582 numPatchCoords, │ │ │ │ │ -1583 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -1584 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -1585 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1586 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1587 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1588 } │ │ │ │ │ -1589 │ │ │ │ │ -1650 template │ │ │ │ │ -_1_6_5_3 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1654 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1655 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1656 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1657 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1658 int numPatchCoords, │ │ │ │ │ -1659 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1660 PATCH_TABLE *patchTable, │ │ │ │ │ -1661 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1662 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -1663 unsigned int numStartEvents=0, │ │ │ │ │ -1664 const cl_event* startEvents=NULL, │ │ │ │ │ -1665 cl_event* endEvent=NULL) { │ │ │ │ │ -1666 │ │ │ │ │ -1667 if (instance) { │ │ │ │ │ -1668 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1669 srcBuffer, srcDesc, │ │ │ │ │ -1670 dstBuffer, dstDesc, │ │ │ │ │ -1671 duBuffer, duDesc, │ │ │ │ │ -1672 dvBuffer, dvDesc, │ │ │ │ │ -1673 numPatchCoords, patchCoords, │ │ │ │ │ -1674 patchTable, │ │ │ │ │ -1675 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1676 } else { │ │ │ │ │ -1677 // Create an instance on demand (slow) │ │ │ │ │ -1678 (void)deviceContext; // unused │ │ │ │ │ -1679 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1680 duDesc, dvDesc, │ │ │ │ │ -1681 deviceContext); │ │ │ │ │ -1682 if (instance) { │ │ │ │ │ -1683 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1684 srcBuffer, srcDesc, │ │ │ │ │ -1685 dstBuffer, dstDesc, │ │ │ │ │ -1686 duBuffer, duDesc, │ │ │ │ │ -1687 dvBuffer, dvDesc, │ │ │ │ │ -1688 numPatchCoords, patchCoords, │ │ │ │ │ -1689 patchTable, │ │ │ │ │ -1690 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1691 delete instance; │ │ │ │ │ -1692 return r; │ │ │ │ │ -1693 } │ │ │ │ │ -1694 return false; │ │ │ │ │ -1695 } │ │ │ │ │ -1696 } │ │ │ │ │ -1697 │ │ │ │ │ -1747 template │ │ │ │ │ -_1_7_4_9 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1750 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1751 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1752 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1753 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1754 int numPatchCoords, │ │ │ │ │ -1755 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1756 PATCH_TABLE *patchTable, │ │ │ │ │ -1757 unsigned int numStartEvents=0, │ │ │ │ │ -1758 const cl_event* startEvents=NULL, │ │ │ │ │ -1759 cl_event* endEvent=NULL) const { │ │ │ │ │ -1760 │ │ │ │ │ -1761 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1762 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1763 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -1764 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -1765 numPatchCoords, │ │ │ │ │ -1766 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -1767 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -1768 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -1769 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -1770 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1771 } │ │ │ │ │ -1772 │ │ │ │ │ -1851 template │ │ │ │ │ -_1_8_5_4 static bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1855 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1856 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1857 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1858 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1859 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1860 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1861 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1862 int numPatchCoords, │ │ │ │ │ -1863 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1864 PATCH_TABLE *patchTable, │ │ │ │ │ -1865 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -1866 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -1867 unsigned int numStartEvents=0, │ │ │ │ │ -1868 const cl_event* startEvents=NULL, │ │ │ │ │ -1869 cl_event* endEvent=NULL) { │ │ │ │ │ -1870 │ │ │ │ │ -1871 if (instance) { │ │ │ │ │ -1872 return instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1873 srcBuffer, srcDesc, │ │ │ │ │ -1874 dstBuffer, dstDesc, │ │ │ │ │ -1875 duBuffer, duDesc, │ │ │ │ │ -1876 dvBuffer, dvDesc, │ │ │ │ │ -1877 duuBuffer, duuDesc, │ │ │ │ │ -1878 duvBuffer, duvDesc, │ │ │ │ │ -1879 dvvBuffer, dvvDesc, │ │ │ │ │ -1880 numPatchCoords, patchCoords, │ │ │ │ │ -1881 patchTable, │ │ │ │ │ -1882 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1883 } else { │ │ │ │ │ -1884 // Create an instance on demand (slow) │ │ │ │ │ -1885 (void)deviceContext; // unused │ │ │ │ │ -1886 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -1887 duDesc, dvDesc, │ │ │ │ │ -1888 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -1889 deviceContext); │ │ │ │ │ -1890 if (instance) { │ │ │ │ │ -1891 bool r = instance->_E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1892 srcBuffer, srcDesc, │ │ │ │ │ -1893 dstBuffer, dstDesc, │ │ │ │ │ -1894 duBuffer, duDesc, │ │ │ │ │ -1895 dvBuffer, dvDesc, │ │ │ │ │ -1896 duuBuffer, duuDesc, │ │ │ │ │ -1897 duvBuffer, duvDesc, │ │ │ │ │ -1898 dvvBuffer, dvvDesc, │ │ │ │ │ -1899 numPatchCoords, patchCoords, │ │ │ │ │ -1900 patchTable, │ │ │ │ │ -1901 numStartEvents, startEvents, endEvent); │ │ │ │ │ -1902 delete instance; │ │ │ │ │ -1903 return r; │ │ │ │ │ -1904 } │ │ │ │ │ -1905 return false; │ │ │ │ │ -1906 } │ │ │ │ │ -1907 } │ │ │ │ │ -1908 │ │ │ │ │ -1976 template │ │ │ │ │ -_1_9_7_8 bool _E_v_a_l_P_a_t_c_h_e_s_V_a_r_y_i_n_g( │ │ │ │ │ -1979 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -1980 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -1981 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -1982 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -1983 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -1984 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -1985 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -1986 int numPatchCoords, │ │ │ │ │ -1987 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -1988 PATCH_TABLE *patchTable, │ │ │ │ │ -1989 unsigned int numStartEvents=0, │ │ │ │ │ -1990 const cl_event* startEvents=NULL, │ │ │ │ │ -1991 cl_event* endEvent=NULL) const { │ │ │ │ │ -1992 │ │ │ │ │ -1993 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -1994 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -1995 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -1996 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -1997 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc, │ │ │ │ │ -1998 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc, │ │ │ │ │ -1999 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc, │ │ │ │ │ -2000 numPatchCoords, │ │ │ │ │ -2001 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -2002 patchTable->GetVaryingPatchArrayBuffer(), │ │ │ │ │ -2003 patchTable->GetVaryingPatchIndexBuffer(), │ │ │ │ │ -2004 patchTable->GetPatchParamBuffer(), │ │ │ │ │ -2005 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2006 } │ │ │ │ │ -2007 │ │ │ │ │ -2058 template │ │ │ │ │ -_2_0_6_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( │ │ │ │ │ -2062 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2063 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2064 int numPatchCoords, │ │ │ │ │ -2065 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2066 PATCH_TABLE *patchTable, │ │ │ │ │ -2067 int fvarChannel, │ │ │ │ │ -2068 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -2069 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -2070 unsigned int numStartEvents=0, │ │ │ │ │ -2071 const cl_event* startEvents=NULL, │ │ │ │ │ -2072 cl_event* endEvent=NULL) { │ │ │ │ │ -2073 │ │ │ │ │ -2074 if (instance) { │ │ │ │ │ -2075 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2076 srcBuffer, srcDesc, │ │ │ │ │ -2077 dstBuffer, dstDesc, │ │ │ │ │ -2078 numPatchCoords, patchCoords, │ │ │ │ │ -2079 patchTable, fvarChannel, │ │ │ │ │ -2080 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2081 } else { │ │ │ │ │ -2082 // Create an instance on demand (slow) │ │ │ │ │ -2083 (void)deviceContext; // unused │ │ │ │ │ -2084 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -2085 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2086 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2087 deviceContext); │ │ │ │ │ -2088 if (instance) { │ │ │ │ │ -2089 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( │ │ │ │ │ -2090 srcBuffer, srcDesc, │ │ │ │ │ -2091 dstBuffer, dstDesc, │ │ │ │ │ -2092 numPatchCoords, patchCoords, │ │ │ │ │ -2093 patchTable, fvarChannel, │ │ │ │ │ -2094 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2095 delete instance; │ │ │ │ │ -2096 return r; │ │ │ │ │ -2097 } │ │ │ │ │ -2098 return false; │ │ │ │ │ -2099 } │ │ │ │ │ -2100 } │ │ │ │ │ -2101 │ │ │ │ │ -2141 template │ │ │ │ │ -_2_1_4_3 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2144 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2145 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2146 int numPatchCoords, │ │ │ │ │ -2147 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2148 PATCH_TABLE *patchTable, │ │ │ │ │ -2149 int fvarChannel = 0, │ │ │ │ │ -2150 unsigned int numStartEvents=0, │ │ │ │ │ -2151 const cl_event* startEvents=NULL, │ │ │ │ │ -2152 cl_event* endEvent=NULL) const { │ │ │ │ │ -2153 │ │ │ │ │ -2154 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -2155 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -2156 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2157 0, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r(), │ │ │ │ │ -2158 numPatchCoords, │ │ │ │ │ -2159 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -2160 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -2161 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -2162 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -2163 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2164 } │ │ │ │ │ -2165 │ │ │ │ │ -2228 template │ │ │ │ │ -_2_2_3_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( │ │ │ │ │ -2232 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2233 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2234 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2235 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2236 int numPatchCoords, │ │ │ │ │ -2237 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2238 PATCH_TABLE *patchTable, │ │ │ │ │ -2239 int fvarChannel, │ │ │ │ │ -2240 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -2241 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -2242 unsigned int numStartEvents=0, │ │ │ │ │ -2243 const cl_event* startEvents=NULL, │ │ │ │ │ -2244 cl_event* endEvent=NULL) { │ │ │ │ │ -2245 │ │ │ │ │ -2246 if (instance) { │ │ │ │ │ -2247 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2248 srcBuffer, srcDesc, │ │ │ │ │ -2249 dstBuffer, dstDesc, │ │ │ │ │ -2250 duBuffer, duDesc, │ │ │ │ │ -2251 dvBuffer, dvDesc, │ │ │ │ │ -2252 numPatchCoords, patchCoords, │ │ │ │ │ -2253 patchTable, fvarChannel, │ │ │ │ │ -2254 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2255 } else { │ │ │ │ │ -2256 // Create an instance on demand (slow) │ │ │ │ │ -2257 (void)deviceContext; // unused │ │ │ │ │ -2258 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -2259 duDesc, dvDesc, deviceContext); │ │ │ │ │ -2260 if (instance) { │ │ │ │ │ -2261 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( │ │ │ │ │ -2262 srcBuffer, srcDesc, │ │ │ │ │ -2263 dstBuffer, dstDesc, │ │ │ │ │ -2264 duBuffer, duDesc, │ │ │ │ │ -2265 dvBuffer, dvDesc, │ │ │ │ │ -2266 numPatchCoords, patchCoords, │ │ │ │ │ -2267 patchTable, fvarChannel, │ │ │ │ │ -2268 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2269 delete instance; │ │ │ │ │ -2270 return r; │ │ │ │ │ -2271 } │ │ │ │ │ -2272 return false; │ │ │ │ │ -2273 } │ │ │ │ │ -2274 } │ │ │ │ │ -2275 │ │ │ │ │ -2327 template │ │ │ │ │ -_2_3_2_9 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2330 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2331 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2332 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2333 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2334 int numPatchCoords, │ │ │ │ │ -2335 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2336 PATCH_TABLE *patchTable, │ │ │ │ │ -2337 int fvarChannel = 0, │ │ │ │ │ -2338 unsigned int numStartEvents=0, │ │ │ │ │ -2339 const cl_event* startEvents=NULL, │ │ │ │ │ -2340 cl_event* endEvent=NULL) const { │ │ │ │ │ -2341 │ │ │ │ │ -2342 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -2343 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -2344 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -2345 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -2346 numPatchCoords, │ │ │ │ │ -2347 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -2348 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -2349 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -2350 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -2351 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2352 } │ │ │ │ │ -2353 │ │ │ │ │ -2434 template │ │ │ │ │ -_2_4_3_7 static bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2438 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2439 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2440 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2441 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2442 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2443 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2444 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2445 int numPatchCoords, │ │ │ │ │ -2446 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2447 PATCH_TABLE *patchTable, │ │ │ │ │ -2448 int fvarChannel, │ │ │ │ │ -2449 _C_L_E_v_a_l_u_a_t_o_r const *instance, │ │ │ │ │ -2450 DEVICE_CONTEXT deviceContext, │ │ │ │ │ -2451 unsigned int numStartEvents=0, │ │ │ │ │ -2452 const cl_event* startEvents=NULL, │ │ │ │ │ -2453 cl_event* endEvent=NULL) { │ │ │ │ │ -2454 │ │ │ │ │ -2455 if (instance) { │ │ │ │ │ -2456 return instance->_E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2457 srcBuffer, srcDesc, │ │ │ │ │ -2458 dstBuffer, dstDesc, │ │ │ │ │ -2459 duBuffer, duDesc, │ │ │ │ │ -2460 dvBuffer, dvDesc, │ │ │ │ │ -2461 duuBuffer, duuDesc, │ │ │ │ │ -2462 duvBuffer, duvDesc, │ │ │ │ │ -2463 dvvBuffer, dvvDesc, │ │ │ │ │ -2464 numPatchCoords, patchCoords, │ │ │ │ │ -2465 patchTable, fvarChannel, │ │ │ │ │ -2466 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2467 } else { │ │ │ │ │ -2468 // Create an instance on demand (slow) │ │ │ │ │ -2469 (void)deviceContext; // unused │ │ │ │ │ -2470 instance = _C_r_e_a_t_e(srcDesc, dstDesc, │ │ │ │ │ -2471 duDesc, dvDesc, │ │ │ │ │ -2472 duuDesc, duvDesc, dvvDesc, │ │ │ │ │ -2473 deviceContext); │ │ │ │ │ -2474 if (instance) { │ │ │ │ │ -2475 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( │ │ │ │ │ -2476 srcBuffer, srcDesc, │ │ │ │ │ -2477 dstBuffer, dstDesc, │ │ │ │ │ -2478 duBuffer, duDesc, │ │ │ │ │ -2479 dvBuffer, dvDesc, │ │ │ │ │ -2480 duuBuffer, duuDesc, │ │ │ │ │ -2481 duvBuffer, duvDesc, │ │ │ │ │ -2482 dvvBuffer, dvvDesc, │ │ │ │ │ -2483 numPatchCoords, patchCoords, │ │ │ │ │ -2484 patchTable, fvarChannel, │ │ │ │ │ -2485 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2486 delete instance; │ │ │ │ │ -2487 return r; │ │ │ │ │ -2488 } │ │ │ │ │ -2489 return false; │ │ │ │ │ -2490 } │ │ │ │ │ -2491 } │ │ │ │ │ -2492 │ │ │ │ │ -2562 template │ │ │ │ │ -_2_5_6_4 bool _E_v_a_l_P_a_t_c_h_e_s_F_a_c_e_V_a_r_y_i_n_g( │ │ │ │ │ -2565 SRC_BUFFER *srcBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &srcDesc, │ │ │ │ │ -2566 DST_BUFFER *dstBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2567 DST_BUFFER *duBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duDesc, │ │ │ │ │ -2568 DST_BUFFER *dvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvDesc, │ │ │ │ │ -2569 DST_BUFFER *duuBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duuDesc, │ │ │ │ │ -2570 DST_BUFFER *duvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &duvDesc, │ │ │ │ │ -2571 DST_BUFFER *dvvBuffer, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dvvDesc, │ │ │ │ │ -2572 int numPatchCoords, │ │ │ │ │ -2573 PATCHCOORD_BUFFER *patchCoords, │ │ │ │ │ -2574 PATCH_TABLE *patchTable, │ │ │ │ │ -2575 int fvarChannel = 0, │ │ │ │ │ -2576 unsigned int numStartEvents=0, │ │ │ │ │ -2577 const cl_event* startEvents=NULL, │ │ │ │ │ -2578 cl_event* endEvent=NULL) const { │ │ │ │ │ -2579 │ │ │ │ │ -2580 return _E_v_a_l_P_a_t_c_h_e_s(srcBuffer->BindCLBuffer(_clCommandQueue), srcDesc, │ │ │ │ │ -2581 dstBuffer->BindCLBuffer(_clCommandQueue), dstDesc, │ │ │ │ │ -2582 duBuffer->BindCLBuffer(_clCommandQueue), duDesc, │ │ │ │ │ -2583 dvBuffer->BindCLBuffer(_clCommandQueue), dvDesc, │ │ │ │ │ -2584 duuBuffer->BindCLBuffer(_clCommandQueue), duuDesc, │ │ │ │ │ -2585 duvBuffer->BindCLBuffer(_clCommandQueue), duvDesc, │ │ │ │ │ -2586 dvvBuffer->BindCLBuffer(_clCommandQueue), dvvDesc, │ │ │ │ │ -2587 numPatchCoords, │ │ │ │ │ -2588 patchCoords->BindCLBuffer(_clCommandQueue), │ │ │ │ │ -2589 patchTable->GetFVarPatchArrayBuffer(fvarChannel), │ │ │ │ │ -2590 patchTable->GetFVarPatchIndexBuffer(fvarChannel), │ │ │ │ │ -2591 patchTable->GetFVarPatchParamBuffer(fvarChannel), │ │ │ │ │ -2592 numStartEvents, startEvents, endEvent); │ │ │ │ │ -2593 } │ │ │ │ │ -2594 │ │ │ │ │ -2600 │ │ │ │ │ -_2_6_0_3 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, │ │ │ │ │ -2604 _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -2605 _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(), │ │ │ │ │ -2606 _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(), │ │ │ │ │ -2607 _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(), │ │ │ │ │ -2608 _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(), │ │ │ │ │ -2609 _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()); │ │ │ │ │ -2610 │ │ │ │ │ -2612 template │ │ │ │ │ -_2_6_1_3 static void _S_y_n_c_h_r_o_n_i_z_e(DEVICE_CONTEXT deviceContext) { │ │ │ │ │ -2614 _S_y_n_c_h_r_o_n_i_z_e(deviceContext->GetCommandQueue()); │ │ │ │ │ -2615 } │ │ │ │ │ -2616 │ │ │ │ │ -_2_6_1_7 static void _S_y_n_c_h_r_o_n_i_z_e(cl_command_queue queue); │ │ │ │ │ -2618 │ │ │ │ │ -2619private: │ │ │ │ │ -2620 cl_context _clContext; │ │ │ │ │ -2621 cl_command_queue _clCommandQueue; │ │ │ │ │ -2622 cl_program _program; │ │ │ │ │ -2623 cl_kernel _stencilKernel; │ │ │ │ │ -2624 cl_kernel _stencilDerivKernel; │ │ │ │ │ -2625 cl_kernel _patchKernel; │ │ │ │ │ -2626}; │ │ │ │ │ -2627 │ │ │ │ │ -2628} // end namespace Osd │ │ │ │ │ -2629 │ │ │ │ │ -2630} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -2631using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -2632 │ │ │ │ │ -2633} // end namespace OpenSubdiv │ │ │ │ │ -2634 │ │ │ │ │ -2635 │ │ │ │ │ -2636#endif // OPENSUBDIV3_OSD_CL_EVALUATOR_H │ │ │ │ │ +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_:_:_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_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -OpenCL stencil table. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem GetDvvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_:_:_O_s_d_:_:_C_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -CLStencilTable(Far::StencilTable const *stencilTable, 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_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 │ │ │ │ │ -cl_mem GetOffsetsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, │ │ │ │ │ -DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_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 │ │ │ │ │ -cl_mem GetIndicesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 _c_l_E_v_a_l_u_a_t_o_r_._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_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 │ │ │ │ │ -cl_mem GetSizesBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem GetDuuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_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_:_:_O_s_d_:_:_C_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 │ │ │ │ │ -cl_mem GetDvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem GetDuvWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_:_:_C_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 │ │ │ │ │ -cl_mem GetDuWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_~_C_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -~CLStencilTable() │ │ │ │ │ -_O_p_e_n_S_u_b_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_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLStencilTable * Create(Far::StencilTable const *stencilTable, │ │ │ │ │ -DEVICE_CONTEXT context) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_:_:_O_s_d_:_:_C_L_S_t_e_n_c_i_l_T_a_b_l_e_:_:_C_L_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -CLStencilTable(Far::LimitStencilTable const *limitStencilTable, 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_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 │ │ │ │ │ -cl_mem GetWeightsBuffer() const │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_L_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_:_:_C_L_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, CLEvaluator │ │ │ │ │ -const *instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, │ │ │ │ │ -const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_3_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_L_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(cl_command_queue queue) │ │ │ │ │ -_O_p_e_n_S_u_b_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_E_v_a_l_u_a_t_o_r_:_:_~_C_L_E_v_a_l_u_a_t_o_r │ │ │ │ │ -~CLEvaluator() │ │ │ │ │ -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_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, │ │ │ │ │ -BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, │ │ │ │ │ -cl_mem dv, BufferDescriptor const &dvDesc, cl_mem sizes, cl_mem offsets, cl_mem │ │ │ │ │ -indices, cl_mem weights, cl_mem duWeights, cl_mem dvWeights, int start, int │ │ │ │ │ -end, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) const │ │ │ │ │ -Dispatch the CL compute kernel asynchronously. returns false if the kernel │ │ │ │ │ -hasn't been compiled yet. │ │ │ │ │ -_O_p_e_n_S_u_b_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_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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, │ │ │ │ │ -unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -cl_context clContext, cl_command_queue clCommandQueue) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_C_L_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, CLEvaluator const │ │ │ │ │ -*instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_2_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_L_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, │ │ │ │ │ -BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, │ │ │ │ │ -cl_mem dv, BufferDescriptor const &dvDesc, int numPatchCoords, cl_mem │ │ │ │ │ -patchCoordsBuffer, cl_mem patchArrayBuffer, cl_mem patchIndexBuffer, cl_mem │ │ │ │ │ -patchParamsBuffer, unsigned int numStartEvents=0, const cl_event │ │ │ │ │ -*startEvents=NULL, cl_event *endEvent=NULL) 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_:_:_C_L_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, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_9_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_L_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, unsigned int numStartEvents=0, │ │ │ │ │ -const cl_event *startEvents=NULL, cl_event *endEvent=NULL) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_5_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_L_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, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_3_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_L_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 _c_l_E_v_a_l_u_a_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_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -DEVICE_CONTEXT deviceContext) │ │ │ │ │ -Generic creator template. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_L_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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, │ │ │ │ │ -unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_0_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_L_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ -BufferDescriptor const &dvvDesc, DEVICE_CONTEXT deviceContext) │ │ │ │ │ -Generic creator template. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_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_:_:_O_s_d_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_P_a_t_c_h_e_s │ │ │ │ │ -bool EvalPatches(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, │ │ │ │ │ -BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, │ │ │ │ │ -cl_mem dv, BufferDescriptor const &dvDesc, cl_mem duu, BufferDescriptor const │ │ │ │ │ -&duuDesc, cl_mem duv, BufferDescriptor const &duvDesc, cl_mem dvv, │ │ │ │ │ -BufferDescriptor const &dvvDesc, int numPatchCoords, cl_mem patchCoordsBuffer, │ │ │ │ │ -cl_mem patchArrayBuffer, cl_mem patchIndexBuffer, cl_mem patchParamsBuffer, │ │ │ │ │ -unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) 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_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, │ │ │ │ │ -BufferDescriptor const &dstDesc, cl_mem du, BufferDescriptor const &duDesc, │ │ │ │ │ -cl_mem dv, BufferDescriptor const &dvDesc, cl_mem duu, BufferDescriptor const │ │ │ │ │ -&duuDesc, cl_mem duv, BufferDescriptor const &duvDesc, cl_mem dvv, │ │ │ │ │ -BufferDescriptor const &dvvDesc, cl_mem sizes, cl_mem offsets, cl_mem indices, │ │ │ │ │ -cl_mem weights, cl_mem duWeights, cl_mem dvWeights, cl_mem duuWeights, cl_mem │ │ │ │ │ -duvWeights, cl_mem dvvWeights, int start, int end, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -const │ │ │ │ │ -Dispatch the CL compute kernel asynchronously. returns false if the kernel │ │ │ │ │ -hasn't been compiled yet. │ │ │ │ │ -_O_p_e_n_S_u_b_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_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, │ │ │ │ │ -unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_5_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_:_:_C_L_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, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_C_L_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, unsigned │ │ │ │ │ -int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_6_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_:_:_C_L_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, CLEvaluator const *instance, │ │ │ │ │ -DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event │ │ │ │ │ -*startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_6_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_L_E_v_a_l_u_a_t_o_r_:_:_S_y_n_c_h_r_o_n_i_z_e │ │ │ │ │ -static void Synchronize(DEVICE_CONTEXT deviceContext) │ │ │ │ │ -Wait the OpenCL kernels finish. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_6_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_:_:_C_L_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, CLEvaluator const *instance, │ │ │ │ │ -DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const cl_event │ │ │ │ │ -*startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_C_L_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, │ │ │ │ │ -CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic static stencil function. This function has a same signature as other │ │ │ │ │ -device kernels have so t... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -bool EvalStencils(cl_mem src, BufferDescriptor const &srcDesc, cl_mem dst, │ │ │ │ │ -BufferDescriptor const &dstDesc, cl_mem sizes, cl_mem offsets, cl_mem indices, │ │ │ │ │ -cl_mem weights, int start, int end, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) 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_:_:_C_L_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, │ │ │ │ │ -CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_C_L_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, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_3_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_:_:_O_s_d_:_:_C_L_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, │ │ │ │ │ -CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_4_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_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor │ │ │ │ │ -const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, │ │ │ │ │ -BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, │ │ │ │ │ -BufferDescriptor const &dvvDesc, cl_context clContext, cl_command_queue │ │ │ │ │ -clCommandQueue) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_:_:_C_L_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, CLEvaluator const *instance, DEVICE_CONTEXT deviceContext, │ │ │ │ │ -unsigned int numStartEvents=0, const cl_event *startEvents=NULL, cl_event │ │ │ │ │ -*endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_0_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_L_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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, │ │ │ │ │ -cl_event *endEvent=NULL) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_C_L_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, CLEvaluator const │ │ │ │ │ -*instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_9_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_L_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, unsigned int │ │ │ │ │ -numStartEvents=0, const cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_5_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_L_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, CLEvaluator const │ │ │ │ │ -*instance, DEVICE_CONTEXT deviceContext, unsigned int numStartEvents=0, const │ │ │ │ │ -cl_event *startEvents=NULL, cl_event *endEvent=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_8_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_L_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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, │ │ │ │ │ -cl_event *endEvent=NULL) const │ │ │ │ │ -Generic stencil function. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._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_:_:_O_s_d_:_:_C_L_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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, │ │ │ │ │ -cl_event *endEvent=NULL) const │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_1_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_:_:_O_s_d_:_:_C_L_E_v_a_l_u_a_t_o_r_:_:_C_L_E_v_a_l_u_a_t_o_r │ │ │ │ │ -CLEvaluator(cl_context context, cl_command_queue queue) │ │ │ │ │ -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_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_:_:_C_L_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, unsigned int numStartEvents=0, const cl_event *startEvents=NULL, │ │ │ │ │ -cl_event *endEvent=NULL) const │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _c_l_E_v_a_l_u_a_t_o_r_._h_:_2_1_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_:_:_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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_l_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _l_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00806.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarRefinement.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,42 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlVertexBuffer.h File Reference
    │ │ │ │ +
    fvarRefinement.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/mtlCommon.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/crease.h"
    │ │ │ │ +#include "../vtr/types.h"
    │ │ │ │ +#include "../vtr/refinement.h"
    │ │ │ │ +#include "../vtr/fvarLevel.h"
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstring>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  CPUMTLVertexBuffer
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,27 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mtlVertexBuffer.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +fvarRefinement.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_m_t_l_C_o_m_m_o_n_._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_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_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_:_:_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_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00806_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarRefinement.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlVertexBuffer.h
    │ │ │ │ +
    fvarRefinement.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,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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29#include "../osd/mtlCommon.h"
    │ │ │ │ -
    30
    │ │ │ │ -
    31@protocol MTLDevice;
    │ │ │ │ -
    32@protocol MTLBuffer;
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Osd {
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    40public:
    │ │ │ │ -
    41 static CPUMTLVertexBuffer* Create(int numElements, int numVertices, MTLContext* context);
    │ │ │ │ +
    39
    │ │ │ │ +
    40namespace OpenSubdiv {
    │ │ │ │ +
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │
    42
    │ │ │ │ -
    43 void UpdateData(const float* src, int startVertex, int numVertices, MTLContext* context);
    │ │ │ │ -
    44
    │ │ │ │ -
    │ │ │ │ -
    45 int GetNumElements() const
    │ │ │ │ -
    46 {
    │ │ │ │ -
    47 return _numElements;
    │ │ │ │ -
    48 }
    │ │ │ │ -
    │ │ │ │ -
    49
    │ │ │ │ -
    │ │ │ │ -
    50 int GetNumVertices() const
    │ │ │ │ -
    51 {
    │ │ │ │ -
    52 return _numVertices;
    │ │ │ │ -
    53 }
    │ │ │ │ -
    │ │ │ │ -
    54
    │ │ │ │ -
    55 float* BindCpuBuffer();
    │ │ │ │ -
    56 id<MTLBuffer> BindMTLBuffer(MTLContext* context);
    │ │ │ │ -
    57
    │ │ │ │ -
    │ │ │ │ -
    58 id<MTLBuffer> BindVBO(MTLContext* context)
    │ │ │ │ -
    59 {
    │ │ │ │ -
    60 return BindMTLBuffer(context);
    │ │ │ │ -
    61 }
    │ │ │ │ -
    │ │ │ │ -
    62
    │ │ │ │ -
    63protected:
    │ │ │ │ -
    64
    │ │ │ │ -
    65 CPUMTLVertexBuffer(int numElements, int numVertices);
    │ │ │ │ -
    66
    │ │ │ │ -
    67 bool allocate(MTLContext* context);
    │ │ │ │ -
    68
    │ │ │ │ -
    69private:
    │ │ │ │ -
    70 int _numElements;
    │ │ │ │ -
    71 int _numVertices;
    │ │ │ │ -
    72 id<MTLBuffer> _buffer;
    │ │ │ │ -
    73 bool _dirty;
    │ │ │ │ -
    74};
    │ │ │ │ -
    │ │ │ │ -
    75
    │ │ │ │ -
    76} //end namespace Osd
    │ │ │ │ -
    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)
    │ │ │ │ - │ │ │ │ -
    id< MTLBuffer > BindMTLBuffer(MTLContext *context)
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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 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 //
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlVertexBuffer.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 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,102 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_VERTEX_BUFFER_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29#include "../osd/mtlCommon.h" │ │ │ │ │ -30 │ │ │ │ │ -31@protocol MTLDevice; │ │ │ │ │ -32@protocol MTLBuffer; │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_FVAR_REFINEMENT_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_FVAR_REFINEMENT_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 │ │ │ │ │ -_3_9class _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -40public: │ │ │ │ │ -_4_1 static _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r* _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ +39 │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -_4_3 void _U_p_d_a_t_e_D_a_t_a(const float* src, int startVertex, int numVertices, │ │ │ │ │ -_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -44 │ │ │ │ │ -_4_5 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const │ │ │ │ │ -46 { │ │ │ │ │ -47 return _numElements; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -_5_0 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const │ │ │ │ │ -51 { │ │ │ │ │ -52 return _numVertices; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -_5_5 float* _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ -_5_6 id _B_i_n_d_M_T_L_B_u_f_f_e_r(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -57 │ │ │ │ │ -_5_8 id _B_i_n_d_V_B_O(_M_T_L_C_o_n_t_e_x_t* context) │ │ │ │ │ -59 { │ │ │ │ │ -60 return _B_i_n_d_M_T_L_B_u_f_f_e_r(context); │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63protected: │ │ │ │ │ -64 │ │ │ │ │ -_6_5 _C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -66 │ │ │ │ │ -_6_7 bool _a_l_l_o_c_a_t_e(_M_T_L_C_o_n_t_e_x_t* context); │ │ │ │ │ -68 │ │ │ │ │ -69private: │ │ │ │ │ -70 int _numElements; │ │ │ │ │ -71 int _numVertices; │ │ │ │ │ -72 id _buffer; │ │ │ │ │ -73 bool _dirty; │ │ │ │ │ -74}; │ │ │ │ │ -75 │ │ │ │ │ -76} //end namespace Osd │ │ │ │ │ -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 │ │ │ │ │ +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 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 // │ │ │ │ │ +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_:_:_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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_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_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ -id< MTLBuffer > BindVBO(MTLContext *context) │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CPUMTLVertexBuffer(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_:_:_C_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CPUMTLVertexBuffer * Create(int numElements, int numVertices, 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_:_:_C_P_U_M_T_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 │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._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_:_:_C_P_U_M_T_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, 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_:_:_C_P_U_M_T_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 │ │ │ │ │ -DDeeffiinniittiioonn _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._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_P_U_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_M_T_L_B_u_f_f_e_r │ │ │ │ │ -id< MTLBuffer > BindMTLBuffer(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_:_:_C_P_U_M_T_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_M_T_L_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(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_:_:_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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _m_t_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _f_v_a_r_R_e_f_i_n_e_m_e_n_t_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/ompEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/stackBuffer.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,44 +88,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    ompEvaluator.h File Reference
    │ │ │ │ +
    stackBuffer.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  OmpEvaluator
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,19 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -ompEvaluator.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +stackBuffer.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   _O_m_p_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_:_:_V_t_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _o_m_p_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00809_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/ompEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/stackBuffer.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    ompEvaluator.h
    │ │ │ │ +
    stackBuffer.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,529 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_OMP_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_OMP_EVALUATOR_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29#include "../osd/bufferDescriptor.h"
    │ │ │ │ -
    30#include "../osd/types.h"
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_STACK_BUFFER_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29namespace OpenSubdiv {
    │ │ │ │ +
    30namespace OPENSUBDIV_VERSION {
    │ │ │ │
    31
    │ │ │ │ -
    32#include <cstddef>
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    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 OmpEvaluator *instance = NULL,
    │ │ │ │ -
    77 void * deviceContext = NULL) {
    │ │ │ │ -
    78
    │ │ │ │ -
    79 (void)instance; // unused
    │ │ │ │ -
    80 (void)deviceContext; // unused
    │ │ │ │ -
    81
    │ │ │ │ -
    82 if (stencilTable->GetNumStencils() == 0)
    │ │ │ │ -
    83 return false;
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ -
    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 OmpEvaluator *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 OmpEvaluator *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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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 OmpEvaluator 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
    │ │ │ │ -
    1226 static void Synchronize(void *deviceContext = NULL);
    │ │ │ │ -
    1227
    │ │ │ │ -
    1228 static void SetNumThreads(int numThreads);
    │ │ │ │ -
    1229};
    │ │ │ │ -
    │ │ │ │ -
    1230
    │ │ │ │ -
    1231
    │ │ │ │ -
    1232} // end namespace Osd
    │ │ │ │ -
    1233
    │ │ │ │ -
    1234} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    1235using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    1236
    │ │ │ │ -
    1237} // end namespace OpenSubdiv
    │ │ │ │ -
    1238
    │ │ │ │ -
    1239
    │ │ │ │ -
    1240#endif // OPENSUBDIV3_OSD_OMP_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, 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 ...
    │ │ │ │ -
    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, 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, 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 EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const OmpEvaluator *instance=NULL, void *deviceContext=NULL)
    Generic static eval stencils function. This function has a same signature as other device kernels hav...
    │ │ │ │ -
    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, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
    Generic limit eval function with derivatives. This function has a same signature as other device kern...
    │ │ │ │ -
    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, 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 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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL)
    Generic limit eval function with derivatives. This function has a same signature as other device kern...
    │ │ │ │ -
    static void Synchronize(void *deviceContext=NULL)
    │ │ │ │ -
    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 OmpEvaluator *instance=NULL, void *deviceContext=NULL)
    Generic static eval stencils function with derivatives. This function has a same signature as other d...
    │ │ │ │ -
    static bool EvalPatches(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 ...
    │ │ │ │ -
    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 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 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, OmpEvaluator const *instance=NULL, 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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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
    │ │ │ │ +
    113template <typename TYPE, unsigned int SIZE, bool POD_TYPE>
    │ │ │ │ +
    114inline void
    │ │ │ │ +
    115StackBuffer<TYPE,SIZE,POD_TYPE>::deallocate() {
    │ │ │ │ +
    116
    │ │ │ │ +
    117 ::operator delete(_dynamicData);
    │ │ │ │ +
    118
    │ │ │ │ +
    119 _data = reinterpret_cast<TYPE*>(_staticData);
    │ │ │ │ +
    120 _capacity = SIZE;
    │ │ │ │ +
    121}
    │ │ │ │ +
    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) {
    │ │ │ │ +
    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) {
    │ │ │ │ +
    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 */
    │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -ompEvaluator.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 2015 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,656 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_OMP_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_OMP_EVALUATOR_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29#include "../osd/bufferDescriptor.h" │ │ │ │ │ -30#include "../osd/types.h" │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_STACK_BUFFER_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +30namespace OPENSUBDIV_VERSION { │ │ │ │ │ 31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Osd { │ │ │ │ │ -38 │ │ │ │ │ -_3_9class _O_m_p_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 _O_m_p_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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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 _O_m_p_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_6 static void _S_y_n_c_h_r_o_n_i_z_e(void *deviceContext = NULL); │ │ │ │ │ -1227 │ │ │ │ │ -_1_2_2_8 static void _S_e_t_N_u_m_T_h_r_e_a_d_s(int numThreads); │ │ │ │ │ -1229}; │ │ │ │ │ -1230 │ │ │ │ │ -1231 │ │ │ │ │ -1232} // end namespace Osd │ │ │ │ │ -1233 │ │ │ │ │ -1234} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -1235using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -1236 │ │ │ │ │ -1237} // end namespace OpenSubdiv │ │ │ │ │ -1238 │ │ │ │ │ -1239 │ │ │ │ │ -1240#endif // OPENSUBDIV3_OSD_OMP_EVALUATOR_H │ │ │ │ │ +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 │ │ │ │ │ +113template │ │ │ │ │ +114inline void │ │ │ │ │ +115StackBuffer::deallocate() { │ │ │ │ │ +116 │ │ │ │ │ +117 ::operator delete(_dynamicData); │ │ │ │ │ +118 │ │ │ │ │ +119 _data = reinterpret_cast(_staticData); │ │ │ │ │ +120 _capacity = SIZE; │ │ │ │ │ +121} │ │ │ │ │ +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) { │ │ │ │ │ +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) { │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_O_m_p_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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 │ │ │ │ │ -OmpEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, │ │ │ │ │ -OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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 OmpEvaluator *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function. This function has a same signature as │ │ │ │ │ -other device kernels hav... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const *instance=NULL, void │ │ │ │ │ -*deviceContext=NULL) │ │ │ │ │ -Generic limit eval function with derivatives. This function has a same │ │ │ │ │ -signature as other device kern... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_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 OmpEvaluator *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic static eval stencils function with derivatives. This function has a │ │ │ │ │ -same signature as other d... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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, OmpEvaluator const │ │ │ │ │ -*instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_O_m_p_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_:_:_O_m_p_E_v_a_l_u_a_t_o_r_:_:_S_e_t_N_u_m_T_h_r_e_a_d_s │ │ │ │ │ -static void SetNumThreads(int numThreads) │ │ │ │ │ -_O_p_e_n_S_u_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_m_p_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_:_:_O_m_p_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, │ │ │ │ │ -OmpEvaluator const *instance=NULL, void *deviceContext=NULL) │ │ │ │ │ -Generic limit eval function. This function has a same signature as other device │ │ │ │ │ -kernels have so that ... │ │ │ │ │ -DDeeffiinniittiioonn _o_m_p_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_:_:_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 │ │ │ │ │ - * _o_m_p_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _s_t_a_c_k_B_u_f_f_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/glPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/sparseSelector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,47 +88,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    glPatchTable.h File Reference
    │ │ │ │ +
    sparseSelector.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/opengl.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ +#include "../vtr/types.h"
    │ │ │ │ +#include "../vtr/refinement.h"
    │ │ │ │ #include <vector>
    │ │ │ │
    │ │ │ │

    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
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +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 │ │ │ │ │ -glPatchTable.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +sparseSelector.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 "_._._/_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 │ │ │ │ │ _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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00812_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/sparseSelector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    glPatchTable.h
    │ │ │ │ +
    sparseSelector.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,201 +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
    │ │ │ │ -
    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/nonCopyable.h"
    │ │ │ │ -
    31#include "../osd/opengl.h"
    │ │ │ │ -
    32#include "../osd/types.h"
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../vtr/types.h"
    │ │ │ │ +
    30#include "../vtr/refinement.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32#include <vector>
    │ │ │ │
    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
    │ │ │ │ - │ │ │ │ -
    50
    │ │ │ │ -
    51 static GLPatchTable *Create(Far::PatchTable const *farPatchTable,
    │ │ │ │ -
    52 void *deviceContext = NULL);
    │ │ │ │ -
    53
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    56 return _patchArrays;
    │ │ │ │ -
    57 }
    │ │ │ │ -
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace Vtr {
    │ │ │ │ +
    38namespace internal {
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ -
    60 GLuint GetPatchIndexBuffer() const {
    │ │ │ │ -
    61 return _patchIndexBuffer;
    │ │ │ │ -
    62 }
    │ │ │ │ -
    │ │ │ │ -
    63
    │ │ │ │ -
    │ │ │ │ -
    65 GLuint GetPatchParamBuffer() const {
    │ │ │ │ -
    66 return _patchParamBuffer;
    │ │ │ │ -
    67 }
    │ │ │ │ -
    │ │ │ │ -
    68
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    71 return _patchIndexTexture;
    │ │ │ │ -
    72 }
    │ │ │ │ -
    │ │ │ │ -
    73
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    76 return _patchParamTexture;
    │ │ │ │ -
    77 }
    │ │ │ │ -
    │ │ │ │ +
    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 //
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    82 }
    │ │ │ │ -
    │ │ │ │ -
    83
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    87 }
    │ │ │ │ -
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    92 }
    │ │ │ │ -
    │ │ │ │ +
    89private:
    │ │ │ │ +
    90 Refinement* _refine;
    │ │ │ │ +
    91 bool _selected;
    │ │ │ │ +
    92};
    │ │ │ │
    93
    │ │ │ │ -
    95 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
    │ │ │ │ +
    94} // end namespace internal
    │ │ │ │ +
    95} // end namespace Vtr
    │ │ │ │
    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.
    │ │ │ │ - │ │ │ │ +
    97} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    98using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    99} // end namespace OpenSubdiv
    │ │ │ │ +
    100
    │ │ │ │ +
    101#endif /* OPENSUBDIV3_VTR_SPARSE_SELECTOR_H */
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glPatchTable.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 2015 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,250 +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 │ │ │ │ │ -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/nonCopyable.h" │ │ │ │ │ -31#include "../osd/opengl.h" │ │ │ │ │ -32#include "../osd/types.h" │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_SPARSE_SELECTOR_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../vtr/types.h" │ │ │ │ │ +30#include "../vtr/refinement.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 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(); │ │ │ │ │ -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 } │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Vtr { │ │ │ │ │ +38namespace internal { │ │ │ │ │ +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 │ │ │ │ │ -_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 _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 } │ │ │ │ │ +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 // │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +89private: │ │ │ │ │ +90 Refinement* _refine; │ │ │ │ │ +91 bool _selected; │ │ │ │ │ +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(); } │ │ │ │ │ +94} // end namespace internal │ │ │ │ │ +95} // end namespace Vtr │ │ │ │ │ 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 │ │ │ │ │ +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_:_:_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_:_:_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_s_d │ │ │ │ │ - * _g_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _s_p_a_r_s_e_S_e_l_e_c_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00815.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glMesh.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarLevel.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
    │ │ │ │ -
    glMesh.h File Reference
    │ │ │ │ +Namespaces
    │ │ │ │ +
    fvarLevel.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/mesh.h"
    │ │ │ │ -#include "../osd/glPatchTable.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/crease.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │ +#include "../vtr/types.h"
    │ │ │ │ +#include "../vtr/level.h"
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstring>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Namespaces

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

    │ │ │ │ -Typedefs

    typedef MeshInterface< GLPatchTableGLMeshInterface
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,27 @@ │ │ │ │ │ [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 │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +fvarLevel.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 "_._._/_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_/_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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _g_l_M_e_s_h_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _f_v_a_r_L_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00815_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glMesh.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/vtr/fvarLevel.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    glMesh.h
    │ │ │ │ +
    fvarLevel.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,46 +118,443 @@ │ │ │ │
    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_OSD_GL_MESH_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_MESH_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
    │ │ │ │ - │ │ │ │ +
    24#ifndef OPENSUBDIV3_VTR_FVAR_LEVEL_H
    │ │ │ │ +
    25#define OPENSUBDIV3_VTR_FVAR_LEVEL_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"
    │ │ │ │ +
    33#include "../vtr/level.h"
    │ │ │ │ +
    34
    │ │ │ │ +
    35#include <vector>
    │ │ │ │ +
    36#include <cassert>
    │ │ │ │ +
    37#include <cstring>
    │ │ │ │ +
    38
    │ │ │ │
    39
    │ │ │ │ -
    40
    │ │ │ │ -
    41} // end namespace Osd
    │ │ │ │ +
    40namespace OpenSubdiv {
    │ │ │ │ +
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │
    42
    │ │ │ │ -
    43} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    44using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    43namespace Vtr {
    │ │ │ │ +
    44namespace internal {
    │ │ │ │
    45
    │ │ │ │ -
    46} // end namespace OpenSubdiv
    │ │ │ │ -
    47
    │ │ │ │ -
    48#endif // OPENSUBDIV3_OSD_GL_MESH_H
    │ │ │ │ - │ │ │ │ -
    MeshInterface< GLPatchTable > GLMeshInterface
    Definition glMesh.h:38
    │ │ │ │ - │ │ │ │ +
    46//
    │ │ │ │ +
    47// FVarLevel:
    │ │ │ │ +
    48// A "face-varying channel" includes the topology for a set of face-varying
    │ │ │ │ +
    49// data, relative to the topology of the Level with which it is associated.
    │ │ │ │ +
    50//
    │ │ │ │ +
    51// Analogous to a set of vertices and face-vertices that define the topology for
    │ │ │ │ +
    52// the geometry, a channel requires a set of "values" and "face-values". The
    │ │ │ │ +
    53// "values" are indices of entries in a set of face-varying data, just as vertices
    │ │ │ │ +
    54// are indices into a set of vertex data. The face-values identify a value for
    │ │ │ │ +
    55// each vertex of the face, and so define topology for the values that may be
    │ │ │ │ +
    56// unique to each channel.
    │ │ │ │ +
    57//
    │ │ │ │ +
    58// In addition to the value size and the vector of face-values (which matches the
    │ │ │ │ +
    59// size of the geometry's face-vertices), tags are associated with each component
    │ │ │ │ +
    60// to identify deviations of the face-varying topology from the vertex topology.
    │ │ │ │ +
    61// And since there may be a one-to-many mapping between vertices and face-varying
    │ │ │ │ +
    62// values, that mapping is also allocated.
    │ │ │ │ +
    63//
    │ │ │ │ +
    64// It turns out that the mapping used is able to completely encode the set of
    │ │ │ │ +
    65// face-values and is more amenable to refinement. Currently the face-values
    │ │ │ │ +
    66// take up almost half the memory of this representation, so if memory does
    │ │ │ │ +
    67// become a concern, we do not need to store them. The only reason we do so now
    │ │ │ │ +
    68// is that the face-value interface for specifying base topology and inspecting
    │ │ │ │ +
    69// subsequent levels is very familiar to that of face-vertices for clients. So
    │ │ │ │ +
    70// having them available for such access is convenient.
    │ │ │ │ +
    71//
    │ │ │ │ +
    72// Regarding scope and access...
    │ │ │ │ +
    73// Unclear at this early state, but leaning towards nesting this class within
    │ │ │ │ +
    74// Level, given the intimate dependency between the two.
    │ │ │ │ +
    75// Everything is being declared public for now to facilitate access until it's
    │ │ │ │ +
    76// clearer how this functionality will be provided.
    │ │ │ │ +
    77//
    │ │ │ │ +
    78class FVarLevel {
    │ │ │ │ +
    79public:
    │ │ │ │ +
    80 //
    │ │ │ │ +
    81 // Component tags -- trying to minimize the types needed here:
    │ │ │ │ +
    82 //
    │ │ │ │ +
    83 // Tag per Edge:
    │ │ │ │ +
    84 // - facilitates topological analysis around each vertex
    │ │ │ │ +
    85 // - required during refinement to spawn one or more edge-values
    │ │ │ │ +
    86 //
    │ │ │ │ +
    87 struct ETag {
    │ │ │ │ +
    88 ETag() { }
    │ │ │ │ +
    89
    │ │ │ │ +
    90 void clear() { std::memset(this, 0, sizeof(ETag)); }
    │ │ │ │ +
    91
    │ │ │ │ +
    92 typedef unsigned char ETagSize;
    │ │ │ │ +
    93
    │ │ │ │ +
    94 ETagSize _mismatch : 1; // local FVar topology does not match
    │ │ │ │ +
    95 ETagSize _disctsV0 : 1; // discontinuous at vertex 0
    │ │ │ │ +
    96 ETagSize _disctsV1 : 1; // discontinuous at vertex 1
    │ │ │ │ +
    97 ETagSize _linear : 1; // linear boundary constraints
    │ │ │ │ +
    98
    │ │ │ │ +
    99 Level::ETag combineWithLevelETag(Level::ETag) const;
    │ │ │ │ +
    100 };
    │ │ │ │ +
    101
    │ │ │ │ +
    102 //
    │ │ │ │ +
    103 // Tag per Value:
    │ │ │ │ +
    104 // - informs both refinement and interpolation
    │ │ │ │ +
    105 // - every value spawns a child value in refinement
    │ │ │ │ +
    106 // - includes a subset of Level::VTag to be later combined with a VTag
    │ │ │ │ +
    107 //
    │ │ │ │ +
    108 struct ValueTag {
    │ │ │ │ +
    109 ValueTag() { }
    │ │ │ │ +
    110
    │ │ │ │ +
    111 void clear() { std::memset(this, 0, sizeof(ValueTag)); }
    │ │ │ │ +
    112
    │ │ │ │ +
    113 bool isMismatch() const { return _mismatch; }
    │ │ │ │ +
    114 bool isCrease() const { return _crease; }
    │ │ │ │ +
    115 bool isCorner() const { return !_crease; }
    │ │ │ │ +
    116 bool isSemiSharp() const { return _semiSharp; }
    │ │ │ │ +
    117 bool isInfSharp() const { return !_semiSharp && !_crease; }
    │ │ │ │ +
    118 bool isDepSharp() const { return _depSharp; }
    │ │ │ │ +
    119 bool hasCreaseEnds() const { return _crease || _semiSharp; }
    │ │ │ │ +
    120
    │ │ │ │ +
    121 bool hasInfSharpEdges() const { return _infSharpEdges; }
    │ │ │ │ +
    122 bool hasInfIrregularity() const { return _infIrregular; }
    │ │ │ │ +
    123
    │ │ │ │ +
    124 typedef unsigned char ValueTagSize;
    │ │ │ │ +
    125
    │ │ │ │ +
    126 // If there is no mismatch, no other members should be inspected
    │ │ │ │ +
    127 ValueTagSize _mismatch : 1; // local FVar topology does not match
    │ │ │ │ +
    128 ValueTagSize _xordinary : 1; // local FVar topology is extra-ordinary
    │ │ │ │ +
    129 ValueTagSize _nonManifold : 1; // local FVar topology is non-manifold
    │ │ │ │ +
    130 ValueTagSize _crease : 1; // value is a crease, otherwise a corner
    │ │ │ │ +
    131 ValueTagSize _semiSharp : 1; // value is a corner decaying to crease
    │ │ │ │ +
    132 ValueTagSize _depSharp : 1; // value is a corner by dependency on another
    │ │ │ │ +
    133
    │ │ │ │ +
    134 ValueTagSize _infSharpEdges : 1; // value is a corner by inf-sharp features
    │ │ │ │ +
    135 ValueTagSize _infIrregular : 1; // value span includes inf-sharp irregularity
    │ │ │ │ +
    136
    │ │ │ │ +
    137 Level::VTag combineWithLevelVTag(Level::VTag) const;
    │ │ │ │ +
    138
    │ │ │ │ +
    139 // Alternate constructor and accessor for dealing with integer bits directly:
    │ │ │ │ +
    140 explicit ValueTag(ValueTagSize bits) {
    │ │ │ │ +
    141 std::memcpy(this, &bits, sizeof(bits));
    │ │ │ │ +
    142 }
    │ │ │ │ +
    143 ValueTagSize getBits() const {
    │ │ │ │ +
    144 ValueTagSize bits;
    │ │ │ │ +
    145 std::memcpy(&bits, this, sizeof(bits));
    │ │ │ │ +
    146 return bits;
    │ │ │ │ +
    147 }
    │ │ │ │ +
    148 };
    │ │ │ │ +
    149
    │ │ │ │ +
    150 typedef Vtr::ConstArray<ValueTag> ConstValueTagArray;
    │ │ │ │ +
    151 typedef Vtr::Array<ValueTag> ValueTagArray;
    │ │ │ │ +
    152
    │ │ │ │ +
    153 //
    │ │ │ │ +
    154 // Simple struct containing the "end faces" of a crease, i.e. the faces which
    │ │ │ │ +
    155 // contain the FVar values to be used when interpolating the crease. (Prefer
    │ │ │ │ +
    156 // the struct over std::pair for its member names)
    │ │ │ │ +
    157 //
    │ │ │ │ +
    158 struct CreaseEndPair {
    │ │ │ │ +
    159 LocalIndex _startFace;
    │ │ │ │ +
    160 LocalIndex _endFace;
    │ │ │ │ +
    161 };
    │ │ │ │ +
    162
    │ │ │ │ +
    163 typedef Vtr::ConstArray<CreaseEndPair> ConstCreaseEndPairArray;
    │ │ │ │ +
    164 typedef Vtr::Array<CreaseEndPair> CreaseEndPairArray;
    │ │ │ │ +
    165
    │ │ │ │ +
    166 typedef LocalIndex Sibling;
    │ │ │ │ +
    167
    │ │ │ │ +
    168 typedef ConstLocalIndexArray ConstSiblingArray;
    │ │ │ │ +
    169 typedef LocalIndexArray SiblingArray;
    │ │ │ │ +
    170
    │ │ │ │ +
    171public:
    │ │ │ │ +
    172 FVarLevel(Level const& level);
    │ │ │ │ +
    173 ~FVarLevel();
    │ │ │ │ +
    174
    │ │ │ │ +
    175 // Queries for the entire channel:
    │ │ │ │ +
    176 Level const& getLevel() const { return _level; }
    │ │ │ │ +
    177
    │ │ │ │ +
    178 int getNumValues() const { return _valueCount; }
    │ │ │ │ +
    179 int getNumFaceValuesTotal() const { return (int) _faceVertValues.size(); }
    │ │ │ │ +
    180
    │ │ │ │ +
    181 bool isLinear() const { return _isLinear; }
    │ │ │ │ +
    182 bool hasLinearBoundaries() const { return _hasLinearBoundaries; }
    │ │ │ │ +
    183 bool hasSmoothBoundaries() const { return ! _hasLinearBoundaries; }
    │ │ │ │ +
    184 bool hasCreaseEnds() const { return hasSmoothBoundaries(); }
    │ │ │ │ +
    185
    │ │ │ │ +
    186 Sdc::Options getOptions() const { return _options; }
    │ │ │ │ +
    187
    │ │ │ │ +
    188 // Queries per face:
    │ │ │ │ +
    189 ConstIndexArray getFaceValues(Index fIndex) const;
    │ │ │ │ +
    190 IndexArray getFaceValues(Index fIndex);
    │ │ │ │ +
    191
    │ │ │ │ +
    192 // Queries per edge:
    │ │ │ │ +
    193 ETag getEdgeTag(Index eIndex) const { return _edgeTags[eIndex]; }
    │ │ │ │ +
    194 bool edgeTopologyMatches(Index eIndex) const { return !getEdgeTag(eIndex)._mismatch; }
    │ │ │ │ +
    195
    │ │ │ │ +
    196 // Queries per vertex (and its potential sibling values):
    │ │ │ │ +
    197 int getNumVertexValues(Index v) const { return _vertSiblingCounts[v]; }
    │ │ │ │ +
    198 Index getVertexValueOffset(Index v, Sibling i = 0) const { return _vertSiblingOffsets[v] + i; }
    │ │ │ │ +
    199
    │ │ │ │ +
    200 Index getVertexValue(Index v, Sibling i = 0) const { return _vertValueIndices[getVertexValueOffset(v,i)]; }
    │ │ │ │ +
    201
    │ │ │ │ +
    202 Index findVertexValueIndex(Index vertexIndex, Index valueIndex) const;
    │ │ │ │ +
    203
    │ │ │ │ +
    204 // Methods to access/modify array properties per vertex:
    │ │ │ │ +
    205 ConstIndexArray getVertexValues(Index vIndex) const;
    │ │ │ │ +
    206 IndexArray getVertexValues(Index vIndex);
    │ │ │ │ +
    207
    │ │ │ │ +
    208 ConstValueTagArray getVertexValueTags(Index vIndex) const;
    │ │ │ │ +
    209 ValueTagArray getVertexValueTags(Index vIndex);
    │ │ │ │ +
    210
    │ │ │ │ +
    211 ConstCreaseEndPairArray getVertexValueCreaseEnds(Index vIndex) const;
    │ │ │ │ +
    212 CreaseEndPairArray getVertexValueCreaseEnds(Index vIndex);
    │ │ │ │ +
    213
    │ │ │ │ +
    214 ConstSiblingArray getVertexFaceSiblings(Index vIndex) const;
    │ │ │ │ +
    215 SiblingArray getVertexFaceSiblings(Index vIndex);
    │ │ │ │ +
    216
    │ │ │ │ +
    217 // Queries per value:
    │ │ │ │ +
    218 ValueTag getValueTag(Index valueIndex) const { return _vertValueTags[valueIndex]; }
    │ │ │ │ +
    219 bool valueTopologyMatches(Index valueIndex) const { return !getValueTag(valueIndex)._mismatch; }
    │ │ │ │ +
    220
    │ │ │ │ +
    221 CreaseEndPair getValueCreaseEndPair(Index valueIndex) const { return _vertValueCreaseEnds[valueIndex]; }
    │ │ │ │ +
    222
    │ │ │ │ +
    223 // Tag queries related to faces (use Level methods for those returning Level::VTag/ETag)
    │ │ │ │ +
    224 void getFaceValueTags(Index faceIndex, ValueTag valueTags[]) const;
    │ │ │ │ +
    225
    │ │ │ │ +
    226 ValueTag getFaceCompositeValueTag(Index faceIndex) const;
    │ │ │ │ +
    227
    │ │ │ │ +
    228 // Higher-level topological queries, i.e. values in a neighborhood:
    │ │ │ │ +
    229 void getEdgeFaceValues(Index eIndex, int fIncToEdge, Index valuesPerVert[2]) const;
    │ │ │ │ +
    230 void getVertexEdgeValues(Index vIndex, Index valuesPerEdge[]) const;
    │ │ │ │ +
    231 void getVertexCreaseEndValues(Index vIndex, Sibling sibling, Index endValues[2]) const;
    │ │ │ │ +
    232
    │ │ │ │ +
    233 // Initialization and allocation helpers:
    │ │ │ │ +
    234 void setOptions(Sdc::Options const& options);
    │ │ │ │ +
    235 void resizeVertexValues(int numVertexValues);
    │ │ │ │ +
    236 void resizeValues(int numValues);
    │ │ │ │ +
    237 void resizeComponents();
    │ │ │ │ +
    238
    │ │ │ │ +
    239 // Topological analysis methods -- tagging and face-value population:
    │ │ │ │ +
    240 void completeTopologyFromFaceValues(int regBoundaryValence);
    │ │ │ │ +
    241 void initializeFaceValuesFromFaceVertices();
    │ │ │ │ +
    242 void initializeFaceValuesFromVertexFaceSiblings();
    │ │ │ │ +
    243
    │ │ │ │ +
    244 struct ValueSpan;
    │ │ │ │ +
    245 void gatherValueSpans(Index vIndex, ValueSpan * vValueSpans) const;
    │ │ │ │ +
    246
    │ │ │ │ +
    247 // Debugging methods:
    │ │ │ │ +
    248 bool validate() const;
    │ │ │ │ +
    249 void print() const;
    │ │ │ │ +
    250 void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector<Sibling>& fvSiblings) const;
    │ │ │ │ +
    251
    │ │ │ │ +
    252private:
    │ │ │ │ +
    253 // Just as Refinements build Levels, FVarRefinements build FVarLevels...
    │ │ │ │ +
    254 friend class FVarRefinement;
    │ │ │ │ +
    255
    │ │ │ │ +
    256 Level const & _level;
    │ │ │ │ +
    257
    │ │ │ │ +
    258 // Linear interpolation options vary between channels:
    │ │ │ │ +
    259 Sdc::Options _options;
    │ │ │ │ +
    260
    │ │ │ │ +
    261 bool _isLinear;
    │ │ │ │ +
    262 bool _hasLinearBoundaries;
    │ │ │ │ +
    263 bool _hasDependentSharpness;
    │ │ │ │ +
    264 int _valueCount;
    │ │ │ │ +
    265
    │ │ │ │ +
    266 //
    │ │ │ │ +
    267 // Vectors recording face-varying topology including tags that help propagate
    │ │ │ │ +
    268 // data through the refinement hierarchy. Vectors are not sparse but most use
    │ │ │ │ +
    269 // 8-bit values relative to the local topology.
    │ │ │ │ +
    270 //
    │ │ │ │ +
    271 // The vector of face-values is actually redundant here, but is constructed as
    │ │ │ │ +
    272 // it is most convenient for clients. It represents almost half the memory of
    │ │ │ │ +
    273 // the topology (4 32-bit integers per face) and not surprisingly, populating
    │ │ │ │ +
    274 // it takes a considerable amount of the refinement time (1/3). We can reduce
    │ │ │ │ +
    275 // both if we are willing to compute these on demand for clients.
    │ │ │ │ +
    276 //
    │ │ │ │ +
    277 // Per-face (matches face-verts of corresponding level):
    │ │ │ │ +
    278 std::vector<Index> _faceVertValues;
    │ │ │ │ +
    279
    │ │ │ │ +
    280 // Per-edge:
    │ │ │ │ +
    281 std::vector<ETag> _edgeTags;
    │ │ │ │ +
    282
    │ │ │ │ +
    283 // Per-vertex:
    │ │ │ │ +
    284 std::vector<Sibling> _vertSiblingCounts;
    │ │ │ │ +
    285 std::vector<int> _vertSiblingOffsets;
    │ │ │ │ +
    286 std::vector<Sibling> _vertFaceSiblings;
    │ │ │ │ +
    287
    │ │ │ │ +
    288 // Per-value:
    │ │ │ │ +
    289 std::vector<Index> _vertValueIndices;
    │ │ │ │ +
    290 std::vector<ValueTag> _vertValueTags;
    │ │ │ │ +
    291 std::vector<CreaseEndPair> _vertValueCreaseEnds;
    │ │ │ │ +
    292};
    │ │ │ │ +
    293
    │ │ │ │ +
    294//
    │ │ │ │ +
    295// Access/modify the values associated with each face:
    │ │ │ │ +
    296//
    │ │ │ │ +
    297inline ConstIndexArray
    │ │ │ │ +
    298FVarLevel::getFaceValues(Index fIndex) const {
    │ │ │ │ +
    299
    │ │ │ │ +
    300 int vCount = _level.getNumFaceVertices(fIndex);
    │ │ │ │ +
    301 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
    │ │ │ │ +
    302 return ConstIndexArray(&_faceVertValues[vOffset], vCount);
    │ │ │ │ +
    303}
    │ │ │ │ +
    304inline IndexArray
    │ │ │ │ +
    305FVarLevel::getFaceValues(Index fIndex) {
    │ │ │ │ +
    306
    │ │ │ │ +
    307 int vCount = _level.getNumFaceVertices(fIndex);
    │ │ │ │ +
    308 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
    │ │ │ │ +
    309 return IndexArray(&_faceVertValues[vOffset], vCount);
    │ │ │ │ +
    310}
    │ │ │ │ +
    311
    │ │ │ │ +
    312inline FVarLevel::ConstSiblingArray
    │ │ │ │ +
    313FVarLevel::getVertexFaceSiblings(Index vIndex) const {
    │ │ │ │ +
    314
    │ │ │ │ +
    315 int vCount = _level.getNumVertexFaces(vIndex);
    │ │ │ │ +
    316 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
    │ │ │ │ +
    317 return ConstSiblingArray(&_vertFaceSiblings[vOffset], vCount);
    │ │ │ │ +
    318}
    │ │ │ │ +
    319inline FVarLevel::SiblingArray
    │ │ │ │ +
    320FVarLevel::getVertexFaceSiblings(Index vIndex) {
    │ │ │ │ +
    321
    │ │ │ │ +
    322 int vCount = _level.getNumVertexFaces(vIndex);
    │ │ │ │ +
    323 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
    │ │ │ │ +
    324 return SiblingArray(&_vertFaceSiblings[vOffset], vCount);
    │ │ │ │ +
    325}
    │ │ │ │ +
    326
    │ │ │ │ +
    327inline ConstIndexArray
    │ │ │ │ +
    328FVarLevel::getVertexValues(Index vIndex) const
    │ │ │ │ +
    329{
    │ │ │ │ +
    330 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    331 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    332 return ConstIndexArray(&_vertValueIndices[vOffset], vCount);
    │ │ │ │ +
    333}
    │ │ │ │ +
    334inline IndexArray
    │ │ │ │ +
    335FVarLevel::getVertexValues(Index vIndex)
    │ │ │ │ +
    336{
    │ │ │ │ +
    337 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    338 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    339 return IndexArray(&_vertValueIndices[vOffset], vCount);
    │ │ │ │ +
    340}
    │ │ │ │ +
    341
    │ │ │ │ +
    342inline FVarLevel::ConstValueTagArray
    │ │ │ │ +
    343FVarLevel::getVertexValueTags(Index vIndex) const
    │ │ │ │ +
    344{
    │ │ │ │ +
    345 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    346 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    347 return ConstValueTagArray(&_vertValueTags[vOffset], vCount);
    │ │ │ │ +
    348}
    │ │ │ │ +
    349inline FVarLevel::ValueTagArray
    │ │ │ │ +
    350FVarLevel::getVertexValueTags(Index vIndex)
    │ │ │ │ +
    351{
    │ │ │ │ +
    352 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    353 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    354 return ValueTagArray(&_vertValueTags[vOffset], vCount);
    │ │ │ │ +
    355}
    │ │ │ │ +
    356
    │ │ │ │ +
    357inline FVarLevel::ConstCreaseEndPairArray
    │ │ │ │ +
    358FVarLevel::getVertexValueCreaseEnds(Index vIndex) const
    │ │ │ │ +
    359{
    │ │ │ │ +
    360 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    361 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    362 return ConstCreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount);
    │ │ │ │ +
    363}
    │ │ │ │ +
    364inline FVarLevel::CreaseEndPairArray
    │ │ │ │ +
    365FVarLevel::getVertexValueCreaseEnds(Index vIndex)
    │ │ │ │ +
    366{
    │ │ │ │ +
    367 int vCount = getNumVertexValues(vIndex);
    │ │ │ │ +
    368 int vOffset = getVertexValueOffset(vIndex);
    │ │ │ │ +
    369 return CreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount);
    │ │ │ │ +
    370}
    │ │ │ │ +
    371
    │ │ │ │ +
    372inline Index
    │ │ │ │ +
    373FVarLevel::findVertexValueIndex(Index vertexIndex, Index valueIndex) const {
    │ │ │ │ +
    374
    │ │ │ │ +
    375 if (_level.getDepth() > 0) return valueIndex;
    │ │ │ │ +
    376
    │ │ │ │ +
    377 Index vvIndex = getVertexValueOffset(vertexIndex);
    │ │ │ │ +
    378 while (_vertValueIndices[vvIndex] != valueIndex) {
    │ │ │ │ +
    379 ++ vvIndex;
    │ │ │ │ +
    380 }
    │ │ │ │ +
    381 return vvIndex;
    │ │ │ │ +
    382}
    │ │ │ │ +
    383
    │ │ │ │ +
    384//
    │ │ │ │ +
    385// Methods related to tagging:
    │ │ │ │ +
    386//
    │ │ │ │ +
    387inline Level::ETag
    │ │ │ │ +
    388FVarLevel::ETag::combineWithLevelETag(Level::ETag levelTag) const
    │ │ │ │ +
    389{
    │ │ │ │ +
    390 if (this->_mismatch) {
    │ │ │ │ +
    391 levelTag._boundary = true;
    │ │ │ │ +
    392 levelTag._infSharp = true;
    │ │ │ │ +
    393 }
    │ │ │ │ +
    394 return levelTag;
    │ │ │ │ +
    395}
    │ │ │ │ +
    396inline Level::VTag
    │ │ │ │ +
    397FVarLevel::ValueTag::combineWithLevelVTag(Level::VTag levelTag) const
    │ │ │ │ +
    398{
    │ │ │ │ +
    399 if (this->_mismatch) {
    │ │ │ │ +
    400 //
    │ │ │ │ +
    401 // Semi-sharp FVar values are always tagged and treated as corners
    │ │ │ │ +
    402 // (at least three sharp edges (two boundary edges and one interior
    │ │ │ │ +
    403 // semi-sharp) and/or vertex is semi-sharp) until the sharpness has
    │ │ │ │ +
    404 // decayed, but they ultimately lie on the inf-sharp crease of the
    │ │ │ │ +
    405 // FVar boundary. Consider this when tagging inf-sharp features.
    │ │ │ │ +
    406 //
    │ │ │ │ +
    407 if (this->isCorner()) {
    │ │ │ │ +
    408 levelTag._rule = (Level::VTag::VTagSize) Sdc::Crease::RULE_CORNER;
    │ │ │ │ +
    409 } else {
    │ │ │ │ +
    410 levelTag._rule = (Level::VTag::VTagSize) Sdc::Crease::RULE_CREASE;
    │ │ │ │ +
    411 }
    │ │ │ │ +
    412 if (this->isCrease() || this->isSemiSharp()) {
    │ │ │ │ +
    413 levelTag._infSharp = false;
    │ │ │ │ +
    414 levelTag._infSharpCrease = true;
    │ │ │ │ +
    415 levelTag._corner = false;
    │ │ │ │ +
    416 } else {
    │ │ │ │ +
    417 levelTag._infSharp = true;
    │ │ │ │ +
    418 levelTag._infSharpCrease = false;
    │ │ │ │ +
    419 levelTag._corner = !this->_infIrregular && !this->_infSharpEdges;
    │ │ │ │ +
    420 }
    │ │ │ │ +
    421 levelTag._infSharpEdges = true;
    │ │ │ │ +
    422 levelTag._infIrregular = this->_infIrregular;
    │ │ │ │ +
    423
    │ │ │ │ +
    424 levelTag._boundary = true;
    │ │ │ │ +
    425 levelTag._xordinary = this->_xordinary;
    │ │ │ │ +
    426
    │ │ │ │ +
    427 levelTag._nonManifold |= this->_nonManifold;
    │ │ │ │ +
    428 }
    │ │ │ │ +
    429 return levelTag;
    │ │ │ │ +
    430}
    │ │ │ │ +
    431
    │ │ │ │ +
    432} // end namespace internal
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glMesh.h │ │ │ │ │ +fvarLevel.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,43 +23,484 @@ │ │ │ │ │ 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_OSD_GL_MESH_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_MESH_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; │ │ │ │ │ +24#ifndef OPENSUBDIV3_VTR_FVAR_LEVEL_H │ │ │ │ │ +25#define OPENSUBDIV3_VTR_FVAR_LEVEL_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" │ │ │ │ │ +33#include "../vtr/level.h" │ │ │ │ │ +34 │ │ │ │ │ +35#include │ │ │ │ │ +36#include │ │ │ │ │ +37#include │ │ │ │ │ +38 │ │ │ │ │ 39 │ │ │ │ │ -40 │ │ │ │ │ -41} // end namespace Osd │ │ │ │ │ +40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +41namespace OPENSUBDIV_VERSION { │ │ │ │ │ 42 │ │ │ │ │ -43} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -44using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +43namespace Vtr { │ │ │ │ │ +44namespace internal { │ │ │ │ │ 45 │ │ │ │ │ -46} // end namespace OpenSubdiv │ │ │ │ │ -47 │ │ │ │ │ -48#endif // OPENSUBDIV3_OSD_GL_MESH_H │ │ │ │ │ +46// │ │ │ │ │ +47// FVarLevel: │ │ │ │ │ +48// A "face-varying channel" includes the topology for a set of face-varying │ │ │ │ │ +49// data, relative to the topology of the Level with which it is associated. │ │ │ │ │ +50// │ │ │ │ │ +51// Analogous to a set of vertices and face-vertices that define the topology │ │ │ │ │ +for │ │ │ │ │ +52// the geometry, a channel requires a set of "values" and "face-values". The │ │ │ │ │ +53// "values" are indices of entries in a set of face-varying data, just as │ │ │ │ │ +vertices │ │ │ │ │ +54// are indices into a set of vertex data. The face-values identify a value │ │ │ │ │ +for │ │ │ │ │ +55// each vertex of the face, and so define topology for the values that may be │ │ │ │ │ +56// unique to each channel. │ │ │ │ │ +57// │ │ │ │ │ +58// In addition to the value size and the vector of face-values (which matches │ │ │ │ │ +the │ │ │ │ │ +59// size of the geometry's face-vertices), tags are associated with each │ │ │ │ │ +component │ │ │ │ │ +60// to identify deviations of the face-varying topology from the vertex │ │ │ │ │ +topology. │ │ │ │ │ +61// And since there may be a one-to-many mapping between vertices and face- │ │ │ │ │ +varying │ │ │ │ │ +62// values, that mapping is also allocated. │ │ │ │ │ +63// │ │ │ │ │ +64// It turns out that the mapping used is able to completely encode the set of │ │ │ │ │ +65// face-values and is more amenable to refinement. Currently the face-values │ │ │ │ │ +66// take up almost half the memory of this representation, so if memory does │ │ │ │ │ +67// become a concern, we do not need to store them. The only reason we do so │ │ │ │ │ +now │ │ │ │ │ +68// is that the face-value interface for specifying base topology and │ │ │ │ │ +inspecting │ │ │ │ │ +69// subsequent levels is very familiar to that of face-vertices for clients. │ │ │ │ │ +So │ │ │ │ │ +70// having them available for such access is convenient. │ │ │ │ │ +71// │ │ │ │ │ +72// Regarding scope and access... │ │ │ │ │ +73// Unclear at this early state, but leaning towards nesting this class within │ │ │ │ │ +74// Level, given the intimate dependency between the two. │ │ │ │ │ +75// Everything is being declared public for now to facilitate access until │ │ │ │ │ +it's │ │ │ │ │ +76// clearer how this functionality will be provided. │ │ │ │ │ +77// │ │ │ │ │ +78class FVarLevel { │ │ │ │ │ +79public: │ │ │ │ │ +80 // │ │ │ │ │ +81 // Component tags -- trying to minimize the types needed here: │ │ │ │ │ +82 // │ │ │ │ │ +83 // Tag per Edge: │ │ │ │ │ +84 // - facilitates topological analysis around each vertex │ │ │ │ │ +85 // - required during refinement to spawn one or more edge-values │ │ │ │ │ +86 // │ │ │ │ │ +87 struct ETag { │ │ │ │ │ +88 ETag() { } │ │ │ │ │ +89 │ │ │ │ │ +90 void clear() { std::memset(this, 0, sizeof(ETag)); } │ │ │ │ │ +91 │ │ │ │ │ +92 typedef unsigned char ETagSize; │ │ │ │ │ +93 │ │ │ │ │ +94 ETagSize _mismatch : 1; // local FVar topology does not match │ │ │ │ │ +95 ETagSize _disctsV0 : 1; // discontinuous at vertex 0 │ │ │ │ │ +96 ETagSize _disctsV1 : 1; // discontinuous at vertex 1 │ │ │ │ │ +97 ETagSize _linear : 1; // linear boundary constraints │ │ │ │ │ +98 │ │ │ │ │ +99 Level::ETag combineWithLevelETag(Level::ETag) const; │ │ │ │ │ +100 }; │ │ │ │ │ +101 │ │ │ │ │ +102 // │ │ │ │ │ +103 // Tag per Value: │ │ │ │ │ +104 // - informs both refinement and interpolation │ │ │ │ │ +105 // - every value spawns a child value in refinement │ │ │ │ │ +106 // - includes a subset of Level::VTag to be later combined with a VTag │ │ │ │ │ +107 // │ │ │ │ │ +108 struct ValueTag { │ │ │ │ │ +109 ValueTag() { } │ │ │ │ │ +110 │ │ │ │ │ +111 void clear() { std::memset(this, 0, sizeof(ValueTag)); } │ │ │ │ │ +112 │ │ │ │ │ +113 bool isMismatch() const { return _mismatch; } │ │ │ │ │ +114 bool isCrease() const { return _crease; } │ │ │ │ │ +115 bool isCorner() const { return !_crease; } │ │ │ │ │ +116 bool isSemiSharp() const { return _semiSharp; } │ │ │ │ │ +117 bool isInfSharp() const { return !_semiSharp && !_crease; } │ │ │ │ │ +118 bool isDepSharp() const { return _depSharp; } │ │ │ │ │ +119 bool hasCreaseEnds() const { return _crease || _semiSharp; } │ │ │ │ │ +120 │ │ │ │ │ +121 bool hasInfSharpEdges() const { return _infSharpEdges; } │ │ │ │ │ +122 bool hasInfIrregularity() const { return _infIrregular; } │ │ │ │ │ +123 │ │ │ │ │ +124 typedef unsigned char ValueTagSize; │ │ │ │ │ +125 │ │ │ │ │ +126 // If there is no mismatch, no other members should be inspected │ │ │ │ │ +127 ValueTagSize _mismatch : 1; // local FVar topology does not match │ │ │ │ │ +128 ValueTagSize _xordinary : 1; // local FVar topology is extra-ordinary │ │ │ │ │ +129 ValueTagSize _nonManifold : 1; // local FVar topology is non-manifold │ │ │ │ │ +130 ValueTagSize _crease : 1; // value is a crease, otherwise a corner │ │ │ │ │ +131 ValueTagSize _semiSharp : 1; // value is a corner decaying to crease │ │ │ │ │ +132 ValueTagSize _depSharp : 1; // value is a corner by dependency on another │ │ │ │ │ +133 │ │ │ │ │ +134 ValueTagSize _infSharpEdges : 1; // value is a corner by inf-sharp features │ │ │ │ │ +135 ValueTagSize _infIrregular : 1; // value span includes inf-sharp │ │ │ │ │ +irregularity │ │ │ │ │ +136 │ │ │ │ │ +137 Level::VTag combineWithLevelVTag(Level::VTag) const; │ │ │ │ │ +138 │ │ │ │ │ +139 // Alternate constructor and accessor for dealing with integer bits │ │ │ │ │ +directly: │ │ │ │ │ +140 explicit ValueTag(ValueTagSize bits) { │ │ │ │ │ +141 std::memcpy(this, &bits, sizeof(bits)); │ │ │ │ │ +142 } │ │ │ │ │ +143 ValueTagSize getBits() const { │ │ │ │ │ +144 ValueTagSize bits; │ │ │ │ │ +145 std::memcpy(&bits, this, sizeof(bits)); │ │ │ │ │ +146 return bits; │ │ │ │ │ +147 } │ │ │ │ │ +148 }; │ │ │ │ │ +149 │ │ │ │ │ +150 typedef Vtr::ConstArray ConstValueTagArray; │ │ │ │ │ +151 typedef Vtr::Array ValueTagArray; │ │ │ │ │ +152 │ │ │ │ │ +153 // │ │ │ │ │ +154 // Simple struct containing the "end faces" of a crease, i.e. the faces │ │ │ │ │ +which │ │ │ │ │ +155 // contain the FVar values to be used when interpolating the crease. │ │ │ │ │ +(Prefer │ │ │ │ │ +156 // the struct over std::pair for its member names) │ │ │ │ │ +157 // │ │ │ │ │ +158 struct CreaseEndPair { │ │ │ │ │ +159 _L_o_c_a_l_I_n_d_e_x _startFace; │ │ │ │ │ +160 _L_o_c_a_l_I_n_d_e_x _endFace; │ │ │ │ │ +161 }; │ │ │ │ │ +162 │ │ │ │ │ +163 typedef Vtr::ConstArray ConstCreaseEndPairArray; │ │ │ │ │ +164 typedef Vtr::Array CreaseEndPairArray; │ │ │ │ │ +165 │ │ │ │ │ +166 typedef _L_o_c_a_l_I_n_d_e_x Sibling; │ │ │ │ │ +167 │ │ │ │ │ +168 typedef _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y ConstSiblingArray; │ │ │ │ │ +169 typedef _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y SiblingArray; │ │ │ │ │ +170 │ │ │ │ │ +171public: │ │ │ │ │ +172 FVarLevel(Level const& level); │ │ │ │ │ +173 ~FVarLevel(); │ │ │ │ │ +174 │ │ │ │ │ +175 // Queries for the entire channel: │ │ │ │ │ +176 Level const& getLevel() const { return _level; } │ │ │ │ │ +177 │ │ │ │ │ +178 int getNumValues() const { return _valueCount; } │ │ │ │ │ +179 int getNumFaceValuesTotal() const { return (int) _faceVertValues.size(); } │ │ │ │ │ +180 │ │ │ │ │ +181 bool isLinear() const { return _isLinear; } │ │ │ │ │ +182 bool hasLinearBoundaries() const { return _hasLinearBoundaries; } │ │ │ │ │ +183 bool hasSmoothBoundaries() const { return ! _hasLinearBoundaries; } │ │ │ │ │ +184 bool hasCreaseEnds() const { return hasSmoothBoundaries(); } │ │ │ │ │ +185 │ │ │ │ │ +186 Sdc::Options getOptions() const { return _options; } │ │ │ │ │ +187 │ │ │ │ │ +188 // Queries per face: │ │ │ │ │ +189 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getFaceValues(_I_n_d_e_x fIndex) const; │ │ │ │ │ +190 _I_n_d_e_x_A_r_r_a_y getFaceValues(_I_n_d_e_x fIndex); │ │ │ │ │ +191 │ │ │ │ │ +192 // Queries per edge: │ │ │ │ │ +193 ETag getEdgeTag(_I_n_d_e_x eIndex) const { return _edgeTags[eIndex]; } │ │ │ │ │ +194 bool edgeTopologyMatches(_I_n_d_e_x eIndex) const { return !getEdgeTag │ │ │ │ │ +(eIndex)._mismatch; } │ │ │ │ │ +195 │ │ │ │ │ +196 // Queries per vertex (and its potential sibling values): │ │ │ │ │ +197 int getNumVertexValues(_I_n_d_e_x v) const { return _vertSiblingCounts[v]; } │ │ │ │ │ +198 _I_n_d_e_x getVertexValueOffset(_I_n_d_e_x v, Sibling i = 0) const { return │ │ │ │ │ +_vertSiblingOffsets[v] + i; } │ │ │ │ │ +199 │ │ │ │ │ +200 _I_n_d_e_x getVertexValue(_I_n_d_e_x v, Sibling i = 0) const { return │ │ │ │ │ +_vertValueIndices[getVertexValueOffset(v,i)]; } │ │ │ │ │ +201 │ │ │ │ │ +202 _I_n_d_e_x findVertexValueIndex(_I_n_d_e_x vertexIndex, _I_n_d_e_x valueIndex) const; │ │ │ │ │ +203 │ │ │ │ │ +204 // Methods to access/modify array properties per vertex: │ │ │ │ │ +205 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getVertexValues(_I_n_d_e_x vIndex) const; │ │ │ │ │ +206 _I_n_d_e_x_A_r_r_a_y getVertexValues(_I_n_d_e_x vIndex); │ │ │ │ │ +207 │ │ │ │ │ +208 ConstValueTagArray getVertexValueTags(_I_n_d_e_x vIndex) const; │ │ │ │ │ +209 ValueTagArray getVertexValueTags(_I_n_d_e_x vIndex); │ │ │ │ │ +210 │ │ │ │ │ +211 ConstCreaseEndPairArray getVertexValueCreaseEnds(_I_n_d_e_x vIndex) const; │ │ │ │ │ +212 CreaseEndPairArray getVertexValueCreaseEnds(_I_n_d_e_x vIndex); │ │ │ │ │ +213 │ │ │ │ │ +214 ConstSiblingArray getVertexFaceSiblings(_I_n_d_e_x vIndex) const; │ │ │ │ │ +215 SiblingArray getVertexFaceSiblings(_I_n_d_e_x vIndex); │ │ │ │ │ +216 │ │ │ │ │ +217 // Queries per value: │ │ │ │ │ +218 ValueTag getValueTag(_I_n_d_e_x valueIndex) const { return _vertValueTags │ │ │ │ │ +[valueIndex]; } │ │ │ │ │ +219 bool valueTopologyMatches(_I_n_d_e_x valueIndex) const { return !getValueTag │ │ │ │ │ +(valueIndex)._mismatch; } │ │ │ │ │ +220 │ │ │ │ │ +221 CreaseEndPair getValueCreaseEndPair(_I_n_d_e_x valueIndex) const { return │ │ │ │ │ +_vertValueCreaseEnds[valueIndex]; } │ │ │ │ │ +222 │ │ │ │ │ +223 // Tag queries related to faces (use Level methods for those returning │ │ │ │ │ +Level::VTag/ETag) │ │ │ │ │ +224 void getFaceValueTags(_I_n_d_e_x faceIndex, ValueTag valueTags[]) const; │ │ │ │ │ +225 │ │ │ │ │ +226 ValueTag getFaceCompositeValueTag(_I_n_d_e_x faceIndex) const; │ │ │ │ │ +227 │ │ │ │ │ +228 // Higher-level topological queries, i.e. values in a neighborhood: │ │ │ │ │ +229 void getEdgeFaceValues(_I_n_d_e_x eIndex, int fIncToEdge, _I_n_d_e_x valuesPerVert │ │ │ │ │ +[2]) const; │ │ │ │ │ +230 void getVertexEdgeValues(_I_n_d_e_x vIndex, _I_n_d_e_x valuesPerEdge[]) const; │ │ │ │ │ +231 void getVertexCreaseEndValues(_I_n_d_e_x vIndex, Sibling sibling, _I_n_d_e_x │ │ │ │ │ +endValues[2]) const; │ │ │ │ │ +232 │ │ │ │ │ +233 // Initialization and allocation helpers: │ │ │ │ │ +234 void setOptions(Sdc::Options const& options); │ │ │ │ │ +235 void resizeVertexValues(int numVertexValues); │ │ │ │ │ +236 void resizeValues(int numValues); │ │ │ │ │ +237 void resizeComponents(); │ │ │ │ │ +238 │ │ │ │ │ +239 // Topological analysis methods -- tagging and face-value population: │ │ │ │ │ +240 void completeTopologyFromFaceValues(int regBoundaryValence); │ │ │ │ │ +241 void initializeFaceValuesFromFaceVertices(); │ │ │ │ │ +242 void initializeFaceValuesFromVertexFaceSiblings(); │ │ │ │ │ +243 │ │ │ │ │ +244 struct ValueSpan; │ │ │ │ │ +245 void gatherValueSpans(_I_n_d_e_x vIndex, ValueSpan * vValueSpans) const; │ │ │ │ │ +246 │ │ │ │ │ +247 // Debugging methods: │ │ │ │ │ +248 bool validate() const; │ │ │ │ │ +249 void print() const; │ │ │ │ │ +250 void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector& │ │ │ │ │ +fvSiblings) const; │ │ │ │ │ +251 │ │ │ │ │ +252private: │ │ │ │ │ +253 // Just as Refinements build Levels, FVarRefinements build FVarLevels... │ │ │ │ │ +254 friend class FVarRefinement; │ │ │ │ │ +255 │ │ │ │ │ +256 Level const & _level; │ │ │ │ │ +257 │ │ │ │ │ +258 // Linear interpolation options vary between channels: │ │ │ │ │ +259 Sdc::Options _options; │ │ │ │ │ +260 │ │ │ │ │ +261 bool _isLinear; │ │ │ │ │ +262 bool _hasLinearBoundaries; │ │ │ │ │ +263 bool _hasDependentSharpness; │ │ │ │ │ +264 int _valueCount; │ │ │ │ │ +265 │ │ │ │ │ +266 // │ │ │ │ │ +267 // Vectors recording face-varying topology including tags that help │ │ │ │ │ +propagate │ │ │ │ │ +268 // data through the refinement hierarchy. Vectors are not sparse but most │ │ │ │ │ +use │ │ │ │ │ +269 // 8-bit values relative to the local topology. │ │ │ │ │ +270 // │ │ │ │ │ +271 // The vector of face-values is actually redundant here, but is constructed │ │ │ │ │ +as │ │ │ │ │ +272 // it is most convenient for clients. It represents almost half the memory │ │ │ │ │ +of │ │ │ │ │ +273 // the topology (4 32-bit integers per face) and not surprisingly, │ │ │ │ │ +populating │ │ │ │ │ +274 // it takes a considerable amount of the refinement time (1/3). We can │ │ │ │ │ +reduce │ │ │ │ │ +275 // both if we are willing to compute these on demand for clients. │ │ │ │ │ +276 // │ │ │ │ │ +277 // Per-face (matches face-verts of corresponding level): │ │ │ │ │ +278 std::vector _faceVertValues; │ │ │ │ │ +279 │ │ │ │ │ +280 // Per-edge: │ │ │ │ │ +281 std::vector _edgeTags; │ │ │ │ │ +282 │ │ │ │ │ +283 // Per-vertex: │ │ │ │ │ +284 std::vector _vertSiblingCounts; │ │ │ │ │ +285 std::vector _vertSiblingOffsets; │ │ │ │ │ +286 std::vector _vertFaceSiblings; │ │ │ │ │ +287 │ │ │ │ │ +288 // Per-value: │ │ │ │ │ +289 std::vector _vertValueIndices; │ │ │ │ │ +290 std::vector _vertValueTags; │ │ │ │ │ +291 std::vector _vertValueCreaseEnds; │ │ │ │ │ +292}; │ │ │ │ │ +293 │ │ │ │ │ +294// │ │ │ │ │ +295// Access/modify the values associated with each face: │ │ │ │ │ +296// │ │ │ │ │ +297inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +298FVarLevel::getFaceValues(_I_n_d_e_x fIndex) const { │ │ │ │ │ +299 │ │ │ │ │ +300 int vCount = _level.getNumFaceVertices(fIndex); │ │ │ │ │ +301 int vOffset = _level.getOffsetOfFaceVertices(fIndex); │ │ │ │ │ +302 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_faceVertValues[vOffset], vCount); │ │ │ │ │ +303} │ │ │ │ │ +304inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +305FVarLevel::getFaceValues(_I_n_d_e_x fIndex) { │ │ │ │ │ +306 │ │ │ │ │ +307 int vCount = _level.getNumFaceVertices(fIndex); │ │ │ │ │ +308 int vOffset = _level.getOffsetOfFaceVertices(fIndex); │ │ │ │ │ +309 return _I_n_d_e_x_A_r_r_a_y(&_faceVertValues[vOffset], vCount); │ │ │ │ │ +310} │ │ │ │ │ +311 │ │ │ │ │ +312inline FVarLevel::ConstSiblingArray │ │ │ │ │ +313FVarLevel::getVertexFaceSiblings(_I_n_d_e_x vIndex) const { │ │ │ │ │ +314 │ │ │ │ │ +315 int vCount = _level.getNumVertexFaces(vIndex); │ │ │ │ │ +316 int vOffset = _level.getOffsetOfVertexFaces(vIndex); │ │ │ │ │ +317 return ConstSiblingArray(&_vertFaceSiblings[vOffset], vCount); │ │ │ │ │ +318} │ │ │ │ │ +319inline FVarLevel::SiblingArray │ │ │ │ │ +320FVarLevel::getVertexFaceSiblings(_I_n_d_e_x vIndex) { │ │ │ │ │ +321 │ │ │ │ │ +322 int vCount = _level.getNumVertexFaces(vIndex); │ │ │ │ │ +323 int vOffset = _level.getOffsetOfVertexFaces(vIndex); │ │ │ │ │ +324 return SiblingArray(&_vertFaceSiblings[vOffset], vCount); │ │ │ │ │ +325} │ │ │ │ │ +326 │ │ │ │ │ +327inline _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +328FVarLevel::getVertexValues(_I_n_d_e_x vIndex) const │ │ │ │ │ +329{ │ │ │ │ │ +330 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +331 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +332 return _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y(&_vertValueIndices[vOffset], vCount); │ │ │ │ │ +333} │ │ │ │ │ +334inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +335FVarLevel::getVertexValues(_I_n_d_e_x vIndex) │ │ │ │ │ +336{ │ │ │ │ │ +337 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +338 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +339 return _I_n_d_e_x_A_r_r_a_y(&_vertValueIndices[vOffset], vCount); │ │ │ │ │ +340} │ │ │ │ │ +341 │ │ │ │ │ +342inline FVarLevel::ConstValueTagArray │ │ │ │ │ +343FVarLevel::getVertexValueTags(_I_n_d_e_x vIndex) const │ │ │ │ │ +344{ │ │ │ │ │ +345 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +346 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +347 return ConstValueTagArray(&_vertValueTags[vOffset], vCount); │ │ │ │ │ +348} │ │ │ │ │ +349inline FVarLevel::ValueTagArray │ │ │ │ │ +350FVarLevel::getVertexValueTags(_I_n_d_e_x vIndex) │ │ │ │ │ +351{ │ │ │ │ │ +352 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +353 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +354 return ValueTagArray(&_vertValueTags[vOffset], vCount); │ │ │ │ │ +355} │ │ │ │ │ +356 │ │ │ │ │ +357inline FVarLevel::ConstCreaseEndPairArray │ │ │ │ │ +358FVarLevel::getVertexValueCreaseEnds(_I_n_d_e_x vIndex) const │ │ │ │ │ +359{ │ │ │ │ │ +360 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +361 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +362 return ConstCreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount); │ │ │ │ │ +363} │ │ │ │ │ +364inline FVarLevel::CreaseEndPairArray │ │ │ │ │ +365FVarLevel::getVertexValueCreaseEnds(_I_n_d_e_x vIndex) │ │ │ │ │ +366{ │ │ │ │ │ +367 int vCount = getNumVertexValues(vIndex); │ │ │ │ │ +368 int vOffset = getVertexValueOffset(vIndex); │ │ │ │ │ +369 return CreaseEndPairArray(&_vertValueCreaseEnds[vOffset], vCount); │ │ │ │ │ +370} │ │ │ │ │ +371 │ │ │ │ │ +372inline _I_n_d_e_x │ │ │ │ │ +373FVarLevel::findVertexValueIndex(_I_n_d_e_x vertexIndex, _I_n_d_e_x valueIndex) const { │ │ │ │ │ +374 │ │ │ │ │ +375 if (_level.getDepth() > 0) return valueIndex; │ │ │ │ │ +376 │ │ │ │ │ +377 _I_n_d_e_x vvIndex = getVertexValueOffset(vertexIndex); │ │ │ │ │ +378 while (_vertValueIndices[vvIndex] != valueIndex) { │ │ │ │ │ +379 ++ vvIndex; │ │ │ │ │ +380 } │ │ │ │ │ +381 return vvIndex; │ │ │ │ │ +382} │ │ │ │ │ +383 │ │ │ │ │ +384// │ │ │ │ │ +385// Methods related to tagging: │ │ │ │ │ +386// │ │ │ │ │ +387inline Level::ETag │ │ │ │ │ +388FVarLevel::ETag::combineWithLevelETag(Level::ETag levelTag) const │ │ │ │ │ +389{ │ │ │ │ │ +390 if (this->_mismatch) { │ │ │ │ │ +391 levelTag._boundary = true; │ │ │ │ │ +392 levelTag._infSharp = true; │ │ │ │ │ +393 } │ │ │ │ │ +394 return levelTag; │ │ │ │ │ +395} │ │ │ │ │ +396inline Level::VTag │ │ │ │ │ +397FVarLevel::ValueTag::combineWithLevelVTag(Level::VTag levelTag) const │ │ │ │ │ +398{ │ │ │ │ │ +399 if (this->_mismatch) { │ │ │ │ │ +400 // │ │ │ │ │ +401 // Semi-sharp FVar values are always tagged and treated as corners │ │ │ │ │ +402 // (at least three sharp edges (two boundary edges and one interior │ │ │ │ │ +403 // semi-sharp) and/or vertex is semi-sharp) until the sharpness has │ │ │ │ │ +404 // decayed, but they ultimately lie on the inf-sharp crease of the │ │ │ │ │ +405 // FVar boundary. Consider this when tagging inf-sharp features. │ │ │ │ │ +406 // │ │ │ │ │ +407 if (this->isCorner()) { │ │ │ │ │ +408 levelTag._rule = (Level::VTag::VTagSize) _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_O_R_N_E_R; │ │ │ │ │ +409 } else { │ │ │ │ │ +410 levelTag._rule = (Level::VTag::VTagSize) _S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E; │ │ │ │ │ +411 } │ │ │ │ │ +412 if (this->isCrease() || this->isSemiSharp()) { │ │ │ │ │ +413 levelTag._infSharp = false; │ │ │ │ │ +414 levelTag._infSharpCrease = true; │ │ │ │ │ +415 levelTag._corner = false; │ │ │ │ │ +416 } else { │ │ │ │ │ +417 levelTag._infSharp = true; │ │ │ │ │ +418 levelTag._infSharpCrease = false; │ │ │ │ │ +419 levelTag._corner = !this->_infIrregular && !this->_infSharpEdges; │ │ │ │ │ +420 } │ │ │ │ │ +421 levelTag._infSharpEdges = true; │ │ │ │ │ +422 levelTag._infIrregular = this->_infIrregular; │ │ │ │ │ +423 │ │ │ │ │ +424 levelTag._boundary = true; │ │ │ │ │ +425 levelTag._xordinary = this->_xordinary; │ │ │ │ │ +426 │ │ │ │ │ +427 levelTag._nonManifold |= this->_nonManifold; │ │ │ │ │ +428 } │ │ │ │ │ +429 return levelTag; │ │ │ │ │ +430} │ │ │ │ │ +431 │ │ │ │ │ +432} // end namespace internal │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_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___C_O_R_N_E_R │ │ │ │ │ +@ RULE_CORNER │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_s_d │ │ │ │ │ - * _g_l_M_e_s_h_._h │ │ │ │ │ + * _v_t_r │ │ │ │ │ + * _f_v_a_r_L_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00818.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/options.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    glVertexBuffer.h File Reference
    │ │ │ │ +
    options.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/opengl.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  GLVertexBuffer
     Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. More...
    class  Options
     All supported options applying to subdivision scheme. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +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 │ │ │ │ │ -glVertexBuffer.h File Reference │ │ │ │ │ +options.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#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_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   _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_:_:_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_:_:_S_d_c │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _o_p_t_i_o_n_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00818.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00818 = [ │ │ │ │ │ - ["GLVertexBuffer", "a01237.html", "a01237"] │ │ │ │ │ + ["Options", "a01329.html", "a01329"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00818_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/options.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    glVertexBuffer.h
    │ │ │ │ +
    options.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,79 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    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
    │ │ │ │ -
    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
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_SDC_OPTIONS_H
    │ │ │ │ +
    25#define OPENSUBDIV3_SDC_OPTIONS_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29namespace OpenSubdiv {
    │ │ │ │ +
    30namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace Sdc {
    │ │ │ │ +
    33
    │ │ │ │ +
    50
    │ │ │ │ +
    │ │ │ │ +
    51class Options {
    │ │ │ │ +
    52public:
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    59 };
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    67 };
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    71 };
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    75 };
    │ │ │ │ +
    │ │ │ │ +
    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 //
    │ │ │ │
    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.
    │ │ │ │ - │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glVertexBuffer.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 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,89 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_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 { │ │ │ │ │ -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 │ │ │ │ │ -_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 │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_OPTIONS_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +30namespace OPENSUBDIV_VERSION { │ │ │ │ │ +31 │ │ │ │ │ +32namespace Sdc { │ │ │ │ │ +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 }; │ │ │ │ │ +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 // │ │ │ │ │ 87 │ │ │ │ │ -88#endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H │ │ │ │ │ +_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 │ │ │ │ │ +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_:_:_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_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_s_d │ │ │ │ │ - * _g_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _o_p_t_i_o_n_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/cpuEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/scheme.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,49 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cpuEvaluator.h File Reference
    │ │ │ │ +
    scheme.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/bufferDescriptor.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │ +#include "../sdc/crease.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstdlib>
    │ │ │ │ +#include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  CpuEvaluator
    class  Scheme< SCHEME_TYPE >
     Scheme is a class template which provides all implementation for the subdivision schemes supported by OpenSubdiv through specializations of the methods of each. An instance of Scheme<SCHEME_TYPE> includes a set of Options that will dictate the variable aspects of its behavior.
    │ │ │ │ + More...
     
    class  Scheme< SCHEME_TYPE >::LocalMask< WEIGHT >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,35 @@ │ │ │ │ │ [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 │ │ │ │ │ +scheme.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 │ │ │ │ │ +#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_/_c_r_e_a_s_e_._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_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _C_p_u_E_v_a_l_u_a_t_o_r │ │ │ │ │ +class   _S_c_h_e_m_e_<_ _S_C_H_E_M_E___T_Y_P_E_ _> │ │ │ │ │ + _S_c_h_e_m_e is a class template which provides all implementation for the │ │ │ │ │ + subdivision schemes supported by _O_p_e_n_S_u_b_d_i_v through specializations of │ │ │ │ │ +  the methods of each. An instance of Scheme includes a set │ │ │ │ │ + of _O_p_t_i_o_n_s that will dictate the variable aspects of its behavior. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _S_c_h_e_m_e_<_ _S_C_H_E_M_E___T_Y_P_E_ _>_:_:_L_o_c_a_l_M_a_s_k_<_ _W_E_I_G_H_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_p_u_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _s_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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,4 @@ │ │ │ │ │ var a00821 = [ │ │ │ │ │ - ["CpuEvaluator", "a01157.html", null] │ │ │ │ │ + ["Scheme< SCHEME_TYPE >", "a01333.html", "a01333"], │ │ │ │ │ + ["LocalMask< WEIGHT >", "a01337.html", "a01337"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00821_source.html │ │ │ │ @@ -22,6895 +22,8471 @@ │ │ │ │ 00000150: 656e 743d 2244 6f78 7967 656e 2031 2e39 ent="Doxygen 1.9 │ │ │ │ 00000160: 2e38 222f 3e0a 3c6d 6574 6120 6e61 6d65 .8"/>..OpenSubdiv: o │ │ │ │ -000001c0: 7065 6e73 7562 6469 762f 6f73 642f 6370 pensubdiv/osd/cp │ │ │ │ -000001d0: 7545 7661 6c75 6174 6f72 2e68 2053 6f75 uEvaluator.h Sou │ │ │ │ -000001e0: 7263 6520 4669 6c65 3c2f 7469 746c 653e rce File │ │ │ │ -000001f0: 0a3c 6c69 6e6b 2068 7265 663d 2274 6162 ... │ │ │ │ -000002a0: 0a3c 6c69 6e6b 2068 7265 663d 226e 6176 ..... │ │ │ │ -000003d0: 3c73 6372 6970 7420 7479 7065 3d22 7465 │ │ │ │ -00000790: 0a3c 7363 7269 7074 2074 7970 653d 2274 ...... .
    . .
    ../* @l │ │ │ │ -00000b20: 6963 656e 7365 206d 6167 6e65 743a 3f78 icense magnet:?x │ │ │ │ -00000b30: 743d 7572 6e3a 6274 6968 3a64 3364 3961 t=urn:btih:d3d9a │ │ │ │ -00000b40: 3961 3635 3935 3532 3166 3936 3636 6135 9a6595521f9666a5 │ │ │ │ -00000b50: 6539 3463 6338 3330 6461 6238 3362 3635 e94cc830dab83b65 │ │ │ │ -00000b60: 3639 3926 616d 703b 646e 3d65 7870 6174 699&dn=expat │ │ │ │ -00000b70: 2e74 7874 204d 4954 202a 2f0a 2428 646f .txt MIT */.$(do │ │ │ │ -00000b80: 6375 6d65 6e74 292e 7265 6164 7928 6675 cument).ready(fu │ │ │ │ -00000b90: 6e63 7469 6f6e 2829 7b69 6e69 744e 6176 nction(){initNav │ │ │ │ -00000ba0: 5472 6565 2827 6130 3038 3231 5f73 6f75 Tree('a00821_sou │ │ │ │ -00000bb0: 7263 652e 6874 6d6c 272c 2727 293b 2069 rce.html',''); i │ │ │ │ -00000bc0: 6e69 7452 6573 697a 6162 6c65 2829 3b20 nitResizable(); │ │ │ │ -00000bd0: 7d29 3b0a 2f2a 2040 6c69 6365 6e73 652d });./* @license- │ │ │ │ -00000be0: 656e 6420 2a2f 0a3c 2f73 6372 6970 743e end */. │ │ │ │ -00000bf0: 0a3c 6469 7620 6964 3d22 646f 632d 636f .
    ..
    .
    .< │ │ │ │ -00000d80: 6469 7620 636c 6173 733d 2253 5250 6167 div class="SRPag │ │ │ │ -00000d90: 6522 3e0a 3c64 6976 2069 643d 2253 5249 e">.
    .
    .
    Loading...< │ │ │ │ -00000df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Searc │ │ │ │ -00000e20: 6869 6e67 2e2e 2e3c 2f64 6976 3e0a 3c64 hing...
    .No Matches.
    .
    .
    .
    . │ │ │ │ -00000e80: 0a3c 6469 7620 636c 6173 733d 2268 6561 .
    .
    cpuEvaluator │ │ │ │ -00000ed0: 2e68 3c2f 6469 763e 3c2f 6469 763e 0a3c .h
    .< │ │ │ │ -00000ee0: 2f64 6976 3e3c 212d 2d68 6561 6465 722d /div>.
    . │ │ │ │ +00000530: 3c74 6162 6c65 2063 656c 6c73 7061 6369 . │ │ │ │ +00000560: 0a20 3c74 7220 6964 3d22 7072 6f6a 6563 . . . . .
    │ │ │ │ +000005c0: 3c2f 7464 3e0a 2020 3c74 6420 6964 3d22 . │ │ │ │ +000005e0: 2020 3c64 6976 2069 643d 2270 726f 6a65
    OpenSubd │ │ │ │ +00000600: 6976 0a20 2020 3c2f 6469 763e 0a20 203c iv.
    . < │ │ │ │ +00000610: 2f74 643e 0a20 3c2f 7472 3e0a 203c 2f74 /td>.
    .< │ │ │ │ +00000630: 2f64 6976 3e0a 3c21 2d2d 2065 6e64 2068 /div>..< │ │ │ │ +00000650: 212d 2d20 4765 6e65 7261 7465 6420 6279 !-- Generated by │ │ │ │ +00000660: 2044 6f78 7967 656e 2031 2e39 2e38 202d Doxygen 1.9.8 - │ │ │ │ +00000670: 2d3e 0a3c 7363 7269 7074 2074 7970 653d ->.. │ │ │ │ +00000750: 3c73 6372 6970 7420 7479 7065 3d22 7465 ...
    ...
    .. │ │ │ │ +00000d00: 3c21 2d2d 2069 6672 616d 6520 7368 6f77 .< │ │ │ │ +00000d40: 6469 7620 6964 3d22 4d53 6561 7263 6852 div id="MSearchR │ │ │ │ +00000d50: 6573 756c 7473 5769 6e64 6f77 223e 0a3c esultsWindow">.< │ │ │ │ +00000d60: 6469 7620 6964 3d22 4d53 6561 7263 6852 div id="MSearchR │ │ │ │ +00000d70: 6573 756c 7473 223e 0a3c 6469 7620 636c esults">.
    . │ │ │ │ +00000da0: 0a3c 6469 7620 6964 3d22 5352 5265 7375 .
    .
    L │ │ │ │ +00000de0: 6f61 6469 6e67 2e2e 2e3c 2f64 6976 3e0a oading...
    . │ │ │ │ +00000df0: 3c64 6976 2063 6c61 7373 3d22 5352 5374 .
    No │ │ │ │ +00000e50: 4d61 7463 6865 733c 2f64 6976 3e0a 3c2f Matches
    ..
    ..
    ..
    . │ │ │ │ +00000e90: 2020 3c64 6976 2063 6c61 7373 3d22 6865
    sc │ │ │ │ +00000ec0: 6865 6d65 2e68 3c2f 6469 763e 3c2f 6469 heme.h
    .
    .
    .Go to the do │ │ │ │ +00000f20: 6375 6d65 6e74 6174 696f 6e20 6f66 2074 cumentation of t │ │ │ │ +00000f30: 6869 7320 6669 6c65 2e3c 2f61 3e3c 6469 his file.
    1 │ │ │ │ +00000fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 //< │ │ │ │ +00000fc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00000fe0: 6120 6964 3d22 6c30 3030 3032 2220 6e61 a id="l00002" na │ │ │ │ +00000ff0: 6d65 3d22 6c30 3030 3032 223e 3c2f 613e me="l00002"> │ │ │ │ +00001000: 3c73 7061 6e20 636c 6173 733d 226c 696e 2// Copy │ │ │ │ +00001040: 7269 6768 7420 3230 3134 2044 7265 616d right 2014 Dream │ │ │ │ +00001050: 576f 726b 7320 416e 696d 6174 696f 6e20 Works Animation │ │ │ │ +00001060: 4c4c 432e 3c2f 7370 616e 3e3c 2f64 6976 LLC.
    .
    3< │ │ │ │ +000010c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>//
    .
    < │ │ │ │ +00001120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00001130: 6e6f 223e 2020 2020 343c 2f73 7061 6e3e no"> 4 │ │ │ │ +00001140: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Licen │ │ │ │ +00001160: 7365 6420 756e 6465 7220 7468 6520 4170 sed under the Ap │ │ │ │ +00001170: 6163 6865 204c 6963 656e 7365 2c20 5665 ache License, Ve │ │ │ │ +00001180: 7273 696f 6e20 322e 3020 2874 6865 2026 rsion 2.0 (the & │ │ │ │ +00001190: 7175 6f74 3b41 7061 6368 6520 4c69 6365 quot;Apache Lice │ │ │ │ +000011a0: 6e73 6526 7175 6f74 3b29 3c2f 7370 616e nse")
    .
    │ │ │ │ +00001200: 2020 2020 353c 2f73 7061 6e3e 3c73 7061 5// with the │ │ │ │ +00001230: 666f 6c6c 6f77 696e 6720 6d6f 6469 6669 following modifi │ │ │ │ +00001240: 6361 7469 6f6e 3b20 796f 7520 6d61 7920 cation; you may │ │ │ │ +00001250: 6e6f 7420 7573 6520 7468 6973 2066 696c not use this fil │ │ │ │ +00001260: 6520 6578 6365 7074 2069 6e3c 2f73 7061 e except in
    .
    6// complian │ │ │ │ +000012f0: 6365 2077 6974 6820 7468 6520 4170 6163 ce with the Apac │ │ │ │ +00001300: 6865 204c 6963 656e 7365 2061 6e64 2074 he License and t │ │ │ │ +00001310: 6865 2066 6f6c 6c6f 7769 6e67 206d 6f64 he following mod │ │ │ │ +00001320: 6966 6963 6174 696f 6e20 746f 2069 743a ification to it: │ │ │ │ +00001330: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00001350: 3c61 2069 643d 226c 3030 3030 3722 206e 7// Sec │ │ │ │ +000013b0: 7469 6f6e 2036 2e20 5472 6164 656d 6172 tion 6. Trademar │ │ │ │ +000013c0: 6b73 2e20 6973 2064 656c 6574 6564 2061 ks. is deleted a │ │ │ │ +000013d0: 6e64 2072 6570 6c61 6365 6420 7769 7468 nd replaced with │ │ │ │ +000013e0: 3a3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c :
    .< │ │ │ │ +000013f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00001400: 3e3c 6120 6964 3d22 6c30 3030 3038 2220 > 8//
    .
    9// 6. Trade │ │ │ │ +000014e0: 6d61 726b 732e 2054 6869 7320 4c69 6365 marks. This Lice │ │ │ │ +000014f0: 6e73 6520 646f 6573 206e 6f74 2067 7261 nse does not gra │ │ │ │ +00001500: 6e74 2070 6572 6d69 7373 696f 6e20 746f nt permission to │ │ │ │ +00001510: 2075 7365 2074 6865 2074 7261 6465 3c2f use the trade
    .
    < │ │ │ │ +00001560: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00001570: 6e6f 223e 2020 2031 303c 2f73 7061 6e3e no"> 10 │ │ │ │ +00001580: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // na │ │ │ │ +000015a0: 6d65 732c 2074 7261 6465 6d61 726b 732c mes, trademarks, │ │ │ │ +000015b0: 2073 6572 7669 6365 206d 6172 6b73 2c20 service marks, │ │ │ │ +000015c0: 6f72 2070 726f 6475 6374 206e 616d 6573 or product names │ │ │ │ +000015d0: 206f 6620 7468 6520 4c69 6365 6e73 6f72 of the Licensor │ │ │ │ +000015e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00001600: 3c61 2069 643d 226c 3030 3031 3122 206e 11// │ │ │ │ +00001660: 616e 6420 6974 7320 6166 6669 6c69 6174 and its affiliat │ │ │ │ +00001670: 6573 2c20 6578 6365 7074 2061 7320 7265 es, except as re │ │ │ │ +00001680: 7175 6972 6564 2074 6f20 636f 6d70 6c79 quired to comply │ │ │ │ +00001690: 2077 6974 6820 5365 6374 696f 6e20 3428 with Section 4( │ │ │ │ +000016a0: 6329 206f 663c 2f73 7061 6e3e 3c2f 6469 c) of.
    12 │ │ │ │ +00001700: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00001720: 2020 2020 2074 6865 204c 6963 656e 7365 the License │ │ │ │ +00001730: 2061 6e64 2074 6f20 7265 7072 6f64 7563 and to reproduc │ │ │ │ +00001740: 6520 7468 6520 636f 6e74 656e 7420 6f66 e the content of │ │ │ │ +00001750: 2074 6865 204e 4f54 4943 4520 6669 6c65 the NOTICE file │ │ │ │ +00001760: 2e3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c .
    .< │ │ │ │ +00001770: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00001780: 3e3c 6120 6964 3d22 6c30 3030 3133 2220 > 13//
    .
    14// You may │ │ │ │ +00001860: 6f62 7461 696e 2061 2063 6f70 7920 6f66 obtain a copy of │ │ │ │ +00001870: 2074 6865 2041 7061 6368 6520 4c69 6365 the Apache Lice │ │ │ │ +00001880: 6e73 6520 6174 3c2f 7370 616e 3e3c 2f64 nse at.
    1 │ │ │ │ +000018e0: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5// │ │ │ │ +00001900: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00001920: 3c61 2069 643d 226c 3030 3031 3622 206e 16
    // │ │ │ │ +00001980: 2068 7474 703a 2f2f 7777 772e 6170 6163 http://www.apac │ │ │ │ +00001990: 6865 2e6f 7267 2f6c 6963 656e 7365 732f he.org/licenses/ │ │ │ │ +000019a0: 4c49 4345 4e53 452d 322e 303c 2f73 7061 LICENSE-2.0
    .
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    glLegacyGregoryPatchTable.h
    │ │ │ │ +
    surfaceFactoryCache.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    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,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_LEGACY_GREGORY_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_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 "../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 }
    │ │ │ │ -
    │ │ │ │ -
    55
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    57 return _quadOffsetsTextureBuffer;
    │ │ │ │ -
    58 }
    │ │ │ │ -
    │ │ │ │ -
    59
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    62 return _quadOffsetsBase[1];
    │ │ │ │ -
    63 }
    │ │ │ │ -
    64 return _quadOffsetsBase[0];
    │ │ │ │ -
    65 }
    │ │ │ │ -
    │ │ │ │ +
    30#include "../bfr/irregularPatchType.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32#include <map>
    │ │ │ │ +
    33#include <cstdint>
    │ │ │ │ +
    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
    │ │ │ │ -
    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
    │ │ │ │ +
    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#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)
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -glLegacyGregoryPatchTable.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 2015 Pixar │ │ │ │ │ +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: │ │ │ │ │ 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,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_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_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 "../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 } │ │ │ │ │ -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 } │ │ │ │ │ +30#include "../bfr/irregularPatchType.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ +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: │ │ │ │ │ -_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 │ │ │ │ │ +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#endif // OPENSUBDIV3_OSD_GL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +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_:_:_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_:_:_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_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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00845.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlLegacyGregoryPatchTable.h File Reference
    │ │ │ │ +
    surfaceFactory.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/mtlCommon.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  MTLLegacyGregoryPatchTable
    class  SurfaceFactory
     Base class providing initialization of a Surface for each face of a mesh. 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::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -mtlLegacyGregoryPatchTable.h File Reference │ │ │ │ │ +surfaceFactory.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_/_m_t_l_C_o_m_m_o_n_._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   _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   _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_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_:_:_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_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00845.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00845 = [ │ │ │ │ │ - ["MTLLegacyGregoryPatchTable", "a01289.html", "a01289"] │ │ │ │ │ + ["SurfaceFactory", "a00941.html", "a00941"], │ │ │ │ │ + ["Options", "a00945.html", "a00945"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00845_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlLegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlLegacyGregoryPatchTable.h
    │ │ │ │ +
    surfaceFactory.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2013 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,112 +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_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_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 {
    │ │ │ │ -
    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 }
    │ │ │ │ -
    │ │ │ │ -
    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)
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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>
    │ │ │ │ +
    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;
    │ │ │ │ +
    162
    │ │ │ │ +
    164
    │ │ │ │ +
    168
    │ │ │ │ +
    170 Sdc::SchemeType GetSchemeType() const { return _subdivScheme; }
    │ │ │ │ +
    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;
    │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlLegacyGregoryPatchTable.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 2013 Pixar │ │ │ │ │ +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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,127 +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_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_LEGACY_GREGORY_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_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 { │ │ │ │ │ -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 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 │ │ │ │ │ +29 │ │ │ │ │ +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 │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ +_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; │ │ │ │ │ +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_:_:_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_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_:_:_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_:_:_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_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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/hlslPatchShaderSource.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/vertexDescriptor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    hlslPatchShaderSource.h File Reference
    │ │ │ │ +
    vertexDescriptor.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <string>
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ +#include "../vtr/stackBuffer.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  HLSLPatchShaderSource
    class  VertexDescriptor
     Simple class used by subclasses of SurfaceFactory to describe a vertex. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +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 │ │ │ │ │ -hlslPatchShaderSource.h File Reference │ │ │ │ │ +vertexDescriptor.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 "_._._/_v_t_r_/_s_t_a_c_k_B_u_f_f_e_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   _H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ +class   _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +  Simple class used by subclasses of _S_u_r_f_a_c_e_F_a_c_t_o_r_y to describe a vertex. │ │ │ │ │ + _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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00848 = [ │ │ │ │ │ - ["HLSLPatchShaderSource", "a01257.html", null] │ │ │ │ │ + ["VertexDescriptor", "a00969.html", "a00969"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00848_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/hlslPatchShaderSource.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/vertexDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    hlslPatchShaderSource.h
    │ │ │ │ +
    vertexDescriptor.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,61 +119,425 @@ │ │ │ │
    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_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include <string>
    │ │ │ │ -
    30#include "../far/patchDescriptor.h"
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../vtr/stackBuffer.h"
    │ │ │ │
    31
    │ │ │ │
    32namespace OpenSubdiv {
    │ │ │ │
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │
    34
    │ │ │ │ -
    35namespace Osd {
    │ │ │ │ +
    35namespace Bfr {
    │ │ │ │
    36
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    38public:
    │ │ │ │ -
    39 static std::string GetCommonShaderSource();
    │ │ │ │ -
    40
    │ │ │ │ -
    41 static std::string GetPatchBasisShaderSource();
    │ │ │ │ -
    42
    │ │ │ │ - │ │ │ │ -
    44
    │ │ │ │ - │ │ │ │ -
    46
    │ │ │ │ - │ │ │ │ -
    48};
    │ │ │ │ -
    │ │ │ │ -
    49
    │ │ │ │ -
    50} // end namespace Osd
    │ │ │ │ -
    51
    │ │ │ │ -
    52} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    53using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    54
    │ │ │ │ -
    55} // end namespace OpenSubdiv
    │ │ │ │ -
    56
    │ │ │ │ -
    57#endif // OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    static std::string GetVertexShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ -
    static std::string GetDomainShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ -
    static std::string GetHullShaderSource(Far::PatchDescriptor::Type type)
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    50//
    │ │ │ │ +
    51// WIP - need to migrate some of these comments into Doxygen
    │ │ │ │ +
    52// - others will be moved to the external documentation
    │ │ │ │ +
    53//
    │ │ │ │ +
    54// It is used by subclasses of SurfaceFactory to provide a complete
    │ │ │ │ +
    55// topological description for each vertex of a face, i.e. invoked via
    │ │ │ │ +
    56// the virtual method:
    │ │ │ │ +
    57//
    │ │ │ │ +
    58// int populateFaceVertexDescriptor(Index baseFace,
    │ │ │ │ +
    59// int cornerVertex,
    │ │ │ │ +
    60// VertexDescriptor & v) const;
    │ │ │ │ +
    61//
    │ │ │ │ +
    62// Assignment of the full topology can be involved in the presence of
    │ │ │ │ +
    63// irregular faces, non-manifold topology or creasing around a vertex, but
    │ │ │ │ +
    64// many cases will be simple. For example, to specify a regular boundary
    │ │ │ │ +
    65// vertex of a Catmark mesh without any optional sharpness:
    │ │ │ │ +
    66//
    │ │ │ │ +
    67// int numIncidentFaces = 2;
    │ │ │ │ +
    68// bool vertexOnBoundary = true;
    │ │ │ │ +
    69//
    │ │ │ │ +
    70// vd.Initialize(numIncidentFaces);
    │ │ │ │ +
    71// vd.SetManifold(true);
    │ │ │ │ +
    72// vd.SetBoundary(vertexOnBoundary);
    │ │ │ │ +
    73// vd.ClearIncidentFaceSizes();
    │ │ │ │ +
    74// vd.Finalize();
    │ │ │ │ +
    75//
    │ │ │ │ +
    76// For a more general example, to assign a vertex of some valence whose
    │ │ │ │ +
    77// incident faces are of different sizes (e.g. required when triangles
    │ │ │ │ +
    78// appear around a vertex in an otherwise quad-dominant Catmark mesh):
    │ │ │ │ +
    79//
    │ │ │ │ +
    80// int numIncidentFaces = meshVertex.GetNumIncidentFaces();
    │ │ │ │ +
    81// bool vertexOnBoundary = meshVertex.IsBoundar();
    │ │ │ │ +
    82//
    │ │ │ │ +
    83// vd.Initialize(numIncidentFaces);
    │ │ │ │ +
    84// vd.SetManifold(true);
    │ │ │ │ +
    85// vd.SetBoundary(vertexOnBoundary);
    │ │ │ │ +
    86//
    │ │ │ │ +
    87// for (int i = 0; i < numIncidentFaces; ++i) {
    │ │ │ │ +
    88// vd.SetIncidentFaceSize(i, meshVertex.GetIncidentFaceSize(i));
    │ │ │ │ +
    89// }
    │ │ │ │ +
    90// vd.Finalize();
    │ │ │ │ +
    91//
    │ │ │ │ +
    92// These examples specify the incident faces as forming a manifold ring
    │ │ │ │ +
    93// (or half-ring) around the vertex, i.e. they can be specified as a
    │ │ │ │ +
    94// continuous, connected sequence in counter-clockwise order (and also
    │ │ │ │ +
    95// without degeneracies). In the case of a boundary vertex, the first
    │ │ │ │ +
    96// face must be on the leading edge of the boundary while the last is on
    │ │ │ │ +
    97// the trailing edge. For an interior vertex, which face is specified
    │ │ │ │ +
    98// first does not matter (since the set is periodic).
    │ │ │ │ +
    99//
    │ │ │ │ +
    100// In both cases, the location of the base face in this sequence -- the
    │ │ │ │ +
    101// face whose corner vertex is being described here -- must be specified
    │ │ │ │ +
    102// in the return value to populateFaceVertexDescriptor() (e.g. when a
    │ │ │ │ +
    103// boundary vertex has 3 incident faces, a return value of 0, 1 or 2
    │ │ │ │ +
    104// will indicate which is the base face).
    │ │ │ │ +
    105//
    │ │ │ │ +
    106// The corresponding methods to specify mesh control vertex indices (or
    │ │ │ │ +
    107// face-varying indices) complete the specification of the neighborhood:
    │ │ │ │ +
    108//
    │ │ │ │ +
    109// int getFaceCornerVertexIndices(Index baseFace, int cornerVertex,
    │ │ │ │ +
    110// Index vertexIndices[]) const;
    │ │ │ │ +
    111//
    │ │ │ │ +
    112// int getFaceCornerFVarValueIndices(Index baseFace, int cornerVertex,
    │ │ │ │ +
    113// Index fvarValueIndices[],
    │ │ │ │ +
    114// int fvarChannel) const;
    │ │ │ │ +
    115//
    │ │ │ │ +
    116// and are invoked by the Factory when needed.
    │ │ │ │ +
    117//
    │ │ │ │ +
    118// For each incident face, the indices for all vertices of that face are
    │ │ │ │ +
    119// to be specified (not the one-ring or some other subset). These indices
    │ │ │ │ +
    120// must also be specified in an orientation relative to the vertex, i.e.
    │ │ │ │ +
    121// for a vertex A and an incident face with face-vertices that may be
    │ │ │ │ +
    122// stored internally as {D, C, A, B}, they must be specified with A first
    │ │ │ │ +
    123// as {A, B, C, D}. This may seem a bit cumbersome, but it has clear
    │ │ │ │ +
    124// advantages when dealing with face-varying indices and unordered faces.
    │ │ │ │ +
    125//
    │ │ │ │ +
    126// More compact ways of specifying vertex indices for ordered, manifold
    │ │ │ │ +
    127// cases may be worth exploring in future, but face-varying indices and
    │ │ │ │ +
    128// non-manifold (unordered) vertices will always require such a full set,
    │ │ │ │ +
    129// so both methods will need to co-exist.
    │ │ │ │ +
    130//
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    132public:
    │ │ │ │ +
    133 // The full declaration must be enclosed by calls to these methods:
    │ │ │ │ +
    134 //
    │ │ │ │ +
    135 // Note that vertex valences or face sizes in excess of those defined
    │ │ │ │ +
    136 // in Bfr::Limits (typically 16-bits) are not valid. When specifying
    │ │ │ │ +
    137 // values in excess of these limits, initialization will fail and/or
    │ │ │ │ +
    138 // the descriptor will be marked invalid and finalization will fail.
    │ │ │ │ +
    139 //
    │ │ │ │ +
    140
    │ │ │ │ +
    142
    │ │ │ │ +
    149
    │ │ │ │ +
    151 bool Initialize(int numIncidentFaces);
    │ │ │ │ +
    152
    │ │ │ │ +
    154 bool Finalize();
    │ │ │ │ +
    155
    │ │ │ │ +
    157 bool IsValid() const;
    │ │ │ │ +
    159
    │ │ │ │ +
    160 //
    │ │ │ │ +
    161 // WIP - need to migrate these comments into Doxygen
    │ │ │ │ +
    162 //
    │ │ │ │ +
    163 // Three groups of methods describe the topology around a vertex:
    │ │ │ │ +
    164 // - simple properties (vertex is a boundary, manifold, etc.)
    │ │ │ │ +
    165 // - sizes of incident faces (constant or size for each face)
    │ │ │ │ +
    166 // - sharpness of the vertex and its incident edges (optional)
    │ │ │ │ +
    167 //
    │ │ │ │ +
    168
    │ │ │ │ +
    169 // Manifold and boundary conditions:
    │ │ │ │ +
    170 //
    │ │ │ │ +
    171 // The manifold property is a strict condition but preferred for
    │ │ │ │ +
    172 // efficiency and is usually available from common connected mesh
    │ │ │ │ +
    173 // representations. When declaring the topology as "manifold",
    │ │ │ │ +
    174 // the Factory assumes the following:
    │ │ │ │ +
    175 //
    │ │ │ │ +
    176 // - all incident faces are "ordered" (counter-clockwise)
    │ │ │ │ +
    177 // - all incident faces are consistently oriented
    │ │ │ │ +
    178 // - all incident edges are non-degenerate
    │ │ │ │ +
    179 //
    │ │ │ │ +
    180 // If not certain that all of these conditions are met, it is best
    │ │ │ │ +
    181 // to not declare manifold -- leaving the Factory to make sense of
    │ │ │ │ +
    182 // the set of incident faces from the face-vertex indices that are
    │ │ │ │ +
    183 // provided elsewhere.
    │ │ │ │ +
    184 //
    │ │ │ │ +
    185
    │ │ │ │ +
    187
    │ │ │ │ +
    191
    │ │ │ │ +
    193 void SetManifold(bool isManifold);
    │ │ │ │ +
    194
    │ │ │ │ +
    196 void SetBoundary(bool isOnBoundary);
    │ │ │ │ +
    197
    │ │ │ │ +
    199 void SetIncidentFaceSize(int faceIndex, int faceSize);
    │ │ │ │ +
    200
    │ │ │ │ + │ │ │ │ +
    203
    │ │ │ │ +
    205 void SetVertexSharpness(float sharpness);
    │ │ │ │ +
    206
    │ │ │ │ + │ │ │ │ +
    209
    │ │ │ │ +
    221 void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness);
    │ │ │ │ +
    222
    │ │ │ │ +
    238 void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp,
    │ │ │ │ +
    239 float trailingEdgeSharp);
    │ │ │ │ +
    240
    │ │ │ │ +
    242 void ClearEdgeSharpness();
    │ │ │ │ +
    244
    │ │ │ │ +
    246
    │ │ │ │ +
    251
    │ │ │ │ +
    253 bool IsManifold() const;
    │ │ │ │ +
    254
    │ │ │ │ +
    256 bool IsBoundary() const;
    │ │ │ │ +
    257
    │ │ │ │ +
    259 bool HasIncidentFaceSizes() const;
    │ │ │ │ +
    260
    │ │ │ │ +
    262 int GetIncidentFaceSize(int faceIndex) const;
    │ │ │ │ +
    263
    │ │ │ │ +
    265 bool HasVertexSharpness() const;
    │ │ │ │ +
    266
    │ │ │ │ +
    268 float GetVertexSharpness() const;
    │ │ │ │ +
    269
    │ │ │ │ +
    271 bool HasEdgeSharpness() const;
    │ │ │ │ +
    272
    │ │ │ │ +
    274 float GetManifoldEdgeSharpness(int edgeIndex) const;
    │ │ │ │ +
    275
    │ │ │ │ +
    277 void GetIncidentFaceEdgeSharpness(int faceIndex,
    │ │ │ │ +
    278 float * leadingEdgeSharp, float * trailingEdgeSharp) const;
    │ │ │ │ +
    280
    │ │ │ │ +
    281protected:
    │ │ │ │ +
    283 friend class FaceVertex;
    │ │ │ │ +
    284
    │ │ │ │ +
    285 VertexDescriptor() { }
    │ │ │ │ + │ │ │ │ +
    287
    │ │ │ │ +
    288 typedef Vtr::internal::StackBuffer<int,8,true> IntBuffer;
    │ │ │ │ +
    289 typedef Vtr::internal::StackBuffer<float,16,true> FloatBuffer;
    │ │ │ │ +
    290
    │ │ │ │ +
    291 void initFaceSizes();
    │ │ │ │ +
    292 void initEdgeSharpness();
    │ │ │ │ +
    294
    │ │ │ │ +
    295protected:
    │ │ │ │ +
    297 // Member variables assigned through the above interface:
    │ │ │ │ +
    298 unsigned short _isValid : 1;
    │ │ │ │ +
    299 unsigned short _isInitialized : 1;
    │ │ │ │ +
    300 unsigned short _isFinalized : 1;
    │ │ │ │ +
    301
    │ │ │ │ +
    302 unsigned short _isManifold : 1;
    │ │ │ │ +
    303 unsigned short _isBoundary : 1;
    │ │ │ │ +
    304
    │ │ │ │ +
    305 unsigned short _hasFaceSizes : 1;
    │ │ │ │ +
    306 unsigned short _hasEdgeSharpness : 1;
    │ │ │ │ +
    307
    │ │ │ │ +
    308 short _numFaces;
    │ │ │ │ +
    309 float _vertSharpness;
    │ │ │ │ +
    310
    │ │ │ │ +
    311 FloatBuffer _faceEdgeSharpness;
    │ │ │ │ +
    312 IntBuffer _faceSizeOffsets;
    │ │ │ │ +
    314};
    │ │ │ │ +
    │ │ │ │ +
    315
    │ │ │ │ +
    316//
    │ │ │ │ +
    317// Public inline methods for simple assignment:
    │ │ │ │ +
    318//
    │ │ │ │ +
    319inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    321 return _isValid;
    │ │ │ │ +
    322}
    │ │ │ │ +
    │ │ │ │ +
    323
    │ │ │ │ +
    324inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    326 _isManifold = isManifold;
    │ │ │ │ +
    327}
    │ │ │ │ +
    │ │ │ │ +
    328inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    330 return _isManifold;
    │ │ │ │ +
    331}
    │ │ │ │ +
    │ │ │ │ +
    332
    │ │ │ │ +
    333inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    335 _isBoundary = isBoundary;
    │ │ │ │ +
    336}
    │ │ │ │ +
    │ │ │ │ +
    337inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    339 return _isBoundary;
    │ │ │ │ +
    340}
    │ │ │ │ +
    │ │ │ │ +
    341
    │ │ │ │ +
    342//
    │ │ │ │ +
    343// Public inline methods involving sizes of incident faces:
    │ │ │ │ +
    344//
    │ │ │ │ +
    345inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    347 return _hasFaceSizes;
    │ │ │ │ +
    348}
    │ │ │ │ +
    │ │ │ │ +
    349inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    351 _hasFaceSizes = false;
    │ │ │ │ +
    352}
    │ │ │ │ +
    │ │ │ │ +
    353
    │ │ │ │ +
    354inline void
    │ │ │ │ +
    │ │ │ │ +
    355VertexDescriptor::SetIncidentFaceSize(int incFaceIndex, int faceSize) {
    │ │ │ │ +
    356
    │ │ │ │ +
    357 if (!_hasFaceSizes) initFaceSizes();
    │ │ │ │ +
    358
    │ │ │ │ +
    359 _faceSizeOffsets[incFaceIndex] = faceSize;
    │ │ │ │ +
    360}
    │ │ │ │ +
    │ │ │ │ +
    361inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    363
    │ │ │ │ +
    364 return _isFinalized ?
    │ │ │ │ +
    365 (_faceSizeOffsets[incFaceIndex+1] - _faceSizeOffsets[incFaceIndex]) :
    │ │ │ │ +
    366 _faceSizeOffsets[incFaceIndex];
    │ │ │ │ +
    367}
    │ │ │ │ +
    │ │ │ │ +
    368
    │ │ │ │ +
    369//
    │ │ │ │ +
    370// Public inline methods involving vertex sharpness:
    │ │ │ │ +
    371//
    │ │ │ │ +
    372inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    374 return _vertSharpness > 0.0f;
    │ │ │ │ +
    375}
    │ │ │ │ +
    │ │ │ │ +
    376inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    378 _vertSharpness = 0.0f;
    │ │ │ │ +
    379}
    │ │ │ │ +
    │ │ │ │ +
    380
    │ │ │ │ +
    381inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    383 _vertSharpness = vertSharpness;
    │ │ │ │ +
    384}
    │ │ │ │ +
    │ │ │ │ +
    385inline float
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    387 return _vertSharpness;
    │ │ │ │ +
    388}
    │ │ │ │ +
    │ │ │ │ +
    389
    │ │ │ │ +
    390//
    │ │ │ │ +
    391// Public inline methods involving vertex sharpness:
    │ │ │ │ +
    392//
    │ │ │ │ +
    393inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    395 return _hasEdgeSharpness;
    │ │ │ │ +
    396}
    │ │ │ │ +
    │ │ │ │ +
    397inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    399 _hasEdgeSharpness = false;
    │ │ │ │ +
    400}
    │ │ │ │ +
    │ │ │ │ +
    401
    │ │ │ │ +
    402inline void
    │ │ │ │ +
    │ │ │ │ +
    403VertexDescriptor::SetManifoldEdgeSharpness(int edgeIndex, float sharpness) {
    │ │ │ │ +
    404
    │ │ │ │ +
    405 if (!_hasEdgeSharpness) initEdgeSharpness();
    │ │ │ │ +
    406
    │ │ │ │ +
    407 // Assign the leading edge of the face after the edge (even index):
    │ │ │ │ +
    408 if (edgeIndex < _numFaces) {
    │ │ │ │ +
    409 _faceEdgeSharpness[2*edgeIndex] = sharpness;
    │ │ │ │ +
    410 }
    │ │ │ │ +
    411
    │ │ │ │ +
    412 // Assign the trailing edge of the face before the edge (odd index):
    │ │ │ │ +
    413 if (edgeIndex > 0) {
    │ │ │ │ +
    414 _faceEdgeSharpness[2*edgeIndex-1] = sharpness;
    │ │ │ │ +
    415 } else if (!IsBoundary()) {
    │ │ │ │ +
    416 _faceEdgeSharpness[2*_numFaces-1] = sharpness;
    │ │ │ │ +
    417 }
    │ │ │ │ +
    418}
    │ │ │ │ +
    │ │ │ │ +
    419inline float
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    421
    │ │ │ │ +
    422 // All edges are first of the pair (even index) except last of boundary
    │ │ │ │ +
    423 return _faceEdgeSharpness[2*edgeIndex - (edgeIndex == _numFaces)];
    │ │ │ │ +
    424}
    │ │ │ │ +
    │ │ │ │ +
    425
    │ │ │ │ +
    426inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    428 float leadingEdgeSharpness, float trailingEdgeSharpness) {
    │ │ │ │ +
    429
    │ │ │ │ +
    430 if (!_hasEdgeSharpness) initEdgeSharpness();
    │ │ │ │ +
    431
    │ │ │ │ +
    432 _faceEdgeSharpness[2*faceIndex ] = leadingEdgeSharpness;
    │ │ │ │ +
    433 _faceEdgeSharpness[2*faceIndex+1] = trailingEdgeSharpness;
    │ │ │ │ +
    434}
    │ │ │ │ +
    │ │ │ │ +
    435inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    437 float * leadingEdgeSharpness, float * trailingEdgeSharpness) const {
    │ │ │ │ +
    438
    │ │ │ │ +
    439 *leadingEdgeSharpness = _faceEdgeSharpness[2*faceIndex];
    │ │ │ │ +
    440 *trailingEdgeSharpness = _faceEdgeSharpness[2*faceIndex+1];
    │ │ │ │ +
    441}
    │ │ │ │ +
    │ │ │ │ +
    442
    │ │ │ │ +
    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 */
    │ │ │ │ + │ │ │ │ +
    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.
    │ │ │ │ +
    int GetIncidentFaceSize(int faceIndex) const
    Return the size of an incident face.
    │ │ │ │ +
    float GetManifoldEdgeSharpness(int edgeIndex) const
    Return the sharpness assigned to a manifold edge.
    │ │ │ │ +
    void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp, float trailingEdgeSharp)
    Assign sharpness to the edges of an incident face.
    │ │ │ │ +
    bool HasVertexSharpness() const
    Return if sharpness was assigned to the vertex.
    │ │ │ │ +
    void ClearIncidentFaceSizes()
    Remove any assigned sizes of incident faces.
    │ │ │ │ +
    void SetVertexSharpness(float sharpness)
    Assign sharpness to the vertex.
    │ │ │ │ +
    void ClearVertexSharpness()
    Remove any sharpness assigned to the vertex.
    │ │ │ │ +
    void ClearEdgeSharpness()
    Remove any sharpness assigned to the incident edges.
    │ │ │ │ +
    void GetIncidentFaceEdgeSharpness(int faceIndex, float *leadingEdgeSharp, float *trailingEdgeSharp) const
    Return the sharpness assigned to edges of an incident face.
    │ │ │ │ +
    bool IsBoundary() const
    Return if vertex neighborhood is on a boundary.
    │ │ │ │ +
    bool IsValid() const
    Return if instance is valid.
    │ │ │ │ +
    bool HasIncidentFaceSizes() const
    Return if the sizes of incident faces are assigned.
    │ │ │ │ +
    void SetBoundary(bool isOnBoundary)
    Declare the vertex neighborhood as being on a boundary.
    │ │ │ │ +
    void SetIncidentFaceSize(int faceIndex, int faceSize)
    Assign the size of an incident face.
    │ │ │ │ +
    void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness)
    Assign sharpness to the edge of a manifold neighborhood.
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -hlslPatchShaderSource.h │ │ │ │ │ +vertexDescriptor.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 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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,65 +24,446 @@ │ │ │ │ │ 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_HLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_VERTEX_DESCRIPTOR_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include │ │ │ │ │ -30#include "../far/patchDescriptor.h" │ │ │ │ │ +29 │ │ │ │ │ +30#include "../vtr/stackBuffer.h" │ │ │ │ │ 31 │ │ │ │ │ 32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ 33namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -35namespace Osd { │ │ │ │ │ +35namespace Bfr { │ │ │ │ │ 36 │ │ │ │ │ -_3_7class _H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e { │ │ │ │ │ -38public: │ │ │ │ │ -_3_9 static std::string _G_e_t_C_o_m_m_o_n_S_h_a_d_e_r_S_o_u_r_c_e(); │ │ │ │ │ -40 │ │ │ │ │ -_4_1 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(); │ │ │ │ │ -42 │ │ │ │ │ -_4_3 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); │ │ │ │ │ -44 │ │ │ │ │ -_4_5 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); │ │ │ │ │ -46 │ │ │ │ │ -_4_7 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); │ │ │ │ │ -48}; │ │ │ │ │ -49 │ │ │ │ │ -50} // end namespace Osd │ │ │ │ │ -51 │ │ │ │ │ -52} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -53using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -54 │ │ │ │ │ -55} // end namespace OpenSubdiv │ │ │ │ │ -56 │ │ │ │ │ -57#endif // OPENSUBDIV3_OSD_HLSL_PATCH_SHADER_SOURCE_H │ │ │ │ │ +50// │ │ │ │ │ +51// WIP - need to migrate some of these comments into Doxygen │ │ │ │ │ +52// - others will be moved to the external documentation │ │ │ │ │ +53// │ │ │ │ │ +54// It is used by subclasses of SurfaceFactory to provide a complete │ │ │ │ │ +55// topological description for each vertex of a face, i.e. invoked via │ │ │ │ │ +56// the virtual method: │ │ │ │ │ +57// │ │ │ │ │ +58// int populateFaceVertexDescriptor(Index baseFace, │ │ │ │ │ +59// int cornerVertex, │ │ │ │ │ +60// VertexDescriptor & v) const; │ │ │ │ │ +61// │ │ │ │ │ +62// Assignment of the full topology can be involved in the presence of │ │ │ │ │ +63// irregular faces, non-manifold topology or creasing around a vertex, but │ │ │ │ │ +64// many cases will be simple. For example, to specify a regular boundary │ │ │ │ │ +65// vertex of a Catmark mesh without any optional sharpness: │ │ │ │ │ +66// │ │ │ │ │ +67// int numIncidentFaces = 2; │ │ │ │ │ +68// bool vertexOnBoundary = true; │ │ │ │ │ +69// │ │ │ │ │ +70// vd.Initialize(numIncidentFaces); │ │ │ │ │ +71// vd.SetManifold(true); │ │ │ │ │ +72// vd.SetBoundary(vertexOnBoundary); │ │ │ │ │ +73// vd.ClearIncidentFaceSizes(); │ │ │ │ │ +74// vd.Finalize(); │ │ │ │ │ +75// │ │ │ │ │ +76// For a more general example, to assign a vertex of some valence whose │ │ │ │ │ +77// incident faces are of different sizes (e.g. required when triangles │ │ │ │ │ +78// appear around a vertex in an otherwise quad-dominant Catmark mesh): │ │ │ │ │ +79// │ │ │ │ │ +80// int numIncidentFaces = meshVertex.GetNumIncidentFaces(); │ │ │ │ │ +81// bool vertexOnBoundary = meshVertex.IsBoundar(); │ │ │ │ │ +82// │ │ │ │ │ +83// vd.Initialize(numIncidentFaces); │ │ │ │ │ +84// vd.SetManifold(true); │ │ │ │ │ +85// vd.SetBoundary(vertexOnBoundary); │ │ │ │ │ +86// │ │ │ │ │ +87// for (int i = 0; i < numIncidentFaces; ++i) { │ │ │ │ │ +88// vd.SetIncidentFaceSize(i, meshVertex.GetIncidentFaceSize(i)); │ │ │ │ │ +89// } │ │ │ │ │ +90// vd.Finalize(); │ │ │ │ │ +91// │ │ │ │ │ +92// These examples specify the incident faces as forming a manifold ring │ │ │ │ │ +93// (or half-ring) around the vertex, i.e. they can be specified as a │ │ │ │ │ +94// continuous, connected sequence in counter-clockwise order (and also │ │ │ │ │ +95// without degeneracies). In the case of a boundary vertex, the first │ │ │ │ │ +96// face must be on the leading edge of the boundary while the last is on │ │ │ │ │ +97// the trailing edge. For an interior vertex, which face is specified │ │ │ │ │ +98// first does not matter (since the set is periodic). │ │ │ │ │ +99// │ │ │ │ │ +100// In both cases, the location of the base face in this sequence -- the │ │ │ │ │ +101// face whose corner vertex is being described here -- must be specified │ │ │ │ │ +102// in the return value to populateFaceVertexDescriptor() (e.g. when a │ │ │ │ │ +103// boundary vertex has 3 incident faces, a return value of 0, 1 or 2 │ │ │ │ │ +104// will indicate which is the base face). │ │ │ │ │ +105// │ │ │ │ │ +106// The corresponding methods to specify mesh control vertex indices (or │ │ │ │ │ +107// face-varying indices) complete the specification of the neighborhood: │ │ │ │ │ +108// │ │ │ │ │ +109// int getFaceCornerVertexIndices(Index baseFace, int cornerVertex, │ │ │ │ │ +110// Index vertexIndices[]) const; │ │ │ │ │ +111// │ │ │ │ │ +112// int getFaceCornerFVarValueIndices(Index baseFace, int cornerVertex, │ │ │ │ │ +113// Index fvarValueIndices[], │ │ │ │ │ +114// int fvarChannel) const; │ │ │ │ │ +115// │ │ │ │ │ +116// and are invoked by the Factory when needed. │ │ │ │ │ +117// │ │ │ │ │ +118// For each incident face, the indices for all vertices of that face are │ │ │ │ │ +119// to be specified (not the one-ring or some other subset). These indices │ │ │ │ │ +120// must also be specified in an orientation relative to the vertex, i.e. │ │ │ │ │ +121// for a vertex A and an incident face with face-vertices that may be │ │ │ │ │ +122// stored internally as {D, C, A, B}, they must be specified with A first │ │ │ │ │ +123// as {A, B, C, D}. This may seem a bit cumbersome, but it has clear │ │ │ │ │ +124// advantages when dealing with face-varying indices and unordered faces. │ │ │ │ │ +125// │ │ │ │ │ +126// More compact ways of specifying vertex indices for ordered, manifold │ │ │ │ │ +127// cases may be worth exploring in future, but face-varying indices and │ │ │ │ │ +128// non-manifold (unordered) vertices will always require such a full set, │ │ │ │ │ +129// so both methods will need to co-exist. │ │ │ │ │ +130// │ │ │ │ │ +_1_3_1class _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ +132public: │ │ │ │ │ +133 // The full declaration must be enclosed by calls to these methods: │ │ │ │ │ +134 // │ │ │ │ │ +135 // Note that vertex valences or face sizes in excess of those defined │ │ │ │ │ +136 // in Bfr::Limits (typically 16-bits) are not valid. When specifying │ │ │ │ │ +137 // values in excess of these limits, initialization will fail and/or │ │ │ │ │ +138 // the descriptor will be marked invalid and finalization will fail. │ │ │ │ │ +139 // │ │ │ │ │ +140 │ │ │ │ │ +142 │ │ │ │ │ +149 │ │ │ │ │ +_1_5_1 bool _I_n_i_t_i_a_l_i_z_e(int numIncidentFaces); │ │ │ │ │ +152 │ │ │ │ │ +_1_5_4 bool _F_i_n_a_l_i_z_e(); │ │ │ │ │ +155 │ │ │ │ │ +157 bool _I_s_V_a_l_i_d() const; │ │ │ │ │ +159 │ │ │ │ │ +160 // │ │ │ │ │ +161 // WIP - need to migrate these comments into Doxygen │ │ │ │ │ +162 // │ │ │ │ │ +163 // Three groups of methods describe the topology around a vertex: │ │ │ │ │ +164 // - simple properties (vertex is a boundary, manifold, etc.) │ │ │ │ │ +165 // - sizes of incident faces (constant or size for each face) │ │ │ │ │ +166 // - sharpness of the vertex and its incident edges (optional) │ │ │ │ │ +167 // │ │ │ │ │ +168 │ │ │ │ │ +169 // Manifold and boundary conditions: │ │ │ │ │ +170 // │ │ │ │ │ +171 // The manifold property is a strict condition but preferred for │ │ │ │ │ +172 // efficiency and is usually available from common connected mesh │ │ │ │ │ +173 // representations. When declaring the topology as "manifold", │ │ │ │ │ +174 // the Factory assumes the following: │ │ │ │ │ +175 // │ │ │ │ │ +176 // - all incident faces are "ordered" (counter-clockwise) │ │ │ │ │ +177 // - all incident faces are consistently oriented │ │ │ │ │ +178 // - all incident edges are non-degenerate │ │ │ │ │ +179 // │ │ │ │ │ +180 // If not certain that all of these conditions are met, it is best │ │ │ │ │ +181 // to not declare manifold -- leaving the Factory to make sense of │ │ │ │ │ +182 // the set of incident faces from the face-vertex indices that are │ │ │ │ │ +183 // provided elsewhere. │ │ │ │ │ +184 // │ │ │ │ │ +185 │ │ │ │ │ +187 │ │ │ │ │ +191 │ │ │ │ │ +193 void _S_e_t_M_a_n_i_f_o_l_d(bool isManifold); │ │ │ │ │ +194 │ │ │ │ │ +196 void _S_e_t_B_o_u_n_d_a_r_y(bool isOnBoundary); │ │ │ │ │ +197 │ │ │ │ │ +199 void _S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int faceIndex, int faceSize); │ │ │ │ │ +200 │ │ │ │ │ +202 void _C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s(); │ │ │ │ │ +203 │ │ │ │ │ +205 void _S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float sharpness); │ │ │ │ │ +206 │ │ │ │ │ +208 void _C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(); │ │ │ │ │ +209 │ │ │ │ │ +221 void _S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex, float edgeSharpness); │ │ │ │ │ +222 │ │ │ │ │ +238 void _S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, float leadingEdgeSharp, │ │ │ │ │ +239 float trailingEdgeSharp); │ │ │ │ │ +240 │ │ │ │ │ +242 void _C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s(); │ │ │ │ │ +244 │ │ │ │ │ +246 │ │ │ │ │ +251 │ │ │ │ │ +253 bool _I_s_M_a_n_i_f_o_l_d() const; │ │ │ │ │ +254 │ │ │ │ │ +256 bool _I_s_B_o_u_n_d_a_r_y() const; │ │ │ │ │ +257 │ │ │ │ │ +259 bool _H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() const; │ │ │ │ │ +260 │ │ │ │ │ +262 int _G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int faceIndex) const; │ │ │ │ │ +263 │ │ │ │ │ +265 bool _H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ +266 │ │ │ │ │ +268 float _G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ +269 │ │ │ │ │ +271 bool _H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s() const; │ │ │ │ │ +272 │ │ │ │ │ +274 float _G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex) const; │ │ │ │ │ +275 │ │ │ │ │ +277 void _G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ +278 float * leadingEdgeSharp, float * trailingEdgeSharp) const; │ │ │ │ │ +280 │ │ │ │ │ +281protected: │ │ │ │ │ +283 friend class FaceVertex; │ │ │ │ │ +284 │ │ │ │ │ +285 _V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r() { } │ │ │ │ │ +286 _~_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r() { } │ │ │ │ │ +287 │ │ │ │ │ +288 typedef Vtr::internal::StackBuffer IntBuffer; │ │ │ │ │ +289 typedef Vtr::internal::StackBuffer FloatBuffer; │ │ │ │ │ +290 │ │ │ │ │ +291 void initFaceSizes(); │ │ │ │ │ +292 void initEdgeSharpness(); │ │ │ │ │ +294 │ │ │ │ │ +295protected: │ │ │ │ │ +297 // Member variables assigned through the above interface: │ │ │ │ │ +298 unsigned short _isValid : 1; │ │ │ │ │ +299 unsigned short _isInitialized : 1; │ │ │ │ │ +300 unsigned short _isFinalized : 1; │ │ │ │ │ +301 │ │ │ │ │ +302 unsigned short _isManifold : 1; │ │ │ │ │ +303 unsigned short _isBoundary : 1; │ │ │ │ │ +304 │ │ │ │ │ +305 unsigned short _hasFaceSizes : 1; │ │ │ │ │ +306 unsigned short _hasEdgeSharpness : 1; │ │ │ │ │ +307 │ │ │ │ │ +308 short _numFaces; │ │ │ │ │ +309 float _vertSharpness; │ │ │ │ │ +310 │ │ │ │ │ +311 FloatBuffer _faceEdgeSharpness; │ │ │ │ │ +312 IntBuffer _faceSizeOffsets; │ │ │ │ │ +314}; │ │ │ │ │ +315 │ │ │ │ │ +316// │ │ │ │ │ +317// Public inline methods for simple assignment: │ │ │ │ │ +318// │ │ │ │ │ +319inline bool │ │ │ │ │ +_3_2_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d() const { │ │ │ │ │ +321 return _isValid; │ │ │ │ │ +322} │ │ │ │ │ +323 │ │ │ │ │ +324inline void │ │ │ │ │ +_3_2_5_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d(bool isManifold) { │ │ │ │ │ +326 _isManifold = isManifold; │ │ │ │ │ +327} │ │ │ │ │ +328inline bool │ │ │ │ │ +_3_2_9_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_M_a_n_i_f_o_l_d() const { │ │ │ │ │ +330 return _isManifold; │ │ │ │ │ +331} │ │ │ │ │ +332 │ │ │ │ │ +333inline void │ │ │ │ │ +_3_3_4_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_B_o_u_n_d_a_r_y(bool isBoundary) { │ │ │ │ │ +335 _isBoundary = isBoundary; │ │ │ │ │ +336} │ │ │ │ │ +337inline bool │ │ │ │ │ +_3_3_8_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_B_o_u_n_d_a_r_y() const { │ │ │ │ │ +339 return _isBoundary; │ │ │ │ │ +340} │ │ │ │ │ +341 │ │ │ │ │ +342// │ │ │ │ │ +343// Public inline methods involving sizes of incident faces: │ │ │ │ │ +344// │ │ │ │ │ +345inline bool │ │ │ │ │ +_3_4_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() const { │ │ │ │ │ +347 return _hasFaceSizes; │ │ │ │ │ +348} │ │ │ │ │ +349inline void │ │ │ │ │ +_3_5_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s() { │ │ │ │ │ +351 _hasFaceSizes = false; │ │ │ │ │ +352} │ │ │ │ │ +353 │ │ │ │ │ +354inline void │ │ │ │ │ +_3_5_5_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int incFaceIndex, int faceSize) { │ │ │ │ │ +356 │ │ │ │ │ +357 if (!_hasFaceSizes) initFaceSizes(); │ │ │ │ │ +358 │ │ │ │ │ +359 _faceSizeOffsets[incFaceIndex] = faceSize; │ │ │ │ │ +360} │ │ │ │ │ +361inline int │ │ │ │ │ +_3_6_2_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e(int incFaceIndex) const { │ │ │ │ │ +363 │ │ │ │ │ +364 return _isFinalized ? │ │ │ │ │ +365 (_faceSizeOffsets[incFaceIndex+1] - _faceSizeOffsets[incFaceIndex]) : │ │ │ │ │ +366 _faceSizeOffsets[incFaceIndex]; │ │ │ │ │ +367} │ │ │ │ │ +368 │ │ │ │ │ +369// │ │ │ │ │ +370// Public inline methods involving vertex sharpness: │ │ │ │ │ +371// │ │ │ │ │ +372inline bool │ │ │ │ │ +_3_7_3_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ +374 return _vertSharpness > 0.0f; │ │ │ │ │ +375} │ │ │ │ │ +376inline void │ │ │ │ │ +_3_7_7_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() { │ │ │ │ │ +378 _vertSharpness = 0.0f; │ │ │ │ │ +379} │ │ │ │ │ +380 │ │ │ │ │ +381inline void │ │ │ │ │ +_3_8_2_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertSharpness) { │ │ │ │ │ +383 _vertSharpness = vertSharpness; │ │ │ │ │ +384} │ │ │ │ │ +385inline float │ │ │ │ │ +_3_8_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ +387 return _vertSharpness; │ │ │ │ │ +388} │ │ │ │ │ +389 │ │ │ │ │ +390// │ │ │ │ │ +391// Public inline methods involving vertex sharpness: │ │ │ │ │ +392// │ │ │ │ │ +393inline bool │ │ │ │ │ +_3_9_4_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s() const { │ │ │ │ │ +395 return _hasEdgeSharpness; │ │ │ │ │ +396} │ │ │ │ │ +397inline void │ │ │ │ │ +_3_9_8_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s() { │ │ │ │ │ +399 _hasEdgeSharpness = false; │ │ │ │ │ +400} │ │ │ │ │ +401 │ │ │ │ │ +402inline void │ │ │ │ │ +_4_0_3_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex, float sharpness) { │ │ │ │ │ +404 │ │ │ │ │ +405 if (!_hasEdgeSharpness) initEdgeSharpness(); │ │ │ │ │ +406 │ │ │ │ │ +407 // Assign the leading edge of the face after the edge (even index): │ │ │ │ │ +408 if (edgeIndex < _numFaces) { │ │ │ │ │ +409 _faceEdgeSharpness[2*edgeIndex] = sharpness; │ │ │ │ │ +410 } │ │ │ │ │ +411 │ │ │ │ │ +412 // Assign the trailing edge of the face before the edge (odd index): │ │ │ │ │ +413 if (edgeIndex > 0) { │ │ │ │ │ +414 _faceEdgeSharpness[2*edgeIndex-1] = sharpness; │ │ │ │ │ +415 } else if (!_I_s_B_o_u_n_d_a_r_y()) { │ │ │ │ │ +416 _faceEdgeSharpness[2*_numFaces-1] = sharpness; │ │ │ │ │ +417 } │ │ │ │ │ +418} │ │ │ │ │ +419inline float │ │ │ │ │ +_4_2_0_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s(int edgeIndex) const { │ │ │ │ │ +421 │ │ │ │ │ +422 // All edges are first of the pair (even index) except last of boundary │ │ │ │ │ +423 return _faceEdgeSharpness[2*edgeIndex - (edgeIndex == _numFaces)]; │ │ │ │ │ +424} │ │ │ │ │ +425 │ │ │ │ │ +426inline void │ │ │ │ │ +_4_2_7_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ +428 float leadingEdgeSharpness, float trailingEdgeSharpness) { │ │ │ │ │ +429 │ │ │ │ │ +430 if (!_hasEdgeSharpness) initEdgeSharpness(); │ │ │ │ │ +431 │ │ │ │ │ +432 _faceEdgeSharpness[2*faceIndex ] = leadingEdgeSharpness; │ │ │ │ │ +433 _faceEdgeSharpness[2*faceIndex+1] = trailingEdgeSharpness; │ │ │ │ │ +434} │ │ │ │ │ +435inline void │ │ │ │ │ +_4_3_6_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s(int faceIndex, │ │ │ │ │ +437 float * leadingEdgeSharpness, float * trailingEdgeSharpness) const { │ │ │ │ │ +438 │ │ │ │ │ +439 *leadingEdgeSharpness = _faceEdgeSharpness[2*faceIndex]; │ │ │ │ │ +440 *trailingEdgeSharpness = _faceEdgeSharpness[2*faceIndex+1]; │ │ │ │ │ +441} │ │ │ │ │ +442 │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_H_L_S_L_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e │ │ │ │ │ -DDeeffiinniittiioonn _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._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_:_:_O_s_d_:_:_H_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_:_:_H_L_S_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_:_:_H_L_S_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_:_:_H_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() │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_H_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_:_:_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float GetVertexSharpness() const │ │ │ │ │ +Return the sharpness of the vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_F_i_n_a_l_i_z_e │ │ │ │ │ +bool Finalize() │ │ │ │ │ +Terminate the sequence of specifications. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_S_e_t_M_a_n_i_f_o_l_d │ │ │ │ │ +void SetManifold(bool isManifold) │ │ │ │ │ +Declare the vertex neighborhood as manifold (ordered) │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_n_i_t_i_a_l_i_z_e │ │ │ │ │ +bool Initialize(int numIncidentFaces) │ │ │ │ │ +Initialize specification with the number of incident faces. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_I_s_M_a_n_i_f_o_l_d │ │ │ │ │ +bool IsManifold() const │ │ │ │ │ +Return if vertex neighborhood is manifold. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +bool HasEdgeSharpness() const │ │ │ │ │ +Return if sharpness was assigned to the incident edges. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e │ │ │ │ │ +int GetIncidentFaceSize(int faceIndex) const │ │ │ │ │ +Return the size of an incident face. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float GetManifoldEdgeSharpness(int edgeIndex) const │ │ │ │ │ +Return the sharpness assigned to a manifold edge. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_: │ │ │ │ │ +_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void SetIncidentFaceEdgeSharpness(int faceIndex, float leadingEdgeSharp, float │ │ │ │ │ +trailingEdgeSharp) │ │ │ │ │ +Assign sharpness to the edges of an incident face. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +bool HasVertexSharpness() const │ │ │ │ │ +Return if sharpness was assigned to the vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s │ │ │ │ │ +void ClearIncidentFaceSizes() │ │ │ │ │ +Remove any assigned sizes of incident faces. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void SetVertexSharpness(float sharpness) │ │ │ │ │ +Assign sharpness to the vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void ClearVertexSharpness() │ │ │ │ │ +Remove any sharpness assigned to the vertex. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_C_l_e_a_r_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void ClearEdgeSharpness() │ │ │ │ │ +Remove any sharpness assigned to the incident edges. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_: │ │ │ │ │ +_G_e_t_I_n_c_i_d_e_n_t_F_a_c_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void GetIncidentFaceEdgeSharpness(int faceIndex, float *leadingEdgeSharp, float │ │ │ │ │ +*trailingEdgeSharp) const │ │ │ │ │ +Return the sharpness assigned to edges of an incident face. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_B_o_u_n_d_a_r_y │ │ │ │ │ +bool IsBoundary() const │ │ │ │ │ +Return if vertex neighborhood is on a boundary. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_I_s_V_a_l_i_d │ │ │ │ │ +bool IsValid() const │ │ │ │ │ +Return if instance is valid. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_3_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_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_H_a_s_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e_s │ │ │ │ │ +bool HasIncidentFaceSizes() const │ │ │ │ │ +Return if the sizes of incident faces are assigned. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ +void SetBoundary(bool isOnBoundary) │ │ │ │ │ +Declare the vertex neighborhood as being on a boundary. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_I_n_c_i_d_e_n_t_F_a_c_e_S_i_z_e │ │ │ │ │ +void SetIncidentFaceSize(int faceIndex, int faceSize) │ │ │ │ │ +Assign the size of an incident face. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_B_f_r_:_:_V_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_:_:_S_e_t_M_a_n_i_f_o_l_d_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +void SetManifoldEdgeSharpness(int edgeIndex, float edgeSharpness) │ │ │ │ │ +Assign sharpness to the edge of a manifold neighborhood. │ │ │ │ │ +DDeeffiinniittiioonn _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h_:_4_0_3 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _h_l_s_l_P_a_t_c_h_S_h_a_d_e_r_S_o_u_r_c_e_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _v_e_r_t_e_x_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/d3d11ComputeEvaluator.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/parameterization.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,45 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    d3d11ComputeEvaluator.h File Reference
    │ │ │ │ +
    parameterization.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/bufferDescriptor.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  D3D11StencilTable
     D3D11 stencil table. More...
     
    class  D3D11ComputeEvaluator
    class  Parameterization
     Simple class defining the 2D parameterization of a face. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ +parameterization.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 "_._._/_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 │ │ │ │ │ -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   _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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00851.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00851 = [ │ │ │ │ │ - ["D3D11StencilTable", "a01189.html", "a01189"], │ │ │ │ │ - ["D3D11ComputeEvaluator", "a01193.html", "a01193"] │ │ │ │ │ + ["Parameterization", "a00921.html", "a00921"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00851_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11ComputeEvaluator.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/parameterization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    d3d11ComputeEvaluator.h
    │ │ │ │ +
    parameterization.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,225 +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_D3D11_COMPUTE_EVALUATOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    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 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
    │ │ │ │ - │ │ │ │ -
    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; }
    │ │ │ │ -
    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;
    │ │ │ │ +
    30#include "../sdc/types.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    34
    │ │ │ │ +
    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
    │ │ │ │ -
    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 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
    │ │ │ │ - │ │ │ │ +
    92
    │ │ │ │ +
    96
    │ │ │ │ +
    98 Type GetType() const { return (Type) _type; }
    │ │ │ │ +
    99
    │ │ │ │ +
    101 int GetFaceSize() const { return _faceSize; }
    │ │ │ │ +
    103
    │ │ │ │ +
    104public:
    │ │ │ │ +
    106
    │ │ │ │
    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 }
    │ │ │ │ -
    │ │ │ │ +
    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
    │ │ │ │ -
    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};
    │ │ │ │ +
    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}
    │ │ │ │
    │ │ │ │ -
    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
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11ComputeEvaluator.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 2015 Pixar │ │ │ │ │ +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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,272 +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_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_D3D11_COMPUTE_EVALUATOR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_PARAMETERIZATION_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -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 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(); │ │ │ │ │ -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; } │ │ │ │ │ -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; │ │ │ │ │ +30#include "../sdc/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +35namespace 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 │ │ │ │ │ -91 int _numStencils; │ │ │ │ │ -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(); │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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 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 │ │ │ │ │ +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_:_:_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_:_:_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_s_d │ │ │ │ │ - * _d_3_d_1_1_C_o_m_p_u_t_e_E_v_a_l_u_a_t_o_r_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _p_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00854.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/tessellation.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,45 +90,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cudaPatchTable.h File Reference
    │ │ │ │ +
    tessellation.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include <vector>
    │ │ │ │ +#include "../bfr/parameterization.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  CudaPatchTable
     CUDA patch table. More...
    class  Tessellation
     Encapsulates a specific tessellation pattern of a Parameterization. More...
     
    class  Tessellation::Options
     Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ +tessellation.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "../osd/nonCopyable.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_t_y_p_e_s_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_b_f_r_/_p_a_r_a_m_e_t_e_r_i_z_a_t_i_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   _C_u_d_a_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  CUDA patch table. _M_o_r_e_._._. │ │ │ │ │ +class   _T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +  Encapsulates a specific tessellation pattern of a _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s │ │ │ │ │ + _O_p_t_i_o_n_s configure a _T_e_s_s_e_l_l_a_t_i_o_n to specify the nature of both its │ │ │ │ │ +  results and the structure of the coordinate and facet index arrays that │ │ │ │ │ + its methods will populate. _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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_u_d_a_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _t_e_s_s_e_l_l_a_t_i_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00854.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ │ var a00854 = [ │ │ │ │ │ - ["CudaPatchTable", "a01181.html", "a01181"] │ │ │ │ │ + ["Tessellation", "a00961.html", "a00961"], │ │ │ │ │ + ["Options", "a00965.html", "a00965"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00854_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/tessellation.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    cudaPatchTable.h
    │ │ │ │ +
    tessellation.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,131 +119,281 @@ │ │ │ │
    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_BFR_TESSELLATION_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_TESSELLATION_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../osd/nonCopyable.h"
    │ │ │ │ -
    31#include "../osd/types.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33#include <vector>
    │ │ │ │ +
    30#include "../bfr/parameterization.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace Far{
    │ │ │ │ -
    39 class PatchTable;
    │ │ │ │ -
    40};
    │ │ │ │ -
    41
    │ │ │ │ -
    42namespace Osd {
    │ │ │ │ -
    43
    │ │ │ │ +
    35namespace Bfr {
    │ │ │ │ +
    36
    │ │ │ │
    │ │ │ │ -
    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; }
    │ │ │ │ -
    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};
    │ │ │ │ +
    │ │ │ │ +
    65 class Options {
    │ │ │ │ +
    66 public:
    │ │ │ │ +
    │ │ │ │ +
    67 Options() : _preserveQuads(false), _facetSize4(false),
    │ │ │ │ +
    68 _coordStride(0), _facetStride(0) { }
    │ │ │ │ +
    │ │ │ │ +
    69
    │ │ │ │ +
    72 Options & PreserveQuads(bool on);
    │ │ │ │ +
    74 bool PreserveQuads() const { return _preserveQuads; }
    │ │ │ │ +
    75
    │ │ │ │ +
    78 Options & SetFacetSize(int numIndices);
    │ │ │ │ +
    79 // @brief Return the number of indices per facet
    │ │ │ │ +
    80 int GetFacetSize() const { return 3 + (int)_facetSize4; }
    │ │ │ │ +
    81
    │ │ │ │ +
    83 Options & SetFacetStride(int stride);
    │ │ │ │ +
    85 int GetFacetStride() const { return _facetStride; }
    │ │ │ │ +
    86
    │ │ │ │ +
    88 Options & SetCoordStride(int stride);
    │ │ │ │ +
    90 int GetCoordStride() const { return _coordStride; }
    │ │ │ │ +
    91
    │ │ │ │ +
    92 private:
    │ │ │ │ +
    93 unsigned int _preserveQuads : 1;
    │ │ │ │ +
    94 unsigned int _facetSize4 : 1;
    │ │ │ │ +
    95
    │ │ │ │ +
    96 short _coordStride;
    │ │ │ │ +
    97 short _facetStride;
    │ │ │ │ +
    98 };
    │ │ │ │
    │ │ │ │ +
    99
    │ │ │ │ +
    100public:
    │ │ │ │ +
    102
    │ │ │ │
    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.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
    118 Tessellation(Parameterization const & p, int uniformRate,
    │ │ │ │ +
    119 Options const & options = Options());
    │ │ │ │ +
    120
    │ │ │ │ +
    158 Tessellation(Parameterization const & p, int numRates, int const rates[],
    │ │ │ │ +
    159 Options const & options = Options());
    │ │ │ │ +
    160
    │ │ │ │ +
    162 bool IsValid() const { return _isValid; }
    │ │ │ │ +
    163
    │ │ │ │ +
    165 Tessellation() = delete;
    │ │ │ │ +
    166
    │ │ │ │ +
    167 Tessellation(Tessellation const &) = delete;
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    171
    │ │ │ │ +
    173
    │ │ │ │ +
    177
    │ │ │ │ +
    179 Parameterization GetParameterization() const { return _param; }
    │ │ │ │ +
    180
    │ │ │ │ +
    182 int GetFaceSize() const { return _param.GetFaceSize(); }
    │ │ │ │ +
    183
    │ │ │ │ +
    185 int GetRates(int rates[]) const;
    │ │ │ │ +
    186
    │ │ │ │ +
    188 bool IsUniform() const { return _isUniform; }
    │ │ │ │ +
    190
    │ │ │ │ +
    192
    │ │ │ │ +
    203
    │ │ │ │ +
    205 int GetNumCoords() const { return _numInteriorPoints + _numBoundaryPoints; }
    │ │ │ │ +
    206
    │ │ │ │ +
    208 int GetCoordStride() const { return _coordStride; }
    │ │ │ │ +
    209
    │ │ │ │ +
    211 int GetNumBoundaryCoords() const { return _numBoundaryPoints; }
    │ │ │ │ +
    212
    │ │ │ │ +
    214 int GetNumInteriorCoords() const { return _numInteriorPoints; }
    │ │ │ │ +
    215
    │ │ │ │ +
    218 int GetNumEdgeCoords(int edge) const { return _outerRates[edge] - 1; }
    │ │ │ │ +
    219
    │ │ │ │ +
    221 template <typename REAL>
    │ │ │ │ +
    222 int GetCoords(REAL coordTuples[]) const;
    │ │ │ │ +
    223
    │ │ │ │ +
    225 template <typename REAL>
    │ │ │ │ +
    226 int GetBoundaryCoords(REAL coordTuples[]) const;
    │ │ │ │ +
    227
    │ │ │ │ +
    229 template <typename REAL>
    │ │ │ │ +
    230 int GetInteriorCoords(REAL coordTuples[]) const;
    │ │ │ │ +
    231
    │ │ │ │ +
    233 template <typename REAL>
    │ │ │ │ +
    234 int GetVertexCoord(int vertex, REAL coordTuples[]) const;
    │ │ │ │ +
    235
    │ │ │ │ +
    238 template <typename REAL>
    │ │ │ │ +
    239 int GetEdgeCoords(int edge, REAL coordTuples[]) const;
    │ │ │ │ +
    241
    │ │ │ │ +
    243
    │ │ │ │ +
    253
    │ │ │ │ +
    255 int GetNumFacets() const { return _numFacets; }
    │ │ │ │ +
    256
    │ │ │ │ +
    258 int GetFacetSize() const { return _facetSize; }
    │ │ │ │ +
    259
    │ │ │ │ +
    261 int GetFacetStride() const { return _facetStride; }
    │ │ │ │ +
    262
    │ │ │ │ +
    264 int GetFacets(int facetTuples[]) const;
    │ │ │ │ +
    266
    │ │ │ │ +
    268
    │ │ │ │ +
    283
    │ │ │ │ +
    285 void TransformFacetCoordIndices(int facetTuples[], int commonOffset);
    │ │ │ │ +
    286
    │ │ │ │ +
    289 void TransformFacetCoordIndices(int facetTuples[],
    │ │ │ │ +
    290 int const boundaryIndices[],
    │ │ │ │ +
    291 int interiorOffset);
    │ │ │ │ +
    292
    │ │ │ │ +
    294 void TransformFacetCoordIndices(int facetTuples[],
    │ │ │ │ +
    295 int const boundaryIndices[],
    │ │ │ │ +
    296 int const interiorIndices[]);
    │ │ │ │ +
    298
    │ │ │ │ +
    299private:
    │ │ │ │ +
    300 // Private initialization methods:
    │ │ │ │ +
    301 bool validateArguments(Parameterization const & p,
    │ │ │ │ +
    302 int nRates, int const rates[], Options const & options);
    │ │ │ │ +
    303
    │ │ │ │ +
    304 void initialize(Parameterization const & p,
    │ │ │ │ +
    305 int nRates, int const rates[], Options const & options);
    │ │ │ │ +
    306
    │ │ │ │ +
    307 void initializeDefaults();
    │ │ │ │ +
    308 int initializeRates(int nRates, int const rates[]);
    │ │ │ │ +
    309 void initializeInventoryForParamTri(int sumOfOuterRates);
    │ │ │ │ +
    310 void initializeInventoryForParamQuad(int sumOfOuterRates);
    │ │ │ │ +
    311 void initializeInventoryForParamQPoly(int sumOfOuterRates);
    │ │ │ │ +
    312
    │ │ │ │ +
    313private:
    │ │ │ │ +
    314 // Private members:
    │ │ │ │ +
    315 Parameterization _param;
    │ │ │ │ +
    316
    │ │ │ │ +
    317 unsigned short _isValid : 1;
    │ │ │ │ +
    318 unsigned short _isUniform : 1;
    │ │ │ │ +
    319 unsigned short _triangulate : 1;
    │ │ │ │ +
    320 unsigned short _singleFace : 1;
    │ │ │ │ +
    321 unsigned short _segmentedFace : 1;
    │ │ │ │ +
    322 unsigned short _triangleFan : 1;
    │ │ │ │ +
    323 unsigned short _splitQuad : 1;
    │ │ │ │ +
    324
    │ │ │ │ +
    325 short _facetSize;
    │ │ │ │ +
    326 int _facetStride;
    │ │ │ │ +
    327 int _coordStride;
    │ │ │ │ +
    328
    │ │ │ │ +
    329 int _numGivenRates;
    │ │ │ │ +
    330 int _numBoundaryPoints;
    │ │ │ │ +
    331 int _numInteriorPoints;
    │ │ │ │ +
    332 int _numFacets;
    │ │ │ │ +
    333
    │ │ │ │ +
    334 int _innerRates[2];
    │ │ │ │ +
    335 int* _outerRates;
    │ │ │ │ +
    336 int _outerRatesLocal[4];
    │ │ │ │ +
    337};
    │ │ │ │ +
    │ │ │ │ +
    338
    │ │ │ │ +
    339//
    │ │ │ │ +
    340// Inline implementations:
    │ │ │ │ +
    341//
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    344 _preserveQuads = on;
    │ │ │ │ +
    345 return *this;
    │ │ │ │ +
    346}
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    349 _facetSize4 = (numIndices == 4);
    │ │ │ │ +
    350 return *this;
    │ │ │ │ +
    351}
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    354 _facetStride = (short) stride;
    │ │ │ │ +
    355 return *this;
    │ │ │ │ +
    356}
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    359 _coordStride = (short) stride;
    │ │ │ │ +
    360 return *this;
    │ │ │ │ +
    361}
    │ │ │ │ +
    │ │ │ │ +
    362
    │ │ │ │ +
    363template <typename REAL>
    │ │ │ │ +
    364inline int
    │ │ │ │ +
    │ │ │ │ +
    365Tessellation::GetVertexCoord(int vertex, REAL coord[]) const {
    │ │ │ │ +
    366 _param.GetVertexCoord(vertex, coord);
    │ │ │ │ +
    367 return 1;
    │ │ │ │ +
    368}
    │ │ │ │ +
    │ │ │ │ +
    369
    │ │ │ │ +
    370template <typename REAL>
    │ │ │ │ +
    371inline int
    │ │ │ │ +
    │ │ │ │ +
    372Tessellation::GetCoords(REAL coordTuples[]) const {
    │ │ │ │ +
    373 int nCoords = GetBoundaryCoords(coordTuples);
    │ │ │ │ +
    374 nCoords += GetInteriorCoords(coordTuples + nCoords * _coordStride);
    │ │ │ │ +
    375 return nCoords;
    │ │ │ │ +
    376}
    │ │ │ │ +
    │ │ │ │ +
    377
    │ │ │ │ +
    378} // end namespace Bfr
    │ │ │ │ +
    379
    │ │ │ │ +
    380} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    381using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    382
    │ │ │ │ +
    383} // end namespace OpenSubdiv
    │ │ │ │ +
    384
    │ │ │ │ +
    385#endif /* OPENSUBDIV3_BFR_TESSELLATION */
    │ │ │ │ + │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │ +
    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.
    │ │ │ │ +
    int GetNumEdgeCoords(int edge) const
    Return the number of coordinates within a given edge (excluding those at its end vertices)
    │ │ │ │ +
    int GetInteriorCoords(REAL coordTuples[]) const
    Retrieve the coordinates for the boundary.
    │ │ │ │ +
    int GetFacetStride() const
    Return the number of elements between each facet.
    │ │ │ │ +
    bool IsUniform() const
    Return if the pattern is uniform.
    │ │ │ │ +
    int GetNumCoords() const
    Return the number of coordinates in the entire pattern.
    │ │ │ │ +
    int GetCoords(REAL coordTuples[]) const
    Retrieve the coordinates for the entire pattern.
    │ │ │ │ +
    void TransformFacetCoordIndices(int facetTuples[], int commonOffset)
    Apply a common offset to all facet coordinate indices.
    │ │ │ │ +
    Tessellation(Parameterization const &p, int numRates, int const rates[], Options const &options=Options())
    General constructor providing multiple tessellation rates for a non-uniform tessellation.
    │ │ │ │ +
    Parameterization GetParameterization() const
    Return the Parameterization.
    │ │ │ │ +
    void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], int interiorOffset)
    Reassign indices of boundary coordinates while offseting those of interior coordinates.
    │ │ │ │ +
    int GetFacetSize() const
    Return the number of indices assigned to each facet.
    │ │ │ │ +
    Tessellation()=delete
    Default construction is unavailable.
    │ │ │ │ +
    Tessellation(Parameterization const &p, int uniformRate, Options const &options=Options())
    Simple constructor providing a single uniform tessellation rate.
    │ │ │ │ +
    int GetFacets(int facetTuples[]) const
    Retrieve the facet indices for the entire pattern.
    │ │ │ │ +
    int GetNumFacets() const
    Return the number of facets in the entire pattern.
    │ │ │ │ +
    int GetNumInteriorCoords() const
    Return the number of interior coordinates.
    │ │ │ │ +
    int GetVertexCoord(int vertex, REAL coordTuples[]) const
    Retrieve the coordinate for a given vertex of the face.
    │ │ │ │ +
    int GetBoundaryCoords(REAL coordTuples[]) const
    Retrieve the coordinates for the boundary.
    │ │ │ │ + │ │ │ │ +
    int GetRates(int rates[]) const
    Retrieve the rates assigned.
    │ │ │ │ +
    bool IsValid() const
    Return true if correctly initialized.
    │ │ │ │ +
    Tessellation & operator=(Tessellation const &)=delete
    │ │ │ │ +
    int GetEdgeCoords(int edge, REAL coordTuples[]) const
    Retrieve the coordinates for a given edge of the face (excluding those at its end vertices)
    │ │ │ │ +
    Options configure a Tessellation to specify the nature of both its results and the structure of the c...
    │ │ │ │ + │ │ │ │ +
    int GetCoordStride() const
    Return the stride between (u,v) pairs.
    │ │ │ │ +
    Options & SetFacetSize(int numIndices)
    Assign the number of indices per facet (must be 3 or 4, default is 3)
    │ │ │ │ +
    int GetFacetStride() const
    Return the stride between facets.
    │ │ │ │ + │ │ │ │ +
    Options & SetCoordStride(int stride)
    Assign the stride between (u,v) pairs (default is 2)
    │ │ │ │ +
    Options & SetFacetStride(int stride)
    Assign the stride between facets (default is facet size)
    │ │ │ │ +
    bool PreserveQuads() const
    Return if preservation of quads is set.
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cudaPatchTable.h │ │ │ │ │ +tessellation.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 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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,167 +24,367 @@ │ │ │ │ │ 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_BFR_TESSELLATION_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_TESSELLATION_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/nonCopyable.h" │ │ │ │ │ -31#include "../osd/types.h" │ │ │ │ │ -32 │ │ │ │ │ -33#include │ │ │ │ │ +30#include "../bfr/parameterization.h" │ │ │ │ │ +31 │ │ │ │ │ +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 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 { │ │ │ │ │ +35namespace Bfr { │ │ │ │ │ +36 │ │ │ │ │ +_5_1class _T_e_s_s_e_l_l_a_t_i_o_n { │ │ │ │ │ 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; } │ │ │ │ │ -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); │ │ │ │ │ +_6_5 class _O_p_t_i_o_n_s { │ │ │ │ │ +66 public: │ │ │ │ │ +_6_7 _O_p_t_i_o_n_s() : _preserveQuads(false), _facetSize4(false), │ │ │ │ │ +68 _coordStride(0), _facetStride(0) { } │ │ │ │ │ +69 │ │ │ │ │ +72 _O_p_t_i_o_n_s & _P_r_e_s_e_r_v_e_Q_u_a_d_s(bool on); │ │ │ │ │ +_7_4 bool _P_r_e_s_e_r_v_e_Q_u_a_d_s() const { return _preserveQuads; } │ │ │ │ │ +75 │ │ │ │ │ +78 _O_p_t_i_o_n_s & _S_e_t_F_a_c_e_t_S_i_z_e(int numIndices); │ │ │ │ │ +79 // @brief Return the number of indices per facet │ │ │ │ │ +_8_0 int _G_e_t_F_a_c_e_t_S_i_z_e() const { return 3 + (int)_facetSize4; } │ │ │ │ │ +81 │ │ │ │ │ +83 _O_p_t_i_o_n_s & _S_e_t_F_a_c_e_t_S_t_r_i_d_e(int stride); │ │ │ │ │ +_8_5 int _G_e_t_F_a_c_e_t_S_t_r_i_d_e() const { return _facetStride; } │ │ │ │ │ +86 │ │ │ │ │ +88 _O_p_t_i_o_n_s & _S_e_t_C_o_o_r_d_S_t_r_i_d_e(int stride); │ │ │ │ │ +_9_0 int _G_e_t_C_o_o_r_d_S_t_r_i_d_e() const { return _coordStride; } │ │ │ │ │ +91 │ │ │ │ │ +92 private: │ │ │ │ │ +93 unsigned int _preserveQuads : 1; │ │ │ │ │ +94 unsigned int _facetSize4 : 1; │ │ │ │ │ +95 │ │ │ │ │ +96 short _coordStride; │ │ │ │ │ +97 short _facetStride; │ │ │ │ │ +98 }; │ │ │ │ │ 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}; │ │ │ │ │ +100public: │ │ │ │ │ +102 │ │ │ │ │ 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 │ │ │ │ │ +_1_1_8 _T_e_s_s_e_l_l_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, int uniformRate, │ │ │ │ │ +119 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()); │ │ │ │ │ +120 │ │ │ │ │ +_1_5_8 _T_e_s_s_e_l_l_a_t_i_o_n(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, int numRates, int const rates[], │ │ │ │ │ +159 _O_p_t_i_o_n_s const & options = _O_p_t_i_o_n_s()); │ │ │ │ │ +160 │ │ │ │ │ +_1_6_2 bool _I_s_V_a_l_i_d() const { return _isValid; } │ │ │ │ │ +163 │ │ │ │ │ +_1_6_5 _T_e_s_s_e_l_l_a_t_i_o_n() = delete; │ │ │ │ │ +166 │ │ │ │ │ +_1_6_7 _T_e_s_s_e_l_l_a_t_i_o_n(_T_e_s_s_e_l_l_a_t_i_o_n const &) = delete; │ │ │ │ │ +_1_6_8 _T_e_s_s_e_l_l_a_t_i_o_n & _o_p_e_r_a_t_o_r_=(_T_e_s_s_e_l_l_a_t_i_o_n const &) = delete; │ │ │ │ │ +_1_6_9 _~_T_e_s_s_e_l_l_a_t_i_o_n(); │ │ │ │ │ +171 │ │ │ │ │ +173 │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 _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 _param; } │ │ │ │ │ +180 │ │ │ │ │ +_1_8_2 int _G_e_t_F_a_c_e_S_i_z_e() const { return _param._G_e_t_F_a_c_e_S_i_z_e(); } │ │ │ │ │ +183 │ │ │ │ │ +_1_8_5 int _G_e_t_R_a_t_e_s(int rates[]) const; │ │ │ │ │ +186 │ │ │ │ │ +_1_8_8 bool _I_s_U_n_i_f_o_r_m() const { return _isUniform; } │ │ │ │ │ +190 │ │ │ │ │ +192 │ │ │ │ │ +203 │ │ │ │ │ +_2_0_5 int _G_e_t_N_u_m_C_o_o_r_d_s() const { return _numInteriorPoints + _numBoundaryPoints; │ │ │ │ │ +} │ │ │ │ │ +206 │ │ │ │ │ +_2_0_8 int _G_e_t_C_o_o_r_d_S_t_r_i_d_e() const { return _coordStride; } │ │ │ │ │ +209 │ │ │ │ │ +_2_1_1 int _G_e_t_N_u_m_B_o_u_n_d_a_r_y_C_o_o_r_d_s() const { return _numBoundaryPoints; } │ │ │ │ │ +212 │ │ │ │ │ +_2_1_4 int _G_e_t_N_u_m_I_n_t_e_r_i_o_r_C_o_o_r_d_s() const { return _numInteriorPoints; } │ │ │ │ │ +215 │ │ │ │ │ +_2_1_8 int _G_e_t_N_u_m_E_d_g_e_C_o_o_r_d_s(int edge) const { return _outerRates[edge] - 1; } │ │ │ │ │ +219 │ │ │ │ │ +221 template │ │ │ │ │ +222 int _G_e_t_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ +223 │ │ │ │ │ +225 template │ │ │ │ │ +_2_2_6 int _G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ +227 │ │ │ │ │ +229 template │ │ │ │ │ +_2_3_0 int _G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s(REAL coordTuples[]) const; │ │ │ │ │ +231 │ │ │ │ │ +233 template │ │ │ │ │ +234 int _G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertex, REAL coordTuples[]) const; │ │ │ │ │ +235 │ │ │ │ │ +238 template │ │ │ │ │ +_2_3_9 int _G_e_t_E_d_g_e_C_o_o_r_d_s(int edge, REAL coordTuples[]) const; │ │ │ │ │ +241 │ │ │ │ │ +243 │ │ │ │ │ +253 │ │ │ │ │ +_2_5_5 int _G_e_t_N_u_m_F_a_c_e_t_s() const { return _numFacets; } │ │ │ │ │ +256 │ │ │ │ │ +_2_5_8 int _G_e_t_F_a_c_e_t_S_i_z_e() const { return _facetSize; } │ │ │ │ │ +259 │ │ │ │ │ +_2_6_1 int _G_e_t_F_a_c_e_t_S_t_r_i_d_e() const { return _facetStride; } │ │ │ │ │ +262 │ │ │ │ │ +_2_6_4 int _G_e_t_F_a_c_e_t_s(int facetTuples[]) const; │ │ │ │ │ +266 │ │ │ │ │ +268 │ │ │ │ │ +283 │ │ │ │ │ +_2_8_5 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], int commonOffset); │ │ │ │ │ +286 │ │ │ │ │ +_2_8_9 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], │ │ │ │ │ +290 int const boundaryIndices[], │ │ │ │ │ +291 int interiorOffset); │ │ │ │ │ +292 │ │ │ │ │ +_2_9_4 void _T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s(int facetTuples[], │ │ │ │ │ +295 int const boundaryIndices[], │ │ │ │ │ +296 int const interiorIndices[]); │ │ │ │ │ +298 │ │ │ │ │ +299private: │ │ │ │ │ +300 // Private initialization methods: │ │ │ │ │ +301 bool validateArguments(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, │ │ │ │ │ +302 int nRates, int const rates[], _O_p_t_i_o_n_s const & options); │ │ │ │ │ +303 │ │ │ │ │ +304 void initialize(_P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n const & p, │ │ │ │ │ +305 int nRates, int const rates[], _O_p_t_i_o_n_s const & options); │ │ │ │ │ +306 │ │ │ │ │ +307 void initializeDefaults(); │ │ │ │ │ +308 int initializeRates(int nRates, int const rates[]); │ │ │ │ │ +309 void initializeInventoryForParamTri(int sumOfOuterRates); │ │ │ │ │ +310 void initializeInventoryForParamQuad(int sumOfOuterRates); │ │ │ │ │ +311 void initializeInventoryForParamQPoly(int sumOfOuterRates); │ │ │ │ │ +312 │ │ │ │ │ +313private: │ │ │ │ │ +314 // Private members: │ │ │ │ │ +315 _P_a_r_a_m_e_t_e_r_i_z_a_t_i_o_n _param; │ │ │ │ │ +316 │ │ │ │ │ +317 unsigned short _isValid : 1; │ │ │ │ │ +318 unsigned short _isUniform : 1; │ │ │ │ │ +319 unsigned short _triangulate : 1; │ │ │ │ │ +320 unsigned short _singleFace : 1; │ │ │ │ │ +321 unsigned short _segmentedFace : 1; │ │ │ │ │ +322 unsigned short _triangleFan : 1; │ │ │ │ │ +323 unsigned short _splitQuad : 1; │ │ │ │ │ +324 │ │ │ │ │ +325 short _facetSize; │ │ │ │ │ +326 int _facetStride; │ │ │ │ │ +327 int _coordStride; │ │ │ │ │ +328 │ │ │ │ │ +329 int _numGivenRates; │ │ │ │ │ +330 int _numBoundaryPoints; │ │ │ │ │ +331 int _numInteriorPoints; │ │ │ │ │ +332 int _numFacets; │ │ │ │ │ +333 │ │ │ │ │ +334 int _innerRates[2]; │ │ │ │ │ +335 int* _outerRates; │ │ │ │ │ +336 int _outerRatesLocal[4]; │ │ │ │ │ +337}; │ │ │ │ │ +338 │ │ │ │ │ +339// │ │ │ │ │ +340// Inline implementations: │ │ │ │ │ +341// │ │ │ │ │ +342inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_3_4_3_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_P_r_e_s_e_r_v_e_Q_u_a_d_s(bool on) { │ │ │ │ │ +344 _preserveQuads = on; │ │ │ │ │ +345 return *this; │ │ │ │ │ +346} │ │ │ │ │ +347inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_3_4_8_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_i_z_e(int numIndices) { │ │ │ │ │ +349 _facetSize4 = (numIndices == 4); │ │ │ │ │ +350 return *this; │ │ │ │ │ +351} │ │ │ │ │ +352inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_3_5_3_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_t_r_i_d_e(int stride) { │ │ │ │ │ +354 _facetStride = (short) stride; │ │ │ │ │ +355 return *this; │ │ │ │ │ +356} │ │ │ │ │ +357inline _T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s & │ │ │ │ │ +_3_5_8_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_o_o_r_d_S_t_r_i_d_e(int stride) { │ │ │ │ │ +359 _coordStride = (short) stride; │ │ │ │ │ +360 return *this; │ │ │ │ │ +361} │ │ │ │ │ +362 │ │ │ │ │ +363template │ │ │ │ │ +364inline int │ │ │ │ │ +_3_6_5_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d(int vertex, REAL coord[]) const { │ │ │ │ │ +366 _param._G_e_t_V_e_r_t_e_x_C_o_o_r_d(vertex, coord); │ │ │ │ │ +367 return 1; │ │ │ │ │ +368} │ │ │ │ │ +369 │ │ │ │ │ +370template │ │ │ │ │ +371inline int │ │ │ │ │ +_3_7_2_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_s(REAL coordTuples[]) const { │ │ │ │ │ +373 int nCoords = _G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s(coordTuples); │ │ │ │ │ +374 nCoords += _G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s(coordTuples + nCoords * _coordStride); │ │ │ │ │ +375 return nCoords; │ │ │ │ │ +376} │ │ │ │ │ +377 │ │ │ │ │ +378} // end namespace Bfr │ │ │ │ │ +379 │ │ │ │ │ +380} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +381using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +382 │ │ │ │ │ +383} // end namespace OpenSubdiv │ │ │ │ │ +384 │ │ │ │ │ +385#endif /* OPENSUBDIV3_BFR_TESSELLATION */ │ │ │ │ │ _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 │ │ │ │ │ -*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 │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +Encapsulates a specific tessellation pattern of a Parameterization. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_S_i_z_e │ │ │ │ │ +int GetFaceSize() const │ │ │ │ │ +Return the size of the face. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_1_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_B_o_u_n_d_a_r_y_C_o_o_r_d_s │ │ │ │ │ +int GetNumBoundaryCoords() const │ │ │ │ │ +Return the number of boundary coordinates. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_~_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +~Tessellation() │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ +void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], │ │ │ │ │ +int const interiorIndices[]) │ │ │ │ │ +Reassign all facet coordinate indices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ +int GetCoordStride() const │ │ │ │ │ +Return the number of elements between each coordinate. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_E_d_g_e_C_o_o_r_d_s │ │ │ │ │ +int GetNumEdgeCoords(int edge) const │ │ │ │ │ +Return the number of coordinates within a given edge (excluding those at its │ │ │ │ │ +end vertices) │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_I_n_t_e_r_i_o_r_C_o_o_r_d_s │ │ │ │ │ +int GetInteriorCoords(REAL coordTuples[]) const │ │ │ │ │ +Retrieve the coordinates for the boundary. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ +int GetFacetStride() const │ │ │ │ │ +Return the number of elements between each facet. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ +bool IsUniform() const │ │ │ │ │ +Return if the pattern is uniform. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_C_o_o_r_d_s │ │ │ │ │ +int GetNumCoords() const │ │ │ │ │ +Return the number of coordinates in the entire pattern. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_C_o_o_r_d_s │ │ │ │ │ +int GetCoords(REAL coordTuples[]) const │ │ │ │ │ +Retrieve the coordinates for the entire pattern. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ +void TransformFacetCoordIndices(int facetTuples[], int commonOffset) │ │ │ │ │ +Apply a common offset to all facet coordinate indices. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +Tessellation(Parameterization const &p, int numRates, int const rates[], │ │ │ │ │ +Options const &options=Options()) │ │ │ │ │ +General constructor providing multiple tessellation rates for a non-uniform │ │ │ │ │ +tessellation. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_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 _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_r_a_n_s_f_o_r_m_F_a_c_e_t_C_o_o_r_d_I_n_d_i_c_e_s │ │ │ │ │ +void TransformFacetCoordIndices(int facetTuples[], int const boundaryIndices[], │ │ │ │ │ +int interiorOffset) │ │ │ │ │ +Reassign indices of boundary coordinates while offseting those of interior │ │ │ │ │ +coordinates. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ +int GetFacetSize() const │ │ │ │ │ +Return the number of indices assigned to each facet. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_2_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +Tessellation()=delete │ │ │ │ │ +Default construction is unavailable. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +Tessellation(Parameterization const &p, int uniformRate, Options const │ │ │ │ │ +&options=Options()) │ │ │ │ │ +Simple constructor providing a single uniform tessellation rate. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_F_a_c_e_t_s │ │ │ │ │ +int GetFacets(int facetTuples[]) const │ │ │ │ │ +Retrieve the facet indices for the entire pattern. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_F_a_c_e_t_s │ │ │ │ │ +int GetNumFacets() const │ │ │ │ │ +Return the number of facets in the entire pattern. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_N_u_m_I_n_t_e_r_i_o_r_C_o_o_r_d_s │ │ │ │ │ +int GetNumInteriorCoords() const │ │ │ │ │ +Return the number of interior coordinates. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_V_e_r_t_e_x_C_o_o_r_d │ │ │ │ │ +int GetVertexCoord(int vertex, REAL coordTuples[]) const │ │ │ │ │ +Retrieve the coordinate for a given vertex of the face. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_B_o_u_n_d_a_r_y_C_o_o_r_d_s │ │ │ │ │ +int GetBoundaryCoords(REAL coordTuples[]) const │ │ │ │ │ +Retrieve the coordinates for the boundary. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_T_e_s_s_e_l_l_a_t_i_o_n │ │ │ │ │ +Tessellation(Tessellation 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_R_a_t_e_s │ │ │ │ │ +int GetRates(int rates[]) const │ │ │ │ │ +Retrieve the rates assigned. │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_I_s_V_a_l_i_d │ │ │ │ │ +bool IsValid() const │ │ │ │ │ +Return true if correctly initialized. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_1_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +Tessellation & operator=(Tessellation 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_G_e_t_E_d_g_e_C_o_o_r_d_s │ │ │ │ │ +int GetEdgeCoords(int edge, REAL coordTuples[]) const │ │ │ │ │ +Retrieve the coordinates for a given edge of the face (excluding those at its │ │ │ │ │ +end 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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options configure a Tessellation to specify the nature of both its results and │ │ │ │ │ +the structure of the c... │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options() │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ +int GetCoordStride() const │ │ │ │ │ +Return the stride between (u,v) pairs. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ +Options & SetFacetSize(int numIndices) │ │ │ │ │ +Assign the number of indices per facet (must be 3 or 4, default is 3) │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ +int GetFacetStride() const │ │ │ │ │ +Return the stride between facets. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_G_e_t_F_a_c_e_t_S_i_z_e │ │ │ │ │ +int GetFacetSize() const │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_C_o_o_r_d_S_t_r_i_d_e │ │ │ │ │ +Options & SetCoordStride(int stride) │ │ │ │ │ +Assign the stride between (u,v) pairs (default is 2) │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_3_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_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_S_e_t_F_a_c_e_t_S_t_r_i_d_e │ │ │ │ │ +Options & SetFacetStride(int stride) │ │ │ │ │ +Assign the stride between facets (default is facet size) │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._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_:_:_B_f_r_:_:_T_e_s_s_e_l_l_a_t_i_o_n_:_:_O_p_t_i_o_n_s_:_:_P_r_e_s_e_r_v_e_Q_u_a_d_s │ │ │ │ │ +bool PreserveQuads() const │ │ │ │ │ +Return if preservation of quads is set. │ │ │ │ │ +DDeeffiinniittiioonn _t_e_s_s_e_l_l_a_t_i_o_n_._h_:_7_4 │ │ │ │ │ * _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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _t_e_s_s_e_l_l_a_t_i_o_n_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00857.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surface.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    clVertexBuffer.h File Reference
    │ │ │ │ +
    surface.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/opencl.h"
    │ │ │ │ +#include "../bfr/surfaceData.h"
    │ │ │ │ +#include "../bfr/parameterization.h"
    │ │ │ │ +#include "../vtr/array.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  CLVertexBuffer
     Concrete vertex buffer class for OpenCL subdivision. More...
    class  Surface< REAL >
     Encapsulates the limit surface for a face of a mesh. More...
     
    struct  Surface< REAL >::PointDescriptor
     Simple struct defining the size and stride of points in arrays. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +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 │ │ │ │ │ -clVertexBuffer.h File Reference │ │ │ │ │ +surface.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_o_s_d_/_o_p_e_n_c_l_._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" │ │ │ │ │ _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   _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_._._. │ │ │ │ │ +  │ │ │ │ │ +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_:_:_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_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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,4 @@ │ │ │ │ │ var a00857 = [ │ │ │ │ │ - ["CLVertexBuffer", "a01149.html", "a01149"] │ │ │ │ │ + ["Surface< REAL >", "a00933.html", "a00933"], │ │ │ │ │ + ["PointDescriptor", "a00937.html", "a00937"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00857_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surface.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    clVertexBuffer.h
    │ │ │ │ +
    surface.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2013 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    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,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_OSD_CL_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_SURFACE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_SURFACE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include "../osd/opencl.h"
    │ │ │ │ -
    30
    │ │ │ │ -
    31namespace OpenSubdiv {
    │ │ │ │ -
    32namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../bfr/surfaceData.h"
    │ │ │ │ +
    31#include "../bfr/parameterization.h"
    │ │ │ │ +
    32#include "../vtr/array.h"
    │ │ │ │
    33
    │ │ │ │ -
    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
    │ │ │ │ -
    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
    │ │ │ │ +
    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;
    │ │ │ │ +
    73
    │ │ │ │ +
    74public:
    │ │ │ │ +
    76
    │ │ │ │ +
    84
    │ │ │ │ +
    86 bool IsValid() const { return _data.isValid(); }
    │ │ │ │ +
    87
    │ │ │ │ +
    89 void Clear() { _data.reinitialize(); }
    │ │ │ │ +
    90
    │ │ │ │ + │ │ │ │
    93
    │ │ │ │ -
    94} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    95using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    96
    │ │ │ │ -
    97} // end namespace OpenSubdiv
    │ │ │ │ +
    94 Surface(Surface const & src) = default;
    │ │ │ │ +
    95 Surface& operator=(Surface const & src) = default;
    │ │ │ │ +
    96 ~Surface() = default;
    │ │ │ │
    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.
    │ │ │ │ +
    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 void BoundControlPointsFromMesh(REAL const meshPoints[],
    │ │ │ │ +
    165 PointDescriptor const & meshPointDesc,
    │ │ │ │ +
    166 REAL minExtent[],
    │ │ │ │ +
    167 REAL maxExtent[]) const;
    │ │ │ │ +
    169
    │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -clVertexBuffer.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 2013 Pixar │ │ │ │ │ +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: │ │ │ │ │ 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,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_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_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 { │ │ │ │ │ +29 │ │ │ │ │ +30#include "../bfr/surfaceData.h" │ │ │ │ │ +31#include "../bfr/parameterization.h" │ │ │ │ │ +32#include "../vtr/array.h" │ │ │ │ │ 33 │ │ │ │ │ -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 │ │ │ │ │ -_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 │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ -94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -96 │ │ │ │ │ -97} // end namespace OpenSubdiv │ │ │ │ │ +_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 │ │ │ │ │ -99#endif // OPENSUBDIV3_OSD_CL_VERTEX_BUFFER_H │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ +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 */ │ │ │ │ │ _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) │ │ │ │ │ -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_:_:_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_:_:_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_s_d │ │ │ │ │ - * _c_l_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/clPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/limits.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,46 +90,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    clPatchTable.h File Reference
    │ │ │ │ +
    limits.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../osd/opencl.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ -#include <vector>
    │ │ │ │ +#include "../far/types.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  CLPatchTable
     CL patch table. More...
    struct  Limits
     Simple struct with limits related to topology. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +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 │ │ │ │ │ -clPatchTable.h File Reference │ │ │ │ │ +limits.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 │ │ │ │ │ +#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   _C_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  CL patch table. _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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _l_i_m_i_t_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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 = [ │ │ │ │ │ - ["CLPatchTable", "a01145.html", "a01145"] │ │ │ │ │ + ["Limits", "a00917.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00860_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/clPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/limits.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    clPatchTable.h
    │ │ │ │ +
    limits.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,124 +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_OSD_CL_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_LIMITS_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_LIMITS_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../osd/opencl.h"
    │ │ │ │ -
    31#include "../osd/nonCopyable.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
    │ │ │ │ -
    │ │ │ │ -
    52class CLPatchTable : private NonCopyable<CLPatchTable> {
    │ │ │ │ -
    53public:
    │ │ │ │ -
    55 static CLPatchTable *Create(Far::PatchTable const *patchTable,
    │ │ │ │ -
    56 cl_context clContext);
    │ │ │ │ -
    57
    │ │ │ │ -
    58 template <typename DEVICE_CONTEXT>
    │ │ │ │ -
    │ │ │ │ -
    59 static CLPatchTable * Create(Far::PatchTable const *patchTable,
    │ │ │ │ -
    60 DEVICE_CONTEXT context) {
    │ │ │ │ -
    61 return Create(patchTable, context->GetContext());
    │ │ │ │ -
    62 }
    │ │ │ │ -
    │ │ │ │ -
    63
    │ │ │ │ - │ │ │ │ -
    66
    │ │ │ │ -
    68 cl_mem GetPatchArrayBuffer() const { return _patchArrays; }
    │ │ │ │ -
    69
    │ │ │ │ -
    71 cl_mem GetPatchIndexBuffer() const { return _indexBuffer; }
    │ │ │ │ -
    72
    │ │ │ │ -
    74 cl_mem GetPatchParamBuffer() const { return _patchParamBuffer; }
    │ │ │ │ -
    75
    │ │ │ │ - │ │ │ │ -
    78
    │ │ │ │ - │ │ │ │ -
    81
    │ │ │ │ -
    83 int GetNumFVarChannels() const { return (int)_fvarPatchArrays.size(); }
    │ │ │ │ -
    84
    │ │ │ │ -
    86 cl_mem GetFVarPatchArrayBuffer(int fvarChannel = 0) const { return _fvarPatchArrays[fvarChannel]; }
    │ │ │ │ -
    87
    │ │ │ │ -
    89 cl_mem GetFVarPatchIndexBuffer(int fvarChannel = 0) const { return _fvarIndexBuffers[fvarChannel]; }
    │ │ │ │ -
    90
    │ │ │ │ -
    92 cl_mem GetFVarPatchParamBuffer(int fvarChannel = 0) const { return _fvarParamBuffers[fvarChannel]; }
    │ │ │ │ -
    93
    │ │ │ │ -
    94protected:
    │ │ │ │ - │ │ │ │ -
    96
    │ │ │ │ -
    97 bool allocate(Far::PatchTable const *patchTable, cl_context clContext);
    │ │ │ │ -
    98
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    102
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    105
    │ │ │ │ -
    106 std::vector<cl_mem> _fvarPatchArrays;
    │ │ │ │ -
    107 std::vector<cl_mem> _fvarIndexBuffers;
    │ │ │ │ -
    108 std::vector<cl_mem> _fvarParamBuffers;
    │ │ │ │ -
    109
    │ │ │ │ -
    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_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.
    │ │ │ │ - │ │ │ │ -
    cl_mem GetFVarPatchArrayBuffer(int fvarChannel=0) const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │ -
    cl_mem GetPatchArrayBuffer() const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │ -
    static CLPatchTable * Create(Far::PatchTable const *patchTable, cl_context clContext)
    Creator. Returns NULL if error.
    │ │ │ │ - │ │ │ │ -
    cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const
    Returns the CL memory of the face-varying control vertices.
    │ │ │ │ - │ │ │ │ -
    cl_mem GetVaryingPatchIndexBuffer() const
    Returns the CL memory of the varying control vertices.
    │ │ │ │ -
    int GetNumFVarChannels() const
    Returns the number of face-varying channel buffers.
    │ │ │ │ -
    cl_mem GetPatchIndexBuffer() const
    Returns the CL memory of the patch control vertices.
    │ │ │ │ -
    static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT context)
    │ │ │ │ -
    cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const
    Returns the CL memory of the array of Osd::PatchParam buffer.
    │ │ │ │ - │ │ │ │ -
    bool allocate(Far::PatchTable const *patchTable, cl_context clContext)
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    cl_mem GetVaryingPatchArrayBuffer() const
    Returns the CL memory of the array of Osd::PatchArray buffer.
    │ │ │ │ +
    30#include "../far/types.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    34
    │ │ │ │ +
    │ │ │ │ +
    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
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -clPatchTable.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 2015 Pixar │ │ │ │ │ +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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,174 +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_OSD_CL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CL_PATCH_TABLE_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_LIMITS_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../osd/opencl.h" │ │ │ │ │ -31#include "../osd/nonCopyable.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 │ │ │ │ │ -_5_2class _C_L_P_a_t_c_h_T_a_b_l_e : private NonCopyable { │ │ │ │ │ -53public: │ │ │ │ │ -_5_5 static _C_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 *patchTable, │ │ │ │ │ -56 cl_context clContext); │ │ │ │ │ -57 │ │ │ │ │ -58 template │ │ │ │ │ -_5_9 static _C_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 *patchTable, │ │ │ │ │ -60 DEVICE_CONTEXT context) { │ │ │ │ │ -61 return _C_r_e_a_t_e(patchTable, context->GetContext()); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_5 _~_C_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -66 │ │ │ │ │ -_6_8 cl_mem _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; } │ │ │ │ │ -69 │ │ │ │ │ -_7_1 cl_mem _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; } │ │ │ │ │ -72 │ │ │ │ │ -_7_4 cl_mem _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; } │ │ │ │ │ -75 │ │ │ │ │ -_7_7 cl_mem _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 { return ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; } │ │ │ │ │ -78 │ │ │ │ │ -_8_0 cl_mem _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_I_n_d_e_x_B_u_f_f_e_r; } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 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(); } │ │ │ │ │ -84 │ │ │ │ │ -_8_6 cl_mem _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 { return │ │ │ │ │ -___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s[fvarChannel]; } │ │ │ │ │ -87 │ │ │ │ │ -_8_9 cl_mem _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]; } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 cl_mem _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]; } │ │ │ │ │ -93 │ │ │ │ │ -94protected: │ │ │ │ │ -_9_5 _C_L_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ -96 │ │ │ │ │ -_9_7 bool _a_l_l_o_c_a_t_e(_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e const *patchTable, cl_context clContext); │ │ │ │ │ -98 │ │ │ │ │ -_9_9 cl_mem ___p_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_0 cl_mem ___i_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -_1_0_1 cl_mem ___p_a_t_c_h_P_a_r_a_m_B_u_f_f_e_r; │ │ │ │ │ -102 │ │ │ │ │ -_1_0_3 cl_mem ___v_a_r_y_i_n_g_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_4 cl_mem ___v_a_r_y_i_n_g_I_n_d_e_x_B_u_f_f_e_r; │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 std::vector ___f_v_a_r_P_a_t_c_h_A_r_r_a_y_s; │ │ │ │ │ -_1_0_7 std::vector ___f_v_a_r_I_n_d_e_x_B_u_f_f_e_r_s; │ │ │ │ │ -_1_0_8 std::vector ___f_v_a_r_P_a_r_a_m_B_u_f_f_e_r_s; │ │ │ │ │ -109 │ │ │ │ │ -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_CL_PATCH_TABLE_H │ │ │ │ │ +30#include "../far/types.h" │ │ │ │ │ +31 │ │ │ │ │ +_3_2namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +_3_3namespace OPENSUBDIV_VERSION { │ │ │ │ │ +34 │ │ │ │ │ +_3_5namespace 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 */ │ │ │ │ │ _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_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -CL patch table. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_:_:_C_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< cl_mem > _fvarPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_L_P_a_t_c_h_T_a_b_l_e_:_:_~_C_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~CLPatchTable() │ │ │ │ │ -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_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 │ │ │ │ │ -cl_mem _patchParamBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_O_s_d_:_:_C_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 │ │ │ │ │ -cl_mem GetPatchParamBuffer() const │ │ │ │ │ -Returns the CL memory of the array of Osd::PatchParam buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:___i_n_d_e_x_B_u_f_f_e_r │ │ │ │ │ -cl_mem _indexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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_B_u_f_f_e_r │ │ │ │ │ -cl_mem GetFVarPatchArrayBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_L_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 │ │ │ │ │ -cl_mem GetPatchArrayBuffer() const │ │ │ │ │ -Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLPatchTable * Create(Far::PatchTable const *patchTable, 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_P_a_t_c_h_T_a_b_l_e_:_:___p_a_t_c_h_A_r_r_a_y_s │ │ │ │ │ -cl_mem _patchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_e_._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_:_:_C_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 │ │ │ │ │ -cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the CL memory of the face-varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_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_:_:_O_s_d_:_:_C_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 │ │ │ │ │ -cl_mem _varyingIndexBuffer │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem GetVaryingPatchIndexBuffer() const │ │ │ │ │ -Returns the CL memory of the varying control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_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 _c_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_:_:_C_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 │ │ │ │ │ -cl_mem GetPatchIndexBuffer() const │ │ │ │ │ -Returns the CL memory of the patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_r_e_a_t_e │ │ │ │ │ -static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT │ │ │ │ │ -context) │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const │ │ │ │ │ -Returns the CL memory of the array of Osd::PatchParam buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_:_:_O_s_d_:_:_C_L_P_a_t_c_h_T_a_b_l_e_:_:_C_L_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -CLPatchTable() │ │ │ │ │ -_O_p_e_n_S_u_b_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_P_a_t_c_h_T_a_b_l_e_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(Far::PatchTable const *patchTable, 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_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< cl_mem > _fvarParamBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_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< cl_mem > _fvarIndexBuffers │ │ │ │ │ -DDeeffiinniittiioonn _c_l_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_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 │ │ │ │ │ -cl_mem _varyingPatchArrays │ │ │ │ │ -DDeeffiinniittiioonn _c_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_:_:_C_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_B_u_f_f_e_r │ │ │ │ │ -cl_mem GetVaryingPatchArrayBuffer() const │ │ │ │ │ -Returns the CL memory of the array of Osd::PatchArray buffer. │ │ │ │ │ -DDeeffiinniittiioonn _c_l_P_a_t_c_h_T_a_b_l_e_._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_:_:_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_s_d │ │ │ │ │ - * _c_l_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _l_i_m_i_t_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/stencilTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyDescriptor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,51 +90,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    stencilTable.h File Reference
    │ │ │ │ +
    topologyDescriptor.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/types.h"
    │ │ │ │ +#include "../far/topologyRefiner.h"
    │ │ │ │ +#include "../far/topologyRefinerFactory.h"
    │ │ │ │ +#include "../far/error.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...
    struct  TopologyDescriptor
     A simple reference to raw topology data for use with TopologyRefinerFactory. 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...
    struct  TopologyDescriptor::FVarChannel
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -143,13 +123,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,51 +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 │ │ │ │ │ -stencilTable.h File Reference │ │ │ │ │ +topologyDescriptor.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_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_/_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 │ │ │ │ │ -#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_._._. │ │ │ │ │ +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 │ │ │ │ │ -  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_._._. │ │ │ │ │ +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_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00863.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,10 +1,4 @@ │ │ │ │ │ var a00863 = [ │ │ │ │ │ - ["StencilReal< REAL >", "a01045.html", "a01045"], │ │ │ │ │ - ["Stencil", "a01049.html", "a01049"], │ │ │ │ │ - ["StencilTableReal< REAL >", "a01053.html", "a01053"], │ │ │ │ │ - ["StencilTable", "a01057.html", "a01057"], │ │ │ │ │ - ["LimitStencilReal< REAL >", "a01061.html", "a01061"], │ │ │ │ │ - ["LimitStencil", "a01065.html", "a01065"], │ │ │ │ │ - ["LimitStencilTableReal< REAL >", "a01069.html", "a01069"], │ │ │ │ │ - ["LimitStencilTable", "a01073.html", "a01073"] │ │ │ │ │ + ["TopologyDescriptor", "a01097.html", "a01097"], │ │ │ │ │ + ["FVarChannel", "a01101.html", "a01101"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00863_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/stencilTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    stencilTable.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,893 +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_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 {
    │ │ │ │ +
    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
    │ │ │ │ -
    40namespace Far {
    │ │ │ │ -
    41
    │ │ │ │ -
    42// Forward declarations for friends:
    │ │ │ │ -
    43class PatchTableBuilder;
    │ │ │ │ -
    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) { }
    │ │ │ │ -
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    50
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    53
    │ │ │ │ +
    54 int const * numVertsPerFace;
    │ │ │ │ + │ │ │ │ +
    56
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    59 float const * creaseWeights;
    │ │ │ │ +
    60
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    63 float const * cornerWeights;
    │ │ │ │ +
    64
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    67
    │ │ │ │ + │ │ │ │
    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 }
    │ │ │ │ +
    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
    │ │ │ │ -
    │ │ │ │ -
    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>;
    │ │ │ │ +
    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
    │ │ │ │ -
    109 int * _size;
    │ │ │ │ - │ │ │ │ -
    111 REAL * _weights;
    │ │ │ │ -
    112};
    │ │ │ │ -
    │ │ │ │ +
    109template <>
    │ │ │ │ +
    110bool
    │ │ │ │ + │ │ │ │ +
    112 TopologyRefiner & refiner, TopologyDescriptor const & desc);
    │ │ │ │
    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};
    │ │ │ │ -
    │ │ │ │ +
    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
    │ │ │ │ -
    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
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ +
    127#endif /* OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H */
    │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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)
    │ │ │ │ - │ │ │ │ +
    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 │ │ │ │ │ -stencilTable.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,991 +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_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 { │ │ │ │ │ +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 │ │ │ │ │ -40namespace Far { │ │ │ │ │ -41 │ │ │ │ │ -42// Forward declarations for friends: │ │ │ │ │ -43class PatchTableBuilder; │ │ │ │ │ -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) { } │ │ │ │ │ +_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 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 │ │ │ │ │ -_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 } │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -_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}; │ │ │ │ │ +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_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}; │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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_:_:_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_:_:_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_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/topologyDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/primvarRefiner.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,31 +90,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    topologyDescriptor.h File Reference
    │ │ │ │ +
    primvarRefiner.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/topologyRefiner.h"
    │ │ │ │ -#include "../far/topologyRefinerFactory.h"
    │ │ │ │ -#include "../far/error.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>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    struct  TopologyDescriptor
     A simple reference to raw topology data for use with TopologyRefinerFactory. More...
    class  PrimvarRefinerReal< REAL >
     Applies refinement operations to generic primvar data. More...
     
    struct  TopologyDescriptor::FVarChannel
    class  PrimvarRefiner
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,13 +135,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +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 │ │ │ │ │ -topologyDescriptor.h File Reference │ │ │ │ │ +primvarRefiner.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 "_._._/_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 │ │ │ │ │ _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   _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_._._. │ │ │ │ │   │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ - * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00866.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00866 = [ │ │ │ │ │ - ["TopologyDescriptor", "a01097.html", "a01097"], │ │ │ │ │ - ["FVarChannel", "a01101.html", "a01101"] │ │ │ │ │ + ["PrimvarRefinerReal< REAL >", "a01021.html", "a01021"], │ │ │ │ │ + ["PrimvarRefiner", "a01029.html", "a01029"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00866_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/primvarRefiner.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    topologyDescriptor.h
    │ │ │ │ +
    primvarRefiner.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,146 +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#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
    │ │ │ │ -
    25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H
    │ │ │ │ +
    25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_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
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ -
    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 */
    │ │ │ │ - │ │ │ │ +
    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 {
    │ │ │ │ +
    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
    │ │ │ │ +
    │ │ │ │ +
    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
    │ │ │ │ │ │ │ │ -
    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.
    │ │ │ │ + │ │ │ │ +
    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 │ │ │ │ │ -topologyDescriptor.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 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,208 +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#ifndef OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_TOPOLOGY_DESCRIPTOR_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_PRIMVAR_REFINER_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_PRIMVAR_REFINER_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 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 │ │ │ │ │ -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 */ │ │ │ │ │ +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 { │ │ │ │ │ +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 │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_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_:_:_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 │ │ │ │ │ - * _t_o_p_o_l_o_g_y_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _p_r_i_m_v_a_r_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/patchDescriptor.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/ptexIndices.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,50 +89,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
    │ │ │ │ -
    patchDescriptor.h File Reference
    │ │ │ │ +Namespaces
    │ │ │ │ +
    ptexIndices.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include "../far/topologyRefiner.h"
    │ │ │ │ #include "../far/types.h"
    │ │ │ │ -#include "../sdc/types.h"
    │ │ │ │ #include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PatchDescriptor
     Describes the type of a patch. More...
    class  PtexIndices
     Object used to compute and query ptex face indices. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

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

    │ │ │ │ -Typedefs

    typedef Vtr::ConstArray< PatchDescriptorConstPatchDescriptorArray
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +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 | _T_y_p_e_d_e_f_s │ │ │ │ │ -patchDescriptor.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +ptexIndices.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 "_._._/_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   _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -  Describes the type of a patch. _M_o_r_e_._._. │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y< _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r >  _C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y │ │ │ │ │ -  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00869.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ │ var a00869 = [ │ │ │ │ │ - ["PatchDescriptor", "a00973.html", "a00973"], │ │ │ │ │ - ["ConstPatchDescriptorArray", "a00869.html#ad258c2d8f7871bc0d40cf3a9ded6e08a", null] │ │ │ │ │ + ["PtexIndices", "a01033.html", "a01033"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00869_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchDescriptor.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/ptexIndices.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    patchDescriptor.h
    │ │ │ │ +
    ptexIndices.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
    │ │ │ │ @@ -118,227 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ +
    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"
    │ │ │ │
    30#include "../far/types.h"
    │ │ │ │ -
    31#include "../sdc/types.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33#include <vector>
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace Far {
    │ │ │ │ -
    39
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    45
    │ │ │ │ -
    46public:
    │ │ │ │ +
    31
    │ │ │ │ +
    32#include <vector>
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace Far {
    │ │ │ │ +
    38
    │ │ │ │ +
    │ │ │ │ + │ │ │ │
    47
    │ │ │ │ -
    │ │ │ │ -
    48 enum Type {
    │ │ │ │ - │ │ │ │ -
    50
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    53
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    56
    │ │ │ │ - │ │ │ │ -
    58
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    64 };
    │ │ │ │ -
    │ │ │ │ -
    65
    │ │ │ │ -
    66public:
    │ │ │ │ -
    67
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    70 _type(NON_PATCH) { }
    │ │ │ │ -
    │ │ │ │ -
    71
    │ │ │ │ -
    │ │ │ │ -
    73 PatchDescriptor(int type) :
    │ │ │ │ -
    74 _type(type) { }
    │ │ │ │ -
    │ │ │ │ -
    75
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    78 _type(d.GetType()) { }
    │ │ │ │ -
    │ │ │ │ -
    79
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    82 _type = d.GetType();
    │ │ │ │ -
    83 return *this;
    │ │ │ │ -
    84 }
    │ │ │ │ -
    │ │ │ │ -
    85
    │ │ │ │ -
    │ │ │ │ -
    87 Type GetType() const {
    │ │ │ │ -
    88 return (Type)_type;
    │ │ │ │ -
    89 }
    │ │ │ │ -
    │ │ │ │ -
    90
    │ │ │ │ -
    │ │ │ │ -
    92 static inline bool IsAdaptive(Type type) {
    │ │ │ │ -
    93 return type > TRIANGLES;
    │ │ │ │ -
    94 }
    │ │ │ │ -
    │ │ │ │ +
    48public:
    │ │ │ │ +
    49
    │ │ │ │ + │ │ │ │ +
    52
    │ │ │ │ + │ │ │ │ +
    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:
    │ │ │ │ +
    91
    │ │ │ │ +
    92 void initializePtexIndices(TopologyRefiner const &refiner);
    │ │ │ │ +
    93
    │ │ │ │ +
    94private:
    │ │ │ │
    95
    │ │ │ │ -
    │ │ │ │ -
    97 bool IsAdaptive() const {
    │ │ │ │ -
    98 return IsAdaptive( this->GetType() );
    │ │ │ │ -
    99 }
    │ │ │ │ -
    │ │ │ │ -
    100
    │ │ │ │ -
    103 static inline short GetNumControlVertices( Type t );
    │ │ │ │ -
    104
    │ │ │ │ -
    106 static inline short GetNumFVarControlVertices( Type t );
    │ │ │ │ -
    107
    │ │ │ │ -
    │ │ │ │ -
    110 short GetNumControlVertices() const {
    │ │ │ │ -
    111 return GetNumControlVertices( this->GetType() );
    │ │ │ │ -
    112 }
    │ │ │ │ -
    │ │ │ │ -
    113
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    116 return GetNumFVarControlVertices( this->GetType() );
    │ │ │ │ -
    117 }
    │ │ │ │ -
    │ │ │ │ -
    118
    │ │ │ │ -
    120 static short GetRegularPatchSize() { return 16; }
    │ │ │ │ -
    121
    │ │ │ │ -
    123 static short GetGregoryPatchSize() { return 4; }
    │ │ │ │ -
    124
    │ │ │ │ -
    126 static short GetGregoryBasisPatchSize() { return 20; }
    │ │ │ │ -
    127
    │ │ │ │ -
    128
    │ │ │ │ - │ │ │ │ -
    132
    │ │ │ │ -
    134 inline bool operator < ( PatchDescriptor const other ) const;
    │ │ │ │ -
    135
    │ │ │ │ -
    137 inline bool operator == ( PatchDescriptor const other ) const;
    │ │ │ │ -
    138
    │ │ │ │ -
    139 // debug helper
    │ │ │ │ -
    140 void print() const;
    │ │ │ │ -
    141
    │ │ │ │ -
    142private:
    │ │ │ │ -
    143 unsigned int _type;
    │ │ │ │ -
    144};
    │ │ │ │ -
    │ │ │ │ -
    145
    │ │ │ │ - │ │ │ │ -
    147
    │ │ │ │ -
    148// Returns the number of control vertices expected for a patch of this type
    │ │ │ │ -
    149inline short
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    151 switch (type) {
    │ │ │ │ -
    152 case REGULAR : return GetRegularPatchSize();
    │ │ │ │ -
    153 case LOOP : return 12;
    │ │ │ │ -
    154 case QUADS : return 4;
    │ │ │ │ -
    155 case GREGORY :
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    158 case GREGORY_TRIANGLE : return 18;
    │ │ │ │ -
    159 case TRIANGLES : return 3;
    │ │ │ │ -
    160 case LINES : return 2;
    │ │ │ │ -
    161 case POINTS : return 1;
    │ │ │ │ -
    162 default : return -1;
    │ │ │ │ -
    163 }
    │ │ │ │ -
    164}
    │ │ │ │ -
    │ │ │ │ -
    165
    │ │ │ │ -
    166// Returns the number of face-varying control vertices expected for a patch of this type
    │ │ │ │ -
    167inline short
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    170}
    │ │ │ │ -
    │ │ │ │ -
    171
    │ │ │ │ -
    172// Allows ordering of patches by type
    │ │ │ │ -
    │ │ │ │ -
    173inline bool
    │ │ │ │ - │ │ │ │ -
    175 return (_type < other._type);
    │ │ │ │ -
    176}
    │ │ │ │ -
    │ │ │ │ -
    177
    │ │ │ │ -
    178// True if the descriptors are identical
    │ │ │ │ -
    179inline bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    181 return _type == other._type;
    │ │ │ │ -
    182}
    │ │ │ │ +
    96 std::vector<Index> _ptexIndices;
    │ │ │ │ +
    97};
    │ │ │ │
    │ │ │ │ -
    183
    │ │ │ │ -
    184
    │ │ │ │ -
    185
    │ │ │ │ -
    186} // end namespace Far
    │ │ │ │ -
    187
    │ │ │ │ -
    188} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    189using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    190
    │ │ │ │ -
    191} // end namespace OpenSubdiv
    │ │ │ │ -
    192
    │ │ │ │ -
    193#endif /* OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H */
    │ │ │ │ - │ │ │ │ -
    Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray
    │ │ │ │ -
    SchemeType
    Enumerated type for all subdivision schemes supported by OpenSubdiv.
    Definition types.h:37
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    @ LOOP
    regular triangular patch for the Loop scheme
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    @ REGULAR
    regular B-Spline patch for the Catmark scheme
    │ │ │ │ -
    bool IsAdaptive() const
    Returns true if the type is an adaptive patch.
    │ │ │ │ -
    Type GetType() const
    Returns the type of the patch.
    │ │ │ │ -
    static short GetGregoryBasisPatchSize()
    Number of control vertices of Gregory patch basis (20)
    │ │ │ │ -
    short GetNumControlVertices() const
    Returns the number of control vertices expected for a patch of the type described.
    │ │ │ │ -
    PatchDescriptor(PatchDescriptor const &d)
    Copy Constructor.
    │ │ │ │ -
    bool operator==(PatchDescriptor const other) const
    True if the descriptors are identical.
    │ │ │ │ -
    static short GetRegularPatchSize()
    Number of control vertices of Regular Patches in table.
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    PatchDescriptor & operator=(PatchDescriptor const &d)
    Assignment operator.
    │ │ │ │ -
    static bool IsAdaptive(Type type)
    Returns true if the type is an adaptive (non-linear) patch.
    │ │ │ │ -
    bool operator<(PatchDescriptor const other) const
    Allows ordering of patches by type.
    │ │ │ │ -
    static short GetGregoryPatchSize()
    Number of control vertices of Gregory (and Gregory Boundary) Patches in table.
    │ │ │ │ - │ │ │ │ -
    static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc::SchemeType type)
    Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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 */
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    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.
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -patchDescriptor.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 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 │ │ │ │ │ @@ -23,281 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ +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" │ │ │ │ │ 30#include "../far/types.h" │ │ │ │ │ -31#include "../sdc/types.h" │ │ │ │ │ -32 │ │ │ │ │ -33#include │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Far { │ │ │ │ │ -39 │ │ │ │ │ -_4_4class _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ -45 │ │ │ │ │ -46public: │ │ │ │ │ +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 │ │ │ │ │ -_4_8 enum _T_y_p_e { │ │ │ │ │ -_4_9 _N_O_N___P_A_T_C_H = 0, │ │ │ │ │ -50 │ │ │ │ │ -_5_1 _P_O_I_N_T_S, │ │ │ │ │ -_5_2 _L_I_N_E_S, │ │ │ │ │ -53 │ │ │ │ │ -_5_4 _Q_U_A_D_S, │ │ │ │ │ -_5_5 _T_R_I_A_N_G_L_E_S, │ │ │ │ │ -56 │ │ │ │ │ -_5_7 _L_O_O_P, │ │ │ │ │ -58 │ │ │ │ │ -_5_9 _R_E_G_U_L_A_R, │ │ │ │ │ -_6_0 _G_R_E_G_O_R_Y, │ │ │ │ │ -_6_1 _G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y, │ │ │ │ │ -_6_2 _G_R_E_G_O_R_Y___B_A_S_I_S, │ │ │ │ │ -63 _G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E │ │ │ │ │ -_6_4 }; │ │ │ │ │ -65 │ │ │ │ │ -66public: │ │ │ │ │ -67 │ │ │ │ │ -_6_9 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r() : │ │ │ │ │ -70 _type(_N_O_N___P_A_T_C_H) { } │ │ │ │ │ -71 │ │ │ │ │ -_7_3 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(int type) : │ │ │ │ │ -74 _type(type) { } │ │ │ │ │ -75 │ │ │ │ │ -_7_7 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const & d ) : │ │ │ │ │ -78 _type(d._G_e_t_T_y_p_e()) { } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r & _o_p_e_r_a_t_o_r_=( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const & d ) { │ │ │ │ │ -82 _type = d._G_e_t_T_y_p_e(); │ │ │ │ │ -83 return *this; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -_8_7 _T_y_p_e _G_e_t_T_y_p_e() const { │ │ │ │ │ -88 return (_T_y_p_e)_type; │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 static inline bool _I_s_A_d_a_p_t_i_v_e(_T_y_p_e type) { │ │ │ │ │ -93 return type > _T_R_I_A_N_G_L_E_S; │ │ │ │ │ -94 } │ │ │ │ │ +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(); │ │ │ │ │ +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: │ │ │ │ │ +91 │ │ │ │ │ +92 void initializePtexIndices(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const &refiner); │ │ │ │ │ +93 │ │ │ │ │ +94private: │ │ │ │ │ 95 │ │ │ │ │ -_9_7 bool _I_s_A_d_a_p_t_i_v_e() const { │ │ │ │ │ -98 return _I_s_A_d_a_p_t_i_v_e( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -103 static inline short _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e t ); │ │ │ │ │ -104 │ │ │ │ │ -106 static inline short _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e t ); │ │ │ │ │ -107 │ │ │ │ │ -_1_1_0 short _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ -111 return _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -_1_1_5 short _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ -116 return _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -_1_2_0 static short _G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e() { return 16; } │ │ │ │ │ -121 │ │ │ │ │ -_1_2_3 static short _G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e() { return 4; } │ │ │ │ │ -124 │ │ │ │ │ -_1_2_6 static short _G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e() { return 20; } │ │ │ │ │ -127 │ │ │ │ │ -128 │ │ │ │ │ -_1_3_1 static _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_> _G_e_t_A_d_a_p_t_i_v_e_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_s(_S_d_c_:_: │ │ │ │ │ -_S_c_h_e_m_e_T_y_p_e type); │ │ │ │ │ -132 │ │ │ │ │ -134 inline bool _o_p_e_r_a_t_o_r_ _<_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const; │ │ │ │ │ -135 │ │ │ │ │ -137 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const; │ │ │ │ │ -138 │ │ │ │ │ -139 // debug helper │ │ │ │ │ -_1_4_0 void _p_r_i_n_t() const; │ │ │ │ │ -141 │ │ │ │ │ -142private: │ │ │ │ │ -143 unsigned int _type; │ │ │ │ │ -144}; │ │ │ │ │ -145 │ │ │ │ │ -_1_4_6typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_> _C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y; │ │ │ │ │ -147 │ │ │ │ │ -148// Returns the number of control vertices expected for a patch of this type │ │ │ │ │ -149inline short │ │ │ │ │ -_1_5_0_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e type ) { │ │ │ │ │ -151 switch (type) { │ │ │ │ │ -152 case _R_E_G_U_L_A_R : return _G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ -153 case _L_O_O_P : return 12; │ │ │ │ │ -154 case _Q_U_A_D_S : return 4; │ │ │ │ │ -155 case _G_R_E_G_O_R_Y : │ │ │ │ │ -156 case _G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y : return _G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ -157 case _G_R_E_G_O_R_Y___B_A_S_I_S : return _G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ -158 case _G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E : return 18; │ │ │ │ │ -159 case _T_R_I_A_N_G_L_E_S : return 3; │ │ │ │ │ -160 case _L_I_N_E_S : return 2; │ │ │ │ │ -161 case _P_O_I_N_T_S : return 1; │ │ │ │ │ -162 default : return -1; │ │ │ │ │ -163 } │ │ │ │ │ -164} │ │ │ │ │ -165 │ │ │ │ │ -166// Returns the number of face-varying control vertices expected for a patch │ │ │ │ │ -of this type │ │ │ │ │ -167inline short │ │ │ │ │ -_1_6_8_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e type ) { │ │ │ │ │ -169 return _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(type); │ │ │ │ │ -170} │ │ │ │ │ -171 │ │ │ │ │ -172// Allows ordering of patches by type │ │ │ │ │ -_1_7_3inline bool │ │ │ │ │ -174_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_ _<_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const { │ │ │ │ │ -175 return (_type < other._type); │ │ │ │ │ -176} │ │ │ │ │ -177 │ │ │ │ │ -178// True if the descriptors are identical │ │ │ │ │ -179inline bool │ │ │ │ │ -_1_8_0_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_ _=_=_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const { │ │ │ │ │ -181 return _type == other._type; │ │ │ │ │ -182} │ │ │ │ │ -183 │ │ │ │ │ -184 │ │ │ │ │ -185 │ │ │ │ │ -186} // end namespace Far │ │ │ │ │ -187 │ │ │ │ │ -188} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -189using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -190 │ │ │ │ │ -191} // end namespace OpenSubdiv │ │ │ │ │ -192 │ │ │ │ │ -193#endif /* OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H */ │ │ │ │ │ +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_:_:_C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y │ │ │ │ │ -Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_1_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_:_:_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -Describes the type of a patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_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_:_:_L_I_N_E_S │ │ │ │ │ -@ LINES │ │ │ │ │ -lines (useful for cage drawing) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_Q_U_A_D_S │ │ │ │ │ -@ QUADS │ │ │ │ │ -4-sided quadrilateral (bilinear) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_N_O_N___P_A_T_C_H │ │ │ │ │ -@ NON_PATCH │ │ │ │ │ -undefined │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_L_O_O_P │ │ │ │ │ -@ LOOP │ │ │ │ │ -regular triangular patch for the Loop scheme │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E │ │ │ │ │ -@ GREGORY_TRIANGLE │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_R_I_A_N_G_L_E_S │ │ │ │ │ -@ TRIANGLES │ │ │ │ │ -3-sided triangle │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_A_S_I_S │ │ │ │ │ -@ GREGORY_BASIS │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_O_I_N_T_S │ │ │ │ │ -@ POINTS │ │ │ │ │ -points (useful for cage drawing) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y │ │ │ │ │ -@ GREGORY │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_R_E_G_U_L_A_R │ │ │ │ │ -@ REGULAR │ │ │ │ │ -regular B-Spline patch for the Catmark scheme │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_I_s_A_d_a_p_t_i_v_e │ │ │ │ │ -bool IsAdaptive() const │ │ │ │ │ -Returns true if the type is an adaptive patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_T_y_p_e │ │ │ │ │ -Type GetType() const │ │ │ │ │ -Returns the type of the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e │ │ │ │ │ -static short GetGregoryBasisPatchSize() │ │ │ │ │ -Number of control vertices of Gregory patch basis (20) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -short GetNumControlVertices() const │ │ │ │ │ -Returns the number of control vertices expected for a patch of the type │ │ │ │ │ -described. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor(PatchDescriptor const &d) │ │ │ │ │ -Copy Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(PatchDescriptor const other) const │ │ │ │ │ -True if the descriptors are identical. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e │ │ │ │ │ -static short GetRegularPatchSize() │ │ │ │ │ -Number of control vertices of Regular Patches in table. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -short GetNumFVarControlVertices() const │ │ │ │ │ -Deprecated. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor(int 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_:_:_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) │ │ │ │ │ Constructor. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -PatchDescriptor & operator=(PatchDescriptor const &d) │ │ │ │ │ -Assignment operator. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_I_s_A_d_a_p_t_i_v_e │ │ │ │ │ -static bool IsAdaptive(Type type) │ │ │ │ │ -Returns true if the type is an adaptive (non-linear) patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ -bool operator<(PatchDescriptor const other) const │ │ │ │ │ -Allows ordering of patches by type. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e │ │ │ │ │ -static short GetGregoryPatchSize() │ │ │ │ │ -Number of control vertices of Gregory (and Gregory Boundary) Patches in table. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ -void print() 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_:_: │ │ │ │ │ -_G_e_t_A_d_a_p_t_i_v_e_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_s │ │ │ │ │ -static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc:: │ │ │ │ │ -SchemeType type) │ │ │ │ │ -Returns a vector of all the legal patch descriptors for the given adaptive │ │ │ │ │ -subdivision scheme. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ + * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/stencilTableFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/patchTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,43 +90,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    stencilTableFactory.h File Reference
    │ │ │ │ +
    patchTable.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ +#include "../far/patchDescriptor.h"
    │ │ │ │ +#include "../far/patchParam.h"
    │ │ │ │ +#include "../far/stencilTable.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │ #include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  StencilTableFactoryReal< REAL >
     A specialized factory for StencilTable. More...
    class  PatchTable
     Container for arrays of parametric patches. 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...
    class  PatchTable::PatchHandle
     Handle that can be used as unique patch identifier within PatchTable. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -135,13 +125,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,43 +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 │ │ │ │ │ -stencilTableFactory.h File Reference │ │ │ │ │ +patchTable.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_f_a_r_/_p_a_t_c_h_T_a_b_l_e_._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_/_s_t_e_n_c_i_l_T_a_b_l_e_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_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   _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_._._. │ │ │ │ │ +class   _P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +  Container for arrays of parametric patches. _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_._._. │ │ │ │ │ +class   _P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ +  Handle that can be used as unique patch identifier within _P_a_t_c_h_T_a_b_l_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 │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _p_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00872.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,9 +1,4 @@ │ │ │ │ │ var a00872 = [ │ │ │ │ │ - ["StencilTableFactoryReal< REAL >", "a01037.html", "a01037"], │ │ │ │ │ - ["Options", "a01077.html", "a01077"], │ │ │ │ │ - ["LimitStencilTableFactoryReal< REAL >", "a01041.html", "a01041"], │ │ │ │ │ - ["Options", "a01081.html", "a01081"], │ │ │ │ │ - ["LocationArray", "a01085.html", "a01085"], │ │ │ │ │ - ["StencilTableFactory", "a01089.html", null], │ │ │ │ │ - ["LimitStencilTableFactory", "a01093.html", null] │ │ │ │ │ + ["PatchTable", "a00993.html", "a00993"], │ │ │ │ │ + ["PatchHandle", "a00997.html", "a00997"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00872_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/stencilTableFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/patchTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    stencilTableFactory.h
    │ │ │ │ +
    patchTable.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,357 +119,747 @@ │ │ │ │
    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
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_PATCH_TABLE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../far/patchTable.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32#include <vector>
    │ │ │ │ +
    30#include "../far/patchDescriptor.h"
    │ │ │ │ +
    31#include "../far/patchParam.h"
    │ │ │ │ +
    32#include "../far/stencilTable.h"
    │ │ │ │
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Far {
    │ │ │ │ -
    38
    │ │ │ │ -
    39class TopologyRefiner;
    │ │ │ │ +
    34#include "../sdc/options.h"
    │ │ │ │ +
    35
    │ │ │ │ +
    36#include <vector>
    │ │ │ │ +
    37
    │ │ │ │ +
    38namespace OpenSubdiv {
    │ │ │ │ +
    39namespace OPENSUBDIV_VERSION {
    │ │ │ │
    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
    │ │ │ │ +
    41namespace Far {
    │ │ │ │ +
    42
    │ │ │ │
    │ │ │ │ -
    55 enum Mode {
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    59 };
    │ │ │ │ -
    │ │ │ │ -
    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 };
    │ │ │ │ -
    │ │ │ │ + │ │ │ │ +
    56
    │ │ │ │ +
    57public:
    │ │ │ │ +
    58
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    61 // XXXX manuelk members will eventually be made private
    │ │ │ │ +
    62 public:
    │ │ │ │ +
    63
    │ │ │ │ +
    64 friend class PatchTable;
    │ │ │ │ +
    65 friend class PatchMap;
    │ │ │ │ +
    66
    │ │ │ │ +
    67 Index arrayIndex, // Array index of the patch
    │ │ │ │ +
    68 patchIndex, // Absolute Index of the patch
    │ │ │ │ +
    69 vertIndex; // Relative offset to the first CV of the patch in array
    │ │ │ │ +
    70 };
    │ │ │ │ +
    │ │ │ │ +
    71
    │ │ │ │ +
    72public:
    │ │ │ │ +
    73
    │ │ │ │ +
    75 PatchTable(PatchTable const & src);
    │ │ │ │ +
    76
    │ │ │ │ + │ │ │ │ +
    79
    │ │ │ │ +
    81 bool IsFeatureAdaptive() const;
    │ │ │ │
    82
    │ │ │ │ - │ │ │ │ -
    95 TopologyRefiner const & refiner, Options options = Options());
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    85 return (int)_patchVerts.size();
    │ │ │ │ +
    86 }
    │ │ │ │ +
    │ │ │ │ +
    87
    │ │ │ │ +
    89 int GetNumPatchesTotal() const;
    │ │ │ │ +
    90
    │ │ │ │ +
    92 int GetMaxValence() const { return _maxValence; }
    │ │ │ │ +
    93
    │ │ │ │ +
    95 int GetNumPtexFaces() const { return _numPtexFaces; }
    │ │ │ │
    96
    │ │ │ │
    97
    │ │ │ │ - │ │ │ │ -
    111 int numTables, StencilTableReal<REAL> const ** tables);
    │ │ │ │ -
    112
    │ │ │ │ -
    113
    │ │ │ │ - │ │ │ │ -
    129 TopologyRefiner const &refiner,
    │ │ │ │ -
    130 StencilTableReal<REAL> const *baseStencilTable,
    │ │ │ │ -
    131 StencilTableReal<REAL> const *localPointStencilTable,
    │ │ │ │ -
    132 bool factorize = true);
    │ │ │ │ +
    99
    │ │ │ │ +
    105
    │ │ │ │ + │ │ │ │ +
    108
    │ │ │ │ + │ │ │ │ +
    111
    │ │ │ │ +
    113 PatchParam GetPatchParam(PatchHandle const & handle) const;
    │ │ │ │ +
    114
    │ │ │ │ +
    116 ConstIndexArray GetPatchVertices(int array, int patch) const;
    │ │ │ │ +
    117
    │ │ │ │ +
    119 PatchParam GetPatchParam(int array, int patch) const;
    │ │ │ │ +
    121
    │ │ │ │ +
    122
    │ │ │ │ +
    124
    │ │ │ │ +
    130
    │ │ │ │ +
    132 int GetNumPatchArrays() const;
    │ │ │ │
    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 };
    │ │ │ │ -
    │ │ │ │ +
    135 int GetNumPatches(int array) const;
    │ │ │ │ +
    136
    │ │ │ │ +
    138 int GetNumControlVertices(int array) const;
    │ │ │ │ +
    139
    │ │ │ │ + │ │ │ │ +
    142
    │ │ │ │ + │ │ │ │ +
    145
    │ │ │ │ +
    147 ConstPatchParamArray const GetPatchParams(int array) const;
    │ │ │ │ +
    149
    │ │ │ │ +
    150
    │ │ │ │ +
    152
    │ │ │ │ +
    159
    │ │ │ │ +
    161 int GetNumLocalPoints() const;
    │ │ │ │ +
    162
    │ │ │ │ + │ │ │ │ +
    165
    │ │ │ │ +
    167 template <typename REAL>
    │ │ │ │ + │ │ │ │ +
    169
    │ │ │ │ +
    172 template <typename REAL> bool LocalPointStencilPrecisionMatchesType() const;
    │ │ │ │ +
    173
    │ │ │ │ +
    186 template <class T> void
    │ │ │ │ +
    187 ComputeLocalPointValues(T const *src, T *dst) const;
    │ │ │ │ +
    188
    │ │ │ │ +
    189
    │ │ │ │ + │ │ │ │ +
    192
    │ │ │ │ + │ │ │ │ +
    195
    │ │ │ │ +
    197 template <typename REAL>
    │ │ │ │ + │ │ │ │ +
    199
    │ │ │ │ +
    202 template <typename REAL> bool LocalPointVaryingStencilPrecisionMatchesType() const;
    │ │ │ │ +
    203
    │ │ │ │ +
    216 template <class T> void
    │ │ │ │ +
    217 ComputeLocalPointValuesVarying(T const *src, T *dst) const;
    │ │ │ │
    218
    │ │ │ │ -
    │ │ │ │ -
    219 struct Options {
    │ │ │ │ -
    220
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    224 fvarChannel(0) { }
    │ │ │ │ -
    │ │ │ │ +
    219
    │ │ │ │ +
    221 int GetNumLocalPointsFaceVarying(int channel = 0) const;
    │ │ │ │ +
    222
    │ │ │ │ +
    224 StencilTable const *GetLocalPointFaceVaryingStencilTable(int channel = 0) const;
    │ │ │ │
    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;
    │ │ │ │ +
    227 template <typename REAL>
    │ │ │ │ + │ │ │ │ +
    229
    │ │ │ │ +
    232 template <typename REAL> bool LocalPointFaceVaryingStencilPrecisionMatchesType() const;
    │ │ │ │ +
    233
    │ │ │ │ +
    248 template <class T> void
    │ │ │ │ +
    249 ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const;
    │ │ │ │ +
    251
    │ │ │ │ +
    252
    │ │ │ │ +
    254
    │ │ │ │ +
    255
    │ │ │ │ + │ │ │ │ +
    260
    │ │ │ │ + │ │ │ │ +
    263
    │ │ │ │ +
    264 typedef std::vector<Index> VertexValenceTable;
    │ │ │ │ +
    265
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    268 return _vertexValenceTable;
    │ │ │ │ +
    269 }
    │ │ │ │ +
    │ │ │ │ +
    271
    │ │ │ │ +
    272
    │ │ │ │ +
    274
    │ │ │ │ +
    280
    │ │ │ │ + │ │ │ │
    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 }
    │ │ │ │ -
    │ │ │ │ +
    287 float GetSingleCreasePatchSharpnessValue(int array, int patch) const;
    │ │ │ │ +
    289
    │ │ │ │ +
    290
    │ │ │ │ +
    292
    │ │ │ │ +
    298
    │ │ │ │ + │ │ │ │ +
    301
    │ │ │ │ + │ │ │ │ +
    304
    │ │ │ │ +
    306 ConstIndexArray GetPatchVaryingVertices(int array, int patch) const;
    │ │ │ │
    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) {
    │ │ │ │ + │ │ │ │ +
    310
    │ │ │ │ + │ │ │ │ +
    314
    │ │ │ │ +
    315
    │ │ │ │ +
    317
    │ │ │ │ +
    323
    │ │ │ │ + │ │ │ │
    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()) {
    │ │ │ │ + │ │ │ │ +
    329
    │ │ │ │ + │ │ │ │ +
    332
    │ │ │ │ + │ │ │ │ +
    335
    │ │ │ │ +
    337 ConstIndexArray GetPatchFVarValues(PatchHandle const & handle, int channel = 0) const;
    │ │ │ │ +
    338
    │ │ │ │ +
    340 ConstIndexArray GetPatchFVarValues(int array, int patch, int channel = 0) const;
    │ │ │ │ +
    341
    │ │ │ │ +
    343 ConstIndexArray GetPatchArrayFVarValues(int array, int channel = 0) const;
    │ │ │ │ +
    344
    │ │ │ │ +
    346 ConstIndexArray GetFVarValues(int channel = 0) const;
    │ │ │ │ +
    347
    │ │ │ │ +
    349 int GetFVarValueStride(int channel = 0) const;
    │ │ │ │ +
    350
    │ │ │ │ +
    352 PatchParam GetPatchFVarPatchParam(PatchHandle const & handle, int channel = 0) const;
    │ │ │ │ +
    353
    │ │ │ │ +
    355 PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const;
    │ │ │ │ +
    356
    │ │ │ │ +
    358 ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel = 0) const;
    │ │ │ │ +
    359
    │ │ │ │ + │ │ │ │ +
    362
    │ │ │ │ + │ │ │ │
    366
    │ │ │ │ -
    367 return static_cast<LimitStencilTable const *>(
    │ │ │ │ - │ │ │ │ -
    369 refiner,
    │ │ │ │ -
    370 locationArrays,
    │ │ │ │ -
    371 static_cast<BaseTable const *>(cvStencils),
    │ │ │ │ -
    372 patchTable,
    │ │ │ │ -
    373 options));
    │ │ │ │ -
    374 }
    │ │ │ │ -
    │ │ │ │ -
    375};
    │ │ │ │ -
    │ │ │ │ +
    367
    │ │ │ │ +
    369
    │ │ │ │ +
    374
    │ │ │ │ +
    375 typedef std::vector<Index> PatchVertsTable;
    │ │ │ │
    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.
    │ │ │ │ +
    378 PatchVertsTable const & GetPatchControlVerticesTable() const { return _patchVerts; }
    │ │ │ │ +
    379
    │ │ │ │ +
    381 PatchParamTable const & GetPatchParamTable() const { return _paramTable; }
    │ │ │ │ +
    382
    │ │ │ │ +
    384 std::vector<Index> const &GetSharpnessIndexTable() const { return _sharpnessIndices; }
    │ │ │ │ +
    385
    │ │ │ │ +
    387 std::vector<float> const &GetSharpnessValues() const { return _sharpnessValues; }
    │ │ │ │ +
    388
    │ │ │ │ +
    389 typedef std::vector<unsigned int> QuadOffsetsTable;
    │ │ │ │ +
    390
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    393 return _quadOffsetsTable;
    │ │ │ │ +
    394 }
    │ │ │ │ +
    │ │ │ │ +
    396
    │ │ │ │ +
    398 void print() const;
    │ │ │ │ +
    399
    │ │ │ │ +
    400public:
    │ │ │ │ +
    401
    │ │ │ │ +
    403
    │ │ │ │ +
    405
    │ │ │ │ +
    428 template <typename REAL>
    │ │ │ │ +
    429 void EvaluateBasis(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ +
    430 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ +
    431 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
    │ │ │ │ +
    432
    │ │ │ │ +
    435 void EvaluateBasis(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    436 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ +
    437 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
    │ │ │ │ +
    438
    │ │ │ │ +
    441 void EvaluateBasis(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    442 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ +
    443 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
    │ │ │ │ +
    444
    │ │ │ │ +
    467 template <typename REAL>
    │ │ │ │ +
    468 void EvaluateBasisVarying(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ +
    469 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ +
    470 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
    │ │ │ │ +
    471
    │ │ │ │ +
    474 void EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    475 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ +
    476 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
    │ │ │ │ +
    477
    │ │ │ │ +
    480 void EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    481 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ +
    482 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
    │ │ │ │ +
    483
    │ │ │ │ +
    508 template <typename REAL>
    │ │ │ │ +
    509 void EvaluateBasisFaceVarying(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ +
    510 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ +
    511 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0,
    │ │ │ │ +
    512 int channel = 0) const;
    │ │ │ │ +
    513
    │ │ │ │ +
    516 void EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    517 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ +
    518 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0,
    │ │ │ │ +
    519 int channel = 0) const;
    │ │ │ │ +
    520
    │ │ │ │ +
    523 void EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    524 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ +
    525 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0,
    │ │ │ │ +
    526 int channel = 0) const;
    │ │ │ │ +
    528
    │ │ │ │ +
    529protected:
    │ │ │ │ +
    530
    │ │ │ │ +
    531 friend class PatchTableBuilder;
    │ │ │ │ +
    532
    │ │ │ │ +
    533 // Factory constructor
    │ │ │ │ +
    534 PatchTable(int maxvalence);
    │ │ │ │ +
    535
    │ │ │ │ +
    536 Index getPatchIndex(int array, int patch) const;
    │ │ │ │ +
    537
    │ │ │ │ + │ │ │ │ +
    539
    │ │ │ │ + │ │ │ │ +
    541 float * getSharpnessValues(Index arrayIndex);
    │ │ │ │ +
    542
    │ │ │ │ +
    543private:
    │ │ │ │ +
    544
    │ │ │ │ +
    545 //
    │ │ │ │ +
    546 // Patch arrays
    │ │ │ │ +
    547 //
    │ │ │ │ +
    548
    │ │ │ │ +
    549 struct PatchArray;
    │ │ │ │ +
    550 typedef std::vector<PatchArray> PatchArrayVector;
    │ │ │ │ +
    551
    │ │ │ │ +
    552 PatchArray & getPatchArray(Index arrayIndex);
    │ │ │ │ +
    553 PatchArray const & getPatchArray(Index arrayIndex) const;
    │ │ │ │ +
    554
    │ │ │ │ +
    555 void reservePatchArrays(int numPatchArrays);
    │ │ │ │ +
    556 void pushPatchArray(PatchDescriptor desc, int npatches,
    │ │ │ │ +
    557 Index * vidx, Index * pidx, Index * qoidx=0);
    │ │ │ │ +
    558
    │ │ │ │ +
    559 IndexArray getPatchArrayVertices(int arrayIndex);
    │ │ │ │ +
    560
    │ │ │ │ +
    561 Index findPatchArray(PatchDescriptor desc);
    │ │ │ │ +
    562
    │ │ │ │ +
    563
    │ │ │ │ +
    564 //
    │ │ │ │ +
    565 // Varying patch arrays
    │ │ │ │ +
    566 //
    │ │ │ │ +
    567 IndexArray getPatchArrayVaryingVertices(int arrayIndex);
    │ │ │ │ +
    568
    │ │ │ │ +
    569 void allocateVaryingVertices(
    │ │ │ │ +
    570 PatchDescriptor desc, int numPatches);
    │ │ │ │ +
    571 void populateVaryingVertices();
    │ │ │ │ +
    572
    │ │ │ │ +
    573 //
    │ │ │ │ +
    574 // Face-varying patch channels
    │ │ │ │ +
    575 //
    │ │ │ │ +
    576
    │ │ │ │ +
    577 struct FVarPatchChannel;
    │ │ │ │ +
    578 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
    │ │ │ │ +
    579
    │ │ │ │ +
    580 FVarPatchChannel & getFVarPatchChannel(int channel);
    │ │ │ │ +
    581 FVarPatchChannel const & getFVarPatchChannel(int channel) const;
    │ │ │ │ +
    582
    │ │ │ │ +
    583 void allocateFVarPatchChannels(int numChannels);
    │ │ │ │ +
    584 void allocateFVarPatchChannelValues(
    │ │ │ │ +
    585 PatchDescriptor regDesc, PatchDescriptor irregDesc,
    │ │ │ │ +
    586 int numPatches, int channel);
    │ │ │ │ +
    587
    │ │ │ │ +
    588 // deprecated
    │ │ │ │ +
    589 void setFVarPatchChannelLinearInterpolation(
    │ │ │ │ +
    590 Sdc::Options::FVarLinearInterpolation interpolation, int channel);
    │ │ │ │ +
    591
    │ │ │ │ +
    592 IndexArray getFVarValues(int channel);
    │ │ │ │ +
    593 ConstIndexArray getPatchFVarValues(int patch, int channel) const;
    │ │ │ │ +
    594
    │ │ │ │ +
    595 PatchParamArray getFVarPatchParams(int channel);
    │ │ │ │ +
    596 PatchParam getPatchFVarPatchParam(int patch, int channel) const;
    │ │ │ │ +
    597
    │ │ │ │ +
    598private:
    │ │ │ │ +
    599 //
    │ │ │ │ +
    600 // Simple private class to hold stencil table pointers of varying precision,
    │ │ │ │ +
    601 // where the discriminant of the precision is external.
    │ │ │ │ +
    602 //
    │ │ │ │ +
    603 // NOTE that this is a simple pointer container and NOT a smart pointer that
    │ │ │ │ +
    604 // manages the ownership of the object referred to by it.
    │ │ │ │ +
    605 //
    │ │ │ │ +
    606 class StencilTablePtr {
    │ │ │ │ +
    607 private:
    │ │ │ │ +
    608 typedef StencilTableReal<float> float_type;
    │ │ │ │ +
    609 typedef StencilTableReal<double> double_type;
    │ │ │ │ +
    610
    │ │ │ │ +
    611 union {
    │ │ │ │ +
    612 float_type * _fPtr;
    │ │ │ │ +
    613 double_type * _dPtr;
    │ │ │ │ +
    614 };
    │ │ │ │ +
    615
    │ │ │ │ +
    616 public:
    │ │ │ │ +
    617 StencilTablePtr() { _fPtr = 0; }
    │ │ │ │ +
    618 StencilTablePtr(float_type * ptr) { _fPtr = ptr; }
    │ │ │ │ +
    619 StencilTablePtr(double_type * ptr) { _dPtr = ptr; }
    │ │ │ │ +
    620
    │ │ │ │ +
    621 operator bool() const { return _fPtr != 0; }
    │ │ │ │ +
    622
    │ │ │ │ +
    623 void Set() { _fPtr = 0; }
    │ │ │ │ +
    624 void Set(float_type * ptr) { _fPtr = ptr; }
    │ │ │ │ +
    625 void Set(double_type * ptr) { _dPtr = ptr; }
    │ │ │ │ +
    626
    │ │ │ │ +
    627 template <typename REAL> StencilTableReal<REAL> * Get() const;
    │ │ │ │ +
    628 };
    │ │ │ │ +
    629
    │ │ │ │ +
    630private:
    │ │ │ │ +
    631
    │ │ │ │ +
    632 //
    │ │ │ │ +
    633 // Topology
    │ │ │ │ +
    634 //
    │ │ │ │ +
    635
    │ │ │ │ +
    636 int _maxValence, // highest vertex valence found in the mesh
    │ │ │ │ +
    637 _numPtexFaces; // total number of ptex faces
    │ │ │ │ +
    638
    │ │ │ │ +
    639 PatchArrayVector _patchArrays; // Vector of descriptors for arrays of patches
    │ │ │ │ +
    640
    │ │ │ │ +
    641 std::vector<Index> _patchVerts; // Indices of the control vertices of the patches
    │ │ │ │ +
    642
    │ │ │ │ +
    643 PatchParamTable _paramTable; // PatchParam bitfields (one per patch)
    │ │ │ │ +
    644
    │ │ │ │ +
    645 //
    │ │ │ │ +
    646 // Extraordinary vertex closed-form evaluation / endcap basis conversion
    │ │ │ │ +
    647 //
    │ │ │ │ +
    648 // XXXtakahito: these data will probably be replaced with mask coefficient or something
    │ │ │ │ +
    649 // SchemeWorker populates.
    │ │ │ │ +
    650 //
    │ │ │ │ +
    651 QuadOffsetsTable _quadOffsetsTable; // Quad offsets (for Gregory patches)
    │ │ │ │ +
    652 VertexValenceTable _vertexValenceTable; // Vertex valence table (for Gregory patches)
    │ │ │ │ +
    653
    │ │ │ │ +
    654 StencilTablePtr _localPointStencils; // local point conversion stencils
    │ │ │ │ +
    655 StencilTablePtr _localPointVaryingStencils; // local point varying stencils
    │ │ │ │ +
    656
    │ │ │ │ +
    657 //
    │ │ │ │ +
    658 // Varying data
    │ │ │ │ +
    659 //
    │ │ │ │ +
    660 PatchDescriptor _varyingDesc;
    │ │ │ │ +
    661
    │ │ │ │ +
    662 std::vector<Index> _varyingVerts;
    │ │ │ │ +
    663
    │ │ │ │ +
    664 //
    │ │ │ │ +
    665 // Face-varying data
    │ │ │ │ +
    666 //
    │ │ │ │ +
    667 FVarPatchChannelVector _fvarChannels;
    │ │ │ │ +
    668
    │ │ │ │ +
    669 std::vector<StencilTablePtr> _localPointFaceVaryingStencils;
    │ │ │ │ +
    670
    │ │ │ │ +
    671 //
    │ │ │ │ +
    672 // 'single-crease' patch sharpness tables
    │ │ │ │ +
    673 //
    │ │ │ │ +
    674 std::vector<Index> _sharpnessIndices; // Indices of single-crease sharpness (one per patch)
    │ │ │ │ +
    675 std::vector<float> _sharpnessValues; // Sharpness values.
    │ │ │ │ +
    676
    │ │ │ │ +
    677 //
    │ │ │ │ +
    678 // Construction history -- relevant to at least one public query:
    │ │ │ │ +
    679 //
    │ │ │ │ +
    680 unsigned int _isUniformLinear : 1;
    │ │ │ │ +
    681
    │ │ │ │ +
    682 //
    │ │ │ │ +
    683 // Precision -- only applies to local-point stencil tables
    │ │ │ │ +
    684 //
    │ │ │ │ +
    685 unsigned int _vertexPrecisionIsDouble : 1;
    │ │ │ │ +
    686 unsigned int _varyingPrecisionIsDouble : 1;
    │ │ │ │ +
    687 unsigned int _faceVaryingPrecisionIsDouble : 1;
    │ │ │ │ +
    688};
    │ │ │ │ +
    │ │ │ │ +
    689
    │ │ │ │ +
    690
    │ │ │ │ +
    691//
    │ │ │ │ +
    692// Template specializations for float/double -- to be defined before used:
    │ │ │ │ +
    693//
    │ │ │ │ +
    694template <> inline StencilTableReal<float> *
    │ │ │ │ +
    695PatchTable::StencilTablePtr::Get<float>() const { return _fPtr; }
    │ │ │ │ +
    696
    │ │ │ │ +
    697template <> inline StencilTableReal<double> *
    │ │ │ │ +
    698PatchTable::StencilTablePtr::Get<double>() const { return _dPtr; }
    │ │ │ │ +
    699
    │ │ │ │ +
    │ │ │ │ +
    700template <> inline bool
    │ │ │ │ +
    701PatchTable::LocalPointStencilPrecisionMatchesType<float>() const {
    │ │ │ │ +
    702 return !_vertexPrecisionIsDouble;
    │ │ │ │ +
    703}
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    704template <> inline bool
    │ │ │ │ +
    705PatchTable::LocalPointVaryingStencilPrecisionMatchesType<float>() const {
    │ │ │ │ +
    706 return !_varyingPrecisionIsDouble;
    │ │ │ │ +
    707}
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    708template <> inline bool
    │ │ │ │ +
    709PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<float>() const {
    │ │ │ │ +
    710 return !_faceVaryingPrecisionIsDouble;
    │ │ │ │ +
    711}
    │ │ │ │ +
    │ │ │ │ +
    712
    │ │ │ │ +
    │ │ │ │ +
    713template <> inline bool
    │ │ │ │ +
    714PatchTable::LocalPointStencilPrecisionMatchesType<double>() const {
    │ │ │ │ +
    715 return _vertexPrecisionIsDouble;
    │ │ │ │ +
    716}
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    717template <> inline bool
    │ │ │ │ +
    718PatchTable::LocalPointVaryingStencilPrecisionMatchesType<double>() const {
    │ │ │ │ +
    719 return _varyingPrecisionIsDouble;
    │ │ │ │ +
    720}
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    721template <> inline bool
    │ │ │ │ +
    722PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<double>() const {
    │ │ │ │ +
    723 return _faceVaryingPrecisionIsDouble;
    │ │ │ │ +
    724}
    │ │ │ │ +
    │ │ │ │ +
    725
    │ │ │ │ +
    726//
    │ │ │ │ +
    727// StencilTable access -- backward compatible and generic:
    │ │ │ │ +
    728//
    │ │ │ │ +
    729inline StencilTable const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    731 assert(LocalPointStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    732 return static_cast<StencilTable const *>(_localPointStencils.Get<float>());
    │ │ │ │ +
    733}
    │ │ │ │ +
    │ │ │ │ +
    734inline StencilTable const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    736 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    737 return static_cast<StencilTable const *>(
    │ │ │ │ +
    738 _localPointVaryingStencils.Get<float>());
    │ │ │ │ +
    739}
    │ │ │ │ +
    │ │ │ │ +
    740inline StencilTable const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    742 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    743 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ +
    744 return static_cast<StencilTable const *>(
    │ │ │ │ +
    745 _localPointFaceVaryingStencils[channel].Get<float>());
    │ │ │ │ +
    746 }
    │ │ │ │ +
    747 return NULL;
    │ │ │ │ +
    748}
    │ │ │ │ +
    │ │ │ │ +
    749
    │ │ │ │ +
    750template <typename REAL>
    │ │ │ │ +
    751inline StencilTableReal<REAL> const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    753 assert(LocalPointStencilPrecisionMatchesType<REAL>());
    │ │ │ │ +
    754 return _localPointStencils.Get<REAL>();
    │ │ │ │ +
    755}
    │ │ │ │ +
    │ │ │ │ +
    756template <typename REAL>
    │ │ │ │ +
    757inline StencilTableReal<REAL> const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    759 assert(LocalPointVaryingStencilPrecisionMatchesType<REAL>());
    │ │ │ │ +
    760 return _localPointVaryingStencils.Get<REAL>();
    │ │ │ │ +
    761}
    │ │ │ │ +
    │ │ │ │ +
    762template <typename REAL>
    │ │ │ │ +
    763inline StencilTableReal<REAL> const *
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    765 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<REAL>());
    │ │ │ │ +
    766 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ +
    767 return _localPointFaceVaryingStencils[channel].Get<REAL>();
    │ │ │ │ +
    768 }
    │ │ │ │ +
    769 return NULL;
    │ │ │ │ +
    770}
    │ │ │ │ +
    │ │ │ │ +
    771
    │ │ │ │ +
    772
    │ │ │ │ +
    773//
    │ │ │ │ +
    774// Computation of local point values:
    │ │ │ │ +
    775//
    │ │ │ │ +
    776template <class T>
    │ │ │ │ +
    777inline void
    │ │ │ │ +
    │ │ │ │ +
    778PatchTable::ComputeLocalPointValues(T const *src, T *dst) const {
    │ │ │ │ +
    779 assert(LocalPointStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    780 if (_localPointStencils) {
    │ │ │ │ +
    781 _localPointStencils.Get<float>()->UpdateValues(src, dst);
    │ │ │ │ +
    782 }
    │ │ │ │ +
    783}
    │ │ │ │ +
    │ │ │ │ +
    784
    │ │ │ │ +
    785template <class T>
    │ │ │ │ +
    786inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    788 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    789 if (_localPointVaryingStencils) {
    │ │ │ │ +
    790 _localPointVaryingStencils.Get<float>()->UpdateValues(src, dst);
    │ │ │ │ +
    791 }
    │ │ │ │ +
    792}
    │ │ │ │ +
    │ │ │ │ +
    793
    │ │ │ │ +
    794template <class T>
    │ │ │ │ +
    795inline void
    │ │ │ │ +
    │ │ │ │ +
    796PatchTable::ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel) const {
    │ │ │ │ +
    797 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ +
    798 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ +
    799 if (_localPointFaceVaryingStencils[channel]) {
    │ │ │ │ +
    800 _localPointFaceVaryingStencils[channel].Get<float>()->UpdateValues(src, dst);
    │ │ │ │ +
    801 }
    │ │ │ │ +
    802 }
    │ │ │ │ +
    803}
    │ │ │ │ +
    │ │ │ │ +
    804
    │ │ │ │ +
    805
    │ │ │ │ +
    806//
    │ │ │ │ +
    807// Basis evaluation overloads
    │ │ │ │ +
    808//
    │ │ │ │ +
    809inline void
    │ │ │ │ +
    │ │ │ │ +
    810PatchTable::EvaluateBasis(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    811 float wP[], float wDu[], float wDv[],
    │ │ │ │ +
    812 float wDuu[], float wDuv[], float wDvv[]) const {
    │ │ │ │ +
    813
    │ │ │ │ +
    814 EvaluateBasis<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ +
    815}
    │ │ │ │ +
    │ │ │ │ +
    816inline void
    │ │ │ │ +
    │ │ │ │ +
    817PatchTable::EvaluateBasis(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    818 double wP[], double wDu[], double wDv[],
    │ │ │ │ +
    819 double wDuu[], double wDuv[], double wDvv[]) const {
    │ │ │ │ +
    820
    │ │ │ │ +
    821 EvaluateBasis<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ +
    822}
    │ │ │ │ +
    │ │ │ │ +
    823
    │ │ │ │ +
    824inline void
    │ │ │ │ +
    │ │ │ │ +
    825PatchTable::EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    826 float wP[], float wDu[], float wDv[],
    │ │ │ │ +
    827 float wDuu[], float wDuv[], float wDvv[]) const {
    │ │ │ │ +
    828
    │ │ │ │ +
    829 EvaluateBasisVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ +
    830}
    │ │ │ │ +
    │ │ │ │ +
    831inline void
    │ │ │ │ +
    │ │ │ │ +
    832PatchTable::EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    833 double wP[], double wDu[], double wDv[],
    │ │ │ │ +
    834 double wDuu[], double wDuv[], double wDvv[]) const {
    │ │ │ │ +
    835
    │ │ │ │ +
    836 EvaluateBasisVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ +
    837}
    │ │ │ │ +
    │ │ │ │ +
    838
    │ │ │ │ +
    839inline void
    │ │ │ │ +
    │ │ │ │ +
    840PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ +
    841 float wP[], float wDu[], float wDv[],
    │ │ │ │ +
    842 float wDuu[], float wDuv[], float wDvv[], int channel) const {
    │ │ │ │ +
    843
    │ │ │ │ +
    844 EvaluateBasisFaceVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
    │ │ │ │ +
    845}
    │ │ │ │ +
    │ │ │ │ +
    846inline void
    │ │ │ │ +
    │ │ │ │ +
    847PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ +
    848 double wP[], double wDu[], double wDv[],
    │ │ │ │ +
    849 double wDuu[], double wDuv[], double wDvv[], int channel) const {
    │ │ │ │ +
    850
    │ │ │ │ +
    851 EvaluateBasisFaceVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
    │ │ │ │ +
    852}
    │ │ │ │ +
    │ │ │ │ +
    853
    │ │ │ │ +
    854} // end namespace Far
    │ │ │ │ +
    855
    │ │ │ │ +
    856} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    857using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    858
    │ │ │ │ +
    859} // end namespace OpenSubdiv
    │ │ │ │ +
    860
    │ │ │ │ +
    861#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */
    │ │ │ │ + │ │ │ │ +
    std::vector< PatchParam > PatchParamTable
    Definition patchParam.h:243
    │ │ │ │ + │ │ │ │ +
    std::vector< PatchArray > PatchArrayVector
    Definition types.h:132
    │ │ │ │ + │ │ │ │ +
    An quadtree-based map connecting coarse faces to their sub-patches.
    Definition patchMap.h:49
    │ │ │ │ + │ │ │ │ +
    Container for arrays of parametric patches.
    Definition patchTable.h:55
    │ │ │ │ +
    ConstIndexArray GetPatchArrayVaryingVertices(int array) const
    Returns the varying vertex indices for the patches in array.
    │ │ │ │ + │ │ │ │ +
    PatchVertsTable const & GetPatchControlVerticesTable() const
    Get the table of patch control vertices.
    Definition patchTable.h:378
    │ │ │ │ +
    void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) const
    Updates local point face-varying values.
    Definition patchTable.h:796
    │ │ │ │ +
    ConstIndexArray GetVaryingVertices() const
    Returns an array of varying vertex indices for the patches.
    │ │ │ │ +
    void ComputeLocalPointValuesVarying(T const *src, T *dst) const
    Updates local point varying values.
    Definition patchTable.h:787
    │ │ │ │ +
    ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const
    Returns the varying vertex indices for a given patch.
    │ │ │ │ +
    bool IsFeatureAdaptive() const
    True if the patches are of feature adaptive types.
    │ │ │ │ +
    int GetMaxValence() const
    Returns max vertex valence.
    Definition patchTable.h:92
    │ │ │ │ +
    StencilTableReal< REAL > const * GetLocalPointStencilTable() const
    Returns the stencil table to compute local point vertex values.
    │ │ │ │ +
    StencilTable const * GetLocalPointStencilTable() const
    Returns the stencil table to compute local point vertex values.
    Definition patchTable.h:730
    │ │ │ │ +
    PatchParamArray getPatchParams(int arrayIndex)
    │ │ │ │ +
    ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const
    Returns the value indices for the patches in array in channel.
    │ │ │ │ +
    std::vector< float > const & GetSharpnessValues() const
    Returns sharpness values table.
    Definition patchTable.h:387
    │ │ │ │ + │ │ │ │ +
    PatchParam GetPatchFVarPatchParam(int array, int patch, int channel=0) const
    Returns the face-varying params for a given patch channel.
    │ │ │ │ +
    ConstIndexArray GetPatchVaryingVertices(int array, int patch) const
    Returns the varying vertex indices for a given patch.
    │ │ │ │ +
    PatchTable(PatchTable const &src)
    Copy constructor.
    │ │ │ │ +
    int GetNumPatchArrays() const
    Returns the number of patch arrays in the table.
    │ │ │ │ +
    ConstIndexArray GetPatchVertices(PatchHandle const &handle) const
    Returns the control vertex indices for the patch identified by handle.
    │ │ │ │ + │ │ │ │ +
    bool LocalPointFaceVaryingStencilPrecisionMatchesType() const
    Tests if the precision of the stencil table to compute local point face-varying values matches the gi...
    │ │ │ │ +
    PatchParamTable const & GetPatchParamTable() const
    Returns the PatchParamTable (PatchParams order matches patch array sorting)
    Definition patchTable.h:381
    │ │ │ │ +
    VertexValenceTable const & GetVertexValenceTable() const
    Returns the 'VertexValences' table (vertex neighborhoods table)
    Definition patchTable.h:267
    │ │ │ │ +
    StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
    Returns the stencil table to compute local point face-varying values.
    Definition patchTable.h:741
    │ │ │ │ +
    int GetNumControlVertices(int array) const
    Returns the number of control vertices in array.
    │ │ │ │ + │ │ │ │ +
    void EvaluateBasisFaceVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0, int channel=0) const
    Evaluate basis functions for a face-varying value and derivatives at a given (u,v) parametric locatio...
    │ │ │ │ +
    ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const
    Returns the 'QuadOffsets' for the Gregory patch identified by handle.
    │ │ │ │ +
    PatchDescriptor GetFVarPatchDescriptorIrregular(int channel=0) const
    Returns the irregular patch descriptor for channel.
    │ │ │ │ +
    float GetSingleCreasePatchSharpnessValue(int array, int patch) const
    Returns the crease sharpness for the patch in array if it is a single-crease patch,...
    │ │ │ │ + │ │ │ │ +
    void ComputeLocalPointValues(T const *src, T *dst) const
    Updates local point vertex values.
    Definition patchTable.h:778
    │ │ │ │ +
    float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const
    Returns the crease sharpness for the patch identified by handle if it is a single-crease patch,...
    │ │ │ │ +
    PatchParam GetPatchParam(int array, int patch) const
    Returns the PatchParam for patch in array.
    │ │ │ │ +
    ConstIndexArray GetPatchFVarValues(int array, int patch, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ +
    PatchDescriptor GetFVarPatchDescriptorRegular(int channel=0) const
    Returns the regular patch descriptor for channel.
    │ │ │ │ +
    PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const
    Returns the PatchDescriptor for the patch identified by handle.
    │ │ │ │ + │ │ │ │ +
    QuadOffsetsTable const & GetQuadOffsetsTable() const
    Returns the quad-offsets table.
    Definition patchTable.h:392
    │ │ │ │ +
    int GetNumPatches(int array) const
    Returns the number of patches in array.
    │ │ │ │ +
    PatchDescriptor GetVaryingPatchDescriptor() const
    Returns the varying patch descriptor.
    │ │ │ │ +
    ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ +
    ConstPatchParamArray const GetPatchParams(int array) const
    Returns the PatchParams for the patches in array.
    │ │ │ │ +
    int GetNumControlVerticesTotal() const
    Returns the total number of control vertex indices in the table.
    Definition patchTable.h:84
    │ │ │ │ +
    int GetNumFVarChannels() const
    Returns the number of face-varying channels.
    │ │ │ │ +
    ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) const
    Returns the face-varying for a given patch in array in channel.
    │ │ │ │ +
    Index getPatchIndex(int array, int patch) const
    │ │ │ │ +
    int GetNumLocalPoints() const
    Returns the number of local vertex points.
    │ │ │ │ +
    bool LocalPointVaryingStencilPrecisionMatchesType() const
    Tests if the precision of the stencil table to compute local point varying values matches the given f...
    │ │ │ │ +
    ConstIndexArray GetPatchArrayVertices(int array) const
    Returns the control vertex indices for the patches in array.
    │ │ │ │ +
    int GetNumPtexFaces() const
    Returns the total number of ptex faces in the mesh.
    Definition patchTable.h:95
    │ │ │ │ +
    ConstIndexArray GetFVarValues(int channel=0) const
    Returns an array of value indices for the patches in channel.
    │ │ │ │ +
    Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
    Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
    Definition patchTable.h:259
    │ │ │ │ +
    void EvaluateBasis(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
    Evaluate basis functions for position and derivatives at a given (u,v) parametric location of a patch...
    │ │ │ │ +
    StencilTableReal< REAL > const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
    Returns the stencil table to compute local point face-varying values.
    │ │ │ │ +
    int GetNumPatchesTotal() const
    Returns the total number of patches stored in the table.
    │ │ │ │ +
    PatchParam GetPatchParam(PatchHandle const &handle) const
    Returns a PatchParam for the patch identified by handle.
    │ │ │ │ + │ │ │ │ +
    Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel=0) const
    Deprecated.
    │ │ │ │ +
    std::vector< Index > const & GetSharpnessIndexTable() const
    Returns a sharpness index table for each patch (if exists)
    Definition patchTable.h:384
    │ │ │ │ +
    PatchDescriptor GetPatchArrayDescriptor(int array) const
    Returns the PatchDescriptor for the patches in array.
    │ │ │ │ + │ │ │ │ +
    void EvaluateBasisVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
    Evaluate basis functions for a varying value and derivatives at a given (u,v) parametric location of ...
    │ │ │ │ +
    StencilTable const * GetLocalPointVaryingStencilTable() const
    Returns the stencil table to compute local point varying values.
    Definition patchTable.h:735
    │ │ │ │ +
    std::vector< unsigned int > QuadOffsetsTable
    Definition patchTable.h:389
    │ │ │ │ +
    ConstIndexArray GetPatchVertices(int array, int patch) const
    Returns the control vertex indices for patch in array.
    │ │ │ │ +
    PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ +
    int GetFVarValueStride(int channel=0) const
    Returns the stride between patches in the value index array of channel.
    │ │ │ │ +
    ConstPatchParamArray GetFVarPatchParams(int channel=0) const
    Returns an array of face-varying patch param for channel.
    │ │ │ │ +
    PatchDescriptor GetFVarPatchDescriptor(int channel=0) const
    Returns the default/irregular patch descriptor for channel.
    │ │ │ │ +
    int GetNumLocalPointsVarying() const
    Returns the number of local varying points.
    │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -stencilTableFactory.h │ │ │ │ │ +patchTable.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,497 +24,945 @@ │ │ │ │ │ 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 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_PATCH_TABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/patchTable.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ +30#include "../far/patchDescriptor.h" │ │ │ │ │ +31#include "../far/patchParam.h" │ │ │ │ │ +32#include "../far/stencilTable.h" │ │ │ │ │ 33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 │ │ │ │ │ -39class TopologyRefiner; │ │ │ │ │ +34#include "../sdc/options.h" │ │ │ │ │ +35 │ │ │ │ │ +36#include │ │ │ │ │ +37 │ │ │ │ │ +38namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +39namespace OPENSUBDIV_VERSION { │ │ │ │ │ 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 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 }; │ │ │ │ │ +41namespace Far { │ │ │ │ │ +42 │ │ │ │ │ +_5_5class _P_a_t_c_h_T_a_b_l_e { │ │ │ │ │ +56 │ │ │ │ │ +57public: │ │ │ │ │ +58 │ │ │ │ │ +_6_0 class _P_a_t_c_h_H_a_n_d_l_e { │ │ │ │ │ +61 // XXXX manuelk members will eventually be made private │ │ │ │ │ +62 public: │ │ │ │ │ +63 │ │ │ │ │ +_6_4 friend class _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ +_6_5 friend class _P_a_t_c_h_M_a_p; │ │ │ │ │ +66 │ │ │ │ │ +_6_7 _I_n_d_e_x _a_r_r_a_y_I_n_d_e_x, // Array index of the patch │ │ │ │ │ +_6_8 _p_a_t_c_h_I_n_d_e_x, // Absolute Index of the patch │ │ │ │ │ +_6_9 _v_e_r_t_I_n_d_e_x; // Relative offset to the first CV of the patch in array │ │ │ │ │ +70 }; │ │ │ │ │ +71 │ │ │ │ │ +72public: │ │ │ │ │ +73 │ │ │ │ │ +_7_5 _P_a_t_c_h_T_a_b_l_e(_P_a_t_c_h_T_a_b_l_e const & src); │ │ │ │ │ +76 │ │ │ │ │ +_7_8 _~_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +79 │ │ │ │ │ +_8_1 bool _I_s_F_e_a_t_u_r_e_A_d_a_p_t_i_v_e() const; │ │ │ │ │ 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()); │ │ │ │ │ +_8_4 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_o_t_a_l() const { │ │ │ │ │ +85 return (int)_patchVerts.size(); │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_8_9 int _G_e_t_N_u_m_P_a_t_c_h_e_s_T_o_t_a_l() const; │ │ │ │ │ +90 │ │ │ │ │ +_9_2 int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ +93 │ │ │ │ │ +_9_5 int _G_e_t_N_u_m_P_t_e_x_F_a_c_e_s() const { return _numPtexFaces; } │ │ │ │ │ 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 │ │ │ │ │ -_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); │ │ │ │ │ +99 │ │ │ │ │ +105 │ │ │ │ │ +_1_0_7 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ +108 │ │ │ │ │ +_1_1_0 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ +111 │ │ │ │ │ +_1_1_3 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_P_a_r_a_m(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ +114 │ │ │ │ │ +_1_1_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s(int array, int patch) const; │ │ │ │ │ +117 │ │ │ │ │ +_1_1_9 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_P_a_r_a_m(int array, int patch) const; │ │ │ │ │ +121 │ │ │ │ │ +122 │ │ │ │ │ +124 │ │ │ │ │ +130 │ │ │ │ │ +_1_3_2 int _G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s() const; │ │ │ │ │ 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 }; │ │ │ │ │ +_1_3_5 int _G_e_t_N_u_m_P_a_t_c_h_e_s(int array) const; │ │ │ │ │ +136 │ │ │ │ │ +_1_3_8 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ +139 │ │ │ │ │ +_1_4_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_P_a_t_c_h_A_r_r_a_y_D_e_s_c_r_i_p_t_o_r(int array) const; │ │ │ │ │ +142 │ │ │ │ │ +_1_4_4 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ +145 │ │ │ │ │ +_1_4_7 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y const _G_e_t_P_a_t_c_h_P_a_r_a_m_s(int array) const; │ │ │ │ │ +149 │ │ │ │ │ +150 │ │ │ │ │ +152 │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s() const; │ │ │ │ │ +162 │ │ │ │ │ +164 _S_t_e_n_c_i_l_T_a_b_l_e const *_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() const; │ │ │ │ │ +165 │ │ │ │ │ +167 template │ │ │ │ │ +_1_6_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *_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() const; │ │ │ │ │ +169 │ │ │ │ │ +_1_7_2 template bool _L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e() │ │ │ │ │ +const; │ │ │ │ │ +173 │ │ │ │ │ +186 template void │ │ │ │ │ +187 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s(T const *src, T *dst) const; │ │ │ │ │ +188 │ │ │ │ │ +189 │ │ │ │ │ +_1_9_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s_V_a_r_y_i_n_g() const; │ │ │ │ │ +192 │ │ │ │ │ +194 _S_t_e_n_c_i_l_T_a_b_l_e const *_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() const; │ │ │ │ │ +195 │ │ │ │ │ +197 template │ │ │ │ │ +_1_9_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *_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() const; │ │ │ │ │ +199 │ │ │ │ │ +_2_0_2 template bool _L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ +() const; │ │ │ │ │ +203 │ │ │ │ │ +216 template void │ │ │ │ │ +217 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g(T const *src, T *dst) const; │ │ │ │ │ 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) { } │ │ │ │ │ +219 │ │ │ │ │ +_2_2_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s_F_a_c_e_V_a_r_y_i_n_g(int channel = 0) const; │ │ │ │ │ +222 │ │ │ │ │ +224 _S_t_e_n_c_i_l_T_a_b_l_e const *_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel = 0) │ │ │ │ │ +const; │ │ │ │ │ 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; │ │ │ │ │ +227 template │ │ │ │ │ +_2_2_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int │ │ │ │ │ +channel = 0) const; │ │ │ │ │ +229 │ │ │ │ │ +_2_3_2 template bool │ │ │ │ │ +_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e() const; │ │ │ │ │ +233 │ │ │ │ │ +248 template void │ │ │ │ │ +249 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g(T const *src, T *dst, int channel = 0) │ │ │ │ │ +const; │ │ │ │ │ +251 │ │ │ │ │ +252 │ │ │ │ │ +254 │ │ │ │ │ +255 │ │ │ │ │ +_2_5_9 typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_u_n_s_i_g_n_e_d_ _i_n_t_> _C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y; │ │ │ │ │ +260 │ │ │ │ │ +_2_6_2 _C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y _G_e_t_P_a_t_c_h_Q_u_a_d_O_f_f_s_e_t_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) │ │ │ │ │ +const; │ │ │ │ │ +263 │ │ │ │ │ +_2_6_4 typedef std::vector _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e; │ │ │ │ │ +265 │ │ │ │ │ +_2_6_7 _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e const & _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e() const { │ │ │ │ │ +268 return _vertexValenceTable; │ │ │ │ │ +269 } │ │ │ │ │ +271 │ │ │ │ │ +272 │ │ │ │ │ +274 │ │ │ │ │ +280 │ │ │ │ │ +_2_8_3 float _G_e_t_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ 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 } │ │ │ │ │ +_2_8_7 float _G_e_t_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e(int array, int patch) const; │ │ │ │ │ +289 │ │ │ │ │ +290 │ │ │ │ │ +292 │ │ │ │ │ +298 │ │ │ │ │ +_3_0_0 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r() const; │ │ │ │ │ +301 │ │ │ │ │ +_3_0_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ +304 │ │ │ │ │ +_3_0_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(int array, int patch) const; │ │ │ │ │ 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) { │ │ │ │ │ +_3_0_9 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ +310 │ │ │ │ │ +_3_1_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +314 │ │ │ │ │ +315 │ │ │ │ │ +317 │ │ │ │ │ +323 │ │ │ │ │ +_3_2_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const; │ │ │ │ │ 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()) { │ │ │ │ │ +_3_2_8 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_R_e_g_u_l_a_r(int channel = 0) const; │ │ │ │ │ +329 │ │ │ │ │ +_3_3_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_I_r_r_e_g_u_l_a_r(int channel = 0) const; │ │ │ │ │ +332 │ │ │ │ │ +_3_3_4 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(int channel = 0) const; │ │ │ │ │ +335 │ │ │ │ │ +_3_3_7 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, int channel │ │ │ │ │ += 0) const; │ │ │ │ │ +338 │ │ │ │ │ +_3_4_0 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s(int array, int patch, int channel = 0) │ │ │ │ │ +const; │ │ │ │ │ +341 │ │ │ │ │ +_3_4_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_F_V_a_r_V_a_l_u_e_s(int array, int channel = 0) const; │ │ │ │ │ +344 │ │ │ │ │ +_3_4_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_V_a_r_V_a_l_u_e_s(int channel = 0) const; │ │ │ │ │ +347 │ │ │ │ │ +_3_4_9 int _G_e_t_F_V_a_r_V_a_l_u_e_S_t_r_i_d_e(int channel = 0) const; │ │ │ │ │ +350 │ │ │ │ │ +_3_5_2 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m(_P_a_t_c_h_H_a_n_d_l_e const & handle, int channel = │ │ │ │ │ +0) const; │ │ │ │ │ +353 │ │ │ │ │ +_3_5_5 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m(int array, int patch, int channel = 0) │ │ │ │ │ +const; │ │ │ │ │ +356 │ │ │ │ │ +_3_5_8 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s(int array, int channel = │ │ │ │ │ +0) const; │ │ │ │ │ +359 │ │ │ │ │ +_3_6_1 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s(int channel = 0) const; │ │ │ │ │ +362 │ │ │ │ │ +_3_6_4 _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 _G_e_t_F_V_a_r_C_h_a_n_n_e_l_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n(int │ │ │ │ │ +channel = 0) const; │ │ │ │ │ 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}; │ │ │ │ │ +367 │ │ │ │ │ +369 │ │ │ │ │ +374 │ │ │ │ │ +_3_7_5 typedef std::vector _P_a_t_c_h_V_e_r_t_s_T_a_b_l_e; │ │ │ │ │ 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 │ │ │ │ │ +_3_7_8 _P_a_t_c_h_V_e_r_t_s_T_a_b_l_e const & _G_e_t_P_a_t_c_h_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_a_b_l_e() const { return │ │ │ │ │ +_patchVerts; } │ │ │ │ │ +379 │ │ │ │ │ +_3_8_1 _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e const & _G_e_t_P_a_t_c_h_P_a_r_a_m_T_a_b_l_e() const { return _paramTable; } │ │ │ │ │ +382 │ │ │ │ │ +_3_8_4 std::vector const &_G_e_t_S_h_a_r_p_n_e_s_s_I_n_d_e_x_T_a_b_l_e() const { return │ │ │ │ │ +_sharpnessIndices; } │ │ │ │ │ +385 │ │ │ │ │ +_3_8_7 std::vector const &_G_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s() const { return │ │ │ │ │ +_sharpnessValues; } │ │ │ │ │ +388 │ │ │ │ │ +_3_8_9 typedef std::vector _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e; │ │ │ │ │ +390 │ │ │ │ │ +_3_9_2 _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e const & _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e() const { │ │ │ │ │ +393 return _quadOffsetsTable; │ │ │ │ │ +394 } │ │ │ │ │ +396 │ │ │ │ │ +_3_9_8 void _p_r_i_n_t() const; │ │ │ │ │ +399 │ │ │ │ │ +400public: │ │ │ │ │ +401 │ │ │ │ │ +403 │ │ │ │ │ +405 │ │ │ │ │ +428 template │ │ │ │ │ +_4_2_9 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ +430 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ +431 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const; │ │ │ │ │ +432 │ │ │ │ │ +435 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ +436 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ +437 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const; │ │ │ │ │ +438 │ │ │ │ │ +441 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ +442 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ +443 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const; │ │ │ │ │ +444 │ │ │ │ │ +467 template │ │ │ │ │ +_4_6_8 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ +469 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ +470 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const; │ │ │ │ │ +471 │ │ │ │ │ +474 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ +475 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ +476 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const; │ │ │ │ │ +477 │ │ │ │ │ +480 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ +481 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ +482 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const; │ │ │ │ │ +483 │ │ │ │ │ +508 template │ │ │ │ │ +_5_0_9 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ +510 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ +511 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0, │ │ │ │ │ +512 int channel = 0) const; │ │ │ │ │ +513 │ │ │ │ │ +516 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ +517 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ +518 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0, │ │ │ │ │ +519 int channel = 0) const; │ │ │ │ │ +520 │ │ │ │ │ +523 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double │ │ │ │ │ +v, │ │ │ │ │ +524 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ +525 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0, │ │ │ │ │ +526 int channel = 0) const; │ │ │ │ │ +528 │ │ │ │ │ +529protected: │ │ │ │ │ +530 │ │ │ │ │ +_5_3_1 friend class _P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ +532 │ │ │ │ │ +533 // Factory constructor │ │ │ │ │ +_5_3_4 _P_a_t_c_h_T_a_b_l_e(int maxvalence); │ │ │ │ │ +535 │ │ │ │ │ +_5_3_6 _I_n_d_e_x _g_e_t_P_a_t_c_h_I_n_d_e_x(int array, int patch) const; │ │ │ │ │ +537 │ │ │ │ │ +_5_3_8 _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _g_e_t_P_a_t_c_h_P_a_r_a_m_s(int arrayIndex); │ │ │ │ │ +539 │ │ │ │ │ +_5_4_0 _I_n_d_e_x * _g_e_t_S_h_a_r_p_n_e_s_s_I_n_d_i_c_e_s(_I_n_d_e_x arrayIndex); │ │ │ │ │ +_5_4_1 float * _g_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s(_I_n_d_e_x arrayIndex); │ │ │ │ │ +542 │ │ │ │ │ +543private: │ │ │ │ │ +544 │ │ │ │ │ +545 // │ │ │ │ │ +546 // Patch arrays │ │ │ │ │ +547 // │ │ │ │ │ +548 │ │ │ │ │ +549 struct PatchArray; │ │ │ │ │ +550 typedef std::vector PatchArrayVector; │ │ │ │ │ +551 │ │ │ │ │ +552 PatchArray & getPatchArray(_I_n_d_e_x arrayIndex); │ │ │ │ │ +553 PatchArray const & getPatchArray(_I_n_d_e_x arrayIndex) const; │ │ │ │ │ +554 │ │ │ │ │ +555 void reservePatchArrays(int numPatchArrays); │ │ │ │ │ +556 void pushPatchArray(_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc, int npatches, │ │ │ │ │ +557 _I_n_d_e_x * vidx, _I_n_d_e_x * pidx, _I_n_d_e_x * qoidx=0); │ │ │ │ │ +558 │ │ │ │ │ +559 _I_n_d_e_x_A_r_r_a_y getPatchArrayVertices(int arrayIndex); │ │ │ │ │ +560 │ │ │ │ │ +561 _I_n_d_e_x findPatchArray(_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc); │ │ │ │ │ +562 │ │ │ │ │ +563 │ │ │ │ │ +564 // │ │ │ │ │ +565 // Varying patch arrays │ │ │ │ │ +566 // │ │ │ │ │ +567 _I_n_d_e_x_A_r_r_a_y getPatchArrayVaryingVertices(int arrayIndex); │ │ │ │ │ +568 │ │ │ │ │ +569 void allocateVaryingVertices( │ │ │ │ │ +570 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc, int numPatches); │ │ │ │ │ +571 void populateVaryingVertices(); │ │ │ │ │ +572 │ │ │ │ │ +573 // │ │ │ │ │ +574 // Face-varying patch channels │ │ │ │ │ +575 // │ │ │ │ │ +576 │ │ │ │ │ +577 struct FVarPatchChannel; │ │ │ │ │ +578 typedef std::vector FVarPatchChannelVector; │ │ │ │ │ +579 │ │ │ │ │ +580 FVarPatchChannel & getFVarPatchChannel(int channel); │ │ │ │ │ +581 FVarPatchChannel const & getFVarPatchChannel(int channel) const; │ │ │ │ │ +582 │ │ │ │ │ +583 void allocateFVarPatchChannels(int numChannels); │ │ │ │ │ +584 void allocateFVarPatchChannelValues( │ │ │ │ │ +585 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r regDesc, _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r irregDesc, │ │ │ │ │ +586 int numPatches, int channel); │ │ │ │ │ +587 │ │ │ │ │ +588 // deprecated │ │ │ │ │ +589 void setFVarPatchChannelLinearInterpolation( │ │ │ │ │ +590 _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 interpolation, int channel); │ │ │ │ │ +591 │ │ │ │ │ +592 _I_n_d_e_x_A_r_r_a_y getFVarValues(int channel); │ │ │ │ │ +593 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getPatchFVarValues(int patch, int channel) const; │ │ │ │ │ +594 │ │ │ │ │ +595 _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y getFVarPatchParams(int channel); │ │ │ │ │ +596 _P_a_t_c_h_P_a_r_a_m getPatchFVarPatchParam(int patch, int channel) const; │ │ │ │ │ +597 │ │ │ │ │ +598private: │ │ │ │ │ +599 // │ │ │ │ │ +600 // Simple private class to hold stencil table pointers of varying │ │ │ │ │ +precision, │ │ │ │ │ +601 // where the discriminant of the precision is external. │ │ │ │ │ +602 // │ │ │ │ │ +603 // NOTE that this is a simple pointer container and NOT a smart pointer │ │ │ │ │ +that │ │ │ │ │ +604 // manages the ownership of the object referred to by it. │ │ │ │ │ +605 // │ │ │ │ │ +606 class StencilTablePtr { │ │ │ │ │ +607 private: │ │ │ │ │ +608 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> float_type; │ │ │ │ │ +609 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_d_o_u_b_l_e_> double_type; │ │ │ │ │ +610 │ │ │ │ │ +611 union { │ │ │ │ │ +612 float_type * _fPtr; │ │ │ │ │ +613 double_type * _dPtr; │ │ │ │ │ +614 }; │ │ │ │ │ +615 │ │ │ │ │ +616 public: │ │ │ │ │ +617 StencilTablePtr() { _fPtr = 0; } │ │ │ │ │ +618 StencilTablePtr(float_type * ptr) { _fPtr = ptr; } │ │ │ │ │ +619 StencilTablePtr(double_type * ptr) { _dPtr = ptr; } │ │ │ │ │ +620 │ │ │ │ │ +621 operator bool() const { return _fPtr != 0; } │ │ │ │ │ +622 │ │ │ │ │ +623 void Set() { _fPtr = 0; } │ │ │ │ │ +624 void Set(float_type * ptr) { _fPtr = ptr; } │ │ │ │ │ +625 void Set(double_type * ptr) { _dPtr = ptr; } │ │ │ │ │ +626 │ │ │ │ │ +627 template StencilTableReal * Get() const; │ │ │ │ │ +628 }; │ │ │ │ │ +629 │ │ │ │ │ +630private: │ │ │ │ │ +631 │ │ │ │ │ +632 // │ │ │ │ │ +633 // Topology │ │ │ │ │ +634 // │ │ │ │ │ +635 │ │ │ │ │ +636 int _maxValence, // highest vertex valence found in the mesh │ │ │ │ │ +637 _numPtexFaces; // total number of ptex faces │ │ │ │ │ +638 │ │ │ │ │ +639 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r _patchArrays; // Vector of descriptors for arrays of │ │ │ │ │ +patches │ │ │ │ │ +640 │ │ │ │ │ +641 std::vector _patchVerts; // Indices of the control vertices of the │ │ │ │ │ +patches │ │ │ │ │ +642 │ │ │ │ │ +643 _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e _paramTable; // PatchParam bitfields (one per patch) │ │ │ │ │ +644 │ │ │ │ │ +645 // │ │ │ │ │ +646 // Extraordinary vertex closed-form evaluation / endcap basis conversion │ │ │ │ │ +647 // │ │ │ │ │ +648 // XXXtakahito: these data will probably be replaced with mask coefficient │ │ │ │ │ +or something │ │ │ │ │ +649 // SchemeWorker populates. │ │ │ │ │ +650 // │ │ │ │ │ +651 _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e _quadOffsetsTable; // Quad offsets (for Gregory patches) │ │ │ │ │ +652 _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e _vertexValenceTable; // Vertex valence table (for │ │ │ │ │ +Gregory patches) │ │ │ │ │ +653 │ │ │ │ │ +654 StencilTablePtr _localPointStencils; // local point conversion stencils │ │ │ │ │ +655 StencilTablePtr _localPointVaryingStencils; // local point varying stencils │ │ │ │ │ +656 │ │ │ │ │ +657 // │ │ │ │ │ +658 // Varying data │ │ │ │ │ +659 // │ │ │ │ │ +660 PatchDescriptor _varyingDesc; │ │ │ │ │ +661 │ │ │ │ │ +662 std::vector _varyingVerts; │ │ │ │ │ +663 │ │ │ │ │ +664 // │ │ │ │ │ +665 // Face-varying data │ │ │ │ │ +666 // │ │ │ │ │ +667 FVarPatchChannelVector _fvarChannels; │ │ │ │ │ +668 │ │ │ │ │ +669 std::vector _localPointFaceVaryingStencils; │ │ │ │ │ +670 │ │ │ │ │ +671 // │ │ │ │ │ +672 // 'single-crease' patch sharpness tables │ │ │ │ │ +673 // │ │ │ │ │ +674 std::vector _sharpnessIndices; // Indices of single-crease sharpness │ │ │ │ │ +(one per patch) │ │ │ │ │ +675 std::vector _sharpnessValues; // Sharpness values. │ │ │ │ │ +676 │ │ │ │ │ +677 // │ │ │ │ │ +678 // Construction history -- relevant to at least one public query: │ │ │ │ │ +679 // │ │ │ │ │ +680 unsigned int _isUniformLinear : 1; │ │ │ │ │ +681 │ │ │ │ │ +682 // │ │ │ │ │ +683 // Precision -- only applies to local-point stencil tables │ │ │ │ │ +684 // │ │ │ │ │ +685 unsigned int _vertexPrecisionIsDouble : 1; │ │ │ │ │ +686 unsigned int _varyingPrecisionIsDouble : 1; │ │ │ │ │ +687 unsigned int _faceVaryingPrecisionIsDouble : 1; │ │ │ │ │ +688}; │ │ │ │ │ +689 │ │ │ │ │ +690 │ │ │ │ │ +691// │ │ │ │ │ +692// Template specializations for float/double -- to be defined before used: │ │ │ │ │ +693// │ │ │ │ │ +694template <> inline StencilTableReal * │ │ │ │ │ +695PatchTable::StencilTablePtr::Get() const { return _fPtr; } │ │ │ │ │ +696 │ │ │ │ │ +697template <> inline StencilTableReal * │ │ │ │ │ +698PatchTable::StencilTablePtr::Get() const { return _dPtr; } │ │ │ │ │ +699 │ │ │ │ │ +_7_0_0template <> inline bool │ │ │ │ │ +701PatchTable::LocalPointStencilPrecisionMatchesType() const { │ │ │ │ │ +702 return !_vertexPrecisionIsDouble; │ │ │ │ │ +703} │ │ │ │ │ +_7_0_4template <> inline bool │ │ │ │ │ +705PatchTable::LocalPointVaryingStencilPrecisionMatchesType() const { │ │ │ │ │ +706 return !_varyingPrecisionIsDouble; │ │ │ │ │ +707} │ │ │ │ │ +_7_0_8template <> inline bool │ │ │ │ │ +709PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ +{ │ │ │ │ │ +710 return !_faceVaryingPrecisionIsDouble; │ │ │ │ │ +711} │ │ │ │ │ +712 │ │ │ │ │ +_7_1_3template <> inline bool │ │ │ │ │ +714PatchTable::LocalPointStencilPrecisionMatchesType() const { │ │ │ │ │ +715 return _vertexPrecisionIsDouble; │ │ │ │ │ +716} │ │ │ │ │ +_7_1_7template <> inline bool │ │ │ │ │ +718PatchTable::LocalPointVaryingStencilPrecisionMatchesType() const { │ │ │ │ │ +719 return _varyingPrecisionIsDouble; │ │ │ │ │ +720} │ │ │ │ │ +_7_2_1template <> inline bool │ │ │ │ │ +722PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ +{ │ │ │ │ │ +723 return _faceVaryingPrecisionIsDouble; │ │ │ │ │ +724} │ │ │ │ │ +725 │ │ │ │ │ +726// │ │ │ │ │ +727// StencilTable access -- backward compatible and generic: │ │ │ │ │ +728// │ │ │ │ │ +729inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +_7_3_0_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() const { │ │ │ │ │ +731 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ +732 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>(_localPointStencils.Get()); │ │ │ │ │ +733} │ │ │ │ │ +734inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +_7_3_5_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() const { │ │ │ │ │ +736 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +737 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +738 _localPointVaryingStencils.Get()); │ │ │ │ │ +739} │ │ │ │ │ +740inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ +_7_4_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel) const { │ │ │ │ │ +742 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +743 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ +744 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ +745 _localPointFaceVaryingStencils[channel].Get()); │ │ │ │ │ +746 } │ │ │ │ │ +747 return NULL; │ │ │ │ │ +748} │ │ │ │ │ +749 │ │ │ │ │ +750template │ │ │ │ │ +751inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ +_7_5_2_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() const { │ │ │ │ │ +753 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ +754 return _localPointStencils.Get(); │ │ │ │ │ +755} │ │ │ │ │ +756template │ │ │ │ │ +757inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ +_7_5_8_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() const { │ │ │ │ │ +759 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +760 return _localPointVaryingStencils.Get(); │ │ │ │ │ +761} │ │ │ │ │ +762template │ │ │ │ │ +763inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ +_7_6_4_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel) const { │ │ │ │ │ +765 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +766 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ +767 return _localPointFaceVaryingStencils[channel].Get(); │ │ │ │ │ +768 } │ │ │ │ │ +769 return NULL; │ │ │ │ │ +770} │ │ │ │ │ +771 │ │ │ │ │ +772 │ │ │ │ │ +773// │ │ │ │ │ +774// Computation of local point values: │ │ │ │ │ +775// │ │ │ │ │ +776template │ │ │ │ │ +777inline void │ │ │ │ │ +_7_7_8_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s(T const *src, T *dst) const { │ │ │ │ │ +779 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ +780 if (_localPointStencils) { │ │ │ │ │ +781 _localPointStencils.Get()->UpdateValues(src, dst); │ │ │ │ │ +782 } │ │ │ │ │ +783} │ │ │ │ │ +784 │ │ │ │ │ +785template │ │ │ │ │ +786inline void │ │ │ │ │ +_7_8_7_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g(T const *src, T *dst) const { │ │ │ │ │ +788 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +789 if (_localPointVaryingStencils) { │ │ │ │ │ +790 _localPointVaryingStencils.Get()->UpdateValues(src, dst); │ │ │ │ │ +791 } │ │ │ │ │ +792} │ │ │ │ │ +793 │ │ │ │ │ +794template │ │ │ │ │ +795inline void │ │ │ │ │ +_7_9_6_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g(T const *src, T *dst, int │ │ │ │ │ +channel) const { │ │ │ │ │ +797 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ +798 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ +799 if (_localPointFaceVaryingStencils[channel]) { │ │ │ │ │ +800 _localPointFaceVaryingStencils[channel].Get()->UpdateValues(src, │ │ │ │ │ +dst); │ │ │ │ │ +801 } │ │ │ │ │ +802 } │ │ │ │ │ +803} │ │ │ │ │ +804 │ │ │ │ │ +805 │ │ │ │ │ +806// │ │ │ │ │ +807// Basis evaluation overloads │ │ │ │ │ +808// │ │ │ │ │ +809inline void │ │ │ │ │ +_8_1_0_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ +811 float wP[], float wDu[], float wDv[], │ │ │ │ │ +812 float wDuu[], float wDuv[], float wDvv[]) const { │ │ │ │ │ +813 │ │ │ │ │ +814 EvaluateBasis(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ +815} │ │ │ │ │ +816inline void │ │ │ │ │ +_8_1_7_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ +818 double wP[], double wDu[], double wDv[], │ │ │ │ │ +819 double wDuu[], double wDuv[], double wDvv[]) const { │ │ │ │ │ +820 │ │ │ │ │ +821 EvaluateBasis(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ +822} │ │ │ │ │ +823 │ │ │ │ │ +824inline void │ │ │ │ │ +_8_2_5_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float │ │ │ │ │ +v, │ │ │ │ │ +826 float wP[], float wDu[], float wDv[], │ │ │ │ │ +827 float wDuu[], float wDuv[], float wDvv[]) const { │ │ │ │ │ +828 │ │ │ │ │ +829 EvaluateBasisVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ +830} │ │ │ │ │ +831inline void │ │ │ │ │ +_8_3_2_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, │ │ │ │ │ +double v, │ │ │ │ │ +833 double wP[], double wDu[], double wDv[], │ │ │ │ │ +834 double wDuu[], double wDuv[], double wDvv[]) const { │ │ │ │ │ +835 │ │ │ │ │ +836 EvaluateBasisVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ +837} │ │ │ │ │ +838 │ │ │ │ │ +839inline void │ │ │ │ │ +_8_4_0_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, │ │ │ │ │ +float v, │ │ │ │ │ +841 float wP[], float wDu[], float wDv[], │ │ │ │ │ +842 float wDuu[], float wDuv[], float wDvv[], int channel) const { │ │ │ │ │ +843 │ │ │ │ │ +844 EvaluateBasisFaceVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, │ │ │ │ │ +wDvv, channel); │ │ │ │ │ +845} │ │ │ │ │ +846inline void │ │ │ │ │ +_8_4_7_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, │ │ │ │ │ +double v, │ │ │ │ │ +848 double wP[], double wDu[], double wDv[], │ │ │ │ │ +849 double wDuu[], double wDuv[], double wDvv[], int channel) const { │ │ │ │ │ +850 │ │ │ │ │ +851 EvaluateBasisFaceVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, │ │ │ │ │ +wDvv, channel); │ │ │ │ │ +852} │ │ │ │ │ +853 │ │ │ │ │ +854} // end namespace Far │ │ │ │ │ +855 │ │ │ │ │ +856} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +857using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +858 │ │ │ │ │ +859} // end namespace OpenSubdiv │ │ │ │ │ +860 │ │ │ │ │ +861#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */ │ │ │ │ │ _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_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ +std::vector< PatchParam > PatchParamTable │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_:_:_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 │ │ │ │ │ +Describes the type of a patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p │ │ │ │ │ +An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +Patch parameterization. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchArrayVaryingVertices(int array) const │ │ │ │ │ +Returns the varying vertex indices for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_g_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s │ │ │ │ │ +float * getSharpnessValues(Index arrayIndex) │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_a_b_l_e │ │ │ │ │ +PatchVertsTable const & GetPatchControlVerticesTable() const │ │ │ │ │ +Get the table of patch control vertices. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_: │ │ │ │ │ +_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Updates local point face-varying values. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetVaryingVertices() const │ │ │ │ │ +Returns an array of varying vertex indices for the patches. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g │ │ │ │ │ +void ComputeLocalPointValuesVarying(T const *src, T *dst) const │ │ │ │ │ +Updates local point varying values. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const │ │ │ │ │ +Returns the varying vertex indices for a given patch. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_I_s_F_e_a_t_u_r_e_A_d_a_p_t_i_v_e │ │ │ │ │ +bool IsFeatureAdaptive() const │ │ │ │ │ +True if the patches are of feature adaptive types. │ │ │ │ │ +_O_p_e_n_S_u_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 │ │ │ │ │ +StencilTableReal< REAL > const * GetLocalPointStencilTable() const │ │ │ │ │ +Returns the stencil table to compute local point vertex values. │ │ │ │ │ +_O_p_e_n_S_u_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_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_g_e_t_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ +PatchParamArray getPatchParams(int arrayIndex) │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const │ │ │ │ │ +Returns the value indices for the patches in array in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s │ │ │ │ │ +std::vector< float > const & GetSharpnessValues() const │ │ │ │ │ +Returns sharpness values table. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e │ │ │ │ │ +std::vector< Index > VertexValenceTable │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +PatchParam GetPatchFVarPatchParam(int array, int patch, int channel=0) const │ │ │ │ │ +Returns the face-varying params for a given patch channel. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchVaryingVertices(int array, int patch) const │ │ │ │ │ +Returns the varying vertex indices for a given patch. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +PatchTable(PatchTable const &src) │ │ │ │ │ +Copy 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_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 │ │ │ │ │ +int GetNumPatchArrays() const │ │ │ │ │ +Returns the number of patch arrays in 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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchVertices(PatchHandle const &handle) const │ │ │ │ │ +Returns the control vertex indices for the patch identified by handle. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +PatchTable(int maxvalence) │ │ │ │ │ +_O_p_e_n_S_u_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_:_: │ │ │ │ │ +_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ +bool LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ +Tests if the precision of the stencil table to compute local point face-varying │ │ │ │ │ +values matches the gi... │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ +PatchParamTable const & GetPatchParamTable() const │ │ │ │ │ +Returns the PatchParamTable (PatchParams order matches patch array sorting) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_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_a_b_l_e │ │ │ │ │ +VertexValenceTable const & GetVertexValenceTable() const │ │ │ │ │ +Returns the 'VertexValences' table (vertex neighborhoods table) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ +_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const │ │ │ │ │ +Returns the stencil table to compute local point face-varying values. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumControlVertices(int array) const │ │ │ │ │ +Returns the number of control vertices in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_~_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +~PatchTable() │ │ │ │ │ +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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +void EvaluateBasisFaceVarying(PatchHandle const &handle, REAL u, REAL v, REAL │ │ │ │ │ +wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0, │ │ │ │ │ +int channel=0) const │ │ │ │ │ +Evaluate basis functions for a face-varying value and derivatives at a given │ │ │ │ │ +(u,v) parametric locatio... │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_Q_u_a_d_O_f_f_s_e_t_s │ │ │ │ │ +ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const │ │ │ │ │ +Returns the 'QuadOffsets' for the Gregory patch identified by handle. │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_I_r_r_e_g_u_l_a_r │ │ │ │ │ +PatchDescriptor GetFVarPatchDescriptorIrregular(int channel=0) const │ │ │ │ │ +Returns the irregular patch descriptor for channel. │ │ │ │ │ +_O_p_e_n_S_u_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_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e │ │ │ │ │ +float GetSingleCreasePatchSharpnessValue(int array, int patch) const │ │ │ │ │ +Returns the crease sharpness for the patch in array if it is a single-crease │ │ │ │ │ +patch,... │ │ │ │ │ +_O_p_e_n_S_u_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_S_h_a_r_p_n_e_s_s_I_n_d_i_c_e_s │ │ │ │ │ +Index * getSharpnessIndices(Index arrayIndex) │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s │ │ │ │ │ +void ComputeLocalPointValues(T const *src, T *dst) const │ │ │ │ │ +Updates 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_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e │ │ │ │ │ +float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const │ │ │ │ │ +Returns the crease sharpness for the patch identified by handle if it is a │ │ │ │ │ +single-crease patch,... │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +PatchParam GetPatchParam(int array, int patch) const │ │ │ │ │ +Returns the PatchParam for patch in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +ConstIndexArray GetPatchFVarValues(int array, int patch, int channel=0) const │ │ │ │ │ +Returns the value indices for a given patch in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_R_e_g_u_l_a_r │ │ │ │ │ +PatchDescriptor GetFVarPatchDescriptorRegular(int channel=0) const │ │ │ │ │ +Returns the regular patch descriptor for channel. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const │ │ │ │ │ +Returns the PatchDescriptor for the patch identified by handle. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_V_e_r_t_s_T_a_b_l_e │ │ │ │ │ +std::vector< Index > PatchVertsTable │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_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_a_b_l_e │ │ │ │ │ +QuadOffsetsTable const & GetQuadOffsetsTable() const │ │ │ │ │ +Returns the quad-offsets table. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_a_t_c_h_e_s │ │ │ │ │ +int GetNumPatches(int array) const │ │ │ │ │ +Returns the number of patches in 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_:_:_F_a_r_:_:_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_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor GetVaryingPatchDescriptor() const │ │ │ │ │ +Returns the varying patch descriptor. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Returns the value indices for a given patch in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ +ConstPatchParamArray const GetPatchParams(int array) const │ │ │ │ │ +Returns the PatchParams for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumControlVerticesTotal() const │ │ │ │ │ +Returns the total number of control vertex indices in the table. │ │ │ │ │ +DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_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. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ +ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Returns the face-varying for a given patch in array in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_I_n_d_e_x │ │ │ │ │ +Index getPatchIndex(int array, int patch) 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_T_a_b_l_e_:_:_G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s │ │ │ │ │ +int GetNumLocalPoints() const │ │ │ │ │ +Returns the number of local vertex points. │ │ │ │ │ +_O_p_e_n_S_u_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_:_: │ │ │ │ │ +_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ +bool LocalPointVaryingStencilPrecisionMatchesType() const │ │ │ │ │ +Tests if the precision of the stencil table to compute local point varying │ │ │ │ │ +values matches the given f... │ │ │ │ │ +_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchArrayVertices(int array) const │ │ │ │ │ +Returns the control vertex indices for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_t_e_x_F_a_c_e_s │ │ │ │ │ +int GetNumPtexFaces() const │ │ │ │ │ +Returns the total number of ptex faces in the mesh. │ │ │ │ │ +DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +ConstIndexArray GetFVarValues(int channel=0) const │ │ │ │ │ +Returns an array of value indices for the patches in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y │ │ │ │ │ +Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray │ │ │ │ │ +Accessors for the gregory patch evaluation buffers. These methods will be │ │ │ │ │ +deprecated. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_2_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_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s │ │ │ │ │ +void EvaluateBasis(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL │ │ │ │ │ +wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const │ │ │ │ │ +Evaluate basis functions for position and derivatives at a given (u,v) │ │ │ │ │ +parametric location of a patch... │ │ │ │ │ +_O_p_e_n_S_u_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_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ +StencilTableReal< REAL > const * GetLocalPointFaceVaryingStencilTable(int │ │ │ │ │ +channel=0) const │ │ │ │ │ +Returns the stencil table to compute local point face-varying values. │ │ │ │ │ +_O_p_e_n_S_u_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_N_u_m_P_a_t_c_h_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumPatchesTotal() const │ │ │ │ │ +Returns the total number of patches stored in 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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +PatchParam GetPatchParam(PatchHandle const &handle) const │ │ │ │ │ +Returns a PatchParam for the patch identified by handle. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_p_r_i_n_t │ │ │ │ │ +void print() const │ │ │ │ │ +debug helper │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_C_h_a_n_n_e_l_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int │ │ │ │ │ +channel=0) const │ │ │ │ │ +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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_S_h_a_r_p_n_e_s_s_I_n_d_e_x_T_a_b_l_e │ │ │ │ │ +std::vector< Index > const & GetSharpnessIndexTable() const │ │ │ │ │ +Returns a sharpness index table for each patch (if exists) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor GetPatchArrayDescriptor(int array) const │ │ │ │ │ +Returns the PatchDescriptor for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ +friend class PatchTableBuilder │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g │ │ │ │ │ +void EvaluateBasisVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], │ │ │ │ │ +REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const │ │ │ │ │ +Evaluate basis functions for a varying value and derivatives at a given (u,v) │ │ │ │ │ +parametric location of ... │ │ │ │ │ +_O_p_e_n_S_u_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_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e │ │ │ │ │ +std::vector< unsigned int > QuadOffsetsTable │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetPatchVertices(int array, int patch) const │ │ │ │ │ +Returns the control vertex indices for patch in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Returns the value indices for a given patch in channel. │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_V_a_l_u_e_S_t_r_i_d_e │ │ │ │ │ +int GetFVarValueStride(int channel=0) const │ │ │ │ │ +Returns the stride between patches in the value index array of channel. │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ +ConstPatchParamArray GetFVarPatchParams(int channel=0) const │ │ │ │ │ +Returns an array of face-varying patch param for channel. │ │ │ │ │ +_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor GetFVarPatchDescriptor(int channel=0) const │ │ │ │ │ +Returns the default/irregular patch descriptor for channel. │ │ │ │ │ +_O_p_e_n_S_u_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_N_u_m_L_o_c_a_l_P_o_i_n_t_s_V_a_r_y_i_n_g │ │ │ │ │ +int GetNumLocalPointsVarying() const │ │ │ │ │ +Returns the number of local varying points. │ │ │ │ │ +_O_p_e_n_S_u_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_:_: │ │ │ │ │ +_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ +bool LocalPointStencilPrecisionMatchesType() const │ │ │ │ │ +Tests if the precision of the stencil table to compute local point vertex │ │ │ │ │ +values matches the given fl... │ │ │ │ │ +_O_p_e_n_S_u_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 │ │ │ │ │ +StencilTableReal< REAL > const * GetLocalPointVaryingStencilTable() const │ │ │ │ │ +Returns the stencil table to compute local point varying values. │ │ │ │ │ +_O_p_e_n_S_u_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_N_u_m_L_o_c_a_l_P_o_i_n_t_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ +int GetNumLocalPointsFaceVarying(int channel=0) const │ │ │ │ │ +Returns the number of local face-varying points for channel. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ +Handle that can be used as unique patch identifier within PatchTable. │ │ │ │ │ +DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_p_a_t_c_h_I_n_d_e_x │ │ │ │ │ +Index patchIndex │ │ │ │ │ +DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_a_r_r_a_y_I_n_d_e_x │ │ │ │ │ +Index arrayIndex │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_v_e_r_t_I_n_d_e_x │ │ │ │ │ +Index vertIndex │ │ │ │ │ +DDeeffiinniittiioonn _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_:_:_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_:_:_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_:_:_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_:_:_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_0_5 │ │ │ │ │ * _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 │ │ │ │ │ + * _p_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00875.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyLevel.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyRefiner.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,44 +90,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    topologyLevel.h File Reference
    │ │ │ │ +
    topologyRefiner.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../vtr/level.h"
    │ │ │ │ -#include "../vtr/refinement.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │ #include "../far/types.h"
    │ │ │ │ +#include "../far/topologyLevel.h"
    │ │ │ │ #include <vector>
    │ │ │ │
    │ │ │ │

    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...
    class  TopologyRefiner
     Stores topology data for a specified set of refinement options. More...
     
    struct  TopologyRefiner::UniformOptions
     Uniform refinement options. More...
     
    struct  TopologyRefiner::AdaptiveOptions
     Adaptive refinement options. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,37 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -topologyLevel.h File Reference │ │ │ │ │ +topologyRefiner.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ -#include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._h" │ │ │ │ │ #include "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ +#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_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_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ -  An interface for accessing data in a specific level of a refined │ │ │ │ │ - topology hierarchy. _M_o_r_e_._._. │ │ │ │ │ + class   _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. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _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. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _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. _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_:_:_V_t_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_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_L_e_v_e_l_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00875.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ │ var a00875 = [ │ │ │ │ │ - ["TopologyLevel", "a01105.html", "a01105"] │ │ │ │ │ + ["TopologyRefiner", "a01113.html", "a01113"], │ │ │ │ │ + ["UniformOptions", "a01117.html", "a01117"], │ │ │ │ │ + ["AdaptiveOptions", "a01121.html", "a01121"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00875_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyLevel.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyRefiner.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    topologyLevel.h
    │ │ │ │ +
    topologyRefiner.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,228 +118,305 @@ │ │ │ │
    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_LEVEL_H
    │ │ │ │ -
    25#define OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H
    │ │ │ │ +
    25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H
    │ │ │ │
    26
    │ │ │ │
    27#include "../version.h"
    │ │ │ │
    28
    │ │ │ │ -
    29#include "../vtr/level.h"
    │ │ │ │ -
    30#include "../vtr/refinement.h"
    │ │ │ │ +
    29#include "../sdc/types.h"
    │ │ │ │ +
    30#include "../sdc/options.h"
    │ │ │ │
    31#include "../far/types.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33#include <vector>
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace Far {
    │ │ │ │ +
    32#include "../far/topologyLevel.h"
    │ │ │ │ +
    33
    │ │ │ │ +
    34#include <vector>
    │ │ │ │ +
    35
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace OpenSubdiv {
    │ │ │ │ +
    38namespace OPENSUBDIV_VERSION {
    │ │ │ │
    39
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    50
    │ │ │ │ -
    51public:
    │ │ │ │ -
    53
    │ │ │ │ +
    40namespace Vtr { namespace internal { class SparseSelector; } }
    │ │ │ │ +
    41namespace Far { namespace internal { class FeatureMask; } }
    │ │ │ │ +
    42
    │ │ │ │ +
    43namespace Far {
    │ │ │ │ +
    44
    │ │ │ │ +
    45template <typename REAL> class PrimvarRefinerReal;
    │ │ │ │ +
    46template <class MESH> class TopologyRefinerFactory;
    │ │ │ │ +
    47
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    52
    │ │ │ │ +
    53public:
    │ │ │ │ +
    54
    │ │ │ │ + │ │ │ │ +
    57
    │ │ │ │ + │ │ │ │
    60
    │ │ │ │ -
    62 int GetNumVertices() const { return _level->getNumVertices(); }
    │ │ │ │ +
    62 Sdc::SchemeType GetSchemeType() const { return _subdivType; }
    │ │ │ │
    63
    │ │ │ │ -
    65 int GetNumFaces() const { return _level->getNumFaces(); }
    │ │ │ │ +
    65 Sdc::Options GetSchemeOptions() const { return _subdivOptions; }
    │ │ │ │
    66
    │ │ │ │ -
    68 int GetNumEdges() const { return _level->getNumEdges(); }
    │ │ │ │ +
    68 bool IsUniform() const { return _isUniform; }
    │ │ │ │
    69
    │ │ │ │ -
    71 int GetNumFaceVertices() const { return _level->getNumFaceVerticesTotal(); }
    │ │ │ │ -
    73
    │ │ │ │ +
    71 int GetNumLevels() const { return (int)_farLevels.size(); }
    │ │ │ │ +
    72
    │ │ │ │ +
    74 int GetMaxLevel() const { return _maxLevel; }
    │ │ │ │
    75
    │ │ │ │ -
    90 //
    │ │ │ │ -
    91
    │ │ │ │ -
    93 ConstIndexArray GetFaceVertices(Index f) const { return _level->getFaceVertices(f); }
    │ │ │ │ -
    94
    │ │ │ │ -
    96 ConstIndexArray GetFaceEdges(Index f) const { return _level->getFaceEdges(f); }
    │ │ │ │ -
    97
    │ │ │ │ -
    99 ConstIndexArray GetEdgeVertices(Index e) const { return _level->getEdgeVertices(e); }
    │ │ │ │ +
    77 int GetMaxValence() const { return _maxValence; }
    │ │ │ │ +
    78
    │ │ │ │ +
    80 bool HasHoles() const { return _hasHoles; }
    │ │ │ │ +
    81
    │ │ │ │ +
    83 int GetNumVerticesTotal() const { return _totalVertices; }
    │ │ │ │ +
    84
    │ │ │ │ +
    86 int GetNumEdgesTotal() const { return _totalEdges; }
    │ │ │ │ +
    87
    │ │ │ │ +
    89 int GetNumFacesTotal() const { return _totalFaces; }
    │ │ │ │ +
    90
    │ │ │ │ +
    92 int GetNumFaceVerticesTotal() const { return _totalFaceVertices; }
    │ │ │ │ +
    93
    │ │ │ │ +
    95 TopologyLevel const & GetLevel(int level) const { return _farLevels[level]; }
    │ │ │ │ +
    96
    │ │ │ │ +
    98
    │ │ │ │
    100
    │ │ │ │ -
    102 ConstIndexArray GetEdgeFaces(Index e) const { return _level->getEdgeFaces(e); }
    │ │ │ │ -
    103
    │ │ │ │ -
    105 ConstIndexArray GetVertexFaces(Index v) const { return _level->getVertexFaces(v); }
    │ │ │ │ -
    106
    │ │ │ │ -
    108 ConstIndexArray GetVertexEdges(Index v) const { return _level->getVertexEdges(v); }
    │ │ │ │ -
    109
    │ │ │ │ -
    111 ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const { return _level->getVertexFaceLocalIndices(v); }
    │ │ │ │ -
    112
    │ │ │ │ -
    114 ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const { return _level->getVertexEdgeLocalIndices(v); }
    │ │ │ │ -
    115
    │ │ │ │ -
    117 ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const { return _level->getEdgeFaceLocalIndices(e); }
    │ │ │ │ -
    118
    │ │ │ │ -
    120 Index FindEdge(Index v0, Index v1) const { return _level->findEdge(v0, v1); }
    │ │ │ │ -
    122
    │ │ │ │ +
    101 //
    │ │ │ │ +
    102 // Uniform refinement
    │ │ │ │ +
    103 //
    │ │ │ │ +
    104
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    119
    │ │ │ │ +
    │ │ │ │ +
    120 UniformOptions(int level) :
    │ │ │ │ +
    121 refinementLevel(level & 0xf),
    │ │ │ │ + │ │ │ │ +
    123 fullTopologyInLastLevel(false) { }
    │ │ │ │ +
    │ │ │ │
    124
    │ │ │ │ -
    126
    │ │ │ │ -
    128 bool IsEdgeNonManifold(Index e) const { return _level->isEdgeNonManifold(e); }
    │ │ │ │ -
    129
    │ │ │ │ -
    131 bool IsVertexNonManifold(Index v) const { return _level->isVertexNonManifold(v); }
    │ │ │ │ -
    132
    │ │ │ │ -
    134 bool IsEdgeBoundary(Index e) const { return _level->getEdgeTag(e)._boundary; }
    │ │ │ │ +
    126 void SetRefinementLevel(int level) { refinementLevel = level & 0xf; }
    │ │ │ │ +
    127
    │ │ │ │ +
    128 unsigned int refinementLevel:4,
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    134 };
    │ │ │ │ +
    │ │ │ │
    135
    │ │ │ │ -
    137 bool IsVertexBoundary(Index v) const { return _level->getVertexTag(v)._boundary; }
    │ │ │ │ -
    138
    │ │ │ │ -
    140 bool IsVertexCorner(Index v) const { return (_level->getNumVertexFaces(v) == 1); }
    │ │ │ │ -
    141
    │ │ │ │ -
    162 bool IsVertexValenceRegular(Index v) const { return !_level->getVertexTag(v)._xordinary || IsVertexCorner(v); }
    │ │ │ │ -
    164
    │ │ │ │ -
    166
    │ │ │ │ + │ │ │ │ +
    147
    │ │ │ │ +
    149 UniformOptions GetUniformOptions() const { return _uniformOptions; }
    │ │ │ │ +
    150
    │ │ │ │ +
    151 //
    │ │ │ │ +
    152 // Adaptive refinement
    │ │ │ │ +
    153 //
    │ │ │ │ +
    154
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    157
    │ │ │ │ +
    │ │ │ │ +
    158 AdaptiveOptions(int level) :
    │ │ │ │ +
    159 isolationLevel(level & 0xf),
    │ │ │ │ +
    160 secondaryLevel(0xf),
    │ │ │ │ + │ │ │ │ +
    162 useInfSharpPatch(false),
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    │ │ │ │ +
    165
    │ │ │ │ +
    167 void SetIsolationLevel(int level) { isolationLevel = level & 0xf; }
    │ │ │ │ +
    168
    │ │ │ │ +
    170 void SetSecondaryLevel(int level) { secondaryLevel = level & 0xf; }
    │ │ │ │
    171
    │ │ │ │ -
    173 float GetEdgeSharpness(Index e) const { return _level->getEdgeSharpness(e); }
    │ │ │ │ -
    174
    │ │ │ │ -
    176 float GetVertexSharpness(Index v) const { return _level->getVertexSharpness(v); }
    │ │ │ │ -
    177
    │ │ │ │ -
    179 bool IsEdgeInfSharp(Index e) const { return _level->getEdgeTag(e)._infSharp; }
    │ │ │ │ -
    180
    │ │ │ │ -
    182 bool IsVertexInfSharp(Index v) const { return _level->getVertexTag(v)._infSharp; }
    │ │ │ │ -
    183
    │ │ │ │ -
    185 bool IsEdgeSemiSharp(Index e) const { return _level->getEdgeTag(e)._semiSharp; }
    │ │ │ │ -
    186
    │ │ │ │ -
    188 bool IsVertexSemiSharp(Index v) const { return _level->getVertexTag(v)._semiSharp; }
    │ │ │ │ -
    189
    │ │ │ │ -
    191 bool IsFaceHole(Index f) const { return _level->isFaceHole(f); }
    │ │ │ │ -
    192
    │ │ │ │ -
    194 Sdc::Crease::Rule GetVertexRule(Index v) const { return _level->getVertexRule(v); }
    │ │ │ │ -
    196
    │ │ │ │ -
    198
    │ │ │ │ -
    228
    │ │ │ │ -
    230 int GetNumFVarChannels() const { return _level->getNumFVarChannels(); }
    │ │ │ │ -
    231
    │ │ │ │ -
    234 int GetNumFVarValues(int channel = 0) const { return _level->getNumFVarValues(channel); }
    │ │ │ │ -
    235
    │ │ │ │ -
    │ │ │ │ -
    237 ConstIndexArray GetFaceFVarValues(Index f, int channel = 0) const {
    │ │ │ │ -
    238 return _level->getFaceFVarValues(f, channel);
    │ │ │ │ -
    239 }
    │ │ │ │ -
    │ │ │ │ -
    240
    │ │ │ │ -
    │ │ │ │ -
    242 bool DoesVertexFVarTopologyMatch(Index v, int channel = 0) const {
    │ │ │ │ -
    243 return _level->doesVertexFVarTopologyMatch(v, channel);
    │ │ │ │ -
    244 }
    │ │ │ │ -
    │ │ │ │ -
    245
    │ │ │ │ -
    │ │ │ │ -
    247 bool DoesEdgeFVarTopologyMatch(Index e, int channel = 0) const {
    │ │ │ │ -
    248 return _level->doesEdgeFVarTopologyMatch(e, channel);
    │ │ │ │ -
    249 }
    │ │ │ │ -
    │ │ │ │ -
    250
    │ │ │ │ -
    │ │ │ │ -
    252 bool DoesFaceFVarTopologyMatch(Index f, int channel = 0) const {
    │ │ │ │ -
    253 return _level->doesFaceFVarTopologyMatch(f, channel);
    │ │ │ │ -
    254 }
    │ │ │ │ -
    │ │ │ │ +
    172 unsigned int isolationLevel:4;
    │ │ │ │ +
    174 unsigned int secondaryLevel:4;
    │ │ │ │ +
    176 unsigned int useSingleCreasePatch:1;
    │ │ │ │ +
    178 unsigned int useInfSharpPatch:1;
    │ │ │ │ +
    180 unsigned int considerFVarChannels:1;
    │ │ │ │ + │ │ │ │ +
    184 };
    │ │ │ │ +
    │ │ │ │ +
    185
    │ │ │ │ + │ │ │ │ +
    193 ConstIndexArray selectedFaces = ConstIndexArray());
    │ │ │ │ +
    194
    │ │ │ │ +
    196 AdaptiveOptions GetAdaptiveOptions() const { return _adaptiveOptions; }
    │ │ │ │ +
    197
    │ │ │ │ +
    199 void Unrefine();
    │ │ │ │ +
    200
    │ │ │ │ +
    201
    │ │ │ │ +
    203
    │ │ │ │ +
    205
    │ │ │ │ +
    207 int GetNumFVarChannels() const;
    │ │ │ │ +
    208
    │ │ │ │ + │ │ │ │ +
    211
    │ │ │ │ +
    213 int GetNumFVarValuesTotal(int channel = 0) const;
    │ │ │ │ +
    214
    │ │ │ │ +
    216
    │ │ │ │ +
    217protected:
    │ │ │ │ +
    218
    │ │ │ │ +
    219 //
    │ │ │ │ +
    220 // Lower level protected methods intended strictly for internal use:
    │ │ │ │ +
    221 //
    │ │ │ │ +
    222 template <class MESH>
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    225 friend class PatchTableBuilder;
    │ │ │ │ +
    226 friend class PatchBuilder;
    │ │ │ │ +
    227 friend class PtexIndices;
    │ │ │ │ +
    228 template <typename REAL>
    │ │ │ │ +
    229 friend class PrimvarRefinerReal;
    │ │ │ │ +
    230
    │ │ │ │ +
    231 // Copy constructor exposed via the factory class:
    │ │ │ │ + │ │ │ │ +
    233
    │ │ │ │ +
    234public:
    │ │ │ │ +
    235 // Levels and Refinements available internally (avoids need for more friends)
    │ │ │ │ +
    236 Vtr::internal::Level & getLevel(int l) { return *_levels[l]; }
    │ │ │ │ +
    237 Vtr::internal::Level const & getLevel(int l) const { return *_levels[l]; }
    │ │ │ │ +
    238
    │ │ │ │ +
    239 Vtr::internal::Refinement & getRefinement(int l) { return *_refinements[l]; }
    │ │ │ │ +
    240 Vtr::internal::Refinement const & getRefinement(int l) const { return *_refinements[l]; }
    │ │ │ │ +
    241
    │ │ │ │ +
    242private:
    │ │ │ │ +
    243 // Not default constructible or copyable:
    │ │ │ │ +
    244 TopologyRefiner() : _uniformOptions(0), _adaptiveOptions(0) { }
    │ │ │ │ +
    245 TopologyRefiner & operator=(TopologyRefiner const &) { return *this; }
    │ │ │ │ +
    246
    │ │ │ │ +
    247 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
    │ │ │ │ +
    248 internal::FeatureMask const & mask,
    │ │ │ │ +
    249 ConstIndexArray selectedFaces);
    │ │ │ │ +
    250 void selectLinearIrregularFaces(Vtr::internal::SparseSelector& selector,
    │ │ │ │ +
    251 ConstIndexArray selectedFaces);
    │ │ │ │ +
    252
    │ │ │ │ +
    253 void initializeInventory();
    │ │ │ │ +
    254 void updateInventory(Vtr::internal::Level const & newLevel);
    │ │ │ │
    255
    │ │ │ │ -
    257
    │ │ │ │ +
    256 void appendLevel(Vtr::internal::Level & newLevel);
    │ │ │ │ +
    257 void appendRefinement(Vtr::internal::Refinement & newRefinement);
    │ │ │ │ +
    258 void assembleFarLevels();
    │ │ │ │
    259
    │ │ │ │ -
    260
    │ │ │ │ -
    262 ConstIndexArray GetFaceChildFaces(Index f) const { return _refToChild->getFaceChildFaces(f); }
    │ │ │ │ -
    263
    │ │ │ │ -
    265 ConstIndexArray GetFaceChildEdges(Index f) const { return _refToChild->getFaceChildEdges(f); }
    │ │ │ │ -
    266
    │ │ │ │ -
    268 ConstIndexArray GetEdgeChildEdges(Index e) const { return _refToChild->getEdgeChildEdges(e); }
    │ │ │ │ -
    269
    │ │ │ │ -
    271 Index GetFaceChildVertex( Index f) const { return _refToChild->getFaceChildVertex(f); }
    │ │ │ │ -
    272
    │ │ │ │ -
    274 Index GetEdgeChildVertex( Index e) const { return _refToChild->getEdgeChildVertex(e); }
    │ │ │ │ -
    275
    │ │ │ │ -
    277 Index GetVertexChildVertex(Index v) const { return _refToChild->getVertexChildVertex(v); }
    │ │ │ │ -
    278
    │ │ │ │ -
    280 Index GetFaceParentFace(Index f) const { return _refToParent->getChildFaceParentFace(f); }
    │ │ │ │ -
    282
    │ │ │ │ +
    260private:
    │ │ │ │ +
    261
    │ │ │ │ +
    262 Sdc::SchemeType _subdivType;
    │ │ │ │ +
    263 Sdc::Options _subdivOptions;
    │ │ │ │ +
    264
    │ │ │ │ +
    265 unsigned int _isUniform : 1;
    │ │ │ │ +
    266 unsigned int _hasHoles : 1;
    │ │ │ │ +
    267 unsigned int _hasIrregFaces : 1;
    │ │ │ │ +
    268 unsigned int _regFaceSize : 3;
    │ │ │ │ +
    269 unsigned int _maxLevel : 4;
    │ │ │ │ +
    270
    │ │ │ │ +
    271 // Options assigned on refinement:
    │ │ │ │ +
    272 UniformOptions _uniformOptions;
    │ │ │ │ +
    273 AdaptiveOptions _adaptiveOptions;
    │ │ │ │ +
    274
    │ │ │ │ +
    275 // Cumulative properties of all levels:
    │ │ │ │ +
    276 int _totalVertices;
    │ │ │ │ +
    277 int _totalEdges;
    │ │ │ │ +
    278 int _totalFaces;
    │ │ │ │ +
    279 int _totalFaceVertices;
    │ │ │ │ +
    280 int _maxValence;
    │ │ │ │ +
    281
    │ │ │ │ +
    282 // Note the base level may be shared with another instance
    │ │ │ │ +
    283 bool _baseLevelOwned;
    │ │ │ │
    284
    │ │ │ │ -
    285
    │ │ │ │ -
    286 bool ValidateTopology() const { return _level->validateTopology(); }
    │ │ │ │ -
    287 void PrintTopology(bool children = true) const { _level->print((children && _refToChild) ? _refToChild : 0); }
    │ │ │ │ -
    289
    │ │ │ │ +
    285 std::vector<Vtr::internal::Level *> _levels;
    │ │ │ │ +
    286 std::vector<Vtr::internal::Refinement *> _refinements;
    │ │ │ │ +
    287
    │ │ │ │ +
    288 std::vector<TopologyLevel> _farLevels;
    │ │ │ │ +
    289};
    │ │ │ │ +
    │ │ │ │
    290
    │ │ │ │ -
    291private:
    │ │ │ │ -
    292 friend class TopologyRefiner;
    │ │ │ │ -
    293
    │ │ │ │ -
    294 Vtr::internal::Level const * _level;
    │ │ │ │ -
    295 Vtr::internal::Refinement const * _refToParent;
    │ │ │ │ -
    296 Vtr::internal::Refinement const * _refToChild;
    │ │ │ │ -
    297
    │ │ │ │ -
    298public:
    │ │ │ │ -
    299 // Not intended for public use, but required by std::vector, etc...
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    302};
    │ │ │ │ -
    │ │ │ │ -
    303
    │ │ │ │ -
    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.
    │ │ │ │ -
    Stores topology data for a specified set of refinement options.
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    291
    │ │ │ │ +
    292inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    294
    │ │ │ │ +
    295 return _levels[0]->getNumFVarChannels();
    │ │ │ │ +
    296}
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    299
    │ │ │ │ +
    300 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
    │ │ │ │ +
    301}
    │ │ │ │ +
    │ │ │ │ +
    302
    │ │ │ │ +
    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.
    │ │ │ │ +
    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.
    │ │ │ │ +
    int GetNumFVarValuesTotal(int channel=0) const
    Returns the total number of face-varying values in all levels.
    │ │ │ │ +
    Vtr::internal::Refinement const & getRefinement(int l) const
    │ │ │ │ +
    Sdc::Options GetSchemeOptions() const
    Returns the subdivision options.
    │ │ │ │ + │ │ │ │ +
    bool IsUniform() const
    Returns true if uniform refinement has been applied.
    │ │ │ │ +
    Sdc::SchemeType GetSchemeType() const
    Returns the subdivision scheme.
    │ │ │ │ +
    int GetMaxLevel() const
    Returns the highest level of refinement.
    │ │ │ │ +
    TopologyRefiner(Sdc::SchemeType type, Sdc::Options options=Sdc::Options())
    Constructor.
    │ │ │ │ +
    int GetNumEdgesTotal() const
    Returns the total number of edges in all levels.
    │ │ │ │ + │ │ │ │ +
    int GetNumFVarChannels() const
    Returns the number of face-varying channels in the tables.
    │ │ │ │ +
    UniformOptions GetUniformOptions() const
    Returns the options specified on refinement.
    │ │ │ │ +
    int GetNumFacesTotal() const
    Returns the total number of edges in all levels.
    │ │ │ │ +
    int GetNumFaceVerticesTotal() const
    Returns the total number of face vertices in all levels.
    │ │ │ │ +
    Vtr::internal::Refinement & getRefinement(int l)
    │ │ │ │ +
    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.
    │ │ │ │ +
    int GetNumVerticesTotal() const
    Returns the total number of vertices in all levels.
    │ │ │ │ +
    void Unrefine()
    Unrefine the topology, keeping only the base level.
    │ │ │ │ +
    AdaptiveOptions GetAdaptiveOptions() const
    Returns the options specified on refinement.
    │ │ │ │ +
    Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const
    Returns the face-varying interpolation rule set for a given channel.
    │ │ │ │ +
    void RefineAdaptive(AdaptiveOptions options, ConstIndexArray selectedFaces=ConstIndexArray())
    Feature Adaptive topology refinement.
    │ │ │ │ + │ │ │ │ +
    unsigned int refinementLevel
    Number of refinement iterations.
    │ │ │ │ + │ │ │ │ +
    void SetRefinementLevel(int level)
    Set uniform refinement level.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -topologyLevel.h │ │ │ │ │ +topologyRefiner.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,387 +23,441 @@ │ │ │ │ │ 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_LEVEL_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../vtr/level.h" │ │ │ │ │ -30#include "../vtr/refinement.h" │ │ │ │ │ +29#include "../sdc/types.h" │ │ │ │ │ +30#include "../sdc/options.h" │ │ │ │ │ 31#include "../far/types.h" │ │ │ │ │ -32 │ │ │ │ │ -33#include │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ -37 │ │ │ │ │ -38namespace Far { │ │ │ │ │ +32#include "../far/topologyLevel.h" │ │ │ │ │ +33 │ │ │ │ │ +34#include │ │ │ │ │ +35 │ │ │ │ │ +36 │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ 39 │ │ │ │ │ -_4_9class _T_o_p_o_l_o_g_y_L_e_v_e_l { │ │ │ │ │ -50 │ │ │ │ │ -51public: │ │ │ │ │ -53 │ │ │ │ │ +_4_0namespace Vtr { namespace internal { class SparseSelector; } } │ │ │ │ │ +41namespace Far { namespace internal { class FeatureMask; } } │ │ │ │ │ +42 │ │ │ │ │ +43namespace Far { │ │ │ │ │ +44 │ │ │ │ │ +45template class PrimvarRefinerReal; │ │ │ │ │ +46template class TopologyRefinerFactory; │ │ │ │ │ +47 │ │ │ │ │ +_5_1class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r { │ │ │ │ │ +52 │ │ │ │ │ +53public: │ │ │ │ │ +54 │ │ │ │ │ +_5_6 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e type, _S_d_c_:_:_O_p_t_i_o_n_s options = _S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ +()); │ │ │ │ │ +57 │ │ │ │ │ +_5_9 _~_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(); │ │ │ │ │ 60 │ │ │ │ │ -_6_2 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const { return _level->getNumVertices(); } │ │ │ │ │ +_6_2 _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 _subdivType; } │ │ │ │ │ 63 │ │ │ │ │ -_6_5 int _G_e_t_N_u_m_F_a_c_e_s() const { return _level->getNumFaces(); } │ │ │ │ │ +_6_5 _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; } │ │ │ │ │ 66 │ │ │ │ │ -_6_8 int _G_e_t_N_u_m_E_d_g_e_s() const { return _level->getNumEdges(); } │ │ │ │ │ +_6_8 bool _I_s_U_n_i_f_o_r_m() const { return _isUniform; } │ │ │ │ │ 69 │ │ │ │ │ -_7_1 int _G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s() const { return _level->getNumFaceVerticesTotal(); } │ │ │ │ │ -73 │ │ │ │ │ +_7_1 int _G_e_t_N_u_m_L_e_v_e_l_s() const { return (int)_farLevels.size(); } │ │ │ │ │ +72 │ │ │ │ │ +_7_4 int _G_e_t_M_a_x_L_e_v_e_l() const { return _maxLevel; } │ │ │ │ │ 75 │ │ │ │ │ -90 // │ │ │ │ │ -91 │ │ │ │ │ -_9_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_V_e_r_t_i_c_e_s(_I_n_d_e_x f) const { return _level- │ │ │ │ │ ->getFaceVertices(f); } │ │ │ │ │ -94 │ │ │ │ │ -_9_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_E_d_g_e_s(_I_n_d_e_x f) const { return _level->getFaceEdges │ │ │ │ │ -(f); } │ │ │ │ │ -97 │ │ │ │ │ -_9_9 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_V_e_r_t_i_c_e_s(_I_n_d_e_x e) const { return _level- │ │ │ │ │ ->getEdgeVertices(e); } │ │ │ │ │ -100 │ │ │ │ │ -_1_0_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_F_a_c_e_s(_I_n_d_e_x e) const { return _level->getEdgeFaces │ │ │ │ │ -(e); } │ │ │ │ │ -103 │ │ │ │ │ -_1_0_5 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_F_a_c_e_s(_I_n_d_e_x v) const { return _level- │ │ │ │ │ ->getVertexFaces(v); } │ │ │ │ │ -106 │ │ │ │ │ -_1_0_8 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_E_d_g_e_s(_I_n_d_e_x v) const { return _level- │ │ │ │ │ ->getVertexEdges(v); } │ │ │ │ │ -109 │ │ │ │ │ -_1_1_1 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x v) const { return │ │ │ │ │ -_level->getVertexFaceLocalIndices(v); } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_4 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x v) const { return │ │ │ │ │ -_level->getVertexEdgeLocalIndices(v); } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_7 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x e) const { return │ │ │ │ │ -_level->getEdgeFaceLocalIndices(e); } │ │ │ │ │ -118 │ │ │ │ │ -_1_2_0 _I_n_d_e_x _F_i_n_d_E_d_g_e(_I_n_d_e_x v0, _I_n_d_e_x v1) const { return _level->findEdge(v0, v1); │ │ │ │ │ +_7_7 int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ +78 │ │ │ │ │ +_8_0 bool _H_a_s_H_o_l_e_s() const { return _hasHoles; } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s_T_o_t_a_l() const { return _totalVertices; } │ │ │ │ │ +84 │ │ │ │ │ +_8_6 int _G_e_t_N_u_m_E_d_g_e_s_T_o_t_a_l() const { return _totalEdges; } │ │ │ │ │ +87 │ │ │ │ │ +_8_9 int _G_e_t_N_u_m_F_a_c_e_s_T_o_t_a_l() const { return _totalFaces; } │ │ │ │ │ +90 │ │ │ │ │ +_9_2 int _G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s_T_o_t_a_l() const { return _totalFaceVertices; } │ │ │ │ │ +93 │ │ │ │ │ +_9_5 _T_o_p_o_l_o_g_y_L_e_v_e_l const & _G_e_t_L_e_v_e_l(int level) const { return _farLevels[level]; │ │ │ │ │ } │ │ │ │ │ -122 │ │ │ │ │ +96 │ │ │ │ │ +98 │ │ │ │ │ +100 │ │ │ │ │ +101 // │ │ │ │ │ +102 // Uniform refinement │ │ │ │ │ +103 // │ │ │ │ │ +104 │ │ │ │ │ +_1_1_8 struct _U_n_i_f_o_r_m_O_p_t_i_o_n_s { │ │ │ │ │ +119 │ │ │ │ │ +_1_2_0 _U_n_i_f_o_r_m_O_p_t_i_o_n_s(int level) : │ │ │ │ │ +121 _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l(level & 0xf), │ │ │ │ │ +122 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t(false), │ │ │ │ │ +123 _f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l(false) { } │ │ │ │ │ 124 │ │ │ │ │ -126 │ │ │ │ │ -_1_2_8 bool _I_s_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_I_n_d_e_x e) const { return _level->isEdgeNonManifold │ │ │ │ │ -(e); } │ │ │ │ │ -129 │ │ │ │ │ -_1_3_1 bool _I_s_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_I_n_d_e_x v) const { return _level- │ │ │ │ │ ->isVertexNonManifold(v); } │ │ │ │ │ -132 │ │ │ │ │ -_1_3_4 bool _I_s_E_d_g_e_B_o_u_n_d_a_r_y(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ -(e)._boundary; } │ │ │ │ │ +_1_2_6 void _S_e_t_R_e_f_i_n_e_m_e_n_t_L_e_v_e_l(int level) { _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l = level & 0xf; } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 unsigned int _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l:4, │ │ │ │ │ +_1_2_9 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t:1, │ │ │ │ │ +_1_3_1 _f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l:1; │ │ │ │ │ +134 }; │ │ │ │ │ 135 │ │ │ │ │ -_1_3_7 bool _I_s_V_e_r_t_e_x_B_o_u_n_d_a_r_y(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ -(v)._boundary; } │ │ │ │ │ -138 │ │ │ │ │ -_1_4_0 bool _I_s_V_e_r_t_e_x_C_o_r_n_e_r(_I_n_d_e_x v) const { return (_level->getNumVertexFaces(v) │ │ │ │ │ -== 1); } │ │ │ │ │ -141 │ │ │ │ │ -_1_6_2 bool _I_s_V_e_r_t_e_x_V_a_l_e_n_c_e_R_e_g_u_l_a_r(_I_n_d_e_x v) const { return !_level->getVertexTag │ │ │ │ │ -(v)._xordinary || _I_s_V_e_r_t_e_x_C_o_r_n_e_r(v); } │ │ │ │ │ -164 │ │ │ │ │ -166 │ │ │ │ │ +_1_4_6 void _R_e_f_i_n_e_U_n_i_f_o_r_m(_U_n_i_f_o_r_m_O_p_t_i_o_n_s options); │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 _U_n_i_f_o_r_m_O_p_t_i_o_n_s _G_e_t_U_n_i_f_o_r_m_O_p_t_i_o_n_s() const { return _uniformOptions; } │ │ │ │ │ +150 │ │ │ │ │ +151 // │ │ │ │ │ +152 // Adaptive refinement │ │ │ │ │ +153 // │ │ │ │ │ +154 │ │ │ │ │ +_1_5_6 struct _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s { │ │ │ │ │ +157 │ │ │ │ │ +_1_5_8 _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s(int level) : │ │ │ │ │ +159 _i_s_o_l_a_t_i_o_n_L_e_v_e_l(level & 0xf), │ │ │ │ │ +160 _s_e_c_o_n_d_a_r_y_L_e_v_e_l(0xf), │ │ │ │ │ +161 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h(false), │ │ │ │ │ +162 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h(false), │ │ │ │ │ +163 _c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s(false), │ │ │ │ │ +164 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t(false) { } │ │ │ │ │ +165 │ │ │ │ │ +_1_6_7 void _S_e_t_I_s_o_l_a_t_i_o_n_L_e_v_e_l(int level) { _i_s_o_l_a_t_i_o_n_L_e_v_e_l = level & 0xf; } │ │ │ │ │ +168 │ │ │ │ │ +_1_7_0 void _S_e_t_S_e_c_o_n_d_a_r_y_L_e_v_e_l(int level) { _s_e_c_o_n_d_a_r_y_L_e_v_e_l = level & 0xf; } │ │ │ │ │ 171 │ │ │ │ │ -_1_7_3 float _G_e_t_E_d_g_e_S_h_a_r_p_n_e_s_s(_I_n_d_e_x e) const { return _level->getEdgeSharpness(e); │ │ │ │ │ +_1_7_2 unsigned int _i_s_o_l_a_t_i_o_n_L_e_v_e_l:4; │ │ │ │ │ +_1_7_4 unsigned int _s_e_c_o_n_d_a_r_y_L_e_v_e_l:4; │ │ │ │ │ +_1_7_6 unsigned int _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h:1; │ │ │ │ │ +_1_7_8 unsigned int _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h:1; │ │ │ │ │ +_1_8_0 unsigned int _c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s:1; │ │ │ │ │ +_1_8_2 unsigned int _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t:1; │ │ │ │ │ +184 }; │ │ │ │ │ +185 │ │ │ │ │ +_1_9_2 void _R_e_f_i_n_e_A_d_a_p_t_i_v_e(_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options, │ │ │ │ │ +193 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces = _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y()); │ │ │ │ │ +194 │ │ │ │ │ +_1_9_6 _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s _G_e_t_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s() const { return _adaptiveOptions; } │ │ │ │ │ +197 │ │ │ │ │ +_1_9_9 void _U_n_r_e_f_i_n_e(); │ │ │ │ │ +200 │ │ │ │ │ +201 │ │ │ │ │ +203 │ │ │ │ │ +205 │ │ │ │ │ +207 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const; │ │ │ │ │ +208 │ │ │ │ │ +210 _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 _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(int │ │ │ │ │ +channel = 0) const; │ │ │ │ │ +211 │ │ │ │ │ +_2_1_3 int _G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s_T_o_t_a_l(int channel = 0) const; │ │ │ │ │ +214 │ │ │ │ │ +216 │ │ │ │ │ +217protected: │ │ │ │ │ +218 │ │ │ │ │ +219 // │ │ │ │ │ +220 // Lower level protected methods intended strictly for internal use: │ │ │ │ │ +221 // │ │ │ │ │ +222 template │ │ │ │ │ +_2_2_3 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y; │ │ │ │ │ +_2_2_4 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e; │ │ │ │ │ +_2_2_5 friend class _P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ +_2_2_6 friend class _P_a_t_c_h_B_u_i_l_d_e_r; │ │ │ │ │ +_2_2_7 friend class _P_t_e_x_I_n_d_i_c_e_s; │ │ │ │ │ +228 template │ │ │ │ │ +_2_2_9 friend class _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l; │ │ │ │ │ +230 │ │ │ │ │ +231 // Copy constructor exposed via the factory class: │ │ │ │ │ +_2_3_2 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & source); │ │ │ │ │ +233 │ │ │ │ │ +234public: │ │ │ │ │ +235 // Levels and Refinements available internally (avoids need for more │ │ │ │ │ +friends) │ │ │ │ │ +_2_3_6 Vtr::internal::Level & _g_e_t_L_e_v_e_l(int l) { return *_levels[l]; } │ │ │ │ │ +_2_3_7 Vtr::internal::Level const & _g_e_t_L_e_v_e_l(int l) const { return *_levels[l]; } │ │ │ │ │ +238 │ │ │ │ │ +_2_3_9 Vtr::internal::Refinement & _g_e_t_R_e_f_i_n_e_m_e_n_t(int l) { return *_refinements[l]; │ │ │ │ │ } │ │ │ │ │ -174 │ │ │ │ │ -_1_7_6 float _G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_I_n_d_e_x v) const { return _level->getVertexSharpness │ │ │ │ │ -(v); } │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 bool _I_s_E_d_g_e_I_n_f_S_h_a_r_p(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ -(e)._infSharp; } │ │ │ │ │ -180 │ │ │ │ │ -_1_8_2 bool _I_s_V_e_r_t_e_x_I_n_f_S_h_a_r_p(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ -(v)._infSharp; } │ │ │ │ │ -183 │ │ │ │ │ -_1_8_5 bool _I_s_E_d_g_e_S_e_m_i_S_h_a_r_p(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ -(e)._semiSharp; } │ │ │ │ │ -186 │ │ │ │ │ -_1_8_8 bool _I_s_V_e_r_t_e_x_S_e_m_i_S_h_a_r_p(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ -(v)._semiSharp; } │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 bool _I_s_F_a_c_e_H_o_l_e(_I_n_d_e_x f) const { return _level->isFaceHole(f); } │ │ │ │ │ -192 │ │ │ │ │ -_1_9_4 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e _G_e_t_V_e_r_t_e_x_R_u_l_e(_I_n_d_e_x v) const { return _level- │ │ │ │ │ ->getVertexRule(v); } │ │ │ │ │ -196 │ │ │ │ │ -198 │ │ │ │ │ -228 │ │ │ │ │ -_2_3_0 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return _level->getNumFVarChannels(); } │ │ │ │ │ -231 │ │ │ │ │ -_2_3_4 int _G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s(int channel = 0) const { return _level- │ │ │ │ │ ->getNumFVarValues(channel); } │ │ │ │ │ -235 │ │ │ │ │ -_2_3_7 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_I_n_d_e_x f, int channel = 0) const { │ │ │ │ │ -238 return _level->getFaceFVarValues(f, channel); │ │ │ │ │ -239 } │ │ │ │ │ -240 │ │ │ │ │ -_2_4_2 bool _D_o_e_s_V_e_r_t_e_x_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x v, int channel = 0) const { │ │ │ │ │ -243 return _level->doesVertexFVarTopologyMatch(v, channel); │ │ │ │ │ -244 } │ │ │ │ │ -245 │ │ │ │ │ -_2_4_7 bool _D_o_e_s_E_d_g_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x e, int channel = 0) const { │ │ │ │ │ -248 return _level->doesEdgeFVarTopologyMatch(e, channel); │ │ │ │ │ -249 } │ │ │ │ │ -250 │ │ │ │ │ -_2_5_2 bool _D_o_e_s_F_a_c_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x f, int channel = 0) const { │ │ │ │ │ -253 return _level->doesFaceFVarTopologyMatch(f, channel); │ │ │ │ │ -254 } │ │ │ │ │ +_2_4_0 Vtr::internal::Refinement const & _g_e_t_R_e_f_i_n_e_m_e_n_t(int l) const { return │ │ │ │ │ +*_refinements[l]; } │ │ │ │ │ +241 │ │ │ │ │ +242private: │ │ │ │ │ +243 // Not default constructible or copyable: │ │ │ │ │ +244 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() : _uniformOptions(0), _adaptiveOptions(0) { } │ │ │ │ │ +245 TopologyRefiner & operator=(TopologyRefiner const &) { return *this; } │ │ │ │ │ +246 │ │ │ │ │ +247 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& │ │ │ │ │ +selector, │ │ │ │ │ +248 internal::FeatureMask const & mask, │ │ │ │ │ +249 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces); │ │ │ │ │ +250 void selectLinearIrregularFaces(Vtr::internal::SparseSelector& selector, │ │ │ │ │ +251 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces); │ │ │ │ │ +252 │ │ │ │ │ +253 void initializeInventory(); │ │ │ │ │ +254 void updateInventory(Vtr::internal::Level const & newLevel); │ │ │ │ │ 255 │ │ │ │ │ -257 │ │ │ │ │ +256 void appendLevel(Vtr::internal::Level & newLevel); │ │ │ │ │ +257 void appendRefinement(Vtr::internal::Refinement & newRefinement); │ │ │ │ │ +258 void assembleFarLevels(); │ │ │ │ │ 259 │ │ │ │ │ -260 │ │ │ │ │ -_2_6_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_C_h_i_l_d_F_a_c_e_s(_I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ ->getFaceChildFaces(f); } │ │ │ │ │ -263 │ │ │ │ │ -_2_6_5 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_C_h_i_l_d_E_d_g_e_s(_I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ ->getFaceChildEdges(f); } │ │ │ │ │ -266 │ │ │ │ │ -_2_6_8 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_C_h_i_l_d_E_d_g_e_s(_I_n_d_e_x e) const { return _refToChild- │ │ │ │ │ ->getEdgeChildEdges(e); } │ │ │ │ │ -269 │ │ │ │ │ -_2_7_1 _I_n_d_e_x _G_e_t_F_a_c_e_C_h_i_l_d_V_e_r_t_e_x( _I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ ->getFaceChildVertex(f); } │ │ │ │ │ -272 │ │ │ │ │ -_2_7_4 _I_n_d_e_x _G_e_t_E_d_g_e_C_h_i_l_d_V_e_r_t_e_x( _I_n_d_e_x e) const { return _refToChild- │ │ │ │ │ ->getEdgeChildVertex(e); } │ │ │ │ │ -275 │ │ │ │ │ -_2_7_7 _I_n_d_e_x _G_e_t_V_e_r_t_e_x_C_h_i_l_d_V_e_r_t_e_x(_I_n_d_e_x v) const { return _refToChild- │ │ │ │ │ ->getVertexChildVertex(v); } │ │ │ │ │ -278 │ │ │ │ │ -_2_8_0 _I_n_d_e_x _G_e_t_F_a_c_e_P_a_r_e_n_t_F_a_c_e(_I_n_d_e_x f) const { return _refToParent- │ │ │ │ │ ->getChildFaceParentFace(f); } │ │ │ │ │ -282 │ │ │ │ │ +260private: │ │ │ │ │ +261 │ │ │ │ │ +262 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _subdivType; │ │ │ │ │ +263 _S_d_c_:_:_O_p_t_i_o_n_s _subdivOptions; │ │ │ │ │ +264 │ │ │ │ │ +265 unsigned int _isUniform : 1; │ │ │ │ │ +266 unsigned int _hasHoles : 1; │ │ │ │ │ +267 unsigned int _hasIrregFaces : 1; │ │ │ │ │ +268 unsigned int _regFaceSize : 3; │ │ │ │ │ +269 unsigned int _maxLevel : 4; │ │ │ │ │ +270 │ │ │ │ │ +271 // Options assigned on refinement: │ │ │ │ │ +272 UniformOptions _uniformOptions; │ │ │ │ │ +273 AdaptiveOptions _adaptiveOptions; │ │ │ │ │ +274 │ │ │ │ │ +275 // Cumulative properties of all levels: │ │ │ │ │ +276 int _totalVertices; │ │ │ │ │ +277 int _totalEdges; │ │ │ │ │ +278 int _totalFaces; │ │ │ │ │ +279 int _totalFaceVertices; │ │ │ │ │ +280 int _maxValence; │ │ │ │ │ +281 │ │ │ │ │ +282 // Note the base level may be shared with another instance │ │ │ │ │ +283 bool _baseLevelOwned; │ │ │ │ │ 284 │ │ │ │ │ -285 │ │ │ │ │ -_2_8_6 bool _V_a_l_i_d_a_t_e_T_o_p_o_l_o_g_y() const { return _level->validateTopology(); } │ │ │ │ │ -_2_8_7 void _P_r_i_n_t_T_o_p_o_l_o_g_y(bool children = true) const { _level->print((children && │ │ │ │ │ -_refToChild) ? _refToChild : 0); } │ │ │ │ │ -289 │ │ │ │ │ +285 std::vector _levels; │ │ │ │ │ +286 std::vector _refinements; │ │ │ │ │ +287 │ │ │ │ │ +288 std::vector _farLevels; │ │ │ │ │ +289}; │ │ │ │ │ 290 │ │ │ │ │ -291private: │ │ │ │ │ -_2_9_2 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r; │ │ │ │ │ -293 │ │ │ │ │ -294 Vtr::internal::Level const * _level; │ │ │ │ │ -295 Vtr::internal::Refinement const * _refToParent; │ │ │ │ │ -296 Vtr::internal::Refinement const * _refToChild; │ │ │ │ │ -297 │ │ │ │ │ -298public: │ │ │ │ │ -299 // Not intended for public use, but required by std::vector, etc... │ │ │ │ │ -_3_0_0 _T_o_p_o_l_o_g_y_L_e_v_e_l() { } │ │ │ │ │ -_3_0_1 _~_T_o_p_o_l_o_g_y_L_e_v_e_l() { } │ │ │ │ │ -302}; │ │ │ │ │ -303 │ │ │ │ │ -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 */ │ │ │ │ │ +291 │ │ │ │ │ +292inline int │ │ │ │ │ +_2_9_3_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() const { │ │ │ │ │ +294 │ │ │ │ │ +295 return _levels[0]->getNumFVarChannels(); │ │ │ │ │ +296} │ │ │ │ │ +297inline _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 │ │ │ │ │ +_2_9_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_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(int channel) const { │ │ │ │ │ +299 │ │ │ │ │ +300 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation(); │ │ │ │ │ +301} │ │ │ │ │ +302 │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_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_:_:_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_:_:_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_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ An interface for accessing data in a specific level of a refined topology │ │ │ │ │ hierarchy. │ │ │ │ │ DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_G_e_t_F_a_c_e_P_a_r_e_n_t_F_a_c_e │ │ │ │ │ -Index GetFaceParentFace(Index f) const │ │ │ │ │ -Return the parent face (in the previous level) of a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ -TopologyLevel() │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_V_a_l_e_n_c_e_R_e_g_u_l_a_r │ │ │ │ │ -bool IsVertexValenceRegular(Index v) const │ │ │ │ │ -Return if the valence of the vertex is regular (must be manifold) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float GetEdgeSharpness(Index e) const │ │ │ │ │ -Return the sharpness assigned a given edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_F_a_c_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ -bool DoesFaceFVarTopologyMatch(Index f, int channel=0) const │ │ │ │ │ -Return if face-varying topology around a face matches. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ -Sdc::Crease::Rule GetVertexRule(Index v) const │ │ │ │ │ -Return the subdivision rule assigned a given vertex specific to this level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_C_o_r_n_e_r │ │ │ │ │ -bool IsVertexCorner(Index v) const │ │ │ │ │ -Return if the vertex is a corner (only one incident face) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ -Index GetVertexChildVertex(Index v) const │ │ │ │ │ -Return the child vertex (in the next level) of a given vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const │ │ │ │ │ -Access the local indices of an edge with respect to its incident faces. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_E_d_g_e_s │ │ │ │ │ -ConstIndexArray GetFaceChildEdges(Index f) const │ │ │ │ │ -Access the child edges (in the next level) of a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_E_d_g_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ -bool DoesEdgeFVarTopologyMatch(Index e, int channel=0) const │ │ │ │ │ -Return if face-varying topology across the edge only matches. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_P_r_i_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ -void PrintTopology(bool children=true) const │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetFaceVertices(Index f) const │ │ │ │ │ -Access the vertices incident a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_F_a_c_e_s │ │ │ │ │ -ConstIndexArray GetFaceChildFaces(Index f) const │ │ │ │ │ -Access the child faces (in the next level) of a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_G_e_t_N_u_m_E_d_g_e_s │ │ │ │ │ -int GetNumEdges() const │ │ │ │ │ -Return the number of edges in this level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_V_a_l_i_d_a_t_e_T_o_p_o_l_o_g_y │ │ │ │ │ -bool ValidateTopology() const │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ -bool IsEdgeNonManifold(Index e) const │ │ │ │ │ -Return if the edge is non-manifold. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_F_a_c_e_H_o_l_e │ │ │ │ │ -bool IsFaceHole(Index f) const │ │ │ │ │ -Return if a given face has been tagged as a hole. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ -ConstIndexArray GetVertexEdges(Index v) const │ │ │ │ │ -Access the edges incident a given vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ -Index GetFaceChildVertex(Index f) const │ │ │ │ │ -Return the child vertex (in the next level) of a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_V_e_r_t_e_x_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ -bool DoesVertexFVarTopologyMatch(Index v, int channel=0) const │ │ │ │ │ -Return if face-varying topology around a vertex matches. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_C_h_i_l_d_E_d_g_e_s │ │ │ │ │ -ConstIndexArray GetEdgeChildEdges(Index e) const │ │ │ │ │ -Access the child edges (in the next level) of a given edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_I_n_f_S_h_a_r_p │ │ │ │ │ -bool IsEdgeInfSharp(Index e) const │ │ │ │ │ -Return if the edge is infinitely-sharp. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ -ConstIndexArray GetVertexFaces(Index v) const │ │ │ │ │ -Access the faces incident a given vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_F_i_n_d_E_d_g_e │ │ │ │ │ -Index FindEdge(Index v0, Index v1) const │ │ │ │ │ -Identify the edge matching the given vertex pair. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const │ │ │ │ │ -Access the local indices of a vertex with respect to its incident edges. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_E_d_g_e_s │ │ │ │ │ -ConstIndexArray GetFaceEdges(Index f) const │ │ │ │ │ -Access the edges incident a given face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ -int GetNumFaces() const │ │ │ │ │ -Return the number of faces in this level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_B_o_u_n_d_a_r_y │ │ │ │ │ -bool IsVertexBoundary(Index v) const │ │ │ │ │ -Return if the vertex is on a boundary (at least one incident boundary edge) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_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 (should be same for all levels) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_F_a_c_e_s │ │ │ │ │ -ConstIndexArray GetEdgeFaces(Index e) const │ │ │ │ │ -Access the faces incident a given edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -ConstIndexArray GetFaceFVarValues(Index f, int channel=0) const │ │ │ │ │ -Access the face-varying values associated with a particular face. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetEdgeVertices(Index e) const │ │ │ │ │ -Access the vertices incident a given edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_S_e_m_i_S_h_a_r_p │ │ │ │ │ -bool IsEdgeSemiSharp(Index e) const │ │ │ │ │ -Return if the edge is semi-sharp. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_~_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ -~TopologyLevel() │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_3_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -float GetVertexSharpness(Index v) const │ │ │ │ │ -Return the sharpness assigned a given vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ -Index GetEdgeChildVertex(Index e) const │ │ │ │ │ -Return the child vertex (in the next level) of a given edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_S_e_m_i_S_h_a_r_p │ │ │ │ │ -bool IsVertexSemiSharp(Index v) const │ │ │ │ │ -Return if the vertex is semi-sharp. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumFaceVertices() const │ │ │ │ │ -Return the total number of face-vertices, i.e. the sum of all vertices for all │ │ │ │ │ -faces. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ -bool IsVertexNonManifold(Index v) const │ │ │ │ │ -Return if the vertex is non-manifold. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_I_s_E_d_g_e_B_o_u_n_d_a_r_y │ │ │ │ │ -bool IsEdgeBoundary(Index e) const │ │ │ │ │ -Return if the edge is a boundary (only one incident face) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_I_n_f_S_h_a_r_p │ │ │ │ │ -bool IsVertexInfSharp(Index v) const │ │ │ │ │ -Return if the vertex is infinitely-sharp. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_L_e_v_e_l_:_:_G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -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... │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const │ │ │ │ │ -Access the local indices of a vertex with respect to its incident faces. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y │ │ │ │ │ +Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ +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_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 │ │ │ │ │ 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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +TopologyRefiner(TopologyRefiner const &source) │ │ │ │ │ +_O_p_e_n_S_u_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_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ +int GetMaxValence() const │ │ │ │ │ +Returns the maximum vertex valence in all levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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 │ │ │ │ │ +Vtr::internal::Level const & getLevel(int l) const │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_H_a_s_H_o_l_e_s │ │ │ │ │ +bool HasHoles() const │ │ │ │ │ +Returns true if faces have been tagged as holes. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_L_e_v_e_l_s │ │ │ │ │ +int GetNumLevels() const │ │ │ │ │ +Returns the number of refinement levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_V_a_l_u_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumFVarValuesTotal(int channel=0) const │ │ │ │ │ +Returns the total number of face-varying values in all levels. │ │ │ │ │ +_O_p_e_n_S_u_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_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +Vtr::internal::Refinement const & getRefinement(int l) const │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ +Sdc::Options GetSchemeOptions() const │ │ │ │ │ +Returns the subdivision options. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_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_:_:_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 │ │ │ │ │ +Vtr::internal::Level & getLevel(int l) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ +Sdc::SchemeType GetSchemeType() const │ │ │ │ │ +Returns the subdivision scheme. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_M_a_x_L_e_v_e_l │ │ │ │ │ +int GetMaxLevel() const │ │ │ │ │ +Returns the highest level of refinement. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +TopologyRefiner(Sdc::SchemeType type, Sdc::Options options=Sdc::Options()) │ │ │ │ │ +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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_E_d_g_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumEdgesTotal() const │ │ │ │ │ +Returns the total number of edges in all levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_P_a_t_c_h_B_u_i_l_d_e_r │ │ │ │ │ +friend class PatchBuilder │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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 │ │ │ │ │ +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_:_:_G_e_t_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ +UniformOptions GetUniformOptions() const │ │ │ │ │ +Returns the options specified on refinement. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_a_c_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumFacesTotal() const │ │ │ │ │ +Returns the total number of edges in all levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_a_c_e_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumFaceVerticesTotal() const │ │ │ │ │ +Returns the total number of face vertices in all levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_g_e_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +Vtr::internal::Refinement & getRefinement(int l) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_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_:_:_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_:_:_~_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +~TopologyRefiner() │ │ │ │ │ +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_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ +friend class PatchTableBuilder │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ +int GetNumVerticesTotal() const │ │ │ │ │ +Returns the total number of vertices in all levels. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_r_e_f_i_n_e │ │ │ │ │ +void Unrefine() │ │ │ │ │ +Unrefine the topology, keeping only the base level. │ │ │ │ │ +_O_p_e_n_S_u_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_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ +AdaptiveOptions GetAdaptiveOptions() const │ │ │ │ │ +Returns the options specified on refinement. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_: │ │ │ │ │ +_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 │ │ │ │ │ +Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) │ │ │ │ │ +const │ │ │ │ │ +Returns the face-varying interpolation rule set for a given channel. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_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_:_:_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_:_: │ │ │ │ │ +_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l │ │ │ │ │ +unsigned int refinementLevel │ │ │ │ │ +Number of refinement iterations. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ +_o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t │ │ │ │ │ +unsigned int orderVerticesFromFacesFirst │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ +_S_e_t_R_e_f_i_n_e_m_e_n_t_L_e_v_e_l │ │ │ │ │ +void SetRefinementLevel(int level) │ │ │ │ │ +Set uniform refinement level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ +UniformOptions(int level) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ +_s_e_c_o_n_d_a_r_y_L_e_v_e_l │ │ │ │ │ +unsigned int secondaryLevel │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ +_o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t │ │ │ │ │ +unsigned int orderVerticesFromFacesFirst │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ +AdaptiveOptions(int level) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_i_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ +unsigned int isolationLevel │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_:_:_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_:_: │ │ │ │ │ +_S_e_t_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ +void SetIsolationLevel(int level) │ │ │ │ │ +Set isolation level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_:_:_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_:_:_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_:_: │ │ │ │ │ +_S_e_t_S_e_c_o_n_d_a_r_y_L_e_v_e_l │ │ │ │ │ +void SetSecondaryLevel(int level) │ │ │ │ │ +Set secondary isolation level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_B_a_s_e │ │ │ │ │ +Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_L_e_v_e_l_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00878.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/primvarRefiner.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/patchMap.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,43 +90,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    primvarRefiner.h File Reference
    │ │ │ │ +
    patchMap.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 "../far/patchTable.h"
    │ │ │ │ #include <cassert>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PrimvarRefinerReal< REAL >
     Applies refinement operations to generic primvar data. More...
    class  PatchMap
     An quadtree-based map connecting coarse faces to their sub-patches. More...
     
    class  PrimvarRefiner
    struct  PatchMap::QuadNode::Child
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -135,13 +121,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +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 │ │ │ │ │ -primvarRefiner.h File Reference │ │ │ │ │ +patchMap.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 "_._._/_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 │ │ │ │ │ -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_a_t_c_h_M_a_p │ │ │ │ │ +  An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _P_r_i_m_v_a_r_R_e_f_i_n_e_r │ │ │ │ │ +struct   _P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ │   │ │ │ │ │ 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_a_t_c_h_M_a_p_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00878.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00878 = [ │ │ │ │ │ - ["PrimvarRefinerReal< REAL >", "a01021.html", "a01021"], │ │ │ │ │ - ["PrimvarRefiner", "a01029.html", "a01029"] │ │ │ │ │ + ["PatchMap", "a00977.html", "a00977"], │ │ │ │ │ + ["Child", "a00985.html", "a00985"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00878_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/primvarRefiner.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/patchMap.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    primvarRefiner.h
    │ │ │ │ +
    patchMap.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,1233 +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_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
    │ │ │ │ -
    45#include <cassert>
    │ │ │ │ -
    46
    │ │ │ │ -
    47namespace OpenSubdiv {
    │ │ │ │ -
    48namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    49
    │ │ │ │ -
    50namespace Far {
    │ │ │ │ +
    24
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_PATCH_MAP_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_PATCH_MAP_H
    │ │ │ │ +
    27
    │ │ │ │ +
    28#include "../version.h"
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../far/patchTable.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32#include <cassert>
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace Far {
    │ │ │ │ +
    38
    │ │ │ │ +
    │ │ │ │ +
    49class PatchMap {
    │ │ │ │ +
    50public:
    │ │ │ │
    51
    │ │ │ │ -
    55template <typename REAL>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    57
    │ │ │ │ -
    58public:
    │ │ │ │ -
    59 PrimvarRefinerReal(TopologyRefiner const & refiner) : _refiner(refiner) { }
    │ │ │ │ - │ │ │ │ -
    61
    │ │ │ │ -
    62 TopologyRefiner const & GetTopologyRefiner() const { return _refiner; }
    │ │ │ │ -
    63
    │ │ │ │ -
    65
    │ │ │ │ + │ │ │ │ +
    53
    │ │ │ │ +
    58 PatchMap( PatchTable const & patchTable );
    │ │ │ │ +
    59
    │ │ │ │ +
    74 Handle const * FindPatch( int patchFaceId, double u, double v ) const;
    │ │ │ │ +
    75
    │ │ │ │ +
    76private:
    │ │ │ │ +
    77 void initializeHandles(PatchTable const & patchTable);
    │ │ │ │ +
    78 void initializeQuadtree(PatchTable const & patchTable);
    │ │ │ │ +
    79
    │ │ │ │ +
    80private:
    │ │ │ │ +
    81 // Quadtree node with 4 children, tree is just a vector of nodes
    │ │ │ │ +
    82 struct QuadNode {
    │ │ │ │ +
    83 QuadNode() { std::memset(this, 0, sizeof(QuadNode)); }
    │ │ │ │ +
    84
    │ │ │ │ +
    │ │ │ │ +
    85 struct Child {
    │ │ │ │ +
    86 unsigned int isSet : 1; // true if the child has been set
    │ │ │ │ +
    87 unsigned int isLeaf : 1; // true if the child is a QuadNode
    │ │ │ │ +
    88 unsigned int index : 30; // child index (either QuadNode or Handle)
    │ │ │ │ +
    89 };
    │ │ │ │ +
    │ │ │ │ +
    90
    │ │ │ │ +
    91 // sets all the children to point to the patch of given index
    │ │ │ │ +
    92 void SetChildren(int index);
    │ │ │ │ +
    93
    │ │ │ │ +
    94 // sets the child in "quadrant" to point to the node or patch of the given index
    │ │ │ │ +
    95 void SetChild(int quadrant, int index, bool isLeaf);
    │ │ │ │ +
    96
    │ │ │ │ +
    97 Child children[4];
    │ │ │ │ +
    98 };
    │ │ │ │ +
    99 typedef std::vector<QuadNode> QuadTree;
    │ │ │ │
    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; }
    │ │ │ │ +
    101 // Internal methods supporting quadtree construction and queries
    │ │ │ │ +
    102 void assignRootNode(QuadNode * node, int index);
    │ │ │ │ +
    103 QuadNode * assignLeafOrChildNode(QuadNode * node, bool isLeaf, int quad, int index);
    │ │ │ │ +
    104
    │ │ │ │ +
    105 template <class T>
    │ │ │ │ +
    106 static int transformUVToQuadQuadrant(T const & median, T & u, T & v);
    │ │ │ │ +
    107 template <class T>
    │ │ │ │ +
    108 static int transformUVToTriQuadrant(T const & median, T & u, T & v, bool & rotated);
    │ │ │ │ +
    109
    │ │ │ │ +
    110private:
    │ │ │ │ +
    111 bool _patchesAreTriangular; // tri and quad assembly and search requirements differ
    │ │ │ │ +
    112
    │ │ │ │ +
    113 int _minPatchFace; // minimum patch face index supported by the map
    │ │ │ │ +
    114 int _maxPatchFace; // maximum patch face index supported by the map
    │ │ │ │ +
    115 int _maxDepth; // maximum depth of a patch in the tree
    │ │ │ │ +
    116
    │ │ │ │ +
    117 std::vector<Handle> _handles; // all the patches in the PatchTable
    │ │ │ │ +
    118 std::vector<QuadNode> _quadtree; // quadtree nodes
    │ │ │ │ +
    119};
    │ │ │ │ +
    │ │ │ │ +
    120
    │ │ │ │ +
    121//
    │ │ │ │ +
    122// Given a median value for both U and V, these methods transform a (u,v) pair
    │ │ │ │ +
    123// into the quadrant that contains them and returns the quadrant index.
    │ │ │ │ +
    124//
    │ │ │ │ +
    125// Quadrant indexing for tri and quad patches -- consistent with PatchParam's
    │ │ │ │ +
    126// usage of UV bits:
    │ │ │ │ +
    127//
    │ │ │ │ +
    128// (0,1) o-----o-----o (1,1) (0,1) o (1,0) o-----o-----o (0,0)
    │ │ │ │ +
    129// | | | |\ \ 1 |\ 0 |
    │ │ │ │ +
    130// | 2 | 3 | | \ \ | \ |
    │ │ │ │ +
    131// | | | | 2 \ \| 3 \|
    │ │ │ │ +
    132// o-----o-----o o-----o o-----o
    │ │ │ │ +
    133// | | | |\ 3 |\ \ 2 |
    │ │ │ │ +
    134// | 0 | 1 | | \ | \ \ |
    │ │ │ │ +
    135// | | | | 0 \| 1 \ \|
    │ │ │ │ +
    136// (0,0) o-----o-----o (1,0) (0,0) o-----o-----o (1,0) o (0,1)
    │ │ │ │ +
    137//
    │ │ │ │ +
    138// The triangular case also takes and returns/affects the rotation of the
    │ │ │ │ +
    139// quadrant being searched and identified (quadrant 3 imparts a rotation).
    │ │ │ │ +
    140//
    │ │ │ │ +
    141template <class T>
    │ │ │ │ +
    142inline int
    │ │ │ │ +
    143PatchMap::transformUVToQuadQuadrant(T const & median, T & u, T & v) {
    │ │ │ │ +
    144
    │ │ │ │ +
    145 int uHalf = (u >= median);
    │ │ │ │ +
    146 if (uHalf) u -= median;
    │ │ │ │ +
    147
    │ │ │ │ +
    148 int vHalf = (v >= median);
    │ │ │ │ +
    149 if (vHalf) v -= median;
    │ │ │ │ +
    150
    │ │ │ │ +
    151 return (vHalf << 1) | uHalf;
    │ │ │ │ +
    152}
    │ │ │ │ +
    153
    │ │ │ │ +
    154template <class T>
    │ │ │ │ +
    155int inline
    │ │ │ │ +
    156PatchMap::transformUVToTriQuadrant(T const & median, T & u, T & v, bool & rotated) {
    │ │ │ │ +
    157
    │ │ │ │ +
    158 if (!rotated) {
    │ │ │ │ +
    159 if (u >= median) {
    │ │ │ │ +
    160 u -= median;
    │ │ │ │ +
    161 return 1;
    │ │ │ │ +
    162 }
    │ │ │ │ +
    163 if (v >= median) {
    │ │ │ │ +
    164 v -= median;
    │ │ │ │ +
    165 return 2;
    │ │ │ │ +
    166 }
    │ │ │ │ +
    167 if ((u + v) >= median) {
    │ │ │ │ +
    168 rotated = true;
    │ │ │ │ +
    169 return 3;
    │ │ │ │ +
    170 }
    │ │ │ │ +
    171 return 0;
    │ │ │ │ +
    172 } else {
    │ │ │ │ +
    173 if (u < median) {
    │ │ │ │ +
    174 v -= median;
    │ │ │ │ +
    175 return 1;
    │ │ │ │ +
    176 }
    │ │ │ │ +
    177 if (v < median) {
    │ │ │ │ +
    178 u -= median;
    │ │ │ │ +
    179 return 2;
    │ │ │ │ +
    180 }
    │ │ │ │ +
    181 u -= median;
    │ │ │ │ +
    182 v -= median;
    │ │ │ │ +
    183 if ((u + v) < median) {
    │ │ │ │ +
    184 rotated = false;
    │ │ │ │ +
    185 return 3;
    │ │ │ │ +
    186 }
    │ │ │ │ +
    187 return 0;
    │ │ │ │ +
    188 }
    │ │ │ │ +
    189}
    │ │ │ │
    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;
    │ │ │ │ +
    192inline PatchMap::Handle const *
    │ │ │ │ +
    │ │ │ │ +
    193PatchMap::FindPatch( int faceid, double u, double v ) 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;
    │ │ │ │ +
    195 //
    │ │ │ │ +
    196 // Reject patch faces not supported by this map, or those corresponding
    │ │ │ │ +
    197 // to holes or otherwise unassigned (the root node for a patch will
    │ │ │ │ +
    198 // have all or no quadrants set):
    │ │ │ │ +
    199 //
    │ │ │ │ +
    200 if ((faceid < _minPatchFace) || (faceid > _maxPatchFace)) return 0;
    │ │ │ │
    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
    │ │ │ │ +
    202 QuadNode const * node = &_quadtree[faceid - _minPatchFace];
    │ │ │ │ +
    203
    │ │ │ │ +
    204 if (!node->children[0].isSet) return 0;
    │ │ │ │ +
    205
    │ │ │ │ +
    206 //
    │ │ │ │ +
    207 // Search the tree for the sub-patch containing the given (u,v)
    │ │ │ │ +
    208 //
    │ │ │ │ +
    209 assert( (u>=0.0) && (u<=1.0) && (v>=0.0) && (v<=1.0) );
    │ │ │ │ +
    210
    │ │ │ │ +
    211 double median = 0.5;
    │ │ │ │ +
    212 bool triRotated = false;
    │ │ │ │ +
    213
    │ │ │ │ +
    214 for (int depth = 0; depth <= _maxDepth; ++depth, median *= 0.5) {
    │ │ │ │
    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 { }
    │ │ │ │ +
    216 int quadrant = _patchesAreTriangular
    │ │ │ │ +
    217 ? transformUVToTriQuadrant(median, u, v, triRotated)
    │ │ │ │ +
    218 : transformUVToQuadQuadrant(median, u, v);
    │ │ │ │ +
    219
    │ │ │ │ +
    220 // holes should have been rejected at the root node of the face
    │ │ │ │ +
    221 assert(node->children[quadrant].isSet);
    │ │ │ │
    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]; }
    │ │ │ │ +
    223 if (node->children[quadrant].isLeaf) {
    │ │ │ │ +
    224 return &_handles[node->children[quadrant].index];
    │ │ │ │ +
    225 } else {
    │ │ │ │ +
    226 node = &_quadtree[node->children[quadrant].index];
    │ │ │ │ +
    227 }
    │ │ │ │ +
    228 }
    │ │ │ │ +
    229 assert(0);
    │ │ │ │ +
    230 return 0;
    │ │ │ │ +
    231}
    │ │ │ │ +
    │ │ │ │ +
    232
    │ │ │ │ +
    233} // end namespace Far
    │ │ │ │ +
    234
    │ │ │ │ +
    235} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    236using namespace OPENSUBDIV_VERSION;
    │ │ │ │
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    238} // end namespace OpenSubdiv
    │ │ │ │ +
    239
    │ │ │ │ +
    240#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */
    │ │ │ │ + │ │ │ │ +
    An quadtree-based map connecting coarse faces to their sub-patches.
    Definition patchMap.h:49
    │ │ │ │ +
    PatchMap(PatchTable const &patchTable)
    Constructor.
    │ │ │ │ +
    Handle const * FindPatch(int patchFaceId, double u, double v) const
    Returns a handle to the sub-patch of the face at the given (u,v). Note that the patch face ID corresp...
    Definition patchMap.h:193
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    Container for arrays of parametric patches.
    Definition patchTable.h:55
    │ │ │ │ +
    Handle that can be used as unique patch identifier within PatchTable.
    Definition patchTable.h:60
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -primvarRefiner.h │ │ │ │ │ +patchMap.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 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,1388 +23,239 @@ │ │ │ │ │ 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 │ │ │ │ │ -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 { │ │ │ │ │ -49 │ │ │ │ │ -50namespace Far { │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_PATCH_MAP_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_PATCH_MAP_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 │ │ │ │ │ +_4_9class _P_a_t_c_h_M_a_p { │ │ │ │ │ +50public: │ │ │ │ │ 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 │ │ │ │ │ +_5_2 typedef _P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e _H_a_n_d_l_e; │ │ │ │ │ +53 │ │ │ │ │ +_5_8 _P_a_t_c_h_M_a_p( _P_a_t_c_h_T_a_b_l_e const & patchTable ); │ │ │ │ │ +59 │ │ │ │ │ +74 _H_a_n_d_l_e const * _F_i_n_d_P_a_t_c_h( int patchFaceId, double u, double v ) const; │ │ │ │ │ +75 │ │ │ │ │ +76private: │ │ │ │ │ +77 void initializeHandles(_P_a_t_c_h_T_a_b_l_e const & patchTable); │ │ │ │ │ +78 void initializeQuadtree(_P_a_t_c_h_T_a_b_l_e const & patchTable); │ │ │ │ │ +79 │ │ │ │ │ +80private: │ │ │ │ │ +81 // Quadtree node with 4 children, tree is just a vector of nodes │ │ │ │ │ +82 struct QuadNode { │ │ │ │ │ +83 QuadNode() { std::memset(this, 0, sizeof(QuadNode)); } │ │ │ │ │ +84 │ │ │ │ │ +_8_5 struct _C_h_i_l_d { │ │ │ │ │ +_8_6 unsigned int _i_s_S_e_t : 1; // true if the child has been set │ │ │ │ │ +_8_7 unsigned int _i_s_L_e_a_f : 1; // true if the child is a QuadNode │ │ │ │ │ +_8_8 unsigned int _i_n_d_e_x : 30; // child index (either QuadNode or Handle) │ │ │ │ │ +89 }; │ │ │ │ │ +90 │ │ │ │ │ +91 // sets all the children to point to the patch of given index │ │ │ │ │ +92 void SetChildren(int index); │ │ │ │ │ +93 │ │ │ │ │ +94 // sets the child in "quadrant" to point to the node or patch of the given │ │ │ │ │ +index │ │ │ │ │ +95 void SetChild(int quadrant, int index, bool isLeaf); │ │ │ │ │ +96 │ │ │ │ │ +97 _C_h_i_l_d children[4]; │ │ │ │ │ +98 }; │ │ │ │ │ +99 typedef std::vector QuadTree; │ │ │ │ │ 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; │ │ │ │ │ -} │ │ │ │ │ +101 // Internal methods supporting quadtree construction and queries │ │ │ │ │ +102 void assignRootNode(QuadNode * node, int index); │ │ │ │ │ +103 QuadNode * assignLeafOrChildNode(QuadNode * node, bool isLeaf, int quad, │ │ │ │ │ +int index); │ │ │ │ │ +104 │ │ │ │ │ +105 template │ │ │ │ │ +106 static int transformUVToQuadQuadrant(T const & median, T & u, T & v); │ │ │ │ │ +107 template │ │ │ │ │ +108 static int transformUVToTriQuadrant(T const & median, T & u, T & v, bool & │ │ │ │ │ +rotated); │ │ │ │ │ +109 │ │ │ │ │ +110private: │ │ │ │ │ +111 bool _patchesAreTriangular; // tri and quad assembly and search │ │ │ │ │ +requirements differ │ │ │ │ │ +112 │ │ │ │ │ +113 int _minPatchFace; // minimum patch face index supported by the map │ │ │ │ │ +114 int _maxPatchFace; // maximum patch face index supported by the map │ │ │ │ │ +115 int _maxDepth; // maximum depth of a patch in the tree │ │ │ │ │ +116 │ │ │ │ │ +117 std::vector _handles; // all the patches in the PatchTable │ │ │ │ │ +118 std::vector _quadtree; // quadtree nodes │ │ │ │ │ +119}; │ │ │ │ │ +120 │ │ │ │ │ +121// │ │ │ │ │ +122// Given a median value for both U and V, these methods transform a (u,v) │ │ │ │ │ +pair │ │ │ │ │ +123// into the quadrant that contains them and returns the quadrant index. │ │ │ │ │ +124// │ │ │ │ │ +125// Quadrant indexing for tri and quad patches -- consistent with │ │ │ │ │ +PatchParam's │ │ │ │ │ +126// usage of UV bits: │ │ │ │ │ +127// │ │ │ │ │ +128// (0,1) o-----o-----o (1,1) (0,1) o (1,0) o-----o-----o (0,0) │ │ │ │ │ +129// | | | |\ \ 1 |\ 0 | │ │ │ │ │ +130// | 2 | 3 | | \ \ | \ | │ │ │ │ │ +131// | | | | 2 \ \| 3 \| │ │ │ │ │ +132// o-----o-----o o-----o o-----o │ │ │ │ │ +133// | | | |\ 3 |\ \ 2 | │ │ │ │ │ +134// | 0 | 1 | | \ | \ \ | │ │ │ │ │ +135// | | | | 0 \| 1 \ \| │ │ │ │ │ +136// (0,0) o-----o-----o (1,0) (0,0) o-----o-----o (1,0) o (0,1) │ │ │ │ │ +137// │ │ │ │ │ +138// The triangular case also takes and returns/affects the rotation of the │ │ │ │ │ +139// quadrant being searched and identified (quadrant 3 imparts a rotation). │ │ │ │ │ +140// │ │ │ │ │ +141template │ │ │ │ │ +142inline int │ │ │ │ │ +143PatchMap::transformUVToQuadQuadrant(T const & median, T & u, T & v) { │ │ │ │ │ +144 │ │ │ │ │ +145 int uHalf = (u >= median); │ │ │ │ │ +146 if (uHalf) u -= median; │ │ │ │ │ +147 │ │ │ │ │ +148 int vHalf = (v >= median); │ │ │ │ │ +149 if (vHalf) v -= median; │ │ │ │ │ +150 │ │ │ │ │ +151 return (vHalf << 1) | uHalf; │ │ │ │ │ +152} │ │ │ │ │ +153 │ │ │ │ │ +154template │ │ │ │ │ +155int inline │ │ │ │ │ +156PatchMap::transformUVToTriQuadrant(T const & median, T & u, T & v, bool & │ │ │ │ │ +rotated) { │ │ │ │ │ +157 │ │ │ │ │ +158 if (!rotated) { │ │ │ │ │ +159 if (u >= median) { │ │ │ │ │ +160 u -= median; │ │ │ │ │ +161 return 1; │ │ │ │ │ +162 } │ │ │ │ │ +163 if (v >= median) { │ │ │ │ │ +164 v -= median; │ │ │ │ │ +165 return 2; │ │ │ │ │ +166 } │ │ │ │ │ +167 if ((u + v) >= median) { │ │ │ │ │ +168 rotated = true; │ │ │ │ │ +169 return 3; │ │ │ │ │ +170 } │ │ │ │ │ +171 return 0; │ │ │ │ │ +172 } else { │ │ │ │ │ +173 if (u < median) { │ │ │ │ │ +174 v -= median; │ │ │ │ │ +175 return 1; │ │ │ │ │ +176 } │ │ │ │ │ +177 if (v < median) { │ │ │ │ │ +178 u -= median; │ │ │ │ │ +179 return 2; │ │ │ │ │ +180 } │ │ │ │ │ +181 u -= median; │ │ │ │ │ +182 v -= median; │ │ │ │ │ +183 if ((u + v) < median) { │ │ │ │ │ +184 rotated = false; │ │ │ │ │ +185 return 3; │ │ │ │ │ +186 } │ │ │ │ │ +187 return 0; │ │ │ │ │ +188 } │ │ │ │ │ +189} │ │ │ │ │ 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; │ │ │ │ │ +192inline _P_a_t_c_h_M_a_p_:_:_H_a_n_d_l_e const * │ │ │ │ │ +_1_9_3_P_a_t_c_h_M_a_p_:_:_F_i_n_d_P_a_t_c_h( int faceid, double u, double v ) 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; │ │ │ │ │ +195 // │ │ │ │ │ +196 // Reject patch faces not supported by this map, or those corresponding │ │ │ │ │ +197 // to holes or otherwise unassigned (the root node for a patch will │ │ │ │ │ +198 // have all or no quadrants set): │ │ │ │ │ +199 // │ │ │ │ │ +200 if ((faceid < _minPatchFace) || (faceid > _maxPatchFace)) return 0; │ │ │ │ │ 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 │ │ │ │ │ +202 QuadNode const * node = &_quadtree[faceid - _minPatchFace]; │ │ │ │ │ +203 │ │ │ │ │ +204 if (!node->children[0].isSet) return 0; │ │ │ │ │ +205 │ │ │ │ │ +206 // │ │ │ │ │ +207 // Search the tree for the sub-patch containing the given (u,v) │ │ │ │ │ +208 // │ │ │ │ │ +209 assert( (u>=0.0) && (u<=1.0) && (v>=0.0) && (v<=1.0) ); │ │ │ │ │ +210 │ │ │ │ │ +211 double median = 0.5; │ │ │ │ │ +212 bool triRotated = false; │ │ │ │ │ +213 │ │ │ │ │ +214 for (int depth = 0; depth <= _maxDepth; ++depth, median *= 0.5) { │ │ │ │ │ 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 { } │ │ │ │ │ +216 int quadrant = _patchesAreTriangular │ │ │ │ │ +217 ? transformUVToTriQuadrant(median, u, v, triRotated) │ │ │ │ │ +218 : transformUVToQuadQuadrant(median, u, v); │ │ │ │ │ +219 │ │ │ │ │ +220 // holes should have been rejected at the root node of the face │ │ │ │ │ +221 assert(node->children[quadrant].isSet); │ │ │ │ │ 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]; } │ │ │ │ │ +223 if (node->children[quadrant].isLeaf) { │ │ │ │ │ +224 return &_handles[node->children[quadrant].index]; │ │ │ │ │ +225 } else { │ │ │ │ │ +226 node = &_quadtree[node->children[quadrant].index]; │ │ │ │ │ +227 } │ │ │ │ │ +228 } │ │ │ │ │ +229 assert(0); │ │ │ │ │ +230 return 0; │ │ │ │ │ +231} │ │ │ │ │ +232 │ │ │ │ │ +233} // end namespace Far │ │ │ │ │ +234 │ │ │ │ │ +235} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +236using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 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 */ │ │ │ │ │ +238} // end namespace OpenSubdiv │ │ │ │ │ +239 │ │ │ │ │ +240#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */ │ │ │ │ │ _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_:_:_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_:_:_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_M_a_p │ │ │ │ │ +An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_P_a_t_c_h_M_a_p │ │ │ │ │ +PatchMap(PatchTable const &patchTable) │ │ │ │ │ +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_a_t_c_h_M_a_p_:_:_F_i_n_d_P_a_t_c_h │ │ │ │ │ +Handle const * FindPatch(int patchFaceId, double u, double v) const │ │ │ │ │ +Returns a handle to the sub-patch of the face at the given (u,v). Note that the │ │ │ │ │ +patch face ID corresp... │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._h_:_1_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_a_t_c_h_M_a_p_:_:_H_a_n_d_l_e │ │ │ │ │ +PatchTable::PatchHandle Handle │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_s_L_e_a_f │ │ │ │ │ +unsigned int isLeaf │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_n_d_e_x │ │ │ │ │ +unsigned int index │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_s_S_e_t │ │ │ │ │ +unsigned int isSet │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_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_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ +Handle that can be used as unique patch identifier within PatchTable. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ * _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_a_t_c_h_M_a_p_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00881.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchParam.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,52 +89,67 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
    │ │ │ │ -
    patchParam.h File Reference
    │ │ │ │ +Namespaces
    │ │ │ │ +
    stencilTable.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ #include "../far/types.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cstring>
    │ │ │ │ +#include <vector>
    │ │ │ │ +#include <iostream>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    struct  PatchParam
     Patch parameterization. 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...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

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

    │ │ │ │ -Typedefs

    typedef std::vector< PatchParamPatchParamTable
     
    typedef Vtr::Array< PatchParamPatchParamArray
     
    typedef Vtr::ConstArray< PatchParamConstPatchParamArray
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +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 | _T_y_p_e_d_e_f_s │ │ │ │ │ -patchParam.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +stencilTable.h File Reference │ │ │ │ │ #include "../version.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 │ │ │ │ │ -struct   _P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -  Patch parameterization. _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 │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ - typedef std::vector< _P_a_t_c_h_P_a_r_a_m >  _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ -  │ │ │ │ │ - typedef _V_t_r_:_:_A_r_r_a_y< _P_a_t_c_h_P_a_r_a_m >  _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ -  │ │ │ │ │ -typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y< _P_a_t_c_h_P_a_r_a_m >  _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ -  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_P_a_r_a_m_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00881.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,6 +1,10 @@ │ │ │ │ │ var a00881 = [ │ │ │ │ │ - ["PatchParam", "a00989.html", "a00989"], │ │ │ │ │ - ["ConstPatchParamArray", "a00881.html#a3139c7c52ddf26b2403e8e95ff63eeb3", null], │ │ │ │ │ - ["PatchParamArray", "a00881.html#abe07210a029a01571c54276ae28b4d88", null], │ │ │ │ │ - ["PatchParamTable", "a00881.html#a46ea68db89cc3d55c4191ef7648281ce", null] │ │ │ │ │ + ["StencilReal< REAL >", "a01045.html", "a01045"], │ │ │ │ │ + ["Stencil", "a01049.html", "a01049"], │ │ │ │ │ + ["StencilTableReal< REAL >", "a01053.html", "a01053"], │ │ │ │ │ + ["StencilTable", "a01057.html", "a01057"], │ │ │ │ │ + ["LimitStencilReal< REAL >", "a01061.html", "a01061"], │ │ │ │ │ + ["LimitStencil", "a01065.html", "a01065"], │ │ │ │ │ + ["LimitStencilTableReal< REAL >", "a01069.html", "a01069"], │ │ │ │ │ + ["LimitStencilTable", "a01073.html", "a01073"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00881_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchParam.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    patchParam.h
    │ │ │ │ +
    stencilTable.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,214 +119,892 @@ │ │ │ │
    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_PATCH_PARAM_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_PATCH_PARAM_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_STENCILTABLE_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │
    30#include "../far/types.h"
    │ │ │ │
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace Far {
    │ │ │ │ +
    32#include <cassert>
    │ │ │ │ +
    33#include <cstring>
    │ │ │ │ +
    34#include <vector>
    │ │ │ │ +
    35#include <iostream>
    │ │ │ │
    36
    │ │ │ │ -
    101
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    168 void Set(Index faceid, short u, short v,
    │ │ │ │ -
    169 unsigned short depth, bool nonquad,
    │ │ │ │ -
    170 unsigned short boundary, unsigned short transition,
    │ │ │ │ -
    171 bool regular = false);
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    162 return _numControlVertices;
    │ │ │ │ +
    163 }
    │ │ │ │ +
    │ │ │ │ +
    164
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    167
    │ │ │ │ +
    │ │ │ │ +
    169 std::vector<int> const & GetSizes() const {
    │ │ │ │ +
    170 return _sizes;
    │ │ │ │ +
    171 }
    │ │ │ │ +
    │ │ │ │
    172
    │ │ │ │ -
    174 void Clear() { field0 = field1 = 0; }
    │ │ │ │ -
    175
    │ │ │ │ -
    177 Index GetFaceId() const { return Index(unpack(field0,28,0)); }
    │ │ │ │ -
    178
    │ │ │ │ -
    181 unsigned short GetU() const { return (unsigned short)unpack(field1,10,22); }
    │ │ │ │ -
    182
    │ │ │ │ -
    185 unsigned short GetV() const { return (unsigned short)unpack(field1,10,12); }
    │ │ │ │ -
    186
    │ │ │ │ -
    188 unsigned short GetTransition() const { return (unsigned short)unpack(field0,4,28); }
    │ │ │ │ -
    189
    │ │ │ │ -
    191 unsigned short GetBoundary() const { return (unsigned short)unpack(field1,5,7); }
    │ │ │ │ -
    192
    │ │ │ │ -
    194 bool NonQuadRoot() const { return (unpack(field1,1,4) != 0); }
    │ │ │ │ -
    195
    │ │ │ │ -
    197 unsigned short GetDepth() const { return (unsigned short)unpack(field1,4,0); }
    │ │ │ │ -
    198
    │ │ │ │ -
    200 float GetParamFraction() const;
    │ │ │ │ -
    201
    │ │ │ │ -
    208 template <typename REAL>
    │ │ │ │ -
    209 void Normalize( REAL & u, REAL & v ) const;
    │ │ │ │ -
    210 template <typename REAL>
    │ │ │ │ -
    211 void NormalizeTriangle( REAL & u, REAL & v ) const;
    │ │ │ │ -
    212
    │ │ │ │ -
    219 template <typename REAL>
    │ │ │ │ -
    220 void Unnormalize( REAL & u, REAL & v ) const;
    │ │ │ │ -
    221 template <typename REAL>
    │ │ │ │ -
    222 void UnnormalizeTriangle( REAL & u, REAL & v ) const;
    │ │ │ │ -
    223
    │ │ │ │ -
    225 bool IsTriangleRotated() const;
    │ │ │ │ -
    226
    │ │ │ │ -
    228 bool IsRegular() const { return (unpack(field1,1,5) != 0); }
    │ │ │ │ -
    229
    │ │ │ │ -
    230 unsigned int field0:32;
    │ │ │ │ -
    231 unsigned int field1:32;
    │ │ │ │ -
    232
    │ │ │ │ -
    233private:
    │ │ │ │ -
    234 unsigned int pack(unsigned int value, int width, int offset) const {
    │ │ │ │ -
    235 return (unsigned int)((value & ((1<<width)-1)) << offset);
    │ │ │ │ -
    236 }
    │ │ │ │ -
    237
    │ │ │ │ -
    238 unsigned int unpack(unsigned int value, int width, int offset) const {
    │ │ │ │ -
    239 return (unsigned int)((value >> offset) & ((1<<width)-1));
    │ │ │ │ -
    240 }
    │ │ │ │ -
    241};
    │ │ │ │ +
    │ │ │ │ +
    174 std::vector<Index> const & GetOffsets() const {
    │ │ │ │ +
    175 return _offsets;
    │ │ │ │ +
    176 }
    │ │ │ │ +
    │ │ │ │ +
    177
    │ │ │ │ +
    │ │ │ │ +
    179 std::vector<Index> const & GetControlIndices() const {
    │ │ │ │ +
    180 return _indices;
    │ │ │ │ +
    181 }
    │ │ │ │
    │ │ │ │ -
    242
    │ │ │ │ -
    243typedef std::vector<PatchParam> PatchParamTable;
    │ │ │ │ +
    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
    │ │ │ │ -
    248inline void
    │ │ │ │ +
    248 // Reallocates the table arrays to remove excess capacity (factory helper)
    │ │ │ │
    │ │ │ │ -
    249PatchParam::Set(Index faceid, short u, short v,
    │ │ │ │ -
    250 unsigned short depth, bool nonquad,
    │ │ │ │ -
    251 unsigned short boundary, unsigned short transition,
    │ │ │ │ -
    252 bool regular) {
    │ │ │ │ -
    253 field0 = pack(faceid, 28, 0) |
    │ │ │ │ -
    254 pack(transition, 4, 28);
    │ │ │ │ -
    255
    │ │ │ │ -
    256 field1 = pack(u, 10, 22) |
    │ │ │ │ -
    257 pack(v, 10, 12) |
    │ │ │ │ -
    258 pack(boundary, 5, 7) |
    │ │ │ │ -
    259 pack(regular, 1, 5) |
    │ │ │ │ -
    260 pack(nonquad, 1, 4) |
    │ │ │ │ -
    261 pack(depth, 4, 0);
    │ │ │ │ -
    262}
    │ │ │ │ -
    │ │ │ │ -
    263
    │ │ │ │ -
    264inline float
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    266 return 1.0f / (float)(1 << (GetDepth() - NonQuadRoot()));
    │ │ │ │ -
    267}
    │ │ │ │ -
    │ │ │ │ -
    268
    │ │ │ │ -
    269template <typename REAL>
    │ │ │ │ -
    270inline void
    │ │ │ │ -
    │ │ │ │ -
    271PatchParam::Normalize( REAL & u, REAL & v ) const {
    │ │ │ │ -
    272
    │ │ │ │ -
    273 REAL fracInv = (REAL)(1.0f / GetParamFraction());
    │ │ │ │ -
    274
    │ │ │ │ -
    275 u = u * fracInv - (REAL)GetU();
    │ │ │ │ -
    276 v = v * fracInv - (REAL)GetV();
    │ │ │ │ -
    277}
    │ │ │ │ -
    │ │ │ │ -
    278
    │ │ │ │ -
    279template <typename REAL>
    │ │ │ │ -
    280inline void
    │ │ │ │ + │ │ │ │ +
    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 }
    │ │ │ │ +
    │ │ │ │
    │ │ │ │ -
    281PatchParam::Unnormalize( REAL & u, REAL & v ) const {
    │ │ │ │ -
    282
    │ │ │ │ -
    283 REAL frac = (REAL)GetParamFraction();
    │ │ │ │ +
    281 Stencil operator[] (Index index) const {
    │ │ │ │ +
    282 return Stencil(BaseTable::GetStencil(index));
    │ │ │ │ +
    283 }
    │ │ │ │ +
    │ │ │ │
    284
    │ │ │ │ -
    285 u = (u + (REAL)GetU()) * frac;
    │ │ │ │ -
    286 v = (v + (REAL)GetV()) * frac;
    │ │ │ │ -
    287}
    │ │ │ │ -
    │ │ │ │ -
    288
    │ │ │ │ -
    289inline bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    291
    │ │ │ │ -
    292 return (GetU() + GetV()) >= (1 << GetDepth());
    │ │ │ │ -
    293}
    │ │ │ │ -
    │ │ │ │ -
    294
    │ │ │ │ -
    295template <typename REAL>
    │ │ │ │ -
    296inline void
    │ │ │ │ -
    │ │ │ │ -
    297PatchParam::NormalizeTriangle( REAL & u, REAL & v ) const {
    │ │ │ │ +
    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 if (IsTriangleRotated()) {
    │ │ │ │ -
    300 REAL fracInv = (REAL)(1.0f / GetParamFraction());
    │ │ │ │ -
    301
    │ │ │ │ -
    302 int depthFactor = 1 << GetDepth();
    │ │ │ │ -
    303 u = (REAL)(depthFactor - GetU()) - (u * fracInv);
    │ │ │ │ -
    304 v = (REAL)(depthFactor - GetV()) - (v * fracInv);
    │ │ │ │ -
    305 } else {
    │ │ │ │ -
    306 Normalize(u, v);
    │ │ │ │ -
    307 }
    │ │ │ │ -
    308}
    │ │ │ │ -
    │ │ │ │ -
    309
    │ │ │ │ -
    310template <typename REAL>
    │ │ │ │ -
    311inline void
    │ │ │ │ -
    │ │ │ │ -
    312PatchParam::UnnormalizeTriangle( REAL & u, REAL & v ) const {
    │ │ │ │ -
    313
    │ │ │ │ -
    314 if (IsTriangleRotated()) {
    │ │ │ │ -
    315 REAL frac = GetParamFraction();
    │ │ │ │ -
    316
    │ │ │ │ -
    317 int depthFactor = 1 << GetDepth();
    │ │ │ │ -
    318 u = ((REAL)(depthFactor - GetU()) - u) * frac;
    │ │ │ │ -
    319 v = ((REAL)(depthFactor - GetV()) - v) * frac;
    │ │ │ │ -
    320 } else {
    │ │ │ │ -
    321 Unnormalize(u, v);
    │ │ │ │ -
    322 }
    │ │ │ │ -
    323}
    │ │ │ │ -
    │ │ │ │ -
    324
    │ │ │ │ -
    325} // end namespace Far
    │ │ │ │ -
    326
    │ │ │ │ -
    327} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    328using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    329
    │ │ │ │ -
    330} // end namespace OpenSubdiv
    │ │ │ │ -
    331
    │ │ │ │ -
    332#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */
    │ │ │ │ - │ │ │ │ -
    Vtr::ConstArray< PatchParam > ConstPatchParamArray
    Definition patchParam.h:246
    │ │ │ │ -
    std::vector< PatchParam > PatchParamTable
    Definition patchParam.h:243
    │ │ │ │ +
    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
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ │ │ │ │ -
    Vtr::Array< PatchParam > PatchParamArray
    Definition patchParam.h:245
    │ │ │ │ - │ │ │ │ -
    bool IsTriangleRotated() const
    Returns if a triangular patch is parametrically rotated 180 degrees.
    Definition patchParam.h:290
    │ │ │ │ -
    bool IsRegular() const
    Returns whether the patch is regular.
    Definition patchParam.h:228
    │ │ │ │ -
    void NormalizeTriangle(REAL &u, REAL &v) const
    Definition patchParam.h:297
    │ │ │ │ -
    unsigned short GetBoundary() const
    Returns the boundary edge encoding for the patch.
    Definition patchParam.h:191
    │ │ │ │ -
    unsigned short GetTransition() const
    Returns the transition edge encoding for the patch.
    Definition patchParam.h:188
    │ │ │ │ -
    float GetParamFraction() const
    Returns the fraction of unit parametric space covered by this face.
    Definition patchParam.h:265
    │ │ │ │ -
    unsigned short GetU() const
    Returns the log2 value of the u parameter at the first corner of the patch.
    Definition patchParam.h:181
    │ │ │ │ -
    Index GetFaceId() const
    Returns the faceid.
    Definition patchParam.h:177
    │ │ │ │ -
    unsigned short GetDepth() const
    Returns the level of subdivision of the patch.
    Definition patchParam.h:197
    │ │ │ │ -
    bool NonQuadRoot() const
    True if the parent base face is a non-quad.
    Definition patchParam.h:194
    │ │ │ │ -
    void Set(Index faceid, short u, short v, unsigned short depth, bool nonquad, unsigned short boundary, unsigned short transition, bool regular=false)
    Sets the values of the bit fields.
    Definition patchParam.h:249
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    void Unnormalize(REAL &u, REAL &v) const
    A (u,v) pair in a normalized parametric space is mapped back into the fraction of parametric space co...
    Definition patchParam.h:281
    │ │ │ │ -
    void UnnormalizeTriangle(REAL &u, REAL &v) const
    Definition patchParam.h:312
    │ │ │ │ -
    unsigned short GetV() const
    Returns the log2 value of the v parameter at the first corner of the patch.
    Definition patchParam.h:185
    │ │ │ │ - │ │ │ │ -
    void Normalize(REAL &u, REAL &v) const
    A (u,v) pair in the fraction of parametric space covered by this face is mapped into a normalized par...
    Definition patchParam.h:271
    │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    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,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -patchParam.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 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,262 +24,990 @@ │ │ │ │ │ 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_PATCH_PARAM_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_PATCH_PARAM_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_STENCILTABLE_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ 30#include "../far/types.h" │ │ │ │ │ 31 │ │ │ │ │ -32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -33namespace OPENSUBDIV_VERSION { │ │ │ │ │ -34 │ │ │ │ │ -35namespace Far { │ │ │ │ │ +32#include │ │ │ │ │ +33#include │ │ │ │ │ +34#include │ │ │ │ │ +35#include │ │ │ │ │ 36 │ │ │ │ │ -101 │ │ │ │ │ -_1_5_2struct _P_a_t_c_h_P_a_r_a_m { │ │ │ │ │ -168 void _S_e_t(_I_n_d_e_x faceid, short u, short v, │ │ │ │ │ -169 unsigned short depth, bool nonquad, │ │ │ │ │ -170 unsigned short boundary, unsigned short transition, │ │ │ │ │ -171 bool regular = false); │ │ │ │ │ +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 │ │ │ │ │ +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 void _C_l_e_a_r() { _f_i_e_l_d_0 = _f_i_e_l_d_1 = 0; } │ │ │ │ │ -175 │ │ │ │ │ -_1_7_7 _I_n_d_e_x _G_e_t_F_a_c_e_I_d() const { return _I_n_d_e_x(unpack(_f_i_e_l_d_0,28,0)); } │ │ │ │ │ -178 │ │ │ │ │ -_1_8_1 unsigned short _G_e_t_U() const { return (unsigned short)unpack(_f_i_e_l_d_1,10,22); │ │ │ │ │ -} │ │ │ │ │ +_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_5 unsigned short _G_e_t_V() const { return (unsigned short)unpack(_f_i_e_l_d_1,10,12); │ │ │ │ │ -} │ │ │ │ │ -186 │ │ │ │ │ -_1_8_8 unsigned short _G_e_t_T_r_a_n_s_i_t_i_o_n() const { return (unsigned short)unpack │ │ │ │ │ -(_f_i_e_l_d_0,4,28); } │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 unsigned short _G_e_t_B_o_u_n_d_a_r_y() const { return (unsigned short)unpack │ │ │ │ │ -(_f_i_e_l_d_1,5,7); } │ │ │ │ │ -192 │ │ │ │ │ -_1_9_4 bool _N_o_n_Q_u_a_d_R_o_o_t() const { return (unpack(_f_i_e_l_d_1,1,4) != 0); } │ │ │ │ │ -195 │ │ │ │ │ -_1_9_7 unsigned short _G_e_t_D_e_p_t_h() const { return (unsigned short)unpack │ │ │ │ │ -(_f_i_e_l_d_1,4,0); } │ │ │ │ │ -198 │ │ │ │ │ -200 float _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n() const; │ │ │ │ │ -201 │ │ │ │ │ -208 template │ │ │ │ │ -209 void _N_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const; │ │ │ │ │ -210 template │ │ │ │ │ -211 void _N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const; │ │ │ │ │ -212 │ │ │ │ │ -219 template │ │ │ │ │ -220 void _U_n_n_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const; │ │ │ │ │ -221 template │ │ │ │ │ -222 void _U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const; │ │ │ │ │ -223 │ │ │ │ │ -225 bool _I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d() const; │ │ │ │ │ -226 │ │ │ │ │ -_2_2_8 bool _I_s_R_e_g_u_l_a_r() const { return (unpack(_f_i_e_l_d_1,1,5) != 0); } │ │ │ │ │ -229 │ │ │ │ │ -_2_3_0 unsigned int _f_i_e_l_d_0:32; │ │ │ │ │ -_2_3_1 unsigned int _f_i_e_l_d_1:32; │ │ │ │ │ -232 │ │ │ │ │ -233private: │ │ │ │ │ -234 unsigned int pack(unsigned int value, int width, int offset) const { │ │ │ │ │ -235 return (unsigned int)((value & ((1<> offset) & ((1< _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e; │ │ │ │ │ +_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 │ │ │ │ │ -_2_4_5typedef _V_t_r_:_:_A_r_r_a_y_<_P_a_t_c_h_P_a_r_a_m_> _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y; │ │ │ │ │ -_2_4_6typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_P_a_r_a_m_> _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y; │ │ │ │ │ +245 // Reserves the table arrays (factory helper) │ │ │ │ │ +_2_4_6 void _r_e_s_e_r_v_e(int nstencils, int nelems); │ │ │ │ │ 247 │ │ │ │ │ -248inline void │ │ │ │ │ -_2_4_9_P_a_t_c_h_P_a_r_a_m_:_:_S_e_t(_I_n_d_e_x faceid, short u, short v, │ │ │ │ │ -250 unsigned short depth, bool nonquad, │ │ │ │ │ -251 unsigned short boundary, unsigned short transition, │ │ │ │ │ -252 bool regular) { │ │ │ │ │ -253 _f_i_e_l_d_0 = pack(faceid, 28, 0) | │ │ │ │ │ -254 pack(transition, 4, 28); │ │ │ │ │ -255 │ │ │ │ │ -256 _f_i_e_l_d_1 = pack(u, 10, 22) | │ │ │ │ │ -257 pack(v, 10, 12) | │ │ │ │ │ -258 pack(boundary, 5, 7) | │ │ │ │ │ -259 pack(regular, 1, 5) | │ │ │ │ │ -260 pack(nonquad, 1, 4) | │ │ │ │ │ -261 pack(depth, 4, 0); │ │ │ │ │ -262} │ │ │ │ │ -263 │ │ │ │ │ -264inline float │ │ │ │ │ -_2_6_5_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n( ) const { │ │ │ │ │ -266 return 1.0f / (float)(1 << (_G_e_t_D_e_p_t_h() - _N_o_n_Q_u_a_d_R_o_o_t())); │ │ │ │ │ -267} │ │ │ │ │ -268 │ │ │ │ │ -269template │ │ │ │ │ -270inline void │ │ │ │ │ -_2_7_1_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const { │ │ │ │ │ -272 │ │ │ │ │ -273 REAL fracInv = (REAL)(1.0f / _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n()); │ │ │ │ │ -274 │ │ │ │ │ -275 u = u * fracInv - (REAL)_G_e_t_U(); │ │ │ │ │ -276 v = v * fracInv - (REAL)_G_e_t_V(); │ │ │ │ │ -277} │ │ │ │ │ -278 │ │ │ │ │ -279template │ │ │ │ │ -280inline void │ │ │ │ │ -_2_8_1_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const { │ │ │ │ │ -282 │ │ │ │ │ -283 REAL frac = (REAL)_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n(); │ │ │ │ │ +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 │ │ │ │ │ -285 u = (u + (REAL)_G_e_t_U()) * frac; │ │ │ │ │ -286 v = (v + (REAL)_G_e_t_V()) * frac; │ │ │ │ │ -287} │ │ │ │ │ -288 │ │ │ │ │ -289inline bool │ │ │ │ │ -_2_9_0_P_a_t_c_h_P_a_r_a_m_:_:_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d() const { │ │ │ │ │ -291 │ │ │ │ │ -292 return (_G_e_t_U() + _G_e_t_V()) >= (1 << _G_e_t_D_e_p_t_h()); │ │ │ │ │ -293} │ │ │ │ │ -294 │ │ │ │ │ -295template │ │ │ │ │ -296inline void │ │ │ │ │ -_2_9_7_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const { │ │ │ │ │ +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 if (_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d()) { │ │ │ │ │ -300 REAL fracInv = (REAL)(1.0f / _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n()); │ │ │ │ │ -301 │ │ │ │ │ -302 int depthFactor = 1 << _G_e_t_D_e_p_t_h(); │ │ │ │ │ -303 u = (REAL)(depthFactor - _G_e_t_U()) - (u * fracInv); │ │ │ │ │ -304 v = (REAL)(depthFactor - _G_e_t_V()) - (v * fracInv); │ │ │ │ │ -305 } else { │ │ │ │ │ -306 _N_o_r_m_a_l_i_z_e(u, v); │ │ │ │ │ -307 } │ │ │ │ │ -308} │ │ │ │ │ -309 │ │ │ │ │ -310template │ │ │ │ │ -311inline void │ │ │ │ │ -_3_1_2_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const { │ │ │ │ │ -313 │ │ │ │ │ -314 if (_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d()) { │ │ │ │ │ -315 REAL frac = _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n(); │ │ │ │ │ -316 │ │ │ │ │ -317 int depthFactor = 1 << _G_e_t_D_e_p_t_h(); │ │ │ │ │ -318 u = ((REAL)(depthFactor - _G_e_t_U()) - u) * frac; │ │ │ │ │ -319 v = ((REAL)(depthFactor - _G_e_t_V()) - v) * frac; │ │ │ │ │ -320 } else { │ │ │ │ │ -321 _U_n_n_o_r_m_a_l_i_z_e(u, v); │ │ │ │ │ -322 } │ │ │ │ │ -323} │ │ │ │ │ -324 │ │ │ │ │ -325} // end namespace Far │ │ │ │ │ -326 │ │ │ │ │ -327} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -328using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -329 │ │ │ │ │ -330} // end namespace OpenSubdiv │ │ │ │ │ -331 │ │ │ │ │ -332#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */ │ │ │ │ │ +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_:_:_C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ -Vtr::ConstArray< PatchParam > ConstPatchParamArray │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ -std::vector< PatchParam > PatchParamTable │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ -Vtr::Array< PatchParam > PatchParamArray │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_P_a_r_a_m │ │ │ │ │ -Patch parameterization. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d │ │ │ │ │ -bool IsTriangleRotated() const │ │ │ │ │ -Returns if a triangular patch is parametrically rotated 180 degrees. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_I_s_R_e_g_u_l_a_r │ │ │ │ │ -bool IsRegular() const │ │ │ │ │ -Returns whether the patch is regular. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e │ │ │ │ │ -void NormalizeTriangle(REAL &u, REAL &v) const │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ -unsigned short GetBoundary() const │ │ │ │ │ -Returns the boundary edge encoding for the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_T_r_a_n_s_i_t_i_o_n │ │ │ │ │ -unsigned short GetTransition() const │ │ │ │ │ -Returns the transition edge encoding for the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n │ │ │ │ │ -float GetParamFraction() const │ │ │ │ │ -Returns the fraction of unit parametric space covered by this face. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_U │ │ │ │ │ -unsigned short GetU() const │ │ │ │ │ -Returns the log2 value of the u parameter at the first corner of the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_F_a_c_e_I_d │ │ │ │ │ -Index GetFaceId() const │ │ │ │ │ -Returns the faceid. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_D_e_p_t_h │ │ │ │ │ -unsigned short GetDepth() const │ │ │ │ │ -Returns the level of subdivision of the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_n_Q_u_a_d_R_o_o_t │ │ │ │ │ -bool NonQuadRoot() const │ │ │ │ │ -True if the parent base face is a non-quad. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_a_t_c_h_P_a_r_a_m_:_:_S_e_t │ │ │ │ │ -void Set(Index faceid, short u, short v, unsigned short depth, bool nonquad, │ │ │ │ │ -unsigned short boundary, unsigned short transition, bool regular=false) │ │ │ │ │ -Sets the values of the bit fields. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_C_l_e_a_r │ │ │ │ │ +_O_p_e_n_S_u_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() │ │ │ │ │ -Resets everything to 0. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_f_i_e_l_d_1 │ │ │ │ │ -unsigned int field1 │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e │ │ │ │ │ -void Unnormalize(REAL &u, REAL &v) const │ │ │ │ │ -A (u,v) pair in a normalized parametric space is mapped back into the fraction │ │ │ │ │ -of parametric space co... │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e │ │ │ │ │ -void UnnormalizeTriangle(REAL &u, REAL &v) const │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_V │ │ │ │ │ -unsigned short GetV() const │ │ │ │ │ -Returns the log2 value of the v parameter at the first corner of the patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_f_i_e_l_d_0 │ │ │ │ │ -unsigned int field0 │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e │ │ │ │ │ -void Normalize(REAL &u, REAL &v) const │ │ │ │ │ -A (u,v) pair in the fraction of parametric space covered by this face is mapped │ │ │ │ │ -into a normalized par... │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_:_:_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_0_5 │ │ │ │ │ +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_a_t_c_h_P_a_r_a_m_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00884.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyRefinerFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyLevel.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,34 +90,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    topologyRefinerFactory.h File Reference
    │ │ │ │ +
    topologyLevel.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/topologyRefiner.h"
    │ │ │ │ -#include "../far/error.h"
    │ │ │ │ -#include <cassert>
    │ │ │ │ +#include "../vtr/level.h"
    │ │ │ │ +#include "../vtr/refinement.h"
    │ │ │ │ +#include "../far/types.h"
    │ │ │ │ +#include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  TopologyRefinerFactoryBase
     Private base class of Factories for constructing TopologyRefiners. More...
     
    class  TopologyRefinerFactory< MESH >
     Factory for constructing TopologyRefiners from specific mesh classes. More...
     
    struct  TopologyRefinerFactory< MESH >::Options
     Options related to the construction of each TopologyRefiner. More...
    class  TopologyLevel
     An interface for accessing data in a specific level of a refined topology hierarchy. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -126,13 +121,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +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 │ │ │ │ │ -topologyRefinerFactory.h File Reference │ │ │ │ │ +topologyLevel.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_/_e_r_r_o_r_._h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_v_t_r_/_l_e_v_e_l_._h" │ │ │ │ │ +#include "_._._/_v_t_r_/_r_e_f_i_n_e_m_e_n_t_._h" │ │ │ │ │ +#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   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -  Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_ _M_E_S_H_ _> │ │ │ │ │ -  Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_ _M_E_S_H_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ -  _O_p_t_i_o_n_s related to the construction of each _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r. _M_o_r_e_._._. │ │ │ │ │ +class   _T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ +  An interface for accessing data in a specific level of a refined │ │ │ │ │ + topology hierarchy. _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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_L_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00884.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,5 +1,3 @@ │ │ │ │ │ var a00884 = [ │ │ │ │ │ - ["TopologyRefinerFactoryBase", "a01125.html", "a01125"], │ │ │ │ │ - ["TopologyRefinerFactory< MESH >", "a01109.html", "a01109"], │ │ │ │ │ - ["Options", "a01129.html", "a01129"] │ │ │ │ │ + ["TopologyLevel", "a01105.html", "a01105"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00884_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyRefinerFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyLevel.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    topologyRefinerFactory.h
    │ │ │ │ +
    topologyLevel.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,698 +118,228 @@ │ │ │ │
    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_REFINER_FACTORY_H
    │ │ │ │ -
    25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H
    │ │ │ │ +
    25#define OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H
    │ │ │ │
    26
    │ │ │ │
    27#include "../version.h"
    │ │ │ │
    28
    │ │ │ │ -
    29#include "../far/topologyRefiner.h"
    │ │ │ │ -
    30#include "../far/error.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32#include <cassert>
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Far {
    │ │ │ │ -
    38
    │ │ │ │ -
    46//
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    48protected:
    │ │ │ │ -
    49
    │ │ │ │ -
    50 //
    │ │ │ │ -
    51 // Protected methods invoked by the subclass template to verify and process each
    │ │ │ │ -
    52 // stage of construction implemented by the subclass:
    │ │ │ │ -
    53 //
    │ │ │ │ -
    54 typedef Vtr::internal::Level::ValidationCallback TopologyCallback;
    │ │ │ │ -
    55
    │ │ │ │ - │ │ │ │ -
    57 static bool prepareComponentTopologyAssignment(TopologyRefiner& refiner, bool fullValidation,
    │ │ │ │ -
    58 TopologyCallback callback, void const * callbackData);
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    61};
    │ │ │ │ -
    │ │ │ │ -
    62
    │ │ │ │ +
    29#include "../vtr/level.h"
    │ │ │ │ +
    30#include "../vtr/refinement.h"
    │ │ │ │ +
    31#include "../far/types.h"
    │ │ │ │ +
    32
    │ │ │ │ +
    33#include <vector>
    │ │ │ │ +
    34
    │ │ │ │ +
    35namespace OpenSubdiv {
    │ │ │ │ +
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    37
    │ │ │ │ +
    38namespace Far {
    │ │ │ │ +
    39
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    50
    │ │ │ │ +
    51public:
    │ │ │ │ +
    53
    │ │ │ │ +
    60
    │ │ │ │ +
    62 int GetNumVertices() const { return _level->getNumVertices(); }
    │ │ │ │
    63
    │ │ │ │ -
    77template <class MESH>
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    79
    │ │ │ │ -
    80public:
    │ │ │ │ -
    81
    │ │ │ │ -
    │ │ │ │ -
    84 struct Options {
    │ │ │ │ -
    85
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    87 schemeType(sdcType),
    │ │ │ │ -
    88 schemeOptions(sdcOptions),
    │ │ │ │ -
    89 validateFullTopology(false) { }
    │ │ │ │ -
    │ │ │ │ -
    90
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    94 unsigned int validateFullTopology : 1;
    │ │ │ │ -
    97 };
    │ │ │ │ -
    │ │ │ │ -
    98
    │ │ │ │ -
    108 //
    │ │ │ │ -
    113 static TopologyRefiner* Create(MESH const& mesh, Options options = Options());
    │ │ │ │ -
    114
    │ │ │ │ -
    128 static TopologyRefiner* Create(TopologyRefiner const & baseLevel);
    │ │ │ │ +
    65 int GetNumFaces() const { return _level->getNumFaces(); }
    │ │ │ │ +
    66
    │ │ │ │ +
    68 int GetNumEdges() const { return _level->getNumEdges(); }
    │ │ │ │ +
    69
    │ │ │ │ +
    71 int GetNumFaceVertices() const { return _level->getNumFaceVerticesTotal(); }
    │ │ │ │ +
    73
    │ │ │ │ +
    75
    │ │ │ │ +
    90 //
    │ │ │ │ +
    91
    │ │ │ │ +
    93 ConstIndexArray GetFaceVertices(Index f) const { return _level->getFaceVertices(f); }
    │ │ │ │ +
    94
    │ │ │ │ +
    96 ConstIndexArray GetFaceEdges(Index f) const { return _level->getFaceEdges(f); }
    │ │ │ │ +
    97
    │ │ │ │ +
    99 ConstIndexArray GetEdgeVertices(Index e) const { return _level->getEdgeVertices(e); }
    │ │ │ │ +
    100
    │ │ │ │ +
    102 ConstIndexArray GetEdgeFaces(Index e) const { return _level->getEdgeFaces(e); }
    │ │ │ │ +
    103
    │ │ │ │ +
    105 ConstIndexArray GetVertexFaces(Index v) const { return _level->getVertexFaces(v); }
    │ │ │ │ +
    106
    │ │ │ │ +
    108 ConstIndexArray GetVertexEdges(Index v) const { return _level->getVertexEdges(v); }
    │ │ │ │ +
    109
    │ │ │ │ +
    111 ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const { return _level->getVertexFaceLocalIndices(v); }
    │ │ │ │ +
    112
    │ │ │ │ +
    114 ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const { return _level->getVertexEdgeLocalIndices(v); }
    │ │ │ │ +
    115
    │ │ │ │ +
    117 ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const { return _level->getEdgeFaceLocalIndices(e); }
    │ │ │ │ +
    118
    │ │ │ │ +
    120 Index FindEdge(Index v0, Index v1) const { return _level->findEdge(v0, v1); }
    │ │ │ │ +
    122
    │ │ │ │ +
    124
    │ │ │ │ +
    126
    │ │ │ │ +
    128 bool IsEdgeNonManifold(Index e) const { return _level->isEdgeNonManifold(e); }
    │ │ │ │
    129
    │ │ │ │ -
    130protected:
    │ │ │ │ -
    131 typedef Vtr::internal::Level::TopologyError TopologyError;
    │ │ │ │ +
    131 bool IsVertexNonManifold(Index v) const { return _level->isVertexNonManifold(v); }
    │ │ │ │
    132
    │ │ │ │ -
    134
    │ │ │ │ -
    149
    │ │ │ │ -
    151 static bool resizeComponentTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │ -
    152
    │ │ │ │ -
    155 static bool assignComponentTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │ -
    156
    │ │ │ │ -
    158 static bool assignComponentTags(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │ -
    159
    │ │ │ │ -
    161 static bool assignFaceVaryingTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │ -
    162
    │ │ │ │ -
    164 static void reportInvalidTopology(TopologyError errCode, char const * msg, MESH const& mesh);
    │ │ │ │ -
    165
    │ │ │ │ -
    167
    │ │ │ │ -
    168protected:
    │ │ │ │ -
    170
    │ │ │ │ -
    187
    │ │ │ │ -
    189 static void setNumBaseVertices(TopologyRefiner & newRefiner, int count);
    │ │ │ │ -
    190
    │ │ │ │ -
    192 static void setNumBaseFaces(TopologyRefiner & newRefiner, int count);
    │ │ │ │ -
    193
    │ │ │ │ -
    195 static void setNumBaseEdges(TopologyRefiner & newRefiner, int count);
    │ │ │ │ +
    134 bool IsEdgeBoundary(Index e) const { return _level->getEdgeTag(e)._boundary; }
    │ │ │ │ +
    135
    │ │ │ │ +
    137 bool IsVertexBoundary(Index v) const { return _level->getVertexTag(v)._boundary; }
    │ │ │ │ +
    138
    │ │ │ │ +
    140 bool IsVertexCorner(Index v) const { return (_level->getNumVertexFaces(v) == 1); }
    │ │ │ │ +
    141
    │ │ │ │ +
    162 bool IsVertexValenceRegular(Index v) const { return !_level->getVertexTag(v)._xordinary || IsVertexCorner(v); }
    │ │ │ │ +
    164
    │ │ │ │ +
    166
    │ │ │ │ +
    171
    │ │ │ │ +
    173 float GetEdgeSharpness(Index e) const { return _level->getEdgeSharpness(e); }
    │ │ │ │ +
    174
    │ │ │ │ +
    176 float GetVertexSharpness(Index v) const { return _level->getVertexSharpness(v); }
    │ │ │ │ +
    177
    │ │ │ │ +
    179 bool IsEdgeInfSharp(Index e) const { return _level->getEdgeTag(e)._infSharp; }
    │ │ │ │ +
    180
    │ │ │ │ +
    182 bool IsVertexInfSharp(Index v) const { return _level->getVertexTag(v)._infSharp; }
    │ │ │ │ +
    183
    │ │ │ │ +
    185 bool IsEdgeSemiSharp(Index e) const { return _level->getEdgeTag(e)._semiSharp; }
    │ │ │ │ +
    186
    │ │ │ │ +
    188 bool IsVertexSemiSharp(Index v) const { return _level->getVertexTag(v)._semiSharp; }
    │ │ │ │ +
    189
    │ │ │ │ +
    191 bool IsFaceHole(Index f) const { return _level->isFaceHole(f); }
    │ │ │ │ +
    192
    │ │ │ │ +
    194 Sdc::Crease::Rule GetVertexRule(Index v) const { return _level->getVertexRule(v); }
    │ │ │ │
    196
    │ │ │ │ -
    198 static void setNumBaseFaceVertices(TopologyRefiner & newRefiner, Index f, int count);
    │ │ │ │ -
    199
    │ │ │ │ -
    201 static void setNumBaseEdgeFaces(TopologyRefiner & newRefiner, Index e, int count);
    │ │ │ │ -
    202
    │ │ │ │ -
    204 static void setNumBaseVertexFaces(TopologyRefiner & newRefiner, Index v, int count);
    │ │ │ │ -
    205
    │ │ │ │ -
    207 static void setNumBaseVertexEdges(TopologyRefiner & newRefiner, Index v, int count);
    │ │ │ │ -
    208
    │ │ │ │ -
    209 static int getNumBaseVertices(TopologyRefiner const & newRefiner);
    │ │ │ │ -
    210 static int getNumBaseFaces(TopologyRefiner const & newRefiner);
    │ │ │ │ -
    211 static int getNumBaseEdges(TopologyRefiner const & newRefiner);
    │ │ │ │ -
    213
    │ │ │ │ -
    215
    │ │ │ │ -
    237
    │ │ │ │ -
    239 static IndexArray getBaseFaceVertices(TopologyRefiner & newRefiner, Index f);
    │ │ │ │ +
    198
    │ │ │ │ +
    228
    │ │ │ │ +
    230 int GetNumFVarChannels() const { return _level->getNumFVarChannels(); }
    │ │ │ │ +
    231
    │ │ │ │ +
    234 int GetNumFVarValues(int channel = 0) const { return _level->getNumFVarValues(channel); }
    │ │ │ │ +
    235
    │ │ │ │ +
    │ │ │ │ +
    237 ConstIndexArray GetFaceFVarValues(Index f, int channel = 0) const {
    │ │ │ │ +
    238 return _level->getFaceFVarValues(f, channel);
    │ │ │ │ +
    239 }
    │ │ │ │ +
    │ │ │ │
    240
    │ │ │ │ -
    242 static IndexArray getBaseFaceEdges(TopologyRefiner & newRefiner, Index f);
    │ │ │ │ -
    243
    │ │ │ │ -
    245 static IndexArray getBaseEdgeVertices(TopologyRefiner & newRefiner, Index e);
    │ │ │ │ -
    246
    │ │ │ │ -
    248 static IndexArray getBaseEdgeFaces(TopologyRefiner & newRefiner, Index e);
    │ │ │ │ -
    249
    │ │ │ │ -
    251 static IndexArray getBaseVertexFaces(TopologyRefiner & newRefiner, Index v);
    │ │ │ │ -
    252
    │ │ │ │ -
    254 static IndexArray getBaseVertexEdges(TopologyRefiner & newRefiner, Index v);
    │ │ │ │ +
    │ │ │ │ +
    242 bool DoesVertexFVarTopologyMatch(Index v, int channel = 0) const {
    │ │ │ │ +
    243 return _level->doesVertexFVarTopologyMatch(v, channel);
    │ │ │ │ +
    244 }
    │ │ │ │ +
    │ │ │ │ +
    245
    │ │ │ │ +
    │ │ │ │ +
    247 bool DoesEdgeFVarTopologyMatch(Index e, int channel = 0) const {
    │ │ │ │ +
    248 return _level->doesEdgeFVarTopologyMatch(e, channel);
    │ │ │ │ +
    249 }
    │ │ │ │ +
    │ │ │ │ +
    250
    │ │ │ │ +
    │ │ │ │ +
    252 bool DoesFaceFVarTopologyMatch(Index f, int channel = 0) const {
    │ │ │ │ +
    253 return _level->doesFaceFVarTopologyMatch(f, channel);
    │ │ │ │ +
    254 }
    │ │ │ │ +
    │ │ │ │
    255
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    262
    │ │ │ │ -
    264 static void populateBaseLocalIndices(TopologyRefiner & newRefiner);
    │ │ │ │ -
    265
    │ │ │ │ -
    267 static void setBaseEdgeNonManifold(TopologyRefiner & newRefiner, Index e, bool b);
    │ │ │ │ -
    268
    │ │ │ │ -
    270 static void setBaseVertexNonManifold(TopologyRefiner & newRefiner, Index v, bool b);
    │ │ │ │ +
    257
    │ │ │ │ +
    259
    │ │ │ │ +
    260
    │ │ │ │ +
    262 ConstIndexArray GetFaceChildFaces(Index f) const { return _refToChild->getFaceChildFaces(f); }
    │ │ │ │ +
    263
    │ │ │ │ +
    265 ConstIndexArray GetFaceChildEdges(Index f) const { return _refToChild->getFaceChildEdges(f); }
    │ │ │ │ +
    266
    │ │ │ │ +
    268 ConstIndexArray GetEdgeChildEdges(Index e) const { return _refToChild->getEdgeChildEdges(e); }
    │ │ │ │ +
    269
    │ │ │ │ +
    271 Index GetFaceChildVertex( Index f) const { return _refToChild->getFaceChildVertex(f); }
    │ │ │ │
    272
    │ │ │ │ -
    274
    │ │ │ │ -
    283
    │ │ │ │ -
    285 static Index findBaseEdge(TopologyRefiner const & newRefiner, Index v0, Index v1);
    │ │ │ │ -
    286
    │ │ │ │ -
    288 static void setBaseEdgeSharpness(TopologyRefiner & newRefiner, Index e, float sharpness);
    │ │ │ │ +
    274 Index GetEdgeChildVertex( Index e) const { return _refToChild->getEdgeChildVertex(e); }
    │ │ │ │ +
    275
    │ │ │ │ +
    277 Index GetVertexChildVertex(Index v) const { return _refToChild->getVertexChildVertex(v); }
    │ │ │ │ +
    278
    │ │ │ │ +
    280 Index GetFaceParentFace(Index f) const { return _refToParent->getChildFaceParentFace(f); }
    │ │ │ │ +
    282
    │ │ │ │ +
    284
    │ │ │ │ +
    285
    │ │ │ │ +
    286 bool ValidateTopology() const { return _level->validateTopology(); }
    │ │ │ │ +
    287 void PrintTopology(bool children = true) const { _level->print((children && _refToChild) ? _refToChild : 0); }
    │ │ │ │
    289
    │ │ │ │ -
    291 static void setBaseVertexSharpness(TopologyRefiner & newRefiner, Index v, float sharpness);
    │ │ │ │ -
    292
    │ │ │ │ -
    294 static void setBaseFaceHole(TopologyRefiner & newRefiner, Index f, bool isHole);
    │ │ │ │ -
    296
    │ │ │ │ -
    298
    │ │ │ │ -
    308
    │ │ │ │ -
    310 static int createBaseFVarChannel(TopologyRefiner & newRefiner, int numValues);
    │ │ │ │ -
    311
    │ │ │ │ -
    313 static int createBaseFVarChannel(TopologyRefiner & newRefiner, int numValues, Sdc::Options const& fvarOptions);
    │ │ │ │ -
    314
    │ │ │ │ -
    316 static IndexArray getBaseFaceFVarValues(TopologyRefiner & newRefiner, Index face, int channel = 0);
    │ │ │ │ -
    317
    │ │ │ │ -
    319
    │ │ │ │ -
    320protected:
    │ │ │ │ -
    321 //
    │ │ │ │ -
    322 // Not to be specialized:
    │ │ │ │ -
    323 //
    │ │ │ │ -
    324 static bool populateBaseLevel(TopologyRefiner& refiner, MESH const& mesh, Options options);
    │ │ │ │ -
    325
    │ │ │ │ -
    326private:
    │ │ │ │ -
    327 //
    │ │ │ │ -
    328 // An oversight in the interfaces of the error reporting function between the factory
    │ │ │ │ -
    329 // class and the Vtr::Level requires this adapter function to avoid warnings.
    │ │ │ │ -
    330 //
    │ │ │ │ -
    331 // The static class method requires a reference as the MESH argument, but the interface
    │ │ │ │ -
    332 // for Vtr::Level requires a pointer (void*). So this adapter with a MESH* argument is
    │ │ │ │ -
    333 // used to effectively cast the function pointer required by Vtr::Level error reporting:
    │ │ │ │ -
    334 //
    │ │ │ │ -
    335 static void reportInvalidTopologyAdapter(TopologyError errCode, char const * msg, MESH const * mesh) {
    │ │ │ │ -
    336 reportInvalidTopology(errCode, msg, *mesh);
    │ │ │ │ -
    337 }
    │ │ │ │ -
    338};
    │ │ │ │ -
    │ │ │ │ -
    339
    │ │ │ │ -
    340
    │ │ │ │ -
    341//
    │ │ │ │ -
    342// Generic implementations:
    │ │ │ │ -
    343//
    │ │ │ │ -
    344template <class MESH>
    │ │ │ │ -
    345TopologyRefiner*
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    347
    │ │ │ │ -
    348 TopologyRefiner * refiner = new TopologyRefiner(options.schemeType, options.schemeOptions);
    │ │ │ │ -
    349
    │ │ │ │ -
    350 if (! populateBaseLevel(*refiner, mesh, options)) {
    │ │ │ │ -
    351 delete refiner;
    │ │ │ │ -
    352 return 0;
    │ │ │ │ -
    353 }
    │ │ │ │ -
    354
    │ │ │ │ -
    355 // Eventually want to move the Refiner's inventory initialization here. Currently it
    │ │ │ │ -
    356 // is handled after topology assignment, but if the inventory is to include additional
    │ │ │ │ -
    357 // features (e.g. holes, etc.) it is better off deferred to here.
    │ │ │ │ -
    358
    │ │ │ │ -
    359 return refiner;
    │ │ │ │ -
    360}
    │ │ │ │ -
    │ │ │ │ -
    361
    │ │ │ │ -
    362template <class MESH>
    │ │ │ │ - │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    365
    │ │ │ │ -
    366 return new TopologyRefiner(source);
    │ │ │ │ -
    367}
    │ │ │ │ -
    │ │ │ │ -
    368
    │ │ │ │ -
    369template <class MESH>
    │ │ │ │ -
    370bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    372
    │ │ │ │ -
    373 //
    │ │ │ │ -
    374 // Construction of a specialized topology refiner involves four steps, each of which
    │ │ │ │ -
    375 // involves a method specialized for MESH followed by one that takes an action in
    │ │ │ │ -
    376 // response to it or in preparation for the next step.
    │ │ │ │ -
    377 //
    │ │ │ │ -
    378 // Both the specialized methods and those that follow them may find fault in the
    │ │ │ │ -
    379 // construction and trigger failure at any time:
    │ │ │ │ -
    380 //
    │ │ │ │ -
    381
    │ │ │ │ -
    382 //
    │ │ │ │ -
    383 // Sizing of the topology -- this is a required specialization for MESH. This defines
    │ │ │ │ -
    384 // an inventory of all components and their relations that is used to allocate buffers
    │ │ │ │ -
    385 // to be efficiently populated in the subsequent topology assignment step.
    │ │ │ │ -
    386 //
    │ │ │ │ -
    387 if (! resizeComponentTopology(refiner, mesh)) return false;
    │ │ │ │ -
    388 if (! prepareComponentTopologySizing(refiner)) return false;
    │ │ │ │ -
    389
    │ │ │ │ -
    390 //
    │ │ │ │ -
    391 // Assignment of the topology -- this is a required specialization for MESH. If edges
    │ │ │ │ -
    392 // are specified, all other topological relations are expected to be defined for them.
    │ │ │ │ -
    393 // Otherwise edges and remaining topology will be completed from the face-vertices:
    │ │ │ │ -
    394 //
    │ │ │ │ -
    395 bool validate = options.validateFullTopology;
    │ │ │ │ -
    396 TopologyCallback callback = reinterpret_cast<TopologyCallback>(reportInvalidTopologyAdapter);
    │ │ │ │ -
    397 void const * userData = &mesh;
    │ │ │ │ -
    398
    │ │ │ │ -
    399 if (! assignComponentTopology(refiner, mesh)) return false;
    │ │ │ │ -
    400 if (! prepareComponentTopologyAssignment(refiner, validate, callback, userData)) return false;
    │ │ │ │ -
    401
    │ │ │ │ -
    402 //
    │ │ │ │ -
    403 // User assigned and internal tagging of components -- an optional specialization for
    │ │ │ │ -
    404 // MESH. Allows the specification of sharpness values, holes, etc.
    │ │ │ │ -
    405 //
    │ │ │ │ -
    406 if (! assignComponentTags(refiner, mesh)) return false;
    │ │ │ │ -
    407 if (! prepareComponentTagsAndSharpness(refiner)) return false;
    │ │ │ │ -
    408
    │ │ │ │ -
    409 //
    │ │ │ │ -
    410 // Defining channels of face-varying primvar data -- an optional specialization for MESH.
    │ │ │ │ -
    411 //
    │ │ │ │ -
    412 if (! assignFaceVaryingTopology(refiner, mesh)) return false;
    │ │ │ │ -
    413 if (! prepareFaceVaryingChannels(refiner)) return false;
    │ │ │ │ -
    414
    │ │ │ │ -
    415 return true;
    │ │ │ │ -
    416}
    │ │ │ │ -
    │ │ │ │ -
    417
    │ │ │ │ -
    418template <class MESH>
    │ │ │ │ -
    419inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    421 newRefiner._levels[0]->resizeFaces(count);
    │ │ │ │ -
    422}
    │ │ │ │ -
    │ │ │ │ -
    423template <class MESH>
    │ │ │ │ -
    424inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    426 newRefiner._levels[0]->resizeEdges(count);
    │ │ │ │ -
    427}
    │ │ │ │ -
    │ │ │ │ -
    428template <class MESH>
    │ │ │ │ -
    429inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    431 newRefiner._levels[0]->resizeVertices(count);
    │ │ │ │ -
    432}
    │ │ │ │ -
    │ │ │ │ -
    433
    │ │ │ │ -
    434template <class MESH>
    │ │ │ │ -
    435inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    437 return newRefiner._levels[0]->getNumFaces();
    │ │ │ │ -
    438}
    │ │ │ │ -
    │ │ │ │ -
    439template <class MESH>
    │ │ │ │ -
    440inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    442 return newRefiner._levels[0]->getNumEdges();
    │ │ │ │ -
    443}
    │ │ │ │ -
    │ │ │ │ -
    444template <class MESH>
    │ │ │ │ -
    445inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    447 return newRefiner._levels[0]->getNumVertices();
    │ │ │ │ -
    448}
    │ │ │ │ -
    │ │ │ │ -
    449
    │ │ │ │ -
    450template <class MESH>
    │ │ │ │ -
    451inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    453 newRefiner._levels[0]->resizeFaceVertices(f, count);
    │ │ │ │ -
    454 newRefiner._hasIrregFaces = newRefiner._hasIrregFaces || (count != newRefiner._regFaceSize);
    │ │ │ │ -
    455}
    │ │ │ │ -
    │ │ │ │ -
    456template <class MESH>
    │ │ │ │ -
    457inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    459 newRefiner._levels[0]->resizeEdgeFaces(e, count);
    │ │ │ │ -
    460}
    │ │ │ │ -
    │ │ │ │ -
    461template <class MESH>
    │ │ │ │ -
    462inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    464 newRefiner._levels[0]->resizeVertexFaces(v, count);
    │ │ │ │ -
    465}
    │ │ │ │ -
    │ │ │ │ -
    466template <class MESH>
    │ │ │ │ -
    467inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    469 newRefiner._levels[0]->resizeVertexEdges(v, count);
    │ │ │ │ -
    470}
    │ │ │ │ -
    │ │ │ │ -
    471
    │ │ │ │ -
    472template <class MESH>
    │ │ │ │ -
    473inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    475 return newRefiner._levels[0]->getFaceVertices(f);
    │ │ │ │ -
    476}
    │ │ │ │ -
    │ │ │ │ -
    477template <class MESH>
    │ │ │ │ -
    478inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    480 return newRefiner._levels[0]->getFaceEdges(f);
    │ │ │ │ -
    481}
    │ │ │ │ -
    │ │ │ │ -
    482template <class MESH>
    │ │ │ │ -
    483inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    485 return newRefiner._levels[0]->getEdgeVertices(e);
    │ │ │ │ -
    486}
    │ │ │ │ -
    │ │ │ │ -
    487template <class MESH>
    │ │ │ │ -
    488inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    490 return newRefiner._levels[0]->getEdgeFaces(e);
    │ │ │ │ -
    491}
    │ │ │ │ -
    │ │ │ │ -
    492template <class MESH>
    │ │ │ │ -
    493inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    495 return newRefiner._levels[0]->getVertexFaces(v);
    │ │ │ │ -
    496}
    │ │ │ │ -
    │ │ │ │ -
    497template <class MESH>
    │ │ │ │ -
    498inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    500 return newRefiner._levels[0]->getVertexEdges(v);
    │ │ │ │ -
    501}
    │ │ │ │ -
    │ │ │ │ -
    502
    │ │ │ │ -
    503template <class MESH>
    │ │ │ │ -
    504inline LocalIndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    506 return newRefiner._levels[0]->getEdgeFaceLocalIndices(e);
    │ │ │ │ -
    507}
    │ │ │ │ -
    │ │ │ │ -
    508template <class MESH>
    │ │ │ │ -
    509inline LocalIndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    511 return newRefiner._levels[0]->getVertexFaceLocalIndices(v);
    │ │ │ │ -
    512}
    │ │ │ │ -
    │ │ │ │ -
    513template <class MESH>
    │ │ │ │ -
    514inline LocalIndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    516 return newRefiner._levels[0]->getVertexEdgeLocalIndices(v);
    │ │ │ │ -
    517}
    │ │ │ │ -
    │ │ │ │ -
    518
    │ │ │ │ -
    519template <class MESH>
    │ │ │ │ -
    520inline Index
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    522 return newRefiner._levels[0]->findEdge(v0, v1);
    │ │ │ │ -
    523}
    │ │ │ │ -
    │ │ │ │ -
    524
    │ │ │ │ -
    525template <class MESH>
    │ │ │ │ -
    526inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    528 newRefiner._levels[0]->populateLocalIndices();
    │ │ │ │ -
    529}
    │ │ │ │ -
    │ │ │ │ -
    530
    │ │ │ │ -
    531template <class MESH>
    │ │ │ │ -
    532inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    534 newRefiner._levels[0]->setEdgeNonManifold(e, b);
    │ │ │ │ -
    535}
    │ │ │ │ -
    │ │ │ │ -
    536template <class MESH>
    │ │ │ │ -
    537inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    539 newRefiner._levels[0]->setVertexNonManifold(v, b);
    │ │ │ │ -
    540}
    │ │ │ │ -
    │ │ │ │ -
    541
    │ │ │ │ -
    542template <class MESH>
    │ │ │ │ -
    543inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    545 newRefiner._levels[0]->getEdgeSharpness(e) = s;
    │ │ │ │ -
    546}
    │ │ │ │ -
    │ │ │ │ -
    547template <class MESH>
    │ │ │ │ -
    548inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    550 newRefiner._levels[0]->getVertexSharpness(v) = s;
    │ │ │ │ -
    551}
    │ │ │ │ -
    │ │ │ │ -
    552template <class MESH>
    │ │ │ │ -
    553inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    555 newRefiner._levels[0]->setFaceHole(f, b);
    │ │ │ │ -
    556 newRefiner._hasHoles = newRefiner._hasHoles || b;
    │ │ │ │ -
    557}
    │ │ │ │ -
    │ │ │ │ -
    558
    │ │ │ │ -
    559template <class MESH>
    │ │ │ │ -
    560inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    562 return newRefiner._levels[0]->createFVarChannel(numValues, newRefiner._subdivOptions);
    │ │ │ │ -
    563}
    │ │ │ │ -
    │ │ │ │ -
    564template <class MESH>
    │ │ │ │ -
    565inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    567 Sdc::Options newOptions = newRefiner._subdivOptions;
    │ │ │ │ - │ │ │ │ -
    569 return newRefiner._levels[0]->createFVarChannel(numValues, newOptions);
    │ │ │ │ -
    570}
    │ │ │ │ -
    │ │ │ │ -
    571template <class MESH>
    │ │ │ │ -
    572inline IndexArray
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    574 return newRefiner._levels[0]->getFaceFVarValues(face, channel);
    │ │ │ │ -
    575}
    │ │ │ │ -
    │ │ │ │ -
    576
    │ │ │ │ -
    577
    │ │ │ │ -
    578template <class MESH>
    │ │ │ │ -
    579bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    581
    │ │ │ │ - │ │ │ │ -
    583 "Failure in TopologyRefinerFactory<>::resizeComponentTopology() -- no specialization provided.");
    │ │ │ │ -
    584
    │ │ │ │ -
    585 //
    │ │ │ │ -
    586 // Sizing the topology tables:
    │ │ │ │ -
    587 // This method is for determining the sizes of the various topology tables (and other
    │ │ │ │ -
    588 // data) associated with the mesh. Once completed, appropriate memory will be allocated
    │ │ │ │ -
    589 // and an additional method invoked to populate it accordingly.
    │ │ │ │ -
    590 //
    │ │ │ │ -
    591 // The following methods should be called -- first those to specify the number of faces,
    │ │ │ │ -
    592 // edges and vertices in the mesh:
    │ │ │ │ -
    593 //
    │ │ │ │ -
    594 // void setBaseFaceCount( TopologyRefiner& newRefiner, int count)
    │ │ │ │ -
    595 // void setBaseEdgeCount( TopologyRefiner& newRefiner, int count)
    │ │ │ │ -
    596 // void setBaseVertexCount(TopologyRefiner& newRefiner, int count)
    │ │ │ │ -
    597 //
    │ │ │ │ -
    598 // and then for each face, edge and vertex, the number of its incident components:
    │ │ │ │ -
    599 //
    │ │ │ │ -
    600 // void setBaseFaceVertexCount(TopologyRefiner& newRefiner, Index face, int count)
    │ │ │ │ -
    601 // void setBaseEdgeFaceCount( TopologyRefiner& newRefiner, Index edge, int count)
    │ │ │ │ -
    602 // void setBaseVertexFaceCount(TopologyRefiner& newRefiner, Index vertex, int count)
    │ │ │ │ -
    603 // void setBaseVertexEdgeCount(TopologyRefiner& newRefiner, Index vertex, int count)
    │ │ │ │ -
    604 //
    │ │ │ │ -
    605 // The count/size for a component type must be set before indices associated with that
    │ │ │ │ -
    606 // component type can be used.
    │ │ │ │ -
    607 //
    │ │ │ │ -
    608 // Note that it is only necessary to size 4 of the 6 supported topological relations --
    │ │ │ │ -
    609 // the number of edge-vertices is fixed at two per edge, and the number of face-edges is
    │ │ │ │ -
    610 // the same as the number of face-vertices.
    │ │ │ │ -
    611 //
    │ │ │ │ -
    612 // So a single pass through your mesh to gather up all of this sizing information will
    │ │ │ │ -
    613 // allow the Tables to be allocated appropriately once and avoid any dynamic resizing as
    │ │ │ │ -
    614 // it grows.
    │ │ │ │ -
    615 //
    │ │ │ │ -
    616 return false;
    │ │ │ │ -
    617}
    │ │ │ │ -
    │ │ │ │ -
    618
    │ │ │ │ -
    619template <class MESH>
    │ │ │ │ -
    620bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    622
    │ │ │ │ - │ │ │ │ -
    624 "Failure in TopologyRefinerFactory<>::assignComponentTopology() -- no specialization provided.");
    │ │ │ │ -
    625
    │ │ │ │ -
    626 //
    │ │ │ │ -
    627 // Assigning the topology tables:
    │ │ │ │ -
    628 // Once the topology tables have been allocated, the six required topological
    │ │ │ │ -
    629 // relations can be directly populated using the following methods:
    │ │ │ │ -
    630 //
    │ │ │ │ -
    631 // IndexArray setBaseFaceVertices(TopologyRefiner& newRefiner, Index face)
    │ │ │ │ -
    632 // IndexArray setBaseFaceEdges(TopologyRefiner& newRefiner, Index face)
    │ │ │ │ -
    633 //
    │ │ │ │ -
    634 // IndexArray setBaseEdgeVertices(TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ -
    635 // IndexArray setBaseEdgeFaces(TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ -
    636 //
    │ │ │ │ -
    637 // IndexArray setBaseVertexEdges(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ -
    638 // IndexArray setBaseVertexFaces(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ -
    639 //
    │ │ │ │ -
    640 // For the last two relations -- the faces and edges incident a vertex -- there are
    │ │ │ │ -
    641 // also "local indices" that must be specified (considering doing this internally),
    │ │ │ │ -
    642 // where the "local index" of each incident face or edge is the index of the vertex
    │ │ │ │ -
    643 // within that face or edge, and so ranging from 0-3 for incident quads and 0-1 for
    │ │ │ │ -
    644 // incident edges. These are assigned through similarly retrieved arrays:
    │ │ │ │ -
    645 //
    │ │ │ │ -
    646 // LocalIndexArray setBaseVertexFaceLocalIndices(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ -
    647 // LocalIndexArray setBaseVertexEdgeLocalIndices(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ -
    648 // LocalIndexArray setBaseEdgeFaceLocalIndices( TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ -
    649 //
    │ │ │ │ -
    650 // or, if the mesh is manifold, explicit assignment of these can be deferred and
    │ │ │ │ -
    651 // all can be determined by calling:
    │ │ │ │ -
    652 //
    │ │ │ │ -
    653 // void populateBaseLocalIndices(TopologyRefiner& newRefiner)
    │ │ │ │ -
    654 //
    │ │ │ │ -
    655 // All components are assumed to be locally manifold and ordering of components in
    │ │ │ │ -
    656 // the above relations is expected to be counter-clockwise.
    │ │ │ │ -
    657 //
    │ │ │ │ -
    658 // For non-manifold components, no ordering/orientation of incident components is
    │ │ │ │ -
    659 // assumed or required, but be sure to explicitly tag such components (vertices and
    │ │ │ │ -
    660 // edges) as non-manifold:
    │ │ │ │ -
    661 //
    │ │ │ │ -
    662 // void setBaseEdgeNonManifold(TopologyRefiner& newRefiner, Index edge, bool b);
    │ │ │ │ -
    663 //
    │ │ │ │ -
    664 // void setBaseVertexNonManifold(TopologyRefiner& newRefiner, Index vertex, bool b);
    │ │ │ │ -
    665 //
    │ │ │ │ -
    666 // Also consider using TopologyLevel::ValidateTopology() when debugging to ensure
    │ │ │ │ -
    667 // that topology has been completely and correctly specified.
    │ │ │ │ -
    668 //
    │ │ │ │ -
    669 return false;
    │ │ │ │ -
    670}
    │ │ │ │ -
    │ │ │ │ -
    671
    │ │ │ │ -
    672template <class MESH>
    │ │ │ │ -
    673bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    675
    │ │ │ │ -
    676 //
    │ │ │ │ -
    677 // Optional assigning face-varying topology tables:
    │ │ │ │ -
    678 //
    │ │ │ │ -
    679 // Create independent face-varying primitive variable channels:
    │ │ │ │ -
    680 // int createBaseFVarChannel(TopologyRefiner& newRefiner, int numValues)
    │ │ │ │ -
    681 //
    │ │ │ │ -
    682 // For each channel, populate the face-vertex values:
    │ │ │ │ -
    683 // IndexArray setBaseFaceFVarValues(TopologyRefiner& newRefiner, Index face, int channel = 0)
    │ │ │ │ -
    684 //
    │ │ │ │ -
    685 return true;
    │ │ │ │ -
    686}
    │ │ │ │ -
    │ │ │ │ -
    687
    │ │ │ │ -
    688template <class MESH>
    │ │ │ │ -
    689bool
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    691
    │ │ │ │ -
    692 //
    │ │ │ │ -
    693 // Optional tagging:
    │ │ │ │ -
    694 // This is where any additional feature tags -- sharpness, holes, etc. -- can be
    │ │ │ │ -
    695 // specified using:
    │ │ │ │ -
    696 //
    │ │ │ │ -
    697 // void setBaseEdgeSharpness(TopologyRefiner& newRefiner, Index edge, float sharpness)
    │ │ │ │ -
    698 // void setBaseVertexSharpness(TopologyRefiner& newRefiner, Index vertex, float sharpness)
    │ │ │ │ -
    699 //
    │ │ │ │ -
    700 // void setBaseFaceHole(TopologyRefiner& newRefiner, Index face, bool hole)
    │ │ │ │ -
    701 //
    │ │ │ │ -
    702 return true;
    │ │ │ │ -
    703}
    │ │ │ │ -
    │ │ │ │ -
    704
    │ │ │ │ -
    705template <class MESH>
    │ │ │ │ -
    706void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    708 TopologyError /* errCode */, char const * /* msg */, MESH const& /* mesh */) {
    │ │ │ │ -
    709
    │ │ │ │ -
    710 //
    │ │ │ │ -
    711 // Optional topology validation error reporting:
    │ │ │ │ -
    712 // This method is called whenever the factory encounters topology validation
    │ │ │ │ -
    713 // errors. By default, nothing is reported
    │ │ │ │ -
    714 //
    │ │ │ │ -
    715}
    │ │ │ │ -
    │ │ │ │ -
    716
    │ │ │ │ -
    717} // end namespace Far
    │ │ │ │ -
    718
    │ │ │ │ -
    719} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    720using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    721} // end namespace OpenSubdiv
    │ │ │ │ -
    722
    │ │ │ │ -
    723#endif /* OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H */
    │ │ │ │ - │ │ │ │ -
    void Error(ErrorType err, const char *format,...)
    Sends an OSD error with a message (internal use only)
    │ │ │ │ -
    @ FAR_RUNTIME_ERROR
    Issue a generic runtime error, but continue execution.
    Definition error.h:40
    │ │ │ │ +
    290
    │ │ │ │ +
    291private:
    │ │ │ │ +
    292 friend class TopologyRefiner;
    │ │ │ │ +
    293
    │ │ │ │ +
    294 Vtr::internal::Level const * _level;
    │ │ │ │ +
    295 Vtr::internal::Refinement const * _refToParent;
    │ │ │ │ +
    296 Vtr::internal::Refinement const * _refToChild;
    │ │ │ │ +
    297
    │ │ │ │ +
    298public:
    │ │ │ │ +
    299 // Not intended for public use, but required by std::vector, etc...
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    302};
    │ │ │ │ +
    │ │ │ │ +
    303
    │ │ │ │ +
    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 */
    │ │ │ │ + │ │ │ │ │ │ │ │ -
    SchemeType
    Enumerated type for all subdivision schemes supported by OpenSubdiv.
    Definition types.h:37
    │ │ │ │ - │ │ │ │ -
    Factory for constructing TopologyRefiners from specific mesh classes.
    │ │ │ │ -
    static int getNumBaseFaces(TopologyRefiner const &newRefiner)
    │ │ │ │ -
    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 LocalIndexArray getBaseVertexFaceLocalIndices(TopologyRefiner &newRefiner, Index v)
    Assign the local indices of a vertex within each of its incident faces.
    │ │ │ │ -
    static int getNumBaseVertices(TopologyRefiner const &newRefiner)
    │ │ │ │ -
    static void setNumBaseEdgeFaces(TopologyRefiner &newRefiner, Index e, int count)
    Specify the number of faces incident each edge.
    │ │ │ │ -
    static IndexArray getBaseFaceVertices(TopologyRefiner &newRefiner, Index f)
    Assign the vertices incident each face.
    │ │ │ │ -
    static LocalIndexArray getBaseEdgeFaceLocalIndices(TopologyRefiner &newRefiner, Index e)
    Assign the local indices of an edge within each of its incident faces.
    │ │ │ │ -
    static bool populateBaseLevel(TopologyRefiner &refiner, MESH const &mesh, Options options)
    │ │ │ │ -
    static void populateBaseLocalIndices(TopologyRefiner &newRefiner)
    Determine all local indices by inspection (only for pure manifold meshes)
    │ │ │ │ -
    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 void setNumBaseVertexEdges(TopologyRefiner &newRefiner, Index v, int count)
    Specify the number of edges incident each vertex.
    │ │ │ │ - │ │ │ │ -
    static IndexArray getBaseFaceFVarValues(TopologyRefiner &newRefiner, Index face, int channel=0)
    Assign the face-varying values for the corners of each face.
    │ │ │ │ -
    static IndexArray getBaseEdgeFaces(TopologyRefiner &newRefiner, Index e)
    Assign the faces incident each edge.
    │ │ │ │ -
    static void setNumBaseVertexFaces(TopologyRefiner &newRefiner, Index v, int count)
    Specify the number of faces incident each vertex.
    │ │ │ │ -
    static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const &mesh)
    (Optional) Specify face-varying data per face
    │ │ │ │ -
    static void setBaseVertexSharpness(TopologyRefiner &newRefiner, Index v, float sharpness)
    Assign a sharpness value to a given vertex.
    │ │ │ │ -
    static LocalIndexArray getBaseVertexEdgeLocalIndices(TopologyRefiner &newRefiner, Index v)
    Assign the local indices of a vertex within each of its incident edges.
    │ │ │ │ -
    static IndexArray getBaseEdgeVertices(TopologyRefiner &newRefiner, Index e)
    Assign the vertices incident each edge.
    │ │ │ │ -
    static IndexArray getBaseVertexFaces(TopologyRefiner &newRefiner, Index v)
    Assign the faces incident each vertex.
    │ │ │ │ -
    static void setBaseVertexNonManifold(TopologyRefiner &newRefiner, Index v, bool b)
    Tag a vertex as non-manifold.
    │ │ │ │ -
    static void setNumBaseFaces(TopologyRefiner &newRefiner, int count)
    Specify the number of faces to be accommodated.
    │ │ │ │ -
    static IndexArray getBaseFaceEdges(TopologyRefiner &newRefiner, Index f)
    Assign the edges incident each face.
    │ │ │ │ -
    static void setNumBaseFaceVertices(TopologyRefiner &newRefiner, Index f, int count)
    Specify the number of vertices incident each face.
    │ │ │ │ -
    static void setBaseEdgeSharpness(TopologyRefiner &newRefiner, Index e, float sharpness)
    Assign a sharpness value to a given edge.
    │ │ │ │ -
    static void setBaseEdgeNonManifold(TopologyRefiner &newRefiner, Index e, bool b)
    Tag an edge as non-manifold.
    │ │ │ │ -
    static void setNumBaseEdges(TopologyRefiner &newRefiner, int count)
    Specify the number of edges to be accommodated.
    │ │ │ │ -
    static TopologyRefiner * Create(MESH const &mesh, Options options=Options())
    Instantiates a TopologyRefiner from client-provided topological representation.
    │ │ │ │ -
    static Index findBaseEdge(TopologyRefiner const &newRefiner, Index v0, Index v1)
    Identify an edge to be assigned a sharpness value given a vertex pair.
    │ │ │ │ -
    static IndexArray getBaseVertexEdges(TopologyRefiner &newRefiner, Index v)
    Assign the edges incident each vertex.
    │ │ │ │ -
    static int createBaseFVarChannel(TopologyRefiner &newRefiner, int numValues)
    Create a new face-varying channel with the given number of values.
    │ │ │ │ -
    static int getNumBaseEdges(TopologyRefiner const &newRefiner)
    │ │ │ │ -
    static void setNumBaseVertices(TopologyRefiner &newRefiner, int count)
    Specify the number of vertices to be accommodated.
    │ │ │ │ -
    static void setBaseFaceHole(TopologyRefiner &newRefiner, Index f, bool isHole)
    Tag a face as a hole.
    │ │ │ │ -
    Stores topology data for a specified set of refinement options.
    │ │ │ │ -
    Private base class of Factories for constructing TopologyRefiners.
    │ │ │ │ -
    static bool prepareComponentTopologyAssignment(TopologyRefiner &refiner, bool fullValidation, TopologyCallback callback, void const *callbackData)
    │ │ │ │ - │ │ │ │ -
    static bool prepareComponentTagsAndSharpness(TopologyRefiner &refiner)
    │ │ │ │ -
    static bool prepareComponentTopologySizing(TopologyRefiner &refiner)
    │ │ │ │ -
    static bool prepareFaceVaryingChannels(TopologyRefiner &refiner)
    │ │ │ │ -
    Options related to the construction of each TopologyRefiner.
    │ │ │ │ -
    Options(Sdc::SchemeType sdcType=Sdc::SCHEME_CATMARK, Sdc::Options sdcOptions=Sdc::Options())
    │ │ │ │ - │ │ │ │ -
    Sdc::SchemeType schemeType
    The subdivision scheme type identifier.
    │ │ │ │ - │ │ │ │ -
    All supported options applying to subdivision scheme.
    Definition options.h:51
    │ │ │ │ -
    void SetFVarLinearInterpolation(FVarLinearInterpolation b)
    Set face-varying interpolation rule.
    Definition options.h:98
    │ │ │ │ -
    FVarLinearInterpolation GetFVarLinearInterpolation() const
    Get face-varying interpolation rule.
    Definition options.h:95
    │ │ │ │ - │ │ │ │ +
    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.
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -topologyRefinerFactory.h │ │ │ │ │ +topologyLevel.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,931 +23,387 @@ │ │ │ │ │ 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_REFINER_FACTORY_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H │ │ │ │ │ 26 │ │ │ │ │ 27#include "../version.h" │ │ │ │ │ 28 │ │ │ │ │ -29#include "../far/topologyRefiner.h" │ │ │ │ │ -30#include "../far/error.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ -36 │ │ │ │ │ -37namespace Far { │ │ │ │ │ -38 │ │ │ │ │ -46// │ │ │ │ │ -_4_7class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ -48protected: │ │ │ │ │ -49 │ │ │ │ │ -50 // │ │ │ │ │ -51 // Protected methods invoked by the subclass template to verify and process │ │ │ │ │ -each │ │ │ │ │ -52 // stage of construction implemented by the subclass: │ │ │ │ │ -53 // │ │ │ │ │ -_5_4 typedef Vtr::internal::Level::ValidationCallback _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k; │ │ │ │ │ -55 │ │ │ │ │ -_5_6 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_S_i_z_i_n_g(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ -_5_7 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_A_s_s_i_g_n_m_e_n_t(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, │ │ │ │ │ -bool fullValidation, │ │ │ │ │ -58 _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k callback, void const * callbackData); │ │ │ │ │ -_5_9 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_a_g_s_A_n_d_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ -_6_0 static bool _p_r_e_p_a_r_e_F_a_c_e_V_a_r_y_i_n_g_C_h_a_n_n_e_l_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ -61}; │ │ │ │ │ -62 │ │ │ │ │ +29#include "../vtr/level.h" │ │ │ │ │ +30#include "../vtr/refinement.h" │ │ │ │ │ +31#include "../far/types.h" │ │ │ │ │ +32 │ │ │ │ │ +33#include │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Far { │ │ │ │ │ +39 │ │ │ │ │ +_4_9class _T_o_p_o_l_o_g_y_L_e_v_e_l { │ │ │ │ │ +50 │ │ │ │ │ +51public: │ │ │ │ │ +53 │ │ │ │ │ +60 │ │ │ │ │ +_6_2 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const { return _level->getNumVertices(); } │ │ │ │ │ 63 │ │ │ │ │ -77template │ │ │ │ │ -_7_8class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y : public _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ -79 │ │ │ │ │ -80public: │ │ │ │ │ -81 │ │ │ │ │ -_8_4 struct _O_p_t_i_o_n_s { │ │ │ │ │ -85 │ │ │ │ │ -_8_6 _O_p_t_i_o_n_s(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e sdcType = _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K, _S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ -sdcOptions = _S_d_c_:_:_O_p_t_i_o_n_s()) : │ │ │ │ │ -87 _s_c_h_e_m_e_T_y_p_e(sdcType), │ │ │ │ │ -88 _s_c_h_e_m_e_O_p_t_i_o_n_s(sdcOptions), │ │ │ │ │ -89 _v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y(false) { } │ │ │ │ │ -90 │ │ │ │ │ -_9_1 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _s_c_h_e_m_e_T_y_p_e; │ │ │ │ │ -_9_2 _S_d_c_:_:_O_p_t_i_o_n_s _s_c_h_e_m_e_O_p_t_i_o_n_s; │ │ │ │ │ -_9_4 unsigned int _v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y : 1; │ │ │ │ │ -97 }; │ │ │ │ │ -98 │ │ │ │ │ -108 // │ │ │ │ │ -113 static _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* _C_r_e_a_t_e(MESH const& mesh, _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s │ │ │ │ │ -()); │ │ │ │ │ -114 │ │ │ │ │ -128 static _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* _C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & baseLevel); │ │ │ │ │ +_6_5 int _G_e_t_N_u_m_F_a_c_e_s() const { return _level->getNumFaces(); } │ │ │ │ │ +66 │ │ │ │ │ +_6_8 int _G_e_t_N_u_m_E_d_g_e_s() const { return _level->getNumEdges(); } │ │ │ │ │ +69 │ │ │ │ │ +_7_1 int _G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s() const { return _level->getNumFaceVerticesTotal(); } │ │ │ │ │ +73 │ │ │ │ │ +75 │ │ │ │ │ +90 // │ │ │ │ │ +91 │ │ │ │ │ +_9_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_V_e_r_t_i_c_e_s(_I_n_d_e_x f) const { return _level- │ │ │ │ │ +>getFaceVertices(f); } │ │ │ │ │ +94 │ │ │ │ │ +_9_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_E_d_g_e_s(_I_n_d_e_x f) const { return _level->getFaceEdges │ │ │ │ │ +(f); } │ │ │ │ │ +97 │ │ │ │ │ +_9_9 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_V_e_r_t_i_c_e_s(_I_n_d_e_x e) const { return _level- │ │ │ │ │ +>getEdgeVertices(e); } │ │ │ │ │ +100 │ │ │ │ │ +_1_0_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_F_a_c_e_s(_I_n_d_e_x e) const { return _level->getEdgeFaces │ │ │ │ │ +(e); } │ │ │ │ │ +103 │ │ │ │ │ +_1_0_5 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_F_a_c_e_s(_I_n_d_e_x v) const { return _level- │ │ │ │ │ +>getVertexFaces(v); } │ │ │ │ │ +106 │ │ │ │ │ +_1_0_8 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_E_d_g_e_s(_I_n_d_e_x v) const { return _level- │ │ │ │ │ +>getVertexEdges(v); } │ │ │ │ │ +109 │ │ │ │ │ +_1_1_1 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x v) const { return │ │ │ │ │ +_level->getVertexFaceLocalIndices(v); } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_4 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x v) const { return │ │ │ │ │ +_level->getVertexEdgeLocalIndices(v); } │ │ │ │ │ +115 │ │ │ │ │ +_1_1_7 _C_o_n_s_t_L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_I_n_d_e_x e) const { return │ │ │ │ │ +_level->getEdgeFaceLocalIndices(e); } │ │ │ │ │ +118 │ │ │ │ │ +_1_2_0 _I_n_d_e_x _F_i_n_d_E_d_g_e(_I_n_d_e_x v0, _I_n_d_e_x v1) const { return _level->findEdge(v0, v1); │ │ │ │ │ +} │ │ │ │ │ +122 │ │ │ │ │ +124 │ │ │ │ │ +126 │ │ │ │ │ +_1_2_8 bool _I_s_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_I_n_d_e_x e) const { return _level->isEdgeNonManifold │ │ │ │ │ +(e); } │ │ │ │ │ 129 │ │ │ │ │ -130protected: │ │ │ │ │ -_1_3_1 typedef Vtr::internal::Level::TopologyError _T_o_p_o_l_o_g_y_E_r_r_o_r; │ │ │ │ │ +_1_3_1 bool _I_s_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_I_n_d_e_x v) const { return _level- │ │ │ │ │ +>isVertexNonManifold(v); } │ │ │ │ │ 132 │ │ │ │ │ -134 │ │ │ │ │ -149 │ │ │ │ │ -151 static bool _r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ -const& mesh); │ │ │ │ │ -152 │ │ │ │ │ -155 static bool _a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ -const& mesh); │ │ │ │ │ -156 │ │ │ │ │ -158 static bool _a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH const& │ │ │ │ │ -mesh); │ │ │ │ │ -159 │ │ │ │ │ -161 static bool _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(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ -const& mesh); │ │ │ │ │ -162 │ │ │ │ │ -164 static void _r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y(TopologyError errCode, char const * msg, │ │ │ │ │ -MESH const& mesh); │ │ │ │ │ -165 │ │ │ │ │ -167 │ │ │ │ │ -168protected: │ │ │ │ │ -170 │ │ │ │ │ -187 │ │ │ │ │ -189 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ -190 │ │ │ │ │ -192 static void _s_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ -193 │ │ │ │ │ -195 static void _s_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ +_1_3_4 bool _I_s_E_d_g_e_B_o_u_n_d_a_r_y(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ +(e)._boundary; } │ │ │ │ │ +135 │ │ │ │ │ +_1_3_7 bool _I_s_V_e_r_t_e_x_B_o_u_n_d_a_r_y(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ +(v)._boundary; } │ │ │ │ │ +138 │ │ │ │ │ +_1_4_0 bool _I_s_V_e_r_t_e_x_C_o_r_n_e_r(_I_n_d_e_x v) const { return (_level->getNumVertexFaces(v) │ │ │ │ │ +== 1); } │ │ │ │ │ +141 │ │ │ │ │ +_1_6_2 bool _I_s_V_e_r_t_e_x_V_a_l_e_n_c_e_R_e_g_u_l_a_r(_I_n_d_e_x v) const { return !_level->getVertexTag │ │ │ │ │ +(v)._xordinary || _I_s_V_e_r_t_e_x_C_o_r_n_e_r(v); } │ │ │ │ │ +164 │ │ │ │ │ +166 │ │ │ │ │ +171 │ │ │ │ │ +_1_7_3 float _G_e_t_E_d_g_e_S_h_a_r_p_n_e_s_s(_I_n_d_e_x e) const { return _level->getEdgeSharpness(e); │ │ │ │ │ +} │ │ │ │ │ +174 │ │ │ │ │ +_1_7_6 float _G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_I_n_d_e_x v) const { return _level->getVertexSharpness │ │ │ │ │ +(v); } │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 bool _I_s_E_d_g_e_I_n_f_S_h_a_r_p(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ +(e)._infSharp; } │ │ │ │ │ +180 │ │ │ │ │ +_1_8_2 bool _I_s_V_e_r_t_e_x_I_n_f_S_h_a_r_p(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ +(v)._infSharp; } │ │ │ │ │ +183 │ │ │ │ │ +_1_8_5 bool _I_s_E_d_g_e_S_e_m_i_S_h_a_r_p(_I_n_d_e_x e) const { return _level->getEdgeTag │ │ │ │ │ +(e)._semiSharp; } │ │ │ │ │ +186 │ │ │ │ │ +_1_8_8 bool _I_s_V_e_r_t_e_x_S_e_m_i_S_h_a_r_p(_I_n_d_e_x v) const { return _level->getVertexTag │ │ │ │ │ +(v)._semiSharp; } │ │ │ │ │ +189 │ │ │ │ │ +_1_9_1 bool _I_s_F_a_c_e_H_o_l_e(_I_n_d_e_x f) const { return _level->isFaceHole(f); } │ │ │ │ │ +192 │ │ │ │ │ +_1_9_4 _S_d_c_:_:_C_r_e_a_s_e_:_:_R_u_l_e _G_e_t_V_e_r_t_e_x_R_u_l_e(_I_n_d_e_x v) const { return _level- │ │ │ │ │ +>getVertexRule(v); } │ │ │ │ │ 196 │ │ │ │ │ -198 static void _s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f, │ │ │ │ │ -int count); │ │ │ │ │ -199 │ │ │ │ │ -201 static void _s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, int │ │ │ │ │ -count); │ │ │ │ │ -202 │ │ │ │ │ -204 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ -int count); │ │ │ │ │ -205 │ │ │ │ │ -207 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ -int count); │ │ │ │ │ -208 │ │ │ │ │ -209 static int _g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ -210 static int _g_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ -211 static int _g_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ -213 │ │ │ │ │ -215 │ │ │ │ │ -237 │ │ │ │ │ -239 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ -f); │ │ │ │ │ +198 │ │ │ │ │ +228 │ │ │ │ │ +_2_3_0 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const { return _level->getNumFVarChannels(); } │ │ │ │ │ +231 │ │ │ │ │ +_2_3_4 int _G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s(int channel = 0) const { return _level- │ │ │ │ │ +>getNumFVarValues(channel); } │ │ │ │ │ +235 │ │ │ │ │ +_2_3_7 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_I_n_d_e_x f, int channel = 0) const { │ │ │ │ │ +238 return _level->getFaceFVarValues(f, channel); │ │ │ │ │ +239 } │ │ │ │ │ 240 │ │ │ │ │ -242 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f); │ │ │ │ │ -243 │ │ │ │ │ -245 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ -e); │ │ │ │ │ -246 │ │ │ │ │ -248 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e); │ │ │ │ │ -249 │ │ │ │ │ -251 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ -v); │ │ │ │ │ -252 │ │ │ │ │ -254 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ -v); │ │ │ │ │ +_2_4_2 bool _D_o_e_s_V_e_r_t_e_x_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x v, int channel = 0) const { │ │ │ │ │ +243 return _level->doesVertexFVarTopologyMatch(v, channel); │ │ │ │ │ +244 } │ │ │ │ │ +245 │ │ │ │ │ +_2_4_7 bool _D_o_e_s_E_d_g_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x e, int channel = 0) const { │ │ │ │ │ +248 return _level->doesEdgeFVarTopologyMatch(e, channel); │ │ │ │ │ +249 } │ │ │ │ │ +250 │ │ │ │ │ +_2_5_2 bool _D_o_e_s_F_a_c_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h(_I_n_d_e_x f, int channel = 0) const { │ │ │ │ │ +253 return _level->doesFaceFVarTopologyMatch(f, channel); │ │ │ │ │ +254 } │ │ │ │ │ 255 │ │ │ │ │ -257 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v); │ │ │ │ │ -259 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v); │ │ │ │ │ -261 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e); │ │ │ │ │ -262 │ │ │ │ │ -264 static void _p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner); │ │ │ │ │ -265 │ │ │ │ │ -267 static void _s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, │ │ │ │ │ -bool b); │ │ │ │ │ -268 │ │ │ │ │ -270 static void _s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ -bool b); │ │ │ │ │ +257 │ │ │ │ │ +259 │ │ │ │ │ +260 │ │ │ │ │ +_2_6_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_C_h_i_l_d_F_a_c_e_s(_I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ +>getFaceChildFaces(f); } │ │ │ │ │ +263 │ │ │ │ │ +_2_6_5 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_a_c_e_C_h_i_l_d_E_d_g_e_s(_I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ +>getFaceChildEdges(f); } │ │ │ │ │ +266 │ │ │ │ │ +_2_6_8 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_E_d_g_e_C_h_i_l_d_E_d_g_e_s(_I_n_d_e_x e) const { return _refToChild- │ │ │ │ │ +>getEdgeChildEdges(e); } │ │ │ │ │ +269 │ │ │ │ │ +_2_7_1 _I_n_d_e_x _G_e_t_F_a_c_e_C_h_i_l_d_V_e_r_t_e_x( _I_n_d_e_x f) const { return _refToChild- │ │ │ │ │ +>getFaceChildVertex(f); } │ │ │ │ │ 272 │ │ │ │ │ -274 │ │ │ │ │ -283 │ │ │ │ │ -285 static _I_n_d_e_x _f_i_n_d_B_a_s_e_E_d_g_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner, _I_n_d_e_x v0, │ │ │ │ │ -_I_n_d_e_x v1); │ │ │ │ │ -286 │ │ │ │ │ -288 static void _s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, │ │ │ │ │ -float sharpness); │ │ │ │ │ +_2_7_4 _I_n_d_e_x _G_e_t_E_d_g_e_C_h_i_l_d_V_e_r_t_e_x( _I_n_d_e_x e) const { return _refToChild- │ │ │ │ │ +>getEdgeChildVertex(e); } │ │ │ │ │ +275 │ │ │ │ │ +_2_7_7 _I_n_d_e_x _G_e_t_V_e_r_t_e_x_C_h_i_l_d_V_e_r_t_e_x(_I_n_d_e_x v) const { return _refToChild- │ │ │ │ │ +>getVertexChildVertex(v); } │ │ │ │ │ +278 │ │ │ │ │ +_2_8_0 _I_n_d_e_x _G_e_t_F_a_c_e_P_a_r_e_n_t_F_a_c_e(_I_n_d_e_x f) const { return _refToParent- │ │ │ │ │ +>getChildFaceParentFace(f); } │ │ │ │ │ +282 │ │ │ │ │ +284 │ │ │ │ │ +285 │ │ │ │ │ +_2_8_6 bool _V_a_l_i_d_a_t_e_T_o_p_o_l_o_g_y() const { return _level->validateTopology(); } │ │ │ │ │ +_2_8_7 void _P_r_i_n_t_T_o_p_o_l_o_g_y(bool children = true) const { _level->print((children && │ │ │ │ │ +_refToChild) ? _refToChild : 0); } │ │ │ │ │ 289 │ │ │ │ │ -291 static void _s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ -float sharpness); │ │ │ │ │ -292 │ │ │ │ │ -294 static void _s_e_t_B_a_s_e_F_a_c_e_H_o_l_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f, bool │ │ │ │ │ -isHole); │ │ │ │ │ -296 │ │ │ │ │ -298 │ │ │ │ │ -308 │ │ │ │ │ -310 static int _c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int │ │ │ │ │ -numValues); │ │ │ │ │ -311 │ │ │ │ │ -313 static int _c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int │ │ │ │ │ -numValues, _S_d_c_:_:_O_p_t_i_o_n_s const& fvarOptions); │ │ │ │ │ -314 │ │ │ │ │ -316 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ -face, int channel = 0); │ │ │ │ │ -317 │ │ │ │ │ -319 │ │ │ │ │ -320protected: │ │ │ │ │ -321 // │ │ │ │ │ -322 // Not to be specialized: │ │ │ │ │ -323 // │ │ │ │ │ -324 static bool _p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, MESH const& mesh, │ │ │ │ │ -_O_p_t_i_o_n_s options); │ │ │ │ │ -325 │ │ │ │ │ -326private: │ │ │ │ │ -327 // │ │ │ │ │ -328 // An oversight in the interfaces of the error reporting function between │ │ │ │ │ -the factory │ │ │ │ │ -329 // class and the Vtr::Level requires this adapter function to avoid │ │ │ │ │ -warnings. │ │ │ │ │ -330 // │ │ │ │ │ -331 // The static class method requires a reference as the MESH argument, but │ │ │ │ │ -the interface │ │ │ │ │ -332 // for Vtr::Level requires a pointer (void*). So this adapter with a MESH* │ │ │ │ │ -argument is │ │ │ │ │ -333 // used to effectively cast the function pointer required by Vtr::Level │ │ │ │ │ -error reporting: │ │ │ │ │ -334 // │ │ │ │ │ -335 static void reportInvalidTopologyAdapter(TopologyError errCode, char const │ │ │ │ │ -* msg, MESH const * mesh) { │ │ │ │ │ -336 _r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y(errCode, msg, *mesh); │ │ │ │ │ -337 } │ │ │ │ │ -338}; │ │ │ │ │ -339 │ │ │ │ │ -340 │ │ │ │ │ -341// │ │ │ │ │ -342// Generic implementations: │ │ │ │ │ -343// │ │ │ │ │ -344template │ │ │ │ │ -345TopologyRefiner* │ │ │ │ │ -_3_4_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_C_r_e_a_t_e(MESH const& mesh, _O_p_t_i_o_n_s options) { │ │ │ │ │ -347 │ │ │ │ │ -348 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r * refiner = new _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(options._s_c_h_e_m_e_T_y_p_e, │ │ │ │ │ -options._s_c_h_e_m_e_O_p_t_i_o_n_s); │ │ │ │ │ -349 │ │ │ │ │ -350 if (! populateBaseLevel(*refiner, mesh, options)) { │ │ │ │ │ -351 delete refiner; │ │ │ │ │ -352 return 0; │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -355 // Eventually want to move the Refiner's inventory initialization here. │ │ │ │ │ -Currently it │ │ │ │ │ -356 // is handled after topology assignment, but if the inventory is to include │ │ │ │ │ -additional │ │ │ │ │ -357 // features (e.g. holes, etc.) it is better off deferred to here. │ │ │ │ │ -358 │ │ │ │ │ -359 return refiner; │ │ │ │ │ -360} │ │ │ │ │ -361 │ │ │ │ │ -362template │ │ │ │ │ -363_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* │ │ │ │ │ -_3_6_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & source) { │ │ │ │ │ -365 │ │ │ │ │ -366 return new _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(source); │ │ │ │ │ -367} │ │ │ │ │ -368 │ │ │ │ │ -369template │ │ │ │ │ -370bool │ │ │ │ │ -_3_7_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, │ │ │ │ │ -MESH const& mesh, _O_p_t_i_o_n_s options) { │ │ │ │ │ -372 │ │ │ │ │ -373 // │ │ │ │ │ -374 // Construction of a specialized topology refiner involves four steps, each │ │ │ │ │ -of which │ │ │ │ │ -375 // involves a method specialized for MESH followed by one that takes an │ │ │ │ │ -action in │ │ │ │ │ -376 // response to it or in preparation for the next step. │ │ │ │ │ -377 // │ │ │ │ │ -378 // Both the specialized methods and those that follow them may find fault │ │ │ │ │ -in the │ │ │ │ │ -379 // construction and trigger failure at any time: │ │ │ │ │ -380 // │ │ │ │ │ -381 │ │ │ │ │ -382 // │ │ │ │ │ -383 // Sizing of the topology -- this is a required specialization for MESH. │ │ │ │ │ -This defines │ │ │ │ │ -384 // an inventory of all components and their relations that is used to │ │ │ │ │ -allocate buffers │ │ │ │ │ -385 // to be efficiently populated in the subsequent topology assignment step. │ │ │ │ │ -386 // │ │ │ │ │ -387 if (! resizeComponentTopology(refiner, mesh)) return false; │ │ │ │ │ -388 if (! prepareComponentTopologySizing(refiner)) return false; │ │ │ │ │ -389 │ │ │ │ │ -390 // │ │ │ │ │ -391 // Assignment of the topology -- this is a required specialization for │ │ │ │ │ -MESH. If edges │ │ │ │ │ -392 // are specified, all other topological relations are expected to be │ │ │ │ │ -defined for them. │ │ │ │ │ -393 // Otherwise edges and remaining topology will be completed from the face- │ │ │ │ │ -vertices: │ │ │ │ │ -394 // │ │ │ │ │ -395 bool validate = options._v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y; │ │ │ │ │ -396 _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k callback = reinterpret_cast<_T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k> │ │ │ │ │ -(reportInvalidTopologyAdapter); │ │ │ │ │ -397 void const * userData = &mesh; │ │ │ │ │ -398 │ │ │ │ │ -399 if (! assignComponentTopology(refiner, mesh)) return false; │ │ │ │ │ -400 if (! prepareComponentTopologyAssignment(refiner, validate, callback, │ │ │ │ │ -userData)) return false; │ │ │ │ │ -401 │ │ │ │ │ -402 // │ │ │ │ │ -403 // User assigned and internal tagging of components -- an optional │ │ │ │ │ -specialization for │ │ │ │ │ -404 // MESH. Allows the specification of sharpness values, holes, etc. │ │ │ │ │ -405 // │ │ │ │ │ -406 if (! assignComponentTags(refiner, mesh)) return false; │ │ │ │ │ -407 if (! prepareComponentTagsAndSharpness(refiner)) return false; │ │ │ │ │ -408 │ │ │ │ │ -409 // │ │ │ │ │ -410 // Defining channels of face-varying primvar data -- an optional │ │ │ │ │ -specialization for MESH. │ │ │ │ │ -411 // │ │ │ │ │ -412 if (! assignFaceVaryingTopology(refiner, mesh)) return false; │ │ │ │ │ -413 if (! prepareFaceVaryingChannels(refiner)) return false; │ │ │ │ │ -414 │ │ │ │ │ -415 return true; │ │ │ │ │ -416} │ │ │ │ │ -417 │ │ │ │ │ -418template │ │ │ │ │ -419inline void │ │ │ │ │ -_4_2_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ -int count) { │ │ │ │ │ -421 newRefiner._levels[0]->resizeFaces(count); │ │ │ │ │ -422} │ │ │ │ │ -423template │ │ │ │ │ -424inline void │ │ │ │ │ -_4_2_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ -int count) { │ │ │ │ │ -426 newRefiner._levels[0]->resizeEdges(count); │ │ │ │ │ -427} │ │ │ │ │ -428template │ │ │ │ │ -429inline void │ │ │ │ │ -_4_3_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, int count) { │ │ │ │ │ -431 newRefiner._levels[0]->resizeVertices(count); │ │ │ │ │ -432} │ │ │ │ │ -433 │ │ │ │ │ -434template │ │ │ │ │ -435inline int │ │ │ │ │ -_4_3_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ -newRefiner) { │ │ │ │ │ -437 return newRefiner._levels[0]->getNumFaces(); │ │ │ │ │ -438} │ │ │ │ │ -439template │ │ │ │ │ -440inline int │ │ │ │ │ -_4_4_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ -newRefiner) { │ │ │ │ │ -442 return newRefiner._levels[0]->getNumEdges(); │ │ │ │ │ -443} │ │ │ │ │ -444template │ │ │ │ │ -445inline int │ │ │ │ │ -_4_4_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ -newRefiner) { │ │ │ │ │ -447 return newRefiner._levels[0]->getNumVertices(); │ │ │ │ │ -448} │ │ │ │ │ -449 │ │ │ │ │ -450template │ │ │ │ │ -451inline void │ │ │ │ │ -_4_5_2_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x f, int count) { │ │ │ │ │ -453 newRefiner._levels[0]->resizeFaceVertices(f, count); │ │ │ │ │ -454 newRefiner._hasIrregFaces = newRefiner._hasIrregFaces || (count != │ │ │ │ │ -newRefiner._regFaceSize); │ │ │ │ │ -455} │ │ │ │ │ -456template │ │ │ │ │ -457inline void │ │ │ │ │ -_4_5_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e, int count) { │ │ │ │ │ -459 newRefiner._levels[0]->resizeEdgeFaces(e, count); │ │ │ │ │ -460} │ │ │ │ │ -461template │ │ │ │ │ -462inline void │ │ │ │ │ -_4_6_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v, int count) { │ │ │ │ │ -464 newRefiner._levels[0]->resizeVertexFaces(v, count); │ │ │ │ │ -465} │ │ │ │ │ -466template │ │ │ │ │ -467inline void │ │ │ │ │ -_4_6_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v, int count) { │ │ │ │ │ -469 newRefiner._levels[0]->resizeVertexEdges(v, count); │ │ │ │ │ -470} │ │ │ │ │ -471 │ │ │ │ │ -472template │ │ │ │ │ -473inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_7_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x f) { │ │ │ │ │ -475 return newRefiner._levels[0]->getFaceVertices(f); │ │ │ │ │ -476} │ │ │ │ │ -477template │ │ │ │ │ -478inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_7_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ -_I_n_d_e_x f) { │ │ │ │ │ -480 return newRefiner._levels[0]->getFaceEdges(f); │ │ │ │ │ -481} │ │ │ │ │ -482template │ │ │ │ │ -483inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_8_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e) { │ │ │ │ │ -485 return newRefiner._levels[0]->getEdgeVertices(e); │ │ │ │ │ -486} │ │ │ │ │ -487template │ │ │ │ │ -488inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_8_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ -_I_n_d_e_x e) { │ │ │ │ │ -490 return newRefiner._levels[0]->getEdgeFaces(e); │ │ │ │ │ -491} │ │ │ │ │ -492template │ │ │ │ │ -493inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_9_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v) { │ │ │ │ │ -495 return newRefiner._levels[0]->getVertexFaces(v); │ │ │ │ │ -496} │ │ │ │ │ -497template │ │ │ │ │ -498inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_4_9_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v) { │ │ │ │ │ -500 return newRefiner._levels[0]->getVertexEdges(v); │ │ │ │ │ -501} │ │ │ │ │ -502 │ │ │ │ │ -503template │ │ │ │ │ -504inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_5_0_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e) { │ │ │ │ │ -506 return newRefiner._levels[0]->getEdgeFaceLocalIndices(e); │ │ │ │ │ -507} │ │ │ │ │ -508template │ │ │ │ │ -509inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_5_1_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -& newRefiner, _I_n_d_e_x v) { │ │ │ │ │ -511 return newRefiner._levels[0]->getVertexFaceLocalIndices(v); │ │ │ │ │ -512} │ │ │ │ │ -513template │ │ │ │ │ -514inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_5_1_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -& newRefiner, _I_n_d_e_x v) { │ │ │ │ │ -516 return newRefiner._levels[0]->getVertexEdgeLocalIndices(v); │ │ │ │ │ -517} │ │ │ │ │ -518 │ │ │ │ │ -519template │ │ │ │ │ -520inline _I_n_d_e_x │ │ │ │ │ -_5_2_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_f_i_n_d_B_a_s_e_E_d_g_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ -newRefiner, _I_n_d_e_x v0, _I_n_d_e_x v1) { │ │ │ │ │ -522 return newRefiner._levels[0]->findEdge(v0, v1); │ │ │ │ │ -523} │ │ │ │ │ -524 │ │ │ │ │ -525template │ │ │ │ │ -526inline void │ │ │ │ │ -_5_2_7_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner) { │ │ │ │ │ -528 newRefiner._levels[0]->populateLocalIndices(); │ │ │ │ │ -529} │ │ │ │ │ -530 │ │ │ │ │ -531template │ │ │ │ │ -532inline void │ │ │ │ │ -_5_3_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e, bool b) { │ │ │ │ │ -534 newRefiner._levels[0]->setEdgeNonManifold(e, b); │ │ │ │ │ -535} │ │ │ │ │ -536template │ │ │ │ │ -537inline void │ │ │ │ │ -_5_3_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v, bool b) { │ │ │ │ │ -539 newRefiner._levels[0]->setVertexNonManifold(v, b); │ │ │ │ │ -540} │ │ │ │ │ -541 │ │ │ │ │ -542template │ │ │ │ │ -543inline void │ │ │ │ │ -_5_4_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x e, float s) { │ │ │ │ │ -545 newRefiner._levels[0]->getEdgeSharpness(e) = s; │ │ │ │ │ -546} │ │ │ │ │ -547template │ │ │ │ │ -548inline void │ │ │ │ │ -_5_4_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x v, float s) { │ │ │ │ │ -550 newRefiner._levels[0]->getVertexSharpness(v) = s; │ │ │ │ │ -551} │ │ │ │ │ -552template │ │ │ │ │ -553inline void │ │ │ │ │ -_5_5_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_F_a_c_e_H_o_l_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ -_I_n_d_e_x f, bool b) { │ │ │ │ │ -555 newRefiner._levels[0]->setFaceHole(f, b); │ │ │ │ │ -556 newRefiner._hasHoles = newRefiner._hasHoles || b; │ │ │ │ │ -557} │ │ │ │ │ -558 │ │ │ │ │ -559template │ │ │ │ │ -560inline int │ │ │ │ │ -_5_6_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, int numValues) { │ │ │ │ │ -562 return newRefiner._levels[0]->createFVarChannel(numValues, │ │ │ │ │ -newRefiner._subdivOptions); │ │ │ │ │ -563} │ │ │ │ │ -564template │ │ │ │ │ -565inline int │ │ │ │ │ -_5_6_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, int numValues, _S_d_c_:_:_O_p_t_i_o_n_s const& fvarOptions) { │ │ │ │ │ -567 _S_d_c_:_:_O_p_t_i_o_n_s newOptions = newRefiner._subdivOptions; │ │ │ │ │ -568 newOptions._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 │ │ │ │ │ -(fvarOptions._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()); │ │ │ │ │ -569 return newRefiner._levels[0]->createFVarChannel(numValues, newOptions); │ │ │ │ │ -570} │ │ │ │ │ -571template │ │ │ │ │ -572inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ -_5_7_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ -newRefiner, _I_n_d_e_x face, int channel) { │ │ │ │ │ -574 return newRefiner._levels[0]->getFaceFVarValues(face, channel); │ │ │ │ │ -575} │ │ │ │ │ -576 │ │ │ │ │ -577 │ │ │ │ │ -578template │ │ │ │ │ -579bool │ │ │ │ │ -_5_8_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ -* refiner */, MESH const& /* mesh */) { │ │ │ │ │ -581 │ │ │ │ │ -582 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ -583 "Failure in TopologyRefinerFactory<>::resizeComponentTopology() -- no │ │ │ │ │ -specialization provided."); │ │ │ │ │ -584 │ │ │ │ │ -585 // │ │ │ │ │ -586 // Sizing the topology tables: │ │ │ │ │ -587 // This method is for determining the sizes of the various topology tables │ │ │ │ │ -(and other │ │ │ │ │ -588 // data) associated with the mesh. Once completed, appropriate memory will │ │ │ │ │ -be allocated │ │ │ │ │ -589 // and an additional method invoked to populate it accordingly. │ │ │ │ │ -590 // │ │ │ │ │ -591 // The following methods should be called -- first those to specify the │ │ │ │ │ -number of faces, │ │ │ │ │ -592 // edges and vertices in the mesh: │ │ │ │ │ -593 // │ │ │ │ │ -594 // void setBaseFaceCount( TopologyRefiner& newRefiner, int count) │ │ │ │ │ -595 // void setBaseEdgeCount( TopologyRefiner& newRefiner, int count) │ │ │ │ │ -596 // void setBaseVertexCount(TopologyRefiner& newRefiner, int count) │ │ │ │ │ -597 // │ │ │ │ │ -598 // and then for each face, edge and vertex, the number of its incident │ │ │ │ │ -components: │ │ │ │ │ -599 // │ │ │ │ │ -600 // void setBaseFaceVertexCount(TopologyRefiner& newRefiner, Index face, int │ │ │ │ │ -count) │ │ │ │ │ -601 // void setBaseEdgeFaceCount( TopologyRefiner& newRefiner, Index edge, int │ │ │ │ │ -count) │ │ │ │ │ -602 // void setBaseVertexFaceCount(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ -int count) │ │ │ │ │ -603 // void setBaseVertexEdgeCount(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ -int count) │ │ │ │ │ -604 // │ │ │ │ │ -605 // The count/size for a component type must be set before indices │ │ │ │ │ -associated with that │ │ │ │ │ -606 // component type can be used. │ │ │ │ │ -607 // │ │ │ │ │ -608 // Note that it is only necessary to size 4 of the 6 supported topological │ │ │ │ │ -relations -- │ │ │ │ │ -609 // the number of edge-vertices is fixed at two per edge, and the number of │ │ │ │ │ -face-edges is │ │ │ │ │ -610 // the same as the number of face-vertices. │ │ │ │ │ -611 // │ │ │ │ │ -612 // So a single pass through your mesh to gather up all of this sizing │ │ │ │ │ -information will │ │ │ │ │ -613 // allow the Tables to be allocated appropriately once and avoid any │ │ │ │ │ -dynamic resizing as │ │ │ │ │ -614 // it grows. │ │ │ │ │ -615 // │ │ │ │ │ -616 return false; │ │ │ │ │ -617} │ │ │ │ │ -618 │ │ │ │ │ -619template │ │ │ │ │ -620bool │ │ │ │ │ -_6_2_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ -* refiner */, MESH const& /* mesh */) { │ │ │ │ │ -622 │ │ │ │ │ -623 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ -624 "Failure in TopologyRefinerFactory<>::assignComponentTopology() -- no │ │ │ │ │ -specialization provided."); │ │ │ │ │ -625 │ │ │ │ │ -626 // │ │ │ │ │ -627 // Assigning the topology tables: │ │ │ │ │ -628 // Once the topology tables have been allocated, the six required │ │ │ │ │ -topological │ │ │ │ │ -629 // relations can be directly populated using the following methods: │ │ │ │ │ -630 // │ │ │ │ │ -631 // IndexArray setBaseFaceVertices(TopologyRefiner& newRefiner, Index face) │ │ │ │ │ -632 // IndexArray setBaseFaceEdges(TopologyRefiner& newRefiner, Index face) │ │ │ │ │ -633 // │ │ │ │ │ -634 // IndexArray setBaseEdgeVertices(TopologyRefiner& newRefiner, Index edge) │ │ │ │ │ -635 // IndexArray setBaseEdgeFaces(TopologyRefiner& newRefiner, Index edge) │ │ │ │ │ -636 // │ │ │ │ │ -637 // IndexArray setBaseVertexEdges(TopologyRefiner& newRefiner, Index vertex) │ │ │ │ │ -638 // IndexArray setBaseVertexFaces(TopologyRefiner& newRefiner, Index vertex) │ │ │ │ │ -639 // │ │ │ │ │ -640 // For the last two relations -- the faces and edges incident a vertex - │ │ │ │ │ -- there are │ │ │ │ │ -641 // also "local indices" that must be specified (considering doing this │ │ │ │ │ -internally), │ │ │ │ │ -642 // where the "local index" of each incident face or edge is the index of │ │ │ │ │ -the vertex │ │ │ │ │ -643 // within that face or edge, and so ranging from 0-3 for incident quads and │ │ │ │ │ -0-1 for │ │ │ │ │ -644 // incident edges. These are assigned through similarly retrieved arrays: │ │ │ │ │ -645 // │ │ │ │ │ -646 // LocalIndexArray setBaseVertexFaceLocalIndices(TopologyRefiner& │ │ │ │ │ -newRefiner, Index vertex) │ │ │ │ │ -647 // LocalIndexArray setBaseVertexEdgeLocalIndices(TopologyRefiner& │ │ │ │ │ -newRefiner, Index vertex) │ │ │ │ │ -648 // LocalIndexArray setBaseEdgeFaceLocalIndices( TopologyRefiner& │ │ │ │ │ -newRefiner, Index edge) │ │ │ │ │ -649 // │ │ │ │ │ -650 // or, if the mesh is manifold, explicit assignment of these can be │ │ │ │ │ -deferred and │ │ │ │ │ -651 // all can be determined by calling: │ │ │ │ │ -652 // │ │ │ │ │ -653 // void populateBaseLocalIndices(TopologyRefiner& newRefiner) │ │ │ │ │ -654 // │ │ │ │ │ -655 // All components are assumed to be locally manifold and ordering of │ │ │ │ │ -components in │ │ │ │ │ -656 // the above relations is expected to be counter-clockwise. │ │ │ │ │ -657 // │ │ │ │ │ -658 // For non-manifold components, no ordering/orientation of incident │ │ │ │ │ -components is │ │ │ │ │ -659 // assumed or required, but be sure to explicitly tag such components │ │ │ │ │ -(vertices and │ │ │ │ │ -660 // edges) as non-manifold: │ │ │ │ │ -661 // │ │ │ │ │ -662 // void setBaseEdgeNonManifold(TopologyRefiner& newRefiner, Index edge, │ │ │ │ │ -bool b); │ │ │ │ │ -663 // │ │ │ │ │ -664 // void setBaseVertexNonManifold(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ -bool b); │ │ │ │ │ -665 // │ │ │ │ │ -666 // Also consider using TopologyLevel::ValidateTopology() when debugging to │ │ │ │ │ -ensure │ │ │ │ │ -667 // that topology has been completely and correctly specified. │ │ │ │ │ -668 // │ │ │ │ │ -669 return false; │ │ │ │ │ -670} │ │ │ │ │ -671 │ │ │ │ │ -672template │ │ │ │ │ -673bool │ │ │ │ │ -_6_7_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_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(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ -* refiner */, MESH const& /* mesh */) { │ │ │ │ │ -675 │ │ │ │ │ -676 // │ │ │ │ │ -677 // Optional assigning face-varying topology tables: │ │ │ │ │ -678 // │ │ │ │ │ -679 // Create independent face-varying primitive variable channels: │ │ │ │ │ -680 // int createBaseFVarChannel(TopologyRefiner& newRefiner, int numValues) │ │ │ │ │ -681 // │ │ │ │ │ -682 // For each channel, populate the face-vertex values: │ │ │ │ │ -683 // IndexArray setBaseFaceFVarValues(TopologyRefiner& newRefiner, Index │ │ │ │ │ -face, int channel = 0) │ │ │ │ │ -684 // │ │ │ │ │ -685 return true; │ │ │ │ │ -686} │ │ │ │ │ -687 │ │ │ │ │ -688template │ │ │ │ │ -689bool │ │ │ │ │ -_6_9_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ -* refiner */, MESH const& /* mesh */) { │ │ │ │ │ -691 │ │ │ │ │ -692 // │ │ │ │ │ -693 // Optional tagging: │ │ │ │ │ -694 // This is where any additional feature tags -- sharpness, holes, etc. - │ │ │ │ │ -- can be │ │ │ │ │ -695 // specified using: │ │ │ │ │ -696 // │ │ │ │ │ -697 // void setBaseEdgeSharpness(TopologyRefiner& newRefiner, Index edge, float │ │ │ │ │ -sharpness) │ │ │ │ │ -698 // void setBaseVertexSharpness(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ -float sharpness) │ │ │ │ │ -699 // │ │ │ │ │ -700 // void setBaseFaceHole(TopologyRefiner& newRefiner, Index face, bool hole) │ │ │ │ │ -701 // │ │ │ │ │ -702 return true; │ │ │ │ │ -703} │ │ │ │ │ -704 │ │ │ │ │ -705template │ │ │ │ │ -706void │ │ │ │ │ -_7_0_7_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y( │ │ │ │ │ -708 TopologyError /* errCode */, char const * /* msg */, MESH const& /* mesh */ │ │ │ │ │ -) { │ │ │ │ │ -709 │ │ │ │ │ -710 // │ │ │ │ │ -711 // Optional topology validation error reporting: │ │ │ │ │ -712 // This method is called whenever the factory encounters topology │ │ │ │ │ -validation │ │ │ │ │ -713 // errors. By default, nothing is reported │ │ │ │ │ -714 // │ │ │ │ │ -715} │ │ │ │ │ -716 │ │ │ │ │ -717} // end namespace Far │ │ │ │ │ -718 │ │ │ │ │ -719} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -720using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -721} // end namespace OpenSubdiv │ │ │ │ │ -722 │ │ │ │ │ -723#endif /* OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H */ │ │ │ │ │ +290 │ │ │ │ │ +291private: │ │ │ │ │ +_2_9_2 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r; │ │ │ │ │ +293 │ │ │ │ │ +294 Vtr::internal::Level const * _level; │ │ │ │ │ +295 Vtr::internal::Refinement const * _refToParent; │ │ │ │ │ +296 Vtr::internal::Refinement const * _refToChild; │ │ │ │ │ +297 │ │ │ │ │ +298public: │ │ │ │ │ +299 // Not intended for public use, but required by std::vector, etc... │ │ │ │ │ +_3_0_0 _T_o_p_o_l_o_g_y_L_e_v_e_l() { } │ │ │ │ │ +_3_0_1 _~_T_o_p_o_l_o_g_y_L_e_v_e_l() { } │ │ │ │ │ +302}; │ │ │ │ │ +303 │ │ │ │ │ +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 */ │ │ │ │ │ _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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ -Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ -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_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_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_F_a_c_e_s │ │ │ │ │ -static int getNumBaseFaces(TopologyRefiner const &newRefiner) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_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_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -static LocalIndexArray getBaseVertexFaceLocalIndices(TopologyRefiner │ │ │ │ │ -&newRefiner, Index v) │ │ │ │ │ -Assign the local indices of a vertex within each of its incident 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_:_5_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s │ │ │ │ │ -static int getNumBaseVertices(TopologyRefiner const &newRefiner) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s │ │ │ │ │ -static void setNumBaseEdgeFaces(TopologyRefiner &newRefiner, Index e, int │ │ │ │ │ -count) │ │ │ │ │ -Specify the number of faces incident each edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ -static IndexArray getBaseFaceVertices(TopologyRefiner &newRefiner, Index f) │ │ │ │ │ -Assign the vertices incident each 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_:_4_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_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -static LocalIndexArray getBaseEdgeFaceLocalIndices(TopologyRefiner &newRefiner, │ │ │ │ │ -Index e) │ │ │ │ │ -Assign the local indices of an edge within each of its incident 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_:_5_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l │ │ │ │ │ -static bool populateBaseLevel(TopologyRefiner &refiner, MESH const &mesh, │ │ │ │ │ -Options options) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_3_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -static void populateBaseLocalIndices(TopologyRefiner &newRefiner) │ │ │ │ │ -Determine all local indices by inspection (only for pure manifold meshes) │ │ │ │ │ -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_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_:_:_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_:_: │ │ │ │ │ -_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ -static void setNumBaseVertexEdges(TopologyRefiner &newRefiner, Index v, int │ │ │ │ │ -count) │ │ │ │ │ -Specify the number of edges incident each vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_F_a_c_t_o_r_y_:_:_T_o_p_o_l_o_g_y_E_r_r_o_r │ │ │ │ │ -Vtr::internal::Level::TopologyError TopologyError │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -static IndexArray getBaseFaceFVarValues(TopologyRefiner &newRefiner, Index │ │ │ │ │ -face, int channel=0) │ │ │ │ │ -Assign the face-varying values for the corners of each 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_:_5_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s │ │ │ │ │ -static IndexArray getBaseEdgeFaces(TopologyRefiner &newRefiner, Index e) │ │ │ │ │ -Assign the faces incident each edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ -static void setNumBaseVertexFaces(TopologyRefiner &newRefiner, Index v, int │ │ │ │ │ -count) │ │ │ │ │ -Specify the number of faces incident each vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_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_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ -static void setBaseVertexSharpness(TopologyRefiner &newRefiner, Index v, float │ │ │ │ │ -sharpness) │ │ │ │ │ -Assign a sharpness value to a given vertex. │ │ │ │ │ -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_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ -static LocalIndexArray getBaseVertexEdgeLocalIndices(TopologyRefiner │ │ │ │ │ -&newRefiner, Index v) │ │ │ │ │ -Assign the local indices of a vertex within each of its incident edges. │ │ │ │ │ -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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s │ │ │ │ │ -static IndexArray getBaseEdgeVertices(TopologyRefiner &newRefiner, Index e) │ │ │ │ │ -Assign the vertices incident each edge. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ -static IndexArray getBaseVertexFaces(TopologyRefiner &newRefiner, Index v) │ │ │ │ │ -Assign the faces incident each vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ -static void setBaseVertexNonManifold(TopologyRefiner &newRefiner, Index v, bool │ │ │ │ │ -b) │ │ │ │ │ -Tag a vertex as non-manifold. │ │ │ │ │ -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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_s │ │ │ │ │ -static void setNumBaseFaces(TopologyRefiner &newRefiner, int count) │ │ │ │ │ -Specify the number of faces to be accommodated. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s │ │ │ │ │ -static IndexArray getBaseFaceEdges(TopologyRefiner &newRefiner, Index f) │ │ │ │ │ -Assign the edges incident each 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_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ -static void setNumBaseFaceVertices(TopologyRefiner &newRefiner, Index f, int │ │ │ │ │ -count) │ │ │ │ │ -Specify the number of vertices incident each 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_:_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_:_:_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_:_: │ │ │ │ │ -_s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ -static void setBaseEdgeSharpness(TopologyRefiner &newRefiner, Index e, float │ │ │ │ │ -sharpness) │ │ │ │ │ -Assign a sharpness value to a given edge. │ │ │ │ │ -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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ -_s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ -static void setBaseEdgeNonManifold(TopologyRefiner &newRefiner, Index e, bool │ │ │ │ │ -b) │ │ │ │ │ -Tag an edge as non-manifold. │ │ │ │ │ -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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_s │ │ │ │ │ -static void setNumBaseEdges(TopologyRefiner &newRefiner, int count) │ │ │ │ │ -Specify the number of edges to be accommodated. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_C_r_e_a_t_e │ │ │ │ │ -static TopologyRefiner * Create(MESH const &mesh, Options options=Options()) │ │ │ │ │ -Instantiates a TopologyRefiner from client-provided topological representation. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_f_i_n_d_B_a_s_e_E_d_g_e │ │ │ │ │ -static Index findBaseEdge(TopologyRefiner const &newRefiner, Index v0, Index │ │ │ │ │ -v1) │ │ │ │ │ -Identify an edge to be assigned a sharpness value given a vertex pair. │ │ │ │ │ -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_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_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ -static IndexArray getBaseVertexEdges(TopologyRefiner &newRefiner, Index v) │ │ │ │ │ -Assign the edges incident each vertex. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_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_:_: │ │ │ │ │ -_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ -static int createBaseFVarChannel(TopologyRefiner &newRefiner, int numValues) │ │ │ │ │ -Create a new face-varying channel with the given number of values. │ │ │ │ │ -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_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_E_d_g_e_s │ │ │ │ │ -static int getNumBaseEdges(TopologyRefiner const &newRefiner) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s │ │ │ │ │ -static void setNumBaseVertices(TopologyRefiner &newRefiner, int count) │ │ │ │ │ -Specify the number of vertices to be accommodated. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_s_e_t_B_a_s_e_F_a_c_e_H_o_l_e │ │ │ │ │ -static void setBaseFaceHole(TopologyRefiner &newRefiner, Index f, bool isHole) │ │ │ │ │ -Tag a face as a hole. │ │ │ │ │ -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_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_L_e_v_e_l │ │ │ │ │ +An interface for accessing data in a specific level of a refined topology │ │ │ │ │ +hierarchy. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_G_e_t_F_a_c_e_P_a_r_e_n_t_F_a_c_e │ │ │ │ │ +Index GetFaceParentFace(Index f) const │ │ │ │ │ +Return the parent face (in the previous level) of a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ +TopologyLevel() │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_V_a_l_e_n_c_e_R_e_g_u_l_a_r │ │ │ │ │ +bool IsVertexValenceRegular(Index v) const │ │ │ │ │ +Return if the valence of the vertex is regular (must be manifold) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float GetEdgeSharpness(Index e) const │ │ │ │ │ +Return the sharpness assigned a given edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_F_a_c_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ +bool DoesFaceFVarTopologyMatch(Index f, int channel=0) const │ │ │ │ │ +Return if face-varying topology around a face matches. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ +Sdc::Crease::Rule GetVertexRule(Index v) const │ │ │ │ │ +Return the subdivision rule assigned a given vertex specific to this level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_C_o_r_n_e_r │ │ │ │ │ +bool IsVertexCorner(Index v) const │ │ │ │ │ +Return if the vertex is a corner (only one incident face) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ +Index GetVertexChildVertex(Index v) const │ │ │ │ │ +Return the child vertex (in the next level) of a given vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const │ │ │ │ │ +Access the local indices of an edge with respect to its incident faces. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_E_d_g_e_s │ │ │ │ │ +ConstIndexArray GetFaceChildEdges(Index f) const │ │ │ │ │ +Access the child edges (in the next level) of a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_E_d_g_e_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ +bool DoesEdgeFVarTopologyMatch(Index e, int channel=0) const │ │ │ │ │ +Return if face-varying topology across the edge only matches. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_P_r_i_n_t_T_o_p_o_l_o_g_y │ │ │ │ │ +void PrintTopology(bool children=true) const │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetFaceVertices(Index f) const │ │ │ │ │ +Access the vertices incident a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_F_a_c_e_s │ │ │ │ │ +ConstIndexArray GetFaceChildFaces(Index f) const │ │ │ │ │ +Access the child faces (in the next level) of a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_G_e_t_N_u_m_E_d_g_e_s │ │ │ │ │ +int GetNumEdges() const │ │ │ │ │ +Return the number of edges in this level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_V_a_l_i_d_a_t_e_T_o_p_o_l_o_g_y │ │ │ │ │ +bool ValidateTopology() const │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ +bool IsEdgeNonManifold(Index e) const │ │ │ │ │ +Return if the edge is non-manifold. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_F_a_c_e_H_o_l_e │ │ │ │ │ +bool IsFaceHole(Index f) const │ │ │ │ │ +Return if a given face has been tagged as a hole. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ +ConstIndexArray GetVertexEdges(Index v) const │ │ │ │ │ +Access the edges incident a given vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ +Index GetFaceChildVertex(Index f) const │ │ │ │ │ +Return the child vertex (in the next level) of a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_D_o_e_s_V_e_r_t_e_x_F_V_a_r_T_o_p_o_l_o_g_y_M_a_t_c_h │ │ │ │ │ +bool DoesVertexFVarTopologyMatch(Index v, int channel=0) const │ │ │ │ │ +Return if face-varying topology around a vertex matches. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_C_h_i_l_d_E_d_g_e_s │ │ │ │ │ +ConstIndexArray GetEdgeChildEdges(Index e) const │ │ │ │ │ +Access the child edges (in the next level) of a given edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_I_n_f_S_h_a_r_p │ │ │ │ │ +bool IsEdgeInfSharp(Index e) const │ │ │ │ │ +Return if the edge is infinitely-sharp. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ +ConstIndexArray GetVertexFaces(Index v) const │ │ │ │ │ +Access the faces incident a given vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_F_i_n_d_E_d_g_e │ │ │ │ │ +Index FindEdge(Index v0, Index v1) const │ │ │ │ │ +Identify the edge matching the given vertex pair. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const │ │ │ │ │ +Access the local indices of a vertex with respect to its incident edges. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_E_d_g_e_s │ │ │ │ │ +ConstIndexArray GetFaceEdges(Index f) const │ │ │ │ │ +Access the edges incident a given face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_F_a_c_e_s │ │ │ │ │ +int GetNumFaces() const │ │ │ │ │ +Return the number of faces in this level. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_B_o_u_n_d_a_r_y │ │ │ │ │ +bool IsVertexBoundary(Index v) const │ │ │ │ │ +Return if the vertex is on a boundary (at least one incident boundary edge) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_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 (should be same for all levels) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_F_a_c_e_s │ │ │ │ │ +ConstIndexArray GetEdgeFaces(Index e) const │ │ │ │ │ +Access the faces incident a given edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_F_a_c_e_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +ConstIndexArray GetFaceFVarValues(Index f, int channel=0) const │ │ │ │ │ +Access the face-varying values associated with a particular face. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_E_d_g_e_V_e_r_t_i_c_e_s │ │ │ │ │ +ConstIndexArray GetEdgeVertices(Index e) const │ │ │ │ │ +Access the vertices incident a given edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_E_d_g_e_S_e_m_i_S_h_a_r_p │ │ │ │ │ +bool IsEdgeSemiSharp(Index e) const │ │ │ │ │ +Return if the edge is semi-sharp. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_~_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ +~TopologyLevel() │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_3_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float GetVertexSharpness(Index v) const │ │ │ │ │ +Return the sharpness assigned a given vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_G_e_t_E_d_g_e_C_h_i_l_d_V_e_r_t_e_x │ │ │ │ │ +Index GetEdgeChildVertex(Index e) const │ │ │ │ │ +Return the child vertex (in the next level) of a given edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_S_e_m_i_S_h_a_r_p │ │ │ │ │ +bool IsVertexSemiSharp(Index v) const │ │ │ │ │ +Return if the vertex is semi-sharp. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ +int GetNumFaceVertices() const │ │ │ │ │ +Return the total number of face-vertices, i.e. the sum of all vertices for all │ │ │ │ │ +faces. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ +bool IsVertexNonManifold(Index v) const │ │ │ │ │ +Return if the vertex is non-manifold. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_L_e_v_e_l_:_:_I_s_E_d_g_e_B_o_u_n_d_a_r_y │ │ │ │ │ +bool IsEdgeBoundary(Index e) const │ │ │ │ │ +Return if the edge is a boundary (only one incident face) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_I_s_V_e_r_t_e_x_I_n_f_S_h_a_r_p │ │ │ │ │ +bool IsVertexInfSharp(Index v) const │ │ │ │ │ +Return if the vertex is infinitely-sharp. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_1_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_L_e_v_e_l_:_:_G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +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... │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._h_:_2_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l_:_:_G_e_t_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const │ │ │ │ │ +Access the local indices of a vertex with respect to its incident faces. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_:_:_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_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ -Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_A_s_s_i_g_n_m_e_n_t │ │ │ │ │ -static bool prepareComponentTopologyAssignment(TopologyRefiner &refiner, bool │ │ │ │ │ -fullValidation, TopologyCallback callback, void const *callbackData) │ │ │ │ │ -_O_p_e_n_S_u_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_B_a_s_e_:_: │ │ │ │ │ -_T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k │ │ │ │ │ -Vtr::internal::Level::ValidationCallback TopologyCallback │ │ │ │ │ -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_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_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_a_g_s_A_n_d_S_h_a_r_p_n_e_s_s │ │ │ │ │ -static bool prepareComponentTagsAndSharpness(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_S_i_z_i_n_g │ │ │ │ │ -static bool prepareComponentTopologySizing(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ -_p_r_e_p_a_r_e_F_a_c_e_V_a_r_y_i_n_g_C_h_a_n_n_e_l_s │ │ │ │ │ -static bool prepareFaceVaryingChannels(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options related to the construction of each TopologyRefiner. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options(Sdc::SchemeType sdcType=Sdc::SCHEME_CATMARK, Sdc::Options │ │ │ │ │ -sdcOptions=Sdc::Options()) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_s_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ -Sdc::Options schemeOptions │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_s_c_h_e_m_e_T_y_p_e │ │ │ │ │ -Sdc::SchemeType schemeType │ │ │ │ │ -The subdivision scheme type identifier. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y │ │ │ │ │ -unsigned int validateFullTopology │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_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_:_:_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_:_:_V_t_r_:_:_A_r_r_a_y │ │ │ │ │ -DDeeffiinniittiioonn _a_r_r_a_y_._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_:_:_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_:_:_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 │ │ │ │ │ * _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 │ │ │ │ │ + * _t_o_p_o_l_o_g_y_L_e_v_e_l_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchMap.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/patchDescriptor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -89,45 +89,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    patchMap.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Typedefs
    │ │ │ │ +
    patchDescriptor.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ -#include <cassert>
    │ │ │ │ +#include "../far/types.h"
    │ │ │ │ +#include "../sdc/types.h"
    │ │ │ │ +#include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PatchMap
     An quadtree-based map connecting coarse faces to their sub-patches. More...
     
    struct  PatchMap::QuadNode::Child
    class  PatchDescriptor
     Describes the type of a patch. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ │ Namespaces

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

    │ │ │ │ +Typedefs

    typedef Vtr::ConstArray< PatchDescriptorConstPatchDescriptorArray
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +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 │ │ │ │ │ -patchMap.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 │ │ │ │ │ +patchDescriptor.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_y_p_e_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   _P_a_t_c_h_M_a_p │ │ │ │ │ -  An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ │ +class   _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +  Describes the type of a patch. _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 │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y< _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r >  _C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y │ │ │ │ │ +  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_M_a_p_._h │ │ │ │ │ + * _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ │ var a00887 = [ │ │ │ │ │ - ["PatchMap", "a00977.html", "a00977"], │ │ │ │ │ - ["Child", "a00985.html", "a00985"] │ │ │ │ │ + ["PatchDescriptor", "a00973.html", "a00973"], │ │ │ │ │ + ["ConstPatchDescriptorArray", "a00887.html#ad258c2d8f7871bc0d40cf3a9ded6e08a", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00887_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchMap.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/patchDescriptor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    patchMap.h
    │ │ │ │ +
    patchDescriptor.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,222 +119,226 @@ │ │ │ │
    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_PATCH_MAP_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_PATCH_MAP_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../far/patchTable.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32#include <cassert>
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Far {
    │ │ │ │ -
    38
    │ │ │ │ -
    │ │ │ │ -
    49class PatchMap {
    │ │ │ │ -
    50public:
    │ │ │ │ -
    51
    │ │ │ │ - │ │ │ │ +
    30#include "../far/types.h"
    │ │ │ │ +
    31#include "../sdc/types.h"
    │ │ │ │ +
    32
    │ │ │ │ +
    33#include <vector>
    │ │ │ │ +
    34
    │ │ │ │ +
    35namespace OpenSubdiv {
    │ │ │ │ +
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    37
    │ │ │ │ +
    38namespace Far {
    │ │ │ │ +
    39
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    45
    │ │ │ │ +
    46public:
    │ │ │ │ +
    47
    │ │ │ │ +
    │ │ │ │ +
    48 enum Type {
    │ │ │ │ + │ │ │ │ +
    50
    │ │ │ │ + │ │ │ │ + │ │ │ │
    53
    │ │ │ │ -
    58 PatchMap( PatchTable const & patchTable );
    │ │ │ │ -
    59
    │ │ │ │ -
    74 Handle const * FindPatch( int patchFaceId, double u, double v ) const;
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    56
    │ │ │ │ + │ │ │ │ +
    58
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    64 };
    │ │ │ │ +
    │ │ │ │ +
    65
    │ │ │ │ +
    66public:
    │ │ │ │ +
    67
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    70 _type(NON_PATCH) { }
    │ │ │ │ +
    │ │ │ │ +
    71
    │ │ │ │ +
    │ │ │ │ +
    73 PatchDescriptor(int type) :
    │ │ │ │ +
    74 _type(type) { }
    │ │ │ │ +
    │ │ │ │
    75
    │ │ │ │ -
    76private:
    │ │ │ │ -
    77 void initializeHandles(PatchTable const & patchTable);
    │ │ │ │ -
    78 void initializeQuadtree(PatchTable const & patchTable);
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    78 _type(d.GetType()) { }
    │ │ │ │ +
    │ │ │ │
    79
    │ │ │ │ -
    80private:
    │ │ │ │ -
    81 // Quadtree node with 4 children, tree is just a vector of nodes
    │ │ │ │ -
    82 struct QuadNode {
    │ │ │ │ -
    83 QuadNode() { std::memset(this, 0, sizeof(QuadNode)); }
    │ │ │ │ -
    84
    │ │ │ │ -
    │ │ │ │ -
    85 struct Child {
    │ │ │ │ -
    86 unsigned int isSet : 1; // true if the child has been set
    │ │ │ │ -
    87 unsigned int isLeaf : 1; // true if the child is a QuadNode
    │ │ │ │ -
    88 unsigned int index : 30; // child index (either QuadNode or Handle)
    │ │ │ │ -
    89 };
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    82 _type = d.GetType();
    │ │ │ │ +
    83 return *this;
    │ │ │ │ +
    84 }
    │ │ │ │ +
    │ │ │ │ +
    85
    │ │ │ │ +
    │ │ │ │ +
    87 Type GetType() const {
    │ │ │ │ +
    88 return (Type)_type;
    │ │ │ │ +
    89 }
    │ │ │ │
    │ │ │ │
    90
    │ │ │ │ -
    91 // sets all the children to point to the patch of given index
    │ │ │ │ -
    92 void SetChildren(int index);
    │ │ │ │ -
    93
    │ │ │ │ -
    94 // sets the child in "quadrant" to point to the node or patch of the given index
    │ │ │ │ -
    95 void SetChild(int quadrant, int index, bool isLeaf);
    │ │ │ │ -
    96
    │ │ │ │ -
    97 Child children[4];
    │ │ │ │ -
    98 };
    │ │ │ │ -
    99 typedef std::vector<QuadNode> QuadTree;
    │ │ │ │ +
    │ │ │ │ +
    92 static inline bool IsAdaptive(Type type) {
    │ │ │ │ +
    93 return type > TRIANGLES;
    │ │ │ │ +
    94 }
    │ │ │ │ +
    │ │ │ │ +
    95
    │ │ │ │ +
    │ │ │ │ +
    97 bool IsAdaptive() const {
    │ │ │ │ +
    98 return IsAdaptive( this->GetType() );
    │ │ │ │ +
    99 }
    │ │ │ │ +
    │ │ │ │
    100
    │ │ │ │ -
    101 // Internal methods supporting quadtree construction and queries
    │ │ │ │ -
    102 void assignRootNode(QuadNode * node, int index);
    │ │ │ │ -
    103 QuadNode * assignLeafOrChildNode(QuadNode * node, bool isLeaf, int quad, int index);
    │ │ │ │ +
    103 static inline short GetNumControlVertices( Type t );
    │ │ │ │
    104
    │ │ │ │ -
    105 template <class T>
    │ │ │ │ -
    106 static int transformUVToQuadQuadrant(T const & median, T & u, T & v);
    │ │ │ │ -
    107 template <class T>
    │ │ │ │ -
    108 static int transformUVToTriQuadrant(T const & median, T & u, T & v, bool & rotated);
    │ │ │ │ -
    109
    │ │ │ │ -
    110private:
    │ │ │ │ -
    111 bool _patchesAreTriangular; // tri and quad assembly and search requirements differ
    │ │ │ │ -
    112
    │ │ │ │ -
    113 int _minPatchFace; // minimum patch face index supported by the map
    │ │ │ │ -
    114 int _maxPatchFace; // maximum patch face index supported by the map
    │ │ │ │ -
    115 int _maxDepth; // maximum depth of a patch in the tree
    │ │ │ │ -
    116
    │ │ │ │ -
    117 std::vector<Handle> _handles; // all the patches in the PatchTable
    │ │ │ │ -
    118 std::vector<QuadNode> _quadtree; // quadtree nodes
    │ │ │ │ -
    119};
    │ │ │ │ -
    │ │ │ │ -
    120
    │ │ │ │ -
    121//
    │ │ │ │ -
    122// Given a median value for both U and V, these methods transform a (u,v) pair
    │ │ │ │ -
    123// into the quadrant that contains them and returns the quadrant index.
    │ │ │ │ -
    124//
    │ │ │ │ -
    125// Quadrant indexing for tri and quad patches -- consistent with PatchParam's
    │ │ │ │ -
    126// usage of UV bits:
    │ │ │ │ -
    127//
    │ │ │ │ -
    128// (0,1) o-----o-----o (1,1) (0,1) o (1,0) o-----o-----o (0,0)
    │ │ │ │ -
    129// | | | |\ \ 1 |\ 0 |
    │ │ │ │ -
    130// | 2 | 3 | | \ \ | \ |
    │ │ │ │ -
    131// | | | | 2 \ \| 3 \|
    │ │ │ │ -
    132// o-----o-----o o-----o o-----o
    │ │ │ │ -
    133// | | | |\ 3 |\ \ 2 |
    │ │ │ │ -
    134// | 0 | 1 | | \ | \ \ |
    │ │ │ │ -
    135// | | | | 0 \| 1 \ \|
    │ │ │ │ -
    136// (0,0) o-----o-----o (1,0) (0,0) o-----o-----o (1,0) o (0,1)
    │ │ │ │ -
    137//
    │ │ │ │ -
    138// The triangular case also takes and returns/affects the rotation of the
    │ │ │ │ -
    139// quadrant being searched and identified (quadrant 3 imparts a rotation).
    │ │ │ │ -
    140//
    │ │ │ │ -
    141template <class T>
    │ │ │ │ -
    142inline int
    │ │ │ │ -
    143PatchMap::transformUVToQuadQuadrant(T const & median, T & u, T & v) {
    │ │ │ │ -
    144
    │ │ │ │ -
    145 int uHalf = (u >= median);
    │ │ │ │ -
    146 if (uHalf) u -= median;
    │ │ │ │ +
    106 static inline short GetNumFVarControlVertices( Type t );
    │ │ │ │ +
    107
    │ │ │ │ +
    │ │ │ │ +
    110 short GetNumControlVertices() const {
    │ │ │ │ +
    111 return GetNumControlVertices( this->GetType() );
    │ │ │ │ +
    112 }
    │ │ │ │ +
    │ │ │ │ +
    113
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    116 return GetNumFVarControlVertices( this->GetType() );
    │ │ │ │ +
    117 }
    │ │ │ │ +
    │ │ │ │ +
    118
    │ │ │ │ +
    120 static short GetRegularPatchSize() { return 16; }
    │ │ │ │ +
    121
    │ │ │ │ +
    123 static short GetGregoryPatchSize() { return 4; }
    │ │ │ │ +
    124
    │ │ │ │ +
    126 static short GetGregoryBasisPatchSize() { return 20; }
    │ │ │ │ +
    127
    │ │ │ │ +
    128
    │ │ │ │ + │ │ │ │ +
    132
    │ │ │ │ +
    134 inline bool operator < ( PatchDescriptor const other ) const;
    │ │ │ │ +
    135
    │ │ │ │ +
    137 inline bool operator == ( PatchDescriptor const other ) const;
    │ │ │ │ +
    138
    │ │ │ │ +
    139 // debug helper
    │ │ │ │ +
    140 void print() const;
    │ │ │ │ +
    141
    │ │ │ │ +
    142private:
    │ │ │ │ +
    143 unsigned int _type;
    │ │ │ │ +
    144};
    │ │ │ │ +
    │ │ │ │ +
    145
    │ │ │ │ + │ │ │ │
    147
    │ │ │ │ -
    148 int vHalf = (v >= median);
    │ │ │ │ -
    149 if (vHalf) v -= median;
    │ │ │ │ -
    150
    │ │ │ │ -
    151 return (vHalf << 1) | uHalf;
    │ │ │ │ -
    152}
    │ │ │ │ -
    153
    │ │ │ │ -
    154template <class T>
    │ │ │ │ -
    155int inline
    │ │ │ │ -
    156PatchMap::transformUVToTriQuadrant(T const & median, T & u, T & v, bool & rotated) {
    │ │ │ │ -
    157
    │ │ │ │ -
    158 if (!rotated) {
    │ │ │ │ -
    159 if (u >= median) {
    │ │ │ │ -
    160 u -= median;
    │ │ │ │ -
    161 return 1;
    │ │ │ │ -
    162 }
    │ │ │ │ -
    163 if (v >= median) {
    │ │ │ │ -
    164 v -= median;
    │ │ │ │ -
    165 return 2;
    │ │ │ │ -
    166 }
    │ │ │ │ -
    167 if ((u + v) >= median) {
    │ │ │ │ -
    168 rotated = true;
    │ │ │ │ -
    169 return 3;
    │ │ │ │ -
    170 }
    │ │ │ │ -
    171 return 0;
    │ │ │ │ -
    172 } else {
    │ │ │ │ -
    173 if (u < median) {
    │ │ │ │ -
    174 v -= median;
    │ │ │ │ -
    175 return 1;
    │ │ │ │ -
    176 }
    │ │ │ │ -
    177 if (v < median) {
    │ │ │ │ -
    178 u -= median;
    │ │ │ │ -
    179 return 2;
    │ │ │ │ -
    180 }
    │ │ │ │ -
    181 u -= median;
    │ │ │ │ -
    182 v -= median;
    │ │ │ │ -
    183 if ((u + v) < median) {
    │ │ │ │ -
    184 rotated = false;
    │ │ │ │ -
    185 return 3;
    │ │ │ │ -
    186 }
    │ │ │ │ -
    187 return 0;
    │ │ │ │ -
    188 }
    │ │ │ │ -
    189}
    │ │ │ │ +
    148// Returns the number of control vertices expected for a patch of this type
    │ │ │ │ +
    149inline short
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    151 switch (type) {
    │ │ │ │ +
    152 case REGULAR : return GetRegularPatchSize();
    │ │ │ │ +
    153 case LOOP : return 12;
    │ │ │ │ +
    154 case QUADS : return 4;
    │ │ │ │ +
    155 case GREGORY :
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    158 case GREGORY_TRIANGLE : return 18;
    │ │ │ │ +
    159 case TRIANGLES : return 3;
    │ │ │ │ +
    160 case LINES : return 2;
    │ │ │ │ +
    161 case POINTS : return 1;
    │ │ │ │ +
    162 default : return -1;
    │ │ │ │ +
    163 }
    │ │ │ │ +
    164}
    │ │ │ │ +
    │ │ │ │ +
    165
    │ │ │ │ +
    166// Returns the number of face-varying control vertices expected for a patch of this type
    │ │ │ │ +
    167inline short
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    170}
    │ │ │ │ +
    │ │ │ │ +
    171
    │ │ │ │ +
    172// Allows ordering of patches by type
    │ │ │ │ +
    │ │ │ │ +
    173inline bool
    │ │ │ │ + │ │ │ │ +
    175 return (_type < other._type);
    │ │ │ │ +
    176}
    │ │ │ │ +
    │ │ │ │ +
    177
    │ │ │ │ +
    178// True if the descriptors are identical
    │ │ │ │ +
    179inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    181 return _type == other._type;
    │ │ │ │ +
    182}
    │ │ │ │ +
    │ │ │ │ +
    183
    │ │ │ │ +
    184
    │ │ │ │ +
    185
    │ │ │ │ +
    186} // end namespace Far
    │ │ │ │ +
    187
    │ │ │ │ +
    188} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    189using namespace OPENSUBDIV_VERSION;
    │ │ │ │
    190
    │ │ │ │ -
    192inline PatchMap::Handle const *
    │ │ │ │ -
    │ │ │ │ -
    193PatchMap::FindPatch( int faceid, double u, double v ) const {
    │ │ │ │ -
    194
    │ │ │ │ -
    195 //
    │ │ │ │ -
    196 // Reject patch faces not supported by this map, or those corresponding
    │ │ │ │ -
    197 // to holes or otherwise unassigned (the root node for a patch will
    │ │ │ │ -
    198 // have all or no quadrants set):
    │ │ │ │ -
    199 //
    │ │ │ │ -
    200 if ((faceid < _minPatchFace) || (faceid > _maxPatchFace)) return 0;
    │ │ │ │ -
    201
    │ │ │ │ -
    202 QuadNode const * node = &_quadtree[faceid - _minPatchFace];
    │ │ │ │ -
    203
    │ │ │ │ -
    204 if (!node->children[0].isSet) return 0;
    │ │ │ │ -
    205
    │ │ │ │ -
    206 //
    │ │ │ │ -
    207 // Search the tree for the sub-patch containing the given (u,v)
    │ │ │ │ -
    208 //
    │ │ │ │ -
    209 assert( (u>=0.0) && (u<=1.0) && (v>=0.0) && (v<=1.0) );
    │ │ │ │ -
    210
    │ │ │ │ -
    211 double median = 0.5;
    │ │ │ │ -
    212 bool triRotated = false;
    │ │ │ │ -
    213
    │ │ │ │ -
    214 for (int depth = 0; depth <= _maxDepth; ++depth, median *= 0.5) {
    │ │ │ │ -
    215
    │ │ │ │ -
    216 int quadrant = _patchesAreTriangular
    │ │ │ │ -
    217 ? transformUVToTriQuadrant(median, u, v, triRotated)
    │ │ │ │ -
    218 : transformUVToQuadQuadrant(median, u, v);
    │ │ │ │ -
    219
    │ │ │ │ -
    220 // holes should have been rejected at the root node of the face
    │ │ │ │ -
    221 assert(node->children[quadrant].isSet);
    │ │ │ │ -
    222
    │ │ │ │ -
    223 if (node->children[quadrant].isLeaf) {
    │ │ │ │ -
    224 return &_handles[node->children[quadrant].index];
    │ │ │ │ -
    225 } else {
    │ │ │ │ -
    226 node = &_quadtree[node->children[quadrant].index];
    │ │ │ │ -
    227 }
    │ │ │ │ -
    228 }
    │ │ │ │ -
    229 assert(0);
    │ │ │ │ -
    230 return 0;
    │ │ │ │ -
    231}
    │ │ │ │ -
    │ │ │ │ -
    232
    │ │ │ │ -
    233} // end namespace Far
    │ │ │ │ -
    234
    │ │ │ │ -
    235} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    236using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    237
    │ │ │ │ -
    238} // end namespace OpenSubdiv
    │ │ │ │ -
    239
    │ │ │ │ -
    240#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */
    │ │ │ │ - │ │ │ │ -
    An quadtree-based map connecting coarse faces to their sub-patches.
    Definition patchMap.h:49
    │ │ │ │ -
    PatchMap(PatchTable const &patchTable)
    Constructor.
    │ │ │ │ -
    Handle const * FindPatch(int patchFaceId, double u, double v) const
    Returns a handle to the sub-patch of the face at the given (u,v). Note that the patch face ID corresp...
    Definition patchMap.h:193
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    Container for arrays of parametric patches.
    Definition patchTable.h:55
    │ │ │ │ -
    Handle that can be used as unique patch identifier within PatchTable.
    Definition patchTable.h:60
    │ │ │ │ +
    191} // end namespace OpenSubdiv
    │ │ │ │ +
    192
    │ │ │ │ +
    193#endif /* OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H */
    │ │ │ │ + │ │ │ │ +
    Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray
    │ │ │ │ +
    SchemeType
    Enumerated type for all subdivision schemes supported by OpenSubdiv.
    Definition types.h:37
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    @ LOOP
    regular triangular patch for the Loop scheme
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    @ REGULAR
    regular B-Spline patch for the Catmark scheme
    │ │ │ │ +
    bool IsAdaptive() const
    Returns true if the type is an adaptive patch.
    │ │ │ │ +
    Type GetType() const
    Returns the type of the patch.
    │ │ │ │ +
    static short GetGregoryBasisPatchSize()
    Number of control vertices of Gregory patch basis (20)
    │ │ │ │ +
    short GetNumControlVertices() const
    Returns the number of control vertices expected for a patch of the type described.
    │ │ │ │ +
    PatchDescriptor(PatchDescriptor const &d)
    Copy Constructor.
    │ │ │ │ +
    bool operator==(PatchDescriptor const other) const
    True if the descriptors are identical.
    │ │ │ │ +
    static short GetRegularPatchSize()
    Number of control vertices of Regular Patches in table.
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    PatchDescriptor & operator=(PatchDescriptor const &d)
    Assignment operator.
    │ │ │ │ +
    static bool IsAdaptive(Type type)
    Returns true if the type is an adaptive (non-linear) patch.
    │ │ │ │ +
    bool operator<(PatchDescriptor const other) const
    Allows ordering of patches by type.
    │ │ │ │ +
    static short GetGregoryPatchSize()
    Number of control vertices of Gregory (and Gregory Boundary) Patches in table.
    │ │ │ │ + │ │ │ │ +
    static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc::SchemeType type)
    Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -patchMap.h │ │ │ │ │ +patchDescriptor.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,238 +24,280 @@ │ │ │ │ │ 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_PATCH_MAP_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_PATCH_MAP_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_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 │ │ │ │ │ -_4_9class _P_a_t_c_h_M_a_p { │ │ │ │ │ -50public: │ │ │ │ │ -51 │ │ │ │ │ -_5_2 typedef _P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e _H_a_n_d_l_e; │ │ │ │ │ +30#include "../far/types.h" │ │ │ │ │ +31#include "../sdc/types.h" │ │ │ │ │ +32 │ │ │ │ │ +33#include │ │ │ │ │ +34 │ │ │ │ │ +35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +37 │ │ │ │ │ +38namespace Far { │ │ │ │ │ +39 │ │ │ │ │ +_4_4class _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r { │ │ │ │ │ +45 │ │ │ │ │ +46public: │ │ │ │ │ +47 │ │ │ │ │ +_4_8 enum _T_y_p_e { │ │ │ │ │ +_4_9 _N_O_N___P_A_T_C_H = 0, │ │ │ │ │ +50 │ │ │ │ │ +_5_1 _P_O_I_N_T_S, │ │ │ │ │ +_5_2 _L_I_N_E_S, │ │ │ │ │ 53 │ │ │ │ │ -_5_8 _P_a_t_c_h_M_a_p( _P_a_t_c_h_T_a_b_l_e const & patchTable ); │ │ │ │ │ -59 │ │ │ │ │ -74 _H_a_n_d_l_e const * _F_i_n_d_P_a_t_c_h( int patchFaceId, double u, double v ) const; │ │ │ │ │ +_5_4 _Q_U_A_D_S, │ │ │ │ │ +_5_5 _T_R_I_A_N_G_L_E_S, │ │ │ │ │ +56 │ │ │ │ │ +_5_7 _L_O_O_P, │ │ │ │ │ +58 │ │ │ │ │ +_5_9 _R_E_G_U_L_A_R, │ │ │ │ │ +_6_0 _G_R_E_G_O_R_Y, │ │ │ │ │ +_6_1 _G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y, │ │ │ │ │ +_6_2 _G_R_E_G_O_R_Y___B_A_S_I_S, │ │ │ │ │ +63 _G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E │ │ │ │ │ +_6_4 }; │ │ │ │ │ +65 │ │ │ │ │ +66public: │ │ │ │ │ +67 │ │ │ │ │ +_6_9 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r() : │ │ │ │ │ +70 _type(_N_O_N___P_A_T_C_H) { } │ │ │ │ │ +71 │ │ │ │ │ +_7_3 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(int type) : │ │ │ │ │ +74 _type(type) { } │ │ │ │ │ 75 │ │ │ │ │ -76private: │ │ │ │ │ -77 void initializeHandles(_P_a_t_c_h_T_a_b_l_e const & patchTable); │ │ │ │ │ -78 void initializeQuadtree(_P_a_t_c_h_T_a_b_l_e const & patchTable); │ │ │ │ │ +_7_7 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const & d ) : │ │ │ │ │ +78 _type(d._G_e_t_T_y_p_e()) { } │ │ │ │ │ 79 │ │ │ │ │ -80private: │ │ │ │ │ -81 // Quadtree node with 4 children, tree is just a vector of nodes │ │ │ │ │ -82 struct QuadNode { │ │ │ │ │ -83 QuadNode() { std::memset(this, 0, sizeof(QuadNode)); } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 struct _C_h_i_l_d { │ │ │ │ │ -_8_6 unsigned int _i_s_S_e_t : 1; // true if the child has been set │ │ │ │ │ -_8_7 unsigned int _i_s_L_e_a_f : 1; // true if the child is a QuadNode │ │ │ │ │ -_8_8 unsigned int _i_n_d_e_x : 30; // child index (either QuadNode or Handle) │ │ │ │ │ -89 }; │ │ │ │ │ +_8_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r & _o_p_e_r_a_t_o_r_=( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const & d ) { │ │ │ │ │ +82 _type = d._G_e_t_T_y_p_e(); │ │ │ │ │ +83 return *this; │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +_8_7 _T_y_p_e _G_e_t_T_y_p_e() const { │ │ │ │ │ +88 return (_T_y_p_e)_type; │ │ │ │ │ +89 } │ │ │ │ │ 90 │ │ │ │ │ -91 // sets all the children to point to the patch of given index │ │ │ │ │ -92 void SetChildren(int index); │ │ │ │ │ -93 │ │ │ │ │ -94 // sets the child in "quadrant" to point to the node or patch of the given │ │ │ │ │ -index │ │ │ │ │ -95 void SetChild(int quadrant, int index, bool isLeaf); │ │ │ │ │ -96 │ │ │ │ │ -97 _C_h_i_l_d children[4]; │ │ │ │ │ -98 }; │ │ │ │ │ -99 typedef std::vector QuadTree; │ │ │ │ │ +_9_2 static inline bool _I_s_A_d_a_p_t_i_v_e(_T_y_p_e type) { │ │ │ │ │ +93 return type > _T_R_I_A_N_G_L_E_S; │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +_9_7 bool _I_s_A_d_a_p_t_i_v_e() const { │ │ │ │ │ +98 return _I_s_A_d_a_p_t_i_v_e( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ +99 } │ │ │ │ │ 100 │ │ │ │ │ -101 // Internal methods supporting quadtree construction and queries │ │ │ │ │ -102 void assignRootNode(QuadNode * node, int index); │ │ │ │ │ -103 QuadNode * assignLeafOrChildNode(QuadNode * node, bool isLeaf, int quad, │ │ │ │ │ -int index); │ │ │ │ │ +103 static inline short _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e t ); │ │ │ │ │ 104 │ │ │ │ │ -105 template │ │ │ │ │ -106 static int transformUVToQuadQuadrant(T const & median, T & u, T & v); │ │ │ │ │ -107 template │ │ │ │ │ -108 static int transformUVToTriQuadrant(T const & median, T & u, T & v, bool & │ │ │ │ │ -rotated); │ │ │ │ │ -109 │ │ │ │ │ -110private: │ │ │ │ │ -111 bool _patchesAreTriangular; // tri and quad assembly and search │ │ │ │ │ -requirements differ │ │ │ │ │ -112 │ │ │ │ │ -113 int _minPatchFace; // minimum patch face index supported by the map │ │ │ │ │ -114 int _maxPatchFace; // maximum patch face index supported by the map │ │ │ │ │ -115 int _maxDepth; // maximum depth of a patch in the tree │ │ │ │ │ -116 │ │ │ │ │ -117 std::vector _handles; // all the patches in the PatchTable │ │ │ │ │ -118 std::vector _quadtree; // quadtree nodes │ │ │ │ │ -119}; │ │ │ │ │ -120 │ │ │ │ │ -121// │ │ │ │ │ -122// Given a median value for both U and V, these methods transform a (u,v) │ │ │ │ │ -pair │ │ │ │ │ -123// into the quadrant that contains them and returns the quadrant index. │ │ │ │ │ -124// │ │ │ │ │ -125// Quadrant indexing for tri and quad patches -- consistent with │ │ │ │ │ -PatchParam's │ │ │ │ │ -126// usage of UV bits: │ │ │ │ │ -127// │ │ │ │ │ -128// (0,1) o-----o-----o (1,1) (0,1) o (1,0) o-----o-----o (0,0) │ │ │ │ │ -129// | | | |\ \ 1 |\ 0 | │ │ │ │ │ -130// | 2 | 3 | | \ \ | \ | │ │ │ │ │ -131// | | | | 2 \ \| 3 \| │ │ │ │ │ -132// o-----o-----o o-----o o-----o │ │ │ │ │ -133// | | | |\ 3 |\ \ 2 | │ │ │ │ │ -134// | 0 | 1 | | \ | \ \ | │ │ │ │ │ -135// | | | | 0 \| 1 \ \| │ │ │ │ │ -136// (0,0) o-----o-----o (1,0) (0,0) o-----o-----o (1,0) o (0,1) │ │ │ │ │ -137// │ │ │ │ │ -138// The triangular case also takes and returns/affects the rotation of the │ │ │ │ │ -139// quadrant being searched and identified (quadrant 3 imparts a rotation). │ │ │ │ │ -140// │ │ │ │ │ -141template │ │ │ │ │ -142inline int │ │ │ │ │ -143PatchMap::transformUVToQuadQuadrant(T const & median, T & u, T & v) { │ │ │ │ │ -144 │ │ │ │ │ -145 int uHalf = (u >= median); │ │ │ │ │ -146 if (uHalf) u -= median; │ │ │ │ │ +106 static inline short _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e t ); │ │ │ │ │ +107 │ │ │ │ │ +_1_1_0 short _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ +111 return _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +_1_1_5 short _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s() const { │ │ │ │ │ +116 return _G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( this->_G_e_t_T_y_p_e() ); │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +_1_2_0 static short _G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e() { return 16; } │ │ │ │ │ +121 │ │ │ │ │ +_1_2_3 static short _G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e() { return 4; } │ │ │ │ │ +124 │ │ │ │ │ +_1_2_6 static short _G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e() { return 20; } │ │ │ │ │ +127 │ │ │ │ │ +128 │ │ │ │ │ +_1_3_1 static _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_> _G_e_t_A_d_a_p_t_i_v_e_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_s(_S_d_c_:_: │ │ │ │ │ +_S_c_h_e_m_e_T_y_p_e type); │ │ │ │ │ +132 │ │ │ │ │ +134 inline bool _o_p_e_r_a_t_o_r_ _<_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const; │ │ │ │ │ +135 │ │ │ │ │ +137 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const; │ │ │ │ │ +138 │ │ │ │ │ +139 // debug helper │ │ │ │ │ +_1_4_0 void _p_r_i_n_t() const; │ │ │ │ │ +141 │ │ │ │ │ +142private: │ │ │ │ │ +143 unsigned int _type; │ │ │ │ │ +144}; │ │ │ │ │ +145 │ │ │ │ │ +_1_4_6typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_> _C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y; │ │ │ │ │ 147 │ │ │ │ │ -148 int vHalf = (v >= median); │ │ │ │ │ -149 if (vHalf) v -= median; │ │ │ │ │ -150 │ │ │ │ │ -151 return (vHalf << 1) | uHalf; │ │ │ │ │ -152} │ │ │ │ │ -153 │ │ │ │ │ -154template │ │ │ │ │ -155int inline │ │ │ │ │ -156PatchMap::transformUVToTriQuadrant(T const & median, T & u, T & v, bool & │ │ │ │ │ -rotated) { │ │ │ │ │ -157 │ │ │ │ │ -158 if (!rotated) { │ │ │ │ │ -159 if (u >= median) { │ │ │ │ │ -160 u -= median; │ │ │ │ │ -161 return 1; │ │ │ │ │ -162 } │ │ │ │ │ -163 if (v >= median) { │ │ │ │ │ -164 v -= median; │ │ │ │ │ -165 return 2; │ │ │ │ │ -166 } │ │ │ │ │ -167 if ((u + v) >= median) { │ │ │ │ │ -168 rotated = true; │ │ │ │ │ -169 return 3; │ │ │ │ │ -170 } │ │ │ │ │ -171 return 0; │ │ │ │ │ -172 } else { │ │ │ │ │ -173 if (u < median) { │ │ │ │ │ -174 v -= median; │ │ │ │ │ -175 return 1; │ │ │ │ │ -176 } │ │ │ │ │ -177 if (v < median) { │ │ │ │ │ -178 u -= median; │ │ │ │ │ -179 return 2; │ │ │ │ │ -180 } │ │ │ │ │ -181 u -= median; │ │ │ │ │ -182 v -= median; │ │ │ │ │ -183 if ((u + v) < median) { │ │ │ │ │ -184 rotated = false; │ │ │ │ │ -185 return 3; │ │ │ │ │ -186 } │ │ │ │ │ -187 return 0; │ │ │ │ │ -188 } │ │ │ │ │ -189} │ │ │ │ │ +148// Returns the number of control vertices expected for a patch of this type │ │ │ │ │ +149inline short │ │ │ │ │ +_1_5_0_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e type ) { │ │ │ │ │ +151 switch (type) { │ │ │ │ │ +152 case _R_E_G_U_L_A_R : return _G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ +153 case _L_O_O_P : return 12; │ │ │ │ │ +154 case _Q_U_A_D_S : return 4; │ │ │ │ │ +155 case _G_R_E_G_O_R_Y : │ │ │ │ │ +156 case _G_R_E_G_O_R_Y___B_O_U_N_D_A_R_Y : return _G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ +157 case _G_R_E_G_O_R_Y___B_A_S_I_S : return _G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e(); │ │ │ │ │ +158 case _G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E : return 18; │ │ │ │ │ +159 case _T_R_I_A_N_G_L_E_S : return 3; │ │ │ │ │ +160 case _L_I_N_E_S : return 2; │ │ │ │ │ +161 case _P_O_I_N_T_S : return 1; │ │ │ │ │ +162 default : return -1; │ │ │ │ │ +163 } │ │ │ │ │ +164} │ │ │ │ │ +165 │ │ │ │ │ +166// Returns the number of face-varying control vertices expected for a patch │ │ │ │ │ +of this type │ │ │ │ │ +167inline short │ │ │ │ │ +_1_6_8_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s( _T_y_p_e type ) { │ │ │ │ │ +169 return _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(type); │ │ │ │ │ +170} │ │ │ │ │ +171 │ │ │ │ │ +172// Allows ordering of patches by type │ │ │ │ │ +_1_7_3inline bool │ │ │ │ │ +174_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_ _<_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const { │ │ │ │ │ +175 return (_type < other._type); │ │ │ │ │ +176} │ │ │ │ │ +177 │ │ │ │ │ +178// True if the descriptors are identical │ │ │ │ │ +179inline bool │ │ │ │ │ +_1_8_0_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_ _=_=_ ( _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r const other ) const { │ │ │ │ │ +181 return _type == other._type; │ │ │ │ │ +182} │ │ │ │ │ +183 │ │ │ │ │ +184 │ │ │ │ │ +185 │ │ │ │ │ +186} // end namespace Far │ │ │ │ │ +187 │ │ │ │ │ +188} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +189using namespace OPENSUBDIV_VERSION; │ │ │ │ │ 190 │ │ │ │ │ -192inline _P_a_t_c_h_M_a_p_:_:_H_a_n_d_l_e const * │ │ │ │ │ -_1_9_3_P_a_t_c_h_M_a_p_:_:_F_i_n_d_P_a_t_c_h( int faceid, double u, double v ) const { │ │ │ │ │ -194 │ │ │ │ │ -195 // │ │ │ │ │ -196 // Reject patch faces not supported by this map, or those corresponding │ │ │ │ │ -197 // to holes or otherwise unassigned (the root node for a patch will │ │ │ │ │ -198 // have all or no quadrants set): │ │ │ │ │ -199 // │ │ │ │ │ -200 if ((faceid < _minPatchFace) || (faceid > _maxPatchFace)) return 0; │ │ │ │ │ -201 │ │ │ │ │ -202 QuadNode const * node = &_quadtree[faceid - _minPatchFace]; │ │ │ │ │ -203 │ │ │ │ │ -204 if (!node->children[0].isSet) return 0; │ │ │ │ │ -205 │ │ │ │ │ -206 // │ │ │ │ │ -207 // Search the tree for the sub-patch containing the given (u,v) │ │ │ │ │ -208 // │ │ │ │ │ -209 assert( (u>=0.0) && (u<=1.0) && (v>=0.0) && (v<=1.0) ); │ │ │ │ │ -210 │ │ │ │ │ -211 double median = 0.5; │ │ │ │ │ -212 bool triRotated = false; │ │ │ │ │ -213 │ │ │ │ │ -214 for (int depth = 0; depth <= _maxDepth; ++depth, median *= 0.5) { │ │ │ │ │ -215 │ │ │ │ │ -216 int quadrant = _patchesAreTriangular │ │ │ │ │ -217 ? transformUVToTriQuadrant(median, u, v, triRotated) │ │ │ │ │ -218 : transformUVToQuadQuadrant(median, u, v); │ │ │ │ │ -219 │ │ │ │ │ -220 // holes should have been rejected at the root node of the face │ │ │ │ │ -221 assert(node->children[quadrant].isSet); │ │ │ │ │ -222 │ │ │ │ │ -223 if (node->children[quadrant].isLeaf) { │ │ │ │ │ -224 return &_handles[node->children[quadrant].index]; │ │ │ │ │ -225 } else { │ │ │ │ │ -226 node = &_quadtree[node->children[quadrant].index]; │ │ │ │ │ -227 } │ │ │ │ │ -228 } │ │ │ │ │ -229 assert(0); │ │ │ │ │ -230 return 0; │ │ │ │ │ -231} │ │ │ │ │ -232 │ │ │ │ │ -233} // end namespace Far │ │ │ │ │ -234 │ │ │ │ │ -235} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -236using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -237 │ │ │ │ │ -238} // end namespace OpenSubdiv │ │ │ │ │ -239 │ │ │ │ │ -240#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */ │ │ │ │ │ +191} // end namespace OpenSubdiv │ │ │ │ │ +192 │ │ │ │ │ +193#endif /* OPENSUBDIV3_FAR_PATCH_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_M_a_p │ │ │ │ │ -An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_P_a_t_c_h_M_a_p │ │ │ │ │ -PatchMap(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_:_:_F_a_r_:_:_C_o_n_s_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_A_r_r_a_y │ │ │ │ │ +Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_1_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_:_:_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +Describes the type of a patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_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_:_:_L_I_N_E_S │ │ │ │ │ +@ LINES │ │ │ │ │ +lines (useful for cage drawing) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_Q_U_A_D_S │ │ │ │ │ +@ QUADS │ │ │ │ │ +4-sided quadrilateral (bilinear) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_N_O_N___P_A_T_C_H │ │ │ │ │ +@ NON_PATCH │ │ │ │ │ +undefined │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_L_O_O_P │ │ │ │ │ +@ LOOP │ │ │ │ │ +regular triangular patch for the Loop scheme │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___T_R_I_A_N_G_L_E │ │ │ │ │ +@ GREGORY_TRIANGLE │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_T_R_I_A_N_G_L_E_S │ │ │ │ │ +@ TRIANGLES │ │ │ │ │ +3-sided triangle │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y___B_A_S_I_S │ │ │ │ │ +@ GREGORY_BASIS │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_O_I_N_T_S │ │ │ │ │ +@ POINTS │ │ │ │ │ +points (useful for cage drawing) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_R_E_G_O_R_Y │ │ │ │ │ +@ GREGORY │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_R_E_G_U_L_A_R │ │ │ │ │ +@ REGULAR │ │ │ │ │ +regular B-Spline patch for the Catmark scheme │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_I_s_A_d_a_p_t_i_v_e │ │ │ │ │ +bool IsAdaptive() const │ │ │ │ │ +Returns true if the type is an adaptive patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h_:_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_T_y_p_e │ │ │ │ │ +Type GetType() const │ │ │ │ │ +Returns the type of the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_G_r_e_g_o_r_y_B_a_s_i_s_P_a_t_c_h_S_i_z_e │ │ │ │ │ +static short GetGregoryBasisPatchSize() │ │ │ │ │ +Number of control vertices of Gregory patch basis (20) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +short GetNumControlVertices() const │ │ │ │ │ +Returns the number of control vertices expected for a patch of the type │ │ │ │ │ +described. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor(PatchDescriptor const &d) │ │ │ │ │ +Copy Constructor. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(PatchDescriptor const other) const │ │ │ │ │ +True if the descriptors are identical. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_R_e_g_u_l_a_r_P_a_t_c_h_S_i_z_e │ │ │ │ │ +static short GetRegularPatchSize() │ │ │ │ │ +Number of control vertices of Regular Patches in table. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_N_u_m_F_V_a_r_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ +short GetNumFVarControlVertices() const │ │ │ │ │ +Deprecated. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor(int type) │ │ │ │ │ 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_a_t_c_h_M_a_p_:_:_F_i_n_d_P_a_t_c_h │ │ │ │ │ -Handle const * FindPatch(int patchFaceId, double u, double v) const │ │ │ │ │ -Returns a handle to the sub-patch of the face at the given (u,v). Note that the │ │ │ │ │ -patch face ID corresp... │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._h_:_1_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_a_t_c_h_M_a_p_:_:_H_a_n_d_l_e │ │ │ │ │ -PatchTable::PatchHandle Handle │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_s_L_e_a_f │ │ │ │ │ -unsigned int isLeaf │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_n_d_e_x │ │ │ │ │ -unsigned int index │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_M_a_p_:_:_Q_u_a_d_N_o_d_e_:_:_C_h_i_l_d_:_:_i_s_S_e_t │ │ │ │ │ -unsigned int isSet │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_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_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ -Handle that can be used as unique patch identifier within PatchTable. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_6_0 │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +PatchDescriptor & operator=(PatchDescriptor const &d) │ │ │ │ │ +Assignment operator. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_I_s_A_d_a_p_t_i_v_e │ │ │ │ │ +static bool IsAdaptive(Type type) │ │ │ │ │ +Returns true if the type is an adaptive (non-linear) patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_F_a_r_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ +bool operator<(PatchDescriptor const other) const │ │ │ │ │ +Allows ordering of patches by type. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_G_e_t_G_r_e_g_o_r_y_P_a_t_c_h_S_i_z_e │ │ │ │ │ +static short GetGregoryPatchSize() │ │ │ │ │ +Number of control vertices of Gregory (and Gregory Boundary) Patches in table. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_:_:_p_r_i_n_t │ │ │ │ │ +void print() 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_:_: │ │ │ │ │ +_G_e_t_A_d_a_p_t_i_v_e_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_s │ │ │ │ │ +static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc:: │ │ │ │ │ +SchemeType type) │ │ │ │ │ +Returns a vector of all the legal patch descriptors for the given adaptive │ │ │ │ │ +subdivision scheme. │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ +PatchDescriptor() │ │ │ │ │ +Default constructor. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_M_a_p_._h │ │ │ │ │ + * _p_a_t_c_h_D_e_s_c_r_i_p_t_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/patchTableFactory.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTableFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,33 +90,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    patchTableFactory.h File Reference
    │ │ │ │ +
    stencilTableFactory.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/topologyRefiner.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ +#include "../far/patchTable.h"
    │ │ │ │ +#include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PatchTableFactory
     Factory for constructing a PatchTable from a TopologyRefiner. More...
    class  StencilTableFactoryReal< REAL >
     A specialized factory for StencilTable. More...
     
    struct  PatchTableFactory::Options
     Public options for the PatchTable factory. More...
    struct  StencilTableFactoryReal< REAL >::Options
     
    struct  PatchTableFactory::PatchFaceTag
     Obsolete internal struct not intended for public use – due to be deprecated. More...
    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...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -125,13 +135,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +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 │ │ │ │ │ -patchTableFactory.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_/_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 │ │ │ │ │ - class   _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ -  Factory for constructing a _P_a_t_c_h_T_a_b_l_e from a _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r. _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   _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 _P_a_t_c_h_T_a_b_l_e factory. _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 │ │ │ │ │   │ │ │ │ │ -struct   _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g │ │ │ │ │ -  Obsolete internal struct not intended for public use – due to be │ │ │ │ │ - deprecated. _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_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 │ │ │ │ │ - * _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00890.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,5 +1,9 @@ │ │ │ │ │ var a00890 = [ │ │ │ │ │ - ["PatchTableFactory", "a01009.html", "a01009"], │ │ │ │ │ - ["Options", "a01013.html", "a01013"], │ │ │ │ │ - ["PatchFaceTag", "a01017.html", "a01017"] │ │ │ │ │ + ["StencilTableFactoryReal< REAL >", "a01037.html", "a01037"], │ │ │ │ │ + ["Options", "a01077.html", "a01077"], │ │ │ │ │ + ["LimitStencilTableFactoryReal< REAL >", "a01041.html", "a01041"], │ │ │ │ │ + ["Options", "a01081.html", "a01081"], │ │ │ │ │ + ["LocationArray", "a01085.html", "a01085"], │ │ │ │ │ + ["StencilTableFactory", "a01089.html", null], │ │ │ │ │ + ["LimitStencilTableFactory", "a01093.html", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00890_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchTableFactory.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/stencilTableFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    patchTableFactory.h
    │ │ │ │ +
    stencilTableFactory.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,249 +119,357 @@ │ │ │ │
    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_PATCH_TABLE_FACTORY_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30#include "../far/topologyRefiner.h"
    │ │ │ │ -
    31#include "../far/patchTable.h"
    │ │ │ │ -
    32
    │ │ │ │ -
    33namespace OpenSubdiv {
    │ │ │ │ -
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    35
    │ │ │ │ -
    36namespace Far {
    │ │ │ │ -
    37
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    41public:
    │ │ │ │ -
    42
    │ │ │ │ -
    │ │ │ │ -
    45 struct Options {
    │ │ │ │ +
    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
    │ │ │ │
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    61 };
    │ │ │ │ -
    │ │ │ │ +
    55 enum Mode {
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    59 };
    │ │ │ │ +
    │ │ │ │ +
    60
    │ │ │ │ +
    │ │ │ │ +
    61 struct Options {
    │ │ │ │
    62
    │ │ │ │
    │ │ │ │ -
    63 Options(unsigned int maxIsolation=10) :
    │ │ │ │ -
    64 generateAllLevels(false),
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    67 triangulateQuads(false),
    │ │ │ │ - │ │ │ │ -
    69 useInfSharpPatch(false),
    │ │ │ │ -
    70 maxIsolationLevel(maxIsolation & 0xf),
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    75 generateFVarTables(false),
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    82 { }
    │ │ │ │ -
    │ │ │ │ -
    83
    │ │ │ │ - │ │ │ │ -
    86
    │ │ │ │ -
    88 void SetEndCapType(EndCapType e) { endCapType = e & 0x7; }
    │ │ │ │ -
    89
    │ │ │ │ -
    91 void SetMaxIsolationLevel(unsigned int level) { maxIsolationLevel = level & 0xf; }
    │ │ │ │ -
    92
    │ │ │ │ -
    94 template <typename REAL> void SetPatchPrecision();
    │ │ │ │ -
    95
    │ │ │ │ -
    97 template <typename REAL> void SetFVarPatchPrecision();
    │ │ │ │ -
    98
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    102
    │ │ │ │ -
    103 adaptiveOptions.useInfSharpPatch = useInfSharpPatch;
    │ │ │ │ - │ │ │ │ -
    105 adaptiveOptions.considerFVarChannels = generateFVarTables &&
    │ │ │ │ - │ │ │ │ -
    107 return adaptiveOptions;
    │ │ │ │ -
    108 }
    │ │ │ │ -
    │ │ │ │ -
    109
    │ │ │ │ -
    110 unsigned int generateAllLevels : 1,
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    114
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    118
    │ │ │ │ -
    119 // end-capping
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    123
    │ │ │ │ -
    124 // varying
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    127
    │ │ │ │ -
    128 // face-varying
    │ │ │ │ - │ │ │ │ -
    130
    │ │ │ │ -
    131 // precision
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    134
    │ │ │ │ -
    135 // legacy behaviors (default to true)
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    138
    │ │ │ │ - │ │ │ │ -
    140 int const * fvarChannelIndices;
    │ │ │ │ -
    141 };
    │ │ │ │ -
    │ │ │ │ -
    142
    │ │ │ │ -
    175 static PatchTable * Create(TopologyRefiner const & refiner,
    │ │ │ │ -
    176 Options options = Options(),
    │ │ │ │ -
    177 ConstIndexArray selectedFaces = ConstIndexArray());
    │ │ │ │ -
    178
    │ │ │ │ -
    179public:
    │ │ │ │ -
    180 // PatchFaceTag
    │ │ │ │ -
    181 //
    │ │ │ │ -
    182 // This simple struct was previously used within the factory to take inventory of
    │ │ │ │ -
    183 // various kinds of patches to fully allocate buffers prior to populating them. It
    │ │ │ │ -
    184 // was not intended to be exposed as part of the public interface.
    │ │ │ │ -
    185 //
    │ │ │ │ -
    186 // It is no longer used internally and is being kept here to respect preservation
    │ │ │ │ -
    187 // of the public interface, but it will be deprecated at the earliest opportunity.
    │ │ │ │ -
    188 //
    │ │ │ │ -
    191 //
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    193 public:
    │ │ │ │ -
    194 unsigned int _hasPatch : 1;
    │ │ │ │ -
    195 unsigned int _isRegular : 1;
    │ │ │ │ -
    196 unsigned int _transitionMask : 4;
    │ │ │ │ -
    197 unsigned int _boundaryMask : 4;
    │ │ │ │ -
    198 unsigned int _boundaryIndex : 2;
    │ │ │ │ -
    199 unsigned int _boundaryCount : 3;
    │ │ │ │ -
    200 unsigned int _hasBoundaryEdge : 3;
    │ │ │ │ -
    201 unsigned int _isSingleCrease : 1;
    │ │ │ │ -
    202
    │ │ │ │ -
    203 void clear();
    │ │ │ │ -
    204 void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask);
    │ │ │ │ -
    205 void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask);
    │ │ │ │ -
    206 void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask);
    │ │ │ │ -
    207 };
    │ │ │ │ -
    │ │ │ │ -
    208 typedef std::vector<PatchFaceTag> PatchTagVector;
    │ │ │ │ -
    209};
    │ │ │ │ -
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ +
    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
    │ │ │ │ -
    211
    │ │ │ │ -
    │ │ │ │ -
    212template <> inline void PatchTableFactory::Options::SetPatchPrecision<float>() {
    │ │ │ │ -
    213 patchPrecisionDouble = false;
    │ │ │ │ -
    214}
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    215template <> inline void PatchTableFactory::Options::SetFVarPatchPrecision<float>() {
    │ │ │ │ -
    216 fvarPatchPrecisionDouble = false;
    │ │ │ │ -
    217}
    │ │ │ │ +
    211public:
    │ │ │ │ +
    212
    │ │ │ │ +
    │ │ │ │ +
    213 enum Mode {
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    217 };
    │ │ │ │
    │ │ │ │
    218
    │ │ │ │ -
    219template <> inline void PatchTableFactory::Options::SetPatchPrecision<double>() {
    │ │ │ │ -
    220 patchPrecisionDouble = true;
    │ │ │ │ -
    221}
    │ │ │ │ -
    222template <> inline void PatchTableFactory::Options::SetFVarPatchPrecision<double>() {
    │ │ │ │ -
    223 fvarPatchPrecisionDouble = true;
    │ │ │ │ -
    224}
    │ │ │ │ +
    │ │ │ │ +
    219 struct Options {
    │ │ │ │ +
    220
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    224 fvarChannel(0) { }
    │ │ │ │ +
    │ │ │ │
    225
    │ │ │ │ -
    226
    │ │ │ │ -
    227} // end namespace Far
    │ │ │ │ -
    228
    │ │ │ │ -
    229} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    230using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    226 unsigned int interpolationMode : 2,
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    229 unsigned int fvarChannel;
    │ │ │ │ +
    230 };
    │ │ │ │ +
    │ │ │ │
    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.
    │ │ │ │ -
    unsigned int generateLegacySharpCornerPatches
    Generate sharp regular patches at smooth corners (legacy)
    │ │ │ │ - │ │ │ │ -
    TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const
    Determine adaptive refinement options to match assigned patch options.
    │ │ │ │ -
    unsigned int maxIsolationLevel
    Cap adaptive feature isolation to the given level (max. 10)
    │ │ │ │ - │ │ │ │ -
    unsigned int generateFVarLegacyLinearPatches
    Generate all linear face-varying patches (legacy)
    │ │ │ │ -
    void SetPatchPrecision()
    Set precision of vertex patches.
    │ │ │ │ -
    unsigned int fvarPatchPrecisionDouble
    Generate double-precision stencils for face-varying patches.
    │ │ │ │ -
    void SetMaxIsolationLevel(unsigned int level)
    Set maximum isolation level.
    │ │ │ │ - │ │ │ │ -
    int const * fvarChannelIndices
    List containing the indices of the channels selected for the factory.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    unsigned int generateVaryingLocalPoints
    Generate local points with varying patches.
    │ │ │ │ -
    unsigned int includeFVarBaseLevelIndices
    Include base level in face-varying patch point indices (Uniform mode only)
    │ │ │ │ -
    unsigned int generateAllLevels
    Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only)
    │ │ │ │ -
    unsigned int patchPrecisionDouble
    Generate double-precision stencils for vertex patches.
    │ │ │ │ -
    unsigned int generateFVarTables
    Generate face-varying patch tables.
    │ │ │ │ -
    unsigned int includeBaseLevelIndices
    Include base level in patch point indices (Uniform mode only)
    │ │ │ │ -
    void SetFVarPatchPrecision()
    Set precision of face-varying patches.
    │ │ │ │ -
    int numFVarChannels
    Number of channel indices and interpolation modes passed.
    │ │ │ │ -
    unsigned int triangulateQuads
    Triangulate 'QUADS' primitives (Uniform mode only)
    │ │ │ │ -
    EndCapType
    Choice for approximating irregular patches (end-caps)
    │ │ │ │ -
    @ 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)
    │ │ │ │ - │ │ │ │ -
    Obsolete internal struct not intended for public use – due to be deprecated.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    Stores topology data for a specified set of refinement options.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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.
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -patchTableFactory.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 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,409 +24,497 @@ │ │ │ │ │ 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_PATCH_TABLE_FACTORY_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30#include "../far/topologyRefiner.h" │ │ │ │ │ -31#include "../far/patchTable.h" │ │ │ │ │ -32 │ │ │ │ │ -33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -34namespace OPENSUBDIV_VERSION { │ │ │ │ │ -35 │ │ │ │ │ -36namespace Far { │ │ │ │ │ -37 │ │ │ │ │ -_4_0class _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y { │ │ │ │ │ -41public: │ │ │ │ │ -42 │ │ │ │ │ -_4_5 struct _O_p_t_i_o_n_s { │ │ │ │ │ +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 │ │ │ │ │ -_5_5 enum _E_n_d_C_a_p_T_y_p_e { │ │ │ │ │ -_5_6 _E_N_D_C_A_P___N_O_N_E = 0, │ │ │ │ │ -_5_7 _E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S, │ │ │ │ │ -_5_8 _E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S, │ │ │ │ │ -_5_9 _E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S, │ │ │ │ │ -60 _E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y │ │ │ │ │ -_6_1 }; │ │ │ │ │ +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 struct _O_p_t_i_o_n_s { │ │ │ │ │ 62 │ │ │ │ │ -_6_3 _O_p_t_i_o_n_s(unsigned int maxIsolation=10) : │ │ │ │ │ -64 _g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s(false), │ │ │ │ │ -65 _i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s(true), │ │ │ │ │ -66 _i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s(false), │ │ │ │ │ -67 _t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s(false), │ │ │ │ │ -68 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h(false), │ │ │ │ │ -69 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h(false), │ │ │ │ │ -70 _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l(maxIsolation & 0xf), │ │ │ │ │ -71 _e_n_d_C_a_p_T_y_p_e(_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S), │ │ │ │ │ -72 _s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s(true), │ │ │ │ │ -73 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s(true), │ │ │ │ │ -74 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s(true), │ │ │ │ │ -75 _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s(false), │ │ │ │ │ -76 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e(false), │ │ │ │ │ -77 _f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e(false), │ │ │ │ │ -78 _g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s(true), │ │ │ │ │ -79 _g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s(true), │ │ │ │ │ -80 _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s(-1), │ │ │ │ │ -81 _f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s(0) │ │ │ │ │ -82 { } │ │ │ │ │ -83 │ │ │ │ │ -_8_5 _E_n_d_C_a_p_T_y_p_e _G_e_t_E_n_d_C_a_p_T_y_p_e() const { return (_E_n_d_C_a_p_T_y_p_e)_e_n_d_C_a_p_T_y_p_e; } │ │ │ │ │ -86 │ │ │ │ │ -_8_8 void _S_e_t_E_n_d_C_a_p_T_y_p_e(_E_n_d_C_a_p_T_y_p_e e) { _e_n_d_C_a_p_T_y_p_e = e & 0x7; } │ │ │ │ │ -89 │ │ │ │ │ -_9_1 void _S_e_t_M_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l(unsigned int level) { _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l = level & │ │ │ │ │ -0xf; } │ │ │ │ │ -92 │ │ │ │ │ -_9_4 template void _S_e_t_P_a_t_c_h_P_r_e_c_i_s_i_o_n(); │ │ │ │ │ -95 │ │ │ │ │ -_9_7 template void _S_e_t_F_V_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n(); │ │ │ │ │ -98 │ │ │ │ │ -_1_0_0 _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 _G_e_t_R_e_f_i_n_e_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s() const { │ │ │ │ │ -101 _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 adaptiveOptions(_m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l); │ │ │ │ │ -102 │ │ │ │ │ -103 adaptiveOptions._u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h; │ │ │ │ │ -104 adaptiveOptions._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h; │ │ │ │ │ -105 adaptiveOptions._c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s = _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s && │ │ │ │ │ -106 !_g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s; │ │ │ │ │ -107 return adaptiveOptions; │ │ │ │ │ -108 } │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 unsigned int _g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s : 1, │ │ │ │ │ -_1_1_1 _i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s : 1, │ │ │ │ │ -_1_1_2 _i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s : 1, │ │ │ │ │ -_1_1_3 _t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s : 1, │ │ │ │ │ -114 │ │ │ │ │ -_1_1_5 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h : 1, │ │ │ │ │ -_1_1_6 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h : 1, │ │ │ │ │ -_1_1_7 _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l : 4, │ │ │ │ │ -118 │ │ │ │ │ -119 // end-capping │ │ │ │ │ -_1_2_0 _e_n_d_C_a_p_T_y_p_e : 3, │ │ │ │ │ -_1_2_1 _s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s : 1, │ │ │ │ │ -123 │ │ │ │ │ -124 // varying │ │ │ │ │ -_1_2_5 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s : 1, │ │ │ │ │ -_1_2_6 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s : 1, │ │ │ │ │ -127 │ │ │ │ │ -128 // face-varying │ │ │ │ │ -_1_2_9 _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s : 1, │ │ │ │ │ -130 │ │ │ │ │ -131 // precision │ │ │ │ │ -_1_3_2 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e : 1, │ │ │ │ │ -_1_3_3 _f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e : 1, │ │ │ │ │ -134 │ │ │ │ │ -135 // legacy behaviors (default to true) │ │ │ │ │ -_1_3_6 _g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s : 1, │ │ │ │ │ -_1_3_7 _g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s : 1; │ │ │ │ │ -138 │ │ │ │ │ -_1_3_9 int _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ -_1_4_0 int const * _f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s; │ │ │ │ │ -141 }; │ │ │ │ │ -142 │ │ │ │ │ -_1_7_5 static _P_a_t_c_h_T_a_b_l_e * _C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ -176 _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s(), │ │ │ │ │ -177 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces = _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y()); │ │ │ │ │ -178 │ │ │ │ │ -179public: │ │ │ │ │ -180 // PatchFaceTag │ │ │ │ │ -181 // │ │ │ │ │ -182 // This simple struct was previously used within the factory to take │ │ │ │ │ -inventory of │ │ │ │ │ -183 // various kinds of patches to fully allocate buffers prior to populating │ │ │ │ │ -them. It │ │ │ │ │ -184 // was not intended to be exposed as part of the public interface. │ │ │ │ │ -185 // │ │ │ │ │ -186 // It is no longer used internally and is being kept here to respect │ │ │ │ │ -preservation │ │ │ │ │ -187 // of the public interface, but it will be deprecated at the earliest │ │ │ │ │ -opportunity. │ │ │ │ │ -188 // │ │ │ │ │ -191 // │ │ │ │ │ -_1_9_2 struct _P_a_t_c_h_F_a_c_e_T_a_g { │ │ │ │ │ -193 public: │ │ │ │ │ -_1_9_4 unsigned int ___h_a_s_P_a_t_c_h : 1; │ │ │ │ │ -_1_9_5 unsigned int ___i_s_R_e_g_u_l_a_r : 1; │ │ │ │ │ -_1_9_6 unsigned int ___t_r_a_n_s_i_t_i_o_n_M_a_s_k : 4; │ │ │ │ │ -_1_9_7 unsigned int ___b_o_u_n_d_a_r_y_M_a_s_k : 4; │ │ │ │ │ -_1_9_8 unsigned int ___b_o_u_n_d_a_r_y_I_n_d_e_x : 2; │ │ │ │ │ -_1_9_9 unsigned int ___b_o_u_n_d_a_r_y_C_o_u_n_t : 3; │ │ │ │ │ -_2_0_0 unsigned int ___h_a_s_B_o_u_n_d_a_r_y_E_d_g_e : 3; │ │ │ │ │ -_2_0_1 unsigned int ___i_s_S_i_n_g_l_e_C_r_e_a_s_e : 1; │ │ │ │ │ -202 │ │ │ │ │ -_2_0_3 void _c_l_e_a_r(); │ │ │ │ │ -_2_0_4 void _a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k(int boundaryEdgeMask); │ │ │ │ │ -_2_0_5 void _a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_V_e_r_t_e_x_M_a_s_k(int boundaryVertexMask); │ │ │ │ │ -_2_0_6 void _a_s_s_i_g_n_T_r_a_n_s_i_t_i_o_n_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k(int boundaryVertexMask); │ │ │ │ │ -207 }; │ │ │ │ │ -_2_0_8 typedef std::vector _P_a_t_c_h_T_a_g_V_e_c_t_o_r; │ │ │ │ │ -209}; │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ -211 │ │ │ │ │ -_2_1_2template <> inline void PatchTableFactory::Options::SetPatchPrecision │ │ │ │ │ -() { │ │ │ │ │ -213 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e = false; │ │ │ │ │ -214} │ │ │ │ │ -_2_1_5template <> inline void PatchTableFactory::Options:: │ │ │ │ │ -SetFVarPatchPrecision() { │ │ │ │ │ -216 fvarPatchPrecisionDouble = false; │ │ │ │ │ -217} │ │ │ │ │ +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 │ │ │ │ │ -219template <> inline void PatchTableFactory::Options:: │ │ │ │ │ -SetPatchPrecision() { │ │ │ │ │ -220 patchPrecisionDouble = true; │ │ │ │ │ -221} │ │ │ │ │ -222template <> inline void PatchTableFactory::Options:: │ │ │ │ │ -SetFVarPatchPrecision() { │ │ │ │ │ -223 fvarPatchPrecisionDouble = true; │ │ │ │ │ -224} │ │ │ │ │ +_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 │ │ │ │ │ -226 │ │ │ │ │ -227} // end namespace Far │ │ │ │ │ -228 │ │ │ │ │ -229} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -230using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +_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 │ │ │ │ │ -232} // end namespace OpenSubdiv │ │ │ │ │ -233 │ │ │ │ │ +_2_3_3 struct _L_o_c_a_t_i_o_n_A_r_r_a_y { │ │ │ │ │ 234 │ │ │ │ │ -235#endif /* OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H */ │ │ │ │ │ +_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_:_:_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_:_:_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_F_a_c_t_o_r_y │ │ │ │ │ -Factory for constructing a PatchTable from a TopologyRefiner. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_T_a_g_V_e_c_t_o_r │ │ │ │ │ -std::vector< PatchFaceTag > PatchTagVector │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_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_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s │ │ │ │ │ -unsigned int generateVaryingTables │ │ │ │ │ -Generate varying patch tables. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s │ │ │ │ │ -unsigned int generateLegacySharpCornerPatches │ │ │ │ │ -Generate sharp regular patches at smooth corners (legacy) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ -unsigned int shareEndCapPatchPoints │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_G_e_t_R_e_f_i_n_e_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ -TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const │ │ │ │ │ -Determine adaptive refinement options to match assigned patch options. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ -unsigned int maxIsolationLevel │ │ │ │ │ -Cap adaptive feature isolation to the given level (max. 10) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_:_G_e_t_E_n_d_C_a_p_T_y_p_e │ │ │ │ │ -EndCapType GetEndCapType() const │ │ │ │ │ -Get endcap basis type. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s │ │ │ │ │ -unsigned int generateFVarLegacyLinearPatches │ │ │ │ │ -Generate all linear face-varying patches (legacy) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_S_e_t_P_a_t_c_h_P_r_e_c_i_s_i_o_n │ │ │ │ │ -void SetPatchPrecision() │ │ │ │ │ -Set precision of vertex patches. │ │ │ │ │ -_O_p_e_n_S_u_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_:_: │ │ │ │ │ -_f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e │ │ │ │ │ -unsigned int fvarPatchPrecisionDouble │ │ │ │ │ -Generate double-precision stencils for face-varying patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_S_e_t_M_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ -void SetMaxIsolationLevel(unsigned int level) │ │ │ │ │ -Set maximum isolation level. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_T_y_p_e │ │ │ │ │ -unsigned int endCapType │ │ │ │ │ -EndCapType. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s │ │ │ │ │ -int const * fvarChannelIndices │ │ │ │ │ -List containing the indices of the channels selected for the factory. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ -unsigned int useSingleCreasePatch │ │ │ │ │ -Use single crease patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ -unsigned int useInfSharpPatch │ │ │ │ │ -Use infinitely-sharp patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_:_S_e_t_E_n_d_C_a_p_T_y_p_e │ │ │ │ │ -void SetEndCapType(EndCapType e) │ │ │ │ │ -Set endcap basis type. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s │ │ │ │ │ -unsigned int generateVaryingLocalPoints │ │ │ │ │ -Generate local points with varying patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s │ │ │ │ │ -unsigned int includeFVarBaseLevelIndices │ │ │ │ │ -Include base level in face-varying patch point indices (Uniform mode only) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s │ │ │ │ │ -unsigned int generateAllLevels │ │ │ │ │ -Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e │ │ │ │ │ -unsigned int patchPrecisionDouble │ │ │ │ │ -Generate double-precision stencils for vertex patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s │ │ │ │ │ -unsigned int generateFVarTables │ │ │ │ │ -Generate face-varying patch tables. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s │ │ │ │ │ -unsigned int includeBaseLevelIndices │ │ │ │ │ -Include base level in patch point indices (Uniform mode only) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_S_e_t_F_V_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n │ │ │ │ │ -void SetFVarPatchPrecision() │ │ │ │ │ -Set precision of face-varying patches. │ │ │ │ │ -_O_p_e_n_S_u_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_:_: │ │ │ │ │ -_n_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ -int numFVarChannels │ │ │ │ │ -Number of channel indices and interpolation modes passed. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s │ │ │ │ │ -unsigned int triangulateQuads │ │ │ │ │ -Triangulate 'QUADS' primitives (Uniform mode only) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_T_y_p_e │ │ │ │ │ -EndCapType │ │ │ │ │ -Choice for approximating irregular patches (end-caps) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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___N_O_N_E │ │ │ │ │ -@ ENDCAP_NONE │ │ │ │ │ -unspecified │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ -Options(unsigned int maxIsolation=10) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g │ │ │ │ │ -Obsolete internal struct not intended for public use – due to be deprecated. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___i_s_S_i_n_g_l_e_C_r_e_a_s_e │ │ │ │ │ -unsigned int _isSingleCrease │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___i_s_R_e_g_u_l_a_r │ │ │ │ │ -unsigned int _isRegular │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___b_o_u_n_d_a_r_y_I_n_d_e_x │ │ │ │ │ -unsigned int _boundaryIndex │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -_a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ -void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask) │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___t_r_a_n_s_i_t_i_o_n_M_a_s_k │ │ │ │ │ -unsigned int _transitionMask │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___h_a_s_B_o_u_n_d_a_r_y_E_d_g_e │ │ │ │ │ -unsigned int _hasBoundaryEdge │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___b_o_u_n_d_a_r_y_M_a_s_k │ │ │ │ │ -unsigned int _boundaryMask │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_:___h_a_s_P_a_t_c_h │ │ │ │ │ -unsigned int _hasPatch │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -_a_s_s_i_g_n_T_r_a_n_s_i_t_i_o_n_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k │ │ │ │ │ -void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask) │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_:_c_l_e_a_r │ │ │ │ │ -void clear() │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -_a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k │ │ │ │ │ -void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask) │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ -___b_o_u_n_d_a_r_y_C_o_u_n_t │ │ │ │ │ -unsigned int _boundaryCount │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ + * _s_t_e_n_c_i_l_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/patchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyRefinerFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,33 +90,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    patchTable.h File Reference
    │ │ │ │ +
    topologyRefinerFactory.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ -#include "../far/patchParam.h"
    │ │ │ │ -#include "../far/stencilTable.h"
    │ │ │ │ -#include "../sdc/options.h"
    │ │ │ │ -#include <vector>
    │ │ │ │ +#include "../far/topologyRefiner.h"
    │ │ │ │ +#include "../far/error.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PatchTable
     Container for arrays of parametric patches. More...
    class  TopologyRefinerFactoryBase
     Private base class of Factories for constructing TopologyRefiners. More...
     
    class  PatchTable::PatchHandle
     Handle that can be used as unique patch identifier within PatchTable. More...
    class  TopologyRefinerFactory< MESH >
     Factory for constructing TopologyRefiners from specific mesh classes. More...
     
    struct  TopologyRefinerFactory< MESH >::Options
     Options related to the construction of each TopologyRefiner. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -125,13 +126,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,34 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -patchTable.h File Reference │ │ │ │ │ +topologyRefinerFactory.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_/_s_t_e_n_c_i_l_T_a_b_l_e_._h" │ │ │ │ │ -#include "_._._/_s_d_c_/_o_p_t_i_o_n_s_._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_/_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   _P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -  Container for arrays of parametric patches. _M_o_r_e_._._. │ │ │ │ │ + class   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +  Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ -  Handle that can be used as unique patch identifier within _P_a_t_c_h_T_a_b_l_e. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ + class   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_ _M_E_S_H_ _> │ │ │ │ │ +  Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_ _M_E_S_H_ _>_:_:_O_p_t_i_o_n_s │ │ │ │ │ +  _O_p_t_i_o_n_s related to the construction of each _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r. _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_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00893.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ │ var a00893 = [ │ │ │ │ │ - ["PatchTable", "a00993.html", "a00993"], │ │ │ │ │ - ["PatchHandle", "a00997.html", "a00997"] │ │ │ │ │ + ["TopologyRefinerFactoryBase", "a01125.html", "a01125"], │ │ │ │ │ + ["TopologyRefinerFactory< MESH >", "a01109.html", "a01109"], │ │ │ │ │ + ["Options", "a01129.html", "a01129"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00893_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/patchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/topologyRefinerFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    patchTable.h
    │ │ │ │ +
    topologyRefinerFactory.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,748 +118,698 @@ │ │ │ │
    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_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_PATCH_TABLE_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include "../far/patchDescriptor.h"
    │ │ │ │ -
    31#include "../far/patchParam.h"
    │ │ │ │ -
    32#include "../far/stencilTable.h"
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H
    │ │ │ │ +
    25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../far/topologyRefiner.h"
    │ │ │ │ +
    30#include "../far/error.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32#include <cassert>
    │ │ │ │
    33
    │ │ │ │ -
    34#include "../sdc/options.h"
    │ │ │ │ -
    35
    │ │ │ │ -
    36#include <vector>
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace OpenSubdiv {
    │ │ │ │ -
    39namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    40
    │ │ │ │ -
    41namespace Far {
    │ │ │ │ -
    42
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    56
    │ │ │ │ -
    57public:
    │ │ │ │ -
    58
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    61 // XXXX manuelk members will eventually be made private
    │ │ │ │ -
    62 public:
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace Far {
    │ │ │ │ +
    38
    │ │ │ │ +
    46//
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    48protected:
    │ │ │ │ +
    49
    │ │ │ │ +
    50 //
    │ │ │ │ +
    51 // Protected methods invoked by the subclass template to verify and process each
    │ │ │ │ +
    52 // stage of construction implemented by the subclass:
    │ │ │ │ +
    53 //
    │ │ │ │ +
    54 typedef Vtr::internal::Level::ValidationCallback TopologyCallback;
    │ │ │ │ +
    55
    │ │ │ │ + │ │ │ │ +
    57 static bool prepareComponentTopologyAssignment(TopologyRefiner& refiner, bool fullValidation,
    │ │ │ │ +
    58 TopologyCallback callback, void const * callbackData);
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    61};
    │ │ │ │ +
    │ │ │ │ +
    62
    │ │ │ │
    63
    │ │ │ │ -
    64 friend class PatchTable;
    │ │ │ │ -
    65 friend class PatchMap;
    │ │ │ │ -
    66
    │ │ │ │ -
    67 Index arrayIndex, // Array index of the patch
    │ │ │ │ -
    68 patchIndex, // Absolute Index of the patch
    │ │ │ │ -
    69 vertIndex; // Relative offset to the first CV of the patch in array
    │ │ │ │ -
    70 };
    │ │ │ │ -
    │ │ │ │ -
    71
    │ │ │ │ -
    72public:
    │ │ │ │ -
    73
    │ │ │ │ -
    75 PatchTable(PatchTable const & src);
    │ │ │ │ -
    76
    │ │ │ │ - │ │ │ │ +
    77template <class MESH>
    │ │ │ │ +
    │ │ │ │ + │ │ │ │
    79
    │ │ │ │ -
    81 bool IsFeatureAdaptive() const;
    │ │ │ │ -
    82
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    85 return (int)_patchVerts.size();
    │ │ │ │ -
    86 }
    │ │ │ │ +
    80public:
    │ │ │ │ +
    81
    │ │ │ │ +
    │ │ │ │ +
    84 struct Options {
    │ │ │ │ +
    85
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    87 schemeType(sdcType),
    │ │ │ │ +
    88 schemeOptions(sdcOptions),
    │ │ │ │ +
    89 validateFullTopology(false) { }
    │ │ │ │
    │ │ │ │ -
    87
    │ │ │ │ -
    89 int GetNumPatchesTotal() const;
    │ │ │ │
    90
    │ │ │ │ -
    92 int GetMaxValence() const { return _maxValence; }
    │ │ │ │ -
    93
    │ │ │ │ -
    95 int GetNumPtexFaces() const { return _numPtexFaces; }
    │ │ │ │ -
    96
    │ │ │ │ -
    97
    │ │ │ │ -
    99
    │ │ │ │ -
    105
    │ │ │ │ - │ │ │ │ -
    108
    │ │ │ │ - │ │ │ │ -
    111
    │ │ │ │ -
    113 PatchParam GetPatchParam(PatchHandle const & handle) const;
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    94 unsigned int validateFullTopology : 1;
    │ │ │ │ +
    97 };
    │ │ │ │ +
    │ │ │ │ +
    98
    │ │ │ │ +
    108 //
    │ │ │ │ +
    113 static TopologyRefiner* Create(MESH const& mesh, Options options = Options());
    │ │ │ │
    114
    │ │ │ │ -
    116 ConstIndexArray GetPatchVertices(int array, int patch) const;
    │ │ │ │ -
    117
    │ │ │ │ -
    119 PatchParam GetPatchParam(int array, int patch) const;
    │ │ │ │ -
    121
    │ │ │ │ -
    122
    │ │ │ │ -
    124
    │ │ │ │ -
    130
    │ │ │ │ -
    132 int GetNumPatchArrays() const;
    │ │ │ │ -
    133
    │ │ │ │ -
    135 int GetNumPatches(int array) const;
    │ │ │ │ -
    136
    │ │ │ │ -
    138 int GetNumControlVertices(int array) const;
    │ │ │ │ -
    139
    │ │ │ │ - │ │ │ │ -
    142
    │ │ │ │ - │ │ │ │ -
    145
    │ │ │ │ -
    147 ConstPatchParamArray const GetPatchParams(int array) const;
    │ │ │ │ +
    128 static TopologyRefiner* Create(TopologyRefiner const & baseLevel);
    │ │ │ │ +
    129
    │ │ │ │ +
    130protected:
    │ │ │ │ +
    131 typedef Vtr::internal::Level::TopologyError TopologyError;
    │ │ │ │ +
    132
    │ │ │ │ +
    134
    │ │ │ │
    149
    │ │ │ │ -
    150
    │ │ │ │ +
    151 static bool resizeComponentTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │
    152
    │ │ │ │ +
    155 static bool assignComponentTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │ +
    156
    │ │ │ │ +
    158 static bool assignComponentTags(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │
    159
    │ │ │ │ -
    161 int GetNumLocalPoints() const;
    │ │ │ │ +
    161 static bool assignFaceVaryingTopology(TopologyRefiner& newRefiner, MESH const& mesh);
    │ │ │ │
    162
    │ │ │ │ - │ │ │ │ +
    164 static void reportInvalidTopology(TopologyError errCode, char const * msg, MESH const& mesh);
    │ │ │ │
    165
    │ │ │ │ -
    167 template <typename REAL>
    │ │ │ │ - │ │ │ │ -
    169
    │ │ │ │ -
    172 template <typename REAL> bool LocalPointStencilPrecisionMatchesType() const;
    │ │ │ │ -
    173
    │ │ │ │ -
    186 template <class T> void
    │ │ │ │ -
    187 ComputeLocalPointValues(T const *src, T *dst) const;
    │ │ │ │ -
    188
    │ │ │ │ -
    189
    │ │ │ │ - │ │ │ │ -
    192
    │ │ │ │ - │ │ │ │ -
    195
    │ │ │ │ -
    197 template <typename REAL>
    │ │ │ │ - │ │ │ │ +
    167
    │ │ │ │ +
    168protected:
    │ │ │ │ +
    170
    │ │ │ │ +
    187
    │ │ │ │ +
    189 static void setNumBaseVertices(TopologyRefiner & newRefiner, int count);
    │ │ │ │ +
    190
    │ │ │ │ +
    192 static void setNumBaseFaces(TopologyRefiner & newRefiner, int count);
    │ │ │ │ +
    193
    │ │ │ │ +
    195 static void setNumBaseEdges(TopologyRefiner & newRefiner, int count);
    │ │ │ │ +
    196
    │ │ │ │ +
    198 static void setNumBaseFaceVertices(TopologyRefiner & newRefiner, Index f, int count);
    │ │ │ │
    199
    │ │ │ │ -
    202 template <typename REAL> bool LocalPointVaryingStencilPrecisionMatchesType() const;
    │ │ │ │ -
    203
    │ │ │ │ -
    216 template <class T> void
    │ │ │ │ -
    217 ComputeLocalPointValuesVarying(T const *src, T *dst) const;
    │ │ │ │ -
    218
    │ │ │ │ -
    219
    │ │ │ │ -
    221 int GetNumLocalPointsFaceVarying(int channel = 0) const;
    │ │ │ │ -
    222
    │ │ │ │ -
    224 StencilTable const *GetLocalPointFaceVaryingStencilTable(int channel = 0) const;
    │ │ │ │ -
    225
    │ │ │ │ -
    227 template <typename REAL>
    │ │ │ │ - │ │ │ │ -
    229
    │ │ │ │ -
    232 template <typename REAL> bool LocalPointFaceVaryingStencilPrecisionMatchesType() const;
    │ │ │ │ -
    233
    │ │ │ │ -
    248 template <class T> void
    │ │ │ │ -
    249 ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const;
    │ │ │ │ -
    251
    │ │ │ │ +
    201 static void setNumBaseEdgeFaces(TopologyRefiner & newRefiner, Index e, int count);
    │ │ │ │ +
    202
    │ │ │ │ +
    204 static void setNumBaseVertexFaces(TopologyRefiner & newRefiner, Index v, int count);
    │ │ │ │ +
    205
    │ │ │ │ +
    207 static void setNumBaseVertexEdges(TopologyRefiner & newRefiner, Index v, int count);
    │ │ │ │ +
    208
    │ │ │ │ +
    209 static int getNumBaseVertices(TopologyRefiner const & newRefiner);
    │ │ │ │ +
    210 static int getNumBaseFaces(TopologyRefiner const & newRefiner);
    │ │ │ │ +
    211 static int getNumBaseEdges(TopologyRefiner const & newRefiner);
    │ │ │ │ +
    213
    │ │ │ │ +
    215
    │ │ │ │ +
    237
    │ │ │ │ +
    239 static IndexArray getBaseFaceVertices(TopologyRefiner & newRefiner, Index f);
    │ │ │ │ +
    240
    │ │ │ │ +
    242 static IndexArray getBaseFaceEdges(TopologyRefiner & newRefiner, Index f);
    │ │ │ │ +
    243
    │ │ │ │ +
    245 static IndexArray getBaseEdgeVertices(TopologyRefiner & newRefiner, Index e);
    │ │ │ │ +
    246
    │ │ │ │ +
    248 static IndexArray getBaseEdgeFaces(TopologyRefiner & newRefiner, Index e);
    │ │ │ │ +
    249
    │ │ │ │ +
    251 static IndexArray getBaseVertexFaces(TopologyRefiner & newRefiner, Index v);
    │ │ │ │
    252
    │ │ │ │ -
    254
    │ │ │ │ +
    254 static IndexArray getBaseVertexEdges(TopologyRefiner & newRefiner, Index v);
    │ │ │ │
    255
    │ │ │ │ - │ │ │ │ -
    260
    │ │ │ │ - │ │ │ │ -
    263
    │ │ │ │ -
    264 typedef std::vector<Index> VertexValenceTable;
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    262
    │ │ │ │ +
    264 static void populateBaseLocalIndices(TopologyRefiner & newRefiner);
    │ │ │ │
    265
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    268 return _vertexValenceTable;
    │ │ │ │ -
    269 }
    │ │ │ │ -
    │ │ │ │ -
    271
    │ │ │ │ +
    267 static void setBaseEdgeNonManifold(TopologyRefiner & newRefiner, Index e, bool b);
    │ │ │ │ +
    268
    │ │ │ │ +
    270 static void setBaseVertexNonManifold(TopologyRefiner & newRefiner, Index v, bool b);
    │ │ │ │
    272
    │ │ │ │
    274
    │ │ │ │ -
    280
    │ │ │ │ - │ │ │ │ -
    284
    │ │ │ │ -
    287 float GetSingleCreasePatchSharpnessValue(int array, int patch) const;
    │ │ │ │ +
    283
    │ │ │ │ +
    285 static Index findBaseEdge(TopologyRefiner const & newRefiner, Index v0, Index v1);
    │ │ │ │ +
    286
    │ │ │ │ +
    288 static void setBaseEdgeSharpness(TopologyRefiner & newRefiner, Index e, float sharpness);
    │ │ │ │
    289
    │ │ │ │ -
    290
    │ │ │ │ +
    291 static void setBaseVertexSharpness(TopologyRefiner & newRefiner, Index v, float sharpness);
    │ │ │ │
    292
    │ │ │ │ +
    294 static void setBaseFaceHole(TopologyRefiner & newRefiner, Index f, bool isHole);
    │ │ │ │ +
    296
    │ │ │ │
    298
    │ │ │ │ - │ │ │ │ -
    301
    │ │ │ │ - │ │ │ │ -
    304
    │ │ │ │ -
    306 ConstIndexArray GetPatchVaryingVertices(int array, int patch) const;
    │ │ │ │ -
    307
    │ │ │ │ - │ │ │ │ -
    310
    │ │ │ │ - │ │ │ │ +
    308
    │ │ │ │ +
    310 static int createBaseFVarChannel(TopologyRefiner & newRefiner, int numValues);
    │ │ │ │ +
    311
    │ │ │ │ +
    313 static int createBaseFVarChannel(TopologyRefiner & newRefiner, int numValues, Sdc::Options const& fvarOptions);
    │ │ │ │
    314
    │ │ │ │ -
    315
    │ │ │ │ +
    316 static IndexArray getBaseFaceFVarValues(TopologyRefiner & newRefiner, Index face, int channel = 0);
    │ │ │ │
    317
    │ │ │ │ -
    323
    │ │ │ │ - │ │ │ │ -
    326
    │ │ │ │ - │ │ │ │ -
    329
    │ │ │ │ - │ │ │ │ -
    332
    │ │ │ │ - │ │ │ │ -
    335
    │ │ │ │ -
    337 ConstIndexArray GetPatchFVarValues(PatchHandle const & handle, int channel = 0) const;
    │ │ │ │ -
    338
    │ │ │ │ -
    340 ConstIndexArray GetPatchFVarValues(int array, int patch, int channel = 0) const;
    │ │ │ │ -
    341
    │ │ │ │ -
    343 ConstIndexArray GetPatchArrayFVarValues(int array, int channel = 0) const;
    │ │ │ │ -
    344
    │ │ │ │ -
    346 ConstIndexArray GetFVarValues(int channel = 0) const;
    │ │ │ │ +
    319
    │ │ │ │ +
    320protected:
    │ │ │ │ +
    321 //
    │ │ │ │ +
    322 // Not to be specialized:
    │ │ │ │ +
    323 //
    │ │ │ │ +
    324 static bool populateBaseLevel(TopologyRefiner& refiner, MESH const& mesh, Options options);
    │ │ │ │ +
    325
    │ │ │ │ +
    326private:
    │ │ │ │ +
    327 //
    │ │ │ │ +
    328 // An oversight in the interfaces of the error reporting function between the factory
    │ │ │ │ +
    329 // class and the Vtr::Level requires this adapter function to avoid warnings.
    │ │ │ │ +
    330 //
    │ │ │ │ +
    331 // The static class method requires a reference as the MESH argument, but the interface
    │ │ │ │ +
    332 // for Vtr::Level requires a pointer (void*). So this adapter with a MESH* argument is
    │ │ │ │ +
    333 // used to effectively cast the function pointer required by Vtr::Level error reporting:
    │ │ │ │ +
    334 //
    │ │ │ │ +
    335 static void reportInvalidTopologyAdapter(TopologyError errCode, char const * msg, MESH const * mesh) {
    │ │ │ │ +
    336 reportInvalidTopology(errCode, msg, *mesh);
    │ │ │ │ +
    337 }
    │ │ │ │ +
    338};
    │ │ │ │ +
    │ │ │ │ +
    339
    │ │ │ │ +
    340
    │ │ │ │ +
    341//
    │ │ │ │ +
    342// Generic implementations:
    │ │ │ │ +
    343//
    │ │ │ │ +
    344template <class MESH>
    │ │ │ │ +
    345TopologyRefiner*
    │ │ │ │ +
    │ │ │ │ + │ │ │ │
    347
    │ │ │ │ -
    349 int GetFVarValueStride(int channel = 0) const;
    │ │ │ │ -
    350
    │ │ │ │ -
    352 PatchParam GetPatchFVarPatchParam(PatchHandle const & handle, int channel = 0) const;
    │ │ │ │ -
    353
    │ │ │ │ -
    355 PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const;
    │ │ │ │ -
    356
    │ │ │ │ -
    358 ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel = 0) const;
    │ │ │ │ -
    359
    │ │ │ │ - │ │ │ │ -
    362
    │ │ │ │ - │ │ │ │ -
    366
    │ │ │ │ -
    367
    │ │ │ │ -
    369
    │ │ │ │ -
    374
    │ │ │ │ -
    375 typedef std::vector<Index> PatchVertsTable;
    │ │ │ │ -
    376
    │ │ │ │ -
    378 PatchVertsTable const & GetPatchControlVerticesTable() const { return _patchVerts; }
    │ │ │ │ -
    379
    │ │ │ │ -
    381 PatchParamTable const & GetPatchParamTable() const { return _paramTable; }
    │ │ │ │ -
    382
    │ │ │ │ -
    384 std::vector<Index> const &GetSharpnessIndexTable() const { return _sharpnessIndices; }
    │ │ │ │ -
    385
    │ │ │ │ -
    387 std::vector<float> const &GetSharpnessValues() const { return _sharpnessValues; }
    │ │ │ │ -
    388
    │ │ │ │ -
    389 typedef std::vector<unsigned int> QuadOffsetsTable;
    │ │ │ │ -
    390
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    393 return _quadOffsetsTable;
    │ │ │ │ -
    394 }
    │ │ │ │ -
    │ │ │ │ -
    396
    │ │ │ │ -
    398 void print() const;
    │ │ │ │ -
    399
    │ │ │ │ -
    400public:
    │ │ │ │ +
    348 TopologyRefiner * refiner = new TopologyRefiner(options.schemeType, options.schemeOptions);
    │ │ │ │ +
    349
    │ │ │ │ +
    350 if (! populateBaseLevel(*refiner, mesh, options)) {
    │ │ │ │ +
    351 delete refiner;
    │ │ │ │ +
    352 return 0;
    │ │ │ │ +
    353 }
    │ │ │ │ +
    354
    │ │ │ │ +
    355 // Eventually want to move the Refiner's inventory initialization here. Currently it
    │ │ │ │ +
    356 // is handled after topology assignment, but if the inventory is to include additional
    │ │ │ │ +
    357 // features (e.g. holes, etc.) it is better off deferred to here.
    │ │ │ │ +
    358
    │ │ │ │ +
    359 return refiner;
    │ │ │ │ +
    360}
    │ │ │ │ +
    │ │ │ │ +
    361
    │ │ │ │ +
    362template <class MESH>
    │ │ │ │ + │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    365
    │ │ │ │ +
    366 return new TopologyRefiner(source);
    │ │ │ │ +
    367}
    │ │ │ │ +
    │ │ │ │ +
    368
    │ │ │ │ +
    369template <class MESH>
    │ │ │ │ +
    370bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    372
    │ │ │ │ +
    373 //
    │ │ │ │ +
    374 // Construction of a specialized topology refiner involves four steps, each of which
    │ │ │ │ +
    375 // involves a method specialized for MESH followed by one that takes an action in
    │ │ │ │ +
    376 // response to it or in preparation for the next step.
    │ │ │ │ +
    377 //
    │ │ │ │ +
    378 // Both the specialized methods and those that follow them may find fault in the
    │ │ │ │ +
    379 // construction and trigger failure at any time:
    │ │ │ │ +
    380 //
    │ │ │ │ +
    381
    │ │ │ │ +
    382 //
    │ │ │ │ +
    383 // Sizing of the topology -- this is a required specialization for MESH. This defines
    │ │ │ │ +
    384 // an inventory of all components and their relations that is used to allocate buffers
    │ │ │ │ +
    385 // to be efficiently populated in the subsequent topology assignment step.
    │ │ │ │ +
    386 //
    │ │ │ │ +
    387 if (! resizeComponentTopology(refiner, mesh)) return false;
    │ │ │ │ +
    388 if (! prepareComponentTopologySizing(refiner)) return false;
    │ │ │ │ +
    389
    │ │ │ │ +
    390 //
    │ │ │ │ +
    391 // Assignment of the topology -- this is a required specialization for MESH. If edges
    │ │ │ │ +
    392 // are specified, all other topological relations are expected to be defined for them.
    │ │ │ │ +
    393 // Otherwise edges and remaining topology will be completed from the face-vertices:
    │ │ │ │ +
    394 //
    │ │ │ │ +
    395 bool validate = options.validateFullTopology;
    │ │ │ │ +
    396 TopologyCallback callback = reinterpret_cast<TopologyCallback>(reportInvalidTopologyAdapter);
    │ │ │ │ +
    397 void const * userData = &mesh;
    │ │ │ │ +
    398
    │ │ │ │ +
    399 if (! assignComponentTopology(refiner, mesh)) return false;
    │ │ │ │ +
    400 if (! prepareComponentTopologyAssignment(refiner, validate, callback, userData)) return false;
    │ │ │ │
    401
    │ │ │ │ -
    403
    │ │ │ │ -
    405
    │ │ │ │ -
    428 template <typename REAL>
    │ │ │ │ -
    429 void EvaluateBasis(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ -
    430 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ -
    431 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
    │ │ │ │ -
    432
    │ │ │ │ -
    435 void EvaluateBasis(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    436 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ -
    437 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
    │ │ │ │ -
    438
    │ │ │ │ -
    441 void EvaluateBasis(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    442 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ -
    443 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
    │ │ │ │ -
    444
    │ │ │ │ -
    467 template <typename REAL>
    │ │ │ │ -
    468 void EvaluateBasisVarying(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ -
    469 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ -
    470 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
    │ │ │ │ +
    402 //
    │ │ │ │ +
    403 // User assigned and internal tagging of components -- an optional specialization for
    │ │ │ │ +
    404 // MESH. Allows the specification of sharpness values, holes, etc.
    │ │ │ │ +
    405 //
    │ │ │ │ +
    406 if (! assignComponentTags(refiner, mesh)) return false;
    │ │ │ │ +
    407 if (! prepareComponentTagsAndSharpness(refiner)) return false;
    │ │ │ │ +
    408
    │ │ │ │ +
    409 //
    │ │ │ │ +
    410 // Defining channels of face-varying primvar data -- an optional specialization for MESH.
    │ │ │ │ +
    411 //
    │ │ │ │ +
    412 if (! assignFaceVaryingTopology(refiner, mesh)) return false;
    │ │ │ │ +
    413 if (! prepareFaceVaryingChannels(refiner)) return false;
    │ │ │ │ +
    414
    │ │ │ │ +
    415 return true;
    │ │ │ │ +
    416}
    │ │ │ │ +
    │ │ │ │ +
    417
    │ │ │ │ +
    418template <class MESH>
    │ │ │ │ +
    419inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    421 newRefiner._levels[0]->resizeFaces(count);
    │ │ │ │ +
    422}
    │ │ │ │ +
    │ │ │ │ +
    423template <class MESH>
    │ │ │ │ +
    424inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    426 newRefiner._levels[0]->resizeEdges(count);
    │ │ │ │ +
    427}
    │ │ │ │ +
    │ │ │ │ +
    428template <class MESH>
    │ │ │ │ +
    429inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    431 newRefiner._levels[0]->resizeVertices(count);
    │ │ │ │ +
    432}
    │ │ │ │ +
    │ │ │ │ +
    433
    │ │ │ │ +
    434template <class MESH>
    │ │ │ │ +
    435inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    437 return newRefiner._levels[0]->getNumFaces();
    │ │ │ │ +
    438}
    │ │ │ │ +
    │ │ │ │ +
    439template <class MESH>
    │ │ │ │ +
    440inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    442 return newRefiner._levels[0]->getNumEdges();
    │ │ │ │ +
    443}
    │ │ │ │ +
    │ │ │ │ +
    444template <class MESH>
    │ │ │ │ +
    445inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    447 return newRefiner._levels[0]->getNumVertices();
    │ │ │ │ +
    448}
    │ │ │ │ +
    │ │ │ │ +
    449
    │ │ │ │ +
    450template <class MESH>
    │ │ │ │ +
    451inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    453 newRefiner._levels[0]->resizeFaceVertices(f, count);
    │ │ │ │ +
    454 newRefiner._hasIrregFaces = newRefiner._hasIrregFaces || (count != newRefiner._regFaceSize);
    │ │ │ │ +
    455}
    │ │ │ │ +
    │ │ │ │ +
    456template <class MESH>
    │ │ │ │ +
    457inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    459 newRefiner._levels[0]->resizeEdgeFaces(e, count);
    │ │ │ │ +
    460}
    │ │ │ │ +
    │ │ │ │ +
    461template <class MESH>
    │ │ │ │ +
    462inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    464 newRefiner._levels[0]->resizeVertexFaces(v, count);
    │ │ │ │ +
    465}
    │ │ │ │ +
    │ │ │ │ +
    466template <class MESH>
    │ │ │ │ +
    467inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    469 newRefiner._levels[0]->resizeVertexEdges(v, count);
    │ │ │ │ +
    470}
    │ │ │ │ +
    │ │ │ │
    471
    │ │ │ │ -
    474 void EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    475 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ -
    476 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
    │ │ │ │ -
    477
    │ │ │ │ -
    480 void EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    481 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ -
    482 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
    │ │ │ │ -
    483
    │ │ │ │ -
    508 template <typename REAL>
    │ │ │ │ -
    509 void EvaluateBasisFaceVarying(PatchHandle const & handle, REAL u, REAL v,
    │ │ │ │ -
    510 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
    │ │ │ │ -
    511 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0,
    │ │ │ │ -
    512 int channel = 0) const;
    │ │ │ │ -
    513
    │ │ │ │ -
    516 void EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    517 float wP[], float wDu[] = 0, float wDv[] = 0,
    │ │ │ │ -
    518 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0,
    │ │ │ │ -
    519 int channel = 0) const;
    │ │ │ │ -
    520
    │ │ │ │ -
    523 void EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    524 double wP[], double wDu[] = 0, double wDv[] = 0,
    │ │ │ │ -
    525 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0,
    │ │ │ │ -
    526 int channel = 0) const;
    │ │ │ │ -
    528
    │ │ │ │ -
    529protected:
    │ │ │ │ +
    472template <class MESH>
    │ │ │ │ +
    473inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    475 return newRefiner._levels[0]->getFaceVertices(f);
    │ │ │ │ +
    476}
    │ │ │ │ +
    │ │ │ │ +
    477template <class MESH>
    │ │ │ │ +
    478inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    480 return newRefiner._levels[0]->getFaceEdges(f);
    │ │ │ │ +
    481}
    │ │ │ │ +
    │ │ │ │ +
    482template <class MESH>
    │ │ │ │ +
    483inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    485 return newRefiner._levels[0]->getEdgeVertices(e);
    │ │ │ │ +
    486}
    │ │ │ │ +
    │ │ │ │ +
    487template <class MESH>
    │ │ │ │ +
    488inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    490 return newRefiner._levels[0]->getEdgeFaces(e);
    │ │ │ │ +
    491}
    │ │ │ │ +
    │ │ │ │ +
    492template <class MESH>
    │ │ │ │ +
    493inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    495 return newRefiner._levels[0]->getVertexFaces(v);
    │ │ │ │ +
    496}
    │ │ │ │ +
    │ │ │ │ +
    497template <class MESH>
    │ │ │ │ +
    498inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    500 return newRefiner._levels[0]->getVertexEdges(v);
    │ │ │ │ +
    501}
    │ │ │ │ +
    │ │ │ │ +
    502
    │ │ │ │ +
    503template <class MESH>
    │ │ │ │ +
    504inline LocalIndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    506 return newRefiner._levels[0]->getEdgeFaceLocalIndices(e);
    │ │ │ │ +
    507}
    │ │ │ │ +
    │ │ │ │ +
    508template <class MESH>
    │ │ │ │ +
    509inline LocalIndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    511 return newRefiner._levels[0]->getVertexFaceLocalIndices(v);
    │ │ │ │ +
    512}
    │ │ │ │ +
    │ │ │ │ +
    513template <class MESH>
    │ │ │ │ +
    514inline LocalIndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    516 return newRefiner._levels[0]->getVertexEdgeLocalIndices(v);
    │ │ │ │ +
    517}
    │ │ │ │ +
    │ │ │ │ +
    518
    │ │ │ │ +
    519template <class MESH>
    │ │ │ │ +
    520inline Index
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    522 return newRefiner._levels[0]->findEdge(v0, v1);
    │ │ │ │ +
    523}
    │ │ │ │ +
    │ │ │ │ +
    524
    │ │ │ │ +
    525template <class MESH>
    │ │ │ │ +
    526inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    528 newRefiner._levels[0]->populateLocalIndices();
    │ │ │ │ +
    529}
    │ │ │ │ +
    │ │ │ │
    530
    │ │ │ │ -
    531 friend class PatchTableBuilder;
    │ │ │ │ -
    532
    │ │ │ │ -
    533 // Factory constructor
    │ │ │ │ -
    534 PatchTable(int maxvalence);
    │ │ │ │ -
    535
    │ │ │ │ -
    536 Index getPatchIndex(int array, int patch) const;
    │ │ │ │ -
    537
    │ │ │ │ - │ │ │ │ -
    539
    │ │ │ │ - │ │ │ │ -
    541 float * getSharpnessValues(Index arrayIndex);
    │ │ │ │ -
    542
    │ │ │ │ -
    543private:
    │ │ │ │ -
    544
    │ │ │ │ -
    545 //
    │ │ │ │ -
    546 // Patch arrays
    │ │ │ │ -
    547 //
    │ │ │ │ -
    548
    │ │ │ │ -
    549 struct PatchArray;
    │ │ │ │ -
    550 typedef std::vector<PatchArray> PatchArrayVector;
    │ │ │ │ -
    551
    │ │ │ │ -
    552 PatchArray & getPatchArray(Index arrayIndex);
    │ │ │ │ -
    553 PatchArray const & getPatchArray(Index arrayIndex) const;
    │ │ │ │ -
    554
    │ │ │ │ -
    555 void reservePatchArrays(int numPatchArrays);
    │ │ │ │ -
    556 void pushPatchArray(PatchDescriptor desc, int npatches,
    │ │ │ │ -
    557 Index * vidx, Index * pidx, Index * qoidx=0);
    │ │ │ │ +
    531template <class MESH>
    │ │ │ │ +
    532inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    534 newRefiner._levels[0]->setEdgeNonManifold(e, b);
    │ │ │ │ +
    535}
    │ │ │ │ +
    │ │ │ │ +
    536template <class MESH>
    │ │ │ │ +
    537inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    539 newRefiner._levels[0]->setVertexNonManifold(v, b);
    │ │ │ │ +
    540}
    │ │ │ │ +
    │ │ │ │ +
    541
    │ │ │ │ +
    542template <class MESH>
    │ │ │ │ +
    543inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    545 newRefiner._levels[0]->getEdgeSharpness(e) = s;
    │ │ │ │ +
    546}
    │ │ │ │ +
    │ │ │ │ +
    547template <class MESH>
    │ │ │ │ +
    548inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    550 newRefiner._levels[0]->getVertexSharpness(v) = s;
    │ │ │ │ +
    551}
    │ │ │ │ +
    │ │ │ │ +
    552template <class MESH>
    │ │ │ │ +
    553inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    555 newRefiner._levels[0]->setFaceHole(f, b);
    │ │ │ │ +
    556 newRefiner._hasHoles = newRefiner._hasHoles || b;
    │ │ │ │ +
    557}
    │ │ │ │ +
    │ │ │ │
    558
    │ │ │ │ -
    559 IndexArray getPatchArrayVertices(int arrayIndex);
    │ │ │ │ -
    560
    │ │ │ │ -
    561 Index findPatchArray(PatchDescriptor desc);
    │ │ │ │ -
    562
    │ │ │ │ -
    563
    │ │ │ │ -
    564 //
    │ │ │ │ -
    565 // Varying patch arrays
    │ │ │ │ -
    566 //
    │ │ │ │ -
    567 IndexArray getPatchArrayVaryingVertices(int arrayIndex);
    │ │ │ │ -
    568
    │ │ │ │ -
    569 void allocateVaryingVertices(
    │ │ │ │ -
    570 PatchDescriptor desc, int numPatches);
    │ │ │ │ -
    571 void populateVaryingVertices();
    │ │ │ │ -
    572
    │ │ │ │ -
    573 //
    │ │ │ │ -
    574 // Face-varying patch channels
    │ │ │ │ -
    575 //
    │ │ │ │ +
    559template <class MESH>
    │ │ │ │ +
    560inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    562 return newRefiner._levels[0]->createFVarChannel(numValues, newRefiner._subdivOptions);
    │ │ │ │ +
    563}
    │ │ │ │ +
    │ │ │ │ +
    564template <class MESH>
    │ │ │ │ +
    565inline int
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    567 Sdc::Options newOptions = newRefiner._subdivOptions;
    │ │ │ │ + │ │ │ │ +
    569 return newRefiner._levels[0]->createFVarChannel(numValues, newOptions);
    │ │ │ │ +
    570}
    │ │ │ │ +
    │ │ │ │ +
    571template <class MESH>
    │ │ │ │ +
    572inline IndexArray
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    574 return newRefiner._levels[0]->getFaceFVarValues(face, channel);
    │ │ │ │ +
    575}
    │ │ │ │ +
    │ │ │ │
    576
    │ │ │ │ -
    577 struct FVarPatchChannel;
    │ │ │ │ -
    578 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
    │ │ │ │ -
    579
    │ │ │ │ -
    580 FVarPatchChannel & getFVarPatchChannel(int channel);
    │ │ │ │ -
    581 FVarPatchChannel const & getFVarPatchChannel(int channel) const;
    │ │ │ │ -
    582
    │ │ │ │ -
    583 void allocateFVarPatchChannels(int numChannels);
    │ │ │ │ -
    584 void allocateFVarPatchChannelValues(
    │ │ │ │ -
    585 PatchDescriptor regDesc, PatchDescriptor irregDesc,
    │ │ │ │ -
    586 int numPatches, int channel);
    │ │ │ │ -
    587
    │ │ │ │ -
    588 // deprecated
    │ │ │ │ -
    589 void setFVarPatchChannelLinearInterpolation(
    │ │ │ │ -
    590 Sdc::Options::FVarLinearInterpolation interpolation, int channel);
    │ │ │ │ -
    591
    │ │ │ │ -
    592 IndexArray getFVarValues(int channel);
    │ │ │ │ -
    593 ConstIndexArray getPatchFVarValues(int patch, int channel) const;
    │ │ │ │ -
    594
    │ │ │ │ -
    595 PatchParamArray getFVarPatchParams(int channel);
    │ │ │ │ -
    596 PatchParam getPatchFVarPatchParam(int patch, int channel) const;
    │ │ │ │ -
    597
    │ │ │ │ -
    598private:
    │ │ │ │ +
    577
    │ │ │ │ +
    578template <class MESH>
    │ │ │ │ +
    579bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    581
    │ │ │ │ + │ │ │ │ +
    583 "Failure in TopologyRefinerFactory<>::resizeComponentTopology() -- no specialization provided.");
    │ │ │ │ +
    584
    │ │ │ │ +
    585 //
    │ │ │ │ +
    586 // Sizing the topology tables:
    │ │ │ │ +
    587 // This method is for determining the sizes of the various topology tables (and other
    │ │ │ │ +
    588 // data) associated with the mesh. Once completed, appropriate memory will be allocated
    │ │ │ │ +
    589 // and an additional method invoked to populate it accordingly.
    │ │ │ │ +
    590 //
    │ │ │ │ +
    591 // The following methods should be called -- first those to specify the number of faces,
    │ │ │ │ +
    592 // edges and vertices in the mesh:
    │ │ │ │ +
    593 //
    │ │ │ │ +
    594 // void setBaseFaceCount( TopologyRefiner& newRefiner, int count)
    │ │ │ │ +
    595 // void setBaseEdgeCount( TopologyRefiner& newRefiner, int count)
    │ │ │ │ +
    596 // void setBaseVertexCount(TopologyRefiner& newRefiner, int count)
    │ │ │ │ +
    597 //
    │ │ │ │ +
    598 // and then for each face, edge and vertex, the number of its incident components:
    │ │ │ │
    599 //
    │ │ │ │ -
    600 // Simple private class to hold stencil table pointers of varying precision,
    │ │ │ │ -
    601 // where the discriminant of the precision is external.
    │ │ │ │ -
    602 //
    │ │ │ │ -
    603 // NOTE that this is a simple pointer container and NOT a smart pointer that
    │ │ │ │ -
    604 // manages the ownership of the object referred to by it.
    │ │ │ │ -
    605 //
    │ │ │ │ -
    606 class StencilTablePtr {
    │ │ │ │ -
    607 private:
    │ │ │ │ -
    608 typedef StencilTableReal<float> float_type;
    │ │ │ │ -
    609 typedef StencilTableReal<double> double_type;
    │ │ │ │ -
    610
    │ │ │ │ -
    611 union {
    │ │ │ │ -
    612 float_type * _fPtr;
    │ │ │ │ -
    613 double_type * _dPtr;
    │ │ │ │ -
    614 };
    │ │ │ │ -
    615
    │ │ │ │ -
    616 public:
    │ │ │ │ -
    617 StencilTablePtr() { _fPtr = 0; }
    │ │ │ │ -
    618 StencilTablePtr(float_type * ptr) { _fPtr = ptr; }
    │ │ │ │ -
    619 StencilTablePtr(double_type * ptr) { _dPtr = ptr; }
    │ │ │ │ -
    620
    │ │ │ │ -
    621 operator bool() const { return _fPtr != 0; }
    │ │ │ │ +
    600 // void setBaseFaceVertexCount(TopologyRefiner& newRefiner, Index face, int count)
    │ │ │ │ +
    601 // void setBaseEdgeFaceCount( TopologyRefiner& newRefiner, Index edge, int count)
    │ │ │ │ +
    602 // void setBaseVertexFaceCount(TopologyRefiner& newRefiner, Index vertex, int count)
    │ │ │ │ +
    603 // void setBaseVertexEdgeCount(TopologyRefiner& newRefiner, Index vertex, int count)
    │ │ │ │ +
    604 //
    │ │ │ │ +
    605 // The count/size for a component type must be set before indices associated with that
    │ │ │ │ +
    606 // component type can be used.
    │ │ │ │ +
    607 //
    │ │ │ │ +
    608 // Note that it is only necessary to size 4 of the 6 supported topological relations --
    │ │ │ │ +
    609 // the number of edge-vertices is fixed at two per edge, and the number of face-edges is
    │ │ │ │ +
    610 // the same as the number of face-vertices.
    │ │ │ │ +
    611 //
    │ │ │ │ +
    612 // So a single pass through your mesh to gather up all of this sizing information will
    │ │ │ │ +
    613 // allow the Tables to be allocated appropriately once and avoid any dynamic resizing as
    │ │ │ │ +
    614 // it grows.
    │ │ │ │ +
    615 //
    │ │ │ │ +
    616 return false;
    │ │ │ │ +
    617}
    │ │ │ │ +
    │ │ │ │ +
    618
    │ │ │ │ +
    619template <class MESH>
    │ │ │ │ +
    620bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │
    622
    │ │ │ │ -
    623 void Set() { _fPtr = 0; }
    │ │ │ │ -
    624 void Set(float_type * ptr) { _fPtr = ptr; }
    │ │ │ │ -
    625 void Set(double_type * ptr) { _dPtr = ptr; }
    │ │ │ │ -
    626
    │ │ │ │ -
    627 template <typename REAL> StencilTableReal<REAL> * Get() const;
    │ │ │ │ -
    628 };
    │ │ │ │ -
    629
    │ │ │ │ -
    630private:
    │ │ │ │ -
    631
    │ │ │ │ -
    632 //
    │ │ │ │ -
    633 // Topology
    │ │ │ │ -
    634 //
    │ │ │ │ -
    635
    │ │ │ │ -
    636 int _maxValence, // highest vertex valence found in the mesh
    │ │ │ │ -
    637 _numPtexFaces; // total number of ptex faces
    │ │ │ │ -
    638
    │ │ │ │ -
    639 PatchArrayVector _patchArrays; // Vector of descriptors for arrays of patches
    │ │ │ │ -
    640
    │ │ │ │ -
    641 std::vector<Index> _patchVerts; // Indices of the control vertices of the patches
    │ │ │ │ -
    642
    │ │ │ │ -
    643 PatchParamTable _paramTable; // PatchParam bitfields (one per patch)
    │ │ │ │ -
    644
    │ │ │ │ + │ │ │ │ +
    624 "Failure in TopologyRefinerFactory<>::assignComponentTopology() -- no specialization provided.");
    │ │ │ │ +
    625
    │ │ │ │ +
    626 //
    │ │ │ │ +
    627 // Assigning the topology tables:
    │ │ │ │ +
    628 // Once the topology tables have been allocated, the six required topological
    │ │ │ │ +
    629 // relations can be directly populated using the following methods:
    │ │ │ │ +
    630 //
    │ │ │ │ +
    631 // IndexArray setBaseFaceVertices(TopologyRefiner& newRefiner, Index face)
    │ │ │ │ +
    632 // IndexArray setBaseFaceEdges(TopologyRefiner& newRefiner, Index face)
    │ │ │ │ +
    633 //
    │ │ │ │ +
    634 // IndexArray setBaseEdgeVertices(TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ +
    635 // IndexArray setBaseEdgeFaces(TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ +
    636 //
    │ │ │ │ +
    637 // IndexArray setBaseVertexEdges(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ +
    638 // IndexArray setBaseVertexFaces(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ +
    639 //
    │ │ │ │ +
    640 // For the last two relations -- the faces and edges incident a vertex -- there are
    │ │ │ │ +
    641 // also "local indices" that must be specified (considering doing this internally),
    │ │ │ │ +
    642 // where the "local index" of each incident face or edge is the index of the vertex
    │ │ │ │ +
    643 // within that face or edge, and so ranging from 0-3 for incident quads and 0-1 for
    │ │ │ │ +
    644 // incident edges. These are assigned through similarly retrieved arrays:
    │ │ │ │
    645 //
    │ │ │ │ -
    646 // Extraordinary vertex closed-form evaluation / endcap basis conversion
    │ │ │ │ -
    647 //
    │ │ │ │ -
    648 // XXXtakahito: these data will probably be replaced with mask coefficient or something
    │ │ │ │ -
    649 // SchemeWorker populates.
    │ │ │ │ -
    650 //
    │ │ │ │ -
    651 QuadOffsetsTable _quadOffsetsTable; // Quad offsets (for Gregory patches)
    │ │ │ │ -
    652 VertexValenceTable _vertexValenceTable; // Vertex valence table (for Gregory patches)
    │ │ │ │ -
    653
    │ │ │ │ -
    654 StencilTablePtr _localPointStencils; // local point conversion stencils
    │ │ │ │ -
    655 StencilTablePtr _localPointVaryingStencils; // local point varying stencils
    │ │ │ │ -
    656
    │ │ │ │ +
    646 // LocalIndexArray setBaseVertexFaceLocalIndices(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ +
    647 // LocalIndexArray setBaseVertexEdgeLocalIndices(TopologyRefiner& newRefiner, Index vertex)
    │ │ │ │ +
    648 // LocalIndexArray setBaseEdgeFaceLocalIndices( TopologyRefiner& newRefiner, Index edge)
    │ │ │ │ +
    649 //
    │ │ │ │ +
    650 // or, if the mesh is manifold, explicit assignment of these can be deferred and
    │ │ │ │ +
    651 // all can be determined by calling:
    │ │ │ │ +
    652 //
    │ │ │ │ +
    653 // void populateBaseLocalIndices(TopologyRefiner& newRefiner)
    │ │ │ │ +
    654 //
    │ │ │ │ +
    655 // All components are assumed to be locally manifold and ordering of components in
    │ │ │ │ +
    656 // the above relations is expected to be counter-clockwise.
    │ │ │ │
    657 //
    │ │ │ │ -
    658 // Varying data
    │ │ │ │ -
    659 //
    │ │ │ │ -
    660 PatchDescriptor _varyingDesc;
    │ │ │ │ -
    661
    │ │ │ │ -
    662 std::vector<Index> _varyingVerts;
    │ │ │ │ -
    663
    │ │ │ │ -
    664 //
    │ │ │ │ -
    665 // Face-varying data
    │ │ │ │ -
    666 //
    │ │ │ │ -
    667 FVarPatchChannelVector _fvarChannels;
    │ │ │ │ -
    668
    │ │ │ │ -
    669 std::vector<StencilTablePtr> _localPointFaceVaryingStencils;
    │ │ │ │ -
    670
    │ │ │ │ -
    671 //
    │ │ │ │ -
    672 // 'single-crease' patch sharpness tables
    │ │ │ │ -
    673 //
    │ │ │ │ -
    674 std::vector<Index> _sharpnessIndices; // Indices of single-crease sharpness (one per patch)
    │ │ │ │ -
    675 std::vector<float> _sharpnessValues; // Sharpness values.
    │ │ │ │ -
    676
    │ │ │ │ -
    677 //
    │ │ │ │ -
    678 // Construction history -- relevant to at least one public query:
    │ │ │ │ -
    679 //
    │ │ │ │ -
    680 unsigned int _isUniformLinear : 1;
    │ │ │ │ -
    681
    │ │ │ │ -
    682 //
    │ │ │ │ -
    683 // Precision -- only applies to local-point stencil tables
    │ │ │ │ +
    658 // For non-manifold components, no ordering/orientation of incident components is
    │ │ │ │ +
    659 // assumed or required, but be sure to explicitly tag such components (vertices and
    │ │ │ │ +
    660 // edges) as non-manifold:
    │ │ │ │ +
    661 //
    │ │ │ │ +
    662 // void setBaseEdgeNonManifold(TopologyRefiner& newRefiner, Index edge, bool b);
    │ │ │ │ +
    663 //
    │ │ │ │ +
    664 // void setBaseVertexNonManifold(TopologyRefiner& newRefiner, Index vertex, bool b);
    │ │ │ │ +
    665 //
    │ │ │ │ +
    666 // Also consider using TopologyLevel::ValidateTopology() when debugging to ensure
    │ │ │ │ +
    667 // that topology has been completely and correctly specified.
    │ │ │ │ +
    668 //
    │ │ │ │ +
    669 return false;
    │ │ │ │ +
    670}
    │ │ │ │ +
    │ │ │ │ +
    671
    │ │ │ │ +
    672template <class MESH>
    │ │ │ │ +
    673bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    675
    │ │ │ │ +
    676 //
    │ │ │ │ +
    677 // Optional assigning face-varying topology tables:
    │ │ │ │ +
    678 //
    │ │ │ │ +
    679 // Create independent face-varying primitive variable channels:
    │ │ │ │ +
    680 // int createBaseFVarChannel(TopologyRefiner& newRefiner, int numValues)
    │ │ │ │ +
    681 //
    │ │ │ │ +
    682 // For each channel, populate the face-vertex values:
    │ │ │ │ +
    683 // IndexArray setBaseFaceFVarValues(TopologyRefiner& newRefiner, Index face, int channel = 0)
    │ │ │ │
    684 //
    │ │ │ │ -
    685 unsigned int _vertexPrecisionIsDouble : 1;
    │ │ │ │ -
    686 unsigned int _varyingPrecisionIsDouble : 1;
    │ │ │ │ -
    687 unsigned int _faceVaryingPrecisionIsDouble : 1;
    │ │ │ │ -
    688};
    │ │ │ │ -
    │ │ │ │ -
    689
    │ │ │ │ -
    690
    │ │ │ │ -
    691//
    │ │ │ │ -
    692// Template specializations for float/double -- to be defined before used:
    │ │ │ │ -
    693//
    │ │ │ │ -
    694template <> inline StencilTableReal<float> *
    │ │ │ │ -
    695PatchTable::StencilTablePtr::Get<float>() const { return _fPtr; }
    │ │ │ │ -
    696
    │ │ │ │ -
    697template <> inline StencilTableReal<double> *
    │ │ │ │ -
    698PatchTable::StencilTablePtr::Get<double>() const { return _dPtr; }
    │ │ │ │ -
    699
    │ │ │ │ -
    │ │ │ │ -
    700template <> inline bool
    │ │ │ │ -
    701PatchTable::LocalPointStencilPrecisionMatchesType<float>() const {
    │ │ │ │ -
    702 return !_vertexPrecisionIsDouble;
    │ │ │ │ +
    685 return true;
    │ │ │ │ +
    686}
    │ │ │ │ +
    │ │ │ │ +
    687
    │ │ │ │ +
    688template <class MESH>
    │ │ │ │ +
    689bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    691
    │ │ │ │ +
    692 //
    │ │ │ │ +
    693 // Optional tagging:
    │ │ │ │ +
    694 // This is where any additional feature tags -- sharpness, holes, etc. -- can be
    │ │ │ │ +
    695 // specified using:
    │ │ │ │ +
    696 //
    │ │ │ │ +
    697 // void setBaseEdgeSharpness(TopologyRefiner& newRefiner, Index edge, float sharpness)
    │ │ │ │ +
    698 // void setBaseVertexSharpness(TopologyRefiner& newRefiner, Index vertex, float sharpness)
    │ │ │ │ +
    699 //
    │ │ │ │ +
    700 // void setBaseFaceHole(TopologyRefiner& newRefiner, Index face, bool hole)
    │ │ │ │ +
    701 //
    │ │ │ │ +
    702 return true;
    │ │ │ │
    703}
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -
    704template <> inline bool
    │ │ │ │ -
    705PatchTable::LocalPointVaryingStencilPrecisionMatchesType<float>() const {
    │ │ │ │ -
    706 return !_varyingPrecisionIsDouble;
    │ │ │ │ -
    707}
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    708template <> inline bool
    │ │ │ │ -
    709PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<float>() const {
    │ │ │ │ -
    710 return !_faceVaryingPrecisionIsDouble;
    │ │ │ │ -
    711}
    │ │ │ │ -
    │ │ │ │ -
    712
    │ │ │ │ -
    │ │ │ │ -
    713template <> inline bool
    │ │ │ │ -
    714PatchTable::LocalPointStencilPrecisionMatchesType<double>() const {
    │ │ │ │ -
    715 return _vertexPrecisionIsDouble;
    │ │ │ │ -
    716}
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    717template <> inline bool
    │ │ │ │ -
    718PatchTable::LocalPointVaryingStencilPrecisionMatchesType<double>() const {
    │ │ │ │ -
    719 return _varyingPrecisionIsDouble;
    │ │ │ │ -
    720}
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -
    721template <> inline bool
    │ │ │ │ -
    722PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<double>() const {
    │ │ │ │ -
    723 return _faceVaryingPrecisionIsDouble;
    │ │ │ │ -
    724}
    │ │ │ │ -
    │ │ │ │ -
    725
    │ │ │ │ -
    726//
    │ │ │ │ -
    727// StencilTable access -- backward compatible and generic:
    │ │ │ │ -
    728//
    │ │ │ │ -
    729inline StencilTable const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    731 assert(LocalPointStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    732 return static_cast<StencilTable const *>(_localPointStencils.Get<float>());
    │ │ │ │ -
    733}
    │ │ │ │ -
    │ │ │ │ -
    734inline StencilTable const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    736 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    737 return static_cast<StencilTable const *>(
    │ │ │ │ -
    738 _localPointVaryingStencils.Get<float>());
    │ │ │ │ -
    739}
    │ │ │ │ -
    │ │ │ │ -
    740inline StencilTable const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    742 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    743 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ -
    744 return static_cast<StencilTable const *>(
    │ │ │ │ -
    745 _localPointFaceVaryingStencils[channel].Get<float>());
    │ │ │ │ -
    746 }
    │ │ │ │ -
    747 return NULL;
    │ │ │ │ -
    748}
    │ │ │ │ -
    │ │ │ │ -
    749
    │ │ │ │ -
    750template <typename REAL>
    │ │ │ │ -
    751inline StencilTableReal<REAL> const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    753 assert(LocalPointStencilPrecisionMatchesType<REAL>());
    │ │ │ │ -
    754 return _localPointStencils.Get<REAL>();
    │ │ │ │ -
    755}
    │ │ │ │ -
    │ │ │ │ -
    756template <typename REAL>
    │ │ │ │ -
    757inline StencilTableReal<REAL> const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    759 assert(LocalPointVaryingStencilPrecisionMatchesType<REAL>());
    │ │ │ │ -
    760 return _localPointVaryingStencils.Get<REAL>();
    │ │ │ │ -
    761}
    │ │ │ │ -
    │ │ │ │ -
    762template <typename REAL>
    │ │ │ │ -
    763inline StencilTableReal<REAL> const *
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    765 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<REAL>());
    │ │ │ │ -
    766 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ -
    767 return _localPointFaceVaryingStencils[channel].Get<REAL>();
    │ │ │ │ -
    768 }
    │ │ │ │ -
    769 return NULL;
    │ │ │ │ -
    770}
    │ │ │ │ -
    │ │ │ │ -
    771
    │ │ │ │ -
    772
    │ │ │ │ -
    773//
    │ │ │ │ -
    774// Computation of local point values:
    │ │ │ │ -
    775//
    │ │ │ │ -
    776template <class T>
    │ │ │ │ -
    777inline void
    │ │ │ │ -
    │ │ │ │ -
    778PatchTable::ComputeLocalPointValues(T const *src, T *dst) const {
    │ │ │ │ -
    779 assert(LocalPointStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    780 if (_localPointStencils) {
    │ │ │ │ -
    781 _localPointStencils.Get<float>()->UpdateValues(src, dst);
    │ │ │ │ -
    782 }
    │ │ │ │ -
    783}
    │ │ │ │ -
    │ │ │ │ -
    784
    │ │ │ │ -
    785template <class T>
    │ │ │ │ -
    786inline void
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    788 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    789 if (_localPointVaryingStencils) {
    │ │ │ │ -
    790 _localPointVaryingStencils.Get<float>()->UpdateValues(src, dst);
    │ │ │ │ -
    791 }
    │ │ │ │ -
    792}
    │ │ │ │ -
    │ │ │ │ -
    793
    │ │ │ │ -
    794template <class T>
    │ │ │ │ -
    795inline void
    │ │ │ │ -
    │ │ │ │ -
    796PatchTable::ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel) const {
    │ │ │ │ -
    797 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
    │ │ │ │ -
    798 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
    │ │ │ │ -
    799 if (_localPointFaceVaryingStencils[channel]) {
    │ │ │ │ -
    800 _localPointFaceVaryingStencils[channel].Get<float>()->UpdateValues(src, dst);
    │ │ │ │ -
    801 }
    │ │ │ │ -
    802 }
    │ │ │ │ -
    803}
    │ │ │ │ -
    │ │ │ │ -
    804
    │ │ │ │ -
    805
    │ │ │ │ -
    806//
    │ │ │ │ -
    807// Basis evaluation overloads
    │ │ │ │ -
    808//
    │ │ │ │ -
    809inline void
    │ │ │ │ -
    │ │ │ │ -
    810PatchTable::EvaluateBasis(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    811 float wP[], float wDu[], float wDv[],
    │ │ │ │ -
    812 float wDuu[], float wDuv[], float wDvv[]) const {
    │ │ │ │ -
    813
    │ │ │ │ -
    814 EvaluateBasis<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ -
    815}
    │ │ │ │ -
    │ │ │ │ -
    816inline void
    │ │ │ │ -
    │ │ │ │ -
    817PatchTable::EvaluateBasis(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    818 double wP[], double wDu[], double wDv[],
    │ │ │ │ -
    819 double wDuu[], double wDuv[], double wDvv[]) const {
    │ │ │ │ -
    820
    │ │ │ │ -
    821 EvaluateBasis<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ -
    822}
    │ │ │ │ -
    │ │ │ │ -
    823
    │ │ │ │ -
    824inline void
    │ │ │ │ -
    │ │ │ │ -
    825PatchTable::EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    826 float wP[], float wDu[], float wDv[],
    │ │ │ │ -
    827 float wDuu[], float wDuv[], float wDvv[]) const {
    │ │ │ │ -
    828
    │ │ │ │ -
    829 EvaluateBasisVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ -
    830}
    │ │ │ │ -
    │ │ │ │ -
    831inline void
    │ │ │ │ -
    │ │ │ │ -
    832PatchTable::EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    833 double wP[], double wDu[], double wDv[],
    │ │ │ │ -
    834 double wDuu[], double wDuv[], double wDvv[]) const {
    │ │ │ │ -
    835
    │ │ │ │ -
    836 EvaluateBasisVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
    │ │ │ │ -
    837}
    │ │ │ │ -
    │ │ │ │ -
    838
    │ │ │ │ -
    839inline void
    │ │ │ │ -
    │ │ │ │ -
    840PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
    │ │ │ │ -
    841 float wP[], float wDu[], float wDv[],
    │ │ │ │ -
    842 float wDuu[], float wDuv[], float wDvv[], int channel) const {
    │ │ │ │ -
    843
    │ │ │ │ -
    844 EvaluateBasisFaceVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
    │ │ │ │ -
    845}
    │ │ │ │ -
    │ │ │ │ -
    846inline void
    │ │ │ │ -
    │ │ │ │ -
    847PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
    │ │ │ │ -
    848 double wP[], double wDu[], double wDv[],
    │ │ │ │ -
    849 double wDuu[], double wDuv[], double wDvv[], int channel) const {
    │ │ │ │ -
    850
    │ │ │ │ -
    851 EvaluateBasisFaceVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
    │ │ │ │ -
    852}
    │ │ │ │ -
    │ │ │ │ -
    853
    │ │ │ │ -
    854} // end namespace Far
    │ │ │ │ -
    855
    │ │ │ │ -
    856} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    857using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    858
    │ │ │ │ -
    859} // end namespace OpenSubdiv
    │ │ │ │ -
    860
    │ │ │ │ -
    861#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */
    │ │ │ │ - │ │ │ │ -
    std::vector< PatchParam > PatchParamTable
    Definition patchParam.h:243
    │ │ │ │ +
    704
    │ │ │ │ +
    705template <class MESH>
    │ │ │ │ +
    706void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    708 TopologyError /* errCode */, char const * /* msg */, MESH const& /* mesh */) {
    │ │ │ │ +
    709
    │ │ │ │ +
    710 //
    │ │ │ │ +
    711 // Optional topology validation error reporting:
    │ │ │ │ +
    712 // This method is called whenever the factory encounters topology validation
    │ │ │ │ +
    713 // errors. By default, nothing is reported
    │ │ │ │ +
    714 //
    │ │ │ │ +
    715}
    │ │ │ │ +
    │ │ │ │ +
    716
    │ │ │ │ +
    717} // end namespace Far
    │ │ │ │ +
    718
    │ │ │ │ +
    719} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    720using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    721} // end namespace OpenSubdiv
    │ │ │ │ +
    722
    │ │ │ │ +
    723#endif /* OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H */
    │ │ │ │ + │ │ │ │ +
    void Error(ErrorType err, const char *format,...)
    Sends an OSD error with a message (internal use only)
    │ │ │ │ +
    @ FAR_RUNTIME_ERROR
    Issue a generic runtime error, but continue execution.
    Definition error.h:40
    │ │ │ │ │ │ │ │ -
    std::vector< PatchArray > PatchArrayVector
    Definition types.h:132
    │ │ │ │ - │ │ │ │ -
    An quadtree-based map connecting coarse faces to their sub-patches.
    Definition patchMap.h:49
    │ │ │ │ - │ │ │ │ -
    Container for arrays of parametric patches.
    Definition patchTable.h:55
    │ │ │ │ -
    ConstIndexArray GetPatchArrayVaryingVertices(int array) const
    Returns the varying vertex indices for the patches in array.
    │ │ │ │ - │ │ │ │ -
    PatchVertsTable const & GetPatchControlVerticesTable() const
    Get the table of patch control vertices.
    Definition patchTable.h:378
    │ │ │ │ -
    void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) const
    Updates local point face-varying values.
    Definition patchTable.h:796
    │ │ │ │ -
    ConstIndexArray GetVaryingVertices() const
    Returns an array of varying vertex indices for the patches.
    │ │ │ │ -
    void ComputeLocalPointValuesVarying(T const *src, T *dst) const
    Updates local point varying values.
    Definition patchTable.h:787
    │ │ │ │ -
    ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const
    Returns the varying vertex indices for a given patch.
    │ │ │ │ -
    bool IsFeatureAdaptive() const
    True if the patches are of feature adaptive types.
    │ │ │ │ -
    int GetMaxValence() const
    Returns max vertex valence.
    Definition patchTable.h:92
    │ │ │ │ -
    StencilTableReal< REAL > const * GetLocalPointStencilTable() const
    Returns the stencil table to compute local point vertex values.
    │ │ │ │ -
    StencilTable const * GetLocalPointStencilTable() const
    Returns the stencil table to compute local point vertex values.
    Definition patchTable.h:730
    │ │ │ │ -
    PatchParamArray getPatchParams(int arrayIndex)
    │ │ │ │ -
    ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const
    Returns the value indices for the patches in array in channel.
    │ │ │ │ -
    std::vector< float > const & GetSharpnessValues() const
    Returns sharpness values table.
    Definition patchTable.h:387
    │ │ │ │ - │ │ │ │ -
    PatchParam GetPatchFVarPatchParam(int array, int patch, int channel=0) const
    Returns the face-varying params for a given patch channel.
    │ │ │ │ -
    ConstIndexArray GetPatchVaryingVertices(int array, int patch) const
    Returns the varying vertex indices for a given patch.
    │ │ │ │ -
    PatchTable(PatchTable const &src)
    Copy constructor.
    │ │ │ │ -
    int GetNumPatchArrays() const
    Returns the number of patch arrays in the table.
    │ │ │ │ -
    ConstIndexArray GetPatchVertices(PatchHandle const &handle) const
    Returns the control vertex indices for the patch identified by handle.
    │ │ │ │ - │ │ │ │ -
    bool LocalPointFaceVaryingStencilPrecisionMatchesType() const
    Tests if the precision of the stencil table to compute local point face-varying values matches the gi...
    │ │ │ │ -
    PatchParamTable const & GetPatchParamTable() const
    Returns the PatchParamTable (PatchParams order matches patch array sorting)
    Definition patchTable.h:381
    │ │ │ │ -
    VertexValenceTable const & GetVertexValenceTable() const
    Returns the 'VertexValences' table (vertex neighborhoods table)
    Definition patchTable.h:267
    │ │ │ │ -
    StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
    Returns the stencil table to compute local point face-varying values.
    Definition patchTable.h:741
    │ │ │ │ -
    int GetNumControlVertices(int array) const
    Returns the number of control vertices in array.
    │ │ │ │ - │ │ │ │ -
    void EvaluateBasisFaceVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0, int channel=0) const
    Evaluate basis functions for a face-varying value and derivatives at a given (u,v) parametric locatio...
    │ │ │ │ -
    ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const
    Returns the 'QuadOffsets' for the Gregory patch identified by handle.
    │ │ │ │ -
    PatchDescriptor GetFVarPatchDescriptorIrregular(int channel=0) const
    Returns the irregular patch descriptor for channel.
    │ │ │ │ -
    float GetSingleCreasePatchSharpnessValue(int array, int patch) const
    Returns the crease sharpness for the patch in array if it is a single-crease patch,...
    │ │ │ │ - │ │ │ │ -
    void ComputeLocalPointValues(T const *src, T *dst) const
    Updates local point vertex values.
    Definition patchTable.h:778
    │ │ │ │ -
    float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const
    Returns the crease sharpness for the patch identified by handle if it is a single-crease patch,...
    │ │ │ │ -
    PatchParam GetPatchParam(int array, int patch) const
    Returns the PatchParam for patch in array.
    │ │ │ │ -
    ConstIndexArray GetPatchFVarValues(int array, int patch, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ -
    PatchDescriptor GetFVarPatchDescriptorRegular(int channel=0) const
    Returns the regular patch descriptor for channel.
    │ │ │ │ -
    PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const
    Returns the PatchDescriptor for the patch identified by handle.
    │ │ │ │ - │ │ │ │ -
    QuadOffsetsTable const & GetQuadOffsetsTable() const
    Returns the quad-offsets table.
    Definition patchTable.h:392
    │ │ │ │ -
    int GetNumPatches(int array) const
    Returns the number of patches in array.
    │ │ │ │ -
    PatchDescriptor GetVaryingPatchDescriptor() const
    Returns the varying patch descriptor.
    │ │ │ │ -
    ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ -
    ConstPatchParamArray const GetPatchParams(int array) const
    Returns the PatchParams for the patches in array.
    │ │ │ │ -
    int GetNumControlVerticesTotal() const
    Returns the total number of control vertex indices in the table.
    Definition patchTable.h:84
    │ │ │ │ -
    int GetNumFVarChannels() const
    Returns the number of face-varying channels.
    │ │ │ │ -
    ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) const
    Returns the face-varying for a given patch in array in channel.
    │ │ │ │ -
    Index getPatchIndex(int array, int patch) const
    │ │ │ │ -
    int GetNumLocalPoints() const
    Returns the number of local vertex points.
    │ │ │ │ -
    bool LocalPointVaryingStencilPrecisionMatchesType() const
    Tests if the precision of the stencil table to compute local point varying values matches the given f...
    │ │ │ │ -
    ConstIndexArray GetPatchArrayVertices(int array) const
    Returns the control vertex indices for the patches in array.
    │ │ │ │ -
    int GetNumPtexFaces() const
    Returns the total number of ptex faces in the mesh.
    Definition patchTable.h:95
    │ │ │ │ -
    ConstIndexArray GetFVarValues(int channel=0) const
    Returns an array of value indices for the patches in channel.
    │ │ │ │ -
    Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
    Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
    Definition patchTable.h:259
    │ │ │ │ -
    void EvaluateBasis(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
    Evaluate basis functions for position and derivatives at a given (u,v) parametric location of a patch...
    │ │ │ │ -
    StencilTableReal< REAL > const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
    Returns the stencil table to compute local point face-varying values.
    │ │ │ │ -
    int GetNumPatchesTotal() const
    Returns the total number of patches stored in the table.
    │ │ │ │ -
    PatchParam GetPatchParam(PatchHandle const &handle) const
    Returns a PatchParam for the patch identified by handle.
    │ │ │ │ - │ │ │ │ -
    Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel=0) const
    Deprecated.
    │ │ │ │ -
    std::vector< Index > const & GetSharpnessIndexTable() const
    Returns a sharpness index table for each patch (if exists)
    Definition patchTable.h:384
    │ │ │ │ -
    PatchDescriptor GetPatchArrayDescriptor(int array) const
    Returns the PatchDescriptor for the patches in array.
    │ │ │ │ - │ │ │ │ -
    void EvaluateBasisVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
    Evaluate basis functions for a varying value and derivatives at a given (u,v) parametric location of ...
    │ │ │ │ -
    StencilTable const * GetLocalPointVaryingStencilTable() const
    Returns the stencil table to compute local point varying values.
    Definition patchTable.h:735
    │ │ │ │ -
    std::vector< unsigned int > QuadOffsetsTable
    Definition patchTable.h:389
    │ │ │ │ -
    ConstIndexArray GetPatchVertices(int array, int patch) const
    Returns the control vertex indices for patch in array.
    │ │ │ │ -
    PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) const
    Returns the value indices for a given patch in channel.
    │ │ │ │ -
    int GetFVarValueStride(int channel=0) const
    Returns the stride between patches in the value index array of channel.
    │ │ │ │ -
    ConstPatchParamArray GetFVarPatchParams(int channel=0) const
    Returns an array of face-varying patch param for channel.
    │ │ │ │ -
    PatchDescriptor GetFVarPatchDescriptor(int channel=0) const
    Returns the default/irregular patch descriptor for channel.
    │ │ │ │ -
    int GetNumLocalPointsVarying() const
    Returns the number of local varying points.
    │ │ │ │ -
    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.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
    SchemeType
    Enumerated type for all subdivision schemes supported by OpenSubdiv.
    Definition types.h:37
    │ │ │ │ + │ │ │ │ +
    Factory for constructing TopologyRefiners from specific mesh classes.
    │ │ │ │ +
    static int getNumBaseFaces(TopologyRefiner const &newRefiner)
    │ │ │ │ +
    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 LocalIndexArray getBaseVertexFaceLocalIndices(TopologyRefiner &newRefiner, Index v)
    Assign the local indices of a vertex within each of its incident faces.
    │ │ │ │ +
    static int getNumBaseVertices(TopologyRefiner const &newRefiner)
    │ │ │ │ +
    static void setNumBaseEdgeFaces(TopologyRefiner &newRefiner, Index e, int count)
    Specify the number of faces incident each edge.
    │ │ │ │ +
    static IndexArray getBaseFaceVertices(TopologyRefiner &newRefiner, Index f)
    Assign the vertices incident each face.
    │ │ │ │ +
    static LocalIndexArray getBaseEdgeFaceLocalIndices(TopologyRefiner &newRefiner, Index e)
    Assign the local indices of an edge within each of its incident faces.
    │ │ │ │ +
    static bool populateBaseLevel(TopologyRefiner &refiner, MESH const &mesh, Options options)
    │ │ │ │ +
    static void populateBaseLocalIndices(TopologyRefiner &newRefiner)
    Determine all local indices by inspection (only for pure manifold meshes)
    │ │ │ │ +
    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 void setNumBaseVertexEdges(TopologyRefiner &newRefiner, Index v, int count)
    Specify the number of edges incident each vertex.
    │ │ │ │ + │ │ │ │ +
    static IndexArray getBaseFaceFVarValues(TopologyRefiner &newRefiner, Index face, int channel=0)
    Assign the face-varying values for the corners of each face.
    │ │ │ │ +
    static IndexArray getBaseEdgeFaces(TopologyRefiner &newRefiner, Index e)
    Assign the faces incident each edge.
    │ │ │ │ +
    static void setNumBaseVertexFaces(TopologyRefiner &newRefiner, Index v, int count)
    Specify the number of faces incident each vertex.
    │ │ │ │ +
    static bool assignFaceVaryingTopology(TopologyRefiner &newRefiner, MESH const &mesh)
    (Optional) Specify face-varying data per face
    │ │ │ │ +
    static void setBaseVertexSharpness(TopologyRefiner &newRefiner, Index v, float sharpness)
    Assign a sharpness value to a given vertex.
    │ │ │ │ +
    static LocalIndexArray getBaseVertexEdgeLocalIndices(TopologyRefiner &newRefiner, Index v)
    Assign the local indices of a vertex within each of its incident edges.
    │ │ │ │ +
    static IndexArray getBaseEdgeVertices(TopologyRefiner &newRefiner, Index e)
    Assign the vertices incident each edge.
    │ │ │ │ +
    static IndexArray getBaseVertexFaces(TopologyRefiner &newRefiner, Index v)
    Assign the faces incident each vertex.
    │ │ │ │ +
    static void setBaseVertexNonManifold(TopologyRefiner &newRefiner, Index v, bool b)
    Tag a vertex as non-manifold.
    │ │ │ │ +
    static void setNumBaseFaces(TopologyRefiner &newRefiner, int count)
    Specify the number of faces to be accommodated.
    │ │ │ │ +
    static IndexArray getBaseFaceEdges(TopologyRefiner &newRefiner, Index f)
    Assign the edges incident each face.
    │ │ │ │ +
    static void setNumBaseFaceVertices(TopologyRefiner &newRefiner, Index f, int count)
    Specify the number of vertices incident each face.
    │ │ │ │ +
    static void setBaseEdgeSharpness(TopologyRefiner &newRefiner, Index e, float sharpness)
    Assign a sharpness value to a given edge.
    │ │ │ │ +
    static void setBaseEdgeNonManifold(TopologyRefiner &newRefiner, Index e, bool b)
    Tag an edge as non-manifold.
    │ │ │ │ +
    static void setNumBaseEdges(TopologyRefiner &newRefiner, int count)
    Specify the number of edges to be accommodated.
    │ │ │ │ +
    static TopologyRefiner * Create(MESH const &mesh, Options options=Options())
    Instantiates a TopologyRefiner from client-provided topological representation.
    │ │ │ │ +
    static Index findBaseEdge(TopologyRefiner const &newRefiner, Index v0, Index v1)
    Identify an edge to be assigned a sharpness value given a vertex pair.
    │ │ │ │ +
    static IndexArray getBaseVertexEdges(TopologyRefiner &newRefiner, Index v)
    Assign the edges incident each vertex.
    │ │ │ │ +
    static int createBaseFVarChannel(TopologyRefiner &newRefiner, int numValues)
    Create a new face-varying channel with the given number of values.
    │ │ │ │ +
    static int getNumBaseEdges(TopologyRefiner const &newRefiner)
    │ │ │ │ +
    static void setNumBaseVertices(TopologyRefiner &newRefiner, int count)
    Specify the number of vertices to be accommodated.
    │ │ │ │ +
    static void setBaseFaceHole(TopologyRefiner &newRefiner, Index f, bool isHole)
    Tag a face as a hole.
    │ │ │ │ +
    Stores topology data for a specified set of refinement options.
    │ │ │ │ +
    Private base class of Factories for constructing TopologyRefiners.
    │ │ │ │ +
    static bool prepareComponentTopologyAssignment(TopologyRefiner &refiner, bool fullValidation, TopologyCallback callback, void const *callbackData)
    │ │ │ │ + │ │ │ │ +
    static bool prepareComponentTagsAndSharpness(TopologyRefiner &refiner)
    │ │ │ │ +
    static bool prepareComponentTopologySizing(TopologyRefiner &refiner)
    │ │ │ │ +
    static bool prepareFaceVaryingChannels(TopologyRefiner &refiner)
    │ │ │ │ +
    Options related to the construction of each TopologyRefiner.
    │ │ │ │ +
    Options(Sdc::SchemeType sdcType=Sdc::SCHEME_CATMARK, Sdc::Options sdcOptions=Sdc::Options())
    │ │ │ │ + │ │ │ │ +
    Sdc::SchemeType schemeType
    The subdivision scheme type identifier.
    │ │ │ │ + │ │ │ │ +
    All supported options applying to subdivision scheme.
    Definition options.h:51
    │ │ │ │ +
    void SetFVarLinearInterpolation(FVarLinearInterpolation b)
    Set face-varying interpolation rule.
    Definition options.h:98
    │ │ │ │ +
    FVarLinearInterpolation GetFVarLinearInterpolation() const
    Get face-varying interpolation rule.
    Definition options.h:95
    │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -patchTable.h │ │ │ │ │ +topologyRefinerFactory.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,946 +23,931 @@ │ │ │ │ │ 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_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_PATCH_TABLE_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include "../far/patchDescriptor.h" │ │ │ │ │ -31#include "../far/patchParam.h" │ │ │ │ │ -32#include "../far/stencilTable.h" │ │ │ │ │ +24#ifndef OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H │ │ │ │ │ +25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_FACTORY_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../far/topologyRefiner.h" │ │ │ │ │ +30#include "../far/error.h" │ │ │ │ │ +31 │ │ │ │ │ +32#include │ │ │ │ │ 33 │ │ │ │ │ -34#include "../sdc/options.h" │ │ │ │ │ -35 │ │ │ │ │ -36#include │ │ │ │ │ -37 │ │ │ │ │ -38namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -39namespace OPENSUBDIV_VERSION { │ │ │ │ │ -40 │ │ │ │ │ -41namespace Far { │ │ │ │ │ -42 │ │ │ │ │ -_5_5class _P_a_t_c_h_T_a_b_l_e { │ │ │ │ │ -56 │ │ │ │ │ -57public: │ │ │ │ │ -58 │ │ │ │ │ -_6_0 class _P_a_t_c_h_H_a_n_d_l_e { │ │ │ │ │ -61 // XXXX manuelk members will eventually be made private │ │ │ │ │ -62 public: │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Far { │ │ │ │ │ +38 │ │ │ │ │ +46// │ │ │ │ │ +_4_7class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ +48protected: │ │ │ │ │ +49 │ │ │ │ │ +50 // │ │ │ │ │ +51 // Protected methods invoked by the subclass template to verify and process │ │ │ │ │ +each │ │ │ │ │ +52 // stage of construction implemented by the subclass: │ │ │ │ │ +53 // │ │ │ │ │ +_5_4 typedef Vtr::internal::Level::ValidationCallback _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k; │ │ │ │ │ +55 │ │ │ │ │ +_5_6 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_S_i_z_i_n_g(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ +_5_7 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_A_s_s_i_g_n_m_e_n_t(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, │ │ │ │ │ +bool fullValidation, │ │ │ │ │ +58 _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k callback, void const * callbackData); │ │ │ │ │ +_5_9 static bool _p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_a_g_s_A_n_d_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ +_6_0 static bool _p_r_e_p_a_r_e_F_a_c_e_V_a_r_y_i_n_g_C_h_a_n_n_e_l_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner); │ │ │ │ │ +61}; │ │ │ │ │ +62 │ │ │ │ │ 63 │ │ │ │ │ -_6_4 friend class _P_a_t_c_h_T_a_b_l_e; │ │ │ │ │ -_6_5 friend class _P_a_t_c_h_M_a_p; │ │ │ │ │ -66 │ │ │ │ │ -_6_7 _I_n_d_e_x _a_r_r_a_y_I_n_d_e_x, // Array index of the patch │ │ │ │ │ -_6_8 _p_a_t_c_h_I_n_d_e_x, // Absolute Index of the patch │ │ │ │ │ -_6_9 _v_e_r_t_I_n_d_e_x; // Relative offset to the first CV of the patch in array │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72public: │ │ │ │ │ -73 │ │ │ │ │ -_7_5 _P_a_t_c_h_T_a_b_l_e(_P_a_t_c_h_T_a_b_l_e const & src); │ │ │ │ │ -76 │ │ │ │ │ -_7_8 _~_P_a_t_c_h_T_a_b_l_e(); │ │ │ │ │ +77template │ │ │ │ │ +_7_8class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y : public _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e { │ │ │ │ │ 79 │ │ │ │ │ -_8_1 bool _I_s_F_e_a_t_u_r_e_A_d_a_p_t_i_v_e() const; │ │ │ │ │ -82 │ │ │ │ │ -_8_4 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_o_t_a_l() const { │ │ │ │ │ -85 return (int)_patchVerts.size(); │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -_8_9 int _G_e_t_N_u_m_P_a_t_c_h_e_s_T_o_t_a_l() const; │ │ │ │ │ +80public: │ │ │ │ │ +81 │ │ │ │ │ +_8_4 struct _O_p_t_i_o_n_s { │ │ │ │ │ +85 │ │ │ │ │ +_8_6 _O_p_t_i_o_n_s(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e sdcType = _S_d_c_:_:_S_C_H_E_M_E___C_A_T_M_A_R_K, _S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ +sdcOptions = _S_d_c_:_:_O_p_t_i_o_n_s()) : │ │ │ │ │ +87 _s_c_h_e_m_e_T_y_p_e(sdcType), │ │ │ │ │ +88 _s_c_h_e_m_e_O_p_t_i_o_n_s(sdcOptions), │ │ │ │ │ +89 _v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y(false) { } │ │ │ │ │ 90 │ │ │ │ │ -_9_2 int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ -93 │ │ │ │ │ -_9_5 int _G_e_t_N_u_m_P_t_e_x_F_a_c_e_s() const { return _numPtexFaces; } │ │ │ │ │ -96 │ │ │ │ │ -97 │ │ │ │ │ -99 │ │ │ │ │ -105 │ │ │ │ │ -_1_0_7 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ -108 │ │ │ │ │ -_1_1_0 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ -111 │ │ │ │ │ -_1_1_3 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_P_a_r_a_m(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ +_9_1 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _s_c_h_e_m_e_T_y_p_e; │ │ │ │ │ +_9_2 _S_d_c_:_:_O_p_t_i_o_n_s _s_c_h_e_m_e_O_p_t_i_o_n_s; │ │ │ │ │ +_9_4 unsigned int _v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y : 1; │ │ │ │ │ +97 }; │ │ │ │ │ +98 │ │ │ │ │ +108 // │ │ │ │ │ +113 static _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* _C_r_e_a_t_e(MESH const& mesh, _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s │ │ │ │ │ +()); │ │ │ │ │ 114 │ │ │ │ │ -_1_1_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s(int array, int patch) const; │ │ │ │ │ -117 │ │ │ │ │ -_1_1_9 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_P_a_r_a_m(int array, int patch) const; │ │ │ │ │ -121 │ │ │ │ │ -122 │ │ │ │ │ -124 │ │ │ │ │ -130 │ │ │ │ │ -_1_3_2 int _G_e_t_N_u_m_P_a_t_c_h_A_r_r_a_y_s() const; │ │ │ │ │ -133 │ │ │ │ │ -_1_3_5 int _G_e_t_N_u_m_P_a_t_c_h_e_s(int array) const; │ │ │ │ │ -136 │ │ │ │ │ -_1_3_8 int _G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ -139 │ │ │ │ │ -_1_4_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_P_a_t_c_h_A_r_r_a_y_D_e_s_c_r_i_p_t_o_r(int array) const; │ │ │ │ │ -142 │ │ │ │ │ -_1_4_4 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ -145 │ │ │ │ │ -_1_4_7 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y const _G_e_t_P_a_t_c_h_P_a_r_a_m_s(int array) const; │ │ │ │ │ +128 static _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* _C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & baseLevel); │ │ │ │ │ +129 │ │ │ │ │ +130protected: │ │ │ │ │ +_1_3_1 typedef Vtr::internal::Level::TopologyError _T_o_p_o_l_o_g_y_E_r_r_o_r; │ │ │ │ │ +132 │ │ │ │ │ +134 │ │ │ │ │ 149 │ │ │ │ │ -150 │ │ │ │ │ +151 static bool _r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ +const& mesh); │ │ │ │ │ 152 │ │ │ │ │ +155 static bool _a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ +const& mesh); │ │ │ │ │ +156 │ │ │ │ │ +158 static bool _a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH const& │ │ │ │ │ +mesh); │ │ │ │ │ 159 │ │ │ │ │ -_1_6_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s() const; │ │ │ │ │ +161 static bool _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(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& newRefiner, MESH │ │ │ │ │ +const& mesh); │ │ │ │ │ 162 │ │ │ │ │ -164 _S_t_e_n_c_i_l_T_a_b_l_e const *_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() const; │ │ │ │ │ +164 static void _r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y(TopologyError errCode, char const * msg, │ │ │ │ │ +MESH const& mesh); │ │ │ │ │ 165 │ │ │ │ │ -167 template │ │ │ │ │ -_1_6_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *_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() const; │ │ │ │ │ -169 │ │ │ │ │ -_1_7_2 template bool _L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e() │ │ │ │ │ -const; │ │ │ │ │ -173 │ │ │ │ │ -186 template void │ │ │ │ │ -187 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s(T const *src, T *dst) const; │ │ │ │ │ -188 │ │ │ │ │ -189 │ │ │ │ │ -_1_9_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s_V_a_r_y_i_n_g() const; │ │ │ │ │ -192 │ │ │ │ │ -194 _S_t_e_n_c_i_l_T_a_b_l_e const *_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() const; │ │ │ │ │ -195 │ │ │ │ │ -197 template │ │ │ │ │ -_1_9_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const *_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() const; │ │ │ │ │ +167 │ │ │ │ │ +168protected: │ │ │ │ │ +170 │ │ │ │ │ +187 │ │ │ │ │ +189 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ +190 │ │ │ │ │ +192 static void _s_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ +193 │ │ │ │ │ +195 static void _s_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int count); │ │ │ │ │ +196 │ │ │ │ │ +198 static void _s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f, │ │ │ │ │ +int count); │ │ │ │ │ 199 │ │ │ │ │ -_2_0_2 template bool _L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ -() const; │ │ │ │ │ -203 │ │ │ │ │ -216 template void │ │ │ │ │ -217 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g(T const *src, T *dst) const; │ │ │ │ │ -218 │ │ │ │ │ -219 │ │ │ │ │ -_2_2_1 int _G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s_F_a_c_e_V_a_r_y_i_n_g(int channel = 0) const; │ │ │ │ │ -222 │ │ │ │ │ -224 _S_t_e_n_c_i_l_T_a_b_l_e const *_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel = 0) │ │ │ │ │ -const; │ │ │ │ │ -225 │ │ │ │ │ -227 template │ │ │ │ │ -_2_2_8 _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * _G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int │ │ │ │ │ -channel = 0) const; │ │ │ │ │ -229 │ │ │ │ │ -_2_3_2 template bool │ │ │ │ │ -_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e() const; │ │ │ │ │ -233 │ │ │ │ │ -248 template void │ │ │ │ │ -249 _C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g(T const *src, T *dst, int channel = 0) │ │ │ │ │ -const; │ │ │ │ │ -251 │ │ │ │ │ +201 static void _s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, int │ │ │ │ │ +count); │ │ │ │ │ +202 │ │ │ │ │ +204 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ +int count); │ │ │ │ │ +205 │ │ │ │ │ +207 static void _s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ +int count); │ │ │ │ │ +208 │ │ │ │ │ +209 static int _g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ +210 static int _g_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ +211 static int _g_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner); │ │ │ │ │ +213 │ │ │ │ │ +215 │ │ │ │ │ +237 │ │ │ │ │ +239 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ +f); │ │ │ │ │ +240 │ │ │ │ │ +242 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f); │ │ │ │ │ +243 │ │ │ │ │ +245 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ +e); │ │ │ │ │ +246 │ │ │ │ │ +248 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e); │ │ │ │ │ +249 │ │ │ │ │ +251 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ +v); │ │ │ │ │ 252 │ │ │ │ │ -254 │ │ │ │ │ +254 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ +v); │ │ │ │ │ 255 │ │ │ │ │ -_2_5_9 typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_u_n_s_i_g_n_e_d_ _i_n_t_> _C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y; │ │ │ │ │ -260 │ │ │ │ │ -_2_6_2 _C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y _G_e_t_P_a_t_c_h_Q_u_a_d_O_f_f_s_e_t_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) │ │ │ │ │ -const; │ │ │ │ │ -263 │ │ │ │ │ -_2_6_4 typedef std::vector _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e; │ │ │ │ │ +257 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v); │ │ │ │ │ +259 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v); │ │ │ │ │ +261 static _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e); │ │ │ │ │ +262 │ │ │ │ │ +264 static void _p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner); │ │ │ │ │ 265 │ │ │ │ │ -_2_6_7 _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e const & _G_e_t_V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e() const { │ │ │ │ │ -268 return _vertexValenceTable; │ │ │ │ │ -269 } │ │ │ │ │ -271 │ │ │ │ │ +267 static void _s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, │ │ │ │ │ +bool b); │ │ │ │ │ +268 │ │ │ │ │ +270 static void _s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ +bool b); │ │ │ │ │ 272 │ │ │ │ │ 274 │ │ │ │ │ -280 │ │ │ │ │ -_2_8_3 float _G_e_t_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ -284 │ │ │ │ │ -_2_8_7 float _G_e_t_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e(int array, int patch) const; │ │ │ │ │ +283 │ │ │ │ │ +285 static _I_n_d_e_x _f_i_n_d_B_a_s_e_E_d_g_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & newRefiner, _I_n_d_e_x v0, │ │ │ │ │ +_I_n_d_e_x v1); │ │ │ │ │ +286 │ │ │ │ │ +288 static void _s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x e, │ │ │ │ │ +float sharpness); │ │ │ │ │ 289 │ │ │ │ │ -290 │ │ │ │ │ +291 static void _s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x v, │ │ │ │ │ +float sharpness); │ │ │ │ │ 292 │ │ │ │ │ +294 static void _s_e_t_B_a_s_e_F_a_c_e_H_o_l_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x f, bool │ │ │ │ │ +isHole); │ │ │ │ │ +296 │ │ │ │ │ 298 │ │ │ │ │ -_3_0_0 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_V_a_r_y_i_n_g_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r() const; │ │ │ │ │ -301 │ │ │ │ │ -_3_0_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle) const; │ │ │ │ │ -304 │ │ │ │ │ -_3_0_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(int array, int patch) const; │ │ │ │ │ -307 │ │ │ │ │ -_3_0_9 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s(int array) const; │ │ │ │ │ -310 │ │ │ │ │ -_3_1_2 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s() const; │ │ │ │ │ +308 │ │ │ │ │ +310 static int _c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int │ │ │ │ │ +numValues); │ │ │ │ │ +311 │ │ │ │ │ +313 static int _c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, int │ │ │ │ │ +numValues, _S_d_c_:_:_O_p_t_i_o_n_s const& fvarOptions); │ │ │ │ │ 314 │ │ │ │ │ -315 │ │ │ │ │ +316 static _I_n_d_e_x_A_r_r_a_y _g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, _I_n_d_e_x │ │ │ │ │ +face, int channel = 0); │ │ │ │ │ 317 │ │ │ │ │ -323 │ │ │ │ │ -_3_2_5 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const; │ │ │ │ │ -326 │ │ │ │ │ -_3_2_8 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_R_e_g_u_l_a_r(int channel = 0) const; │ │ │ │ │ -329 │ │ │ │ │ -_3_3_1 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_I_r_r_e_g_u_l_a_r(int channel = 0) const; │ │ │ │ │ -332 │ │ │ │ │ -_3_3_4 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r _G_e_t_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r(int channel = 0) const; │ │ │ │ │ -335 │ │ │ │ │ -_3_3_7 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, int channel │ │ │ │ │ -= 0) const; │ │ │ │ │ -338 │ │ │ │ │ -_3_4_0 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s(int array, int patch, int channel = 0) │ │ │ │ │ -const; │ │ │ │ │ -341 │ │ │ │ │ -_3_4_3 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_F_V_a_r_V_a_l_u_e_s(int array, int channel = 0) const; │ │ │ │ │ -344 │ │ │ │ │ -_3_4_6 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y _G_e_t_F_V_a_r_V_a_l_u_e_s(int channel = 0) const; │ │ │ │ │ +319 │ │ │ │ │ +320protected: │ │ │ │ │ +321 // │ │ │ │ │ +322 // Not to be specialized: │ │ │ │ │ +323 // │ │ │ │ │ +324 static bool _p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, MESH const& mesh, │ │ │ │ │ +_O_p_t_i_o_n_s options); │ │ │ │ │ +325 │ │ │ │ │ +326private: │ │ │ │ │ +327 // │ │ │ │ │ +328 // An oversight in the interfaces of the error reporting function between │ │ │ │ │ +the factory │ │ │ │ │ +329 // class and the Vtr::Level requires this adapter function to avoid │ │ │ │ │ +warnings. │ │ │ │ │ +330 // │ │ │ │ │ +331 // The static class method requires a reference as the MESH argument, but │ │ │ │ │ +the interface │ │ │ │ │ +332 // for Vtr::Level requires a pointer (void*). So this adapter with a MESH* │ │ │ │ │ +argument is │ │ │ │ │ +333 // used to effectively cast the function pointer required by Vtr::Level │ │ │ │ │ +error reporting: │ │ │ │ │ +334 // │ │ │ │ │ +335 static void reportInvalidTopologyAdapter(TopologyError errCode, char const │ │ │ │ │ +* msg, MESH const * mesh) { │ │ │ │ │ +336 _r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y(errCode, msg, *mesh); │ │ │ │ │ +337 } │ │ │ │ │ +338}; │ │ │ │ │ +339 │ │ │ │ │ +340 │ │ │ │ │ +341// │ │ │ │ │ +342// Generic implementations: │ │ │ │ │ +343// │ │ │ │ │ +344template │ │ │ │ │ +345TopologyRefiner* │ │ │ │ │ +_3_4_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_C_r_e_a_t_e(MESH const& mesh, _O_p_t_i_o_n_s options) { │ │ │ │ │ 347 │ │ │ │ │ -_3_4_9 int _G_e_t_F_V_a_r_V_a_l_u_e_S_t_r_i_d_e(int channel = 0) const; │ │ │ │ │ -350 │ │ │ │ │ -_3_5_2 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m(_P_a_t_c_h_H_a_n_d_l_e const & handle, int channel = │ │ │ │ │ -0) const; │ │ │ │ │ -353 │ │ │ │ │ -_3_5_5 _P_a_t_c_h_P_a_r_a_m _G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m(int array, int patch, int channel = 0) │ │ │ │ │ -const; │ │ │ │ │ -356 │ │ │ │ │ -_3_5_8 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _G_e_t_P_a_t_c_h_A_r_r_a_y_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s(int array, int channel = │ │ │ │ │ -0) const; │ │ │ │ │ -359 │ │ │ │ │ -_3_6_1 _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _G_e_t_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s(int channel = 0) const; │ │ │ │ │ -362 │ │ │ │ │ -_3_6_4 _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 _G_e_t_F_V_a_r_C_h_a_n_n_e_l_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n(int │ │ │ │ │ -channel = 0) const; │ │ │ │ │ -366 │ │ │ │ │ -367 │ │ │ │ │ -369 │ │ │ │ │ -374 │ │ │ │ │ -_3_7_5 typedef std::vector _P_a_t_c_h_V_e_r_t_s_T_a_b_l_e; │ │ │ │ │ -376 │ │ │ │ │ -_3_7_8 _P_a_t_c_h_V_e_r_t_s_T_a_b_l_e const & _G_e_t_P_a_t_c_h_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_a_b_l_e() const { return │ │ │ │ │ -_patchVerts; } │ │ │ │ │ -379 │ │ │ │ │ -_3_8_1 _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e const & _G_e_t_P_a_t_c_h_P_a_r_a_m_T_a_b_l_e() const { return _paramTable; } │ │ │ │ │ -382 │ │ │ │ │ -_3_8_4 std::vector const &_G_e_t_S_h_a_r_p_n_e_s_s_I_n_d_e_x_T_a_b_l_e() const { return │ │ │ │ │ -_sharpnessIndices; } │ │ │ │ │ -385 │ │ │ │ │ -_3_8_7 std::vector const &_G_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s() const { return │ │ │ │ │ -_sharpnessValues; } │ │ │ │ │ -388 │ │ │ │ │ -_3_8_9 typedef std::vector _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e; │ │ │ │ │ -390 │ │ │ │ │ -_3_9_2 _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e const & _G_e_t_Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e() const { │ │ │ │ │ -393 return _quadOffsetsTable; │ │ │ │ │ -394 } │ │ │ │ │ -396 │ │ │ │ │ -_3_9_8 void _p_r_i_n_t() const; │ │ │ │ │ -399 │ │ │ │ │ -400public: │ │ │ │ │ +348 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r * refiner = new _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(options._s_c_h_e_m_e_T_y_p_e, │ │ │ │ │ +options._s_c_h_e_m_e_O_p_t_i_o_n_s); │ │ │ │ │ +349 │ │ │ │ │ +350 if (! populateBaseLevel(*refiner, mesh, options)) { │ │ │ │ │ +351 delete refiner; │ │ │ │ │ +352 return 0; │ │ │ │ │ +353 } │ │ │ │ │ +354 │ │ │ │ │ +355 // Eventually want to move the Refiner's inventory initialization here. │ │ │ │ │ +Currently it │ │ │ │ │ +356 // is handled after topology assignment, but if the inventory is to include │ │ │ │ │ +additional │ │ │ │ │ +357 // features (e.g. holes, etc.) it is better off deferred to here. │ │ │ │ │ +358 │ │ │ │ │ +359 return refiner; │ │ │ │ │ +360} │ │ │ │ │ +361 │ │ │ │ │ +362template │ │ │ │ │ +363_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r* │ │ │ │ │ +_3_6_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & source) { │ │ │ │ │ +365 │ │ │ │ │ +366 return new _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(source); │ │ │ │ │ +367} │ │ │ │ │ +368 │ │ │ │ │ +369template │ │ │ │ │ +370bool │ │ │ │ │ +_3_7_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& refiner, │ │ │ │ │ +MESH const& mesh, _O_p_t_i_o_n_s options) { │ │ │ │ │ +372 │ │ │ │ │ +373 // │ │ │ │ │ +374 // Construction of a specialized topology refiner involves four steps, each │ │ │ │ │ +of which │ │ │ │ │ +375 // involves a method specialized for MESH followed by one that takes an │ │ │ │ │ +action in │ │ │ │ │ +376 // response to it or in preparation for the next step. │ │ │ │ │ +377 // │ │ │ │ │ +378 // Both the specialized methods and those that follow them may find fault │ │ │ │ │ +in the │ │ │ │ │ +379 // construction and trigger failure at any time: │ │ │ │ │ +380 // │ │ │ │ │ +381 │ │ │ │ │ +382 // │ │ │ │ │ +383 // Sizing of the topology -- this is a required specialization for MESH. │ │ │ │ │ +This defines │ │ │ │ │ +384 // an inventory of all components and their relations that is used to │ │ │ │ │ +allocate buffers │ │ │ │ │ +385 // to be efficiently populated in the subsequent topology assignment step. │ │ │ │ │ +386 // │ │ │ │ │ +387 if (! resizeComponentTopology(refiner, mesh)) return false; │ │ │ │ │ +388 if (! prepareComponentTopologySizing(refiner)) return false; │ │ │ │ │ +389 │ │ │ │ │ +390 // │ │ │ │ │ +391 // Assignment of the topology -- this is a required specialization for │ │ │ │ │ +MESH. If edges │ │ │ │ │ +392 // are specified, all other topological relations are expected to be │ │ │ │ │ +defined for them. │ │ │ │ │ +393 // Otherwise edges and remaining topology will be completed from the face- │ │ │ │ │ +vertices: │ │ │ │ │ +394 // │ │ │ │ │ +395 bool validate = options._v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y; │ │ │ │ │ +396 _T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k callback = reinterpret_cast<_T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k> │ │ │ │ │ +(reportInvalidTopologyAdapter); │ │ │ │ │ +397 void const * userData = &mesh; │ │ │ │ │ +398 │ │ │ │ │ +399 if (! assignComponentTopology(refiner, mesh)) return false; │ │ │ │ │ +400 if (! prepareComponentTopologyAssignment(refiner, validate, callback, │ │ │ │ │ +userData)) return false; │ │ │ │ │ 401 │ │ │ │ │ -403 │ │ │ │ │ -405 │ │ │ │ │ -428 template │ │ │ │ │ -_4_2_9 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ -430 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ -431 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const; │ │ │ │ │ -432 │ │ │ │ │ -435 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ -436 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ -437 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const; │ │ │ │ │ -438 │ │ │ │ │ -441 void _E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ -442 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ -443 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const; │ │ │ │ │ -444 │ │ │ │ │ -467 template │ │ │ │ │ -_4_6_8 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ -469 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ -470 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const; │ │ │ │ │ +402 // │ │ │ │ │ +403 // User assigned and internal tagging of components -- an optional │ │ │ │ │ +specialization for │ │ │ │ │ +404 // MESH. Allows the specification of sharpness values, holes, etc. │ │ │ │ │ +405 // │ │ │ │ │ +406 if (! assignComponentTags(refiner, mesh)) return false; │ │ │ │ │ +407 if (! prepareComponentTagsAndSharpness(refiner)) return false; │ │ │ │ │ +408 │ │ │ │ │ +409 // │ │ │ │ │ +410 // Defining channels of face-varying primvar data -- an optional │ │ │ │ │ +specialization for MESH. │ │ │ │ │ +411 // │ │ │ │ │ +412 if (! assignFaceVaryingTopology(refiner, mesh)) return false; │ │ │ │ │ +413 if (! prepareFaceVaryingChannels(refiner)) return false; │ │ │ │ │ +414 │ │ │ │ │ +415 return true; │ │ │ │ │ +416} │ │ │ │ │ +417 │ │ │ │ │ +418template │ │ │ │ │ +419inline void │ │ │ │ │ +_4_2_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ +int count) { │ │ │ │ │ +421 newRefiner._levels[0]->resizeFaces(count); │ │ │ │ │ +422} │ │ │ │ │ +423template │ │ │ │ │ +424inline void │ │ │ │ │ +_4_2_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ +int count) { │ │ │ │ │ +426 newRefiner._levels[0]->resizeEdges(count); │ │ │ │ │ +427} │ │ │ │ │ +428template │ │ │ │ │ +429inline void │ │ │ │ │ +_4_3_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, int count) { │ │ │ │ │ +431 newRefiner._levels[0]->resizeVertices(count); │ │ │ │ │ +432} │ │ │ │ │ +433 │ │ │ │ │ +434template │ │ │ │ │ +435inline int │ │ │ │ │ +_4_3_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ +newRefiner) { │ │ │ │ │ +437 return newRefiner._levels[0]->getNumFaces(); │ │ │ │ │ +438} │ │ │ │ │ +439template │ │ │ │ │ +440inline int │ │ │ │ │ +_4_4_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ +newRefiner) { │ │ │ │ │ +442 return newRefiner._levels[0]->getNumEdges(); │ │ │ │ │ +443} │ │ │ │ │ +444template │ │ │ │ │ +445inline int │ │ │ │ │ +_4_4_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ +newRefiner) { │ │ │ │ │ +447 return newRefiner._levels[0]->getNumVertices(); │ │ │ │ │ +448} │ │ │ │ │ +449 │ │ │ │ │ +450template │ │ │ │ │ +451inline void │ │ │ │ │ +_4_5_2_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x f, int count) { │ │ │ │ │ +453 newRefiner._levels[0]->resizeFaceVertices(f, count); │ │ │ │ │ +454 newRefiner._hasIrregFaces = newRefiner._hasIrregFaces || (count != │ │ │ │ │ +newRefiner._regFaceSize); │ │ │ │ │ +455} │ │ │ │ │ +456template │ │ │ │ │ +457inline void │ │ │ │ │ +_4_5_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e, int count) { │ │ │ │ │ +459 newRefiner._levels[0]->resizeEdgeFaces(e, count); │ │ │ │ │ +460} │ │ │ │ │ +461template │ │ │ │ │ +462inline void │ │ │ │ │ +_4_6_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v, int count) { │ │ │ │ │ +464 newRefiner._levels[0]->resizeVertexFaces(v, count); │ │ │ │ │ +465} │ │ │ │ │ +466template │ │ │ │ │ +467inline void │ │ │ │ │ +_4_6_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v, int count) { │ │ │ │ │ +469 newRefiner._levels[0]->resizeVertexEdges(v, count); │ │ │ │ │ +470} │ │ │ │ │ 471 │ │ │ │ │ -474 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ -475 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ -476 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const; │ │ │ │ │ -477 │ │ │ │ │ -480 void _E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ -481 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ -482 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const; │ │ │ │ │ -483 │ │ │ │ │ -508 template │ │ │ │ │ -_5_0_9 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, REAL u, REAL v, │ │ │ │ │ -510 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0, │ │ │ │ │ -511 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0, │ │ │ │ │ -512 int channel = 0) const; │ │ │ │ │ -513 │ │ │ │ │ -516 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ -517 float wP[], float wDu[] = 0, float wDv[] = 0, │ │ │ │ │ -518 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0, │ │ │ │ │ -519 int channel = 0) const; │ │ │ │ │ -520 │ │ │ │ │ -523 void _E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double │ │ │ │ │ -v, │ │ │ │ │ -524 double wP[], double wDu[] = 0, double wDv[] = 0, │ │ │ │ │ -525 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0, │ │ │ │ │ -526 int channel = 0) const; │ │ │ │ │ -528 │ │ │ │ │ -529protected: │ │ │ │ │ +472template │ │ │ │ │ +473inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_7_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x f) { │ │ │ │ │ +475 return newRefiner._levels[0]->getFaceVertices(f); │ │ │ │ │ +476} │ │ │ │ │ +477template │ │ │ │ │ +478inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_7_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ +_I_n_d_e_x f) { │ │ │ │ │ +480 return newRefiner._levels[0]->getFaceEdges(f); │ │ │ │ │ +481} │ │ │ │ │ +482template │ │ │ │ │ +483inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_8_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e) { │ │ │ │ │ +485 return newRefiner._levels[0]->getEdgeVertices(e); │ │ │ │ │ +486} │ │ │ │ │ +487template │ │ │ │ │ +488inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_8_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ +_I_n_d_e_x e) { │ │ │ │ │ +490 return newRefiner._levels[0]->getEdgeFaces(e); │ │ │ │ │ +491} │ │ │ │ │ +492template │ │ │ │ │ +493inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_9_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v) { │ │ │ │ │ +495 return newRefiner._levels[0]->getVertexFaces(v); │ │ │ │ │ +496} │ │ │ │ │ +497template │ │ │ │ │ +498inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_4_9_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v) { │ │ │ │ │ +500 return newRefiner._levels[0]->getVertexEdges(v); │ │ │ │ │ +501} │ │ │ │ │ +502 │ │ │ │ │ +503template │ │ │ │ │ +504inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_5_0_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e) { │ │ │ │ │ +506 return newRefiner._levels[0]->getEdgeFaceLocalIndices(e); │ │ │ │ │ +507} │ │ │ │ │ +508template │ │ │ │ │ +509inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_5_1_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +& newRefiner, _I_n_d_e_x v) { │ │ │ │ │ +511 return newRefiner._levels[0]->getVertexFaceLocalIndices(v); │ │ │ │ │ +512} │ │ │ │ │ +513template │ │ │ │ │ +514inline _L_o_c_a_l_I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_5_1_5_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ +& newRefiner, _I_n_d_e_x v) { │ │ │ │ │ +516 return newRefiner._levels[0]->getVertexEdgeLocalIndices(v); │ │ │ │ │ +517} │ │ │ │ │ +518 │ │ │ │ │ +519template │ │ │ │ │ +520inline _I_n_d_e_x │ │ │ │ │ +_5_2_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_f_i_n_d_B_a_s_e_E_d_g_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & │ │ │ │ │ +newRefiner, _I_n_d_e_x v0, _I_n_d_e_x v1) { │ │ │ │ │ +522 return newRefiner._levels[0]->findEdge(v0, v1); │ │ │ │ │ +523} │ │ │ │ │ +524 │ │ │ │ │ +525template │ │ │ │ │ +526inline void │ │ │ │ │ +_5_2_7_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner) { │ │ │ │ │ +528 newRefiner._levels[0]->populateLocalIndices(); │ │ │ │ │ +529} │ │ │ │ │ 530 │ │ │ │ │ -_5_3_1 friend class _P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ -532 │ │ │ │ │ -533 // Factory constructor │ │ │ │ │ -_5_3_4 _P_a_t_c_h_T_a_b_l_e(int maxvalence); │ │ │ │ │ -535 │ │ │ │ │ -_5_3_6 _I_n_d_e_x _g_e_t_P_a_t_c_h_I_n_d_e_x(int array, int patch) const; │ │ │ │ │ -537 │ │ │ │ │ -_5_3_8 _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y _g_e_t_P_a_t_c_h_P_a_r_a_m_s(int arrayIndex); │ │ │ │ │ -539 │ │ │ │ │ -_5_4_0 _I_n_d_e_x * _g_e_t_S_h_a_r_p_n_e_s_s_I_n_d_i_c_e_s(_I_n_d_e_x arrayIndex); │ │ │ │ │ -_5_4_1 float * _g_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s(_I_n_d_e_x arrayIndex); │ │ │ │ │ -542 │ │ │ │ │ -543private: │ │ │ │ │ -544 │ │ │ │ │ -545 // │ │ │ │ │ -546 // Patch arrays │ │ │ │ │ -547 // │ │ │ │ │ -548 │ │ │ │ │ -549 struct PatchArray; │ │ │ │ │ -550 typedef std::vector PatchArrayVector; │ │ │ │ │ -551 │ │ │ │ │ -552 PatchArray & getPatchArray(_I_n_d_e_x arrayIndex); │ │ │ │ │ -553 PatchArray const & getPatchArray(_I_n_d_e_x arrayIndex) const; │ │ │ │ │ -554 │ │ │ │ │ -555 void reservePatchArrays(int numPatchArrays); │ │ │ │ │ -556 void pushPatchArray(_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc, int npatches, │ │ │ │ │ -557 _I_n_d_e_x * vidx, _I_n_d_e_x * pidx, _I_n_d_e_x * qoidx=0); │ │ │ │ │ +531template │ │ │ │ │ +532inline void │ │ │ │ │ +_5_3_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e, bool b) { │ │ │ │ │ +534 newRefiner._levels[0]->setEdgeNonManifold(e, b); │ │ │ │ │ +535} │ │ │ │ │ +536template │ │ │ │ │ +537inline void │ │ │ │ │ +_5_3_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v, bool b) { │ │ │ │ │ +539 newRefiner._levels[0]->setVertexNonManifold(v, b); │ │ │ │ │ +540} │ │ │ │ │ +541 │ │ │ │ │ +542template │ │ │ │ │ +543inline void │ │ │ │ │ +_5_4_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x e, float s) { │ │ │ │ │ +545 newRefiner._levels[0]->getEdgeSharpness(e) = s; │ │ │ │ │ +546} │ │ │ │ │ +547template │ │ │ │ │ +548inline void │ │ │ │ │ +_5_4_9_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x v, float s) { │ │ │ │ │ +550 newRefiner._levels[0]->getVertexSharpness(v) = s; │ │ │ │ │ +551} │ │ │ │ │ +552template │ │ │ │ │ +553inline void │ │ │ │ │ +_5_5_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_s_e_t_B_a_s_e_F_a_c_e_H_o_l_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & newRefiner, │ │ │ │ │ +_I_n_d_e_x f, bool b) { │ │ │ │ │ +555 newRefiner._levels[0]->setFaceHole(f, b); │ │ │ │ │ +556 newRefiner._hasHoles = newRefiner._hasHoles || b; │ │ │ │ │ +557} │ │ │ │ │ 558 │ │ │ │ │ -559 _I_n_d_e_x_A_r_r_a_y getPatchArrayVertices(int arrayIndex); │ │ │ │ │ -560 │ │ │ │ │ -561 _I_n_d_e_x findPatchArray(_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc); │ │ │ │ │ -562 │ │ │ │ │ -563 │ │ │ │ │ -564 // │ │ │ │ │ -565 // Varying patch arrays │ │ │ │ │ -566 // │ │ │ │ │ -567 _I_n_d_e_x_A_r_r_a_y getPatchArrayVaryingVertices(int arrayIndex); │ │ │ │ │ -568 │ │ │ │ │ -569 void allocateVaryingVertices( │ │ │ │ │ -570 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r desc, int numPatches); │ │ │ │ │ -571 void populateVaryingVertices(); │ │ │ │ │ -572 │ │ │ │ │ -573 // │ │ │ │ │ -574 // Face-varying patch channels │ │ │ │ │ -575 // │ │ │ │ │ +559template │ │ │ │ │ +560inline int │ │ │ │ │ +_5_6_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, int numValues) { │ │ │ │ │ +562 return newRefiner._levels[0]->createFVarChannel(numValues, │ │ │ │ │ +newRefiner._subdivOptions); │ │ │ │ │ +563} │ │ │ │ │ +564template │ │ │ │ │ +565inline int │ │ │ │ │ +_5_6_6_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, int numValues, _S_d_c_:_:_O_p_t_i_o_n_s const& fvarOptions) { │ │ │ │ │ +567 _S_d_c_:_:_O_p_t_i_o_n_s newOptions = newRefiner._subdivOptions; │ │ │ │ │ +568 newOptions._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 │ │ │ │ │ +(fvarOptions._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()); │ │ │ │ │ +569 return newRefiner._levels[0]->createFVarChannel(numValues, newOptions); │ │ │ │ │ +570} │ │ │ │ │ +571template │ │ │ │ │ +572inline _I_n_d_e_x_A_r_r_a_y │ │ │ │ │ +_5_7_3_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r & │ │ │ │ │ +newRefiner, _I_n_d_e_x face, int channel) { │ │ │ │ │ +574 return newRefiner._levels[0]->getFaceFVarValues(face, channel); │ │ │ │ │ +575} │ │ │ │ │ 576 │ │ │ │ │ -577 struct FVarPatchChannel; │ │ │ │ │ -578 typedef std::vector FVarPatchChannelVector; │ │ │ │ │ -579 │ │ │ │ │ -580 FVarPatchChannel & getFVarPatchChannel(int channel); │ │ │ │ │ -581 FVarPatchChannel const & getFVarPatchChannel(int channel) const; │ │ │ │ │ -582 │ │ │ │ │ -583 void allocateFVarPatchChannels(int numChannels); │ │ │ │ │ -584 void allocateFVarPatchChannelValues( │ │ │ │ │ -585 _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r regDesc, _P_a_t_c_h_D_e_s_c_r_i_p_t_o_r irregDesc, │ │ │ │ │ -586 int numPatches, int channel); │ │ │ │ │ -587 │ │ │ │ │ -588 // deprecated │ │ │ │ │ -589 void setFVarPatchChannelLinearInterpolation( │ │ │ │ │ -590 _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 interpolation, int channel); │ │ │ │ │ -591 │ │ │ │ │ -592 _I_n_d_e_x_A_r_r_a_y getFVarValues(int channel); │ │ │ │ │ -593 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y getPatchFVarValues(int patch, int channel) const; │ │ │ │ │ -594 │ │ │ │ │ -595 _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y getFVarPatchParams(int channel); │ │ │ │ │ -596 _P_a_t_c_h_P_a_r_a_m getPatchFVarPatchParam(int patch, int channel) const; │ │ │ │ │ -597 │ │ │ │ │ -598private: │ │ │ │ │ +577 │ │ │ │ │ +578template │ │ │ │ │ +579bool │ │ │ │ │ +_5_8_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_r_e_s_i_z_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ +* refiner */, MESH const& /* mesh */) { │ │ │ │ │ +581 │ │ │ │ │ +582 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ +583 "Failure in TopologyRefinerFactory<>::resizeComponentTopology() -- no │ │ │ │ │ +specialization provided."); │ │ │ │ │ +584 │ │ │ │ │ +585 // │ │ │ │ │ +586 // Sizing the topology tables: │ │ │ │ │ +587 // This method is for determining the sizes of the various topology tables │ │ │ │ │ +(and other │ │ │ │ │ +588 // data) associated with the mesh. Once completed, appropriate memory will │ │ │ │ │ +be allocated │ │ │ │ │ +589 // and an additional method invoked to populate it accordingly. │ │ │ │ │ +590 // │ │ │ │ │ +591 // The following methods should be called -- first those to specify the │ │ │ │ │ +number of faces, │ │ │ │ │ +592 // edges and vertices in the mesh: │ │ │ │ │ +593 // │ │ │ │ │ +594 // void setBaseFaceCount( TopologyRefiner& newRefiner, int count) │ │ │ │ │ +595 // void setBaseEdgeCount( TopologyRefiner& newRefiner, int count) │ │ │ │ │ +596 // void setBaseVertexCount(TopologyRefiner& newRefiner, int count) │ │ │ │ │ +597 // │ │ │ │ │ +598 // and then for each face, edge and vertex, the number of its incident │ │ │ │ │ +components: │ │ │ │ │ 599 // │ │ │ │ │ -600 // Simple private class to hold stencil table pointers of varying │ │ │ │ │ -precision, │ │ │ │ │ -601 // where the discriminant of the precision is external. │ │ │ │ │ -602 // │ │ │ │ │ -603 // NOTE that this is a simple pointer container and NOT a smart pointer │ │ │ │ │ -that │ │ │ │ │ -604 // manages the ownership of the object referred to by it. │ │ │ │ │ -605 // │ │ │ │ │ -606 class StencilTablePtr { │ │ │ │ │ -607 private: │ │ │ │ │ -608 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_f_l_o_a_t_> float_type; │ │ │ │ │ -609 typedef _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_d_o_u_b_l_e_> double_type; │ │ │ │ │ -610 │ │ │ │ │ -611 union { │ │ │ │ │ -612 float_type * _fPtr; │ │ │ │ │ -613 double_type * _dPtr; │ │ │ │ │ -614 }; │ │ │ │ │ -615 │ │ │ │ │ -616 public: │ │ │ │ │ -617 StencilTablePtr() { _fPtr = 0; } │ │ │ │ │ -618 StencilTablePtr(float_type * ptr) { _fPtr = ptr; } │ │ │ │ │ -619 StencilTablePtr(double_type * ptr) { _dPtr = ptr; } │ │ │ │ │ -620 │ │ │ │ │ -621 operator bool() const { return _fPtr != 0; } │ │ │ │ │ +600 // void setBaseFaceVertexCount(TopologyRefiner& newRefiner, Index face, int │ │ │ │ │ +count) │ │ │ │ │ +601 // void setBaseEdgeFaceCount( TopologyRefiner& newRefiner, Index edge, int │ │ │ │ │ +count) │ │ │ │ │ +602 // void setBaseVertexFaceCount(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ +int count) │ │ │ │ │ +603 // void setBaseVertexEdgeCount(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ +int count) │ │ │ │ │ +604 // │ │ │ │ │ +605 // The count/size for a component type must be set before indices │ │ │ │ │ +associated with that │ │ │ │ │ +606 // component type can be used. │ │ │ │ │ +607 // │ │ │ │ │ +608 // Note that it is only necessary to size 4 of the 6 supported topological │ │ │ │ │ +relations -- │ │ │ │ │ +609 // the number of edge-vertices is fixed at two per edge, and the number of │ │ │ │ │ +face-edges is │ │ │ │ │ +610 // the same as the number of face-vertices. │ │ │ │ │ +611 // │ │ │ │ │ +612 // So a single pass through your mesh to gather up all of this sizing │ │ │ │ │ +information will │ │ │ │ │ +613 // allow the Tables to be allocated appropriately once and avoid any │ │ │ │ │ +dynamic resizing as │ │ │ │ │ +614 // it grows. │ │ │ │ │ +615 // │ │ │ │ │ +616 return false; │ │ │ │ │ +617} │ │ │ │ │ +618 │ │ │ │ │ +619template │ │ │ │ │ +620bool │ │ │ │ │ +_6_2_1_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ +* refiner */, MESH const& /* mesh */) { │ │ │ │ │ 622 │ │ │ │ │ -623 void Set() { _fPtr = 0; } │ │ │ │ │ -624 void Set(float_type * ptr) { _fPtr = ptr; } │ │ │ │ │ -625 void Set(double_type * ptr) { _dPtr = ptr; } │ │ │ │ │ -626 │ │ │ │ │ -627 template StencilTableReal * Get() const; │ │ │ │ │ -628 }; │ │ │ │ │ -629 │ │ │ │ │ -630private: │ │ │ │ │ -631 │ │ │ │ │ -632 // │ │ │ │ │ -633 // Topology │ │ │ │ │ -634 // │ │ │ │ │ -635 │ │ │ │ │ -636 int _maxValence, // highest vertex valence found in the mesh │ │ │ │ │ -637 _numPtexFaces; // total number of ptex faces │ │ │ │ │ -638 │ │ │ │ │ -639 _P_a_t_c_h_A_r_r_a_y_V_e_c_t_o_r _patchArrays; // Vector of descriptors for arrays of │ │ │ │ │ -patches │ │ │ │ │ -640 │ │ │ │ │ -641 std::vector _patchVerts; // Indices of the control vertices of the │ │ │ │ │ -patches │ │ │ │ │ -642 │ │ │ │ │ -643 _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e _paramTable; // PatchParam bitfields (one per patch) │ │ │ │ │ -644 │ │ │ │ │ +623 _E_r_r_o_r(_F_A_R___R_U_N_T_I_M_E___E_R_R_O_R, │ │ │ │ │ +624 "Failure in TopologyRefinerFactory<>::assignComponentTopology() -- no │ │ │ │ │ +specialization provided."); │ │ │ │ │ +625 │ │ │ │ │ +626 // │ │ │ │ │ +627 // Assigning the topology tables: │ │ │ │ │ +628 // Once the topology tables have been allocated, the six required │ │ │ │ │ +topological │ │ │ │ │ +629 // relations can be directly populated using the following methods: │ │ │ │ │ +630 // │ │ │ │ │ +631 // IndexArray setBaseFaceVertices(TopologyRefiner& newRefiner, Index face) │ │ │ │ │ +632 // IndexArray setBaseFaceEdges(TopologyRefiner& newRefiner, Index face) │ │ │ │ │ +633 // │ │ │ │ │ +634 // IndexArray setBaseEdgeVertices(TopologyRefiner& newRefiner, Index edge) │ │ │ │ │ +635 // IndexArray setBaseEdgeFaces(TopologyRefiner& newRefiner, Index edge) │ │ │ │ │ +636 // │ │ │ │ │ +637 // IndexArray setBaseVertexEdges(TopologyRefiner& newRefiner, Index vertex) │ │ │ │ │ +638 // IndexArray setBaseVertexFaces(TopologyRefiner& newRefiner, Index vertex) │ │ │ │ │ +639 // │ │ │ │ │ +640 // For the last two relations -- the faces and edges incident a vertex - │ │ │ │ │ +- there are │ │ │ │ │ +641 // also "local indices" that must be specified (considering doing this │ │ │ │ │ +internally), │ │ │ │ │ +642 // where the "local index" of each incident face or edge is the index of │ │ │ │ │ +the vertex │ │ │ │ │ +643 // within that face or edge, and so ranging from 0-3 for incident quads and │ │ │ │ │ +0-1 for │ │ │ │ │ +644 // incident edges. These are assigned through similarly retrieved arrays: │ │ │ │ │ 645 // │ │ │ │ │ -646 // Extraordinary vertex closed-form evaluation / endcap basis conversion │ │ │ │ │ -647 // │ │ │ │ │ -648 // XXXtakahito: these data will probably be replaced with mask coefficient │ │ │ │ │ -or something │ │ │ │ │ -649 // SchemeWorker populates. │ │ │ │ │ -650 // │ │ │ │ │ -651 _Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e _quadOffsetsTable; // Quad offsets (for Gregory patches) │ │ │ │ │ -652 _V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e _vertexValenceTable; // Vertex valence table (for │ │ │ │ │ -Gregory patches) │ │ │ │ │ -653 │ │ │ │ │ -654 StencilTablePtr _localPointStencils; // local point conversion stencils │ │ │ │ │ -655 StencilTablePtr _localPointVaryingStencils; // local point varying stencils │ │ │ │ │ -656 │ │ │ │ │ +646 // LocalIndexArray setBaseVertexFaceLocalIndices(TopologyRefiner& │ │ │ │ │ +newRefiner, Index vertex) │ │ │ │ │ +647 // LocalIndexArray setBaseVertexEdgeLocalIndices(TopologyRefiner& │ │ │ │ │ +newRefiner, Index vertex) │ │ │ │ │ +648 // LocalIndexArray setBaseEdgeFaceLocalIndices( TopologyRefiner& │ │ │ │ │ +newRefiner, Index edge) │ │ │ │ │ +649 // │ │ │ │ │ +650 // or, if the mesh is manifold, explicit assignment of these can be │ │ │ │ │ +deferred and │ │ │ │ │ +651 // all can be determined by calling: │ │ │ │ │ +652 // │ │ │ │ │ +653 // void populateBaseLocalIndices(TopologyRefiner& newRefiner) │ │ │ │ │ +654 // │ │ │ │ │ +655 // All components are assumed to be locally manifold and ordering of │ │ │ │ │ +components in │ │ │ │ │ +656 // the above relations is expected to be counter-clockwise. │ │ │ │ │ 657 // │ │ │ │ │ -658 // Varying data │ │ │ │ │ -659 // │ │ │ │ │ -660 PatchDescriptor _varyingDesc; │ │ │ │ │ -661 │ │ │ │ │ -662 std::vector _varyingVerts; │ │ │ │ │ -663 │ │ │ │ │ -664 // │ │ │ │ │ -665 // Face-varying data │ │ │ │ │ -666 // │ │ │ │ │ -667 FVarPatchChannelVector _fvarChannels; │ │ │ │ │ -668 │ │ │ │ │ -669 std::vector _localPointFaceVaryingStencils; │ │ │ │ │ -670 │ │ │ │ │ -671 // │ │ │ │ │ -672 // 'single-crease' patch sharpness tables │ │ │ │ │ -673 // │ │ │ │ │ -674 std::vector _sharpnessIndices; // Indices of single-crease sharpness │ │ │ │ │ -(one per patch) │ │ │ │ │ -675 std::vector _sharpnessValues; // Sharpness values. │ │ │ │ │ -676 │ │ │ │ │ -677 // │ │ │ │ │ -678 // Construction history -- relevant to at least one public query: │ │ │ │ │ -679 // │ │ │ │ │ -680 unsigned int _isUniformLinear : 1; │ │ │ │ │ -681 │ │ │ │ │ -682 // │ │ │ │ │ -683 // Precision -- only applies to local-point stencil tables │ │ │ │ │ +658 // For non-manifold components, no ordering/orientation of incident │ │ │ │ │ +components is │ │ │ │ │ +659 // assumed or required, but be sure to explicitly tag such components │ │ │ │ │ +(vertices and │ │ │ │ │ +660 // edges) as non-manifold: │ │ │ │ │ +661 // │ │ │ │ │ +662 // void setBaseEdgeNonManifold(TopologyRefiner& newRefiner, Index edge, │ │ │ │ │ +bool b); │ │ │ │ │ +663 // │ │ │ │ │ +664 // void setBaseVertexNonManifold(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ +bool b); │ │ │ │ │ +665 // │ │ │ │ │ +666 // Also consider using TopologyLevel::ValidateTopology() when debugging to │ │ │ │ │ +ensure │ │ │ │ │ +667 // that topology has been completely and correctly specified. │ │ │ │ │ +668 // │ │ │ │ │ +669 return false; │ │ │ │ │ +670} │ │ │ │ │ +671 │ │ │ │ │ +672template │ │ │ │ │ +673bool │ │ │ │ │ +_6_7_4_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_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(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ +* refiner */, MESH const& /* mesh */) { │ │ │ │ │ +675 │ │ │ │ │ +676 // │ │ │ │ │ +677 // Optional assigning face-varying topology tables: │ │ │ │ │ +678 // │ │ │ │ │ +679 // Create independent face-varying primitive variable channels: │ │ │ │ │ +680 // int createBaseFVarChannel(TopologyRefiner& newRefiner, int numValues) │ │ │ │ │ +681 // │ │ │ │ │ +682 // For each channel, populate the face-vertex values: │ │ │ │ │ +683 // IndexArray setBaseFaceFVarValues(TopologyRefiner& newRefiner, Index │ │ │ │ │ +face, int channel = 0) │ │ │ │ │ 684 // │ │ │ │ │ -685 unsigned int _vertexPrecisionIsDouble : 1; │ │ │ │ │ -686 unsigned int _varyingPrecisionIsDouble : 1; │ │ │ │ │ -687 unsigned int _faceVaryingPrecisionIsDouble : 1; │ │ │ │ │ -688}; │ │ │ │ │ -689 │ │ │ │ │ -690 │ │ │ │ │ -691// │ │ │ │ │ -692// Template specializations for float/double -- to be defined before used: │ │ │ │ │ -693// │ │ │ │ │ -694template <> inline StencilTableReal * │ │ │ │ │ -695PatchTable::StencilTablePtr::Get() const { return _fPtr; } │ │ │ │ │ -696 │ │ │ │ │ -697template <> inline StencilTableReal * │ │ │ │ │ -698PatchTable::StencilTablePtr::Get() const { return _dPtr; } │ │ │ │ │ -699 │ │ │ │ │ -_7_0_0template <> inline bool │ │ │ │ │ -701PatchTable::LocalPointStencilPrecisionMatchesType() const { │ │ │ │ │ -702 return !_vertexPrecisionIsDouble; │ │ │ │ │ +685 return true; │ │ │ │ │ +686} │ │ │ │ │ +687 │ │ │ │ │ +688template │ │ │ │ │ +689bool │ │ │ │ │ +_6_9_0_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_a_s_s_i_g_n_C_o_m_p_o_n_e_n_t_T_a_g_s(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r& / │ │ │ │ │ +* refiner */, MESH const& /* mesh */) { │ │ │ │ │ +691 │ │ │ │ │ +692 // │ │ │ │ │ +693 // Optional tagging: │ │ │ │ │ +694 // This is where any additional feature tags -- sharpness, holes, etc. - │ │ │ │ │ +- can be │ │ │ │ │ +695 // specified using: │ │ │ │ │ +696 // │ │ │ │ │ +697 // void setBaseEdgeSharpness(TopologyRefiner& newRefiner, Index edge, float │ │ │ │ │ +sharpness) │ │ │ │ │ +698 // void setBaseVertexSharpness(TopologyRefiner& newRefiner, Index vertex, │ │ │ │ │ +float sharpness) │ │ │ │ │ +699 // │ │ │ │ │ +700 // void setBaseFaceHole(TopologyRefiner& newRefiner, Index face, bool hole) │ │ │ │ │ +701 // │ │ │ │ │ +702 return true; │ │ │ │ │ 703} │ │ │ │ │ -_7_0_4template <> inline bool │ │ │ │ │ -705PatchTable::LocalPointVaryingStencilPrecisionMatchesType() const { │ │ │ │ │ -706 return !_varyingPrecisionIsDouble; │ │ │ │ │ -707} │ │ │ │ │ -_7_0_8template <> inline bool │ │ │ │ │ -709PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ -{ │ │ │ │ │ -710 return !_faceVaryingPrecisionIsDouble; │ │ │ │ │ -711} │ │ │ │ │ -712 │ │ │ │ │ -_7_1_3template <> inline bool │ │ │ │ │ -714PatchTable::LocalPointStencilPrecisionMatchesType() const { │ │ │ │ │ -715 return _vertexPrecisionIsDouble; │ │ │ │ │ -716} │ │ │ │ │ -_7_1_7template <> inline bool │ │ │ │ │ -718PatchTable::LocalPointVaryingStencilPrecisionMatchesType() const { │ │ │ │ │ -719 return _varyingPrecisionIsDouble; │ │ │ │ │ -720} │ │ │ │ │ -_7_2_1template <> inline bool │ │ │ │ │ -722PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ -{ │ │ │ │ │ -723 return _faceVaryingPrecisionIsDouble; │ │ │ │ │ -724} │ │ │ │ │ -725 │ │ │ │ │ -726// │ │ │ │ │ -727// StencilTable access -- backward compatible and generic: │ │ │ │ │ -728// │ │ │ │ │ -729inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -_7_3_0_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() const { │ │ │ │ │ -731 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ -732 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>(_localPointStencils.Get()); │ │ │ │ │ -733} │ │ │ │ │ -734inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -_7_3_5_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() const { │ │ │ │ │ -736 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -737 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -738 _localPointVaryingStencils.Get()); │ │ │ │ │ -739} │ │ │ │ │ -740inline _S_t_e_n_c_i_l_T_a_b_l_e const * │ │ │ │ │ -_7_4_1_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel) const { │ │ │ │ │ -742 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -743 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ -744 return static_cast<_S_t_e_n_c_i_l_T_a_b_l_e const *>( │ │ │ │ │ -745 _localPointFaceVaryingStencils[channel].Get()); │ │ │ │ │ -746 } │ │ │ │ │ -747 return NULL; │ │ │ │ │ -748} │ │ │ │ │ -749 │ │ │ │ │ -750template │ │ │ │ │ -751inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ -_7_5_2_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() const { │ │ │ │ │ -753 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ -754 return _localPointStencils.Get(); │ │ │ │ │ -755} │ │ │ │ │ -756template │ │ │ │ │ -757inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ -_7_5_8_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() const { │ │ │ │ │ -759 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -760 return _localPointVaryingStencils.Get(); │ │ │ │ │ -761} │ │ │ │ │ -762template │ │ │ │ │ -763inline _S_t_e_n_c_i_l_T_a_b_l_e_R_e_a_l_<_R_E_A_L_> const * │ │ │ │ │ -_7_6_4_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e(int channel) const { │ │ │ │ │ -765 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -766 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ -767 return _localPointFaceVaryingStencils[channel].Get(); │ │ │ │ │ -768 } │ │ │ │ │ -769 return NULL; │ │ │ │ │ -770} │ │ │ │ │ -771 │ │ │ │ │ -772 │ │ │ │ │ -773// │ │ │ │ │ -774// Computation of local point values: │ │ │ │ │ -775// │ │ │ │ │ -776template │ │ │ │ │ -777inline void │ │ │ │ │ -_7_7_8_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s(T const *src, T *dst) const { │ │ │ │ │ -779 assert(LocalPointStencilPrecisionMatchesType()); │ │ │ │ │ -780 if (_localPointStencils) { │ │ │ │ │ -781 _localPointStencils.Get()->UpdateValues(src, dst); │ │ │ │ │ -782 } │ │ │ │ │ -783} │ │ │ │ │ -784 │ │ │ │ │ -785template │ │ │ │ │ -786inline void │ │ │ │ │ -_7_8_7_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g(T const *src, T *dst) const { │ │ │ │ │ -788 assert(LocalPointVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -789 if (_localPointVaryingStencils) { │ │ │ │ │ -790 _localPointVaryingStencils.Get()->UpdateValues(src, dst); │ │ │ │ │ -791 } │ │ │ │ │ -792} │ │ │ │ │ -793 │ │ │ │ │ -794template │ │ │ │ │ -795inline void │ │ │ │ │ -_7_9_6_P_a_t_c_h_T_a_b_l_e_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g(T const *src, T *dst, int │ │ │ │ │ -channel) const { │ │ │ │ │ -797 assert(LocalPointFaceVaryingStencilPrecisionMatchesType()); │ │ │ │ │ -798 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) { │ │ │ │ │ -799 if (_localPointFaceVaryingStencils[channel]) { │ │ │ │ │ -800 _localPointFaceVaryingStencils[channel].Get()->UpdateValues(src, │ │ │ │ │ -dst); │ │ │ │ │ -801 } │ │ │ │ │ -802 } │ │ │ │ │ -803} │ │ │ │ │ -804 │ │ │ │ │ -805 │ │ │ │ │ -806// │ │ │ │ │ -807// Basis evaluation overloads │ │ │ │ │ -808// │ │ │ │ │ -809inline void │ │ │ │ │ -_8_1_0_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float v, │ │ │ │ │ -811 float wP[], float wDu[], float wDv[], │ │ │ │ │ -812 float wDuu[], float wDuv[], float wDvv[]) const { │ │ │ │ │ -813 │ │ │ │ │ -814 EvaluateBasis(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ -815} │ │ │ │ │ -816inline void │ │ │ │ │ -_8_1_7_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, double v, │ │ │ │ │ -818 double wP[], double wDu[], double wDv[], │ │ │ │ │ -819 double wDuu[], double wDuv[], double wDvv[]) const { │ │ │ │ │ -820 │ │ │ │ │ -821 EvaluateBasis(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ -822} │ │ │ │ │ -823 │ │ │ │ │ -824inline void │ │ │ │ │ -_8_2_5_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, float │ │ │ │ │ -v, │ │ │ │ │ -826 float wP[], float wDu[], float wDv[], │ │ │ │ │ -827 float wDuu[], float wDuv[], float wDvv[]) const { │ │ │ │ │ -828 │ │ │ │ │ -829 EvaluateBasisVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ -830} │ │ │ │ │ -831inline void │ │ │ │ │ -_8_3_2_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, │ │ │ │ │ -double v, │ │ │ │ │ -833 double wP[], double wDu[], double wDv[], │ │ │ │ │ -834 double wDuu[], double wDuv[], double wDvv[]) const { │ │ │ │ │ -835 │ │ │ │ │ -836 EvaluateBasisVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv); │ │ │ │ │ -837} │ │ │ │ │ -838 │ │ │ │ │ -839inline void │ │ │ │ │ -_8_4_0_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, float u, │ │ │ │ │ -float v, │ │ │ │ │ -841 float wP[], float wDu[], float wDv[], │ │ │ │ │ -842 float wDuu[], float wDuv[], float wDvv[], int channel) const { │ │ │ │ │ -843 │ │ │ │ │ -844 EvaluateBasisFaceVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, │ │ │ │ │ -wDvv, channel); │ │ │ │ │ -845} │ │ │ │ │ -846inline void │ │ │ │ │ -_8_4_7_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g(_P_a_t_c_h_H_a_n_d_l_e const & handle, double u, │ │ │ │ │ -double v, │ │ │ │ │ -848 double wP[], double wDu[], double wDv[], │ │ │ │ │ -849 double wDuu[], double wDuv[], double wDvv[], int channel) const { │ │ │ │ │ -850 │ │ │ │ │ -851 EvaluateBasisFaceVarying(handle, u, v, wP, wDu, wDv, wDuu, wDuv, │ │ │ │ │ -wDvv, channel); │ │ │ │ │ -852} │ │ │ │ │ -853 │ │ │ │ │ -854} // end namespace Far │ │ │ │ │ -855 │ │ │ │ │ -856} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -857using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -858 │ │ │ │ │ -859} // end namespace OpenSubdiv │ │ │ │ │ -860 │ │ │ │ │ -861#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */ │ │ │ │ │ +704 │ │ │ │ │ +705template │ │ │ │ │ +706void │ │ │ │ │ +_7_0_7_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_<_M_E_S_H_>_:_:_r_e_p_o_r_t_I_n_v_a_l_i_d_T_o_p_o_l_o_g_y( │ │ │ │ │ +708 TopologyError /* errCode */, char const * /* msg */, MESH const& /* mesh */ │ │ │ │ │ +) { │ │ │ │ │ +709 │ │ │ │ │ +710 // │ │ │ │ │ +711 // Optional topology validation error reporting: │ │ │ │ │ +712 // This method is called whenever the factory encounters topology │ │ │ │ │ +validation │ │ │ │ │ +713 // errors. By default, nothing is reported │ │ │ │ │ +714 // │ │ │ │ │ +715} │ │ │ │ │ +716 │ │ │ │ │ +717} // end namespace Far │ │ │ │ │ +718 │ │ │ │ │ +719} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +720using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +721} // end namespace OpenSubdiv │ │ │ │ │ +722 │ │ │ │ │ +723#endif /* OPENSUBDIV3_FAR_TOPOLOGY_REFINER_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_:_:_P_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ -std::vector< PatchParam > PatchParamTable │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ -Describes the type of a patch. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_D_e_s_c_r_i_p_t_o_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_:_:_F_a_r_:_:_P_a_t_c_h_M_a_p │ │ │ │ │ -An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_M_a_p_._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_:_:_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -Patch parameterization. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_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_P_a_t_c_h_A_r_r_a_y_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchArrayVaryingVertices(int array) const │ │ │ │ │ -Returns the varying vertex indices for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_g_e_t_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s │ │ │ │ │ -float * getSharpnessValues(Index arrayIndex) │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_a_b_l_e │ │ │ │ │ -PatchVertsTable const & GetPatchControlVerticesTable() const │ │ │ │ │ -Get the table of patch control vertices. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_: │ │ │ │ │ -_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Updates local point face-varying values. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetVaryingVertices() const │ │ │ │ │ -Returns an array of varying vertex indices for the patches. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s_V_a_r_y_i_n_g │ │ │ │ │ -void ComputeLocalPointValuesVarying(T const *src, T *dst) const │ │ │ │ │ -Updates local point varying values. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const │ │ │ │ │ -Returns the varying vertex indices for a given patch. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_I_s_F_e_a_t_u_r_e_A_d_a_p_t_i_v_e │ │ │ │ │ -bool IsFeatureAdaptive() const │ │ │ │ │ -True if the patches are of feature adaptive types. │ │ │ │ │ -_O_p_e_n_S_u_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 │ │ │ │ │ -StencilTableReal< REAL > const * GetLocalPointStencilTable() const │ │ │ │ │ -Returns the stencil table to compute local point vertex values. │ │ │ │ │ -_O_p_e_n_S_u_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_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_g_e_t_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ -PatchParamArray getPatchParams(int arrayIndex) │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const │ │ │ │ │ -Returns the value indices for the patches in array in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_S_h_a_r_p_n_e_s_s_V_a_l_u_e_s │ │ │ │ │ -std::vector< float > const & GetSharpnessValues() const │ │ │ │ │ -Returns sharpness values table. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_V_e_r_t_e_x_V_a_l_e_n_c_e_T_a_b_l_e │ │ │ │ │ -std::vector< Index > VertexValenceTable │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -PatchParam GetPatchFVarPatchParam(int array, int patch, int channel=0) const │ │ │ │ │ -Returns the face-varying params for a given patch channel. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_V_a_r_y_i_n_g_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchVaryingVertices(int array, int patch) const │ │ │ │ │ -Returns the varying vertex indices for a given patch. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -PatchTable(PatchTable const &src) │ │ │ │ │ -Copy 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_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 │ │ │ │ │ -int GetNumPatchArrays() const │ │ │ │ │ -Returns the number of patch arrays in 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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchVertices(PatchHandle const &handle) const │ │ │ │ │ -Returns the control vertex indices for the patch identified by handle. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -PatchTable(int maxvalence) │ │ │ │ │ -_O_p_e_n_S_u_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_:_: │ │ │ │ │ -_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ -bool LocalPointFaceVaryingStencilPrecisionMatchesType() const │ │ │ │ │ -Tests if the precision of the stencil table to compute local point face-varying │ │ │ │ │ -values matches the gi... │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ -PatchParamTable const & GetPatchParamTable() const │ │ │ │ │ -Returns the PatchParamTable (PatchParams order matches patch array sorting) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_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_a_b_l_e │ │ │ │ │ -VertexValenceTable const & GetVertexValenceTable() const │ │ │ │ │ -Returns the 'VertexValences' table (vertex neighborhoods table) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_: │ │ │ │ │ -_G_e_t_L_o_c_a_l_P_o_i_n_t_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const │ │ │ │ │ -Returns the stencil table to compute local point face-varying values. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_7_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_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s │ │ │ │ │ -int GetNumControlVertices(int array) const │ │ │ │ │ -Returns the number of control vertices in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_~_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ -~PatchTable() │ │ │ │ │ -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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -void EvaluateBasisFaceVarying(PatchHandle const &handle, REAL u, REAL v, REAL │ │ │ │ │ -wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0, │ │ │ │ │ -int channel=0) const │ │ │ │ │ -Evaluate basis functions for a face-varying value and derivatives at a given │ │ │ │ │ -(u,v) parametric locatio... │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_Q_u_a_d_O_f_f_s_e_t_s │ │ │ │ │ -ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const │ │ │ │ │ -Returns the 'QuadOffsets' for the Gregory patch identified by handle. │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_I_r_r_e_g_u_l_a_r │ │ │ │ │ -PatchDescriptor GetFVarPatchDescriptorIrregular(int channel=0) const │ │ │ │ │ -Returns the irregular patch descriptor for channel. │ │ │ │ │ -_O_p_e_n_S_u_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_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e │ │ │ │ │ -float GetSingleCreasePatchSharpnessValue(int array, int patch) const │ │ │ │ │ -Returns the crease sharpness for the patch in array if it is a single-crease │ │ │ │ │ -patch,... │ │ │ │ │ -_O_p_e_n_S_u_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_S_h_a_r_p_n_e_s_s_I_n_d_i_c_e_s │ │ │ │ │ -Index * getSharpnessIndices(Index arrayIndex) │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_C_o_m_p_u_t_e_L_o_c_a_l_P_o_i_n_t_V_a_l_u_e_s │ │ │ │ │ -void ComputeLocalPointValues(T const *src, T *dst) const │ │ │ │ │ -Updates 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_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h_S_h_a_r_p_n_e_s_s_V_a_l_u_e │ │ │ │ │ -float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const │ │ │ │ │ -Returns the crease sharpness for the patch identified by handle if it is a │ │ │ │ │ -single-crease patch,... │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -PatchParam GetPatchParam(int array, int patch) const │ │ │ │ │ -Returns the PatchParam for patch in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -ConstIndexArray GetPatchFVarValues(int array, int patch, int channel=0) const │ │ │ │ │ -Returns the value indices for a given patch in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r_R_e_g_u_l_a_r │ │ │ │ │ -PatchDescriptor GetFVarPatchDescriptorRegular(int channel=0) const │ │ │ │ │ -Returns the regular patch descriptor for channel. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const │ │ │ │ │ -Returns the PatchDescriptor for the patch identified by handle. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_V_e_r_t_s_T_a_b_l_e │ │ │ │ │ -std::vector< Index > PatchVertsTable │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_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_a_b_l_e │ │ │ │ │ -QuadOffsetsTable const & GetQuadOffsetsTable() const │ │ │ │ │ -Returns the quad-offsets table. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_a_t_c_h_e_s │ │ │ │ │ -int GetNumPatches(int array) const │ │ │ │ │ -Returns the number of patches in 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_:_:_F_a_r_:_:_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_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor GetVaryingPatchDescriptor() const │ │ │ │ │ -Returns the varying patch descriptor. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Returns the value indices for a given patch in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ -ConstPatchParamArray const GetPatchParams(int array) const │ │ │ │ │ -Returns the PatchParams for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_C_o_n_t_r_o_l_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumControlVerticesTotal() const │ │ │ │ │ -Returns the total number of control vertex indices in the table. │ │ │ │ │ -DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_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. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ -ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Returns the face-varying for a given patch in array in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_I_n_d_e_x │ │ │ │ │ -Index getPatchIndex(int array, int patch) 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_T_a_b_l_e_:_:_G_e_t_N_u_m_L_o_c_a_l_P_o_i_n_t_s │ │ │ │ │ -int GetNumLocalPoints() const │ │ │ │ │ -Returns the number of local vertex points. │ │ │ │ │ -_O_p_e_n_S_u_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_:_: │ │ │ │ │ -_L_o_c_a_l_P_o_i_n_t_V_a_r_y_i_n_g_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ -bool LocalPointVaryingStencilPrecisionMatchesType() const │ │ │ │ │ -Tests if the precision of the stencil table to compute local point varying │ │ │ │ │ -values matches the given f... │ │ │ │ │ -_O_p_e_n_S_u_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_P_a_t_c_h_A_r_r_a_y_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchArrayVertices(int array) const │ │ │ │ │ -Returns the control vertex indices for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_N_u_m_P_t_e_x_F_a_c_e_s │ │ │ │ │ -int GetNumPtexFaces() const │ │ │ │ │ -Returns the total number of ptex faces in the mesh. │ │ │ │ │ -DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ -ConstIndexArray GetFVarValues(int channel=0) const │ │ │ │ │ -Returns an array of value indices for the patches in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_C_o_n_s_t_Q_u_a_d_O_f_f_s_e_t_s_A_r_r_a_y │ │ │ │ │ -Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray │ │ │ │ │ -Accessors for the gregory patch evaluation buffers. These methods will be │ │ │ │ │ -deprecated. │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_2_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_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s │ │ │ │ │ -void EvaluateBasis(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL │ │ │ │ │ -wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const │ │ │ │ │ -Evaluate basis functions for position and derivatives at a given (u,v) │ │ │ │ │ -parametric location of a patch... │ │ │ │ │ -_O_p_e_n_S_u_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_F_a_c_e_V_a_r_y_i_n_g_S_t_e_n_c_i_l_T_a_b_l_e │ │ │ │ │ -StencilTableReal< REAL > const * GetLocalPointFaceVaryingStencilTable(int │ │ │ │ │ -channel=0) const │ │ │ │ │ -Returns the stencil table to compute local point face-varying values. │ │ │ │ │ -_O_p_e_n_S_u_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_N_u_m_P_a_t_c_h_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumPatchesTotal() const │ │ │ │ │ -Returns the total number of patches stored in 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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -PatchParam GetPatchParam(PatchHandle const &handle) const │ │ │ │ │ -Returns a PatchParam for the patch identified by handle. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_p_r_i_n_t │ │ │ │ │ -void print() const │ │ │ │ │ -debug helper │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_C_h_a_n_n_e_l_L_i_n_e_a_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int │ │ │ │ │ -channel=0) const │ │ │ │ │ -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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_S_h_a_r_p_n_e_s_s_I_n_d_e_x_T_a_b_l_e │ │ │ │ │ -std::vector< Index > const & GetSharpnessIndexTable() const │ │ │ │ │ -Returns a sharpness index table for each patch (if exists) │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_A_r_r_a_y_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor GetPatchArrayDescriptor(int array) const │ │ │ │ │ -Returns the PatchDescriptor for the patches in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ -friend class PatchTableBuilder │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_5_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_E_v_a_l_u_a_t_e_B_a_s_i_s_V_a_r_y_i_n_g │ │ │ │ │ -void EvaluateBasisVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], │ │ │ │ │ -REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const │ │ │ │ │ -Evaluate basis functions for a varying value and derivatives at a given (u,v) │ │ │ │ │ -parametric location of ... │ │ │ │ │ -_O_p_e_n_S_u_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_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_Q_u_a_d_O_f_f_s_e_t_s_T_a_b_l_e │ │ │ │ │ -std::vector< unsigned int > QuadOffsetsTable │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_._h_:_3_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_V_e_r_t_i_c_e_s │ │ │ │ │ -ConstIndexArray GetPatchVertices(int array, int patch) const │ │ │ │ │ -Returns the control vertex indices for patch in 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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_G_e_t_P_a_t_c_h_F_V_a_r_P_a_t_c_h_P_a_r_a_m │ │ │ │ │ -PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Returns the value indices for a given patch in channel. │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_V_a_l_u_e_S_t_r_i_d_e │ │ │ │ │ -int GetFVarValueStride(int channel=0) const │ │ │ │ │ -Returns the stride between patches in the value index array of channel. │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_P_a_r_a_m_s │ │ │ │ │ -ConstPatchParamArray GetFVarPatchParams(int channel=0) const │ │ │ │ │ -Returns an array of face-varying patch param for channel. │ │ │ │ │ -_O_p_e_n_S_u_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_F_V_a_r_P_a_t_c_h_D_e_s_c_r_i_p_t_o_r │ │ │ │ │ -PatchDescriptor GetFVarPatchDescriptor(int channel=0) const │ │ │ │ │ -Returns the default/irregular patch descriptor for channel. │ │ │ │ │ -_O_p_e_n_S_u_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_N_u_m_L_o_c_a_l_P_o_i_n_t_s_V_a_r_y_i_n_g │ │ │ │ │ -int GetNumLocalPointsVarying() const │ │ │ │ │ -Returns the number of local varying points. │ │ │ │ │ -_O_p_e_n_S_u_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_:_: │ │ │ │ │ -_L_o_c_a_l_P_o_i_n_t_S_t_e_n_c_i_l_P_r_e_c_i_s_i_o_n_M_a_t_c_h_e_s_T_y_p_e │ │ │ │ │ -bool LocalPointStencilPrecisionMatchesType() const │ │ │ │ │ -Tests if the precision of the stencil table to compute local point vertex │ │ │ │ │ -values matches the given fl... │ │ │ │ │ -_O_p_e_n_S_u_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 │ │ │ │ │ -StencilTableReal< REAL > const * GetLocalPointVaryingStencilTable() const │ │ │ │ │ -Returns the stencil table to compute local point varying values. │ │ │ │ │ -_O_p_e_n_S_u_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_N_u_m_L_o_c_a_l_P_o_i_n_t_s_F_a_c_e_V_a_r_y_i_n_g │ │ │ │ │ -int GetNumLocalPointsFaceVarying(int channel=0) const │ │ │ │ │ -Returns the number of local face-varying points for channel. │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_P_a_t_c_h_H_a_n_d_l_e │ │ │ │ │ -Handle that can be used as unique patch identifier within PatchTable. │ │ │ │ │ -DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_p_a_t_c_h_I_n_d_e_x │ │ │ │ │ -Index patchIndex │ │ │ │ │ -DDeeffiinniittiioonn _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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_a_r_r_a_y_I_n_d_e_x │ │ │ │ │ -Index arrayIndex │ │ │ │ │ -DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_:_:_P_a_t_c_h_H_a_n_d_l_e_:_:_v_e_r_t_I_n_d_e_x │ │ │ │ │ -Index vertIndex │ │ │ │ │ -DDeeffiinniittiioonn _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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ +Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ +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_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_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_F_a_c_e_s │ │ │ │ │ +static int getNumBaseFaces(TopologyRefiner const &newRefiner) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_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_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +static LocalIndexArray getBaseVertexFaceLocalIndices(TopologyRefiner │ │ │ │ │ +&newRefiner, Index v) │ │ │ │ │ +Assign the local indices of a vertex within each of its incident 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_:_5_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s │ │ │ │ │ +static int getNumBaseVertices(TopologyRefiner const &newRefiner) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_s_e_t_N_u_m_B_a_s_e_E_d_g_e_F_a_c_e_s │ │ │ │ │ +static void setNumBaseEdgeFaces(TopologyRefiner &newRefiner, Index e, int │ │ │ │ │ +count) │ │ │ │ │ +Specify the number of faces incident each edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ +static IndexArray getBaseFaceVertices(TopologyRefiner &newRefiner, Index f) │ │ │ │ │ +Assign the vertices incident each 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_:_4_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_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +static LocalIndexArray getBaseEdgeFaceLocalIndices(TopologyRefiner &newRefiner, │ │ │ │ │ +Index e) │ │ │ │ │ +Assign the local indices of an edge within each of its incident 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_:_5_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_p_o_p_u_l_a_t_e_B_a_s_e_L_e_v_e_l │ │ │ │ │ +static bool populateBaseLevel(TopologyRefiner &refiner, MESH const &mesh, │ │ │ │ │ +Options options) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_3_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_p_o_p_u_l_a_t_e_B_a_s_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +static void populateBaseLocalIndices(TopologyRefiner &newRefiner) │ │ │ │ │ +Determine all local indices by inspection (only for pure manifold meshes) │ │ │ │ │ +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_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_:_:_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_:_: │ │ │ │ │ +_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ +static void setNumBaseVertexEdges(TopologyRefiner &newRefiner, Index v, int │ │ │ │ │ +count) │ │ │ │ │ +Specify the number of edges incident each vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_F_a_c_t_o_r_y_:_:_T_o_p_o_l_o_g_y_E_r_r_o_r │ │ │ │ │ +Vtr::internal::Level::TopologyError TopologyError │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_F_a_c_e_F_V_a_r_V_a_l_u_e_s │ │ │ │ │ +static IndexArray getBaseFaceFVarValues(TopologyRefiner &newRefiner, Index │ │ │ │ │ +face, int channel=0) │ │ │ │ │ +Assign the face-varying values for the corners of each 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_:_5_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_B_a_s_e_E_d_g_e_F_a_c_e_s │ │ │ │ │ +static IndexArray getBaseEdgeFaces(TopologyRefiner &newRefiner, Index e) │ │ │ │ │ +Assign the faces incident each edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_s_e_t_N_u_m_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ +static void setNumBaseVertexFaces(TopologyRefiner &newRefiner, Index v, int │ │ │ │ │ +count) │ │ │ │ │ +Specify the number of faces incident each vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_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_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_s_e_t_B_a_s_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +static void setBaseVertexSharpness(TopologyRefiner &newRefiner, Index v, float │ │ │ │ │ +sharpness) │ │ │ │ │ +Assign a sharpness value to a given vertex. │ │ │ │ │ +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_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_L_o_c_a_l_I_n_d_i_c_e_s │ │ │ │ │ +static LocalIndexArray getBaseVertexEdgeLocalIndices(TopologyRefiner │ │ │ │ │ +&newRefiner, Index v) │ │ │ │ │ +Assign the local indices of a vertex within each of its incident edges. │ │ │ │ │ +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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_g_e_t_B_a_s_e_E_d_g_e_V_e_r_t_i_c_e_s │ │ │ │ │ +static IndexArray getBaseEdgeVertices(TopologyRefiner &newRefiner, Index e) │ │ │ │ │ +Assign the vertices incident each edge. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_F_a_c_e_s │ │ │ │ │ +static IndexArray getBaseVertexFaces(TopologyRefiner &newRefiner, Index v) │ │ │ │ │ +Assign the faces incident each vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_s_e_t_B_a_s_e_V_e_r_t_e_x_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ +static void setBaseVertexNonManifold(TopologyRefiner &newRefiner, Index v, bool │ │ │ │ │ +b) │ │ │ │ │ +Tag a vertex as non-manifold. │ │ │ │ │ +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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_F_a_c_e_s │ │ │ │ │ +static void setNumBaseFaces(TopologyRefiner &newRefiner, int count) │ │ │ │ │ +Specify the number of faces to be accommodated. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_g_e_t_B_a_s_e_F_a_c_e_E_d_g_e_s │ │ │ │ │ +static IndexArray getBaseFaceEdges(TopologyRefiner &newRefiner, Index f) │ │ │ │ │ +Assign the edges incident each 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_:_4_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_s_e_t_N_u_m_B_a_s_e_F_a_c_e_V_e_r_t_i_c_e_s │ │ │ │ │ +static void setNumBaseFaceVertices(TopologyRefiner &newRefiner, Index f, int │ │ │ │ │ +count) │ │ │ │ │ +Specify the number of vertices incident each 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_:_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_:_:_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_:_: │ │ │ │ │ +_s_e_t_B_a_s_e_E_d_g_e_S_h_a_r_p_n_e_s_s │ │ │ │ │ +static void setBaseEdgeSharpness(TopologyRefiner &newRefiner, Index e, float │ │ │ │ │ +sharpness) │ │ │ │ │ +Assign a sharpness value to a given edge. │ │ │ │ │ +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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_: │ │ │ │ │ +_s_e_t_B_a_s_e_E_d_g_e_N_o_n_M_a_n_i_f_o_l_d │ │ │ │ │ +static void setBaseEdgeNonManifold(TopologyRefiner &newRefiner, Index e, bool │ │ │ │ │ +b) │ │ │ │ │ +Tag an edge as non-manifold. │ │ │ │ │ +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_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_E_d_g_e_s │ │ │ │ │ +static void setNumBaseEdges(TopologyRefiner &newRefiner, int count) │ │ │ │ │ +Specify the number of edges to be accommodated. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_C_r_e_a_t_e │ │ │ │ │ +static TopologyRefiner * Create(MESH const &mesh, Options options=Options()) │ │ │ │ │ +Instantiates a TopologyRefiner from client-provided topological representation. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_f_i_n_d_B_a_s_e_E_d_g_e │ │ │ │ │ +static Index findBaseEdge(TopologyRefiner const &newRefiner, Index v0, Index │ │ │ │ │ +v1) │ │ │ │ │ +Identify an edge to be assigned a sharpness value given a vertex pair. │ │ │ │ │ +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_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_:_:_g_e_t_B_a_s_e_V_e_r_t_e_x_E_d_g_e_s │ │ │ │ │ +static IndexArray getBaseVertexEdges(TopologyRefiner &newRefiner, Index v) │ │ │ │ │ +Assign the edges incident each vertex. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_:_:_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_:_: │ │ │ │ │ +_c_r_e_a_t_e_B_a_s_e_F_V_a_r_C_h_a_n_n_e_l │ │ │ │ │ +static int createBaseFVarChannel(TopologyRefiner &newRefiner, int numValues) │ │ │ │ │ +Create a new face-varying channel with the given number of values. │ │ │ │ │ +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_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_g_e_t_N_u_m_B_a_s_e_E_d_g_e_s │ │ │ │ │ +static int getNumBaseEdges(TopologyRefiner const &newRefiner) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h_:_4_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_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_s_e_t_N_u_m_B_a_s_e_V_e_r_t_i_c_e_s │ │ │ │ │ +static void setNumBaseVertices(TopologyRefiner &newRefiner, int count) │ │ │ │ │ +Specify the number of vertices to be accommodated. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_s_e_t_B_a_s_e_F_a_c_e_H_o_l_e │ │ │ │ │ +static void setBaseFaceHole(TopologyRefiner &newRefiner, Index f, bool isHole) │ │ │ │ │ +Tag a face as a hole. │ │ │ │ │ +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_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_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_F_a_c_t_o_r_y_B_a_s_e │ │ │ │ │ +Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_A_s_s_i_g_n_m_e_n_t │ │ │ │ │ +static bool prepareComponentTopologyAssignment(TopologyRefiner &refiner, bool │ │ │ │ │ +fullValidation, TopologyCallback callback, void const *callbackData) │ │ │ │ │ +_O_p_e_n_S_u_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_B_a_s_e_:_: │ │ │ │ │ +_T_o_p_o_l_o_g_y_C_a_l_l_b_a_c_k │ │ │ │ │ +Vtr::internal::Level::ValidationCallback TopologyCallback │ │ │ │ │ +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_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_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_a_g_s_A_n_d_S_h_a_r_p_n_e_s_s │ │ │ │ │ +static bool prepareComponentTagsAndSharpness(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_p_r_e_p_a_r_e_C_o_m_p_o_n_e_n_t_T_o_p_o_l_o_g_y_S_i_z_i_n_g │ │ │ │ │ +static bool prepareComponentTopologySizing(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e_:_: │ │ │ │ │ +_p_r_e_p_a_r_e_F_a_c_e_V_a_r_y_i_n_g_C_h_a_n_n_e_l_s │ │ │ │ │ +static bool prepareFaceVaryingChannels(TopologyRefiner &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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options related to the construction of each TopologyRefiner. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options(Sdc::SchemeType sdcType=Sdc::SCHEME_CATMARK, Sdc::Options │ │ │ │ │ +sdcOptions=Sdc::Options()) │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_s_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ +Sdc::Options schemeOptions │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_s_c_h_e_m_e_T_y_p_e │ │ │ │ │ +Sdc::SchemeType schemeType │ │ │ │ │ +The subdivision scheme type identifier. │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_v_a_l_i_d_a_t_e_F_u_l_l_T_o_p_o_l_o_g_y │ │ │ │ │ +unsigned int validateFullTopology │ │ │ │ │ +DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_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_:_:_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_:_:_V_t_r_:_:_A_r_r_a_y │ │ │ │ │ DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_0_5 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/error.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/patchParam.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,78 +88,53 @@ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ +Classes | │ │ │ │ Namespaces | │ │ │ │ -Typedefs | │ │ │ │ -Enumerations | │ │ │ │ -Functions
    │ │ │ │ -
    error.h File Reference
    │ │ │ │ +Typedefs
    │ │ │ │ +
    patchParam.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include "../far/types.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ +Classes

    struct  PatchParam
     Patch parameterization. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

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

    │ │ │ │ Typedefs

    typedef void(* ErrorCallbackFunc) (ErrorType err, const char *message)
     The error callback function type (default is "printf")
     
    typedef void(* WarningCallbackFunc) (const char *message)
     The warning callback function type (default is "printf")
     
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

    │ │ │ │ -Enumerations

    enum  ErrorType {
    │ │ │ │ -  FAR_NO_ERROR │ │ │ │ -,
    │ │ │ │ -  FAR_FATAL_ERROR │ │ │ │ -,
    │ │ │ │ -  FAR_INTERNAL_CODING_ERROR │ │ │ │ -,
    │ │ │ │ -  FAR_CODING_ERROR │ │ │ │ -,
    │ │ │ │ -  FAR_RUNTIME_ERROR │ │ │ │ -
    │ │ │ │ - }
     
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

    │ │ │ │ -Functions

    void SetErrorCallback (ErrorCallbackFunc func)
     Sets the error callback function (default is "printf")
     
    void SetWarningCallback (WarningCallbackFunc func)
     Sets the warning callback function (default is "printf")
     
    void Error (ErrorType err, const char *format,...)
     Sends an OSD error with a message (internal use only)
     
    void Warning (const char *format,...)
     Sends an OSD warning message (internal use only)
     
    typedef std::vector< PatchParamPatchParamTable
     
    typedef Vtr::Array< PatchParamPatchParamArray
     
    typedef Vtr::ConstArray< PatchParamConstPatchParamArray
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,48 +1,31 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_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 │ │ │ │ │ -error.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 │ │ │ │ │ +patchParam.h File Reference │ │ │ │ │ #include "../version.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 │ │ │ │ │ +struct   _P_a_t_c_h_P_a_r_a_m │ │ │ │ │ +  Patch parameterization. _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 │ │ │ │ │   │ │ │ │ │ TTyyppeeddeeffss │ │ │ │ │ -typedef void(*  _E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c) (_E_r_r_o_r_T_y_p_e err, const char *message) │ │ │ │ │ -  The error callback function type (default is "printf") │ │ │ │ │ -  │ │ │ │ │ -typedef void(*  _W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c) (const char *message) │ │ │ │ │ -  The warning callback function type (default is "printf") │ │ │ │ │ -  │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ -enum   _E_r_r_o_r_T_y_p_e { │ │ │ │ │ -   _F_A_R___N_O___E_R_R_O_R , │ │ │ │ │ -   _F_A_R___F_A_T_A_L___E_R_R_O_R , │ │ │ │ │ -   _F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R , │ │ │ │ │ -   _F_A_R___C_O_D_I_N_G___E_R_R_O_R , │ │ │ │ │ -   _F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ - } │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -void  _S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k (_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c func) │ │ │ │ │ -  Sets the error callback function (default is "printf") │ │ │ │ │ -  │ │ │ │ │ -void  _S_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k (_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c func) │ │ │ │ │ -  Sets the warning callback function (default is "printf") │ │ │ │ │ + typedef std::vector< _P_a_t_c_h_P_a_r_a_m >  _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │   │ │ │ │ │ -void  _E_r_r_o_r (_E_r_r_o_r_T_y_p_e err, const char *format,...) │ │ │ │ │ -  Sends an OSD error with a message (internal use only) │ │ │ │ │ + typedef _V_t_r_:_:_A_r_r_a_y< _P_a_t_c_h_P_a_r_a_m >  _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │   │ │ │ │ │ -void  _W_a_r_n_i_n_g (const char *format,...) │ │ │ │ │ -  Sends an OSD warning message (internal use only) │ │ │ │ │ +typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y< _P_a_t_c_h_P_a_r_a_m >  _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _e_r_r_o_r_._h │ │ │ │ │ + * _p_a_t_c_h_P_a_r_a_m_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00896.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,15 +1,6 @@ │ │ │ │ │ var a00896 = [ │ │ │ │ │ - ["ErrorCallbackFunc", "a00896.html#aa1630f297a91dfc683dfcfddeeebb2ac", null], │ │ │ │ │ - ["WarningCallbackFunc", "a00896.html#a2bd300390ebc686e71a3690f4a0b1726", null], │ │ │ │ │ - ["ErrorType", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45a", [ │ │ │ │ │ - ["FAR_NO_ERROR", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45aabeca977bc439b451aea1325f48a52a0b", null], │ │ │ │ │ - ["FAR_FATAL_ERROR", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45aa2a5bda2a3e25aa282462381f55284980", null], │ │ │ │ │ - ["FAR_INTERNAL_CODING_ERROR", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45aa3efe6cb2ec7e23769d53919dfb3291b5", null], │ │ │ │ │ - ["FAR_CODING_ERROR", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45aa9b2839feb039937015e9668f601e4d32", null], │ │ │ │ │ - ["FAR_RUNTIME_ERROR", "a00896.html#ab0df38968e4f03a3f1f6d6df0f31f45aac565fa39d681e2766584dd87246c3bdd", null] │ │ │ │ │ - ]], │ │ │ │ │ - ["Error", "a00896.html#a25d51c3a61fb3dacded6e48d01fd2fdb", null], │ │ │ │ │ - ["SetErrorCallback", "a00896.html#a3ba4fd4ed534a5c9c32ad01fa88bb8d9", null], │ │ │ │ │ - ["SetWarningCallback", "a00896.html#a73bbe6b41209e4c34234f192f0193a63", null], │ │ │ │ │ - ["Warning", "a00896.html#a97d41b6faaf421937e6b82bd1c3067db", null] │ │ │ │ │ + ["PatchParam", "a00989.html", "a00989"], │ │ │ │ │ + ["ConstPatchParamArray", "a00896.html#a3139c7c52ddf26b2403e8e95ff63eeb3", null], │ │ │ │ │ + ["PatchParamArray", "a00896.html#abe07210a029a01571c54276ae28b4d88", null], │ │ │ │ │ + ["PatchParamTable", "a00896.html#a46ea68db89cc3d55c4191ef7648281ce", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00896_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/error.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/patchParam.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    error.h
    │ │ │ │ +
    patchParam.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,80 +119,214 @@ │ │ │ │
    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_ERROR_H
    │ │ │ │ -
    26#define OPENSUBDIV3_FAR_ERROR_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_PATCH_PARAM_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_PATCH_PARAM_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30namespace OpenSubdiv {
    │ │ │ │ -
    31namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    32
    │ │ │ │ -
    33namespace Far {
    │ │ │ │ +
    30#include "../far/types.h"
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │
    34
    │ │ │ │ -
    │ │ │ │ -
    35typedef enum {
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    │ │ │ │ -
    42
    │ │ │ │ -
    43
    │ │ │ │ -
    45typedef void (*ErrorCallbackFunc)(ErrorType err, const char *message);
    │ │ │ │ -
    46
    │ │ │ │ - │ │ │ │ -
    54
    │ │ │ │ -
    55
    │ │ │ │ -
    57typedef void (*WarningCallbackFunc)(const char *message);
    │ │ │ │ -
    58
    │ │ │ │ - │ │ │ │ -
    66
    │ │ │ │ -
    67
    │ │ │ │ -
    68//
    │ │ │ │ -
    69// The following are intended for internal use only (and will eventually
    │ │ │ │ -
    70// be moved within namespace internal)
    │ │ │ │ -
    71//
    │ │ │ │ -
    72
    │ │ │ │ -
    79void Error(ErrorType err, const char *format, ...);
    │ │ │ │ -
    80
    │ │ │ │ -
    85void Warning(const char *format, ...);
    │ │ │ │ -
    86
    │ │ │ │ -
    87
    │ │ │ │ -
    88} // end namespace
    │ │ │ │ -
    89
    │ │ │ │ -
    90} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    91using namespace OPENSUBDIV_VERSION;
    │ │ │ │ -
    92
    │ │ │ │ -
    93} // end namespace OpenSubdiv
    │ │ │ │ -
    94
    │ │ │ │ -
    95#endif // OPENSUBDIV3_FAR_ERROR_H
    │ │ │ │ - │ │ │ │ -
    void Error(ErrorType err, const char *format,...)
    Sends an OSD error with a message (internal use only)
    │ │ │ │ -
    void(* WarningCallbackFunc)(const char *message)
    The warning callback function type (default is "printf")
    Definition error.h:57
    │ │ │ │ -
    void SetErrorCallback(ErrorCallbackFunc func)
    Sets the error callback function (default is "printf")
    │ │ │ │ -
    void SetWarningCallback(WarningCallbackFunc func)
    Sets the warning callback function (default is "printf")
    │ │ │ │ -
    void Warning(const char *format,...)
    Sends an OSD warning message (internal use only)
    │ │ │ │ -
    void(* ErrorCallbackFunc)(ErrorType err, const char *message)
    The error callback function type (default is "printf")
    Definition error.h:45
    │ │ │ │ - │ │ │ │ -
    @ FAR_FATAL_ERROR
    Issue a fatal error and end the program.
    Definition error.h:37
    │ │ │ │ -
    @ FAR_INTERNAL_CODING_ERROR
    Issue an internal programming error, but continue execution.
    Definition error.h:38
    │ │ │ │ -
    @ FAR_CODING_ERROR
    Issue a generic programming error, but continue execution.
    Definition error.h:39
    │ │ │ │ -
    @ FAR_NO_ERROR
    No error. Move along.
    Definition error.h:36
    │ │ │ │ -
    @ FAR_RUNTIME_ERROR
    Issue a generic runtime error, but continue execution.
    Definition error.h:40
    │ │ │ │ +
    35namespace Far {
    │ │ │ │ +
    36
    │ │ │ │ +
    101
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    168 void Set(Index faceid, short u, short v,
    │ │ │ │ +
    169 unsigned short depth, bool nonquad,
    │ │ │ │ +
    170 unsigned short boundary, unsigned short transition,
    │ │ │ │ +
    171 bool regular = false);
    │ │ │ │ +
    172
    │ │ │ │ +
    174 void Clear() { field0 = field1 = 0; }
    │ │ │ │ +
    175
    │ │ │ │ +
    177 Index GetFaceId() const { return Index(unpack(field0,28,0)); }
    │ │ │ │ +
    178
    │ │ │ │ +
    181 unsigned short GetU() const { return (unsigned short)unpack(field1,10,22); }
    │ │ │ │ +
    182
    │ │ │ │ +
    185 unsigned short GetV() const { return (unsigned short)unpack(field1,10,12); }
    │ │ │ │ +
    186
    │ │ │ │ +
    188 unsigned short GetTransition() const { return (unsigned short)unpack(field0,4,28); }
    │ │ │ │ +
    189
    │ │ │ │ +
    191 unsigned short GetBoundary() const { return (unsigned short)unpack(field1,5,7); }
    │ │ │ │ +
    192
    │ │ │ │ +
    194 bool NonQuadRoot() const { return (unpack(field1,1,4) != 0); }
    │ │ │ │ +
    195
    │ │ │ │ +
    197 unsigned short GetDepth() const { return (unsigned short)unpack(field1,4,0); }
    │ │ │ │ +
    198
    │ │ │ │ +
    200 float GetParamFraction() const;
    │ │ │ │ +
    201
    │ │ │ │ +
    208 template <typename REAL>
    │ │ │ │ +
    209 void Normalize( REAL & u, REAL & v ) const;
    │ │ │ │ +
    210 template <typename REAL>
    │ │ │ │ +
    211 void NormalizeTriangle( REAL & u, REAL & v ) const;
    │ │ │ │ +
    212
    │ │ │ │ +
    219 template <typename REAL>
    │ │ │ │ +
    220 void Unnormalize( REAL & u, REAL & v ) const;
    │ │ │ │ +
    221 template <typename REAL>
    │ │ │ │ +
    222 void UnnormalizeTriangle( REAL & u, REAL & v ) const;
    │ │ │ │ +
    223
    │ │ │ │ +
    225 bool IsTriangleRotated() const;
    │ │ │ │ +
    226
    │ │ │ │ +
    228 bool IsRegular() const { return (unpack(field1,1,5) != 0); }
    │ │ │ │ +
    229
    │ │ │ │ +
    230 unsigned int field0:32;
    │ │ │ │ +
    231 unsigned int field1:32;
    │ │ │ │ +
    232
    │ │ │ │ +
    233private:
    │ │ │ │ +
    234 unsigned int pack(unsigned int value, int width, int offset) const {
    │ │ │ │ +
    235 return (unsigned int)((value & ((1<<width)-1)) << offset);
    │ │ │ │ +
    236 }
    │ │ │ │ +
    237
    │ │ │ │ +
    238 unsigned int unpack(unsigned int value, int width, int offset) const {
    │ │ │ │ +
    239 return (unsigned int)((value >> offset) & ((1<<width)-1));
    │ │ │ │ +
    240 }
    │ │ │ │ +
    241};
    │ │ │ │ +
    │ │ │ │ +
    242
    │ │ │ │ +
    243typedef std::vector<PatchParam> PatchParamTable;
    │ │ │ │ +
    244
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    247
    │ │ │ │ +
    248inline void
    │ │ │ │ +
    │ │ │ │ +
    249PatchParam::Set(Index faceid, short u, short v,
    │ │ │ │ +
    250 unsigned short depth, bool nonquad,
    │ │ │ │ +
    251 unsigned short boundary, unsigned short transition,
    │ │ │ │ +
    252 bool regular) {
    │ │ │ │ +
    253 field0 = pack(faceid, 28, 0) |
    │ │ │ │ +
    254 pack(transition, 4, 28);
    │ │ │ │ +
    255
    │ │ │ │ +
    256 field1 = pack(u, 10, 22) |
    │ │ │ │ +
    257 pack(v, 10, 12) |
    │ │ │ │ +
    258 pack(boundary, 5, 7) |
    │ │ │ │ +
    259 pack(regular, 1, 5) |
    │ │ │ │ +
    260 pack(nonquad, 1, 4) |
    │ │ │ │ +
    261 pack(depth, 4, 0);
    │ │ │ │ +
    262}
    │ │ │ │ +
    │ │ │ │ +
    263
    │ │ │ │ +
    264inline float
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    266 return 1.0f / (float)(1 << (GetDepth() - NonQuadRoot()));
    │ │ │ │ +
    267}
    │ │ │ │ +
    │ │ │ │ +
    268
    │ │ │ │ +
    269template <typename REAL>
    │ │ │ │ +
    270inline void
    │ │ │ │ +
    │ │ │ │ +
    271PatchParam::Normalize( REAL & u, REAL & v ) const {
    │ │ │ │ +
    272
    │ │ │ │ +
    273 REAL fracInv = (REAL)(1.0f / GetParamFraction());
    │ │ │ │ +
    274
    │ │ │ │ +
    275 u = u * fracInv - (REAL)GetU();
    │ │ │ │ +
    276 v = v * fracInv - (REAL)GetV();
    │ │ │ │ +
    277}
    │ │ │ │ +
    │ │ │ │ +
    278
    │ │ │ │ +
    279template <typename REAL>
    │ │ │ │ +
    280inline void
    │ │ │ │ +
    │ │ │ │ +
    281PatchParam::Unnormalize( REAL & u, REAL & v ) const {
    │ │ │ │ +
    282
    │ │ │ │ +
    283 REAL frac = (REAL)GetParamFraction();
    │ │ │ │ +
    284
    │ │ │ │ +
    285 u = (u + (REAL)GetU()) * frac;
    │ │ │ │ +
    286 v = (v + (REAL)GetV()) * frac;
    │ │ │ │ +
    287}
    │ │ │ │ +
    │ │ │ │ +
    288
    │ │ │ │ +
    289inline bool
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    291
    │ │ │ │ +
    292 return (GetU() + GetV()) >= (1 << GetDepth());
    │ │ │ │ +
    293}
    │ │ │ │ +
    │ │ │ │ +
    294
    │ │ │ │ +
    295template <typename REAL>
    │ │ │ │ +
    296inline void
    │ │ │ │ +
    │ │ │ │ +
    297PatchParam::NormalizeTriangle( REAL & u, REAL & v ) const {
    │ │ │ │ +
    298
    │ │ │ │ +
    299 if (IsTriangleRotated()) {
    │ │ │ │ +
    300 REAL fracInv = (REAL)(1.0f / GetParamFraction());
    │ │ │ │ +
    301
    │ │ │ │ +
    302 int depthFactor = 1 << GetDepth();
    │ │ │ │ +
    303 u = (REAL)(depthFactor - GetU()) - (u * fracInv);
    │ │ │ │ +
    304 v = (REAL)(depthFactor - GetV()) - (v * fracInv);
    │ │ │ │ +
    305 } else {
    │ │ │ │ +
    306 Normalize(u, v);
    │ │ │ │ +
    307 }
    │ │ │ │ +
    308}
    │ │ │ │ +
    │ │ │ │ +
    309
    │ │ │ │ +
    310template <typename REAL>
    │ │ │ │ +
    311inline void
    │ │ │ │ +
    │ │ │ │ +
    312PatchParam::UnnormalizeTriangle( REAL & u, REAL & v ) const {
    │ │ │ │ +
    313
    │ │ │ │ +
    314 if (IsTriangleRotated()) {
    │ │ │ │ +
    315 REAL frac = GetParamFraction();
    │ │ │ │ +
    316
    │ │ │ │ +
    317 int depthFactor = 1 << GetDepth();
    │ │ │ │ +
    318 u = ((REAL)(depthFactor - GetU()) - u) * frac;
    │ │ │ │ +
    319 v = ((REAL)(depthFactor - GetV()) - v) * frac;
    │ │ │ │ +
    320 } else {
    │ │ │ │ +
    321 Unnormalize(u, v);
    │ │ │ │ +
    322 }
    │ │ │ │ +
    323}
    │ │ │ │ +
    │ │ │ │ +
    324
    │ │ │ │ +
    325} // end namespace Far
    │ │ │ │ +
    326
    │ │ │ │ +
    327} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    328using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    329
    │ │ │ │ +
    330} // end namespace OpenSubdiv
    │ │ │ │ +
    331
    │ │ │ │ +
    332#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */
    │ │ │ │ + │ │ │ │ +
    Vtr::ConstArray< PatchParam > ConstPatchParamArray
    Definition patchParam.h:246
    │ │ │ │ +
    std::vector< PatchParam > PatchParamTable
    Definition patchParam.h:243
    │ │ │ │ + │ │ │ │ +
    Vtr::Array< PatchParam > PatchParamArray
    Definition patchParam.h:245
    │ │ │ │ + │ │ │ │ +
    bool IsTriangleRotated() const
    Returns if a triangular patch is parametrically rotated 180 degrees.
    Definition patchParam.h:290
    │ │ │ │ +
    bool IsRegular() const
    Returns whether the patch is regular.
    Definition patchParam.h:228
    │ │ │ │ +
    void NormalizeTriangle(REAL &u, REAL &v) const
    Definition patchParam.h:297
    │ │ │ │ +
    unsigned short GetBoundary() const
    Returns the boundary edge encoding for the patch.
    Definition patchParam.h:191
    │ │ │ │ +
    unsigned short GetTransition() const
    Returns the transition edge encoding for the patch.
    Definition patchParam.h:188
    │ │ │ │ +
    float GetParamFraction() const
    Returns the fraction of unit parametric space covered by this face.
    Definition patchParam.h:265
    │ │ │ │ +
    unsigned short GetU() const
    Returns the log2 value of the u parameter at the first corner of the patch.
    Definition patchParam.h:181
    │ │ │ │ +
    Index GetFaceId() const
    Returns the faceid.
    Definition patchParam.h:177
    │ │ │ │ +
    unsigned short GetDepth() const
    Returns the level of subdivision of the patch.
    Definition patchParam.h:197
    │ │ │ │ +
    bool NonQuadRoot() const
    True if the parent base face is a non-quad.
    Definition patchParam.h:194
    │ │ │ │ +
    void Set(Index faceid, short u, short v, unsigned short depth, bool nonquad, unsigned short boundary, unsigned short transition, bool regular=false)
    Sets the values of the bit fields.
    Definition patchParam.h:249
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    void Unnormalize(REAL &u, REAL &v) const
    A (u,v) pair in a normalized parametric space is mapped back into the fraction of parametric space co...
    Definition patchParam.h:281
    │ │ │ │ +
    void UnnormalizeTriangle(REAL &u, REAL &v) const
    Definition patchParam.h:312
    │ │ │ │ +
    unsigned short GetV() const
    Returns the log2 value of the v parameter at the first corner of the patch.
    Definition patchParam.h:185
    │ │ │ │ + │ │ │ │ +
    void Normalize(REAL &u, REAL &v) const
    A (u,v) pair in the fraction of parametric space covered by this face is mapped into a normalized par...
    Definition patchParam.h:271
    │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -error.h │ │ │ │ │ +patchParam.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,103 +24,262 @@ │ │ │ │ │ 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_ERROR_H │ │ │ │ │ -26#define OPENSUBDIV3_FAR_ERROR_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_PATCH_PARAM_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_PATCH_PARAM_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -31namespace OPENSUBDIV_VERSION { │ │ │ │ │ -32 │ │ │ │ │ -33namespace Far { │ │ │ │ │ +30#include "../far/types.h" │ │ │ │ │ +31 │ │ │ │ │ +32namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +33namespace OPENSUBDIV_VERSION { │ │ │ │ │ 34 │ │ │ │ │ -_3_5typedef enum { │ │ │ │ │ -_3_6 _F_A_R___N_O___E_R_R_O_R, │ │ │ │ │ -_3_7 _F_A_R___F_A_T_A_L___E_R_R_O_R, │ │ │ │ │ -_3_8 _F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R, │ │ │ │ │ -_3_9 _F_A_R___C_O_D_I_N_G___E_R_R_O_R, │ │ │ │ │ -40 _F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ -_4_1} _E_r_r_o_r_T_y_p_e; │ │ │ │ │ -42 │ │ │ │ │ -43 │ │ │ │ │ -_4_5typedef void (*_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c)(_E_r_r_o_r_T_y_p_e err, const char *message); │ │ │ │ │ -46 │ │ │ │ │ -_5_3void _S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k(_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c func); │ │ │ │ │ -54 │ │ │ │ │ -55 │ │ │ │ │ -_5_7typedef void (*_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c)(const char *message); │ │ │ │ │ -58 │ │ │ │ │ -_6_5void _S_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k(_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c func); │ │ │ │ │ -66 │ │ │ │ │ -67 │ │ │ │ │ -68// │ │ │ │ │ -69// The following are intended for internal use only (and will eventually │ │ │ │ │ -70// be moved within namespace internal) │ │ │ │ │ -71// │ │ │ │ │ -72 │ │ │ │ │ -_7_9void _E_r_r_o_r(_E_r_r_o_r_T_y_p_e err, const char *format, ...); │ │ │ │ │ -80 │ │ │ │ │ -_8_5void _W_a_r_n_i_n_g(const char *format, ...); │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -88} // end namespace │ │ │ │ │ -89 │ │ │ │ │ -90} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -91using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -92 │ │ │ │ │ -93} // end namespace OpenSubdiv │ │ │ │ │ -94 │ │ │ │ │ -95#endif // OPENSUBDIV3_FAR_ERROR_H │ │ │ │ │ +35namespace Far { │ │ │ │ │ +36 │ │ │ │ │ +101 │ │ │ │ │ +_1_5_2struct _P_a_t_c_h_P_a_r_a_m { │ │ │ │ │ +168 void _S_e_t(_I_n_d_e_x faceid, short u, short v, │ │ │ │ │ +169 unsigned short depth, bool nonquad, │ │ │ │ │ +170 unsigned short boundary, unsigned short transition, │ │ │ │ │ +171 bool regular = false); │ │ │ │ │ +172 │ │ │ │ │ +_1_7_4 void _C_l_e_a_r() { _f_i_e_l_d_0 = _f_i_e_l_d_1 = 0; } │ │ │ │ │ +175 │ │ │ │ │ +_1_7_7 _I_n_d_e_x _G_e_t_F_a_c_e_I_d() const { return _I_n_d_e_x(unpack(_f_i_e_l_d_0,28,0)); } │ │ │ │ │ +178 │ │ │ │ │ +_1_8_1 unsigned short _G_e_t_U() const { return (unsigned short)unpack(_f_i_e_l_d_1,10,22); │ │ │ │ │ +} │ │ │ │ │ +182 │ │ │ │ │ +_1_8_5 unsigned short _G_e_t_V() const { return (unsigned short)unpack(_f_i_e_l_d_1,10,12); │ │ │ │ │ +} │ │ │ │ │ +186 │ │ │ │ │ +_1_8_8 unsigned short _G_e_t_T_r_a_n_s_i_t_i_o_n() const { return (unsigned short)unpack │ │ │ │ │ +(_f_i_e_l_d_0,4,28); } │ │ │ │ │ +189 │ │ │ │ │ +_1_9_1 unsigned short _G_e_t_B_o_u_n_d_a_r_y() const { return (unsigned short)unpack │ │ │ │ │ +(_f_i_e_l_d_1,5,7); } │ │ │ │ │ +192 │ │ │ │ │ +_1_9_4 bool _N_o_n_Q_u_a_d_R_o_o_t() const { return (unpack(_f_i_e_l_d_1,1,4) != 0); } │ │ │ │ │ +195 │ │ │ │ │ +_1_9_7 unsigned short _G_e_t_D_e_p_t_h() const { return (unsigned short)unpack │ │ │ │ │ +(_f_i_e_l_d_1,4,0); } │ │ │ │ │ +198 │ │ │ │ │ +200 float _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n() const; │ │ │ │ │ +201 │ │ │ │ │ +208 template │ │ │ │ │ +209 void _N_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const; │ │ │ │ │ +210 template │ │ │ │ │ +211 void _N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const; │ │ │ │ │ +212 │ │ │ │ │ +219 template │ │ │ │ │ +220 void _U_n_n_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const; │ │ │ │ │ +221 template │ │ │ │ │ +222 void _U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const; │ │ │ │ │ +223 │ │ │ │ │ +225 bool _I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d() const; │ │ │ │ │ +226 │ │ │ │ │ +_2_2_8 bool _I_s_R_e_g_u_l_a_r() const { return (unpack(_f_i_e_l_d_1,1,5) != 0); } │ │ │ │ │ +229 │ │ │ │ │ +_2_3_0 unsigned int _f_i_e_l_d_0:32; │ │ │ │ │ +_2_3_1 unsigned int _f_i_e_l_d_1:32; │ │ │ │ │ +232 │ │ │ │ │ +233private: │ │ │ │ │ +234 unsigned int pack(unsigned int value, int width, int offset) const { │ │ │ │ │ +235 return (unsigned int)((value & ((1<> offset) & ((1< _P_a_t_c_h_P_a_r_a_m_T_a_b_l_e; │ │ │ │ │ +244 │ │ │ │ │ +_2_4_5typedef _V_t_r_:_:_A_r_r_a_y_<_P_a_t_c_h_P_a_r_a_m_> _P_a_t_c_h_P_a_r_a_m_A_r_r_a_y; │ │ │ │ │ +_2_4_6typedef _V_t_r_:_:_C_o_n_s_t_A_r_r_a_y_<_P_a_t_c_h_P_a_r_a_m_> _C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y; │ │ │ │ │ +247 │ │ │ │ │ +248inline void │ │ │ │ │ +_2_4_9_P_a_t_c_h_P_a_r_a_m_:_:_S_e_t(_I_n_d_e_x faceid, short u, short v, │ │ │ │ │ +250 unsigned short depth, bool nonquad, │ │ │ │ │ +251 unsigned short boundary, unsigned short transition, │ │ │ │ │ +252 bool regular) { │ │ │ │ │ +253 _f_i_e_l_d_0 = pack(faceid, 28, 0) | │ │ │ │ │ +254 pack(transition, 4, 28); │ │ │ │ │ +255 │ │ │ │ │ +256 _f_i_e_l_d_1 = pack(u, 10, 22) | │ │ │ │ │ +257 pack(v, 10, 12) | │ │ │ │ │ +258 pack(boundary, 5, 7) | │ │ │ │ │ +259 pack(regular, 1, 5) | │ │ │ │ │ +260 pack(nonquad, 1, 4) | │ │ │ │ │ +261 pack(depth, 4, 0); │ │ │ │ │ +262} │ │ │ │ │ +263 │ │ │ │ │ +264inline float │ │ │ │ │ +_2_6_5_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n( ) const { │ │ │ │ │ +266 return 1.0f / (float)(1 << (_G_e_t_D_e_p_t_h() - _N_o_n_Q_u_a_d_R_o_o_t())); │ │ │ │ │ +267} │ │ │ │ │ +268 │ │ │ │ │ +269template │ │ │ │ │ +270inline void │ │ │ │ │ +_2_7_1_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const { │ │ │ │ │ +272 │ │ │ │ │ +273 REAL fracInv = (REAL)(1.0f / _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n()); │ │ │ │ │ +274 │ │ │ │ │ +275 u = u * fracInv - (REAL)_G_e_t_U(); │ │ │ │ │ +276 v = v * fracInv - (REAL)_G_e_t_V(); │ │ │ │ │ +277} │ │ │ │ │ +278 │ │ │ │ │ +279template │ │ │ │ │ +280inline void │ │ │ │ │ +_2_8_1_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e( REAL & u, REAL & v ) const { │ │ │ │ │ +282 │ │ │ │ │ +283 REAL frac = (REAL)_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n(); │ │ │ │ │ +284 │ │ │ │ │ +285 u = (u + (REAL)_G_e_t_U()) * frac; │ │ │ │ │ +286 v = (v + (REAL)_G_e_t_V()) * frac; │ │ │ │ │ +287} │ │ │ │ │ +288 │ │ │ │ │ +289inline bool │ │ │ │ │ +_2_9_0_P_a_t_c_h_P_a_r_a_m_:_:_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d() const { │ │ │ │ │ +291 │ │ │ │ │ +292 return (_G_e_t_U() + _G_e_t_V()) >= (1 << _G_e_t_D_e_p_t_h()); │ │ │ │ │ +293} │ │ │ │ │ +294 │ │ │ │ │ +295template │ │ │ │ │ +296inline void │ │ │ │ │ +_2_9_7_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const { │ │ │ │ │ +298 │ │ │ │ │ +299 if (_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d()) { │ │ │ │ │ +300 REAL fracInv = (REAL)(1.0f / _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n()); │ │ │ │ │ +301 │ │ │ │ │ +302 int depthFactor = 1 << _G_e_t_D_e_p_t_h(); │ │ │ │ │ +303 u = (REAL)(depthFactor - _G_e_t_U()) - (u * fracInv); │ │ │ │ │ +304 v = (REAL)(depthFactor - _G_e_t_V()) - (v * fracInv); │ │ │ │ │ +305 } else { │ │ │ │ │ +306 _N_o_r_m_a_l_i_z_e(u, v); │ │ │ │ │ +307 } │ │ │ │ │ +308} │ │ │ │ │ +309 │ │ │ │ │ +310template │ │ │ │ │ +311inline void │ │ │ │ │ +_3_1_2_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e( REAL & u, REAL & v ) const { │ │ │ │ │ +313 │ │ │ │ │ +314 if (_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d()) { │ │ │ │ │ +315 REAL frac = _G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n(); │ │ │ │ │ +316 │ │ │ │ │ +317 int depthFactor = 1 << _G_e_t_D_e_p_t_h(); │ │ │ │ │ +318 u = ((REAL)(depthFactor - _G_e_t_U()) - u) * frac; │ │ │ │ │ +319 v = ((REAL)(depthFactor - _G_e_t_V()) - v) * frac; │ │ │ │ │ +320 } else { │ │ │ │ │ +321 _U_n_n_o_r_m_a_l_i_z_e(u, v); │ │ │ │ │ +322 } │ │ │ │ │ +323} │ │ │ │ │ +324 │ │ │ │ │ +325} // end namespace Far │ │ │ │ │ +326 │ │ │ │ │ +327} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +328using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +329 │ │ │ │ │ +330} // end namespace OpenSubdiv │ │ │ │ │ +331 │ │ │ │ │ +332#endif /* OPENSUBDIV3_FAR_PATCH_PARAM */ │ │ │ │ │ _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_:_:_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_:_:_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c │ │ │ │ │ -void(* WarningCallbackFunc)(const char *message) │ │ │ │ │ -The warning callback function type (default is "printf") │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_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_:_:_S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k │ │ │ │ │ -void SetErrorCallback(ErrorCallbackFunc func) │ │ │ │ │ -Sets the error callback function (default is "printf") │ │ │ │ │ -_O_p_e_n_S_u_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_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k │ │ │ │ │ -void SetWarningCallback(WarningCallbackFunc func) │ │ │ │ │ -Sets the warning callback function (default is "printf") │ │ │ │ │ -_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_W_a_r_n_i_n_g │ │ │ │ │ -void Warning(const char *format,...) │ │ │ │ │ -Sends an OSD warning 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_:_:_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c │ │ │ │ │ -void(* ErrorCallbackFunc)(ErrorType err, const char *message) │ │ │ │ │ -The error callback function type (default is "printf") │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_E_r_r_o_r_T_y_p_e │ │ │ │ │ -ErrorType │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._h_:_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_:_:_F_A_R___F_A_T_A_L___E_R_R_O_R │ │ │ │ │ -@ FAR_FATAL_ERROR │ │ │ │ │ -Issue a fatal error and end the program. │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_F_a_r_:_:_F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R │ │ │ │ │ -@ FAR_INTERNAL_CODING_ERROR │ │ │ │ │ -Issue an internal programming error, but continue execution. │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_F_a_r_:_:_F_A_R___C_O_D_I_N_G___E_R_R_O_R │ │ │ │ │ -@ FAR_CODING_ERROR │ │ │ │ │ -Issue a generic programming error, but continue execution. │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_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_:_:_F_a_r_:_:_F_A_R___N_O___E_R_R_O_R │ │ │ │ │ -@ FAR_NO_ERROR │ │ │ │ │ -No error. Move along. │ │ │ │ │ -DDeeffiinniittiioonn _e_r_r_o_r_._h_:_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_:_:_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_:_:_C_o_n_s_t_P_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ +Vtr::ConstArray< PatchParam > ConstPatchParamArray │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_a_t_c_h_P_a_r_a_m_T_a_b_l_e │ │ │ │ │ +std::vector< PatchParam > PatchParamTable │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_a_t_c_h_P_a_r_a_m_A_r_r_a_y │ │ │ │ │ +Vtr::Array< PatchParam > PatchParamArray │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_P_a_r_a_m │ │ │ │ │ +Patch parameterization. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_I_s_T_r_i_a_n_g_l_e_R_o_t_a_t_e_d │ │ │ │ │ +bool IsTriangleRotated() const │ │ │ │ │ +Returns if a triangular patch is parametrically rotated 180 degrees. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_I_s_R_e_g_u_l_a_r │ │ │ │ │ +bool IsRegular() const │ │ │ │ │ +Returns whether the patch is regular. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e │ │ │ │ │ +void NormalizeTriangle(REAL &u, REAL &v) const │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_B_o_u_n_d_a_r_y │ │ │ │ │ +unsigned short GetBoundary() const │ │ │ │ │ +Returns the boundary edge encoding for the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_T_r_a_n_s_i_t_i_o_n │ │ │ │ │ +unsigned short GetTransition() const │ │ │ │ │ +Returns the transition edge encoding for the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_P_a_r_a_m_F_r_a_c_t_i_o_n │ │ │ │ │ +float GetParamFraction() const │ │ │ │ │ +Returns the fraction of unit parametric space covered by this face. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_U │ │ │ │ │ +unsigned short GetU() const │ │ │ │ │ +Returns the log2 value of the u parameter at the first corner of the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_F_a_c_e_I_d │ │ │ │ │ +Index GetFaceId() const │ │ │ │ │ +Returns the faceid. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_D_e_p_t_h │ │ │ │ │ +unsigned short GetDepth() const │ │ │ │ │ +Returns the level of subdivision of the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_n_Q_u_a_d_R_o_o_t │ │ │ │ │ +bool NonQuadRoot() const │ │ │ │ │ +True if the parent base face is a non-quad. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_a_t_c_h_P_a_r_a_m_:_:_S_e_t │ │ │ │ │ +void Set(Index faceid, short u, short v, unsigned short depth, bool nonquad, │ │ │ │ │ +unsigned short boundary, unsigned short transition, bool regular=false) │ │ │ │ │ +Sets the values of the bit fields. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_C_l_e_a_r │ │ │ │ │ +void Clear() │ │ │ │ │ +Resets everything to 0. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_f_i_e_l_d_1 │ │ │ │ │ +unsigned int field1 │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e │ │ │ │ │ +void Unnormalize(REAL &u, REAL &v) const │ │ │ │ │ +A (u,v) pair in a normalized parametric space is mapped back into the fraction │ │ │ │ │ +of parametric space co... │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_U_n_n_o_r_m_a_l_i_z_e_T_r_i_a_n_g_l_e │ │ │ │ │ +void UnnormalizeTriangle(REAL &u, REAL &v) const │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_G_e_t_V │ │ │ │ │ +unsigned short GetV() const │ │ │ │ │ +Returns the log2 value of the v parameter at the first corner of the patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_1_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_:_:_P_a_t_c_h_P_a_r_a_m_:_:_f_i_e_l_d_0 │ │ │ │ │ +unsigned int field0 │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_P_a_r_a_m_:_:_N_o_r_m_a_l_i_z_e │ │ │ │ │ +void Normalize(REAL &u, REAL &v) const │ │ │ │ │ +A (u,v) pair in the fraction of parametric space covered by this face is mapped │ │ │ │ │ +into a normalized par... │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_P_a_r_a_m_._h_:_2_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_:_:_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_:_:_A_r_r_a_y │ │ │ │ │ +DDeeffiinniittiioonn _a_r_r_a_y_._h_:_1_0_5 │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _e_r_r_o_r_._h │ │ │ │ │ + * _p_a_t_c_h_P_a_r_a_m_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/far/topologyRefiner.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/error.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,55 +88,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ -Namespaces
    │ │ │ │ -
    topologyRefiner.h File Reference
    │ │ │ │ +Namespaces | │ │ │ │ +Typedefs | │ │ │ │ +Enumerations | │ │ │ │ +Functions
    │ │ │ │ +
    error.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../sdc/types.h"
    │ │ │ │ -#include "../sdc/options.h"
    │ │ │ │ -#include "../far/types.h"
    │ │ │ │ -#include "../far/topologyLevel.h"
    │ │ │ │ -#include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  TopologyRefiner
     Stores topology data for a specified set of refinement options. More...
     
    struct  TopologyRefiner::UniformOptions
     Uniform refinement options. More...
     
    struct  TopologyRefiner::AdaptiveOptions
     Adaptive refinement options. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Vtr
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

    │ │ │ │ +Typedefs

    typedef void(* ErrorCallbackFunc) (ErrorType err, const char *message)
     The error callback function type (default is "printf")
     
    typedef void(* WarningCallbackFunc) (const char *message)
     The warning callback function type (default is "printf")
     
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

    │ │ │ │ +Enumerations

    enum  ErrorType {
    │ │ │ │ +  FAR_NO_ERROR │ │ │ │ +,
    │ │ │ │ +  FAR_FATAL_ERROR │ │ │ │ +,
    │ │ │ │ +  FAR_INTERNAL_CODING_ERROR │ │ │ │ +,
    │ │ │ │ +  FAR_CODING_ERROR │ │ │ │ +,
    │ │ │ │ +  FAR_RUNTIME_ERROR │ │ │ │ +
    │ │ │ │ + }
     
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

    │ │ │ │ +Functions

    void SetErrorCallback (ErrorCallbackFunc func)
     Sets the error callback function (default is "printf")
     
    void SetWarningCallback (WarningCallbackFunc func)
     Sets the warning callback function (default is "printf")
     
    void Error (ErrorType err, const char *format,...)
     Sends an OSD error with a message (internal use only)
     
    void Warning (const char *format,...)
     Sends an OSD warning message (internal use only)
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,48 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -topologyRefiner.h File Reference │ │ │ │ │ +_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 │ │ │ │ │ +error.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 "_._._/_f_a_r_/_t_y_p_e_s_._h" │ │ │ │ │ -#include "_._._/_f_a_r_/_t_o_p_o_l_o_g_y_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_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ - class   _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. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _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. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _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. _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_:_:_V_t_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_:_:_F_a_r │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +typedef void(*  _E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c) (_E_r_r_o_r_T_y_p_e err, const char *message) │ │ │ │ │ +  The error callback function type (default is "printf") │ │ │ │ │ +  │ │ │ │ │ +typedef void(*  _W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c) (const char *message) │ │ │ │ │ +  The warning callback function type (default is "printf") │ │ │ │ │ +  │ │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ │ +enum   _E_r_r_o_r_T_y_p_e { │ │ │ │ │ +   _F_A_R___N_O___E_R_R_O_R , │ │ │ │ │ +   _F_A_R___F_A_T_A_L___E_R_R_O_R , │ │ │ │ │ +   _F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R , │ │ │ │ │ +   _F_A_R___C_O_D_I_N_G___E_R_R_O_R , │ │ │ │ │ +   _F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ + } │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +void  _S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k (_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c func) │ │ │ │ │ +  Sets the error callback function (default is "printf") │ │ │ │ │ +  │ │ │ │ │ +void  _S_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k (_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c func) │ │ │ │ │ +  Sets the warning callback function (default is "printf") │ │ │ │ │ +  │ │ │ │ │ +void  _E_r_r_o_r (_E_r_r_o_r_T_y_p_e err, const char *format,...) │ │ │ │ │ +  Sends an OSD error with a message (internal use only) │ │ │ │ │ +  │ │ │ │ │ +void  _W_a_r_n_i_n_g (const char *format,...) │ │ │ │ │ +  Sends an OSD warning message (internal use only) │ │ │ │ │ +  │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h │ │ │ │ │ + * _e_r_r_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00899.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,5 +1,15 @@ │ │ │ │ │ var a00899 = [ │ │ │ │ │ - ["TopologyRefiner", "a01113.html", "a01113"], │ │ │ │ │ - ["UniformOptions", "a01117.html", "a01117"], │ │ │ │ │ - ["AdaptiveOptions", "a01121.html", "a01121"] │ │ │ │ │ + ["ErrorCallbackFunc", "a00899.html#aa1630f297a91dfc683dfcfddeeebb2ac", null], │ │ │ │ │ + ["WarningCallbackFunc", "a00899.html#a2bd300390ebc686e71a3690f4a0b1726", null], │ │ │ │ │ + ["ErrorType", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45a", [ │ │ │ │ │ + ["FAR_NO_ERROR", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45aabeca977bc439b451aea1325f48a52a0b", null], │ │ │ │ │ + ["FAR_FATAL_ERROR", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45aa2a5bda2a3e25aa282462381f55284980", null], │ │ │ │ │ + ["FAR_INTERNAL_CODING_ERROR", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45aa3efe6cb2ec7e23769d53919dfb3291b5", null], │ │ │ │ │ + ["FAR_CODING_ERROR", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45aa9b2839feb039937015e9668f601e4d32", null], │ │ │ │ │ + ["FAR_RUNTIME_ERROR", "a00899.html#ab0df38968e4f03a3f1f6d6df0f31f45aac565fa39d681e2766584dd87246c3bdd", null] │ │ │ │ │ + ]], │ │ │ │ │ + ["Error", "a00899.html#a25d51c3a61fb3dacded6e48d01fd2fdb", null], │ │ │ │ │ + ["SetErrorCallback", "a00899.html#a3ba4fd4ed534a5c9c32ad01fa88bb8d9", null], │ │ │ │ │ + ["SetWarningCallback", "a00899.html#a73bbe6b41209e4c34234f192f0193a63", null], │ │ │ │ │ + ["Warning", "a00899.html#a97d41b6faaf421937e6b82bd1c3067db", null] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00899_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/topologyRefiner.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/error.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    topologyRefiner.h
    │ │ │ │ +
    error.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,305 +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_TOPOLOGY_REFINER_H
    │ │ │ │ -
    25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H
    │ │ │ │ -
    26
    │ │ │ │ -
    27#include "../version.h"
    │ │ │ │ -
    28
    │ │ │ │ -
    29#include "../sdc/types.h"
    │ │ │ │ -
    30#include "../sdc/options.h"
    │ │ │ │ -
    31#include "../far/types.h"
    │ │ │ │ -
    32#include "../far/topologyLevel.h"
    │ │ │ │ -
    33
    │ │ │ │ -
    34#include <vector>
    │ │ │ │ -
    35
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace OpenSubdiv {
    │ │ │ │ -
    38namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    39
    │ │ │ │ -
    40namespace Vtr { namespace internal { class SparseSelector; } }
    │ │ │ │ -
    41namespace Far { namespace internal { class FeatureMask; } }
    │ │ │ │ +
    24
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_ERROR_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_ERROR_H
    │ │ │ │ +
    27
    │ │ │ │ +
    28#include "../version.h"
    │ │ │ │ +
    29
    │ │ │ │ +
    30namespace OpenSubdiv {
    │ │ │ │ +
    31namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    32
    │ │ │ │ +
    33namespace Far {
    │ │ │ │ +
    34
    │ │ │ │ +
    │ │ │ │ +
    35typedef enum {
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    │ │ │ │
    42
    │ │ │ │ -
    43namespace Far {
    │ │ │ │ -
    44
    │ │ │ │ -
    45template <typename REAL> class PrimvarRefinerReal;
    │ │ │ │ -
    46template <class MESH> class TopologyRefinerFactory;
    │ │ │ │ -
    47
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    52
    │ │ │ │ -
    53public:
    │ │ │ │ +
    43
    │ │ │ │ +
    45typedef void (*ErrorCallbackFunc)(ErrorType err, const char *message);
    │ │ │ │ +
    46
    │ │ │ │ + │ │ │ │
    54
    │ │ │ │ - │ │ │ │ -
    57
    │ │ │ │ - │ │ │ │ -
    60
    │ │ │ │ -
    62 Sdc::SchemeType GetSchemeType() const { return _subdivType; }
    │ │ │ │ -
    63
    │ │ │ │ -
    65 Sdc::Options GetSchemeOptions() const { return _subdivOptions; }
    │ │ │ │ +
    55
    │ │ │ │ +
    57typedef void (*WarningCallbackFunc)(const char *message);
    │ │ │ │ +
    58
    │ │ │ │ + │ │ │ │
    66
    │ │ │ │ -
    68 bool IsUniform() const { return _isUniform; }
    │ │ │ │ -
    69
    │ │ │ │ -
    71 int GetNumLevels() const { return (int)_farLevels.size(); }
    │ │ │ │ +
    67
    │ │ │ │ +
    68//
    │ │ │ │ +
    69// The following are intended for internal use only (and will eventually
    │ │ │ │ +
    70// be moved within namespace internal)
    │ │ │ │ +
    71//
    │ │ │ │
    72
    │ │ │ │ -
    74 int GetMaxLevel() const { return _maxLevel; }
    │ │ │ │ -
    75
    │ │ │ │ -
    77 int GetMaxValence() const { return _maxValence; }
    │ │ │ │ -
    78
    │ │ │ │ -
    80 bool HasHoles() const { return _hasHoles; }
    │ │ │ │ -
    81
    │ │ │ │ -
    83 int GetNumVerticesTotal() const { return _totalVertices; }
    │ │ │ │ -
    84
    │ │ │ │ -
    86 int GetNumEdgesTotal() const { return _totalEdges; }
    │ │ │ │ +
    79void Error(ErrorType err, const char *format, ...);
    │ │ │ │ +
    80
    │ │ │ │ +
    85void Warning(const char *format, ...);
    │ │ │ │ +
    86
    │ │ │ │
    87
    │ │ │ │ -
    89 int GetNumFacesTotal() const { return _totalFaces; }
    │ │ │ │ -
    90
    │ │ │ │ -
    92 int GetNumFaceVerticesTotal() const { return _totalFaceVertices; }
    │ │ │ │ -
    93
    │ │ │ │ -
    95 TopologyLevel const & GetLevel(int level) const { return _farLevels[level]; }
    │ │ │ │ -
    96
    │ │ │ │ -
    98
    │ │ │ │ -
    100
    │ │ │ │ -
    101 //
    │ │ │ │ -
    102 // Uniform refinement
    │ │ │ │ -
    103 //
    │ │ │ │ -
    104
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    119
    │ │ │ │ -
    │ │ │ │ -
    120 UniformOptions(int level) :
    │ │ │ │ -
    121 refinementLevel(level & 0xf),
    │ │ │ │ - │ │ │ │ -
    123 fullTopologyInLastLevel(false) { }
    │ │ │ │ -
    │ │ │ │ -
    124
    │ │ │ │ -
    126 void SetRefinementLevel(int level) { refinementLevel = level & 0xf; }
    │ │ │ │ -
    127
    │ │ │ │ -
    128 unsigned int refinementLevel:4,
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    134 };
    │ │ │ │ -
    │ │ │ │ -
    135
    │ │ │ │ - │ │ │ │ -
    147
    │ │ │ │ -
    149 UniformOptions GetUniformOptions() const { return _uniformOptions; }
    │ │ │ │ -
    150
    │ │ │ │ -
    151 //
    │ │ │ │ -
    152 // Adaptive refinement
    │ │ │ │ -
    153 //
    │ │ │ │ -
    154
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    157
    │ │ │ │ -
    │ │ │ │ -
    158 AdaptiveOptions(int level) :
    │ │ │ │ -
    159 isolationLevel(level & 0xf),
    │ │ │ │ -
    160 secondaryLevel(0xf),
    │ │ │ │ - │ │ │ │ -
    162 useInfSharpPatch(false),
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    │ │ │ │ -
    165
    │ │ │ │ -
    167 void SetIsolationLevel(int level) { isolationLevel = level & 0xf; }
    │ │ │ │ -
    168
    │ │ │ │ -
    170 void SetSecondaryLevel(int level) { secondaryLevel = level & 0xf; }
    │ │ │ │ -
    171
    │ │ │ │ -
    172 unsigned int isolationLevel:4;
    │ │ │ │ -
    174 unsigned int secondaryLevel:4;
    │ │ │ │ -
    176 unsigned int useSingleCreasePatch:1;
    │ │ │ │ -
    178 unsigned int useInfSharpPatch:1;
    │ │ │ │ -
    180 unsigned int considerFVarChannels:1;
    │ │ │ │ - │ │ │ │ -
    184 };
    │ │ │ │ -
    │ │ │ │ -
    185
    │ │ │ │ - │ │ │ │ -
    193 ConstIndexArray selectedFaces = ConstIndexArray());
    │ │ │ │ -
    194
    │ │ │ │ -
    196 AdaptiveOptions GetAdaptiveOptions() const { return _adaptiveOptions; }
    │ │ │ │ -
    197
    │ │ │ │ -
    199 void Unrefine();
    │ │ │ │ -
    200
    │ │ │ │ -
    201
    │ │ │ │ -
    203
    │ │ │ │ -
    205
    │ │ │ │ -
    207 int GetNumFVarChannels() const;
    │ │ │ │ -
    208
    │ │ │ │ - │ │ │ │ -
    211
    │ │ │ │ -
    213 int GetNumFVarValuesTotal(int channel = 0) const;
    │ │ │ │ -
    214
    │ │ │ │ -
    216
    │ │ │ │ -
    217protected:
    │ │ │ │ -
    218
    │ │ │ │ -
    219 //
    │ │ │ │ -
    220 // Lower level protected methods intended strictly for internal use:
    │ │ │ │ -
    221 //
    │ │ │ │ -
    222 template <class MESH>
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    225 friend class PatchTableBuilder;
    │ │ │ │ -
    226 friend class PatchBuilder;
    │ │ │ │ -
    227 friend class PtexIndices;
    │ │ │ │ -
    228 template <typename REAL>
    │ │ │ │ -
    229 friend class PrimvarRefinerReal;
    │ │ │ │ -
    230
    │ │ │ │ -
    231 // Copy constructor exposed via the factory class:
    │ │ │ │ - │ │ │ │ -
    233
    │ │ │ │ -
    234public:
    │ │ │ │ -
    235 // Levels and Refinements available internally (avoids need for more friends)
    │ │ │ │ -
    236 Vtr::internal::Level & getLevel(int l) { return *_levels[l]; }
    │ │ │ │ -
    237 Vtr::internal::Level const & getLevel(int l) const { return *_levels[l]; }
    │ │ │ │ -
    238
    │ │ │ │ -
    239 Vtr::internal::Refinement & getRefinement(int l) { return *_refinements[l]; }
    │ │ │ │ -
    240 Vtr::internal::Refinement const & getRefinement(int l) const { return *_refinements[l]; }
    │ │ │ │ -
    241
    │ │ │ │ -
    242private:
    │ │ │ │ -
    243 // Not default constructible or copyable:
    │ │ │ │ -
    244 TopologyRefiner() : _uniformOptions(0), _adaptiveOptions(0) { }
    │ │ │ │ -
    245 TopologyRefiner & operator=(TopologyRefiner const &) { return *this; }
    │ │ │ │ -
    246
    │ │ │ │ -
    247 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
    │ │ │ │ -
    248 internal::FeatureMask const & mask,
    │ │ │ │ -
    249 ConstIndexArray selectedFaces);
    │ │ │ │ -
    250 void selectLinearIrregularFaces(Vtr::internal::SparseSelector& selector,
    │ │ │ │ -
    251 ConstIndexArray selectedFaces);
    │ │ │ │ -
    252
    │ │ │ │ -
    253 void initializeInventory();
    │ │ │ │ -
    254 void updateInventory(Vtr::internal::Level const & newLevel);
    │ │ │ │ -
    255
    │ │ │ │ -
    256 void appendLevel(Vtr::internal::Level & newLevel);
    │ │ │ │ -
    257 void appendRefinement(Vtr::internal::Refinement & newRefinement);
    │ │ │ │ -
    258 void assembleFarLevels();
    │ │ │ │ -
    259
    │ │ │ │ -
    260private:
    │ │ │ │ -
    261
    │ │ │ │ -
    262 Sdc::SchemeType _subdivType;
    │ │ │ │ -
    263 Sdc::Options _subdivOptions;
    │ │ │ │ -
    264
    │ │ │ │ -
    265 unsigned int _isUniform : 1;
    │ │ │ │ -
    266 unsigned int _hasHoles : 1;
    │ │ │ │ -
    267 unsigned int _hasIrregFaces : 1;
    │ │ │ │ -
    268 unsigned int _regFaceSize : 3;
    │ │ │ │ -
    269 unsigned int _maxLevel : 4;
    │ │ │ │ -
    270
    │ │ │ │ -
    271 // Options assigned on refinement:
    │ │ │ │ -
    272 UniformOptions _uniformOptions;
    │ │ │ │ -
    273 AdaptiveOptions _adaptiveOptions;
    │ │ │ │ -
    274
    │ │ │ │ -
    275 // Cumulative properties of all levels:
    │ │ │ │ -
    276 int _totalVertices;
    │ │ │ │ -
    277 int _totalEdges;
    │ │ │ │ -
    278 int _totalFaces;
    │ │ │ │ -
    279 int _totalFaceVertices;
    │ │ │ │ -
    280 int _maxValence;
    │ │ │ │ -
    281
    │ │ │ │ -
    282 // Note the base level may be shared with another instance
    │ │ │ │ -
    283 bool _baseLevelOwned;
    │ │ │ │ -
    284
    │ │ │ │ -
    285 std::vector<Vtr::internal::Level *> _levels;
    │ │ │ │ -
    286 std::vector<Vtr::internal::Refinement *> _refinements;
    │ │ │ │ -
    287
    │ │ │ │ -
    288 std::vector<TopologyLevel> _farLevels;
    │ │ │ │ -
    289};
    │ │ │ │ -
    │ │ │ │ -
    290
    │ │ │ │ -
    291
    │ │ │ │ -
    292inline int
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    294
    │ │ │ │ -
    295 return _levels[0]->getNumFVarChannels();
    │ │ │ │ -
    296}
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    299
    │ │ │ │ -
    300 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
    │ │ │ │ -
    301}
    │ │ │ │ -
    │ │ │ │ -
    302
    │ │ │ │ -
    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.
    │ │ │ │ -
    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.
    │ │ │ │ -
    int GetNumFVarValuesTotal(int channel=0) const
    Returns the total number of face-varying values in all levels.
    │ │ │ │ -
    Vtr::internal::Refinement const & getRefinement(int l) const
    │ │ │ │ -
    Sdc::Options GetSchemeOptions() const
    Returns the subdivision options.
    │ │ │ │ - │ │ │ │ -
    bool IsUniform() const
    Returns true if uniform refinement has been applied.
    │ │ │ │ -
    Sdc::SchemeType GetSchemeType() const
    Returns the subdivision scheme.
    │ │ │ │ -
    int GetMaxLevel() const
    Returns the highest level of refinement.
    │ │ │ │ -
    TopologyRefiner(Sdc::SchemeType type, Sdc::Options options=Sdc::Options())
    Constructor.
    │ │ │ │ -
    int GetNumEdgesTotal() const
    Returns the total number of edges in all levels.
    │ │ │ │ - │ │ │ │ -
    int GetNumFVarChannels() const
    Returns the number of face-varying channels in the tables.
    │ │ │ │ -
    UniformOptions GetUniformOptions() const
    Returns the options specified on refinement.
    │ │ │ │ -
    int GetNumFacesTotal() const
    Returns the total number of edges in all levels.
    │ │ │ │ -
    int GetNumFaceVerticesTotal() const
    Returns the total number of face vertices in all levels.
    │ │ │ │ -
    Vtr::internal::Refinement & getRefinement(int l)
    │ │ │ │ -
    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.
    │ │ │ │ -
    int GetNumVerticesTotal() const
    Returns the total number of vertices in all levels.
    │ │ │ │ -
    void Unrefine()
    Unrefine the topology, keeping only the base level.
    │ │ │ │ -
    AdaptiveOptions GetAdaptiveOptions() const
    Returns the options specified on refinement.
    │ │ │ │ -
    Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const
    Returns the face-varying interpolation rule set for a given channel.
    │ │ │ │ -
    void RefineAdaptive(AdaptiveOptions options, ConstIndexArray selectedFaces=ConstIndexArray())
    Feature Adaptive topology refinement.
    │ │ │ │ - │ │ │ │ -
    unsigned int refinementLevel
    Number of refinement iterations.
    │ │ │ │ - │ │ │ │ -
    void SetRefinementLevel(int level)
    Set uniform refinement level.
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ +
    88} // end namespace
    │ │ │ │ +
    89
    │ │ │ │ +
    90} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    91using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    92
    │ │ │ │ +
    93} // end namespace OpenSubdiv
    │ │ │ │ +
    94
    │ │ │ │ +
    95#endif // OPENSUBDIV3_FAR_ERROR_H
    │ │ │ │ + │ │ │ │ +
    void Error(ErrorType err, const char *format,...)
    Sends an OSD error with a message (internal use only)
    │ │ │ │ +
    void(* WarningCallbackFunc)(const char *message)
    The warning callback function type (default is "printf")
    Definition error.h:57
    │ │ │ │ +
    void SetErrorCallback(ErrorCallbackFunc func)
    Sets the error callback function (default is "printf")
    │ │ │ │ +
    void SetWarningCallback(WarningCallbackFunc func)
    Sets the warning callback function (default is "printf")
    │ │ │ │ +
    void Warning(const char *format,...)
    Sends an OSD warning message (internal use only)
    │ │ │ │ +
    void(* ErrorCallbackFunc)(ErrorType err, const char *message)
    The error callback function type (default is "printf")
    Definition error.h:45
    │ │ │ │ + │ │ │ │ +
    @ FAR_FATAL_ERROR
    Issue a fatal error and end the program.
    Definition error.h:37
    │ │ │ │ +
    @ FAR_INTERNAL_CODING_ERROR
    Issue an internal programming error, but continue execution.
    Definition error.h:38
    │ │ │ │ +
    @ FAR_CODING_ERROR
    Issue a generic programming error, but continue execution.
    Definition error.h:39
    │ │ │ │ +
    @ FAR_NO_ERROR
    No error. Move along.
    Definition error.h:36
    │ │ │ │ +
    @ FAR_RUNTIME_ERROR
    Issue a generic runtime error, but continue execution.
    Definition error.h:40
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -topologyRefiner.h │ │ │ │ │ +error.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,441 +23,104 @@ │ │ │ │ │ 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_REFINER_H │ │ │ │ │ -25#define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H │ │ │ │ │ -26 │ │ │ │ │ -27#include "../version.h" │ │ │ │ │ -28 │ │ │ │ │ -29#include "../sdc/types.h" │ │ │ │ │ -30#include "../sdc/options.h" │ │ │ │ │ -31#include "../far/types.h" │ │ │ │ │ -32#include "../far/topologyLevel.h" │ │ │ │ │ -33 │ │ │ │ │ -34#include │ │ │ │ │ -35 │ │ │ │ │ -36 │ │ │ │ │ -37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -38namespace OPENSUBDIV_VERSION { │ │ │ │ │ -39 │ │ │ │ │ -_4_0namespace Vtr { namespace internal { class SparseSelector; } } │ │ │ │ │ -41namespace Far { namespace internal { class FeatureMask; } } │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_ERROR_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_ERROR_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29 │ │ │ │ │ +30namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +31namespace OPENSUBDIV_VERSION { │ │ │ │ │ +32 │ │ │ │ │ +33namespace Far { │ │ │ │ │ +34 │ │ │ │ │ +_3_5typedef enum { │ │ │ │ │ +_3_6 _F_A_R___N_O___E_R_R_O_R, │ │ │ │ │ +_3_7 _F_A_R___F_A_T_A_L___E_R_R_O_R, │ │ │ │ │ +_3_8 _F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R, │ │ │ │ │ +_3_9 _F_A_R___C_O_D_I_N_G___E_R_R_O_R, │ │ │ │ │ +40 _F_A_R___R_U_N_T_I_M_E___E_R_R_O_R │ │ │ │ │ +_4_1} _E_r_r_o_r_T_y_p_e; │ │ │ │ │ 42 │ │ │ │ │ -43namespace Far { │ │ │ │ │ -44 │ │ │ │ │ -45template class PrimvarRefinerReal; │ │ │ │ │ -46template class TopologyRefinerFactory; │ │ │ │ │ -47 │ │ │ │ │ -_5_1class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r { │ │ │ │ │ -52 │ │ │ │ │ -53public: │ │ │ │ │ +43 │ │ │ │ │ +_4_5typedef void (*_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c)(_E_r_r_o_r_T_y_p_e err, const char *message); │ │ │ │ │ +46 │ │ │ │ │ +_5_3void _S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k(_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c func); │ │ │ │ │ 54 │ │ │ │ │ -_5_6 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(_S_d_c_:_:_S_c_h_e_m_e_T_y_p_e type, _S_d_c_:_:_O_p_t_i_o_n_s options = _S_d_c_:_:_O_p_t_i_o_n_s │ │ │ │ │ -()); │ │ │ │ │ -57 │ │ │ │ │ -_5_9 _~_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(); │ │ │ │ │ -60 │ │ │ │ │ -_6_2 _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 _subdivType; } │ │ │ │ │ -63 │ │ │ │ │ -_6_5 _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; } │ │ │ │ │ +55 │ │ │ │ │ +_5_7typedef void (*_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c)(const char *message); │ │ │ │ │ +58 │ │ │ │ │ +_6_5void _S_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k(_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c func); │ │ │ │ │ 66 │ │ │ │ │ -_6_8 bool _I_s_U_n_i_f_o_r_m() const { return _isUniform; } │ │ │ │ │ -69 │ │ │ │ │ -_7_1 int _G_e_t_N_u_m_L_e_v_e_l_s() const { return (int)_farLevels.size(); } │ │ │ │ │ +67 │ │ │ │ │ +68// │ │ │ │ │ +69// The following are intended for internal use only (and will eventually │ │ │ │ │ +70// be moved within namespace internal) │ │ │ │ │ +71// │ │ │ │ │ 72 │ │ │ │ │ -_7_4 int _G_e_t_M_a_x_L_e_v_e_l() const { return _maxLevel; } │ │ │ │ │ -75 │ │ │ │ │ -_7_7 int _G_e_t_M_a_x_V_a_l_e_n_c_e() const { return _maxValence; } │ │ │ │ │ -78 │ │ │ │ │ -_8_0 bool _H_a_s_H_o_l_e_s() const { return _hasHoles; } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s_T_o_t_a_l() const { return _totalVertices; } │ │ │ │ │ -84 │ │ │ │ │ -_8_6 int _G_e_t_N_u_m_E_d_g_e_s_T_o_t_a_l() const { return _totalEdges; } │ │ │ │ │ +_7_9void _E_r_r_o_r(_E_r_r_o_r_T_y_p_e err, const char *format, ...); │ │ │ │ │ +80 │ │ │ │ │ +_8_5void _W_a_r_n_i_n_g(const char *format, ...); │ │ │ │ │ +86 │ │ │ │ │ 87 │ │ │ │ │ -_8_9 int _G_e_t_N_u_m_F_a_c_e_s_T_o_t_a_l() const { return _totalFaces; } │ │ │ │ │ -90 │ │ │ │ │ -_9_2 int _G_e_t_N_u_m_F_a_c_e_V_e_r_t_i_c_e_s_T_o_t_a_l() const { return _totalFaceVertices; } │ │ │ │ │ -93 │ │ │ │ │ -_9_5 _T_o_p_o_l_o_g_y_L_e_v_e_l const & _G_e_t_L_e_v_e_l(int level) const { return _farLevels[level]; │ │ │ │ │ -} │ │ │ │ │ -96 │ │ │ │ │ -98 │ │ │ │ │ -100 │ │ │ │ │ -101 // │ │ │ │ │ -102 // Uniform refinement │ │ │ │ │ -103 // │ │ │ │ │ -104 │ │ │ │ │ -_1_1_8 struct _U_n_i_f_o_r_m_O_p_t_i_o_n_s { │ │ │ │ │ -119 │ │ │ │ │ -_1_2_0 _U_n_i_f_o_r_m_O_p_t_i_o_n_s(int level) : │ │ │ │ │ -121 _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l(level & 0xf), │ │ │ │ │ -122 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t(false), │ │ │ │ │ -123 _f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l(false) { } │ │ │ │ │ -124 │ │ │ │ │ -_1_2_6 void _S_e_t_R_e_f_i_n_e_m_e_n_t_L_e_v_e_l(int level) { _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l = level & 0xf; } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 unsigned int _r_e_f_i_n_e_m_e_n_t_L_e_v_e_l:4, │ │ │ │ │ -_1_2_9 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t:1, │ │ │ │ │ -_1_3_1 _f_u_l_l_T_o_p_o_l_o_g_y_I_n_L_a_s_t_L_e_v_e_l:1; │ │ │ │ │ -134 }; │ │ │ │ │ -135 │ │ │ │ │ -_1_4_6 void _R_e_f_i_n_e_U_n_i_f_o_r_m(_U_n_i_f_o_r_m_O_p_t_i_o_n_s options); │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 _U_n_i_f_o_r_m_O_p_t_i_o_n_s _G_e_t_U_n_i_f_o_r_m_O_p_t_i_o_n_s() const { return _uniformOptions; } │ │ │ │ │ -150 │ │ │ │ │ -151 // │ │ │ │ │ -152 // Adaptive refinement │ │ │ │ │ -153 // │ │ │ │ │ -154 │ │ │ │ │ -_1_5_6 struct _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s { │ │ │ │ │ -157 │ │ │ │ │ -_1_5_8 _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s(int level) : │ │ │ │ │ -159 _i_s_o_l_a_t_i_o_n_L_e_v_e_l(level & 0xf), │ │ │ │ │ -160 _s_e_c_o_n_d_a_r_y_L_e_v_e_l(0xf), │ │ │ │ │ -161 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h(false), │ │ │ │ │ -162 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h(false), │ │ │ │ │ -163 _c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s(false), │ │ │ │ │ -164 _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t(false) { } │ │ │ │ │ -165 │ │ │ │ │ -_1_6_7 void _S_e_t_I_s_o_l_a_t_i_o_n_L_e_v_e_l(int level) { _i_s_o_l_a_t_i_o_n_L_e_v_e_l = level & 0xf; } │ │ │ │ │ -168 │ │ │ │ │ -_1_7_0 void _S_e_t_S_e_c_o_n_d_a_r_y_L_e_v_e_l(int level) { _s_e_c_o_n_d_a_r_y_L_e_v_e_l = level & 0xf; } │ │ │ │ │ -171 │ │ │ │ │ -_1_7_2 unsigned int _i_s_o_l_a_t_i_o_n_L_e_v_e_l:4; │ │ │ │ │ -_1_7_4 unsigned int _s_e_c_o_n_d_a_r_y_L_e_v_e_l:4; │ │ │ │ │ -_1_7_6 unsigned int _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h:1; │ │ │ │ │ -_1_7_8 unsigned int _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h:1; │ │ │ │ │ -_1_8_0 unsigned int _c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s:1; │ │ │ │ │ -_1_8_2 unsigned int _o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t:1; │ │ │ │ │ -184 }; │ │ │ │ │ -185 │ │ │ │ │ -_1_9_2 void _R_e_f_i_n_e_A_d_a_p_t_i_v_e(_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s options, │ │ │ │ │ -193 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces = _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y()); │ │ │ │ │ -194 │ │ │ │ │ -_1_9_6 _A_d_a_p_t_i_v_e_O_p_t_i_o_n_s _G_e_t_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s() const { return _adaptiveOptions; } │ │ │ │ │ -197 │ │ │ │ │ -_1_9_9 void _U_n_r_e_f_i_n_e(); │ │ │ │ │ -200 │ │ │ │ │ -201 │ │ │ │ │ -203 │ │ │ │ │ -205 │ │ │ │ │ -207 int _G_e_t_N_u_m_F_V_a_r_C_h_a_n_n_e_l_s() const; │ │ │ │ │ -208 │ │ │ │ │ -210 _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 _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(int │ │ │ │ │ -channel = 0) const; │ │ │ │ │ -211 │ │ │ │ │ -_2_1_3 int _G_e_t_N_u_m_F_V_a_r_V_a_l_u_e_s_T_o_t_a_l(int channel = 0) const; │ │ │ │ │ -214 │ │ │ │ │ -216 │ │ │ │ │ -217protected: │ │ │ │ │ -218 │ │ │ │ │ -219 // │ │ │ │ │ -220 // Lower level protected methods intended strictly for internal use: │ │ │ │ │ -221 // │ │ │ │ │ -222 template │ │ │ │ │ -_2_2_3 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y; │ │ │ │ │ -_2_2_4 friend class _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_B_a_s_e; │ │ │ │ │ -_2_2_5 friend class _P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r; │ │ │ │ │ -_2_2_6 friend class _P_a_t_c_h_B_u_i_l_d_e_r; │ │ │ │ │ -_2_2_7 friend class _P_t_e_x_I_n_d_i_c_e_s; │ │ │ │ │ -228 template │ │ │ │ │ -_2_2_9 friend class _P_r_i_m_v_a_r_R_e_f_i_n_e_r_R_e_a_l; │ │ │ │ │ -230 │ │ │ │ │ -231 // Copy constructor exposed via the factory class: │ │ │ │ │ -_2_3_2 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & source); │ │ │ │ │ -233 │ │ │ │ │ -234public: │ │ │ │ │ -235 // Levels and Refinements available internally (avoids need for more │ │ │ │ │ -friends) │ │ │ │ │ -_2_3_6 Vtr::internal::Level & _g_e_t_L_e_v_e_l(int l) { return *_levels[l]; } │ │ │ │ │ -_2_3_7 Vtr::internal::Level const & _g_e_t_L_e_v_e_l(int l) const { return *_levels[l]; } │ │ │ │ │ -238 │ │ │ │ │ -_2_3_9 Vtr::internal::Refinement & _g_e_t_R_e_f_i_n_e_m_e_n_t(int l) { return *_refinements[l]; │ │ │ │ │ -} │ │ │ │ │ -_2_4_0 Vtr::internal::Refinement const & _g_e_t_R_e_f_i_n_e_m_e_n_t(int l) const { return │ │ │ │ │ -*_refinements[l]; } │ │ │ │ │ -241 │ │ │ │ │ -242private: │ │ │ │ │ -243 // Not default constructible or copyable: │ │ │ │ │ -244 _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r() : _uniformOptions(0), _adaptiveOptions(0) { } │ │ │ │ │ -245 TopologyRefiner & operator=(TopologyRefiner const &) { return *this; } │ │ │ │ │ -246 │ │ │ │ │ -247 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& │ │ │ │ │ -selector, │ │ │ │ │ -248 internal::FeatureMask const & mask, │ │ │ │ │ -249 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces); │ │ │ │ │ -250 void selectLinearIrregularFaces(Vtr::internal::SparseSelector& selector, │ │ │ │ │ -251 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces); │ │ │ │ │ -252 │ │ │ │ │ -253 void initializeInventory(); │ │ │ │ │ -254 void updateInventory(Vtr::internal::Level const & newLevel); │ │ │ │ │ -255 │ │ │ │ │ -256 void appendLevel(Vtr::internal::Level & newLevel); │ │ │ │ │ -257 void appendRefinement(Vtr::internal::Refinement & newRefinement); │ │ │ │ │ -258 void assembleFarLevels(); │ │ │ │ │ -259 │ │ │ │ │ -260private: │ │ │ │ │ -261 │ │ │ │ │ -262 _S_d_c_:_:_S_c_h_e_m_e_T_y_p_e _subdivType; │ │ │ │ │ -263 _S_d_c_:_:_O_p_t_i_o_n_s _subdivOptions; │ │ │ │ │ -264 │ │ │ │ │ -265 unsigned int _isUniform : 1; │ │ │ │ │ -266 unsigned int _hasHoles : 1; │ │ │ │ │ -267 unsigned int _hasIrregFaces : 1; │ │ │ │ │ -268 unsigned int _regFaceSize : 3; │ │ │ │ │ -269 unsigned int _maxLevel : 4; │ │ │ │ │ -270 │ │ │ │ │ -271 // Options assigned on refinement: │ │ │ │ │ -272 UniformOptions _uniformOptions; │ │ │ │ │ -273 AdaptiveOptions _adaptiveOptions; │ │ │ │ │ -274 │ │ │ │ │ -275 // Cumulative properties of all levels: │ │ │ │ │ -276 int _totalVertices; │ │ │ │ │ -277 int _totalEdges; │ │ │ │ │ -278 int _totalFaces; │ │ │ │ │ -279 int _totalFaceVertices; │ │ │ │ │ -280 int _maxValence; │ │ │ │ │ -281 │ │ │ │ │ -282 // Note the base level may be shared with another instance │ │ │ │ │ -283 bool _baseLevelOwned; │ │ │ │ │ -284 │ │ │ │ │ -285 std::vector _levels; │ │ │ │ │ -286 std::vector _refinements; │ │ │ │ │ -287 │ │ │ │ │ -288 std::vector _farLevels; │ │ │ │ │ -289}; │ │ │ │ │ -290 │ │ │ │ │ -291 │ │ │ │ │ -292inline int │ │ │ │ │ -_2_9_3_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() const { │ │ │ │ │ -294 │ │ │ │ │ -295 return _levels[0]->getNumFVarChannels(); │ │ │ │ │ -296} │ │ │ │ │ -297inline _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 │ │ │ │ │ -_2_9_8_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_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(int channel) const { │ │ │ │ │ -299 │ │ │ │ │ -300 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation(); │ │ │ │ │ -301} │ │ │ │ │ -302 │ │ │ │ │ -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 */ │ │ │ │ │ +88} // end namespace │ │ │ │ │ +89 │ │ │ │ │ +90} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +91using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +92 │ │ │ │ │ +93} // end namespace OpenSubdiv │ │ │ │ │ +94 │ │ │ │ │ +95#endif // OPENSUBDIV3_FAR_ERROR_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_:_:_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_:_:_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_:_:_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_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_:_:_T_o_p_o_l_o_g_y_L_e_v_e_l │ │ │ │ │ -An interface for accessing data in a specific level of a refined topology │ │ │ │ │ -hierarchy. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_L_e_v_e_l_._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_R_e_f_i_n_e_r_F_a_c_t_o_r_y │ │ │ │ │ -Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ │ -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_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 │ │ │ │ │ -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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -TopologyRefiner(TopologyRefiner const &source) │ │ │ │ │ -_O_p_e_n_S_u_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_M_a_x_V_a_l_e_n_c_e │ │ │ │ │ -int GetMaxValence() const │ │ │ │ │ -Returns the maximum vertex valence in all levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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 │ │ │ │ │ -Vtr::internal::Level const & getLevel(int l) const │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_H_a_s_H_o_l_e_s │ │ │ │ │ -bool HasHoles() const │ │ │ │ │ -Returns true if faces have been tagged as holes. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_L_e_v_e_l_s │ │ │ │ │ -int GetNumLevels() const │ │ │ │ │ -Returns the number of refinement levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_V_a_l_u_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumFVarValuesTotal(int channel=0) const │ │ │ │ │ -Returns the total number of face-varying values in all levels. │ │ │ │ │ -_O_p_e_n_S_u_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_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -Vtr::internal::Refinement const & getRefinement(int l) const │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_S_c_h_e_m_e_O_p_t_i_o_n_s │ │ │ │ │ -Sdc::Options GetSchemeOptions() const │ │ │ │ │ -Returns the subdivision options. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_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_:_:_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 │ │ │ │ │ -Vtr::internal::Level & getLevel(int l) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_S_c_h_e_m_e_T_y_p_e │ │ │ │ │ -Sdc::SchemeType GetSchemeType() const │ │ │ │ │ -Returns the subdivision scheme. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_M_a_x_L_e_v_e_l │ │ │ │ │ -int GetMaxLevel() const │ │ │ │ │ -Returns the highest level of refinement. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -TopologyRefiner(Sdc::SchemeType type, Sdc::Options options=Sdc::Options()) │ │ │ │ │ -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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_G_e_t_N_u_m_E_d_g_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumEdgesTotal() const │ │ │ │ │ -Returns the total number of edges in all levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_P_a_t_c_h_B_u_i_l_d_e_r │ │ │ │ │ -friend class PatchBuilder │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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 │ │ │ │ │ -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_:_:_G_e_t_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ -UniformOptions GetUniformOptions() const │ │ │ │ │ -Returns the options specified on refinement. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_a_c_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumFacesTotal() const │ │ │ │ │ -Returns the total number of edges in all levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_a_c_e_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumFaceVerticesTotal() const │ │ │ │ │ -Returns the total number of face vertices in all levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_g_e_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -Vtr::internal::Refinement & getRefinement(int l) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_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_:_:_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_:_:_~_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r │ │ │ │ │ -~TopologyRefiner() │ │ │ │ │ -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_:_:_P_a_t_c_h_T_a_b_l_e_B_u_i_l_d_e_r │ │ │ │ │ -friend class PatchTableBuilder │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_:_G_e_t_N_u_m_V_e_r_t_i_c_e_s_T_o_t_a_l │ │ │ │ │ -int GetNumVerticesTotal() const │ │ │ │ │ -Returns the total number of vertices in all levels. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_:_U_n_r_e_f_i_n_e │ │ │ │ │ -void Unrefine() │ │ │ │ │ -Unrefine the topology, keeping only the base level. │ │ │ │ │ -_O_p_e_n_S_u_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_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ -AdaptiveOptions GetAdaptiveOptions() const │ │ │ │ │ -Returns the options specified on refinement. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_F_a_r_:_:_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r_:_: │ │ │ │ │ -_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 │ │ │ │ │ -Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) │ │ │ │ │ -const │ │ │ │ │ -Returns the face-varying interpolation rule set for a given channel. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_2_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_:_:_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_:_: │ │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_L_e_v_e_l │ │ │ │ │ -unsigned int refinementLevel │ │ │ │ │ -Number of refinement iterations. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ -_o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t │ │ │ │ │ -unsigned int orderVerticesFromFacesFirst │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ -_S_e_t_R_e_f_i_n_e_m_e_n_t_L_e_v_e_l │ │ │ │ │ -void SetRefinementLevel(int level) │ │ │ │ │ -Set uniform refinement level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_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_:_:_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_:_:_U_n_i_f_o_r_m_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_U_n_i_f_o_r_m_O_p_t_i_o_n_s │ │ │ │ │ -UniformOptions(int level) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ -_s_e_c_o_n_d_a_r_y_L_e_v_e_l │ │ │ │ │ -unsigned int secondaryLevel │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_:_: │ │ │ │ │ -_o_r_d_e_r_V_e_r_t_i_c_e_s_F_r_o_m_F_a_c_e_s_F_i_r_s_t │ │ │ │ │ -unsigned int orderVerticesFromFacesFirst │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ -AdaptiveOptions(int level) │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_R_e_f_i_n_e_r_:_:_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s_:_: │ │ │ │ │ -_i_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ -unsigned int isolationLevel │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_:_:_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_:_: │ │ │ │ │ -_S_e_t_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ -void SetIsolationLevel(int level) │ │ │ │ │ -Set isolation level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h_:_1_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_:_:_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_:_:_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_:_: │ │ │ │ │ -_S_e_t_S_e_c_o_n_d_a_r_y_L_e_v_e_l │ │ │ │ │ -void SetSecondaryLevel(int level) │ │ │ │ │ -Set secondary isolation level. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._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_:_:_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_B_a_s_e │ │ │ │ │ -Private base class of Factories for constructing TopologyRefiners. │ │ │ │ │ -DDeeffiinniittiioonn _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_F_a_c_t_o_r_y_._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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k_F_u_n_c │ │ │ │ │ +void(* WarningCallbackFunc)(const char *message) │ │ │ │ │ +The warning callback function type (default is "printf") │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_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_:_:_S_e_t_E_r_r_o_r_C_a_l_l_b_a_c_k │ │ │ │ │ +void SetErrorCallback(ErrorCallbackFunc func) │ │ │ │ │ +Sets the error callback function (default is "printf") │ │ │ │ │ +_O_p_e_n_S_u_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_e_t_W_a_r_n_i_n_g_C_a_l_l_b_a_c_k │ │ │ │ │ +void SetWarningCallback(WarningCallbackFunc func) │ │ │ │ │ +Sets the warning callback function (default is "printf") │ │ │ │ │ +_O_p_e_n_S_u_b_d_i_v_:_:_O_P_E_N_S_U_B_D_I_V___V_E_R_S_I_O_N_:_:_F_a_r_:_:_W_a_r_n_i_n_g │ │ │ │ │ +void Warning(const char *format,...) │ │ │ │ │ +Sends an OSD warning 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_:_:_E_r_r_o_r_C_a_l_l_b_a_c_k_F_u_n_c │ │ │ │ │ +void(* ErrorCallbackFunc)(ErrorType err, const char *message) │ │ │ │ │ +The error callback function type (default is "printf") │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_E_r_r_o_r_T_y_p_e │ │ │ │ │ +ErrorType │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._h_:_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_:_:_F_A_R___F_A_T_A_L___E_R_R_O_R │ │ │ │ │ +@ FAR_FATAL_ERROR │ │ │ │ │ +Issue a fatal error and end the program. │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_F_a_r_:_:_F_A_R___I_N_T_E_R_N_A_L___C_O_D_I_N_G___E_R_R_O_R │ │ │ │ │ +@ FAR_INTERNAL_CODING_ERROR │ │ │ │ │ +Issue an internal programming error, but continue execution. │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._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_:_:_F_a_r_:_:_F_A_R___C_O_D_I_N_G___E_R_R_O_R │ │ │ │ │ +@ FAR_CODING_ERROR │ │ │ │ │ +Issue a generic programming error, but continue execution. │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_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_:_:_F_a_r_:_:_F_A_R___N_O___E_R_R_O_R │ │ │ │ │ +@ FAR_NO_ERROR │ │ │ │ │ +No error. Move along. │ │ │ │ │ +DDeeffiinniittiioonn _e_r_r_o_r_._h_:_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _t_o_p_o_l_o_g_y_R_e_f_i_n_e_r_._h │ │ │ │ │ + * _e_r_r_o_r_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00902.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/ptexIndices.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/far/patchTableFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,28 +90,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    ptexIndices.h File Reference
    │ │ │ │ +
    patchTableFactory.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/topologyRefiner.h"
    │ │ │ │ -#include "../far/types.h"
    │ │ │ │ -#include <vector>
    │ │ │ │ +#include "../far/topologyRefiner.h"
    │ │ │ │ +#include "../far/patchTable.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  PtexIndices
     Object used to compute and query ptex face indices. More...
    class  PatchTableFactory
     Factory for constructing a PatchTable from a TopologyRefiner. More...
     
    struct  PatchTableFactory::Options
     Public options for the PatchTable factory. More...
     
    struct  PatchTableFactory::PatchFaceTag
     Obsolete internal struct not intended for public use – due to be deprecated. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -120,13 +125,13 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +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 │ │ │ │ │ -ptexIndices.h File Reference │ │ │ │ │ +patchTableFactory.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 "_._._/_f_a_r_/_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   _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   _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y │ │ │ │ │ +  Factory for constructing a _P_a_t_c_h_T_a_b_l_e from a _T_o_p_o_l_o_g_y_R_e_f_i_n_e_r. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _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 _P_a_t_c_h_T_a_b_l_e factory. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g │ │ │ │ │ +  Obsolete internal struct not intended for public use – due to be │ │ │ │ │ + deprecated. _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 │ │ │ │ │ + * _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00902.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ │ var a00902 = [ │ │ │ │ │ - ["PtexIndices", "a01033.html", "a01033"] │ │ │ │ │ + ["PatchTableFactory", "a01009.html", "a01009"], │ │ │ │ │ + ["Options", "a01013.html", "a01013"], │ │ │ │ │ + ["PatchFaceTag", "a01017.html", "a01017"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00902_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/far/ptexIndices.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/far/patchTableFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -
    ptexIndices.h
    │ │ │ │ +
    patchTableFactory.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,250 @@ │ │ │ │
    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"
    │ │ │ │ -
    30#include "../far/types.h"
    │ │ │ │ -
    31
    │ │ │ │ -
    32#include <vector>
    │ │ │ │ -
    33
    │ │ │ │ -
    34namespace OpenSubdiv {
    │ │ │ │ -
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    36
    │ │ │ │ -
    37namespace Far {
    │ │ │ │ -
    38
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    47
    │ │ │ │ -
    48public:
    │ │ │ │ -
    49
    │ │ │ │ - │ │ │ │ -
    52
    │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ +
    24
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
    │ │ │ │ +
    26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
    │ │ │ │ +
    27
    │ │ │ │ +
    28#include "../version.h"
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include "../far/topologyRefiner.h"
    │ │ │ │ +
    31#include "../far/patchTable.h"
    │ │ │ │ +
    32
    │ │ │ │ +
    33namespace OpenSubdiv {
    │ │ │ │ +
    34namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    35
    │ │ │ │ +
    36namespace Far {
    │ │ │ │ +
    37
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    41public:
    │ │ │ │ +
    42
    │ │ │ │ +
    │ │ │ │ +
    45 struct Options {
    │ │ │ │ +
    46
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    61 };
    │ │ │ │ +
    │ │ │ │ +
    62
    │ │ │ │ +
    │ │ │ │ +
    63 Options(unsigned int maxIsolation=10) :
    │ │ │ │ +
    64 generateAllLevels(false),
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    67 triangulateQuads(false),
    │ │ │ │ + │ │ │ │ +
    69 useInfSharpPatch(false),
    │ │ │ │ +
    70 maxIsolationLevel(maxIsolation & 0xf),
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    75 generateFVarTables(false),
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    82 { }
    │ │ │ │ +
    │ │ │ │ +
    83
    │ │ │ │ + │ │ │ │ +
    86
    │ │ │ │ +
    88 void SetEndCapType(EndCapType e) { endCapType = e & 0x7; }
    │ │ │ │
    89
    │ │ │ │ -
    90private:
    │ │ │ │ -
    91
    │ │ │ │ -
    92 void initializePtexIndices(TopologyRefiner const &refiner);
    │ │ │ │ -
    93
    │ │ │ │ -
    94private:
    │ │ │ │ +
    91 void SetMaxIsolationLevel(unsigned int level) { maxIsolationLevel = level & 0xf; }
    │ │ │ │ +
    92
    │ │ │ │ +
    94 template <typename REAL> void SetPatchPrecision();
    │ │ │ │
    95
    │ │ │ │ -
    96 std::vector<Index> _ptexIndices;
    │ │ │ │ -
    97};
    │ │ │ │ -
    │ │ │ │ +
    97 template <typename REAL> void SetFVarPatchPrecision();
    │ │ │ │
    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 */
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    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.
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    102
    │ │ │ │ +
    103 adaptiveOptions.useInfSharpPatch = useInfSharpPatch;
    │ │ │ │ + │ │ │ │ +
    105 adaptiveOptions.considerFVarChannels = generateFVarTables &&
    │ │ │ │ + │ │ │ │ +
    107 return adaptiveOptions;
    │ │ │ │ +
    108 }
    │ │ │ │ +
    │ │ │ │ +
    109
    │ │ │ │ +
    110 unsigned int generateAllLevels : 1,
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    114
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    118
    │ │ │ │ +
    119 // end-capping
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    123
    │ │ │ │ +
    124 // varying
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    127
    │ │ │ │ +
    128 // face-varying
    │ │ │ │ + │ │ │ │ +
    130
    │ │ │ │ +
    131 // precision
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    134
    │ │ │ │ +
    135 // legacy behaviors (default to true)
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    138
    │ │ │ │ + │ │ │ │ +
    140 int const * fvarChannelIndices;
    │ │ │ │ +
    141 };
    │ │ │ │ +
    │ │ │ │ +
    142
    │ │ │ │ +
    175 static PatchTable * Create(TopologyRefiner const & refiner,
    │ │ │ │ +
    176 Options options = Options(),
    │ │ │ │ +
    177 ConstIndexArray selectedFaces = ConstIndexArray());
    │ │ │ │ +
    178
    │ │ │ │ +
    179public:
    │ │ │ │ +
    180 // PatchFaceTag
    │ │ │ │ +
    181 //
    │ │ │ │ +
    182 // This simple struct was previously used within the factory to take inventory of
    │ │ │ │ +
    183 // various kinds of patches to fully allocate buffers prior to populating them. It
    │ │ │ │ +
    184 // was not intended to be exposed as part of the public interface.
    │ │ │ │ +
    185 //
    │ │ │ │ +
    186 // It is no longer used internally and is being kept here to respect preservation
    │ │ │ │ +
    187 // of the public interface, but it will be deprecated at the earliest opportunity.
    │ │ │ │ +
    188 //
    │ │ │ │ +
    191 //
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    193 public:
    │ │ │ │ +
    194 unsigned int _hasPatch : 1;
    │ │ │ │ +
    195 unsigned int _isRegular : 1;
    │ │ │ │ +
    196 unsigned int _transitionMask : 4;
    │ │ │ │ +
    197 unsigned int _boundaryMask : 4;
    │ │ │ │ +
    198 unsigned int _boundaryIndex : 2;
    │ │ │ │ +
    199 unsigned int _boundaryCount : 3;
    │ │ │ │ +
    200 unsigned int _hasBoundaryEdge : 3;
    │ │ │ │ +
    201 unsigned int _isSingleCrease : 1;
    │ │ │ │ +
    202
    │ │ │ │ +
    203 void clear();
    │ │ │ │ +
    204 void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask);
    │ │ │ │ +
    205 void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask);
    │ │ │ │ +
    206 void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask);
    │ │ │ │ +
    207 };
    │ │ │ │ +
    │ │ │ │ +
    208 typedef std::vector<PatchFaceTag> PatchTagVector;
    │ │ │ │ +
    209};
    │ │ │ │ +
    │ │ │ │ +
    210
    │ │ │ │ +
    211
    │ │ │ │ +
    │ │ │ │ +
    212template <> inline void PatchTableFactory::Options::SetPatchPrecision<float>() {
    │ │ │ │ +
    213 patchPrecisionDouble = false;
    │ │ │ │ +
    214}
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +
    215template <> inline void PatchTableFactory::Options::SetFVarPatchPrecision<float>() {
    │ │ │ │ +
    216 fvarPatchPrecisionDouble = false;
    │ │ │ │ +
    217}
    │ │ │ │ +
    │ │ │ │ +
    218
    │ │ │ │ +
    219template <> inline void PatchTableFactory::Options::SetPatchPrecision<double>() {
    │ │ │ │ +
    220 patchPrecisionDouble = true;
    │ │ │ │ +
    221}
    │ │ │ │ +
    222template <> inline void PatchTableFactory::Options::SetFVarPatchPrecision<double>() {
    │ │ │ │ +
    223 fvarPatchPrecisionDouble = true;
    │ │ │ │ +
    224}
    │ │ │ │ +
    225
    │ │ │ │ +
    226
    │ │ │ │ +
    227} // end namespace Far
    │ │ │ │ +
    228
    │ │ │ │ +
    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.
    │ │ │ │ +
    unsigned int generateLegacySharpCornerPatches
    Generate sharp regular patches at smooth corners (legacy)
    │ │ │ │ + │ │ │ │ +
    TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const
    Determine adaptive refinement options to match assigned patch options.
    │ │ │ │ +
    unsigned int maxIsolationLevel
    Cap adaptive feature isolation to the given level (max. 10)
    │ │ │ │ + │ │ │ │ +
    unsigned int generateFVarLegacyLinearPatches
    Generate all linear face-varying patches (legacy)
    │ │ │ │ +
    void SetPatchPrecision()
    Set precision of vertex patches.
    │ │ │ │ +
    unsigned int fvarPatchPrecisionDouble
    Generate double-precision stencils for face-varying patches.
    │ │ │ │ +
    void SetMaxIsolationLevel(unsigned int level)
    Set maximum isolation level.
    │ │ │ │ + │ │ │ │ +
    int const * fvarChannelIndices
    List containing the indices of the channels selected for the factory.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    unsigned int generateVaryingLocalPoints
    Generate local points with varying patches.
    │ │ │ │ +
    unsigned int includeFVarBaseLevelIndices
    Include base level in face-varying patch point indices (Uniform mode only)
    │ │ │ │ +
    unsigned int generateAllLevels
    Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only)
    │ │ │ │ +
    unsigned int patchPrecisionDouble
    Generate double-precision stencils for vertex patches.
    │ │ │ │ +
    unsigned int generateFVarTables
    Generate face-varying patch tables.
    │ │ │ │ +
    unsigned int includeBaseLevelIndices
    Include base level in patch point indices (Uniform mode only)
    │ │ │ │ +
    void SetFVarPatchPrecision()
    Set precision of face-varying patches.
    │ │ │ │ +
    int numFVarChannels
    Number of channel indices and interpolation modes passed.
    │ │ │ │ +
    unsigned int triangulateQuads
    Triangulate 'QUADS' primitives (Uniform mode only)
    │ │ │ │ +
    EndCapType
    Choice for approximating irregular patches (end-caps)
    │ │ │ │ +
    @ 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)
    │ │ │ │ + │ │ │ │ +
    Obsolete internal struct not intended for public use – due to be deprecated.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    Stores topology data for a specified set of refinement options.
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -ptexIndices.h │ │ │ │ │ +patchTableFactory.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,410 @@ │ │ │ │ │ 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" │ │ │ │ │ -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 │ │ │ │ │ -_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 │ │ │ │ │ -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 │ │ │ │ │ +24 │ │ │ │ │ +25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H │ │ │ │ │ +27 │ │ │ │ │ +28#include "../version.h" │ │ │ │ │ +29 │ │ │ │ │ +30#include "../far/topologyRefiner.h" │ │ │ │ │ +31#include "../far/patchTable.h" │ │ │ │ │ +32 │ │ │ │ │ +33namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +34namespace OPENSUBDIV_VERSION { │ │ │ │ │ +35 │ │ │ │ │ +36namespace Far { │ │ │ │ │ +37 │ │ │ │ │ +_4_0class _P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y { │ │ │ │ │ +41public: │ │ │ │ │ +42 │ │ │ │ │ +_4_5 struct _O_p_t_i_o_n_s { │ │ │ │ │ +46 │ │ │ │ │ +_5_5 enum _E_n_d_C_a_p_T_y_p_e { │ │ │ │ │ +_5_6 _E_N_D_C_A_P___N_O_N_E = 0, │ │ │ │ │ +_5_7 _E_N_D_C_A_P___B_I_L_I_N_E_A_R___B_A_S_I_S, │ │ │ │ │ +_5_8 _E_N_D_C_A_P___B_S_P_L_I_N_E___B_A_S_I_S, │ │ │ │ │ +_5_9 _E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S, │ │ │ │ │ +60 _E_N_D_C_A_P___L_E_G_A_C_Y___G_R_E_G_O_R_Y │ │ │ │ │ +_6_1 }; │ │ │ │ │ +62 │ │ │ │ │ +_6_3 _O_p_t_i_o_n_s(unsigned int maxIsolation=10) : │ │ │ │ │ +64 _g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s(false), │ │ │ │ │ +65 _i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s(true), │ │ │ │ │ +66 _i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s(false), │ │ │ │ │ +67 _t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s(false), │ │ │ │ │ +68 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h(false), │ │ │ │ │ +69 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h(false), │ │ │ │ │ +70 _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l(maxIsolation & 0xf), │ │ │ │ │ +71 _e_n_d_C_a_p_T_y_p_e(_E_N_D_C_A_P___G_R_E_G_O_R_Y___B_A_S_I_S), │ │ │ │ │ +72 _s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s(true), │ │ │ │ │ +73 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s(true), │ │ │ │ │ +74 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s(true), │ │ │ │ │ +75 _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s(false), │ │ │ │ │ +76 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e(false), │ │ │ │ │ +77 _f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e(false), │ │ │ │ │ +78 _g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s(true), │ │ │ │ │ +79 _g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s(true), │ │ │ │ │ +80 _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s(-1), │ │ │ │ │ +81 _f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s(0) │ │ │ │ │ +82 { } │ │ │ │ │ +83 │ │ │ │ │ +_8_5 _E_n_d_C_a_p_T_y_p_e _G_e_t_E_n_d_C_a_p_T_y_p_e() const { return (_E_n_d_C_a_p_T_y_p_e)_e_n_d_C_a_p_T_y_p_e; } │ │ │ │ │ +86 │ │ │ │ │ +_8_8 void _S_e_t_E_n_d_C_a_p_T_y_p_e(_E_n_d_C_a_p_T_y_p_e e) { _e_n_d_C_a_p_T_y_p_e = e & 0x7; } │ │ │ │ │ 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: │ │ │ │ │ +_9_1 void _S_e_t_M_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l(unsigned int level) { _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l = level & │ │ │ │ │ +0xf; } │ │ │ │ │ +92 │ │ │ │ │ +_9_4 template void _S_e_t_P_a_t_c_h_P_r_e_c_i_s_i_o_n(); │ │ │ │ │ 95 │ │ │ │ │ -96 std::vector _ptexIndices; │ │ │ │ │ -97}; │ │ │ │ │ +_9_7 template void _S_e_t_F_V_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n(); │ │ │ │ │ 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 */ │ │ │ │ │ +_1_0_0 _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 _G_e_t_R_e_f_i_n_e_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s() const { │ │ │ │ │ +101 _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 adaptiveOptions(_m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l); │ │ │ │ │ +102 │ │ │ │ │ +103 adaptiveOptions._u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h = _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h; │ │ │ │ │ +104 adaptiveOptions._u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h = _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h; │ │ │ │ │ +105 adaptiveOptions._c_o_n_s_i_d_e_r_F_V_a_r_C_h_a_n_n_e_l_s = _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s && │ │ │ │ │ +106 !_g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s; │ │ │ │ │ +107 return adaptiveOptions; │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 unsigned int _g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s : 1, │ │ │ │ │ +_1_1_1 _i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s : 1, │ │ │ │ │ +_1_1_2 _i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s : 1, │ │ │ │ │ +_1_1_3 _t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s : 1, │ │ │ │ │ +114 │ │ │ │ │ +_1_1_5 _u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h : 1, │ │ │ │ │ +_1_1_6 _u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h : 1, │ │ │ │ │ +_1_1_7 _m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l : 4, │ │ │ │ │ +118 │ │ │ │ │ +119 // end-capping │ │ │ │ │ +_1_2_0 _e_n_d_C_a_p_T_y_p_e : 3, │ │ │ │ │ +_1_2_1 _s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s : 1, │ │ │ │ │ +123 │ │ │ │ │ +124 // varying │ │ │ │ │ +_1_2_5 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s : 1, │ │ │ │ │ +_1_2_6 _g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s : 1, │ │ │ │ │ +127 │ │ │ │ │ +128 // face-varying │ │ │ │ │ +_1_2_9 _g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s : 1, │ │ │ │ │ +130 │ │ │ │ │ +131 // precision │ │ │ │ │ +_1_3_2 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e : 1, │ │ │ │ │ +_1_3_3 _f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e : 1, │ │ │ │ │ +134 │ │ │ │ │ +135 // legacy behaviors (default to true) │ │ │ │ │ +_1_3_6 _g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s : 1, │ │ │ │ │ +_1_3_7 _g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s : 1; │ │ │ │ │ +138 │ │ │ │ │ +_1_3_9 int _n_u_m_F_V_a_r_C_h_a_n_n_e_l_s; │ │ │ │ │ +_1_4_0 int const * _f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s; │ │ │ │ │ +141 }; │ │ │ │ │ +142 │ │ │ │ │ +_1_7_5 static _P_a_t_c_h_T_a_b_l_e * _C_r_e_a_t_e(_T_o_p_o_l_o_g_y_R_e_f_i_n_e_r const & refiner, │ │ │ │ │ +176 _O_p_t_i_o_n_s options = _O_p_t_i_o_n_s(), │ │ │ │ │ +177 _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y selectedFaces = _C_o_n_s_t_I_n_d_e_x_A_r_r_a_y()); │ │ │ │ │ +178 │ │ │ │ │ +179public: │ │ │ │ │ +180 // PatchFaceTag │ │ │ │ │ +181 // │ │ │ │ │ +182 // This simple struct was previously used within the factory to take │ │ │ │ │ +inventory of │ │ │ │ │ +183 // various kinds of patches to fully allocate buffers prior to populating │ │ │ │ │ +them. It │ │ │ │ │ +184 // was not intended to be exposed as part of the public interface. │ │ │ │ │ +185 // │ │ │ │ │ +186 // It is no longer used internally and is being kept here to respect │ │ │ │ │ +preservation │ │ │ │ │ +187 // of the public interface, but it will be deprecated at the earliest │ │ │ │ │ +opportunity. │ │ │ │ │ +188 // │ │ │ │ │ +191 // │ │ │ │ │ +_1_9_2 struct _P_a_t_c_h_F_a_c_e_T_a_g { │ │ │ │ │ +193 public: │ │ │ │ │ +_1_9_4 unsigned int ___h_a_s_P_a_t_c_h : 1; │ │ │ │ │ +_1_9_5 unsigned int ___i_s_R_e_g_u_l_a_r : 1; │ │ │ │ │ +_1_9_6 unsigned int ___t_r_a_n_s_i_t_i_o_n_M_a_s_k : 4; │ │ │ │ │ +_1_9_7 unsigned int ___b_o_u_n_d_a_r_y_M_a_s_k : 4; │ │ │ │ │ +_1_9_8 unsigned int ___b_o_u_n_d_a_r_y_I_n_d_e_x : 2; │ │ │ │ │ +_1_9_9 unsigned int ___b_o_u_n_d_a_r_y_C_o_u_n_t : 3; │ │ │ │ │ +_2_0_0 unsigned int ___h_a_s_B_o_u_n_d_a_r_y_E_d_g_e : 3; │ │ │ │ │ +_2_0_1 unsigned int ___i_s_S_i_n_g_l_e_C_r_e_a_s_e : 1; │ │ │ │ │ +202 │ │ │ │ │ +_2_0_3 void _c_l_e_a_r(); │ │ │ │ │ +_2_0_4 void _a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k(int boundaryEdgeMask); │ │ │ │ │ +_2_0_5 void _a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_V_e_r_t_e_x_M_a_s_k(int boundaryVertexMask); │ │ │ │ │ +_2_0_6 void _a_s_s_i_g_n_T_r_a_n_s_i_t_i_o_n_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k(int boundaryVertexMask); │ │ │ │ │ +207 }; │ │ │ │ │ +_2_0_8 typedef std::vector _P_a_t_c_h_T_a_g_V_e_c_t_o_r; │ │ │ │ │ +209}; │ │ │ │ │ +210 │ │ │ │ │ +211 │ │ │ │ │ +_2_1_2template <> inline void PatchTableFactory::Options::SetPatchPrecision │ │ │ │ │ +() { │ │ │ │ │ +213 _p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e = false; │ │ │ │ │ +214} │ │ │ │ │ +_2_1_5template <> inline void PatchTableFactory::Options:: │ │ │ │ │ +SetFVarPatchPrecision() { │ │ │ │ │ +216 fvarPatchPrecisionDouble = false; │ │ │ │ │ +217} │ │ │ │ │ +218 │ │ │ │ │ +219template <> inline void PatchTableFactory::Options:: │ │ │ │ │ +SetPatchPrecision() { │ │ │ │ │ +220 patchPrecisionDouble = true; │ │ │ │ │ +221} │ │ │ │ │ +222template <> inline void PatchTableFactory::Options:: │ │ │ │ │ +SetFVarPatchPrecision() { │ │ │ │ │ +223 fvarPatchPrecisionDouble = true; │ │ │ │ │ +224} │ │ │ │ │ +225 │ │ │ │ │ +226 │ │ │ │ │ +227} // end namespace Far │ │ │ │ │ +228 │ │ │ │ │ +229} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +230using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +231 │ │ │ │ │ +232} // end namespace OpenSubdiv │ │ │ │ │ +233 │ │ │ │ │ +234 │ │ │ │ │ +235#endif /* OPENSUBDIV3_FAR_PATCH_TABLE_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_:_:_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_:_:_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_:_:_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_F_a_c_t_o_r_y │ │ │ │ │ +Factory for constructing a PatchTable from a TopologyRefiner. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_T_a_g_V_e_c_t_o_r │ │ │ │ │ +std::vector< PatchFaceTag > PatchTagVector │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_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_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_T_a_b_l_e_s │ │ │ │ │ +unsigned int generateVaryingTables │ │ │ │ │ +Generate varying patch tables. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_L_e_g_a_c_y_S_h_a_r_p_C_o_r_n_e_r_P_a_t_c_h_e_s │ │ │ │ │ +unsigned int generateLegacySharpCornerPatches │ │ │ │ │ +Generate sharp regular patches at smooth corners (legacy) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_s_h_a_r_e_E_n_d_C_a_p_P_a_t_c_h_P_o_i_n_t_s │ │ │ │ │ +unsigned int shareEndCapPatchPoints │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_G_e_t_R_e_f_i_n_e_A_d_a_p_t_i_v_e_O_p_t_i_o_n_s │ │ │ │ │ +TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const │ │ │ │ │ +Determine adaptive refinement options to match assigned patch options. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_m_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ +unsigned int maxIsolationLevel │ │ │ │ │ +Cap adaptive feature isolation to the given level (max. 10) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_:_G_e_t_E_n_d_C_a_p_T_y_p_e │ │ │ │ │ +EndCapType GetEndCapType() const │ │ │ │ │ +Get endcap basis type. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_F_V_a_r_L_e_g_a_c_y_L_i_n_e_a_r_P_a_t_c_h_e_s │ │ │ │ │ +unsigned int generateFVarLegacyLinearPatches │ │ │ │ │ +Generate all linear face-varying patches (legacy) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_S_e_t_P_a_t_c_h_P_r_e_c_i_s_i_o_n │ │ │ │ │ +void SetPatchPrecision() │ │ │ │ │ +Set precision of vertex patches. │ │ │ │ │ +_O_p_e_n_S_u_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_:_: │ │ │ │ │ +_f_v_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e │ │ │ │ │ +unsigned int fvarPatchPrecisionDouble │ │ │ │ │ +Generate double-precision stencils for face-varying patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_S_e_t_M_a_x_I_s_o_l_a_t_i_o_n_L_e_v_e_l │ │ │ │ │ +void SetMaxIsolationLevel(unsigned int level) │ │ │ │ │ +Set maximum isolation level. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_T_y_p_e │ │ │ │ │ +unsigned int endCapType │ │ │ │ │ +EndCapType. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_f_v_a_r_C_h_a_n_n_e_l_I_n_d_i_c_e_s │ │ │ │ │ +int const * fvarChannelIndices │ │ │ │ │ +List containing the indices of the channels selected for the factory. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_u_s_e_S_i_n_g_l_e_C_r_e_a_s_e_P_a_t_c_h │ │ │ │ │ +unsigned int useSingleCreasePatch │ │ │ │ │ +Use single crease patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_u_s_e_I_n_f_S_h_a_r_p_P_a_t_c_h │ │ │ │ │ +unsigned int useInfSharpPatch │ │ │ │ │ +Use infinitely-sharp patch. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_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_:_:_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_:_:_S_e_t_E_n_d_C_a_p_T_y_p_e │ │ │ │ │ +void SetEndCapType(EndCapType e) │ │ │ │ │ +Set endcap basis type. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_V_a_r_y_i_n_g_L_o_c_a_l_P_o_i_n_t_s │ │ │ │ │ +unsigned int generateVaryingLocalPoints │ │ │ │ │ +Generate local points with varying patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_i_n_c_l_u_d_e_F_V_a_r_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s │ │ │ │ │ +unsigned int includeFVarBaseLevelIndices │ │ │ │ │ +Include base level in face-varying patch point indices (Uniform mode only) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_A_l_l_L_e_v_e_l_s │ │ │ │ │ +unsigned int generateAllLevels │ │ │ │ │ +Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_p_a_t_c_h_P_r_e_c_i_s_i_o_n_D_o_u_b_l_e │ │ │ │ │ +unsigned int patchPrecisionDouble │ │ │ │ │ +Generate double-precision stencils for vertex patches. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_g_e_n_e_r_a_t_e_F_V_a_r_T_a_b_l_e_s │ │ │ │ │ +unsigned int generateFVarTables │ │ │ │ │ +Generate face-varying patch tables. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_i_n_c_l_u_d_e_B_a_s_e_L_e_v_e_l_I_n_d_i_c_e_s │ │ │ │ │ +unsigned int includeBaseLevelIndices │ │ │ │ │ +Include base level in patch point indices (Uniform mode only) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_S_e_t_F_V_a_r_P_a_t_c_h_P_r_e_c_i_s_i_o_n │ │ │ │ │ +void SetFVarPatchPrecision() │ │ │ │ │ +Set precision of face-varying patches. │ │ │ │ │ +_O_p_e_n_S_u_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_:_: │ │ │ │ │ +_n_u_m_F_V_a_r_C_h_a_n_n_e_l_s │ │ │ │ │ +int numFVarChannels │ │ │ │ │ +Number of channel indices and interpolation modes passed. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_: │ │ │ │ │ +_t_r_i_a_n_g_u_l_a_t_e_Q_u_a_d_s │ │ │ │ │ +unsigned int triangulateQuads │ │ │ │ │ +Triangulate 'QUADS' primitives (Uniform mode only) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_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_T_y_p_e │ │ │ │ │ +EndCapType │ │ │ │ │ +Choice for approximating irregular patches (end-caps) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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___N_O_N_E │ │ │ │ │ +@ ENDCAP_NONE │ │ │ │ │ +unspecified │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_O_p_t_i_o_n_s_:_:_O_p_t_i_o_n_s │ │ │ │ │ +Options(unsigned int maxIsolation=10) │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g │ │ │ │ │ +Obsolete internal struct not intended for public use – due to be deprecated. │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___i_s_S_i_n_g_l_e_C_r_e_a_s_e │ │ │ │ │ +unsigned int _isSingleCrease │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___i_s_R_e_g_u_l_a_r │ │ │ │ │ +unsigned int _isRegular │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___b_o_u_n_d_a_r_y_I_n_d_e_x │ │ │ │ │ +unsigned int _boundaryIndex │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +_a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask) │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___t_r_a_n_s_i_t_i_o_n_M_a_s_k │ │ │ │ │ +unsigned int _transitionMask │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___h_a_s_B_o_u_n_d_a_r_y_E_d_g_e │ │ │ │ │ +unsigned int _hasBoundaryEdge │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_2_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_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___b_o_u_n_d_a_r_y_M_a_s_k │ │ │ │ │ +unsigned int _boundaryMask │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._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_:_:_F_a_r_:_:_P_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_:___h_a_s_P_a_t_c_h │ │ │ │ │ +unsigned int _hasPatch │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +_a_s_s_i_g_n_T_r_a_n_s_i_t_i_o_n_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k │ │ │ │ │ +void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask) │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_:_c_l_e_a_r │ │ │ │ │ +void clear() │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +_a_s_s_i_g_n_B_o_u_n_d_a_r_y_P_r_o_p_e_r_t_i_e_s_F_r_o_m_E_d_g_e_M_a_s_k │ │ │ │ │ +void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask) │ │ │ │ │ +_O_p_e_n_S_u_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_:_:_P_a_t_c_h_F_a_c_e_T_a_g_:_: │ │ │ │ │ +___b_o_u_n_d_a_r_y_C_o_u_n_t │ │ │ │ │ +unsigned int _boundaryCount │ │ │ │ │ +DDeeffiinniittiioonn _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h_:_1_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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ * _f_a_r │ │ │ │ │ - * _p_t_e_x_I_n_d_i_c_e_s_._h │ │ │ │ │ + * _p_a_t_c_h_T_a_b_l_e_F_a_c_t_o_r_y_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00908.html │ │ │ │ @@ -280,15 +280,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef Vtr::ConstArray<PatchDescriptor> ConstPatchDescriptorArray
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 146 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 146 of file patchDescriptor.h.

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

    ◆ ConstPatchParamArray

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef Vtr::ConstArray<PatchParam> ConstPatchParamArray
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 246 of file patchParam.h.

    │ │ │ │ +

    Definition at line 246 of file patchParam.h.

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

    ◆ ErrorCallbackFunc

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -314,15 +314,15 @@ │ │ │ │ typedef void(* ErrorCallbackFunc) (ErrorType err, const char *message) │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    The error callback function type (default is "printf")

    │ │ │ │ │ │ │ │ -

    Definition at line 45 of file error.h.

    │ │ │ │ +

    Definition at line 45 of file error.h.

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

    ◆ Index

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -394,15 +394,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef Vtr::Array<PatchParam> PatchParamArray
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 245 of file patchParam.h.

    │ │ │ │ +

    Definition at line 245 of file patchParam.h.

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

    ◆ PatchParamTable

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -410,15 +410,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef std::vector<PatchParam> PatchParamTable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 243 of file patchParam.h.

    │ │ │ │ +

    Definition at line 243 of file patchParam.h.

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

    ◆ WarningCallbackFunc

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │ typedef void(* WarningCallbackFunc) (const char *message) │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    The warning callback function type (default is "printf")

    │ │ │ │ │ │ │ │ -

    Definition at line 57 of file error.h.

    │ │ │ │ +

    Definition at line 57 of file error.h.

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

    Enumeration Type Documentation

    │ │ │ │ │ │ │ │

    ◆ ErrorType

    │ │ │ │ │ │ │ │ @@ -457,15 +457,15 @@ │ │ │ │ │ │ │ │ FAR_CODING_ERROR 

    Issue a generic programming error, but continue execution.

    │ │ │ │ │ │ │ │ FAR_RUNTIME_ERROR 

    Issue a generic runtime error, but continue execution.

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

    Definition at line 35 of file error.h.

    │ │ │ │ +

    Definition at line 35 of file error.h.

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

    Function Documentation

    │ │ │ │ │ │ │ │

    ◆ Error()

    │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00912.html │ │ │ │ @@ -291,15 +291,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef MeshInterface<D3D11PatchTable> D3D11MeshInterface
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 38 of file d3d11Mesh.h.

    │ │ │ │ +

    Definition at line 38 of file d3d11Mesh.h.

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

    ◆ GLMeshInterface

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -307,15 +307,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef MeshInterface<GLPatchTable> GLMeshInterface
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 38 of file glMesh.h.

    │ │ │ │ +

    Definition at line 38 of file glMesh.h.

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

    ◆ MeshBitset

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -323,15 +323,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

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef MeshInterface<MTLPatchTable> MTLMeshInterface
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 38 of file mtlMesh.h.

    │ │ │ │ +

    Definition at line 38 of file mtlMesh.h.

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

    ◆ PatchArrayVector

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -402,15 +402,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()

    │ │ │ │ │ │ │ │ @@ -435,15 +435,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 141 of file mesh.h.

    │ │ │ │ +

    Definition at line 141 of file mesh.h.

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

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

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -475,15 +475,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 158 of file mesh.h.

    │ │ │ │ +

    Definition at line 158 of file mesh.h.

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

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

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -515,15 +515,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 168 of file mesh.h.

    │ │ │ │ +

    Definition at line 168 of file mesh.h.

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

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

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -555,15 +555,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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Encapsulates a specific tessellation pattern of a Parameterization. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <tessellation.h>

    │ │ │ │ +

    #include <tessellation.h>

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

    │ │ │ │ Classes

    class  Options
     Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate. More...
     
    │ │ │ │ @@ -219,15 +219,15 @@ │ │ │ │ │ │ │ │
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Encapsulates a specific tessellation pattern of a Parameterization.

    │ │ │ │

    Tessellation is a simple class that encapsulates a specified tessellation pattern for a given Parameterization. Tessellation parameters are given on construction and are fixed for its lifetime.

    │ │ │ │

    Methods allow inspection of the pattern in terms of the 2D coordinates of the points comprising the pattern and the faces that connect them. The 2D coordinates are referred to both in the documentation and the interface as "coords" while the faces connecting them are referred to as "facets" (to distinguish from the faces of the mesh, to which a Tessellation is applied).

    │ │ │ │ │ │ │ │ -

    Definition at line 51 of file tessellation.h.

    │ │ │ │ +

    Definition at line 51 of file tessellation.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Tessellation() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -445,15 +445,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │

    Retrieve the coordinates for the entire pattern.

    │ │ │ │ │ │ │ │ -

    Definition at line 372 of file tessellation.h.

    │ │ │ │ +

    Definition at line 372 of file tessellation.h.

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

    ◆ GetCoordStride()

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

    Return the number of elements between each coordinate.

    │ │ │ │ │ │ │ │ -

    Definition at line 208 of file tessellation.h.

    │ │ │ │ +

    Definition at line 208 of file tessellation.h.

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

    ◆ GetEdgeCoords()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -535,15 +535,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the size of the face.

    │ │ │ │ │ │ │ │ -

    Definition at line 182 of file tessellation.h.

    │ │ │ │ +

    Definition at line 182 of file tessellation.h.

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

    ◆ GetFacets()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -584,15 +584,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of indices assigned to each facet.

    │ │ │ │ │ │ │ │ -

    Definition at line 258 of file tessellation.h.

    │ │ │ │ +

    Definition at line 258 of file tessellation.h.

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

    ◆ GetFacetStride()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -613,15 +613,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of elements between each facet.

    │ │ │ │ │ │ │ │ -

    Definition at line 261 of file tessellation.h.

    │ │ │ │ +

    Definition at line 261 of file tessellation.h.

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

    ◆ GetInteriorCoords()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -664,15 +664,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of boundary coordinates.

    │ │ │ │ │ │ │ │ -

    Definition at line 211 of file tessellation.h.

    │ │ │ │ +

    Definition at line 211 of file tessellation.h.

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

    ◆ GetNumCoords()

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

    Return the number of coordinates in the entire pattern.

    │ │ │ │ │ │ │ │ -

    Definition at line 205 of file tessellation.h.

    │ │ │ │ +

    Definition at line 205 of file tessellation.h.

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

    ◆ GetNumEdgeCoords()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -723,15 +723,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of coordinates within a given edge (excluding those at its end vertices)

    │ │ │ │ │ │ │ │ -

    Definition at line 218 of file tessellation.h.

    │ │ │ │ +

    Definition at line 218 of file tessellation.h.

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

    ◆ GetNumFacets()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -752,15 +752,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of facets in the entire pattern.

    │ │ │ │ │ │ │ │ -

    Definition at line 255 of file tessellation.h.

    │ │ │ │ +

    Definition at line 255 of file tessellation.h.

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

    ◆ GetNumInteriorCoords()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -781,15 +781,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the number of interior coordinates.

    │ │ │ │ │ │ │ │ -

    Definition at line 214 of file tessellation.h.

    │ │ │ │ +

    Definition at line 214 of file tessellation.h.

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

    ◆ GetParameterization()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -810,15 +810,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the Parameterization.

    │ │ │ │ │ │ │ │ -

    Definition at line 179 of file tessellation.h.

    │ │ │ │ +

    Definition at line 179 of file tessellation.h.

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

    ◆ GetRates()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -872,15 +872,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Retrieve the coordinate for a given vertex of the face.

    │ │ │ │ │ │ │ │ -

    Definition at line 365 of file tessellation.h.

    │ │ │ │ +

    Definition at line 365 of file tessellation.h.

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

    ◆ IsUniform()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -901,15 +901,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if the pattern is uniform.

    │ │ │ │ │ │ │ │ -

    Definition at line 188 of file tessellation.h.

    │ │ │ │ +

    Definition at line 188 of file tessellation.h.

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

    ◆ IsValid()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -930,15 +930,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return true if correctly initialized.

    │ │ │ │ │ │ │ │ -

    Definition at line 162 of file tessellation.h.

    │ │ │ │ +

    Definition at line 162 of file tessellation.h.

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

    ◆ operator=()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1063,15 +1063,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    Reassign indices of boundary coordinates while offseting those of interior coordinates.

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

    Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <tessellation.h>

    │ │ │ │ +

    #include <tessellation.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -132,15 +132,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

     Options ()
     
    OptionsPreserveQuads (bool on)
     Select preservation of quads for quad-based subdivision (requires 4-sided facets, default is off)
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate.

    │ │ │ │

    The sizes and strides of the target arrays should be specified explicitly as they are not inferred by the presence of other options.

    │ │ │ │

    Modifiers of Options return a reference to itself to facilitate inline usage.

    │ │ │ │ │ │ │ │ -

    Definition at line 65 of file tessellation.h.

    │ │ │ │ +

    Definition at line 65 of file tessellation.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Options()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -157,15 +157,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inline
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 67 of file tessellation.h.

    │ │ │ │ +

    Definition at line 67 of file tessellation.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetCoordStride()

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

    Return the stride between (u,v) pairs.

    │ │ │ │ │ │ │ │ -

    Definition at line 90 of file tessellation.h.

    │ │ │ │ +

    Definition at line 90 of file tessellation.h.

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

    ◆ GetFacetSize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -214,15 +214,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 80 of file tessellation.h.

    │ │ │ │ +

    Definition at line 80 of file tessellation.h.

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

    ◆ GetFacetStride()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -243,15 +243,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the stride between facets.

    │ │ │ │ │ │ │ │ -

    Definition at line 85 of file tessellation.h.

    │ │ │ │ +

    Definition at line 85 of file tessellation.h.

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

    ◆ PreserveQuads() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -272,15 +272,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if preservation of quads is set.

    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file tessellation.h.

    │ │ │ │ +

    Definition at line 74 of file tessellation.h.

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

    ◆ PreserveQuads() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Select preservation of quads for quad-based subdivision (requires 4-sided facets, default is off)

    │ │ │ │ │ │ │ │ -

    Definition at line 343 of file tessellation.h.

    │ │ │ │ +

    Definition at line 343 of file tessellation.h.

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

    ◆ SetCoordStride()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -332,15 +332,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the stride between (u,v) pairs (default is 2)

    │ │ │ │ │ │ │ │ -

    Definition at line 358 of file tessellation.h.

    │ │ │ │ +

    Definition at line 358 of file tessellation.h.

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

    ◆ SetFacetSize()

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

    Assign the number of indices per facet (must be 3 or 4, default is 3)

    │ │ │ │ │ │ │ │ -

    Definition at line 348 of file tessellation.h.

    │ │ │ │ +

    Definition at line 348 of file tessellation.h.

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

    ◆ SetFacetStride()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -392,20 +392,20 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the stride between facets (default is facet size)

    │ │ │ │ │ │ │ │ -

    Definition at line 353 of file tessellation.h.

    │ │ │ │ +

    Definition at line 353 of file tessellation.h.

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

    Simple class used by subclasses of SurfaceFactory to describe a vertex. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <vertexDescriptor.h>

    │ │ │ │ +

    #include <vertexDescriptor.h>

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

    │ │ │ │ Public Member Functions

    Methods to begin and end specification

    Partially constructed instances are populated using a set of methods between calls to Initialize() and Finalize(). Both return false to indicate failure due to invalid input, or the instance can be inspected after each to determine if valid.

    │ │ │ │
    bool Initialize (int numIncidentFaces)
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Simple class used by subclasses of SurfaceFactory to describe a vertex.

    │ │ │ │

    VertexDescriptor is a simple class used by SurfaceFactory and its subclasses to provide a complete topological description around the vertex of a face, i.e. its valence, the sizes of its incident faces, sharpness values, etc.

    │ │ │ │

    Instances are created and partially initialized by SurfaceFactory before being passed to its subclasses to be fully populated. So public construction is not available (or useful).

    │ │ │ │ │ │ │ │ -

    Definition at line 131 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 131 of file vertexDescriptor.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ ClearEdgeSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │

    Remove any sharpness assigned to the incident edges.

    │ │ │ │ │ │ │ │ -

    Definition at line 398 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 398 of file vertexDescriptor.h.

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

    ◆ ClearIncidentFaceSizes()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -234,15 +234,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Remove any assigned sizes of incident faces.

    │ │ │ │ │ │ │ │ -

    Definition at line 350 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 350 of file vertexDescriptor.h.

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

    ◆ ClearVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -263,15 +263,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Remove any sharpness assigned to the vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 377 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 377 of file vertexDescriptor.h.

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

    ◆ Finalize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -328,15 +328,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the sharpness assigned to edges of an incident face.

    │ │ │ │ │ │ │ │ -

    Definition at line 436 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 436 of file vertexDescriptor.h.

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

    ◆ GetIncidentFaceSize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -358,15 +358,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the size of an incident face.

    │ │ │ │ │ │ │ │ -

    Definition at line 362 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 362 of file vertexDescriptor.h.

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

    ◆ GetManifoldEdgeSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -388,15 +388,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the sharpness assigned to a manifold edge.

    │ │ │ │ │ │ │ │ -

    Definition at line 420 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 420 of file vertexDescriptor.h.

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

    ◆ GetVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -417,15 +417,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return the sharpness of the vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 386 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 386 of file vertexDescriptor.h.

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

    ◆ HasEdgeSharpness()

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

    Return if sharpness was assigned to the incident edges.

    │ │ │ │ │ │ │ │ -

    Definition at line 394 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 394 of file vertexDescriptor.h.

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

    ◆ HasIncidentFaceSizes()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -475,15 +475,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if the sizes of incident faces are assigned.

    │ │ │ │ │ │ │ │ -

    Definition at line 346 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 346 of file vertexDescriptor.h.

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

    ◆ HasVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -504,15 +504,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if sharpness was assigned to the vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 373 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 373 of file vertexDescriptor.h.

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

    ◆ Initialize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -553,15 +553,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if vertex neighborhood is on a boundary.

    │ │ │ │ │ │ │ │ -

    Definition at line 338 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 338 of file vertexDescriptor.h.

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

    ◆ IsManifold()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -582,15 +582,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if vertex neighborhood is manifold.

    │ │ │ │ │ │ │ │ -

    Definition at line 329 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 329 of file vertexDescriptor.h.

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

    ◆ IsValid()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -611,15 +611,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Return if instance is valid.

    │ │ │ │ │ │ │ │ -

    Definition at line 320 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 320 of file vertexDescriptor.h.

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

    ◆ SetBoundary()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -641,15 +641,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Declare the vertex neighborhood as being on a boundary.

    │ │ │ │ │ │ │ │ -

    Definition at line 334 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 334 of file vertexDescriptor.h.

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

    ◆ SetIncidentFaceEdgeSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -696,15 +696,15 @@ │ │ │ │ faceIndexIndex of the incident face │ │ │ │ leadingEdgeSharpSharpness to assign to the leading edge of the incident face, i.e. the edge of the face following the vertex. │ │ │ │ trailingEdgeSharpSharpness to assign to the trailing edge of the incident face, i.e. the edge of the face preceding the vertex. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 427 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 427 of file vertexDescriptor.h.

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

    ◆ SetIncidentFaceSize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -736,15 +736,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the size of an incident face.

    │ │ │ │ │ │ │ │ -

    Definition at line 355 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 355 of file vertexDescriptor.h.

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

    ◆ SetManifold()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -766,15 +766,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Declare the vertex neighborhood as manifold (ordered)

    │ │ │ │ │ │ │ │ -

    Definition at line 325 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 325 of file vertexDescriptor.h.

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

    ◆ SetManifoldEdgeSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -814,15 +814,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    edgeIndexIndex of the edge in the ordered sequence
    edgeSharpnessSharpness to be assigned to the edge
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 403 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 403 of file vertexDescriptor.h.

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

    ◆ SetVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -844,20 +844,20 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign sharpness to the vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 382 of file vertexDescriptor.h.

    │ │ │ │ +

    Definition at line 382 of file vertexDescriptor.h.

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

    Describes the type of a patch. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchDescriptor.h>

    │ │ │ │ +

    #include <patchDescriptor.h>

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

    │ │ │ │ Public Types

    enum  Type {
    │ │ │ │   NON_PATCH = 0 │ │ │ │ ,
    │ │ │ │   POINTS │ │ │ │ @@ -192,15 +192,15 @@ │ │ │ │
     Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Describes the type of a patch.

    │ │ │ │

    Uniquely identifies all the different types of patches

    │ │ │ │ │ │ │ │ -

    Definition at line 44 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 44 of file patchDescriptor.h.

    │ │ │ │

    Member Enumeration Documentation

    │ │ │ │ │ │ │ │

    ◆ Type

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -226,15 +226,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    GREGORY 
    GREGORY_BOUNDARY 
    GREGORY_BASIS 
    GREGORY_TRIANGLE 
    │ │ │ │ │ │ │ │ -

    Definition at line 48 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 48 of file patchDescriptor.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ PatchDescriptor() [1/3]

    │ │ │ │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Default constructor.

    │ │ │ │ │ │ │ │ -

    Definition at line 69 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 69 of file patchDescriptor.h.

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

    ◆ PatchDescriptor() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Constructor.

    │ │ │ │ │ │ │ │ -

    Definition at line 73 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 73 of file patchDescriptor.h.

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

    ◆ PatchDescriptor() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -316,15 +316,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Copy Constructor.

    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 77 of file patchDescriptor.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetAdaptivePatchDescriptors()

    │ │ │ │ │ │ │ │ @@ -374,15 +374,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Number of control vertices of Gregory patch basis (20)

    │ │ │ │ │ │ │ │ -

    Definition at line 126 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 126 of file patchDescriptor.h.

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

    ◆ GetGregoryPatchSize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -403,15 +403,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Number of control vertices of Gregory (and Gregory Boundary) Patches in table.

    │ │ │ │ │ │ │ │ -

    Definition at line 123 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 123 of file patchDescriptor.h.

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

    ◆ GetNumControlVertices() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -432,15 +432,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the number of control vertices expected for a patch of the type described.

    │ │ │ │ │ │ │ │ -

    Definition at line 110 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 110 of file patchDescriptor.h.

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

    ◆ GetNumControlVertices() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -462,15 +462,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the number of control vertices expected for a patch of the type described.

    │ │ │ │ │ │ │ │ -

    Definition at line 150 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 150 of file patchDescriptor.h.

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

    ◆ GetNumFVarControlVertices() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -492,15 +492,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Deprecated.

    │ │ │ │
    See also
    PatchDescriptor::GetNumControlVertices
    │ │ │ │ │ │ │ │ -

    Definition at line 115 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 115 of file patchDescriptor.h.

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

    ◆ GetNumFVarControlVertices() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -523,15 +523,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Deprecated.

    │ │ │ │
    See also
    PatchDescriptor::GetNumControlVertices
    │ │ │ │ │ │ │ │ -

    Definition at line 168 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 168 of file patchDescriptor.h.

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

    ◆ GetRegularPatchSize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -552,15 +552,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Number of control vertices of Regular Patches in table.

    │ │ │ │ │ │ │ │ -

    Definition at line 120 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 120 of file patchDescriptor.h.

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

    ◆ GetType()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -581,15 +581,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the type of the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 87 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 87 of file patchDescriptor.h.

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

    ◆ IsAdaptive() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -610,15 +610,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns true if the type is an adaptive patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 97 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 97 of file patchDescriptor.h.

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

    ◆ IsAdaptive() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -640,15 +640,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns true if the type is an adaptive (non-linear) patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 92 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 92 of file patchDescriptor.h.

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

    ◆ operator<()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -670,15 +670,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Allows ordering of patches by type.

    │ │ │ │ │ │ │ │ -

    Definition at line 173 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 173 of file patchDescriptor.h.

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

    ◆ operator=()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -700,15 +700,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assignment operator.

    │ │ │ │ │ │ │ │ -

    Definition at line 81 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 81 of file patchDescriptor.h.

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

    ◆ operator==()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -730,15 +730,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    True if the descriptors are identical.

    │ │ │ │ │ │ │ │ -

    Definition at line 180 of file patchDescriptor.h.

    │ │ │ │ +

    Definition at line 180 of file patchDescriptor.h.

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

    ◆ print()

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

    An quadtree-based map connecting coarse faces to their sub-patches. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchMap.h>

    │ │ │ │ +

    #include <patchMap.h>

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

    │ │ │ │ Public Types

    typedef PatchTable::PatchHandle Handle
     
    │ │ │ │ │ │ │ │

    │ │ │ │ @@ -120,29 +120,29 @@ │ │ │ │

     
    │ │ │ │

    Detailed Description

    │ │ │ │

    An quadtree-based map connecting coarse faces to their sub-patches.

    │ │ │ │

    PatchTable::PatchArrays contain lists of patches that represent the limit surface of a mesh, sorted by their topological type. These arrays break the connection between coarse faces and their sub-patches.

    │ │ │ │

    The PatchMap provides a quad-tree based lookup structure that, given a singular parametric location, can efficiently return a handle to the sub-patch that contains this location.

    │ │ │ │ │ │ │ │ -

    Definition at line 49 of file patchMap.h.

    │ │ │ │ +

    Definition at line 49 of file patchMap.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ Handle

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef PatchTable::PatchHandle Handle
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 52 of file patchMap.h.

    │ │ │ │ +

    Definition at line 52 of file patchMap.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ PatchMap()

    │ │ │ │ │ │ │ │ @@ -218,20 +218,20 @@ │ │ │ │ uLocal u parameter │ │ │ │ vLocal v parameter │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Returns
    A patch handle or 0 if the face is not supported (index out of bounds) or is tagged as a hole
    │ │ │ │ │ │ │ │ -

    Definition at line 193 of file patchMap.h.

    │ │ │ │ +

    Definition at line 193 of file patchMap.h.

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

    #include <patchMap.h>

    │ │ │ │ +

    #include <patchMap.h>

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

    │ │ │ │ Public Attributes

    unsigned int isSet: 1
     
    unsigned int isLeaf: 1
     
    unsigned int index: 30
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 85 of file patchMap.h.

    │ │ │ │ +

    Definition at line 85 of file patchMap.h.

    │ │ │ │

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ index

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int index
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 88 of file patchMap.h.

    │ │ │ │ +

    Definition at line 88 of file patchMap.h.

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

    ◆ isLeaf

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int isLeaf
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 87 of file patchMap.h.

    │ │ │ │ +

    Definition at line 87 of file patchMap.h.

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

    ◆ isSet

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -153,20 +153,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int isSet
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 86 of file patchMap.h.

    │ │ │ │ +

    Definition at line 86 of file patchMap.h.

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

    Patch parameterization. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchParam.h>

    │ │ │ │ +

    #include <patchParam.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for PatchParam:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ PatchParam │ │ │ │ @@ -249,15 +249,15 @@ │ │ │ │ | \ | \ | | \ | \ │ │ │ │ | L1 \ | L1 \ | | L1 \ | L1 \ │ │ │ │ | \ | \ | | \ | \ │ │ │ │ |0,0 \ |1,0 \ | | \ | \ │ │ │ │ +---------------+---------------+ +---------------+---------------+ │ │ │ │ (0,0) (1,0) (0,0,1) (1,0,0) │ │ │ │ │ │ │ │ -

    Definition at line 152 of file patchParam.h.

    │ │ │ │ +

    Definition at line 152 of file patchParam.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ Clear()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -276,15 +276,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │

    Resets everything to 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 174 of file patchParam.h.

    │ │ │ │ +

    Definition at line 174 of file patchParam.h.

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

    ◆ GetBoundary()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -305,15 +305,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the boundary edge encoding for the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 191 of file patchParam.h.

    │ │ │ │ +

    Definition at line 191 of file patchParam.h.

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

    ◆ GetDepth()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -334,15 +334,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the level of subdivision of the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 197 of file patchParam.h.

    │ │ │ │ +

    Definition at line 197 of file patchParam.h.

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

    ◆ GetFaceId()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -363,15 +363,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the faceid.

    │ │ │ │ │ │ │ │ -

    Definition at line 177 of file patchParam.h.

    │ │ │ │ +

    Definition at line 177 of file patchParam.h.

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

    ◆ GetParamFraction()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -392,15 +392,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the fraction of unit parametric space covered by this face.

    │ │ │ │ │ │ │ │ -

    Definition at line 265 of file patchParam.h.

    │ │ │ │ +

    Definition at line 265 of file patchParam.h.

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

    ◆ GetTransition()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -421,15 +421,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the transition edge encoding for the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 188 of file patchParam.h.

    │ │ │ │ +

    Definition at line 188 of file patchParam.h.

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

    ◆ GetU()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -450,15 +450,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the log2 value of the u parameter at the first corner of the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 181 of file patchParam.h.

    │ │ │ │ +

    Definition at line 181 of file patchParam.h.

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

    ◆ GetV()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the log2 value of the v parameter at the first corner of the patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 185 of file patchParam.h.

    │ │ │ │ +

    Definition at line 185 of file patchParam.h.

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

    ◆ IsRegular()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -508,15 +508,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns whether the patch is regular.

    │ │ │ │ │ │ │ │ -

    Definition at line 228 of file patchParam.h.

    │ │ │ │ +

    Definition at line 228 of file patchParam.h.

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

    ◆ IsTriangleRotated()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -537,15 +537,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns if a triangular patch is parametrically rotated 180 degrees.

    │ │ │ │ │ │ │ │ -

    Definition at line 290 of file patchParam.h.

    │ │ │ │ +

    Definition at line 290 of file patchParam.h.

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

    ◆ NonQuadRoot()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -566,15 +566,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    True if the parent base face is a non-quad.

    │ │ │ │ │ │ │ │ -

    Definition at line 194 of file patchParam.h.

    │ │ │ │ +

    Definition at line 194 of file patchParam.h.

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

    ◆ Normalize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -615,15 +615,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    uu parameter
    vv parameter
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 271 of file patchParam.h.

    │ │ │ │ +

    Definition at line 271 of file patchParam.h.

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

    ◆ NormalizeTriangle()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -655,15 +655,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 297 of file patchParam.h.

    │ │ │ │ +

    Definition at line 297 of file patchParam.h.

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

    ◆ Set()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -744,15 +744,15 @@ │ │ │ │ boundary5-bits identifying boundary edges (and verts for tris) │ │ │ │ transition4-bits identifying transition edges │ │ │ │ regularwhether the patch is regular │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 249 of file patchParam.h.

    │ │ │ │ +

    Definition at line 249 of file patchParam.h.

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

    ◆ Unnormalize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -793,15 +793,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    uu parameter
    vv parameter
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 281 of file patchParam.h.

    │ │ │ │ +

    Definition at line 281 of file patchParam.h.

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

    ◆ UnnormalizeTriangle()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -833,15 +833,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 312 of file patchParam.h.

    │ │ │ │ +

    Definition at line 312 of file patchParam.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ field0

    │ │ │ │ │ │ │ │ @@ -850,15 +850,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int field0
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 230 of file patchParam.h.

    │ │ │ │ +

    Definition at line 230 of file patchParam.h.

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

    ◆ field1

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -866,20 +866,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int field1
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 231 of file patchParam.h.

    │ │ │ │ +

    Definition at line 231 of file patchParam.h.

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

    Container for arrays of parametric patches. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchTable.h>

    │ │ │ │ +

    #include <patchTable.h>

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

    │ │ │ │ Classes

    class  PatchHandle
     Handle that can be used as unique patch identifier within PatchTable. More...
     
    │ │ │ │ @@ -420,15 +420,15 @@ │ │ │ │
    │ │ │ │

    Detailed Description

    │ │ │ │

    Container for arrays of parametric patches.

    │ │ │ │

    PatchTable contains topology and parametric information about the patches generated by the Refinement process. Patches in the table are sorted into arrays based on their PatchDescriptor Type.

    │ │ │ │

    Note : PatchTable can be accessed either using a PatchHandle or a combination of array and patch indices.

    │ │ │ │

    XXXX manuelk we should add a PatchIterator that can dereference into a PatchHandle for fast linear traversal of the table

    │ │ │ │ │ │ │ │ -

    Definition at line 55 of file patchTable.h.

    │ │ │ │ +

    Definition at line 55 of file patchTable.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ ConstQuadOffsetsArray

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -436,15 +436,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    typedef Vtr::ConstArray<unsigned int> ConstQuadOffsetsArray
    │ │ │ │
    │ │ │ │ │ │ │ │

    Accessors for the gregory patch evaluation buffers. These methods will be deprecated.

    │ │ │ │ │ │ │ │ -

    Definition at line 259 of file patchTable.h.

    │ │ │ │ +

    Definition at line 259 of file patchTable.h.

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

    ◆ PatchVertsTable

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef std::vector<Index> PatchVertsTable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 375 of file patchTable.h.

    │ │ │ │ +

    Definition at line 375 of file patchTable.h.

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

    ◆ QuadOffsetsTable

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -468,15 +468,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef std::vector<unsigned int> QuadOffsetsTable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 389 of file patchTable.h.

    │ │ │ │ +

    Definition at line 389 of file patchTable.h.

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

    ◆ VertexValenceTable

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -484,15 +484,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef std::vector<Index> VertexValenceTable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 264 of file patchTable.h.

    │ │ │ │ +

    Definition at line 264 of file patchTable.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ PatchTable() [1/2]

    │ │ │ │ │ │ │ │ @@ -601,15 +601,15 @@ │ │ │ │ srcBuffer with primvar data for the base and refined vertex values │ │ │ │ dstDestination buffer for the computed local point vertex values │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    For more flexibility computing local vertex points, retrieval of the local point stencil table and use of its public methods is recommended or often required.

    │ │ │ │ │ │ │ │ -

    Definition at line 778 of file patchTable.h.

    │ │ │ │ +

    Definition at line 778 of file patchTable.h.

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

    ◆ ComputeLocalPointValuesFaceVarying()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -658,15 +658,15 @@ │ │ │ │ dstDestination buffer for the computed local point face-varying values │ │ │ │ channelface-varying channel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    For more flexibility computing local face-varying points, retrieval of the local point face-varying stencil table and use of its public methods is recommended or often required.

    │ │ │ │ │ │ │ │ -

    Definition at line 796 of file patchTable.h.

    │ │ │ │ +

    Definition at line 796 of file patchTable.h.

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

    ◆ ComputeLocalPointValuesVarying()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -708,15 +708,15 @@ │ │ │ │ srcBuffer with primvar data for the base and refined varying values │ │ │ │ dstDestination buffer for the computed local point varying values │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    For more flexibility computing local varying points, retrieval of the local point varying stencil table and use of its public methods is recommended or often required.

    │ │ │ │ │ │ │ │ -

    Definition at line 787 of file patchTable.h.

    │ │ │ │ +

    Definition at line 787 of file patchTable.h.

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

    ◆ EvaluateBasis() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -790,15 +790,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 817 of file patchTable.h.

    │ │ │ │ +

    Definition at line 817 of file patchTable.h.

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

    ◆ EvaluateBasis() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -872,15 +872,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 810 of file patchTable.h.

    │ │ │ │ +

    Definition at line 810 of file patchTable.h.

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

    ◆ EvaluateBasis() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1048,15 +1048,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 847 of file patchTable.h.

    │ │ │ │ +

    Definition at line 847 of file patchTable.h.

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

    ◆ EvaluateBasisFaceVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1136,15 +1136,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 840 of file patchTable.h.

    │ │ │ │ +

    Definition at line 840 of file patchTable.h.

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

    ◆ EvaluateBasisFaceVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1313,15 +1313,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 832 of file patchTable.h.

    │ │ │ │ +

    Definition at line 832 of file patchTable.h.

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

    ◆ EvaluateBasisVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1395,15 +1395,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    An overloaded version to assist template parameter resolution when explicitly declaring unused array arguments as 0.

    │ │ │ │ │ │ │ │ -

    Definition at line 825 of file patchTable.h.

    │ │ │ │ +

    Definition at line 825 of file patchTable.h.

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

    ◆ EvaluateBasisVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1654,15 +1654,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 764 of file patchTable.h.

    │ │ │ │ +

    Definition at line 764 of file patchTable.h.

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

    ◆ GetLocalPointFaceVaryingStencilTable() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1684,15 +1684,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the stencil table to compute local point face-varying values.

    │ │ │ │ │ │ │ │ -

    Definition at line 741 of file patchTable.h.

    │ │ │ │ +

    Definition at line 741 of file patchTable.h.

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

    ◆ GetLocalPointFaceVaryingStencilTable() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1735,15 +1735,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the stencil table to compute local point vertex values.

    │ │ │ │ │ │ │ │ -

    Definition at line 730 of file patchTable.h.

    │ │ │ │ +

    Definition at line 730 of file patchTable.h.

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

    ◆ GetLocalPointStencilTable() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1785,15 +1785,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 752 of file patchTable.h.

    │ │ │ │ +

    Definition at line 752 of file patchTable.h.

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

    ◆ GetLocalPointVaryingStencilTable() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1814,15 +1814,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the stencil table to compute local point varying values.

    │ │ │ │ │ │ │ │ -

    Definition at line 735 of file patchTable.h.

    │ │ │ │ +

    Definition at line 735 of file patchTable.h.

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

    ◆ GetLocalPointVaryingStencilTable() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1864,15 +1864,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 758 of file patchTable.h.

    │ │ │ │ +

    Definition at line 758 of file patchTable.h.

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

    ◆ GetMaxValence()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1893,15 +1893,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns max vertex valence.

    │ │ │ │ │ │ │ │ -

    Definition at line 92 of file patchTable.h.

    │ │ │ │ +

    Definition at line 92 of file patchTable.h.

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

    ◆ GetNumControlVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1942,15 +1942,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of control vertex indices in the table.

    │ │ │ │ │ │ │ │ -

    Definition at line 84 of file patchTable.h.

    │ │ │ │ +

    Definition at line 84 of file patchTable.h.

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

    ◆ GetNumFVarChannels()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2106,15 +2106,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of ptex faces in the mesh.

    │ │ │ │ │ │ │ │ -

    Definition at line 95 of file patchTable.h.

    │ │ │ │ +

    Definition at line 95 of file patchTable.h.

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

    ◆ GetPatchArrayDescriptor()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2255,15 +2255,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Get the table of patch control vertices.

    │ │ │ │ │ │ │ │ -

    Definition at line 378 of file patchTable.h.

    │ │ │ │ +

    Definition at line 378 of file patchTable.h.

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

    ◆ GetPatchDescriptor()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2568,15 +2568,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the PatchParamTable (PatchParams order matches patch array sorting)

    │ │ │ │ │ │ │ │ -

    Definition at line 381 of file patchTable.h.

    │ │ │ │ +

    Definition at line 381 of file patchTable.h.

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

    ◆ GetPatchQuadOffsets()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2717,15 +2717,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the quad-offsets table.

    │ │ │ │ │ │ │ │ -

    Definition at line 392 of file patchTable.h.

    │ │ │ │ +

    Definition at line 392 of file patchTable.h.

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

    ◆ GetSharpnessIndexTable()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2746,15 +2746,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns a sharpness index table for each patch (if exists)

    │ │ │ │ │ │ │ │ -

    Definition at line 384 of file patchTable.h.

    │ │ │ │ +

    Definition at line 384 of file patchTable.h.

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

    ◆ getSharpnessIndices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2801,15 +2801,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns sharpness values table.

    │ │ │ │ │ │ │ │ -

    Definition at line 387 of file patchTable.h.

    │ │ │ │ +

    Definition at line 387 of file patchTable.h.

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

    ◆ getSharpnessValues()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2944,15 +2944,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the 'VertexValences' table (vertex neighborhoods table)

    │ │ │ │ │ │ │ │ -

    Definition at line 267 of file patchTable.h.

    │ │ │ │ +

    Definition at line 267 of file patchTable.h.

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

    ◆ IsFeatureAdaptive()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3013,15 +3013,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 708 of file patchTable.h.

    │ │ │ │ +

    Definition at line 708 of file patchTable.h.

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

    ◆ LocalPointFaceVaryingStencilPrecisionMatchesType() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3042,15 +3042,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 721 of file patchTable.h.

    │ │ │ │ +

    Definition at line 721 of file patchTable.h.

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

    ◆ LocalPointStencilPrecisionMatchesType() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3092,15 +3092,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 700 of file patchTable.h.

    │ │ │ │ +

    Definition at line 700 of file patchTable.h.

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

    ◆ LocalPointStencilPrecisionMatchesType() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3121,15 +3121,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 713 of file patchTable.h.

    │ │ │ │ +

    Definition at line 713 of file patchTable.h.

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

    ◆ LocalPointVaryingStencilPrecisionMatchesType() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3171,15 +3171,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 704 of file patchTable.h.

    │ │ │ │ +

    Definition at line 704 of file patchTable.h.

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

    ◆ LocalPointVaryingStencilPrecisionMatchesType() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3200,15 +3200,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 717 of file patchTable.h.

    │ │ │ │ +

    Definition at line 717 of file patchTable.h.

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

    ◆ print()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3244,20 +3244,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 531 of file patchTable.h.

    │ │ │ │ +

    Definition at line 531 of file patchTable.h.

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

    Handle that can be used as unique patch identifier within PatchTable. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchTable.h>

    │ │ │ │ +

    #include <patchTable.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Attributes

    Index arrayIndex
     
    Index patchIndex
     
     
    class PatchMap
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Handle that can be used as unique patch identifier within PatchTable.

    │ │ │ │ │ │ │ │ -

    Definition at line 60 of file patchTable.h.

    │ │ │ │ +

    Definition at line 60 of file patchTable.h.

    │ │ │ │

    Friends And Related Symbol Documentation

    │ │ │ │ │ │ │ │

    ◆ PatchMap

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ friend
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 65 of file patchTable.h.

    │ │ │ │ +

    Definition at line 65 of file patchTable.h.

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

    ◆ PatchTable

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -165,15 +165,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 64 of file patchTable.h.

    │ │ │ │ +

    Definition at line 64 of file patchTable.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ arrayIndex

    │ │ │ │ │ │ │ │ @@ -182,15 +182,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Index arrayIndex
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 67 of file patchTable.h.

    │ │ │ │ +

    Definition at line 67 of file patchTable.h.

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

    ◆ patchIndex

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -198,15 +198,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Index patchIndex
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 68 of file patchTable.h.

    │ │ │ │ +

    Definition at line 68 of file patchTable.h.

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

    ◆ vertIndex

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -214,20 +214,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Index vertIndex
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 69 of file patchTable.h.

    │ │ │ │ +

    Definition at line 69 of file patchTable.h.

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

    Factory for constructing a PatchTable from a TopologyRefiner. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchTableFactory.h>

    │ │ │ │ +

    #include <patchTableFactory.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -124,29 +124,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Classes

    struct  Options
     Public options for the PatchTable factory. More...
     
    struct  PatchFaceTag
    static PatchTableCreate (TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
     Instantiates a PatchTable from a client-provided TopologyRefiner.
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Factory for constructing a PatchTable from a TopologyRefiner.

    │ │ │ │ │ │ │ │ -

    Definition at line 40 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 40 of file patchTableFactory.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ PatchTagVector

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef std::vector<PatchFaceTag> PatchTagVector
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 208 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 208 of file patchTableFactory.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ Create()

    │ │ │ │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    Returns
    A new instance of PatchTable
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Public options for the PatchTable factory. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchTableFactory.h>

    │ │ │ │ +

    #include <patchTableFactory.h>

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

    │ │ │ │ Public Types

    enum  EndCapType {
    │ │ │ │   ENDCAP_NONE = 0 │ │ │ │ ,
    │ │ │ │   ENDCAP_BILINEAR_BASIS │ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │
    int const * fvarChannelIndices
     List containing the indices of the channels selected for the factory.
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Public options for the PatchTable factory.

    │ │ │ │ │ │ │ │ -

    Definition at line 45 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 45 of file patchTableFactory.h.

    │ │ │ │

    Member Enumeration Documentation

    │ │ │ │ │ │ │ │

    ◆ EndCapType

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -237,15 +237,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    ENDCAP_GREGORY_BASIS 

    use Gregory patches (highest quality, recommended default)

    │ │ │ │
    ENDCAP_LEGACY_GREGORY 

    legacy option for 2.x style Gregory patches (Catmark only)

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

    Definition at line 55 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 55 of file patchTableFactory.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Options()

    │ │ │ │ │ │ │ │ @@ -266,15 +266,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 63 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 63 of file patchTableFactory.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetEndCapType()

    │ │ │ │ │ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Get endcap basis type.

    │ │ │ │ │ │ │ │ -

    Definition at line 85 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 85 of file patchTableFactory.h.

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

    ◆ GetRefineAdaptiveOptions()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -325,15 +325,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Determine adaptive refinement options to match assigned patch options.

    │ │ │ │ │ │ │ │ -

    Definition at line 100 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 100 of file patchTableFactory.h.

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

    ◆ SetEndCapType()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Set endcap basis type.

    │ │ │ │ │ │ │ │ -

    Definition at line 88 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 88 of file patchTableFactory.h.

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

    ◆ SetFVarPatchPrecision() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -403,15 +403,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 215 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 215 of file patchTableFactory.h.

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

    ◆ SetMaxIsolationLevel()

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

    Set maximum isolation level.

    │ │ │ │ │ │ │ │ -

    Definition at line 91 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 91 of file patchTableFactory.h.

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

    ◆ SetPatchPrecision() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -481,15 +481,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 212 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 212 of file patchTableFactory.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ endCapType

    │ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ unsigned int endCapType │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    EndCapType.

    │ │ │ │ │ │ │ │ -

    Definition at line 120 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 120 of file patchTableFactory.h.

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

    ◆ fvarChannelIndices

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -518,15 +518,15 @@ │ │ │ │ int const* fvarChannelIndices │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    List containing the indices of the channels selected for the factory.

    │ │ │ │ │ │ │ │ -

    Definition at line 140 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 140 of file patchTableFactory.h.

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

    ◆ fvarPatchPrecisionDouble

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -536,15 +536,15 @@ │ │ │ │ unsigned int fvarPatchPrecisionDouble │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate double-precision stencils for face-varying patches.

    │ │ │ │ │ │ │ │ -

    Definition at line 133 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 133 of file patchTableFactory.h.

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

    ◆ generateAllLevels

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -554,15 +554,15 @@ │ │ │ │ unsigned int generateAllLevels │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only)

    │ │ │ │ │ │ │ │ -

    Definition at line 110 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 110 of file patchTableFactory.h.

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

    ◆ generateFVarLegacyLinearPatches

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -572,15 +572,15 @@ │ │ │ │ unsigned int generateFVarLegacyLinearPatches │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate all linear face-varying patches (legacy)

    │ │ │ │ │ │ │ │ -

    Definition at line 136 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 136 of file patchTableFactory.h.

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

    ◆ generateFVarTables

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -590,15 +590,15 @@ │ │ │ │ unsigned int generateFVarTables │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate face-varying patch tables.

    │ │ │ │ │ │ │ │ -

    Definition at line 129 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 129 of file patchTableFactory.h.

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

    ◆ generateLegacySharpCornerPatches

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -608,15 +608,15 @@ │ │ │ │ unsigned int generateLegacySharpCornerPatches │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate sharp regular patches at smooth corners (legacy)

    │ │ │ │ │ │ │ │ -

    Definition at line 137 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 137 of file patchTableFactory.h.

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

    ◆ generateVaryingLocalPoints

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -626,15 +626,15 @@ │ │ │ │ unsigned int generateVaryingLocalPoints │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate local points with varying patches.

    │ │ │ │ │ │ │ │ -

    Definition at line 126 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 126 of file patchTableFactory.h.

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

    ◆ generateVaryingTables

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -644,15 +644,15 @@ │ │ │ │ unsigned int generateVaryingTables │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate varying patch tables.

    │ │ │ │ │ │ │ │ -

    Definition at line 125 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 125 of file patchTableFactory.h.

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

    ◆ includeBaseLevelIndices

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -662,15 +662,15 @@ │ │ │ │ unsigned int includeBaseLevelIndices │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Include base level in patch point indices (Uniform mode only)

    │ │ │ │ │ │ │ │ -

    Definition at line 111 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 111 of file patchTableFactory.h.

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

    ◆ includeFVarBaseLevelIndices

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -680,15 +680,15 @@ │ │ │ │ unsigned int includeFVarBaseLevelIndices │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Include base level in face-varying patch point indices (Uniform mode only)

    │ │ │ │ │ │ │ │ -

    Definition at line 112 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 112 of file patchTableFactory.h.

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

    ◆ maxIsolationLevel

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -698,15 +698,15 @@ │ │ │ │ unsigned int maxIsolationLevel │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Cap adaptive feature isolation to the given level (max. 10)

    │ │ │ │ │ │ │ │ -

    Definition at line 117 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 117 of file patchTableFactory.h.

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

    ◆ numFVarChannels

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

    Number of channel indices and interpolation modes passed.

    │ │ │ │ │ │ │ │ -

    Definition at line 139 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 139 of file patchTableFactory.h.

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

    ◆ patchPrecisionDouble

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -734,15 +734,15 @@ │ │ │ │ unsigned int patchPrecisionDouble │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generate double-precision stencils for vertex patches.

    │ │ │ │ │ │ │ │ -

    Definition at line 132 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 132 of file patchTableFactory.h.

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

    ◆ shareEndCapPatchPoints

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -751,15 +751,15 @@ │ │ │ │ │ │ │ │ unsigned int shareEndCapPatchPoints │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Share endcap patch points among adjacent endcap patches. currently only work with GregoryBasis.

    │ │ │ │ │ │ │ │ -

    Definition at line 121 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 121 of file patchTableFactory.h.

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

    ◆ triangulateQuads

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -769,15 +769,15 @@ │ │ │ │ unsigned int triangulateQuads │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Triangulate 'QUADS' primitives (Uniform mode only)

    │ │ │ │ │ │ │ │ -

    Definition at line 113 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 113 of file patchTableFactory.h.

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

    ◆ useInfSharpPatch

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -787,15 +787,15 @@ │ │ │ │ unsigned int useInfSharpPatch │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Use infinitely-sharp patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 116 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 116 of file patchTableFactory.h.

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

    ◆ useSingleCreasePatch

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -805,20 +805,20 @@ │ │ │ │ unsigned int useSingleCreasePatch │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Use single crease patch.

    │ │ │ │ │ │ │ │ -

    Definition at line 115 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 115 of file patchTableFactory.h.

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

    Obsolete internal struct not intended for public use – due to be deprecated. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <patchTableFactory.h>

    │ │ │ │ +

    #include <patchTableFactory.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -133,15 +133,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

    void clear ()
     
    void assignBoundaryPropertiesFromEdgeMask (int boundaryEdgeMask)
     
     
    unsigned int _isSingleCrease: 1
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Obsolete internal struct not intended for public use – due to be deprecated.

    │ │ │ │ │ │ │ │ -

    Definition at line 192 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 192 of file patchTableFactory.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ assignBoundaryPropertiesFromEdgeMask()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -219,15 +219,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _boundaryCount
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 199 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 199 of file patchTableFactory.h.

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

    ◆ _boundaryIndex

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -235,15 +235,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _boundaryIndex
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 198 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 198 of file patchTableFactory.h.

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

    ◆ _boundaryMask

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -251,15 +251,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _boundaryMask
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 197 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 197 of file patchTableFactory.h.

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

    ◆ _hasBoundaryEdge

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -267,15 +267,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _hasBoundaryEdge
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 200 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 200 of file patchTableFactory.h.

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

    ◆ _hasPatch

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -283,15 +283,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _hasPatch
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 194 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 194 of file patchTableFactory.h.

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

    ◆ _isRegular

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -299,15 +299,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _isRegular
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 195 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 195 of file patchTableFactory.h.

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

    ◆ _isSingleCrease

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -315,15 +315,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _isSingleCrease
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 201 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 201 of file patchTableFactory.h.

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

    ◆ _transitionMask

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -331,20 +331,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    unsigned int _transitionMask
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 196 of file patchTableFactory.h.

    │ │ │ │ +

    Definition at line 196 of file patchTableFactory.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct 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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Factory for constructing TopologyRefiners from specific mesh classes. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefinerFactory.h>

    │ │ │ │ +

    #include <topologyRefinerFactory.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for TopologyRefinerFactory< MESH >:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ TopologyRefinerFactoryBase │ │ │ │ @@ -277,15 +277,15 @@ │ │ │ │ │ │ │ │

    Detailed Description

    │ │ │ │
    template<class MESH>
    │ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Far::TopologyRefinerFactory< MESH >

    Factory for constructing TopologyRefiners from specific mesh classes.

    │ │ │ │

    TopologyRefinerFactory<MESH> is the factory class template to convert an instance of TopologyRefiner from an arbitrary mesh class. While a class template, the implementation is not (cannot) be complete, so specialization of a few methods is required (it is a stateless factory, so no instance and only static methods).

    │ │ │ │

    This template provides both the interface and high level assembly for the construction of the TopologyRefiner instance. The high level construction executes a specific set of operations to convert the client's MESH into TopologyRefiner. This set of operations combines methods independent of MESH from the base class with those specialized here for class MESH.

    │ │ │ │ │ │ │ │ -

    Definition at line 78 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 78 of file topologyRefinerFactory.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ TopologyError

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -301,15 +301,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 131 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 131 of file topologyRefinerFactory.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ assignComponentTags()

    │ │ │ │ │ │ │ │ @@ -344,15 +344,15 @@ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    (Optional) Specify edge or vertex sharpness or face holes

    │ │ │ │ │ │ │ │ -

    Definition at line 690 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 690 of file topologyRefinerFactory.h.

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

    ◆ assignComponentTopology()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -386,15 +386,15 @@ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the relationships between vertices, faces, etc. ie the face-vertices, vertex-faces, edge-vertices, etc.

    │ │ │ │ │ │ │ │ -

    Definition at line 621 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 621 of file topologyRefinerFactory.h.

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

    ◆ assignFaceVaryingTopology()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    (Optional) Specify face-varying data per face

    │ │ │ │ │ │ │ │ -

    Definition at line 674 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 674 of file topologyRefinerFactory.h.

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

    ◆ Create() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -479,15 +479,15 @@ │ │ │ │ meshClient's topological representation (or a converter) │ │ │ │ optionsOptions controlling the creation of the TopologyRefiner │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Returns
    A new instance of TopologyRefiner or 0 for failure
    │ │ │ │ │ │ │ │ -

    Definition at line 346 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 346 of file topologyRefinerFactory.h.

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

    ◆ Create() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -519,15 +519,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    baseLevelAn existing TopologyRefiner to share base level.
    │ │ │ │ │ │ │ │ │ │ │ │
    Returns
    A new instance of TopologyRefiner or 0 for failure
    │ │ │ │ │ │ │ │ -

    Definition at line 364 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 364 of file topologyRefinerFactory.h.

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

    ◆ createBaseFVarChannel() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -561,15 +561,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Create a new face-varying channel with the given number of values.

    │ │ │ │ │ │ │ │ -

    Definition at line 561 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 561 of file topologyRefinerFactory.h.

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

    ◆ createBaseFVarChannel() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -609,15 +609,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Create a new face-varying channel with the given number of values and independent interpolation options.

    │ │ │ │ │ │ │ │ -

    Definition at line 566 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 566 of file topologyRefinerFactory.h.

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

    ◆ findBaseEdge()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -657,15 +657,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Identify an edge to be assigned a sharpness value given a vertex pair.

    │ │ │ │ │ │ │ │ -

    Definition at line 521 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 521 of file topologyRefinerFactory.h.

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

    ◆ getBaseEdgeFaceLocalIndices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -699,15 +699,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the local indices of an edge within each of its incident faces.

    │ │ │ │ │ │ │ │ -

    Definition at line 505 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 505 of file topologyRefinerFactory.h.

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

    ◆ getBaseEdgeFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -741,15 +741,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the faces incident each edge.

    │ │ │ │ │ │ │ │ -

    Definition at line 489 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 489 of file topologyRefinerFactory.h.

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

    ◆ getBaseEdgeVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -783,15 +783,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the vertices incident each edge.

    │ │ │ │ │ │ │ │ -

    Definition at line 484 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 484 of file topologyRefinerFactory.h.

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

    ◆ getBaseFaceEdges()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -825,15 +825,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the edges incident each face.

    │ │ │ │ │ │ │ │ -

    Definition at line 479 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 479 of file topologyRefinerFactory.h.

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

    ◆ getBaseFaceFVarValues()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -873,15 +873,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the face-varying values for the corners of each face.

    │ │ │ │ │ │ │ │ -

    Definition at line 573 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 573 of file topologyRefinerFactory.h.

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

    ◆ getBaseFaceVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -915,15 +915,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the vertices incident each face.

    │ │ │ │ │ │ │ │ -

    Definition at line 474 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 474 of file topologyRefinerFactory.h.

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

    ◆ getBaseVertexEdgeLocalIndices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -957,15 +957,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the local indices of a vertex within each of its incident edges.

    │ │ │ │ │ │ │ │ -

    Definition at line 515 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 515 of file topologyRefinerFactory.h.

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

    ◆ getBaseVertexEdges()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -999,15 +999,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the edges incident each vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 499 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 499 of file topologyRefinerFactory.h.

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

    ◆ getBaseVertexFaceLocalIndices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1041,15 +1041,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the local indices of a vertex within each of its incident faces.

    │ │ │ │ │ │ │ │ -

    Definition at line 510 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 510 of file topologyRefinerFactory.h.

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

    ◆ getBaseVertexFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1083,15 +1083,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign the faces incident each vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 494 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 494 of file topologyRefinerFactory.h.

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

    ◆ getNumBaseEdges()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1113,15 +1113,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 441 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 441 of file topologyRefinerFactory.h.

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

    ◆ getNumBaseFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1143,15 +1143,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 436 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 436 of file topologyRefinerFactory.h.

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

    ◆ getNumBaseVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1173,15 +1173,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 446 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 446 of file topologyRefinerFactory.h.

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

    ◆ populateBaseLevel()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1219,15 +1219,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 371 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 371 of file topologyRefinerFactory.h.

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

    ◆ populateBaseLocalIndices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1251,15 +1251,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Determine all local indices by inspection (only for pure manifold meshes)

    │ │ │ │ │ │ │ │ -

    Definition at line 527 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 527 of file topologyRefinerFactory.h.

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

    ◆ reportInvalidTopology()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1299,15 +1299,15 @@ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    (Optional) Control run-time topology validation and error reporting

    │ │ │ │ │ │ │ │ -

    Definition at line 707 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 707 of file topologyRefinerFactory.h.

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

    ◆ resizeComponentTopology()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1341,15 +1341,15 @@ │ │ │ │ staticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of vertices, faces, face-vertices, etc.

    │ │ │ │ │ │ │ │ -

    Definition at line 580 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 580 of file topologyRefinerFactory.h.

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

    ◆ setBaseEdgeNonManifold()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1389,15 +1389,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Tag an edge as non-manifold.

    │ │ │ │ │ │ │ │ -

    Definition at line 533 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 533 of file topologyRefinerFactory.h.

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

    ◆ setBaseEdgeSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1437,15 +1437,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign a sharpness value to a given edge.

    │ │ │ │ │ │ │ │ -

    Definition at line 544 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 544 of file topologyRefinerFactory.h.

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

    ◆ setBaseFaceHole()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1485,15 +1485,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Tag a face as a hole.

    │ │ │ │ │ │ │ │ -

    Definition at line 554 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 554 of file topologyRefinerFactory.h.

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

    ◆ setBaseVertexNonManifold()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1533,15 +1533,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Tag a vertex as non-manifold.

    │ │ │ │ │ │ │ │ -

    Definition at line 538 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 538 of file topologyRefinerFactory.h.

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

    ◆ setBaseVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1581,15 +1581,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Assign a sharpness value to a given vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 549 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 549 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseEdgeFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1629,15 +1629,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of faces incident each edge.

    │ │ │ │ │ │ │ │ -

    Definition at line 458 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 458 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseEdges()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1671,15 +1671,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of edges to be accommodated.

    │ │ │ │ │ │ │ │ -

    Definition at line 425 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 425 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1713,15 +1713,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of faces to be accommodated.

    │ │ │ │ │ │ │ │ -

    Definition at line 420 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 420 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseFaceVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1761,15 +1761,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of vertices incident each face.

    │ │ │ │ │ │ │ │ -

    Definition at line 452 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 452 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseVertexEdges()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1809,15 +1809,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of edges incident each vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 468 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 468 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseVertexFaces()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1857,15 +1857,15 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of faces incident each vertex.

    │ │ │ │ │ │ │ │ -

    Definition at line 463 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 463 of file topologyRefinerFactory.h.

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

    ◆ setNumBaseVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1899,21 +1899,21 @@ │ │ │ │ inlinestaticprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specify the number of vertices to be accommodated.

    │ │ │ │ │ │ │ │ -

    Definition at line 430 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 430 of file topologyRefinerFactory.h.

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

    Stores topology data for a specified set of refinement options. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefiner.h>

    │ │ │ │ +

    #include <topologyRefiner.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -208,15 +208,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Classes

    struct  AdaptiveOptions
     Adaptive refinement options. More...
     
    struct  UniformOptions
     
     TopologyRefiner (TopologyRefiner const &source)
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Stores topology data for a specified set of refinement options.

    │ │ │ │ │ │ │ │ -

    Definition at line 51 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 51 of file topologyRefiner.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ TopologyRefiner() [1/2]

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

    Returns the options specified on refinement.

    │ │ │ │ │ │ │ │ -

    Definition at line 196 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 196 of file topologyRefiner.h.

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

    ◆ GetFVarLinearInterpolation()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the face-varying interpolation rule set for a given channel.

    │ │ │ │ │ │ │ │ -

    Definition at line 298 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 298 of file topologyRefiner.h.

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

    ◆ getLevel() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -369,15 +369,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 236 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 236 of file topologyRefiner.h.

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

    ◆ getLevel() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -397,15 +397,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 237 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 237 of file topologyRefiner.h.

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

    ◆ GetLevel()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -427,15 +427,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns a handle to access data specific to a particular level.

    │ │ │ │ │ │ │ │ -

    Definition at line 95 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 95 of file topologyRefiner.h.

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

    ◆ GetMaxLevel()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -456,15 +456,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the highest level of refinement.

    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 74 of file topologyRefiner.h.

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

    ◆ GetMaxValence()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -485,15 +485,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the maximum vertex valence in all levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 77 of file topologyRefiner.h.

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

    ◆ GetNumEdgesTotal()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -514,15 +514,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of edges in all levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 86 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 86 of file topologyRefiner.h.

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

    ◆ GetNumFacesTotal()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -543,15 +543,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of edges in all levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 89 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 89 of file topologyRefiner.h.

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

    ◆ GetNumFaceVerticesTotal()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -572,15 +572,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of face vertices in all levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 92 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 92 of file topologyRefiner.h.

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

    ◆ GetNumFVarChannels()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -601,15 +601,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the number of face-varying channels in the tables.

    │ │ │ │ │ │ │ │ -

    Definition at line 293 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 293 of file topologyRefiner.h.

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

    ◆ GetNumFVarValuesTotal()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -650,15 +650,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the number of refinement levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 71 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 71 of file topologyRefiner.h.

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

    ◆ GetNumVerticesTotal()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -679,15 +679,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the total number of vertices in all levels.

    │ │ │ │ │ │ │ │ -

    Definition at line 83 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 83 of file topologyRefiner.h.

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

    ◆ getRefinement() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -707,15 +707,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 239 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 239 of file topologyRefiner.h.

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

    ◆ getRefinement() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -735,15 +735,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 240 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 240 of file topologyRefiner.h.

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

    ◆ GetSchemeOptions()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -764,15 +764,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the subdivision options.

    │ │ │ │ │ │ │ │ -

    Definition at line 65 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 65 of file topologyRefiner.h.

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

    ◆ GetSchemeType()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -793,15 +793,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the subdivision scheme.

    │ │ │ │ │ │ │ │ -

    Definition at line 62 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 62 of file topologyRefiner.h.

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

    ◆ GetUniformOptions()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -822,15 +822,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the options specified on refinement.

    │ │ │ │ │ │ │ │ -

    Definition at line 149 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 149 of file topologyRefiner.h.

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

    ◆ HasHoles()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -851,15 +851,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns true if faces have been tagged as holes.

    │ │ │ │ │ │ │ │ -

    Definition at line 80 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 80 of file topologyRefiner.h.

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

    ◆ IsUniform()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -880,15 +880,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns true if uniform refinement has been applied.

    │ │ │ │ │ │ │ │ -

    Definition at line 68 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 68 of file topologyRefiner.h.

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

    ◆ RefineAdaptive()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -989,15 +989,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 226 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 226 of file topologyRefiner.h.

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

    ◆ PatchTableBuilder

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1013,15 +1013,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 225 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 225 of file topologyRefiner.h.

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

    ◆ PrimvarRefinerReal

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1039,15 +1039,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 229 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 229 of file topologyRefiner.h.

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

    ◆ PtexIndices

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1063,15 +1063,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 227 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 227 of file topologyRefiner.h.

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

    ◆ TopologyRefinerFactory

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1089,15 +1089,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 223 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 223 of file topologyRefiner.h.

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

    ◆ TopologyRefinerFactoryBase

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1113,20 +1113,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ friend │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 224 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 224 of file topologyRefiner.h.

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

    Uniform refinement options. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefiner.h>

    │ │ │ │ +

    #include <topologyRefiner.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

     UniformOptions (int level)
     
    void SetRefinementLevel (int level)
     Set uniform refinement level.
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Uniform refinement options.

    │ │ │ │

    Options for uniform refinement, including the number of levels, vertex ordering and generation of topology information.

    │ │ │ │

    Note the impact of the option to generate fullTopologyInLastLevel. Given subsequent levels of uniform refinement typically reguire 4x the data of the previous level, only the minimum amount of data is generated in the last level by default, i.e. a vertex and face-vertex list. If requiring topology traversal of the last level, e.g. inspecting edges or incident faces of vertices, the option to generate full topology in the last level should be enabled.

    │ │ │ │ │ │ │ │ -

    Definition at line 118 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 118 of file topologyRefiner.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ UniformOptions()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -149,15 +149,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inline
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 120 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 120 of file topologyRefiner.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ SetRefinementLevel()

    │ │ │ │ │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Set uniform refinement level.

    │ │ │ │ │ │ │ │ -

    Definition at line 126 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 126 of file topologyRefiner.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ fullTopologyInLastLevel

    │ │ │ │ │ │ │ │ @@ -198,15 +198,15 @@ │ │ │ │ │ │ │ │ unsigned int fullTopologyInLastLevel │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Skip topological relationships in the last level of refinement that are not needed for interpolation (keep false if using limit).

    │ │ │ │ │ │ │ │ -

    Definition at line 131 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 131 of file topologyRefiner.h.

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

    ◆ orderVerticesFromFacesFirst

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -215,15 +215,15 @@ │ │ │ │ │ │ │ │ unsigned int orderVerticesFromFacesFirst │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Order child vertices from faces first instead of child vertices of vertices

    │ │ │ │ │ │ │ │ -

    Definition at line 129 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 129 of file topologyRefiner.h.

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

    ◆ refinementLevel

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -233,20 +233,20 @@ │ │ │ │ unsigned int refinementLevel │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Number of refinement iterations.

    │ │ │ │ │ │ │ │ -

    Definition at line 128 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 128 of file topologyRefiner.h.

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

    Adaptive refinement options. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefiner.h>

    │ │ │ │ +

    #include <topologyRefiner.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -129,15 +129,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

     AdaptiveOptions (int level)
     
    void SetIsolationLevel (int level)
     Set isolation level.
     
    unsigned int orderVerticesFromFacesFirst:1
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Adaptive refinement options.

    │ │ │ │ │ │ │ │ -

    Definition at line 156 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 156 of file topologyRefiner.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ AdaptiveOptions()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -155,15 +155,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inline
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 158 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 158 of file topologyRefiner.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ SetIsolationLevel()

    │ │ │ │ │ │ │ │ @@ -186,15 +186,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Set isolation level.

    │ │ │ │ │ │ │ │ -

    Definition at line 167 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 167 of file topologyRefiner.h.

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

    ◆ SetSecondaryLevel()

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

    Set secondary isolation level.

    │ │ │ │ │ │ │ │ -

    Definition at line 170 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 170 of file topologyRefiner.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ considerFVarChannels

    │ │ │ │ │ │ │ │ @@ -234,15 +234,15 @@ │ │ │ │ │ │ │ │ unsigned int considerFVarChannels │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Inspect face-varying channels and isolate when irregular features present

    │ │ │ │ │ │ │ │ -

    Definition at line 180 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 180 of file topologyRefiner.h.

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

    ◆ isolationLevel

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -251,15 +251,15 @@ │ │ │ │ │ │ │ │ unsigned int isolationLevel │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Number of iterations applied to isolate extraordinary vertices and creases

    │ │ │ │ │ │ │ │ -

    Definition at line 172 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 172 of file topologyRefiner.h.

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

    ◆ orderVerticesFromFacesFirst

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -268,15 +268,15 @@ │ │ │ │ │ │ │ │ unsigned int orderVerticesFromFacesFirst │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Order child vertices from faces first instead of child vertices of vertices

    │ │ │ │ │ │ │ │ -

    Definition at line 182 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 182 of file topologyRefiner.h.

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

    ◆ secondaryLevel

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ │ │ │ unsigned int secondaryLevel │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Shallower level to stop isolation of smooth irregular features

    │ │ │ │ │ │ │ │ -

    Definition at line 174 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 174 of file topologyRefiner.h.

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

    ◆ useInfSharpPatch

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ │ │ │ │ unsigned int useInfSharpPatch │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Use infinitely sharp patches and stop isolation where applicable

    │ │ │ │ │ │ │ │ -

    Definition at line 178 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 178 of file topologyRefiner.h.

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

    ◆ useSingleCreasePatch

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -319,20 +319,20 @@ │ │ │ │ │ │ │ │ unsigned int useSingleCreasePatch │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Use 'single-crease' patch and stop isolation where applicable

    │ │ │ │ │ │ │ │ -

    Definition at line 176 of file topologyRefiner.h.

    │ │ │ │ +

    Definition at line 176 of file topologyRefiner.h.

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

    Private base class of Factories for constructing TopologyRefiners. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefinerFactory.h>

    │ │ │ │ +

    #include <topologyRefinerFactory.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for TopologyRefinerFactoryBase:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ TopologyRefinerFactory< MESH > │ │ │ │ @@ -129,15 +129,15 @@ │ │ │ │ static bool prepareFaceVaryingChannels (TopologyRefiner &refiner) │ │ │ │   │ │ │ │ │ │ │ │

    Detailed Description

    │ │ │ │

    Private base class of Factories for constructing TopologyRefiners.

    │ │ │ │

    TopologyRefinerFactoryBase is the base class for subclasses that are intended to construct TopologyRefiners directly from meshes in their native representations. The subclasses are parameterized by the mesh type <class MESH> and are expected to inherit the details related to assembly and validation provided here that are independent of the subclass' mesh type.

    │ │ │ │ │ │ │ │ -

    Definition at line 47 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 47 of file topologyRefinerFactory.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ TopologyCallback

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ protected
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 54 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 54 of file topologyRefinerFactory.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ prepareComponentTagsAndSharpness()

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

    Options related to the construction of each TopologyRefiner. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <topologyRefinerFactory.h>

    │ │ │ │ +

    #include <topologyRefinerFactory.h>

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

    │ │ │ │ Public Member Functions

     Options (Sdc::SchemeType sdcType=Sdc::SCHEME_CATMARK, Sdc::Options sdcOptions=Sdc::Options())
     
    │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ @@ -119,15 +119,15 @@ │ │ │ │

    unsigned int validateFullTopology: 1
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    template<class MESH>
    │ │ │ │ struct OpenSubdiv::OPENSUBDIV_VERSION::Far::TopologyRefinerFactory< MESH >::Options

    Options related to the construction of each TopologyRefiner.

    │ │ │ │ │ │ │ │ -

    Definition at line 84 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 84 of file topologyRefinerFactory.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Options()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -157,15 +157,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 86 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 86 of file topologyRefinerFactory.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ schemeOptions

    │ │ │ │ │ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │ │ │ │ │ Sdc::Options schemeOptions │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    The full set of options for the scheme, e.g. boundary interpolation rules...

    │ │ │ │ │ │ │ │ -

    Definition at line 92 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 92 of file topologyRefinerFactory.h.

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

    ◆ schemeType

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -197,15 +197,15 @@ │ │ │ │ Sdc::SchemeType schemeType │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    The subdivision scheme type identifier.

    │ │ │ │ │ │ │ │ -

    Definition at line 91 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 91 of file topologyRefinerFactory.h.

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

    ◆ validateFullTopology

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -216,20 +216,20 @@ │ │ │ │ │ │ │ │ unsigned int validateFullTopology │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Apply more extensive validation of the constructed topology – intended for debugging.

    │ │ │ │ │ │ │ │ -

    Definition at line 94 of file topologyRefinerFactory.h.

    │ │ │ │ +

    Definition at line 94 of file topologyRefinerFactory.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this struct 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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    OpenCL stencil table. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <clEvaluator.h>

    │ │ │ │ +

    #include <clEvaluator.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

     CLStencilTable (Far::StencilTable const *stencilTable, cl_context clContext)
     
     CLStencilTable (Far::LimitStencilTable const *limitStencilTable, cl_context clContext)
     
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    OpenCL stencil table.

    │ │ │ │

    This class is an OpenCL buffer representation of Far::StencilTable.

    │ │ │ │

    CLCompute consumes this table to apply stencils

    │ │ │ │ │ │ │ │ -

    Definition at line 52 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 52 of file clEvaluator.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ CLStencilTable() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -255,15 +255,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inlinestatic
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 61 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 61 of file clEvaluator.h.

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

    ◆ Create() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -295,15 +295,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 55 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 55 of file clEvaluator.h.

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

    ◆ GetDuuWeightsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -322,15 +322,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 80 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 80 of file clEvaluator.h.

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

    ◆ GetDuvWeightsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -349,15 +349,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 81 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 81 of file clEvaluator.h.

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

    ◆ GetDuWeightsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -376,15 +376,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 78 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 78 of file clEvaluator.h.

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

    ◆ GetDvvWeightsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -403,15 +403,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 82 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 82 of file clEvaluator.h.

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

    ◆ GetDvWeightsBuffer()

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

    Definition at line 79 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 79 of file clEvaluator.h.

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

    ◆ GetIndicesBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -457,15 +457,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 76 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 76 of file clEvaluator.h.

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

    ◆ GetNumStencils()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -484,15 +484,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 83 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 83 of file clEvaluator.h.

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

    ◆ GetOffsetsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -511,15 +511,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 75 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 75 of file clEvaluator.h.

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

    ◆ GetSizesBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -538,15 +538,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 74 of file clEvaluator.h.

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

    ◆ GetWeightsBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -565,20 +565,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 77 of file clEvaluator.h.

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

    #include <clEvaluator.h>

    │ │ │ │ +

    #include <clEvaluator.h>

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

    │ │ │ │ Public Types

    typedef bool Instantiatable
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ @@ -245,29 +245,29 @@ │ │ │ │

     Wait the OpenCL kernels finish.
     
    static void Synchronize (cl_command_queue queue)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 100 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 100 of file clEvaluator.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ Instantiatable

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef bool Instantiatable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 102 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 102 of file clEvaluator.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ CLEvaluator()

    │ │ │ │ │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 145 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 145 of file clEvaluator.h.

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

    ◆ Create() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -530,15 +530,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generic creator template.

    │ │ │ │ │ │ │ │ -

    Definition at line 131 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 131 of file clEvaluator.h.

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

    ◆ Create() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -592,15 +592,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 116 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 116 of file clEvaluator.h.

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

    ◆ Create() [4/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -652,15 +652,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generic creator template.

    │ │ │ │ │ │ │ │ -

    Definition at line 106 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 106 of file clEvaluator.h.

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

    ◆ EvalPatches() [1/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1101,15 +1101,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1125 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1125 of file clEvaluator.h.

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

    ◆ EvalPatches() [4/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1276,15 +1276,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1379 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1379 of file clEvaluator.h.

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

    ◆ EvalPatches() [5/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1423,15 +1423,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1003 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1003 of file clEvaluator.h.

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

    ◆ EvalPatches() [6/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1556,15 +1556,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1288 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1288 of file clEvaluator.h.

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

    ◆ EvalPatches() [7/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1678,15 +1678,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 902 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 902 of file clEvaluator.h.

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

    ◆ EvalPatches() [8/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1783,15 +1783,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1217 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1217 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1979,15 +1979,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2437 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2437 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [2/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2161,15 +2161,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2564 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2564 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [3/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2315,15 +2315,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2231 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2231 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [4/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2455,15 +2455,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2329 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2329 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2581,15 +2581,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2061 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2061 of file clEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2693,15 +2693,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 2143 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2143 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2882,15 +2882,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1854 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1854 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [2/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3057,15 +3057,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1978 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1978 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [3/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3204,15 +3204,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1653 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1653 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [4/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3337,15 +3337,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1749 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1749 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3456,15 +3456,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1489 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1489 of file clEvaluator.h.

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

    ◆ EvalPatchesVarying() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3561,15 +3561,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1568 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 1568 of file clEvaluator.h.

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

    ◆ EvalStencils() [1/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4206,15 +4206,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 421 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 421 of file clEvaluator.h.

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

    ◆ EvalStencils() [5/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4367,15 +4367,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 646 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 646 of file clEvaluator.h.

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

    ◆ EvalStencils() [6/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4500,15 +4500,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 309 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 309 of file clEvaluator.h.

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

    ◆ EvalStencils() [7/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4619,15 +4619,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 561 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 561 of file clEvaluator.h.

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

    ◆ EvalStencils() [8/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4727,15 +4727,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 219 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 219 of file clEvaluator.h.

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

    ◆ EvalStencils() [9/9]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4818,15 +4818,15 @@ │ │ │ │ numStartEventsthe number of events in the array pointed to by startEvents. │ │ │ │ startEventspoints to an array of cl_event which will determine when it is safe for the OpenCL device to begin work or NULL if it can begin immediately. │ │ │ │ endEventpointer to a cl_event which will receive a copy of the cl_event which indicates when all work for this call has completed. This cl_event has an incremented reference count and should be released via clReleaseEvent(). NULL if not required. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 500 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 500 of file clEvaluator.h.

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

    ◆ Synchronize() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4876,20 +4876,20 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Wait the OpenCL kernels finish.

    │ │ │ │ │ │ │ │ -

    Definition at line 2613 of file clEvaluator.h.

    │ │ │ │ +

    Definition at line 2613 of file clEvaluator.h.

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

    CL patch table. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <clPatchTable.h>

    │ │ │ │ +

    #include <clPatchTable.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for CLPatchTable:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ @@ -181,15 +181,15 @@ │ │ │ │ │ │ │ │
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    CL patch table.

    │ │ │ │

    This class is a CL buffer representation of Far::PatchTable.

    │ │ │ │

    CLEvaluator consumes this table to evaluate on the patches.

    │ │ │ │ │ │ │ │ -

    Definition at line 52 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 52 of file clPatchTable.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ ~CLPatchTable()

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

    Definition at line 59 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 59 of file clPatchTable.h.

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

    ◆ GetFVarPatchArrayBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -368,15 +368,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the array of Osd::PatchArray buffer.

    │ │ │ │ │ │ │ │ -

    Definition at line 86 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 86 of file clPatchTable.h.

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

    ◆ GetFVarPatchIndexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -398,15 +398,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the face-varying control vertices.

    │ │ │ │ │ │ │ │ -

    Definition at line 89 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 89 of file clPatchTable.h.

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

    ◆ GetFVarPatchParamBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the array of Osd::PatchParam buffer.

    │ │ │ │ │ │ │ │ -

    Definition at line 92 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 92 of file clPatchTable.h.

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

    ◆ GetNumFVarChannels()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -457,15 +457,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the number of face-varying channel buffers.

    │ │ │ │ │ │ │ │ -

    Definition at line 83 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 83 of file clPatchTable.h.

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

    ◆ GetPatchArrayBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -486,15 +486,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the array of Osd::PatchArray buffer.

    │ │ │ │ │ │ │ │ -

    Definition at line 68 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 68 of file clPatchTable.h.

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

    ◆ GetPatchIndexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -515,15 +515,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the patch control vertices.

    │ │ │ │ │ │ │ │ -

    Definition at line 71 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 71 of file clPatchTable.h.

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

    ◆ GetPatchParamBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -544,15 +544,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the array of Osd::PatchParam buffer.

    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 74 of file clPatchTable.h.

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

    ◆ GetVaryingPatchArrayBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -573,15 +573,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the array of Osd::PatchArray buffer.

    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 77 of file clPatchTable.h.

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

    ◆ GetVaryingPatchIndexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -602,15 +602,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the CL memory of the varying control vertices.

    │ │ │ │ │ │ │ │ -

    Definition at line 80 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 80 of file clPatchTable.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ _fvarIndexBuffers

    │ │ │ │ │ │ │ │ @@ -627,15 +627,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 107 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 107 of file clPatchTable.h.

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

    ◆ _fvarParamBuffers

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -651,15 +651,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 108 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 108 of file clPatchTable.h.

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

    ◆ _fvarPatchArrays

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -675,15 +675,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 106 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 106 of file clPatchTable.h.

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

    ◆ _indexBuffer

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -699,15 +699,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 100 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 100 of file clPatchTable.h.

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

    ◆ _patchArrays

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -723,15 +723,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 99 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 99 of file clPatchTable.h.

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

    ◆ _patchParamBuffer

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -747,15 +747,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 101 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 101 of file clPatchTable.h.

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

    ◆ _varyingIndexBuffer

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -771,15 +771,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 104 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 104 of file clPatchTable.h.

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

    ◆ _varyingPatchArrays

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -795,20 +795,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 103 of file clPatchTable.h.

    │ │ │ │ +

    Definition at line 103 of file clPatchTable.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class 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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Concrete vertex buffer class for Cpu subdivision and DirectX drawing. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <cpuD3D11VertexBuffer.h>

    │ │ │ │ +

    #include <cpuD3D11VertexBuffer.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -143,15 +143,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

    virtual ~CpuD3D11VertexBuffer ()
     Destructor.
     
    void UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Concrete vertex buffer class for Cpu subdivision and DirectX drawing.

    │ │ │ │

    CpuD3D11VertexBuffer implements CpuVertexBufferInterface and D3D11VertexBufferInterface.

    │ │ │ │

    An instance of this buffer class can be passed to CpuEvaluator.

    │ │ │ │ │ │ │ │ -

    Definition at line 48 of file cpuD3D11VertexBuffer.h.

    │ │ │ │ +

    Definition at line 48 of file cpuD3D11VertexBuffer.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ ~CpuD3D11VertexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the D3D11 buffer object (for Osd::Mesh interface)

    │ │ │ │ │ │ │ │ -

    Definition at line 75 of file cpuD3D11VertexBuffer.h.

    │ │ │ │ +

    Definition at line 75 of file cpuD3D11VertexBuffer.h.

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

    ◆ Create()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -430,15 +430,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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Concrete vertex buffer class for Cuda subdivision. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <cudaVertexBuffer.h>

    │ │ │ │ +

    #include <cudaVertexBuffer.h>

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

    │ │ │ │ Public Member Functions

     ~CudaVertexBuffer ()
     Destructor.
     
    void UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
    bool allocate ()
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Concrete vertex buffer class for Cuda subdivision.

    │ │ │ │

    CudaVertexBuffer implements CudaVertexBufferInterface. An instance of this buffer class can be passed to CudaEvaluator

    │ │ │ │ │ │ │ │ -

    Definition at line 42 of file cudaVertexBuffer.h.

    │ │ │ │ +

    Definition at line 42 of file cudaVertexBuffer.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ ~CudaVertexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -365,15 +365,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: │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Concrete vertex buffer class for DirectX subdivision and DirectX drawing. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <d3d11VertexBuffer.h>

    │ │ │ │ +

    #include <d3d11VertexBuffer.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

    virtual ~D3D11VertexBuffer ()
     Destructor.
     
    void UpdateData (const float *src, int startVertex, int numVertices, ID3D11DeviceContext *deviceContext)
    bool allocate (ID3D11Device *device)
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    Concrete vertex buffer class for DirectX subdivision and DirectX drawing.

    │ │ │ │

    D3D11VertexBuffer implements D3D11VertexBufferInterface. An instance of this buffer class can be passed to D3D11ComputeEvaluator.

    │ │ │ │ │ │ │ │ -

    Definition at line 46 of file d3d11VertexBuffer.h.

    │ │ │ │ +

    Definition at line 46 of file d3d11VertexBuffer.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ ~D3D11VertexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ inline │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the D3D11 buffer object (for Osd::Mesh interface)

    │ │ │ │ │ │ │ │ -

    Definition at line 70 of file d3d11VertexBuffer.h.

    │ │ │ │ +

    Definition at line 70 of file d3d11VertexBuffer.h.

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

    ◆ Create()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -430,15 +430,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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <glslPatchShaderSource.h>

    │ │ │ │ +

    #include <glslPatchShaderSource.h>

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

    │ │ │ │ Static Public Member Functions

    static std::string GetCommonShaderSource ()
     
    static std::string GetPatchBasisShaderSource ()
     
    static std::string GetTessControlShaderSource (Far::PatchDescriptor::Type type)
     
    static std::string GetTessEvalShaderSource (Far::PatchDescriptor::Type type)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 37 of file glslPatchShaderSource.h.

    │ │ │ │ +

    Definition at line 37 of file glslPatchShaderSource.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetCommonShaderSource()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -242,15 +242,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: │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    GL TextureBuffer stencil table. │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <glXFBEvaluator.h>

    │ │ │ │ +

    #include <glXFBEvaluator.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -141,15 +141,15 @@ │ │ │ │ │ │ │ │

    │ │ │ │ Public Member Functions

     GLStencilTableTBO (Far::StencilTable const *stencilTable)
     
     GLStencilTableTBO (Far::LimitStencilTable const *limitStencilTable)
     
     
    │ │ │ │

    Detailed Description

    │ │ │ │

    GL TextureBuffer stencil table.

    │ │ │ │

    This class is a GL Texture Buffer representation of Far::StencilTable.

    │ │ │ │

    GLSLTransformFeedback consumes this table to apply stencils

    │ │ │ │ │ │ │ │ -

    Definition at line 52 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 52 of file glXFBEvaluator.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ GLStencilTableTBO() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inlinestatic
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 60 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 60 of file glXFBEvaluator.h.

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

    ◆ Create() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 54 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 54 of file glXFBEvaluator.h.

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

    ◆ GetDuuWeightsTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -312,15 +312,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 78 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 78 of file glXFBEvaluator.h.

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

    ◆ GetDuvWeightsTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -339,15 +339,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 79 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 79 of file glXFBEvaluator.h.

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

    ◆ GetDuWeightsTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -366,15 +366,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 76 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 76 of file glXFBEvaluator.h.

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

    ◆ GetDvvWeightsTexture()

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

    Definition at line 80 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 80 of file glXFBEvaluator.h.

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

    ◆ GetDvWeightsTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -420,15 +420,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 77 of file glXFBEvaluator.h.

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

    ◆ GetIndicesTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -447,15 +447,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 74 of file glXFBEvaluator.h.

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

    ◆ GetNumStencils()

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

    Definition at line 81 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 81 of file glXFBEvaluator.h.

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

    ◆ GetOffsetsTexture()

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

    Definition at line 73 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 73 of file glXFBEvaluator.h.

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

    ◆ GetSizesTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -528,15 +528,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 72 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 72 of file glXFBEvaluator.h.

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

    ◆ GetWeightsTexture()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -555,20 +555,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 75 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 75 of file glXFBEvaluator.h.

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

    #include <glXFBEvaluator.h>

    │ │ │ │ +

    #include <glXFBEvaluator.h>

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

    │ │ │ │ Public Types

    typedef bool Instantiatable
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ @@ -247,29 +247,29 @@ │ │ │ │

     
    static void Synchronize (void *kernel)
     Wait the dispatched kernel finishes.
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 98 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 98 of file glXFBEvaluator.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ Instantiatable

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef bool Instantiatable
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 100 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 100 of file glXFBEvaluator.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ GLXFBEvaluator()

    │ │ │ │ │ │ │ │ @@ -421,15 +421,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 126 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 126 of file glXFBEvaluator.h.

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

    ◆ Create() [2/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -495,15 +495,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 170 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 170 of file glXFBEvaluator.h.

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

    ◆ Create() [3/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -573,15 +573,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generic creator template.

    │ │ │ │ │ │ │ │ -

    Definition at line 140 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 140 of file glXFBEvaluator.h.

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

    ◆ Create() [4/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -649,15 +649,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specialization to allow creation without a device context.

    │ │ │ │ │ │ │ │ -

    Definition at line 157 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 157 of file glXFBEvaluator.h.

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

    ◆ Create() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -709,15 +709,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Generic creator template.

    │ │ │ │ │ │ │ │ -

    Definition at line 104 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 104 of file glXFBEvaluator.h.

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

    ◆ Create() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -767,15 +767,15 @@ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Specialization to allow creation without a device context.

    │ │ │ │ │ │ │ │ -

    Definition at line 117 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 117 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [1/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1145,15 +1145,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1144 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1144 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [4/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1313,15 +1313,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 943 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 943 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [5/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1425,15 +1425,15 @@ │ │ │ │ numPatchCoordsnumber of patchCoords. │ │ │ │ patchCoordsarray of locations to be evaluated. │ │ │ │ patchTableGLPatchTable or equivalent │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1070 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1070 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [6/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1551,15 +1551,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 843 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 843 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [7/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1635,15 +1635,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 1016 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1016 of file glXFBEvaluator.h.

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

    ◆ EvalPatches() [8/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1736,15 +1736,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 765 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 765 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1911,15 +1911,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 1976 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1976 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [2/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2072,15 +2072,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 2084 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 2084 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [3/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2205,15 +2205,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 1809 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1809 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [4/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2324,15 +2324,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 1889 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1889 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2429,15 +2429,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 1679 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1679 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2520,15 +2520,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 1742 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1742 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2674,15 +2674,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 1617 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1617 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [2/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2842,15 +2842,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 1512 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1512 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [3/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2954,15 +2954,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 1428 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1428 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [4/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3080,15 +3080,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 1351 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1351 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3164,15 +3164,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 1287 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1287 of file glXFBEvaluator.h.

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

    ◆ EvalPatchesVarying() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3262,15 +3262,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 1227 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 1227 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [1/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3735,15 +3735,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 Texture Buffer Object interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 575 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 575 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [4/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3889,15 +3889,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have Texture Buffer Object 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 GLSLTransformFeedback kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 396 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 396 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [5/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -3987,15 +3987,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 Texture Buffer Object interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 506 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 506 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [6/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4099,15 +4099,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have Texture Buffer Object 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 GLSLTransformFeedback kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 306 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 306 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [7/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4169,15 +4169,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 Texture Buffer Object interfaces. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 457 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 457 of file glXFBEvaluator.h.

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

    ◆ EvalStencils() [8/8]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4256,15 +4256,15 @@ │ │ │ │ stencilTablestencil table to be applied. The table must have Texture Buffer Object 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 GLSLTransformFeedback kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 238 of file glXFBEvaluator.h.

    │ │ │ │ +

    Definition at line 238 of file glXFBEvaluator.h.

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

    ◆ Synchronize()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -4289,15 +4289,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    Wait the dispatched kernel finishes.

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

    #include <hlslPatchShaderSource.h>

    │ │ │ │ +

    #include <hlslPatchShaderSource.h>

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

    │ │ │ │ Static Public Member Functions

    static std::string GetCommonShaderSource ()
     
    static std::string GetPatchBasisShaderSource ()
     
    static std::string GetHullShaderSource (Far::PatchDescriptor::Type type)
     
    static std::string GetDomainShaderSource (Far::PatchDescriptor::Type type)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 37 of file hlslPatchShaderSource.h.

    │ │ │ │ +

    Definition at line 37 of file hlslPatchShaderSource.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetCommonShaderSource()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -242,15 +242,15 @@ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <mtlPatchShaderSource.h>

    │ │ │ │ +

    #include <mtlPatchShaderSource.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Static Public Member Functions

    static std::string GetCommonShaderSource ()
     
    static std::string GetPatchBasisShaderSource ()
     
    static std::string GetHullShaderSource (Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
     
    static std::string GetDomainShaderSource (Far::PatchDescriptor::Type type, Far::PatchDescriptor::Type fvarType)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 37 of file mtlPatchShaderSource.h.

    │ │ │ │ +

    Definition at line 37 of file mtlPatchShaderSource.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ GetCommonShaderSource()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -360,15 +360,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: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    CPUMTLVertexBuffer Class Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <mtlVertexBuffer.h>

    │ │ │ │ +

    #include <mtlVertexBuffer.h>

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

    │ │ │ │ Public Member Functions

    void UpdateData (const float *src, int startVertex, int numVertices, MTLContext *context)
     
    int GetNumElements () const
     
     CPUMTLVertexBuffer (int numElements, int numVertices)
     
    bool allocate (MTLContext *context)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 39 of file mtlVertexBuffer.h.

    │ │ │ │ +

    Definition at line 39 of file mtlVertexBuffer.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ CPUMTLVertexBuffer()

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -251,15 +251,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ inline
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 58 of file mtlVertexBuffer.h.

    │ │ │ │ +

    Definition at line 58 of file mtlVertexBuffer.h.

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

    ◆ Create()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -320,15 +320,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 45 of file mtlVertexBuffer.h.

    │ │ │ │ +

    Definition at line 45 of file mtlVertexBuffer.h.

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

    ◆ GetNumVertices()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -347,15 +347,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 50 of file mtlVertexBuffer.h.

    │ │ │ │ +

    Definition at line 50 of file mtlVertexBuffer.h.

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

    ◆ UpdateData()

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

    #include <ompEvaluator.h>

    │ │ │ │ +

    #include <ompEvaluator.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -171,15 +171,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 OmpEvaluator *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 *deviceContext=NULL)
     
    static void SetNumThreads (int numThreads)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 39 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 39 of file ompEvaluator.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ EvalPatches() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -717,15 +717,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch
    instancenot used in the omp evaluator
    deviceContextnot used in the omp evaluator
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 607 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 607 of file ompEvaluator.h.

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

    ◆ EvalPatches() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -843,15 +843,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 517 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 517 of file ompEvaluator.h.

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

    ◆ EvalPatches() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -944,15 +944,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 454 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 454 of file ompEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1119,15 +1119,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1188 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 1188 of file ompEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1252,15 +1252,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1100 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 1100 of file ompEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1357,15 +1357,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1034 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 1034 of file ompEvaluator.h.

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

    ◆ EvalPatchesVarying() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1525,15 +1525,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 971 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 971 of file ompEvaluator.h.

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

    ◆ EvalPatchesVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1651,15 +1651,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 886 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 886 of file ompEvaluator.h.

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

    ◆ EvalPatchesVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1749,15 +1749,15 @@ │ │ │ │ patchTableCpuPatchTable or equivalent XXX: currently Far::PatchTable can't be used due to interface mismatch │ │ │ │ instancenot used in the omp evaluator │ │ │ │ deviceContextnot used in the omp evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 823 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 823 of file ompEvaluator.h.

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

    ◆ EvalStencils() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2353,15 +2353,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the omp kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the omp kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 303 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 303 of file ompEvaluator.h.

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

    ◆ EvalStencils() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2465,15 +2465,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the omp kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the omp kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 168 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 168 of file ompEvaluator.h.

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

    ◆ EvalStencils() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2552,15 +2552,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the omp kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the omp kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 72 of file ompEvaluator.h.

    │ │ │ │ +

    Definition at line 72 of file ompEvaluator.h.

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

    ◆ SetNumThreads()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2612,15 +2612,15 @@ │ │ │ │
    │ │ │ │

    Other methods

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

    #include <tbbEvaluator.h>

    │ │ │ │ +

    #include <tbbEvaluator.h>

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -173,15 +173,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, TbbEvaluator const *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 SetNumThreads (int numThreads)
     initialize tbb task schedular (optional: client may use tbb::task_scheduler_init)
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    │ │ │ │ -

    Definition at line 39 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 39 of file tbbEvaluator.h.

    │ │ │ │

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ EvalPatches() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -719,15 +719,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 607 of file tbbEvaluator.h.

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

    ◆ EvalPatches() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -845,15 +845,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 517 of file tbbEvaluator.h.

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

    ◆ EvalPatches() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -946,15 +946,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 454 of file tbbEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1121,15 +1121,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1188 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 1188 of file tbbEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1254,15 +1254,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1100 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 1100 of file tbbEvaluator.h.

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

    ◆ EvalPatchesFaceVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1359,15 +1359,15 @@ │ │ │ │ fvarChannelface-varying channel │ │ │ │ instancenot used in the cpu evaluator │ │ │ │ deviceContextnot used in the cpu evaluator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 1034 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 1034 of file tbbEvaluator.h.

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

    ◆ EvalPatchesVarying() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1527,15 +1527,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 971 of file tbbEvaluator.h.

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

    ◆ EvalPatchesVarying() [2/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1653,15 +1653,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 886 of file tbbEvaluator.h.

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

    ◆ EvalPatchesVarying() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1751,15 +1751,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 tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 823 of file tbbEvaluator.h.

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

    ◆ EvalStencils() [1/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2355,15 +2355,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the tbb kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the tbb kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 303 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 303 of file tbbEvaluator.h.

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

    ◆ EvalStencils() [5/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2467,15 +2467,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the tbb kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the tbb kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 168 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 168 of file tbbEvaluator.h.

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

    ◆ EvalStencils() [6/6]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2554,15 +2554,15 @@ │ │ │ │ stencilTableFar::StencilTable or equivalent │ │ │ │ instancenot used in the tbb kernel (declared as a typed pointer to prevent undesirable template resolution) │ │ │ │ deviceContextnot used in the tbb kernel │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    Definition at line 72 of file tbbEvaluator.h.

    │ │ │ │ +

    Definition at line 72 of file tbbEvaluator.h.

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

    ◆ SetNumThreads()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2624,15 +2624,15 @@ │ │ │ │
    │ │ │ │

    Other methods

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

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

    │ │ │ │ │ │ │ │ -

    #include <crease.h>

    │ │ │ │ +

    #include <crease.h>

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

    │ │ │ │ Public Types

    enum  Rule {
    │ │ │ │   RULE_UNKNOWN = 0 │ │ │ │ ,
    │ │ │ │   RULE_SMOOTH = (1 << 0) │ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │
    │ │ │ │

    Detailed Description

    │ │ │ │

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

    │ │ │ │

    Crease is intended to be a light-weight, trivially constructed class that computes crease-related properties – typically sharpness values and associated interpolation weights. An instance of Crease is defined with a set of options that include current and future variations that will impact computations involving sharpness values.

    │ │ │ │

    The Crease methods do not use topological neighborhoods as input. The methods here rely more on the sharpness values and less on the topology, so we choose to work directly with the sharpness values. We also follow the trend of using primitive arrays in the interface to encourage local gathering for re-use.

    │ │ │ │

    Note on the need for and use of sharpness values: In general, mask queries rely on the sharpness values. The common case of a smooth vertex, when known, avoids the need to inspect them, but unless the rules are well understood, users will be expected to provided them – particularly when they expect the mask queries to do all of the work (just determining if a vertex is smooth will require inspection of incident edge sharpness). Mask queries will occasionally require the subdivided sharpness values around the child vertex. So users will be expected to either provide them up front when known, or to be gathered on demand. Any implementation of subdivision with creasing cannot avoid subdividing the sharpness values first, so keeping them available for re-use is a worthwhile consideration.

    │ │ │ │ │ │ │ │ -

    Definition at line 62 of file crease.h.

    │ │ │ │ +

    Definition at line 62 of file crease.h.

    │ │ │ │

    Member Enumeration Documentation

    │ │ │ │ │ │ │ │

    ◆ Rule

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -202,15 +202,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Enumerator
    RULE_UNKNOWN 
    RULE_SMOOTH 
    RULE_DART 
    RULE_CREASE 
    RULE_CORNER 
    │ │ │ │ │ │ │ │ -

    Definition at line 82 of file crease.h.

    │ │ │ │ +

    Definition at line 82 of file crease.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Crease() [1/2]

    │ │ │ │ │ │ │ │ @@ -230,15 +230,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 91 of file crease.h.

    │ │ │ │ +

    Definition at line 91 of file crease.h.

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

    ◆ Crease() [2/2]

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

    Definition at line 92 of file crease.h.

    │ │ │ │ +

    Definition at line 92 of file crease.h.

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

    ◆ ~Crease()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 93 of file crease.h.

    │ │ │ │ +

    Definition at line 93 of file crease.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ ComputeFractionalWeightAtVertex()

    │ │ │ │ │ │ │ │ @@ -362,15 +362,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 207 of file crease.h.

    │ │ │ │ +

    Definition at line 207 of file crease.h.

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

    ◆ DetermineVertexVertexRule() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -469,15 +469,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 228 of file crease.h.

    │ │ │ │ +

    Definition at line 228 of file crease.h.

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

    ◆ IsInfinite()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -497,15 +497,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 72 of file crease.h.

    │ │ │ │ +

    Definition at line 72 of file crease.h.

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

    ◆ IsSemiSharp()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -525,15 +525,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 73 of file crease.h.

    │ │ │ │ +

    Definition at line 73 of file crease.h.

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

    ◆ IsSharp()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -553,15 +553,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 71 of file crease.h.

    │ │ │ │ +

    Definition at line 71 of file crease.h.

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

    ◆ IsSmooth()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -581,15 +581,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlinestatic │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 70 of file crease.h.

    │ │ │ │ +

    Definition at line 70 of file crease.h.

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

    ◆ IsUniform()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -608,15 +608,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 95 of file crease.h.

    │ │ │ │ +

    Definition at line 95 of file crease.h.

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

    ◆ SharpenBoundaryEdge()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -637,15 +637,15 @@ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Optional sharp features: Since options treat certain topological features as infinitely sharp – boundaries or (in future) non-manifold features – sharpness values should be adjusted before use. The following methods will adjust (by return) specific values according to the options applied.

    │ │ │ │ │ │ │ │ -

    Definition at line 189 of file crease.h.

    │ │ │ │ +

    Definition at line 189 of file crease.h.

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

    ◆ SharpenBoundaryVertex()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -665,15 +665,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 200 of file crease.h.

    │ │ │ │ +

    Definition at line 200 of file crease.h.

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

    ◆ SubdivideEdgeSharpnessAtVertex()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -766,15 +766,15 @@ │ │ │ │
    │ │ │ │

    Sharpness subdivision: The computation of a Uniform subdivided sharpness value is as follows:

      │ │ │ │
    • Smooth edges or verts stay Smooth
    • │ │ │ │
    • Sharp edges or verts stay Sharp
    • │ │ │ │
    • semi-sharp edges or verts are decremented by 1.0 but for Chaikin (and potentially future non-uniform schemes that improve upon it) the computation is more involved. In the case of edges in particular, the sharpness of a child edge is determined by the sharpness in the neighborhood of the end vertex corresponding to the child. For this reason, an alternative to subdividing sharpness that computes all child edges around a vertex is given.
    • │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 216 of file crease.h.

    │ │ │ │ +

    Definition at line 216 of file crease.h.

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

    ◆ SubdivideVertexSharpness()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -794,15 +794,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 222 of file crease.h.

    │ │ │ │ +

    Definition at line 222 of file crease.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ SHARPNESS_INFINITE

    │ │ │ │ │ │ │ │ @@ -819,15 +819,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ static │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 68 of file crease.h.

    │ │ │ │ +

    Definition at line 68 of file crease.h.

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

    ◆ SHARPNESS_SMOOTH

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -844,20 +844,20 @@ │ │ │ │ │ │ │ │ static │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Constants and related queries of sharpness values:

    │ │ │ │ │ │ │ │ -

    Definition at line 67 of file crease.h.

    │ │ │ │ +

    Definition at line 67 of file crease.h.

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

    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
    • │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Scheme is a class template which provides all implementation for the subdivision schemes supported by OpenSubdiv through specializations of the methods of each. An instance of Scheme<SCHEME_TYPE> includes a set of Options that will dictate the variable aspects of its behavior.
    │ │ │ │ │ │ │ │ More...

    │ │ │ │ │ │ │ │ -

    #include <scheme.h>

    │ │ │ │ +

    #include <scheme.h>

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

    │ │ │ │ Classes

    class  LocalMask
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │
    template<SchemeType SCHEME_TYPE>
    │ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Sdc::Scheme< SCHEME_TYPE >

    Scheme is a class template which provides all implementation for the subdivision schemes supported by OpenSubdiv through specializations of the methods of each. An instance of Scheme<SCHEME_TYPE> includes a set of Options that will dictate the variable aspects of its behavior.
    │ │ │ │

    │ │ │ │

    The primary purpose of Scheme is to provide the mask weights for vertices generated by subdivision. Methods to determine the masks are given topological neighborhoods from which to compute the appropriate weights for neighboring components. While these neighborhoods may require sharpness values for creasing, the computation of subdivided crease values is independent of the scheme type and is also made available through the Crease class.

    │ │ │ │

    Mask queries are assisted by two utility classes – a Neighborhood class defining the set of relevant data in the topological neighborhood of the vertex being subdivided, and a Mask class into which the associated mask weights will be stored. Depending on where and how these queries are used, more or less information may be available. See the details of the Neighborhood classes as appropriate initialization of them is critical. It is generally best to initialize them with what data is known and accessible for immediate and efficient retrieval, but subclasses can be created to gather it lazily if desired.
    │ │ │ │

    │ │ │ │ │ │ │ │ -

    Definition at line 66 of file scheme.h.

    │ │ │ │ +

    Definition at line 66 of file scheme.h.

    │ │ │ │

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Scheme() [1/2]

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

    Definition at line 70 of file scheme.h.

    │ │ │ │ +

    Definition at line 70 of file scheme.h.

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

    ◆ Scheme() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -330,15 +330,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 72 of file scheme.h.

    │ │ │ │ +

    Definition at line 72 of file scheme.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ assignCornerLimitMask() [1/4]

    │ │ │ │ │ │ │ │ @@ -369,15 +369,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 84 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 84 of file bilinearScheme.h.

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

    ◆ assignCornerLimitMask() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -407,15 +407,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 208 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 208 of file catmarkScheme.h.

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

    ◆ assignCornerLimitMask() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -445,15 +445,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 223 of file loopScheme.h.

    │ │ │ │ +

    Definition at line 223 of file loopScheme.h.

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

    ◆ assignCornerLimitMask() [4/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -529,15 +529,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 118 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 118 of file bilinearScheme.h.

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

    ◆ assignCornerLimitTangentMasks() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -619,15 +619,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 301 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 301 of file catmarkScheme.h.

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

    ◆ assignCornerLimitTangentMasks() [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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -743,15 +743,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 331 of file scheme.h.

    │ │ │ │ +

    Definition at line 331 of file scheme.h.

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

    ◆ assignCreaseLimitMask() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -833,15 +833,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 221 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 221 of file catmarkScheme.h.

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

    ◆ assignCreaseLimitMask() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -877,15 +877,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 236 of file loopScheme.h.

    │ │ │ │ +

    Definition at line 236 of file loopScheme.h.

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

    ◆ assignCreaseLimitMask() [4/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -921,15 +921,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 97 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 97 of file bilinearScheme.h.

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

    ◆ assignCreaseLimitTangentMasks() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1023,15 +1023,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 334 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 334 of file catmarkScheme.h.

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

    ◆ assignCreaseLimitTangentMasks() [3/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1123,15 +1123,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 143 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 143 of file bilinearScheme.h.

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

    ◆ assignCreaseMaskForEdge() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1161,15 +1161,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 70 of file loopScheme.h.

    │ │ │ │ +

    Definition at line 70 of file loopScheme.h.

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

    ◆ assignCreaseMaskForEdge() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1203,15 +1203,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 317 of file scheme.h.

    │ │ │ │ +

    Definition at line 317 of file scheme.h.

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

    ◆ assignCreaseMaskForVertex() [1/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1293,15 +1293,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 148 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 148 of file catmarkScheme.h.

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

    ◆ assignCreaseMaskForVertex() [3/3]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1337,15 +1337,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 155 of file loopScheme.h.

    │ │ │ │ +

    Definition at line 155 of file loopScheme.h.

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

    ◆ assignSmoothLimitMask() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1415,15 +1415,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 106 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 106 of file bilinearScheme.h.

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

    ◆ assignSmoothLimitMask() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1453,15 +1453,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 247 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 247 of file catmarkScheme.h.

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

    ◆ assignSmoothLimitMask() [4/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1581,15 +1581,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 152 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 152 of file bilinearScheme.h.

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

    ◆ assignSmoothLimitTangentMasks() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1625,15 +1625,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 453 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 453 of file catmarkScheme.h.

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

    ◆ assignSmoothLimitTangentMasks() [4/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1707,15 +1707,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 71 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 71 of file catmarkScheme.h.

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

    ◆ assignSmoothMaskForEdge() [2/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1863,15 +1863,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inlineprotected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 173 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 173 of file catmarkScheme.h.

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

    ◆ assignSmoothMaskForVertex() [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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1943,15 +1943,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 62 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 62 of file bilinearScheme.h.

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

    ◆ ComputeEdgeVertexMask() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -1992,15 +1992,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can be specified to accelerate the computation (though the Rule for the parent is trivially determined). In particular, knowing the child rule can avoid the need to subdivide the sharpness of the edge to see if it is a transitional crease that warrants fractional blending.

    │ │ │ │

    Whether to use the "Rules" in this interface is really debatable – the parent Rule is really based on the edge and its sharpness, while the child Rule is technically based on the neighborhood of the child vertex, but it can be deduced from the two child edges' sharpness. So the Crease methods used to compute these rules differ from those for the vertex-vertex mask. Perhaps a simple pair of new methods for Crease should be added specific to the edge-vertex case, i.e. one that takes a single sharpness (for the parent rule) and one that takes a pair (for the child).

    │ │ │ │ │ │ │ │ -

    Definition at line 392 of file scheme.h.

    │ │ │ │ +

    Definition at line 392 of file scheme.h.

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

    ◆ ComputeFaceVertexMask()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2028,15 +2028,15 @@ │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Face-vertex masks - trivial for all current schemes.

    │ │ │ │ │ │ │ │ -

    Definition at line 348 of file scheme.h.

    │ │ │ │ +

    Definition at line 348 of file scheme.h.

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

    ◆ ComputeVertexLimitMask() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2072,15 +2072,15 @@ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Limit masks for vertices – position and tangents These presume that a vertex is suitably isolated for its limit to be well-defined and, unlike the refinement masks, the subdivision Rule for the vertex (presumably at its last level of refinement) is required rather than being optional. In the presence of semi-sharp creasing that has not decayed to zero, the limit is neither sharp nor smooth – in such cases the Rule specified by the caller determines the result.

    │ │ │ │

    For tangent masks, the direction of the first tangent (T1) is oriented towards the leading edge of the vertex, i.e. the first incident edge of the vertex (beginning the set of incident edges in counter-clockwise order). The second tangent (T2) lies within the tangent plane such that its normal can be computed as T1 x T2. So for a boundary vertex, T1 will point along the boundary in the direction of the leading edge while T2 points inward across the limit surface.

    │ │ │ │

    As for magnitude, no assumptions should be made of the magnitudes of the resulting tangent vectors. Common formulae often factor out scale factors that contribute to magnitude. While some attempt has been made to make magnitudes more consistent between regular corners, boundaries and the interior, the same has not been done at irregular vertices – at least not yet. This may be addressed in future, as having consistent magnitudes returned here can aid in the construction of patches from limit positions and tangents.

    │ │ │ │ │ │ │ │ -

    Definition at line 607 of file scheme.h.

    │ │ │ │ +

    Definition at line 607 of file scheme.h.

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

    ◆ ComputeVertexLimitMask() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2124,15 +2124,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 629 of file scheme.h.

    │ │ │ │ +

    Definition at line 629 of file scheme.h.

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

    ◆ ComputeVertexVertexMask() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2166,15 +2166,15 @@ │ │ │ │ │ │ │ │ ) │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 71 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 71 of file bilinearScheme.h.

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

    ◆ ComputeVertexVertexMask() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2214,15 +2214,15 @@ │ │ │ │ const │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Vertex-vertex masks If known, a single Rule or pair of Rules can be specified (indicating a crease transition) to accelerate the computation. Either no Rules, the first, or both should be specified. Specification of only the first Rule implies it to be true for both (wish the compiler would allow such default value specification), i.e. no transition. The case of knowing the parent Rule but deferring determination of the child Rule to this method is not supported.

    │ │ │ │ │ │ │ │ -

    Definition at line 512 of file scheme.h.

    │ │ │ │ +

    Definition at line 512 of file scheme.h.

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

    ◆ GetLocalNeighborhoodSize() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2241,15 +2241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 53 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 53 of file bilinearScheme.h.

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

    ◆ GetLocalNeighborhoodSize() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2268,15 +2268,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 56 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 56 of file catmarkScheme.h.

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

    ◆ GetLocalNeighborhoodSize() [3/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2295,15 +2295,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 57 of file loopScheme.h.

    │ │ │ │ +

    Definition at line 57 of file loopScheme.h.

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

    ◆ GetLocalNeighborhoodSize() [4/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2351,15 +2351,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file scheme.h.

    │ │ │ │ +

    Definition at line 74 of file scheme.h.

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

    ◆ GetRegularFaceSize() [1/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2378,15 +2378,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 47 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 47 of file bilinearScheme.h.

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

    ◆ GetRegularFaceSize() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2405,15 +2405,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 50 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 50 of file catmarkScheme.h.

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

    ◆ GetRegularFaceSize() [3/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2486,15 +2486,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 50 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 50 of file bilinearScheme.h.

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

    ◆ GetRegularVertexValence() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2513,15 +2513,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 53 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 53 of file catmarkScheme.h.

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

    ◆ GetRegularVertexValence() [3/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2594,15 +2594,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 44 of file bilinearScheme.h.

    │ │ │ │ +

    Definition at line 44 of file bilinearScheme.h.

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

    ◆ GetTopologicalSplitType() [2/4]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2621,15 +2621,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 47 of file catmarkScheme.h.

    │ │ │ │ +

    Definition at line 47 of file catmarkScheme.h.

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

    ◆ GetTopologicalSplitType() [3/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]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2705,20 +2705,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 75 of file scheme.h.

    │ │ │ │ +

    Definition at line 75 of file scheme.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file:
      │ │ │ │ -
    • opensubdiv/sdc/scheme.h
    • │ │ │ │ +
    • opensubdiv/sdc/scheme.h
    • │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Scheme< SCHEME_TYPE >::LocalMask< WEIGHT > Class Template Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <scheme.h>

    │ │ │ │ +

    #include <scheme.h>

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

    │ │ │ │ Public Types

    typedef WEIGHT Weight
     
    │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ @@ -144,15 +144,15 @@ │ │ │ │

    void CombineVertexVertexMasks (Weight thisCoeff, Weight dstCoeff, USER_MASK &dst) const
     
    │ │ │ │

    Detailed Description

    │ │ │ │
    template<SchemeType SCHEME_TYPE>
    │ │ │ │ template<typename WEIGHT>
    │ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Sdc::Scheme< SCHEME_TYPE >::LocalMask< WEIGHT >
    │ │ │ │ -

    Definition at line 209 of file scheme.h.

    │ │ │ │ +

    Definition at line 209 of file scheme.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ Weight

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -162,15 +162,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef WEIGHT Weight
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 212 of file scheme.h.

    │ │ │ │ +

    Definition at line 212 of file scheme.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ LocalMask()

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

    Definition at line 215 of file scheme.h.

    │ │ │ │ +

    Definition at line 215 of file scheme.h.

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

    ◆ ~LocalMask()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -242,15 +242,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 216 of file scheme.h.

    │ │ │ │ +

    Definition at line 216 of file scheme.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ AreFaceWeightsForFaceCenters()

    │ │ │ │ │ │ │ │ @@ -274,15 +274,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 239 of file scheme.h.

    │ │ │ │ +

    Definition at line 239 of file scheme.h.

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

    ◆ CombineVertexVertexMasks()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -324,15 +324,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 249 of file scheme.h.

    │ │ │ │ +

    Definition at line 249 of file scheme.h.

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

    ◆ EdgeWeight() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -356,15 +356,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 236 of file scheme.h.

    │ │ │ │ +

    Definition at line 236 of file scheme.h.

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

    ◆ EdgeWeight() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -388,15 +388,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 232 of file scheme.h.

    │ │ │ │ +

    Definition at line 232 of file scheme.h.

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

    ◆ FaceWeight() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -420,15 +420,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 237 of file scheme.h.

    │ │ │ │ +

    Definition at line 237 of file scheme.h.

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

    ◆ FaceWeight() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -452,15 +452,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 233 of file scheme.h.

    │ │ │ │ +

    Definition at line 233 of file scheme.h.

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

    ◆ GetNumEdgeWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -483,15 +483,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 224 of file scheme.h.

    │ │ │ │ +

    Definition at line 224 of file scheme.h.

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

    ◆ GetNumFaceWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -514,15 +514,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 225 of file scheme.h.

    │ │ │ │ +

    Definition at line 225 of file scheme.h.

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

    ◆ GetNumVertexWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -545,15 +545,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 223 of file scheme.h.

    │ │ │ │ +

    Definition at line 223 of file scheme.h.

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

    ◆ SetFaceWeightsForFaceCenters()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -577,15 +577,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 240 of file scheme.h.

    │ │ │ │ +

    Definition at line 240 of file scheme.h.

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

    ◆ SetNumEdgeWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -609,15 +609,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 228 of file scheme.h.

    │ │ │ │ +

    Definition at line 228 of file scheme.h.

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

    ◆ SetNumFaceWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -641,15 +641,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 229 of file scheme.h.

    │ │ │ │ +

    Definition at line 229 of file scheme.h.

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

    ◆ SetNumVertexWeights()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -673,15 +673,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 227 of file scheme.h.

    │ │ │ │ +

    Definition at line 227 of file scheme.h.

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

    ◆ VertexWeight() [1/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -705,15 +705,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 235 of file scheme.h.

    │ │ │ │ +

    Definition at line 235 of file scheme.h.

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

    ◆ VertexWeight() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -737,20 +737,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 231 of file scheme.h.

    │ │ │ │ +

    Definition at line 231 of file scheme.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file:
      │ │ │ │ -
    • opensubdiv/sdc/scheme.h
    • │ │ │ │ +
    • opensubdiv/sdc/scheme.h
    • │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    ConstArray< TYPE > Class Template Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <array.h>

    │ │ │ │ +

    #include <array.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for ConstArray< TYPE >:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ Array< TYPE > │ │ │ │ @@ -153,15 +153,15 @@ │ │ │ │   │ │ │ │ size_type _size │ │ │ │   │ │ │ │ │ │ │ │

    Detailed Description

    │ │ │ │
    template<typename TYPE>
    │ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Vtr::ConstArray< TYPE >
    │ │ │ │ -

    Definition at line 53 of file array.h.

    │ │ │ │ +

    Definition at line 53 of file array.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ const_iterator

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -169,15 +169,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE const* const_iterator
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 60 of file array.h.

    │ │ │ │ +

    Definition at line 60 of file array.h.

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

    ◆ const_reference

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -187,15 +187,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE const& const_reference
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 59 of file array.h.

    │ │ │ │ +

    Definition at line 59 of file array.h.

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

    ◆ iterator

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE* iterator
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 63 of file array.h.

    │ │ │ │ +

    Definition at line 63 of file array.h.

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

    ◆ reference

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -223,15 +223,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE& reference
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 62 of file array.h.

    │ │ │ │ +

    Definition at line 62 of file array.h.

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

    ◆ size_type

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef int size_type
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 57 of file array.h.

    │ │ │ │ +

    Definition at line 57 of file array.h.

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

    ◆ value_type

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -259,15 +259,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE value_type
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 56 of file array.h.

    │ │ │ │ +

    Definition at line 56 of file array.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ ConstArray() [1/2]

    │ │ │ │ │ │ │ │ @@ -289,15 +289,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 67 of file array.h.

    │ │ │ │ +

    Definition at line 67 of file array.h.

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

    ◆ ConstArray() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -329,15 +329,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 69 of file array.h.

    │ │ │ │ +

    Definition at line 69 of file array.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ begin()

    │ │ │ │ │ │ │ │ @@ -359,15 +359,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 77 of file array.h.

    │ │ │ │ +

    Definition at line 77 of file array.h.

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

    ◆ empty()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -388,15 +388,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 74 of file array.h.

    │ │ │ │ +

    Definition at line 74 of file array.h.

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

    ◆ end()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -417,15 +417,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 78 of file array.h.

    │ │ │ │ +

    Definition at line 78 of file array.h.

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

    ◆ FindIndex()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -447,15 +447,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 90 of file array.h.

    │ │ │ │ +

    Definition at line 90 of file array.h.

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

    ◆ FindIndexIn4Tuple()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -477,15 +477,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 80 of file array.h.

    │ │ │ │ +

    Definition at line 80 of file array.h.

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

    ◆ operator[]()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -507,15 +507,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 76 of file array.h.

    │ │ │ │ +

    Definition at line 76 of file array.h.

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

    ◆ size()

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

    Definition at line 72 of file array.h.

    │ │ │ │ +

    Definition at line 72 of file array.h.

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

    Member Data Documentation

    │ │ │ │ │ │ │ │

    ◆ _begin

    │ │ │ │ │ │ │ │ @@ -563,15 +563,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 100 of file array.h.

    │ │ │ │ +

    Definition at line 100 of file array.h.

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

    ◆ _size

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -589,20 +589,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ protected │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 101 of file array.h.

    │ │ │ │ +

    Definition at line 101 of file array.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file:
      │ │ │ │ -
    • opensubdiv/vtr/array.h
    • │ │ │ │ +
    • opensubdiv/vtr/array.h
    • │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    Array< TYPE > Class Template Reference
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    #include <array.h>

    │ │ │ │ +

    #include <array.h>

    │ │ │ │
    │ │ │ │ Inheritance diagram for Array< TYPE >:
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ ConstArray< TYPE > │ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │   │ │ │ │ size_type _size │ │ │ │   │ │ │ │ │ │ │ │

    Detailed Description

    │ │ │ │
    template<typename TYPE>
    │ │ │ │ class OpenSubdiv::OPENSUBDIV_VERSION::Vtr::Array< TYPE >
    │ │ │ │ -

    Definition at line 105 of file array.h.

    │ │ │ │ +

    Definition at line 105 of file array.h.

    │ │ │ │

    Member Typedef Documentation

    │ │ │ │ │ │ │ │

    ◆ const_reference

    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -193,15 +193,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE const& const_reference
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 111 of file array.h.

    │ │ │ │ +

    Definition at line 111 of file array.h.

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

    ◆ iterator

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -211,15 +211,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE* iterator
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 114 of file array.h.

    │ │ │ │ +

    Definition at line 114 of file array.h.

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

    ◆ reference

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -229,15 +229,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE& reference
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 113 of file array.h.

    │ │ │ │ +

    Definition at line 113 of file array.h.

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

    ◆ size_type

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef int size_type
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 109 of file array.h.

    │ │ │ │ +

    Definition at line 109 of file array.h.

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

    ◆ value_type

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    typedef TYPE value_type
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 108 of file array.h.

    │ │ │ │ +

    Definition at line 108 of file array.h.

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

    Constructor & Destructor Documentation

    │ │ │ │ │ │ │ │

    ◆ Array() [1/2]

    │ │ │ │ │ │ │ │ @@ -295,15 +295,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 118 of file array.h.

    │ │ │ │ +

    Definition at line 118 of file array.h.

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

    ◆ Array() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -335,15 +335,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 120 of file array.h.

    │ │ │ │ +

    Definition at line 120 of file array.h.

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

    Member Function Documentation

    │ │ │ │ │ │ │ │

    ◆ begin()

    │ │ │ │ │ │ │ │ @@ -365,15 +365,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 132 of file array.h.

    │ │ │ │ +

    Definition at line 132 of file array.h.

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

    ◆ end()

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -394,15 +394,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 136 of file array.h.

    │ │ │ │ +

    Definition at line 136 of file array.h.

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

    ◆ operator[]() [1/2]

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

    Definition at line 128 of file array.h.

    │ │ │ │ +

    Definition at line 128 of file array.h.

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

    ◆ operator[]() [2/2]

    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -454,20 +454,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ inline │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ -

    Definition at line 124 of file array.h.

    │ │ │ │ +

    Definition at line 124 of file array.h.

    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    The documentation for this class was generated from the following file:
      │ │ │ │ -
    • opensubdiv/vtr/array.h
    • │ │ │ │ +
    • opensubdiv/vtr/array.h
    • │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    types.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ +#include "../far/patchTable.h"
    │ │ │ │ #include <algorithm>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01481_source.html │ │ │ │ @@ -260,24 +260,24 @@ │ │ │ │
    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
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
    Type GetType() const
    Returns the type of the patch.
    │ │ │ │ + │ │ │ │ +
    Handle that can be used as unique patch identifier within PatchTable.
    Definition patchTable.h:60
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
    Coordinates set on a patch table.
    Definition types.h:42
    │ │ │ │
    Far::PatchTable::PatchHandle handle
    patch handle
    Definition types.h:62
    │ │ │ │ │ │ │ │ │ │ │ │
    PatchCoord(Far::PatchTable::PatchHandle handleArg, float sArg, float tArg)
    Constructor.
    Definition types.h:53
    │ │ │ │
    float t
    parametric location on patch
    Definition types.h:63
    │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01484_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/a01487.html │ │ │ │ @@ -95,15 +95,15 @@ │ │ │ │ Namespaces | │ │ │ │ Typedefs | │ │ │ │ Functions │ │ │ │
    types.h File Reference
    │ │ │ │ │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../vtr/array.h"
    │ │ │ │ +#include "../vtr/array.h"
    │ │ │ │ #include <vector>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

    │ │ │ │

    │ │ │ │ Classes

    struct  PatchCoord
    │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a01487_source.html │ │ │ │ @@ -187,25 +187,25 @@ │ │ │ │
    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
    │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

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

    │ │ │ │ Files

     bufferDescriptor.h
     bufferDescriptor.h
     
     clEvaluator.h
     clEvaluator.h
     
     clPatchTable.h
     clPatchTable.h
     
     clVertexBuffer.h
     clVertexBuffer.h
     
     cpuD3D11VertexBuffer.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
     cudaVertexBuffer.h
     
     d3d11ComputeEvaluator.h
     d3d11ComputeEvaluator.h
     
     d3d11LegacyGregoryPatchTable.h
     d3d11LegacyGregoryPatchTable.h
     
     d3d11Mesh.h
     d3d11Mesh.h
     
     d3d11PatchTable.h
     d3d11PatchTable.h
     
     d3d11VertexBuffer.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
     glXFBEvaluator.h
     
     hlslPatchShaderSource.h
     hlslPatchShaderSource.h
     
     mesh.h
     mesh.h
     
     mtlCommon.h
     mtlCommon.h
     
     mtlComputeEvaluator.h
     mtlComputeEvaluator.h
     
     mtlLegacyGregoryPatchTable.h
     mtlLegacyGregoryPatchTable.h
     
     mtlMesh.h
     mtlMesh.h
     
     mtlPatchShaderSource.h
     mtlPatchShaderSource.h
     
     mtlPatchTable.h
     mtlPatchTable.h
     
     mtlVertexBuffer.h
     mtlVertexBuffer.h
     
     ompEvaluator.h
     ompEvaluator.h
     
     ompKernel.h
     ompKernel.h
     
     opencl.h
     opencl.h
     
     opengl.h
     opengl.h
     
     tbbEvaluator.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", "a00785.html", "a00785"], │ │ │ │ │ - ["clEvaluator.h", "a00803.html", "a00803"], │ │ │ │ │ - ["clPatchTable.h", "a00860.html", "a00860"], │ │ │ │ │ - ["clVertexBuffer.h", "a00857.html", "a00857"], │ │ │ │ │ - ["cpuD3D11VertexBuffer.h", "a00836.html", "a00836"], │ │ │ │ │ - ["cpuEvaluator.h", "a00821.html", "a00821"], │ │ │ │ │ - ["cpuGLVertexBuffer.h", "a00782.html", "a00782"], │ │ │ │ │ - ["cpuPatchTable.h", "a00797.html", "a00797"], │ │ │ │ │ - ["cpuVertexBuffer.h", "a00758.html", "a00758"], │ │ │ │ │ - ["cudaEvaluator.h", "a00767.html", "a00767"], │ │ │ │ │ - ["cudaPatchTable.h", "a00854.html", "a00854"], │ │ │ │ │ - ["cudaVertexBuffer.h", "a00827.html", "a00827"], │ │ │ │ │ - ["d3d11ComputeEvaluator.h", "a00851.html", "a00851"], │ │ │ │ │ - ["d3d11LegacyGregoryPatchTable.h", "a00764.html", "a00764"], │ │ │ │ │ - ["d3d11Mesh.h", "a00794.html", "a00794"], │ │ │ │ │ - ["d3d11PatchTable.h", "a00830.html", "a00830"], │ │ │ │ │ - ["d3d11VertexBuffer.h", "a00746.html", "a00746"], │ │ │ │ │ - ["glComputeEvaluator.h", "a00755.html", "a00755"], │ │ │ │ │ - ["glLegacyGregoryPatchTable.h", "a00842.html", "a00842"], │ │ │ │ │ - ["glMesh.h", "a00815.html", "a00815"], │ │ │ │ │ - ["glPatchTable.h", "a00812.html", "a00812"], │ │ │ │ │ - ["glslPatchShaderSource.h", "a00752.html", "a00752"], │ │ │ │ │ - ["glVertexBuffer.h", "a00818.html", "a00818"], │ │ │ │ │ - ["glXFBEvaluator.h", "a00776.html", "a00776"], │ │ │ │ │ - ["hlslPatchShaderSource.h", "a00848.html", "a00848"], │ │ │ │ │ - ["mesh.h", "a00761.html", "a00761"], │ │ │ │ │ - ["mtlCommon.h", "a00824.html", "a00824"], │ │ │ │ │ - ["mtlComputeEvaluator.h", "a00749.html", "a00749"], │ │ │ │ │ - ["mtlLegacyGregoryPatchTable.h", "a00845.html", "a00845"], │ │ │ │ │ - ["mtlMesh.h", "a00788.html", "a00788"], │ │ │ │ │ - ["mtlPatchShaderSource.h", "a00800.html", "a00800"], │ │ │ │ │ - ["mtlPatchTable.h", "a00770.html", "a00770"], │ │ │ │ │ - ["mtlVertexBuffer.h", "a00806.html", "a00806"], │ │ │ │ │ - ["ompEvaluator.h", "a00809.html", "a00809"], │ │ │ │ │ - ["ompKernel.h", "a00839.html", "a00839"], │ │ │ │ │ - ["opencl.h", "a00833.html", null], │ │ │ │ │ - ["opengl.h", "a00791.html", null], │ │ │ │ │ - ["tbbEvaluator.h", "a00779.html", "a00779"], │ │ │ │ │ - ["tbbKernel.h", "a00773.html", "a00773"], │ │ │ │ │ + ["bufferDescriptor.h", "a00704.html", "a00704"], │ │ │ │ │ + ["clEvaluator.h", "a00734.html", "a00734"], │ │ │ │ │ + ["clPatchTable.h", "a00788.html", "a00788"], │ │ │ │ │ + ["clVertexBuffer.h", "a00728.html", "a00728"], │ │ │ │ │ + ["cpuD3D11VertexBuffer.h", "a00764.html", "a00764"], │ │ │ │ │ + ["cpuEvaluator.h", "a00701.html", "a00701"], │ │ │ │ │ + ["cpuGLVertexBuffer.h", "a00740.html", "a00740"], │ │ │ │ │ + ["cpuPatchTable.h", "a00698.html", "a00698"], │ │ │ │ │ + ["cpuVertexBuffer.h", "a00689.html", "a00689"], │ │ │ │ │ + ["cudaEvaluator.h", "a00779.html", "a00779"], │ │ │ │ │ + ["cudaPatchTable.h", "a00743.html", "a00743"], │ │ │ │ │ + ["cudaVertexBuffer.h", "a00731.html", "a00731"], │ │ │ │ │ + ["d3d11ComputeEvaluator.h", "a00770.html", "a00770"], │ │ │ │ │ + ["d3d11LegacyGregoryPatchTable.h", "a00710.html", "a00710"], │ │ │ │ │ + ["d3d11Mesh.h", "a00752.html", "a00752"], │ │ │ │ │ + ["d3d11PatchTable.h", "a00773.html", "a00773"], │ │ │ │ │ + ["d3d11VertexBuffer.h", "a00692.html", "a00692"], │ │ │ │ │ + ["glComputeEvaluator.h", "a00776.html", "a00776"], │ │ │ │ │ + ["glLegacyGregoryPatchTable.h", "a00761.html", "a00761"], │ │ │ │ │ + ["glMesh.h", "a00719.html", "a00719"], │ │ │ │ │ + ["glPatchTable.h", "a00695.html", "a00695"], │ │ │ │ │ + ["glslPatchShaderSource.h", "a00713.html", "a00713"], │ │ │ │ │ + ["glVertexBuffer.h", "a00680.html", "a00680"], │ │ │ │ │ + ["glXFBEvaluator.h", "a00722.html", "a00722"], │ │ │ │ │ + ["hlslPatchShaderSource.h", "a00749.html", "a00749"], │ │ │ │ │ + ["mesh.h", "a00767.html", "a00767"], │ │ │ │ │ + ["mtlCommon.h", "a00782.html", "a00782"], │ │ │ │ │ + ["mtlComputeEvaluator.h", "a00707.html", "a00707"], │ │ │ │ │ + ["mtlLegacyGregoryPatchTable.h", "a00746.html", "a00746"], │ │ │ │ │ + ["mtlMesh.h", "a00683.html", "a00683"], │ │ │ │ │ + ["mtlPatchShaderSource.h", "a00677.html", "a00677"], │ │ │ │ │ + ["mtlPatchTable.h", "a00716.html", "a00716"], │ │ │ │ │ + ["mtlVertexBuffer.h", "a00686.html", "a00686"], │ │ │ │ │ + ["ompEvaluator.h", "a00725.html", "a00725"], │ │ │ │ │ + ["ompKernel.h", "a00755.html", "a00755"], │ │ │ │ │ + ["opencl.h", "a00674.html", null], │ │ │ │ │ + ["opengl.h", "a00737.html", null], │ │ │ │ │ + ["tbbEvaluator.h", "a00758.html", "a00758"], │ │ │ │ │ + ["tbbKernel.h", "a00785.html", "a00785"], │ │ │ │ │ ["types.h", "a01481.html", "a01481"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_7f420b72a822828cfa8b0561c695a5cc.html │ │ │ │ @@ -93,41 +93,41 @@ │ │ │ │
    │ │ │ │
    far Directory Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Files

     error.h
     error.h
     
     patchDescriptor.h
     patchDescriptor.h
     
     patchMap.h
     patchMap.h
     
     patchParam.h
     patchParam.h
     
     patchTable.h
     patchTable.h
     
     patchTableFactory.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
     topologyRefiner.h
     
     topologyRefinerFactory.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", "a00896.html", "a00896"], │ │ │ │ │ - ["patchDescriptor.h", "a00869.html", "a00869"], │ │ │ │ │ - ["patchMap.h", "a00887.html", "a00887"], │ │ │ │ │ - ["patchParam.h", "a00881.html", "a00881"], │ │ │ │ │ - ["patchTable.h", "a00893.html", "a00893"], │ │ │ │ │ - ["patchTableFactory.h", "a00890.html", "a00890"], │ │ │ │ │ - ["primvarRefiner.h", "a00878.html", "a00878"], │ │ │ │ │ - ["ptexIndices.h", "a00902.html", "a00902"], │ │ │ │ │ - ["stencilTable.h", "a00863.html", "a00863"], │ │ │ │ │ - ["stencilTableFactory.h", "a00872.html", "a00872"], │ │ │ │ │ - ["topologyDescriptor.h", "a00866.html", "a00866"], │ │ │ │ │ - ["topologyLevel.h", "a00875.html", "a00875"], │ │ │ │ │ - ["topologyRefiner.h", "a00899.html", "a00899"], │ │ │ │ │ - ["topologyRefinerFactory.h", "a00884.html", "a00884"], │ │ │ │ │ + ["error.h", "a00899.html", "a00899"], │ │ │ │ │ + ["patchDescriptor.h", "a00887.html", "a00887"], │ │ │ │ │ + ["patchMap.h", "a00878.html", "a00878"], │ │ │ │ │ + ["patchParam.h", "a00896.html", "a00896"], │ │ │ │ │ + ["patchTable.h", "a00872.html", "a00872"], │ │ │ │ │ + ["patchTableFactory.h", "a00902.html", "a00902"], │ │ │ │ │ + ["primvarRefiner.h", "a00866.html", "a00866"], │ │ │ │ │ + ["ptexIndices.h", "a00869.html", "a00869"], │ │ │ │ │ + ["stencilTable.h", "a00881.html", "a00881"], │ │ │ │ │ + ["stencilTableFactory.h", "a00890.html", "a00890"], │ │ │ │ │ + ["topologyDescriptor.h", "a00863.html", "a00863"], │ │ │ │ │ + ["topologyLevel.h", "a00884.html", "a00884"], │ │ │ │ │ + ["topologyRefiner.h", "a00875.html", "a00875"], │ │ │ │ │ + ["topologyRefinerFactory.h", "a00893.html", "a00893"], │ │ │ │ │ ["types.h", "a01478.html", "a01478"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_bd5473d7d5841d48919aaa9ad0cb1f9b.html │ │ │ │ @@ -93,29 +93,29 @@ │ │ │ │
    │ │ │ │
    vtr Directory Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Files

     array.h
     array.h
     
     componentInterfaces.h
     componentInterfaces.h
     
     fvarLevel.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", "a00725.html", "a00725"], │ │ │ │ │ - ["componentInterfaces.h", "a00713.html", null], │ │ │ │ │ - ["fvarLevel.h", "a00719.html", null], │ │ │ │ │ - ["fvarRefinement.h", "a00707.html", null], │ │ │ │ │ - ["level.h", "a00704.html", null], │ │ │ │ │ - ["refinement.h", "a00701.html", null], │ │ │ │ │ - ["sparseSelector.h", "a00710.html", null], │ │ │ │ │ - ["stackBuffer.h", "a00716.html", null], │ │ │ │ │ + ["array.h", "a00794.html", "a00794"], │ │ │ │ │ + ["componentInterfaces.h", "a00797.html", null], │ │ │ │ │ + ["fvarLevel.h", "a00815.html", null], │ │ │ │ │ + ["fvarRefinement.h", "a00806.html", null], │ │ │ │ │ + ["level.h", "a00803.html", null], │ │ │ │ │ + ["refinement.h", "a00800.html", null], │ │ │ │ │ + ["sparseSelector.h", "a00812.html", null], │ │ │ │ │ + ["stackBuffer.h", "a00809.html", null], │ │ │ │ │ ["types.h", "a01487.html", "a01487"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_f61368944c63c2c1f8c69bc232e59c39.html │ │ │ │ @@ -93,25 +93,25 @@ │ │ │ │
    │ │ │ │
    sdc Directory Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │ Files

     bilinearScheme.h
     bilinearScheme.h
     
     catmarkScheme.h
     catmarkScheme.h
     
     crease.h
     crease.h
     
     loopScheme.h
     loopScheme.h
     
     options.h
     options.h
     
     scheme.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", "a00731.html", null], │ │ │ │ │ - ["catmarkScheme.h", "a00740.html", null], │ │ │ │ │ - ["crease.h", "a00743.html", "a00743"], │ │ │ │ │ - ["loopScheme.h", "a00737.html", null], │ │ │ │ │ - ["options.h", "a00728.html", "a00728"], │ │ │ │ │ - ["scheme.h", "a00734.html", "a00734"], │ │ │ │ │ + ["bilinearScheme.h", "a00827.html", null], │ │ │ │ │ + ["catmarkScheme.h", "a00833.html", null], │ │ │ │ │ + ["crease.h", "a00830.html", "a00830"], │ │ │ │ │ + ["loopScheme.h", "a00824.html", null], │ │ │ │ │ + ["options.h", "a00818.html", "a00818"], │ │ │ │ │ + ["scheme.h", "a00821.html", "a00821"], │ │ │ │ │ ["types.h", "a01484.html", "a01484"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/dir_fa5edef2a780a73fbfb6a11f1af88ceb.html │ │ │ │ @@ -93,31 +93,31 @@ │ │ │ │
    │ │ │ │
    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
     tessellation.h
     
     vertexDescriptor.h
     vertexDescriptor.h
     
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    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
     tessellation.h
     vertexDescriptor.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
     topologyRefiner.h
     topologyRefinerFactory.h
     error.h
     patchDescriptor.h
     patchMap.h
     patchParam.h
     patchTable.h
     patchTableFactory.h
     primvarRefiner.h
     ptexIndices.h
     stencilTable.h
     stencilTableFactory.h
     topologyDescriptor.h
     topologyLevel.h
     topologyRefiner.h
     topologyRefinerFactory.h
     types.h
      osd
     bufferDescriptor.h
     clEvaluator.h
     clPatchTable.h
     clVertexBuffer.h
     cpuD3D11VertexBuffer.h
     cpuEvaluator.h
     cpuGLVertexBuffer.h
     cpuPatchTable.h
     cpuVertexBuffer.h
     cudaEvaluator.h
     cudaPatchTable.h
     cudaVertexBuffer.h
     d3d11ComputeEvaluator.h
     d3d11LegacyGregoryPatchTable.h
     d3d11Mesh.h
     d3d11PatchTable.h
     d3d11VertexBuffer.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
     mtlMesh.h
     mtlPatchShaderSource.h
     mtlPatchTable.h
     mtlVertexBuffer.h
     ompEvaluator.h
     ompKernel.h
     opencl.h
     opengl.h
     tbbEvaluator.h
     tbbKernel.h
     bufferDescriptor.h
     clEvaluator.h
     clPatchTable.h
     clVertexBuffer.h
     cpuD3D11VertexBuffer.h
     cpuEvaluator.h
     cpuGLVertexBuffer.h
     cpuPatchTable.h
     cpuVertexBuffer.h
     cudaEvaluator.h
     cudaPatchTable.h
     cudaVertexBuffer.h
     d3d11ComputeEvaluator.h
     d3d11LegacyGregoryPatchTable.h
     d3d11Mesh.h
     d3d11PatchTable.h
     d3d11VertexBuffer.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
     mtlMesh.h
     mtlPatchShaderSource.h
     mtlPatchTable.h
     mtlVertexBuffer.h
     ompEvaluator.h
     ompKernel.h
     opencl.h
     opengl.h
     tbbEvaluator.h
     tbbKernel.h
     types.h
      sdc
     bilinearScheme.h
     catmarkScheme.h
     crease.h
     loopScheme.h
     options.h
     scheme.h
     bilinearScheme.h
     catmarkScheme.h
     crease.h
     loopScheme.h
     options.h
     scheme.h
     types.h
      vtr
     array.h
     componentInterfaces.h
     fvarLevel.h
     fvarRefinement.h
     level.h
     refinement.h
     sparseSelector.h
     stackBuffer.h
     array.h
     componentInterfaces.h
     fvarLevel.h
     fvarRefinement.h
     level.h
     refinement.h
     sparseSelector.h
     stackBuffer.h
     types.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    17//.
    18 │ │ │ │ +00001a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00001aa0: 2020 556e 6c65 7373 2072 6571 7569 7265 Unless require │ │ │ │ +00001ab0: 6420 6279 2061 7070 6c69 6361 626c 6520 d by applicable │ │ │ │ +00001ac0: 6c61 7720 6f72 2061 6772 6565 6420 746f law or agreed to │ │ │ │ +00001ad0: 2069 6e20 7772 6974 696e 672c 2073 6f66 in writing, sof │ │ │ │ +00001ae0: 7477 6172 653c 2f73 7061 6e3e 3c2f 6469 tware.
    19 │ │ │ │ +00001b40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00001b60: 2020 6469 7374 7269 6275 7465 6420 756e distributed un │ │ │ │ +00001b70: 6465 7220 7468 6520 4170 6163 6865 204c der the Apache L │ │ │ │ +00001b80: 6963 656e 7365 2077 6974 6820 7468 6520 icense with the │ │ │ │ +00001b90: 6162 6f76 6520 6d6f 6469 6669 6361 7469 above modificati │ │ │ │ +00001ba0: 6f6e 2069 733c 2f73 7061 6e3e 3c2f 6469 on is.
    20 │ │ │ │ +00001c00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00001c20: 2020 6469 7374 7269 6275 7465 6420 6f6e distributed on │ │ │ │ +00001c30: 2061 6e20 2671 756f 743b 4153 2049 5326 an "AS IS& │ │ │ │ +00001c40: 7175 6f74 3b20 4241 5349 532c 2057 4954 quot; BASIS, WIT │ │ │ │ +00001c50: 484f 5554 2057 4152 5241 4e54 4945 5320 HOUT WARRANTIES │ │ │ │ +00001c60: 4f52 2043 4f4e 4449 5449 4f4e 5320 4f46 OR CONDITIONS OF │ │ │ │ +00001c70: 2041 4e59 3c2f 7370 616e 3e3c 2f64 6976 ANY
    .
    21< │ │ │ │ +00001cd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +00001cf0: 204b 494e 442c 2065 6974 6865 7220 6578 KIND, either ex │ │ │ │ +00001d00: 7072 6573 7320 6f72 2069 6d70 6c69 6564 press or implied │ │ │ │ +00001d10: 2e20 5365 6520 7468 6520 4170 6163 6865 . See the Apache │ │ │ │ +00001d20: 204c 6963 656e 7365 2066 6f72 2074 6865 License for the │ │ │ │ +00001d30: 2073 7065 6369 6669 633c 2f73 7061 6e3e specific │ │ │ │ +00001d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00001d90: 2020 3232 3c2f 7370 616e 3e3c 7370 616e 22// language g │ │ │ │ +00001dc0: 6f76 6572 6e69 6e67 2070 6572 6d69 7373 overning permiss │ │ │ │ +00001dd0: 696f 6e73 2061 6e64 206c 696d 6974 6174 ions and limitat │ │ │ │ +00001de0: 696f 6e73 2075 6e64 6572 2074 6865 2041 ions under the A │ │ │ │ +00001df0: 7061 6368 6520 4c69 6365 6e73 652e 3c2f pache License.
    .
    < │ │ │ │ +00001e40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00001e50: 6e6f 223e 2020 2032 333c 2f73 7061 6e3e no"> 23 │ │ │ │ +00001e60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +00001e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00001ed0: 2032 343c 2f73 7061 6e3e 3c73 7061 6e20 24#ifndef OPE │ │ │ │ +00001f00: 4e53 5542 4449 5633 5f53 4443 5f53 4348 NSUBDIV3_SDC_SCH │ │ │ │ +00001f10: 454d 455f 483c 2f73 7061 6e3e 3c2f 6469 EME_H.
    25 │ │ │ │ +00001f70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 #define OPENSU │ │ │ │ +00001fa0: 4244 4956 335f 5344 435f 5343 4845 4d45 BDIV3_SDC_SCHEME │ │ │ │ +00001fb0: 5f48 3c2f 7370 616e 3e3c 2f64 6976 3e0a _H
    . │ │ │ │ +00001fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00002050: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00002060: 6e6f 223e 2020 2032 373c 2f73 7061 6e3e no"> 27 │ │ │ │ +00002070: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ +00002090: 7564 6520 2671 756f 743b 2e2e 2f76 6572 ude "../ver │ │ │ │ +000020a0: 7369 6f6e 2e68 2671 756f 743b 3c2f 7370 sion.h"
    .
    28 < │ │ │ │ +00002110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002160: 2032 393c 2f73 7061 6e3e 3c73 7061 6e20 29#include &q │ │ │ │ +00002190: 756f 743b 2e2e 2f73 6463 2f74 7970 6573 uot;../sdc/types │ │ │ │ +000021a0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ +000021b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002200: 2033 303c 2f73 7061 6e3e 3c73 7061 6e20 30#include &q │ │ │ │ +00002230: 756f 743b 2e2e 2f73 6463 2f6f 7074 696f uot;../sdc/optio │ │ │ │ +00002240: 6e73 2e68 2671 756f 743b 3c2f 7370 616e ns.h"
    .
    │ │ │ │ +000022a0: 2020 2033 313c 2f73 7061 6e3e 3c73 7061 31#include │ │ │ │ +000022d0: 2671 756f 743b 2e2e 2f73 6463 2f63 7265 "../sdc/cre │ │ │ │ +000022e0: 6173 652e 6826 7175 6f74 3b3c 2f73 7061 ase.h"
    .
    32 .
    │ │ │ │ +000023a0: 3333 3c2f 7370 616e 3e3c 7370 616e 2063 33#include < │ │ │ │ +000023d0: 3b63 6173 7365 7274 2667 743b 3c2f 7370 ;cassert>
    .
    34#includ │ │ │ │ +00002460: 6520 266c 743b 6373 7464 6c69 6226 6774 e <cstdlib> │ │ │ │ +00002470: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ │ +00002480: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00002490: 3e3c 6120 6964 3d22 6c30 3030 3335 2220 > 35#i │ │ │ │ +000024f0: 6e63 6c75 6465 2026 6c74 3b76 6563 746f nclude <vecto │ │ │ │ +00002500: 7226 6774 3b3c 2f73 7061 6e3e 3c2f 6469 r>.
    36 │ │ │ │ +00002560: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00002570: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00002580: 3e3c 6120 6964 3d22 6c30 3030 3337 2220 > 37namespa │ │ │ │ +000025e0: 6365 203c 2f73 7061 6e3e 3c61 2063 6c61 ce OpenSu │ │ │ │ +00002620: 6264 6976 3c2f 613e 207b 3c2f 6469 763e bdiv {
    │ │ │ │ +00002630: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00002660: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 38names │ │ │ │ +000026a0: 7061 6365 203c 2f73 7061 6e3e 4f50 454e pace OPEN │ │ │ │ +000026b0: 5355 4244 4956 5f56 4552 5349 4f4e 207b SUBDIV_VERSION { │ │ │ │ +000026c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00002710: 2020 3339 3c2f 7370 616e 3e20 3c2f 6469 39 .
    40 │ │ │ │ +00002770: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 nam │ │ │ │ +00002790: 6573 7061 6365 203c 2f73 7061 6e3e 5364 espace Sd │ │ │ │ +000027a0: 6320 7b3c 2f64 6976 3e0a 3c64 6976 2063 c {
    .
    41 < │ │ │ │ +00002800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002850: 2036 353c 2f73 7061 6e3e 3c73 7061 6e20 65 │ │ │ │ +00002870: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ +00002880: 266c 743b 5363 6865 6d65 5479 7065 2053 <SchemeType S │ │ │ │ +00002890: 4348 454d 455f 5459 5045 2667 743b 3c2f CHEME_TYPE>.
    .
    < │ │ │ │ +00002920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00002930: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 66 │ │ │ │ +00002960: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 cla │ │ │ │ +00002980: 7373 203c 2f73 7061 6e3e 3c61 2063 6c61 ss Scheme │ │ │ │ +000029c0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    67 .
    │ │ │ │ +00002a70: 3638 3c2f 7370 616e 3e3c 7370 616e 2063 68p │ │ │ │ +00002a90: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    6 │ │ │ │ +00002af0: 393c 2f73 7061 6e3e 203c 2f64 6976 3e0a 9
    . │ │ │ │ +00002b00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00002b30: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ │ +00002b90: 3730 3c2f 613e 3c2f 7370 616e 3e20 2020 70 │ │ │ │ +00002ba0: 203c 6120 636c 6173 733d 2263 6f64 6520 Scheme() : │ │ │ │ +00002c00: 205f 6f70 7469 6f6e 7328 2920 7b20 7d3c _options() { }< │ │ │ │ +00002c10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002c60: 2037 313c 2f73 7061 6e3e 203c 2f64 6976 71
    .
    │ │ │ │ +00002d00: 2020 3732 3c2f 613e 3c2f 7370 616e 3e20 72 │ │ │ │ +00002d10: 2020 203c 6120 636c 6173 733d 2263 6f64 Scheme(< │ │ │ │ +00002d70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00002d80: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ +00002d90: 3133 3239 2e68 746d 6c22 3e4f 7074 696f 1329.html">Optio │ │ │ │ +00002da0: 6e73 3c2f 613e 203c 7370 616e 2063 6c61 ns con │ │ │ │ +00002dc0: 7374 3c2f 7370 616e 3e26 616d 703b 206f st& o │ │ │ │ +00002dd0: 7074 696f 6e73 2920 3a20 5f6f 7074 696f ptions) : _optio │ │ │ │ +00002de0: 6e73 286f 7074 696f 6e73 2920 7b20 7d3c ns(options) { }< │ │ │ │ +00002df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00002e40: 2037 333c 2f73 7061 6e3e 203c 2f64 6976 73
    .
    │ │ │ │ +00002ee0: 2020 3734 3c2f 613e 3c2f 7370 616e 3e20 74 │ │ │ │ +00002ef0: 2020 203c 6120 636c 6173 733d 2263 6f64 O │ │ │ │ +00002f20: 7074 696f 6e73 3c2f 613e 203c 6120 636c ptions GetO │ │ │ │ +00002f80: 7074 696f 6e73 3c2f 613e 2829 3c73 7061 ptions() const │ │ │ │ +00002fb0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ │ +00002fd0: 726e 3c2f 7370 616e 3e20 5f6f 7074 696f rn _optio │ │ │ │ +00002fe0: 6e73 3b20 7d3c 2f64 6976 3e0a 3c64 6976 ns; }
    .
    < │ │ │ │ +00003020: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00003030: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 75 void SetOption │ │ │ │ +00003110: 733c 2f61 3e28 3c73 7061 6e20 636c 6173 s(cons │ │ │ │ +00003130: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Options │ │ │ │ +00003170: 2661 6d70 3b20 6e65 774f 7074 696f 6e73 & newOptions │ │ │ │ +00003180: 2920 7b20 5f6f 7074 696f 6e73 203d 206e ) { _options = n │ │ │ │ +00003190: 6577 4f70 7469 6f6e 733b 207d 3c2f 6469 ewOptions; }.
    83 │ │ │ │ -000031f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00003200: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -00003220: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn false;.
    │ │ │ │ -000032a0: 3834 3c2f 7370 616e 3e20 3c2f 6469 763e 84
    │ │ │ │ -000032b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000032e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 85 return EvalStenci │ │ │ │ -00003390: 6c73 3c2f 613e 2873 7263 4275 6666 6572 ls(srcBuffer │ │ │ │ -000033a0: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -000033b0: 6572 2829 2c20 7372 6344 6573 632c 3c2f er(), srcDesc,.
    │ │ │ │ -00003410: 3836 3c2f 7370 616e 3e20 2020 2020 2020 86 │ │ │ │ -00003420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003430: 2020 2020 2064 7374 4275 6666 6572 2d26 dstBuffer-& │ │ │ │ -00003440: 6774 3b42 696e 6443 7075 4275 6666 6572 gt;BindCpuBuffer │ │ │ │ -00003450: 2829 2c20 6473 7444 6573 632c 3c2f 6469 (), dstDesc,.
    87 │ │ │ │ -000034b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -000034c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000034d0: 2020 2026 616d 703b 7374 656e 6369 6c54 &stencilT │ │ │ │ -000034e0: 6162 6c65 2d26 6774 3b47 6574 5369 7a65 able->GetSize │ │ │ │ -000034f0: 7328 295b 305d 2c3c 2f64 6976 3e0a 3c64 s()[0],
    . │ │ │ │ -00003510: 3c61 2069 643d 226c 3030 3038 3822 206e 88 │ │ │ │ -00003560: 2020 2020 2020 2020 2020 2020 2020 2661 &a │ │ │ │ -00003570: 6d70 3b73 7465 6e63 696c 5461 626c 652d mp;stencilTable- │ │ │ │ -00003580: 2667 743b 4765 744f 6666 7365 7473 2829 >GetOffsets() │ │ │ │ -00003590: 5b30 5d2c 3c2f 6469 763e 0a3c 6469 7620 [0],
    .
    89 │ │ │ │ -000035f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003600: 2020 2020 2020 2020 2020 2026 616d 703b & │ │ │ │ -00003610: 7374 656e 6369 6c54 6162 6c65 2d26 6774 stencilTable-> │ │ │ │ -00003620: 3b47 6574 436f 6e74 726f 6c49 6e64 6963 ;GetControlIndic │ │ │ │ -00003630: 6573 2829 5b30 5d2c 3c2f 6469 763e 0a3c es()[0],
    .< │ │ │ │ -00003640: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00003650: 3e3c 6120 6964 3d22 6c30 3030 3930 2220 > 90
    │ │ │ │ -000036a0: 2020 2020 2020 2020 2020 2020 2020 2026 & │ │ │ │ -000036b0: 616d 703b 7374 656e 6369 6c54 6162 6c65 amp;stencilTable │ │ │ │ -000036c0: 2d26 6774 3b47 6574 5765 6967 6874 7328 ->GetWeights( │ │ │ │ -000036d0: 295b 305d 2c3c 2f64 6976 3e0a 3c64 6976 )[0],
    .
    < │ │ │ │ -00003710: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00003720: 6e6f 223e 2020 2039 313c 2f73 7061 6e3e no"> 91 │ │ │ │ +000031e0: 733d 226c 696e 656e 6f22 3e20 2020 3736 s="lineno"> 76 │ │ │ │ +000031f0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00003200: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00003210: 3e3c 6120 6964 3d22 6c30 3030 3830 2220 > 80 tem │ │ │ │ +00003270: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ +00003280: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ +000032a0: 2f73 7061 6e3e 2046 4143 452c 203c 7370 /span> FACE, typename MASK>
    .
    81< │ │ │ │ +00003330: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ +00003360: 3c61 2063 6c61 7373 3d22 636f 6465 2068 ComputeFaceVert │ │ │ │ +000033c0: 6578 4d61 736b 3c2f 613e 2846 4143 4520 exMask(FACE │ │ │ │ +000033d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const& faceNeig │ │ │ │ +00003400: 6862 6f72 686f 6f64 2c20 4d41 534b 2661 hborhood, MASK&a │ │ │ │ +00003410: 6d70 3b20 6661 6365 5665 7274 6578 4d61 mp; faceVertexMa │ │ │ │ +00003420: 736b 2920 3c73 7061 6e20 636c 6173 733d sk) const< │ │ │ │ +00003440: 2f73 7061 6e3e 3b3c 2f64 6976 3e0a 3c64 /span>;
    . │ │ │ │ +00003460: 3c61 2069 643d 226c 3030 3038 3222 206e 82
    .
    98 │ │ │ │ +00003500: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ │ +00003520: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename EDGE, ty │ │ │ │ +00003570: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ +00003580: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ +000035a0: 6120 6964 3d22 6c30 3030 3939 2220 6e61 a id="l00099" na │ │ │ │ +000035b0: 6d65 3d22 6c30 3030 3939 223e 3c2f 613e me="l00099"> │ │ │ │ +000035c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 99 v │ │ │ │ +00003600: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid Comp │ │ │ │ +00003660: 7574 6545 6467 6556 6572 7465 784d 6173 uteEdgeVertexMas │ │ │ │ +00003670: 6b3c 2f61 3e28 4544 4745 203c 7370 616e k(EDGE const&am │ │ │ │ +000036a0: 703b 2065 6467 654e 6569 6768 626f 7268 p; edgeNeighborh │ │ │ │ +000036b0: 6f6f 642c 204d 4153 4b26 616d 703b 2065 ood, MASK& e │ │ │ │ +000036c0: 6467 6556 6572 7465 784d 6173 6b2c 3c2f dgeVertexMask,.
    1 │ │ │ │ +00003720: 3030 3c2f 7370 616e 3e20 2020 2020 2020 00 │ │ │ │ 00003730: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00003740: 2020 2020 2020 2020 2020 2020 3c73 7061 /*start = */ 0,
    .< │ │ │ │ -00003780: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00003790: 3e3c 6120 6964 3d22 6c30 3030 3932 2220 > 92 │ │ │ │ -000037e0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -000037f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00003800: 656e 7422 3e2f 2a65 6e64 2020 203d 202a ent">/*end = * │ │ │ │ -00003810: 2f3c 2f73 7061 6e3e 2073 7465 6e63 696c / stencil │ │ │ │ -00003820: 5461 626c 652d 2667 743b 4765 744e 756d Table->GetNum │ │ │ │ -00003830: 5374 656e 6369 6c73 2829 293b 3c2f 6469 Stencils());
    .
    93 │ │ │ │ -00003890: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    94 < │ │ │ │ -00003900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    121 sta │ │ │ │ -000039c0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic bool │ │ │ │ -000039f0: 203c 6120 636c 6173 733d 2263 6f64 6520 EvalStencils(
    .
    122 │ │ │ │ -00003ab0: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -00003ad0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t float │ │ │ │ -00003b00: 2a73 7263 2c20 3c61 2063 6c61 7373 3d22 *src, BufferDescrip │ │ │ │ -00003b40: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ -00003b60: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ -00003b70: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ -00003b80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00003b90: 3e3c 6120 6964 3d22 6c30 3031 3233 2220 > 123
    float *dst, Buffe │ │ │ │ -00003c40: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ -00003c50: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dstDesc, │ │ │ │ -00003c80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00003cd0: 2031 3234 3c2f 7370 616e 3e20 2020 2020 124 │ │ │ │ -00003ce0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const │ │ │ │ -00003d20: 696e 743c 2f73 7061 6e3e 202a 2073 697a int * siz │ │ │ │ -00003d30: 6573 2c3c 2f64 6976 3e0a 3c64 6976 2063 es,
    .
    125 │ │ │ │ -00003d90: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -00003db0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t int * │ │ │ │ -00003de0: 6f66 6673 6574 732c 3c2f 6469 763e 0a3c offsets,
    .< │ │ │ │ -00003df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00003e00: 3e3c 6120 6964 3d22 6c30 3031 3236 2220 > 126 const int * indices,.
    12 │ │ │ │ -00003ef0: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ │ -00003f00: 3c73 7061 6e20 636c 6173 733d 226b 6579 const flo │ │ │ │ -00003f40: 6174 3c2f 7370 616e 3e20 2a20 7765 6967 at * weig │ │ │ │ -00003f50: 6874 732c 3c2f 6469 763e 0a3c 6469 7620 hts,
    .
    128 │ │ │ │ -00003fb0: 2020 2020 2020 203c 7370 616e 2063 6c61 int star │ │ │ │ -00003fe0: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, int │ │ │ │ -00004000: 3c2f 7370 616e 3e20 656e 6429 3b3c 2f64 end);.
    12 │ │ │ │ -00004060: 393c 2f73 7061 6e3e 203c 2f64 6976 3e0a 9
    . │ │ │ │ -00004070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000040a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 167 te │ │ │ │ -000040e0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ │ -000040f0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ │ -00004110: 3c2f 7370 616e 3e20 5352 435f 4255 4646 SRC_BUFF │ │ │ │ -00004120: 4552 2c20 3c73 7061 6e20 636c 6173 733d ER, typena │ │ │ │ -00004140: 6d65 3c2f 7370 616e 3e20 4453 545f 4255 me DST_BU │ │ │ │ -00004150: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ -00004170: 6e61 6d65 3c2f 7370 616e 3e20 5354 454e name STEN │ │ │ │ -00004180: 4349 4c5f 5441 424c 4526 6774 3b3c 2f64 CIL_TABLE>.
    .
    168 │ │ │ │ -00004270: 3c2f 7370 616e 3e20 2020 203c 7370 616e static < │ │ │ │ -000042a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000042b0: 6f72 6474 7970 6522 3e62 6f6f 6c3c 2f73 ordtype">bool EvalStenci │ │ │ │ -00004320: 6c73 3c2f 613e 283c 2f64 6976 3e0a 3c64 ls(
    . │ │ │ │ -00004340: 3c61 2069 643d 226c 3030 3136 3922 206e 169 SRC_BU │ │ │ │ -00004390: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ -000043a0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -000043d0: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ -00004410: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    170 │ │ │ │ -00004470: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ -00004480: 202a 6473 7442 7566 6665 722c 203c 6120 *dstBuffer, Buffer │ │ │ │ -000044c0: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -000044d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000044e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dstDesc,< │ │ │ │ -00004500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00004550: 3137 313c 2f73 7061 6e3e 2020 2020 2020 171 │ │ │ │ -00004560: 2020 4453 545f 4255 4646 4552 202a 6475 DST_BUFFER *du │ │ │ │ -00004570: 4275 6666 6572 2c20 203c 6120 636c 6173 Buffer, BufferDesc │ │ │ │ -000045b0: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -000045e0: 6d70 3b64 7544 6573 632c 3c2f 6469 763e mp;duDesc,
    │ │ │ │ -000045f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00004620: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 172 DST │ │ │ │ -00004650: 5f42 5546 4645 5220 2a64 7642 7566 6665 _BUFFER *dvBuffe │ │ │ │ -00004660: 722c 2020 3c61 2063 6c61 7373 3d22 636f r, BufferDescripto │ │ │ │ -000046a0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ -000046c0: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ -000046d0: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ -00004710: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00004720: 6e6f 223e 2020 3137 333c 2f73 7061 6e3e no"> 173 │ │ │ │ -00004730: 2020 2020 2020 2020 5354 454e 4349 4c5f STENCIL_ │ │ │ │ -00004740: 5441 424c 4520 3c73 7061 6e20 636c 6173 TABLE cons │ │ │ │ -00004760: 743c 2f73 7061 6e3e 202a 7374 656e 6369 t *stenci │ │ │ │ -00004770: 6c54 6162 6c65 2c3c 2f64 6976 3e0a 3c64 lTable,
    . │ │ │ │ -00004790: 3c61 2069 643d 226c 3030 3137 3422 206e 174 │ │ │ │ -000047f0: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const CpuEval │ │ │ │ -00004830: 7561 746f 723c 2f61 3e20 2a69 6e73 7461 uator *insta │ │ │ │ -00004840: 6e63 6520 3d20 4e55 4c4c 2c3c 2f64 6976 nce = NULL,
    .. │ │ │ │ -00004aa0: 3c61 2069 643d 226c 3030 3137 3922 206e 179
    .
    180 │ │ │ │ -00004b40: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -00004b60: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return E │ │ │ │ -00004bc0: 7661 6c53 7465 6e63 696c 733c 2f61 3e28 valStencils( │ │ │ │ -00004bd0: 7372 6342 7566 6665 722d 2667 743b 4269 srcBuffer->Bi │ │ │ │ -00004be0: 6e64 4370 7542 7566 6665 7228 292c 2073 ndCpuBuffer(), s │ │ │ │ -00004bf0: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ -00004c10: 3c61 2069 643d 226c 3030 3138 3122 206e 181 │ │ │ │ -00004c60: 2020 2020 2020 2020 2020 2020 2020 6473 ds │ │ │ │ -00004c70: 7442 7566 6665 722d 2667 743b 4269 6e64 tBuffer->Bind │ │ │ │ -00004c80: 4370 7542 7566 6665 7228 292c 2064 7374 CpuBuffer(), dst │ │ │ │ -00004c90: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ -00004cd0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00004ce0: 6e6f 223e 2020 3138 323c 2f73 7061 6e3e no"> 182 │ │ │ │ -00004cf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004d00: 2020 2020 2020 2020 2020 2020 6475 4275 duBu │ │ │ │ -00004d10: 6666 6572 2d26 6774 3b42 696e 6443 7075 ffer->BindCpu │ │ │ │ -00004d20: 4275 6666 6572 2829 2c20 2064 7544 6573 Buffer(), duDes │ │ │ │ -00004d30: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    183 │ │ │ │ -00004d90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004da0: 2020 2020 2020 2020 2064 7642 7566 6665 dvBuffe │ │ │ │ -00004db0: 722d 2667 743b 4269 6e64 4370 7542 7566 r->BindCpuBuf │ │ │ │ -00004dc0: 6665 7228 292c 2020 6476 4465 7363 2c3c fer(), dvDesc,< │ │ │ │ -00004dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00004e20: 3138 343c 2f73 7061 6e3e 2020 2020 2020 184 │ │ │ │ -00004e30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004e40: 2020 2020 2020 2661 6d70 3b73 7465 6e63 &stenc │ │ │ │ -00004e50: 696c 5461 626c 652d 2667 743b 4765 7453 ilTable->GetS │ │ │ │ -00004e60: 697a 6573 2829 5b30 5d2c 3c2f 6469 763e izes()[0],
    │ │ │ │ -00004e70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00004ea0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 185 │ │ │ │ -00004ed0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00004ee0: 2026 616d 703b 7374 656e 6369 6c54 6162 &stencilTab │ │ │ │ -00004ef0: 6c65 2d26 6774 3b47 6574 4f66 6673 6574 le->GetOffset │ │ │ │ -00004f00: 7328 295b 305d 2c3c 2f64 6976 3e0a 3c64 s()[0],
    . │ │ │ │ -00004f20: 3c61 2069 643d 226c 3030 3138 3622 206e 186
    │ │ │ │ -00004f70: 2020 2020 2020 2020 2020 2020 2020 2661 &a │ │ │ │ -00004f80: 6d70 3b73 7465 6e63 696c 5461 626c 652d mp;stencilTable- │ │ │ │ -00004f90: 2667 743b 4765 7443 6f6e 7472 6f6c 496e >GetControlIn │ │ │ │ -00004fa0: 6469 6365 7328 295b 305d 2c3c 2f64 6976 dices()[0],
    .
    187< │ │ │ │ -00005000: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -00005010: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00005020: 2020 2661 6d70 3b73 7465 6e63 696c 5461 &stencilTa │ │ │ │ -00005030: 626c 652d 2667 743b 4765 7457 6569 6768 ble->GetWeigh │ │ │ │ -00005040: 7473 2829 5b30 5d2c 3c2f 6469 763e 0a3c ts()[0],
    .< │ │ │ │ -00005050: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00005060: 3e3c 6120 6964 3d22 6c30 3031 3838 2220 > 188 │ │ │ │ -000050b0: 2020 2020 2020 2020 2020 2020 2020 2026 & │ │ │ │ -000050c0: 616d 703b 7374 656e 6369 6c54 6162 6c65 amp;stencilTable │ │ │ │ -000050d0: 2d26 6774 3b47 6574 4475 5765 6967 6874 ->GetDuWeight │ │ │ │ -000050e0: 7328 295b 305d 2c3c 2f64 6976 3e0a 3c64 s()[0],
    . │ │ │ │ -00005100: 3c61 2069 643d 226c 3030 3138 3922 206e 189 │ │ │ │ -00005150: 2020 2020 2020 2020 2020 2020 2020 2661 &a │ │ │ │ -00005160: 6d70 3b73 7465 6e63 696c 5461 626c 652d mp;stencilTable- │ │ │ │ -00005170: 2667 743b 4765 7444 7657 6569 6768 7473 >GetDvWeights │ │ │ │ -00005180: 2829 5b30 5d2c 3c2f 6469 763e 0a3c 6469 ()[0],
    .< │ │ │ │ -000051a0: 6120 6964 3d22 6c30 3031 3930 2220 6e61 a id="l00190" na │ │ │ │ -000051b0: 6d65 3d22 6c30 3031 3930 223e 3c2f 613e me="l00190"> │ │ │ │ -000051c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 190 │ │ │ │ -000051f0: 2020 2020 2020 2020 2020 2020 203c 7370 /*start = */< │ │ │ │ -00005220: 2f73 7061 6e3e 2030 2c3c 2f64 6976 3e0a /span> 0,
    . │ │ │ │ -00005230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -00005260: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 191 │ │ │ │ -00005290: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000052a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /*end = │ │ │ │ -000052c0: 2a2f 3c2f 7370 616e 3e20 7374 656e 6369 */ stenci │ │ │ │ -000052d0: 6c54 6162 6c65 2d26 6774 3b47 6574 4e75 lTable->GetNu │ │ │ │ -000052e0: 6d53 7465 6e63 696c 7328 2929 3b3c 2f64 mStencils());.
    19 │ │ │ │ -00005340: 323c 2f73 7061 6e3e 2020 2020 7d3c 2f64 2 }.
    .
    193 │ │ │ │ -000053b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -00005400: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ -00005410: 7265 663d 2261 3031 3135 372e 6874 6d6c ref="a01157.html │ │ │ │ -00005420: 2361 3664 6165 6436 3133 3561 3430 6364 #a6daed6135a40cd │ │ │ │ -00005430: 6132 6461 6636 6336 6561 3230 3437 6233 a2daf6c6ea2047b3 │ │ │ │ -00005440: 3330 223e 2020 3233 343c 2f61 3e3c 2f73 30"> 234 st │ │ │ │ -00005470: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic bool EvalStencils< │ │ │ │ -00005500: 2f61 3e28 3c2f 6469 763e 0a3c 6469 7620 /a>(
    .
    235 │ │ │ │ -00005560: 2020 2020 2020 203c 7370 616e 2063 6c61 con │ │ │ │ -00005580: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st float │ │ │ │ -000055b0: 202a 7372 632c 203c 6120 636c 6173 733d *src, BufferDescri │ │ │ │ -000055f0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ -00005610: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ -00005620: 3b73 7263 4465 7363 2c3c 2f64 6976 3e0a ;srcDesc,
    . │ │ │ │ -00005630: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ -00005780: 2020 3233 373c 2f73 7061 6e3e 2020 2020 237 │ │ │ │ -00005790: 2020 2020 3c73 7061 6e20 636c 6173 733d fl │ │ │ │ -000057b0: 6f61 743c 2f73 7061 6e3e 202a 6475 2c20 oat *du, │ │ │ │ -000057c0: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ -00005800: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ -00005820: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ -00005830: 3b64 7544 6573 632c 3c2f 6469 763e 0a3c ;duDesc,
    .< │ │ │ │ -00005840: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00005850: 3e3c 6120 6964 3d22 6c30 3032 3338 2220 > 238 float *dv, Buffe │ │ │ │ -00005900: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ -00005910: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dvDesc,< │ │ │ │ -00005940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00005990: 3233 393c 2f73 7061 6e3e 2020 2020 2020 239 │ │ │ │ -000059a0: 2020 3c73 7061 6e20 636c 6173 733d 226b const i │ │ │ │ -000059e0: 6e74 3c2f 7370 616e 3e20 2a20 7369 7a65 nt * size │ │ │ │ -000059f0: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    240 │ │ │ │ -00005a50: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ │ -00005a70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int * o │ │ │ │ -00005aa0: 6666 7365 7473 2c3c 2f64 6976 3e0a 3c64 ffsets,
    . │ │ │ │ -00005ac0: 3c61 2069 643d 226c 3030 3234 3122 206e 241 │ │ │ │ -00005b20: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const int * indices,.
    242 │ │ │ │ -00005bb0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -00005bc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00005bd0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const floa │ │ │ │ -00005c00: 743c 2f73 7061 6e3e 202a 2077 6569 6768 t * weigh │ │ │ │ -00005c10: 7473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ts,
    .
    243 │ │ │ │ -00005c70: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -00005c90: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t float │ │ │ │ -00005cc0: 2a20 6475 5765 6967 6874 732c 3c2f 6469 * duWeights,.
    244 │ │ │ │ -00005d20: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -00005d30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00005d40: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const floa │ │ │ │ -00005d70: 743c 2f73 7061 6e3e 202a 2064 7657 6569 t * dvWei │ │ │ │ -00005d80: 6768 7473 2c3c 2f64 6976 3e0a 3c64 6976 ghts,
    .
    < │ │ │ │ -00005dc0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00005dd0: 6e6f 223e 2020 3234 353c 2f73 7061 6e3e no"> 245 │ │ │ │ -00005de0: 2020 2020 2020 2020 3c73 7061 6e20 636c int sta │ │ │ │ -00005e10: 7274 2c20 3c73 7061 6e20 636c 6173 733d rt, in │ │ │ │ -00005e30: 743c 2f73 7061 6e3e 2065 6e64 293b 3c2f t end);.
    2 │ │ │ │ -00005e90: 3436 3c2f 7370 616e 3e20 3c2f 6469 763e 46
    │ │ │ │ -00005ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00005ed0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 302 t │ │ │ │ -00005f10: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ │ -00005f20: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ │ -00005f40: 653c 2f73 7061 6e3e 2053 5243 5f42 5546 e SRC_BUF │ │ │ │ -00005f50: 4645 522c 203c 7370 616e 2063 6c61 7373 FER, typen │ │ │ │ -00005f70: 616d 653c 2f73 7061 6e3e 2044 5354 5f42 ame DST_B │ │ │ │ -00005f80: 5546 4645 522c 203c 7370 616e 2063 6c61 UFFER, typ │ │ │ │ -00005fa0: 656e 616d 653c 2f73 7061 6e3e 2053 5445 ename STE │ │ │ │ -00005fb0: 4e43 494c 5f54 4142 4c45 2667 743b 3c2f NCIL_TABLE>..
    305 │ │ │ │ -000062a0: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ -000062b0: 5220 2a64 7374 4275 6666 6572 2c20 3c61 R *dstBuffer, Buffe │ │ │ │ -000062f0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ -00006300: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dstDesc, │ │ │ │ -00006330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00006380: 2033 3036 3c2f 7370 616e 3e20 2020 2020 306 │ │ │ │ -00006390: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ -000063a0: 7542 7566 6665 722c 2020 3c61 2063 6c61 uBuffer, BufferDes │ │ │ │ -000063e0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ -00006410: 616d 703b 6475 4465 7363 2c3c 2f64 6976 amp;duDesc,
    .
    307< │ │ │ │ -00006470: 2f73 7061 6e3e 2020 2020 2020 2020 4453 /span> DS │ │ │ │ -00006480: 545f 4255 4646 4552 202a 6476 4275 6666 T_BUFFER *dvBuff │ │ │ │ -00006490: 6572 2c20 203c 6120 636c 6173 733d 2263 er, BufferDescript │ │ │ │ -000064d0: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ -000064f0: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ -00006500: 7644 6573 632c 3c2f 6469 763e 0a3c 6469 vDesc,
    .< │ │ │ │ -00006520: 6120 6964 3d22 6c30 3033 3038 2220 6e61 a id="l00308" na │ │ │ │ -00006530: 6d65 3d22 6c30 3033 3038 223e 3c2f 613e me="l00308"> │ │ │ │ -00006540: 3c73 7061 6e20 636c 6173 733d 226c 696e 308 DST_BUF │ │ │ │ -00006570: 4645 5220 2a64 7575 4275 6666 6572 2c20 FER *duuBuffer, │ │ │ │ -00006580: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ -000065b0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &duuDes │ │ │ │ -000065f0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    309 │ │ │ │ -00006650: 2020 2020 2044 5354 5f42 5546 4645 5220 DST_BUFFER │ │ │ │ -00006660: 2a64 7576 4275 6666 6572 2c20 3c61 2063 *duvBuffer, BufferD │ │ │ │ -000066a0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ -000066d0: 2026 616d 703b 6475 7644 6573 632c 3c2f &duvDesc,.
    3 │ │ │ │ -00006730: 3130 3c2f 7370 616e 3e20 2020 2020 2020 10 │ │ │ │ -00006740: 2044 5354 5f42 5546 4645 5220 2a64 7676 DST_BUFFER *dvv │ │ │ │ -00006750: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ -00006790: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ -000067b0: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ -000067c0: 703b 6476 7644 6573 632c 3c2f 6469 763e p;dvvDesc,
    │ │ │ │ -000067d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00006800: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 311 STE │ │ │ │ -00006830: 4e43 494c 5f54 4142 4c45 203c 7370 616e NCIL_TABLE const *s │ │ │ │ -00006860: 7465 6e63 696c 5461 626c 652c 3c2f 6469 tencilTable,.
    312 │ │ │ │ -000068c0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -000068d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000068e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const Cp │ │ │ │ -00006920: 7545 7661 6c75 6174 6f72 3c2f 613e 202a uEvaluator * │ │ │ │ -00006930: 696e 7374 616e 6365 203d 204e 554c 4c2c instance = NULL, │ │ │ │ -00006940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00006990: 2033 3133 3c2f 7370 616e 3e20 2020 2020 313 │ │ │ │ -000069a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -000069c0: 643c 2f73 7061 6e3e 202a 2064 6576 6963 d * devic │ │ │ │ -000069d0: 6543 6f6e 7465 7874 203d 204e 554c 4c29 eContext = NULL) │ │ │ │ -000069e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    314 .
    3 │ │ │ │ -00006a90: 3135 3c2f 7370 616e 3e20 2020 2020 2020 15 │ │ │ │ -00006aa0: 2028 766f 6964 2969 6e73 7461 6e63 653b (void)instance; │ │ │ │ -00006ab0: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -00006ad0: 756e 7573 6564 3c2f 7370 616e 3e3c 2f64 unused.
    31 │ │ │ │ -00006b30: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ -00006b40: 2876 6f69 6429 6465 7669 6365 436f 6e74 (void)deviceCont │ │ │ │ -00006b50: 6578 743b 2020 3c73 7061 6e20 636c 6173 ext; // u │ │ │ │ -00006b70: 6e75 7365 643c 2f73 7061 6e3e 3c2f 6469 nused.
    317 │ │ │ │ -00006bd0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00006be0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00006bf0: 3e3c 6120 6964 3d22 6c30 3033 3138 2220 > 318 return EvalStencils │ │ │ │ -00006cc0: 3c2f 613e 2873 7263 4275 6666 6572 2d26 (srcBuffer-& │ │ │ │ -00006cd0: 6774 3b42 696e 6443 7075 4275 6666 6572 gt;BindCpuBuffer │ │ │ │ -00006ce0: 2829 2c20 7372 6344 6573 632c 3c2f 6469 (), srcDesc,.
    319 │ │ │ │ -00006d40: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00006d50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00006d60: 2020 2064 7374 4275 6666 6572 2d26 6774 dstBuffer-> │ │ │ │ -00006d70: 3b42 696e 6443 7075 4275 6666 6572 2829 ;BindCpuBuffer() │ │ │ │ -00006d80: 2c20 6473 7444 6573 632c 3c2f 6469 763e , dstDesc,
    │ │ │ │ -00006d90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00006dc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 320 │ │ │ │ -00006df0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00006e00: 2064 7542 7566 6665 722d 2667 743b 4269 duBuffer->Bi │ │ │ │ -00006e10: 6e64 4370 7542 7566 6665 7228 292c 2020 ndCpuBuffer(), │ │ │ │ -00006e20: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ -00006e40: 3c61 2069 643d 226c 3030 3332 3122 206e 321 │ │ │ │ -00006e90: 2020 2020 2020 2020 2020 2020 2020 6476 dv │ │ │ │ -00006ea0: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ -00006eb0: 7075 4275 6666 6572 2829 2c20 2064 7644 puBuffer(), dvD │ │ │ │ -00006ec0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    322 │ │ │ │ -00006f20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00006f30: 2020 2020 2020 2020 2020 2064 7575 4275 duuBu │ │ │ │ -00006f40: 6666 6572 2d26 6774 3b42 696e 6443 7075 ffer->BindCpu │ │ │ │ -00006f50: 4275 6666 6572 2829 2c20 6475 7544 6573 Buffer(), duuDes │ │ │ │ -00006f60: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    323 │ │ │ │ -00006fc0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00006fd0: 2020 2020 2020 2020 2064 7576 4275 6666 duvBuff │ │ │ │ -00006fe0: 6572 2d26 6774 3b42 696e 6443 7075 4275 er->BindCpuBu │ │ │ │ -00006ff0: 6666 6572 2829 2c20 6475 7644 6573 632c ffer(), duvDesc, │ │ │ │ -00007000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00007050: 2033 3234 3c2f 7370 616e 3e20 2020 2020 324 │ │ │ │ -00007060: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00007070: 2020 2020 2020 2064 7676 4275 6666 6572 dvvBuffer │ │ │ │ -00007080: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -00007090: 6572 2829 2c20 6476 7644 6573 632c 3c2f er(), dvvDesc,.
    3 │ │ │ │ -000070f0: 3235 3c2f 7370 616e 3e20 2020 2020 2020 25 │ │ │ │ -00007100: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00007110: 2020 2020 2026 616d 703b 7374 656e 6369 &stenci │ │ │ │ -00007120: 6c54 6162 6c65 2d26 6774 3b47 6574 5369 lTable->GetSi │ │ │ │ -00007130: 7a65 7328 295b 305d 2c3c 2f64 6976 3e0a zes()[0],
    . │ │ │ │ -00007140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ -000071f0: 6120 6964 3d22 6c30 3033 3237 2220 6e61 a id="l00327" na │ │ │ │ -00007200: 6d65 3d22 6c30 3033 3237 223e 3c2f 613e me="l00327"> │ │ │ │ -00007210: 3c73 7061 6e20 636c 6173 733d 226c 696e 327 │ │ │ │ -00007240: 2020 2020 2020 2020 2020 2020 2026 616d &am │ │ │ │ -00007250: 703b 7374 656e 6369 6c54 6162 6c65 2d26 p;stencilTable-& │ │ │ │ -00007260: 6774 3b47 6574 436f 6e74 726f 6c49 6e64 gt;GetControlInd │ │ │ │ -00007270: 6963 6573 2829 5b30 5d2c 3c2f 6469 763e ices()[0],
    │ │ │ │ -00007280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000072b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 328 │ │ │ │ -000072e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000072f0: 2026 616d 703b 7374 656e 6369 6c54 6162 &stencilTab │ │ │ │ -00007300: 6c65 2d26 6774 3b47 6574 5765 6967 6874 le->GetWeight │ │ │ │ -00007310: 7328 295b 305d 2c3c 2f64 6976 3e0a 3c64 s()[0],
    . │ │ │ │ -00007330: 3c61 2069 643d 226c 3030 3332 3922 206e 329 │ │ │ │ -00007380: 2020 2020 2020 2020 2020 2020 2020 2661 &a │ │ │ │ -00007390: 6d70 3b73 7465 6e63 696c 5461 626c 652d mp;stencilTable- │ │ │ │ -000073a0: 2667 743b 4765 7444 7557 6569 6768 7473 >GetDuWeights │ │ │ │ -000073b0: 2829 5b30 5d2c 3c2f 6469 763e 0a3c 6469 ()[0],
    .< │ │ │ │ -000073d0: 6120 6964 3d22 6c30 3033 3330 2220 6e61 a id="l00330" na │ │ │ │ -000073e0: 6d65 3d22 6c30 3033 3330 223e 3c2f 613e me="l00330"> │ │ │ │ -000073f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 330 │ │ │ │ -00007420: 2020 2020 2020 2020 2020 2020 2026 616d &am │ │ │ │ -00007430: 703b 7374 656e 6369 6c54 6162 6c65 2d26 p;stencilTable-& │ │ │ │ -00007440: 6774 3b47 6574 4476 5765 6967 6874 7328 gt;GetDvWeights( │ │ │ │ -00007450: 295b 305d 2c3c 2f64 6976 3e0a 3c64 6976 )[0],
    .
    < │ │ │ │ -00007490: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000074a0: 6e6f 223e 2020 3333 313c 2f73 7061 6e3e no"> 331 │ │ │ │ -000074b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000074c0: 2020 2020 2020 2020 2020 2020 2661 6d70 & │ │ │ │ -000074d0: 3b73 7465 6e63 696c 5461 626c 652d 2667 ;stencilTable-&g │ │ │ │ -000074e0: 743b 4765 7444 7575 5765 6967 6874 7328 t;GetDuuWeights( │ │ │ │ -000074f0: 295b 305d 2c3c 2f64 6976 3e0a 3c64 6976 )[0],
    .
    < │ │ │ │ -00007530: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00007540: 6e6f 223e 2020 3333 323c 2f73 7061 6e3e no"> 332 │ │ │ │ -00007550: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00007560: 2020 2020 2020 2020 2020 2020 2661 6d70 & │ │ │ │ -00007570: 3b73 7465 6e63 696c 5461 626c 652d 2667 ;stencilTable-&g │ │ │ │ -00007580: 743b 4765 7444 7576 5765 6967 6874 7328 t;GetDuvWeights( │ │ │ │ -00007590: 295b 305d 2c3c 2f64 6976 3e0a 3c64 6976 )[0],
    .
    < │ │ │ │ -000075d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000075e0: 6e6f 223e 2020 3333 333c 2f73 7061 6e3e no"> 333 │ │ │ │ -000075f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00007600: 2020 2020 2020 2020 2020 2020 2661 6d70 & │ │ │ │ -00007610: 3b73 7465 6e63 696c 5461 626c 652d 2667 ;stencilTable-&g │ │ │ │ -00007620: 743b 4765 7444 7676 5765 6967 6874 7328 t;GetDvvWeights( │ │ │ │ -00007630: 295b 305d 2c3c 2f64 6976 3e0a 3c64 6976 )[0],
    .
    < │ │ │ │ -00007670: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00007680: 6e6f 223e 2020 3333 343c 2f73 7061 6e3e no"> 334 │ │ │ │ -00007690: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000076a0: 2020 2020 2020 2020 2020 2020 3c73 7061 /*start = */ 0,
    .< │ │ │ │ -000076e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000076f0: 3e3c 6120 6964 3d22 6c30 3033 3335 2220 > 335 │ │ │ │ -00007740: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -00007750: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00007760: 656e 7422 3e2f 2a65 6e64 2020 203d 202a ent">/*end = * │ │ │ │ -00007770: 2f3c 2f73 7061 6e3e 2073 7465 6e63 696c / stencil │ │ │ │ -00007780: 5461 626c 652d 2667 743b 4765 744e 756d Table->GetNum │ │ │ │ -00007790: 5374 656e 6369 6c73 2829 293b 3c2f 6469 Stencils());.
    336 │ │ │ │ -000077f0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    337 < │ │ │ │ -00007860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    399 sta │ │ │ │ -00007920: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic bool │ │ │ │ -00007950: 203c 6120 636c 6173 733d 2263 6f64 6520 EvalStencils(
    .
    400 │ │ │ │ -00007a10: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -00007a30: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t float │ │ │ │ -00007a60: 2a73 7263 2c20 3c61 2063 6c61 7373 3d22 *src, BufferDescrip │ │ │ │ -00007aa0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ -00007ac0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ -00007ad0: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ -00007ae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00007af0: 3e3c 6120 6964 3d22 6c30 3034 3031 2220 > 401
    float *dst, Buffe │ │ │ │ -00007ba0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ -00007bb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &dstDesc, │ │ │ │ -00007be0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00007c30: 2034 3032 3c2f 7370 616e 3e20 2020 2020 402 │ │ │ │ -00007c40: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo │ │ │ │ -00007c60: 6174 3c2f 7370 616e 3e20 2a64 752c 2020 at *du, │ │ │ │ -00007c70: 2020 2020 2020 3c61 2063 6c61 7373 3d22 BufferDescrip │ │ │ │ -00007cb0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ -00007cd0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ -00007ce0: 6475 4465 7363 2c3c 2f64 6976 3e0a 3c64 duDesc,
    . │ │ │ │ -00007d00: 3c61 2069 643d 226c 3030 3430 3322 206e 403 float │ │ │ │ -00007d70: 202a 6476 2c20 2020 2020 2020 203c 6120 *dv, Buffer │ │ │ │ -00007db0: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -00007dc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00007dd0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dvDesc,.
    4 │ │ │ │ -00007e40: 3034 3c2f 7370 616e 3e20 2020 2020 2020 04 │ │ │ │ -00007e50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float │ │ │ │ -00007e70: 3c2f 7370 616e 3e20 2a64 7575 2c20 2020 *duu, │ │ │ │ -00007e80: 2020 2020 3c61 2063 6c61 7373 3d22 636f BufferDescripto │ │ │ │ -00007ec0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ -00007ee0: 743c 2f73 7061 6e3e 2026 616d 703b 6475 t &du │ │ │ │ -00007ef0: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ -00007f10: 6120 6964 3d22 6c30 3034 3035 2220 6e61 a id="l00405" na │ │ │ │ -00007f20: 6d65 3d22 6c30 3034 3035 223e 3c2f 613e me="l00405"> │ │ │ │ -00007f30: 3c73 7061 6e20 636c 6173 733d 226c 696e 405 float │ │ │ │ -00007f80: 2a64 7576 2c20 2020 2020 2020 3c61 2063 *duv, BufferD │ │ │ │ -00007fc0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const
    │ │ │ │ -00007ff0: 2026 616d 703b 6475 7644 6573 632c 3c2f &duvDesc,.
    4 │ │ │ │ -00008050: 3036 3c2f 7370 616e 3e20 2020 2020 2020 06 │ │ │ │ -00008060: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float │ │ │ │ -00008080: 3c2f 7370 616e 3e20 2a64 7676 2c20 2020 *dvv, │ │ │ │ -00008090: 2020 2020 3c61 2063 6c61 7373 3d22 636f BufferDescripto │ │ │ │ -000080d0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ -000080f0: 743c 2f73 7061 6e3e 2026 616d 703b 6476 t &dv │ │ │ │ -00008100: 7644 6573 632c 3c2f 6469 763e 0a3c 6469 vDesc,
    .< │ │ │ │ -00008120: 6120 6964 3d22 6c30 3034 3037 2220 6e61 a id="l00407" na │ │ │ │ -00008130: 6d65 3d22 6c30 3034 3037 223e 3c2f 613e me="l00407"> │ │ │ │ -00008140: 3c73 7061 6e20 636c 6173 733d 226c 696e 407 c │ │ │ │ -00008180: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst int │ │ │ │ -000081b0: 202a 2073 697a 6573 2c3c 2f64 6976 3e0a * sizes,
    . │ │ │ │ -000081c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000081f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 408 const < │ │ │ │ -00008240: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00008250: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int * offsets,.
    4 │ │ │ │ -000082c0: 3039 3c2f 7370 616e 3e20 2020 2020 2020 09 │ │ │ │ -000082d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const in │ │ │ │ -00008310: 743c 2f73 7061 6e3e 202a 2069 6e64 6963 t * indic │ │ │ │ -00008320: 6573 2c3c 2f64 6976 3e0a 3c64 6976 2063 es,
    .
    410 │ │ │ │ -00008380: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -000083a0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t float │ │ │ │ -000083d0: 2a20 7765 6967 6874 732c 3c2f 6469 763e * weights,
    │ │ │ │ -000083e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00008410: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 411 const │ │ │ │ -00008460: 3c73 7061 6e20 636c 6173 733d 226b 6579 float< │ │ │ │ -00008480: 2f73 7061 6e3e 202a 2064 7557 6569 6768 /span> * duWeigh │ │ │ │ -00008490: 7473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ts,
    .
    412 │ │ │ │ -000084f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ │ -00008510: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t float │ │ │ │ -00008540: 2a20 6476 5765 6967 6874 732c 3c2f 6469 * dvWeights,.
    413 │ │ │ │ -000085a0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -000085b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000085c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const floa │ │ │ │ -000085f0: 743c 2f73 7061 6e3e 202a 2064 7575 5765 t * duuWe │ │ │ │ -00008600: 6967 6874 732c 3c2f 6469 763e 0a3c 6469 ights,
    .< │ │ │ │ -00008620: 6120 6964 3d22 6c30 3034 3134 2220 6e61 a id="l00414" na │ │ │ │ -00008630: 6d65 3d22 6c30 3034 3134 223e 3c2f 613e me="l00414"> │ │ │ │ -00008640: 3c73 7061 6e20 636c 6173 733d 226c 696e 414 c │ │ │ │ -00008680: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst float * duvWeights, │ │ │ │ -000086c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00008710: 2034 3135 3c2f 7370 616e 3e20 2020 2020 415 │ │ │ │ -00008720: 2020 203c 7370 616e 2063 6c61 7373 3d22 const │ │ │ │ -00008760: 666c 6f61 743c 2f73 7061 6e3e 202a 2064 float * d │ │ │ │ -00008770: 7676 5765 6967 6874 732c 3c2f 6469 763e vvWeights,
    │ │ │ │ -00008780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000087b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 416 int start, int en │ │ │ │ -00008830: 6429 3b3c 2f64 6976 3e0a 3c64 6976 2063 d);
    .
    417 < │ │ │ │ -00008890: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -000088e0: 3432 333c 2f73 7061 6e3e 203c 2f64 6976 423
    .
    452< │ │ │ │ -00008940: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00008960: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -00008970: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ │ -00008990: 6d65 3c2f 7370 616e 3e20 5352 435f 4255 me SRC_BU │ │ │ │ -000089a0: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ -000089c0: 6e61 6d65 3c2f 7370 616e 3e20 4453 545f name DST_ │ │ │ │ -000089d0: 4255 4646 4552 2c3c 2f64 6976 3e0a 3c64 BUFFER,
    . │ │ │ │ -000089f0: 3c61 2069 643d 226c 3030 3435 3322 206e 453 │ │ │ │ -00008a40: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename PATCHCOORD │ │ │ │ -00008a70: 5f42 5546 4645 522c 203c 7370 616e 2063 _BUFFER, t │ │ │ │ -00008a90: 7970 656e 616d 653c 2f73 7061 6e3e 2050 ypename P │ │ │ │ -00008aa0: 4154 4348 5f54 4142 4c45 2667 743b 3c2f ATCH_TABLE>.
    .
    454 static │ │ │ │ -00008bc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool EvalPatch │ │ │ │ -00008c40: 6573 3c2f 613e 283c 2f64 6976 3e0a 3c64 es(
    . │ │ │ │ -00008c60: 3c61 2069 643d 226c 3030 3435 3522 206e 455 SRC_BU │ │ │ │ -00008cb0: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ -00008cc0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -00008cf0: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &srcDe │ │ │ │ -00008d30: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    456 │ │ │ │ -00008d90: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ -00008da0: 202a 6473 7442 7566 6665 722c 203c 6120 *dstBuffer, Buffer │ │ │ │ -00008de0: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -00008df0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00008e00: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &dstDesc,< │ │ │ │ -00008e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00008e70: 3435 373c 2f73 7061 6e3e 2020 2020 2020 457 │ │ │ │ -00008e80: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -00008ea0: 2f73 7061 6e3e 206e 756d 5061 7463 6843 /span> numPatchC │ │ │ │ -00008eb0: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ -00008ed0: 6120 6964 3d22 6c30 3034 3538 2220 6e61 a id="l00458" na │ │ │ │ -00008ee0: 6d65 3d22 6c30 3034 3538 223e 3c2f 613e me="l00458"> │ │ │ │ -00008ef0: 3c73 7061 6e20 636c 6173 733d 226c 696e 458 PATCHCO │ │ │ │ -00008f20: 4f52 445f 4255 4646 4552 202a 7061 7463 ORD_BUFFER *patc │ │ │ │ -00008f30: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ -00008f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00008f50: 3e3c 6120 6964 3d22 6c30 3034 3539 2220 > 459
    PATCH │ │ │ │ -00008fa0: 5f54 4142 4c45 202a 7061 7463 6854 6162 _TABLE *patchTab │ │ │ │ -00008fb0: 6c65 2c3c 2f64 6976 3e0a 3c64 6976 2063 le,
    .
    460 │ │ │ │ -00009010: 2020 2020 2020 3c61 2063 6c61 7373 3d22 CpuEvaluator const *instance │ │ │ │ -00009080: 3d20 4e55 4c4c 2c3c 2f64 6976 3e0a 3c64 = NULL,
    . │ │ │ │ -000090a0: 3c61 2069 643d 226c 3030 3436 3122 206e 461 void │ │ │ │ -00009110: 2a20 6465 7669 6365 436f 6e74 6578 7420 * deviceContext │ │ │ │ -00009120: 3d20 4e55 4c4c 2920 7b3c 2f64 6976 3e0a = NULL) {
    . │ │ │ │ -00009130: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -000091c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000091d0: 6e6f 223e 2020 3436 333c 2f73 7061 6e3e no"> 463 │ │ │ │ -000091e0: 2020 2020 2020 2020 2876 6f69 6429 696e (void)in │ │ │ │ -000091f0: 7374 616e 6365 3b20 2020 2020 2020 3c73 stance; // unused
    .
    464 │ │ │ │ -00009280: 2020 2020 2020 2028 766f 6964 2964 6576 (void)dev │ │ │ │ -00009290: 6963 6543 6f6e 7465 7874 3b20 203c 7370 iceContext; // unused
    .
    465 < │ │ │ │ -00009320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00009370: 3436 363c 2f73 7061 6e3e 2020 2020 2020 466 │ │ │ │ -00009380: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -000093a0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn EvalP │ │ │ │ -00009400: 6174 6368 6573 3c2f 613e 2873 7263 4275 atches(srcBu │ │ │ │ -00009410: 6666 6572 2d26 6774 3b42 696e 6443 7075 ffer->BindCpu │ │ │ │ -00009420: 4275 6666 6572 2829 2c20 7372 6344 6573 Buffer(), srcDes │ │ │ │ -00009430: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    467 │ │ │ │ -00009490: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000094a0: 2020 2020 2020 2020 6473 7442 7566 6665 dstBuffe │ │ │ │ -000094b0: 722d 2667 743b 4269 6e64 4370 7542 7566 r->BindCpuBuf │ │ │ │ -000094c0: 6665 7228 292c 2064 7374 4465 7363 2c3c fer(), dstDesc,< │ │ │ │ -000094d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00009520: 3436 383c 2f73 7061 6e3e 2020 2020 2020 468 │ │ │ │ -00009530: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00009540: 2020 2020 206e 756d 5061 7463 6843 6f6f numPatchCoo │ │ │ │ -00009550: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    469 │ │ │ │ -000095b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000095c0: 2020 2020 2020 2020 2020 283c 7370 616e (const Patch │ │ │ │ -00009620: 436f 6f72 643c 2f61 3e2a 2970 6174 6368 Coord*)patch │ │ │ │ -00009630: 436f 6f72 6473 2d26 6774 3b42 696e 6443 Coords->BindC │ │ │ │ -00009640: 7075 4275 6666 6572 2829 2c3c 2f64 6976 puBuffer(),
    .
    470< │ │ │ │ -000096a0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -000096b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000096c0: 2070 6174 6368 5461 626c 652d 2667 743b patchTable-> │ │ │ │ -000096d0: 4765 7450 6174 6368 4172 7261 7942 7566 GetPatchArrayBuf │ │ │ │ -000096e0: 6665 7228 292c 3c2f 6469 763e 0a3c 6469 fer(),
    .< │ │ │ │ -00009700: 6120 6964 3d22 6c30 3034 3731 2220 6e61 a id="l00471" na │ │ │ │ -00009710: 6d65 3d22 6c30 3034 3731 223e 3c2f 613e me="l00471"> │ │ │ │ -00009720: 3c73 7061 6e20 636c 6173 733d 226c 696e 471 │ │ │ │ -00009750: 2020 2020 2020 2020 2020 2020 7061 7463 patc │ │ │ │ -00009760: 6854 6162 6c65 2d26 6774 3b47 6574 5061 hTable->GetPa │ │ │ │ -00009770: 7463 6849 6e64 6578 4275 6666 6572 2829 tchIndexBuffer() │ │ │ │ -00009780: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -000097d0: 2020 3437 323c 2f73 7061 6e3e 2020 2020 472 │ │ │ │ -000097e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000097f0: 2020 2020 2020 2070 6174 6368 5461 626c patchTabl │ │ │ │ -00009800: 652d 2667 743b 4765 7450 6174 6368 5061 e->GetPatchPa │ │ │ │ -00009810: 7261 6d42 7566 6665 7228 2929 3b3c 2f64 ramBuffer());.
    47 │ │ │ │ -00009870: 333c 2f73 7061 6e3e 2020 2020 7d3c 2f64 3 }.
    .
    474 │ │ │ │ -000098e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00009930: 2035 3135 3c2f 7370 616e 3e20 2020 203c 515 < │ │ │ │ -00009940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00009950: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ │ -00009980: 7970 656e 616d 653c 2f73 7061 6e3e 2053 ypename S │ │ │ │ -00009990: 5243 5f42 5546 4645 522c 203c 7370 616e RC_BUFFER, typename │ │ │ │ -000099c0: 2044 5354 5f42 5546 4645 522c 3c2f 6469 DST_BUFFER,.
    516 │ │ │ │ -00009a20: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00009a30: 2020 2020 203c 7370 616e 2063 6c61 7373 typen │ │ │ │ -00009a50: 616d 653c 2f73 7061 6e3e 2050 4154 4348 ame PATCH │ │ │ │ -00009a60: 434f 4f52 445f 4255 4646 4552 2c20 3c73 COORD_BUFFER, typename PATCH_TABLE& │ │ │ │ -00009aa0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ │ -00009af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -00009b20: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 5 │ │ │ │ -00009b80: 3137 3c2f 613e 3c2f 7370 616e 3e20 2020 17 │ │ │ │ -00009b90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 static b │ │ │ │ -00009bd0: 6f6f 6c3c 2f73 7061 6e3e 203c 6120 636c ool Eval │ │ │ │ -00009c30: 5061 7463 6865 733c 2f61 3e28 3c2f 6469 Patches(.
    518 │ │ │ │ -00009c90: 3c2f 7370 616e 3e20 2020 2020 2020 2053 S │ │ │ │ -00009ca0: 5243 5f42 5546 4645 5220 2a73 7263 4275 RC_BUFFER *srcBu │ │ │ │ -00009cb0: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ -00009cf0: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ -00009d10: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ -00009d20: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ -00009d30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00009d40: 3e3c 6120 6964 3d22 6c30 3035 3139 2220 > 519 DST_B │ │ │ │ -00009d90: 5546 4645 5220 2a64 7374 4275 6666 6572 UFFER *dstBuffer │ │ │ │ -00009da0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ -00009dd0: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ -00009de0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ -00009e00: 2f73 7061 6e3e 2026 616d 703b 6473 7444 /span> &dstD │ │ │ │ -00009e10: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    520 │ │ │ │ -00009e70: 2020 2020 2020 2044 5354 5f42 5546 4645 DST_BUFFE │ │ │ │ -00009e80: 5220 2a64 7542 7566 6665 722c 2020 3c61 R *duBuffer, Buffe │ │ │ │ -00009ec0: 7244 6573 6372 6970 746f 723c 2f61 3e20 rDescriptor │ │ │ │ -00009ed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const &duDesc,< │ │ │ │ -00009f00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00009f50: 3532 313c 2f73 7061 6e3e 2020 2020 2020 521 │ │ │ │ -00009f60: 2020 4453 545f 4255 4646 4552 202a 6476 DST_BUFFER *dv │ │ │ │ -00009f70: 4275 6666 6572 2c20 203c 6120 636c 6173 Buffer, BufferDesc │ │ │ │ -00009fb0: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -00009fe0: 6d70 3b64 7644 6573 632c 3c2f 6469 763e mp;dvDesc,
    │ │ │ │ -00009ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000a020: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 522 int numPatchCoords │ │ │ │ -0000a080: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000a0d0: 2020 3532 333c 2f73 7061 6e3e 2020 2020 523 │ │ │ │ -0000a0e0: 2020 2020 5041 5443 4843 4f4f 5244 5f42 PATCHCOORD_B │ │ │ │ -0000a0f0: 5546 4645 5220 2a70 6174 6368 436f 6f72 UFFER *patchCoor │ │ │ │ -0000a100: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    524 │ │ │ │ -0000a160: 2020 2020 2020 5041 5443 485f 5441 424c PATCH_TABL │ │ │ │ -0000a170: 4520 2a70 6174 6368 5461 626c 652c 3c2f E *patchTable,.
    5 │ │ │ │ -0000a1d0: 3235 3c2f 7370 616e 3e20 2020 2020 2020 25 │ │ │ │ -0000a1e0: 203c 6120 636c 6173 733d 2263 6f64 6520 Cpu │ │ │ │ -0000a210: 4576 616c 7561 746f 723c 2f61 3e20 3c73 Evaluator const │ │ │ │ -0000a240: 202a 696e 7374 616e 6365 203d 204e 554c *instance = NUL │ │ │ │ -0000a250: 4c2c 3c2f 6469 763e 0a3c 6469 7620 636c L,
    .
    526 │ │ │ │ -0000a2b0: 2020 2020 203c 7370 616e 2063 6c61 7373 v │ │ │ │ -0000a2d0: 6f69 643c 2f73 7061 6e3e 202a 2064 6576 oid * dev │ │ │ │ -0000a2e0: 6963 6543 6f6e 7465 7874 203d 204e 554c iceContext = NUL │ │ │ │ -0000a2f0: 4c29 207b 3c2f 6469 763e 0a3c 6469 7620 L) {
    .
    527 │ │ │ │ -0000a350: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000a3a0: 2035 3238 3c2f 7370 616e 3e20 2020 2020 528 │ │ │ │ -0000a3b0: 2020 2028 766f 6964 2969 6e73 7461 6e63 (void)instanc │ │ │ │ -0000a3c0: 653b 2020 2020 2020 203c 7370 616e 2063 e; / │ │ │ │ -0000a3e0: 2f20 756e 7573 6564 3c2f 7370 616e 3e3c / unused< │ │ │ │ -0000a3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000a440: 3532 393c 2f73 7061 6e3e 2020 2020 2020 529 │ │ │ │ -0000a450: 2020 2876 6f69 6429 6465 7669 6365 436f (void)deviceCo │ │ │ │ -0000a460: 6e74 6578 743b 2020 3c73 7061 6e20 636c ntext; // │ │ │ │ -0000a480: 2075 6e75 7365 643c 2f73 7061 6e3e 3c2f unused.
    5 │ │ │ │ -0000a4e0: 3330 3c2f 7370 616e 3e20 3c2f 6469 763e 30
    │ │ │ │ -0000a4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000a520: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 531 // XXX: Patch │ │ │ │ -0000a570: 436f 6f72 6473 2069 7320 736f 6d65 7768 Coords is somewh │ │ │ │ -0000a580: 6174 2061 6275 7369 6e67 2076 6572 7465 at abusing verte │ │ │ │ -0000a590: 7820 7072 696d 7661 7220 6275 6666 6572 x primvar buffer │ │ │ │ -0000a5a0: 2069 6e74 6572 6f70 2e3c 2f73 7061 6e3e interop. │ │ │ │ -0000a5b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000a600: 2035 3332 3c2f 7370 616e 3e20 2020 2020 532 │ │ │ │ -0000a610: 2020 203c 7370 616e 2063 6c61 7373 3d22 // │ │ │ │ -0000a630: 2069 6465 616c 6c79 2061 6c6c 2062 7566 ideally all buf │ │ │ │ -0000a640: 6665 7220 636c 6173 7365 7320 7368 6f75 fer classes shou │ │ │ │ -0000a650: 6c64 2068 6176 6520 7465 6d70 6c61 7465 ld have template │ │ │ │ -0000a660: 6420 6279 2064 6174 6174 7970 653c 2f73 d by datatype
    .
    533 │ │ │ │ -0000a6d0: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -0000a6f0: 2020 2020 2073 6f20 7468 6174 2064 6f77 so that dow │ │ │ │ -0000a700: 6e63 6173 7420 6973 6e26 2333 393b 7420 ncast isn't │ │ │ │ -0000a710: 6e65 6564 6564 2074 6865 7265 2e3c 2f73 needed there.
    .
    534 │ │ │ │ -0000a780: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -0000a7a0: 2020 2020 2028 652e 672e 204f 7364 3a3a (e.g. Osd:: │ │ │ │ -0000a7b0: 4370 7542 7566 6665 7226 6c74 3b50 6174 CpuBuffer<Pat │ │ │ │ -0000a7c0: 6368 436f 6f72 6426 6774 3b20 293c 2f73 chCoord> )
    .
    535 │ │ │ │ -0000a830: 2020 2020 2020 203c 7370 616e 2063 6c61 //< │ │ │ │ -0000a850: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0000a870: 6120 6964 3d22 6c30 3035 3336 2220 6e61 a id="l00536" na │ │ │ │ -0000a880: 6d65 3d22 6c30 3035 3336 223e 3c2f 613e me="l00536"> │ │ │ │ -0000a890: 3c73 7061 6e20 636c 6173 733d 226c 696e 536 return │ │ │ │ -0000a8e0: 203c 6120 636c 6173 733d 2263 6f64 6520 EvalPatches(srcBuffer-> │ │ │ │ -0000a950: 4269 6e64 4370 7542 7566 6665 7228 292c BindCpuBuffer(), │ │ │ │ -0000a960: 2073 7263 4465 7363 2c3c 2f64 6976 3e0a srcDesc,
    . │ │ │ │ -0000a970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ -0000aa20: 6120 6964 3d22 6c30 3035 3338 2220 6e61 a id="l00538" na │ │ │ │ -0000aa30: 6d65 3d22 6c30 3035 3338 223e 3c2f 613e me="l00538"> │ │ │ │ -0000aa40: 3c73 7061 6e20 636c 6173 733d 226c 696e 538 │ │ │ │ -0000aa70: 2020 2020 2020 2020 2020 2020 6475 4275 duBu │ │ │ │ -0000aa80: 6666 6572 2d26 6774 3b42 696e 6443 7075 ffer->BindCpu │ │ │ │ -0000aa90: 4275 6666 6572 2829 2c20 2064 7544 6573 Buffer(), duDes │ │ │ │ -0000aaa0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    539 │ │ │ │ -0000ab00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000ab10: 2020 2020 2020 2020 6476 4275 6666 6572 dvBuffer │ │ │ │ -0000ab20: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -0000ab30: 6572 2829 2c20 2064 7644 6573 632c 3c2f er(), dvDesc,.
    5 │ │ │ │ -0000ab90: 3430 3c2f 7370 616e 3e20 2020 2020 2020 40 │ │ │ │ -0000aba0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000abb0: 2020 2020 6e75 6d50 6174 6368 436f 6f72 numPatchCoor │ │ │ │ -0000abc0: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    541 │ │ │ │ -0000ac20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000ac30: 2020 2020 2020 2020 2028 3c73 7061 6e20 ( │ │ │ │ -0000ac50: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const PatchC │ │ │ │ -0000ac90: 6f6f 7264 3c2f 613e 2a29 7061 7463 6843 oord*)patchC │ │ │ │ -0000aca0: 6f6f 7264 732d 2667 743b 4269 6e64 4370 oords->BindCp │ │ │ │ -0000acb0: 7542 7566 6665 7228 292c 3c2f 6469 763e uBuffer(),
    │ │ │ │ -0000acc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000acf0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 542 │ │ │ │ -0000ad20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000ad30: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ -0000ad40: 6574 5061 7463 6841 7272 6179 4275 6666 etPatchArrayBuff │ │ │ │ -0000ad50: 6572 2829 2c3c 2f64 6976 3e0a 3c64 6976 er(),
    .
    < │ │ │ │ -0000ad90: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000ada0: 6e6f 223e 2020 3534 333c 2f73 7061 6e3e no"> 543 │ │ │ │ -0000adb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000adc0: 2020 2020 2020 2020 2020 2070 6174 6368 patch │ │ │ │ -0000add0: 5461 626c 652d 2667 743b 4765 7450 6174 Table->GetPat │ │ │ │ -0000ade0: 6368 496e 6465 7842 7566 6665 7228 292c chIndexBuffer(), │ │ │ │ -0000adf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000ae40: 2035 3434 3c2f 7370 616e 3e20 2020 2020 544 │ │ │ │ -0000ae50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000ae60: 2020 2020 2020 7061 7463 6854 6162 6c65 patchTable │ │ │ │ -0000ae70: 2d26 6774 3b47 6574 5061 7463 6850 6172 ->GetPatchPar │ │ │ │ -0000ae80: 616d 4275 6666 6572 2829 293b 3c2f 6469 amBuffer());.
    545 │ │ │ │ -0000aee0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    546 < │ │ │ │ -0000af50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000afa0: 3630 353c 2f73 7061 6e3e 2020 2020 3c73 605 template <ty │ │ │ │ -0000aff0: 7065 6e61 6d65 3c2f 7370 616e 3e20 5352 pename SR │ │ │ │ -0000b000: 435f 4255 4646 4552 2c20 3c73 7061 6e20 C_BUFFER, │ │ │ │ -0000b020: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -0000b030: 4453 545f 4255 4646 4552 2c3c 2f64 6976 DST_BUFFER,
    .
    606< │ │ │ │ -0000b090: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -0000b0a0: 2020 2020 3c73 7061 6e20 636c 6173 733d typena │ │ │ │ -0000b0c0: 6d65 3c2f 7370 616e 3e20 5041 5443 4843 me PATCHC │ │ │ │ -0000b0d0: 4f4f 5244 5f42 5546 4645 522c 203c 7370 OORD_BUFFER, typename PATCH_TABLE&g │ │ │ │ -0000b110: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    .< │ │ │ │ -0000b160: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000b170: 3e3c 6120 6964 3d22 6c30 3036 3037 2220 > 60 │ │ │ │ -0000b1f0: 373c 2f61 3e3c 2f73 7061 6e3e 2020 2020 7 │ │ │ │ -0000b200: 3c73 7061 6e20 636c 6173 733d 226b 6579 static bo │ │ │ │ -0000b240: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol EvalP │ │ │ │ -0000b2a0: 6174 6368 6573 3c2f 613e 283c 2f64 6976 atches(
    .
    608< │ │ │ │ -0000b300: 2f73 7061 6e3e 2020 2020 2020 2020 5352 /span> SR │ │ │ │ -0000b310: 435f 4255 4646 4552 202a 7372 6342 7566 C_BUFFER *srcBuf │ │ │ │ -0000b320: 6665 722c 203c 6120 636c 6173 733d 2263 fer, BufferDescript │ │ │ │ -0000b360: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ -0000b380: 7374 3c2f 7370 616e 3e20 2661 6d70 3b73 st &s │ │ │ │ -0000b390: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ -0000b3b0: 3c61 2069 643d 226c 3030 3630 3922 206e 609 DST_BU │ │ │ │ -0000b400: 4646 4552 202a 6473 7442 7566 6665 722c FFER *dstBuffer, │ │ │ │ -0000b410: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -0000b440: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dstDe │ │ │ │ -0000b480: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    610 │ │ │ │ -0000b4e0: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ -0000b4f0: 202a 6475 4275 6666 6572 2c20 203c 6120 *duBuffer, Buffer │ │ │ │ -0000b530: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -0000b540: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000b550: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &duDesc,.
    6 │ │ │ │ -0000b5c0: 3131 3c2f 7370 616e 3e20 2020 2020 2020 11 │ │ │ │ -0000b5d0: 2044 5354 5f42 5546 4645 5220 2a64 7642 DST_BUFFER *dvB │ │ │ │ -0000b5e0: 7566 6665 722c 2020 3c61 2063 6c61 7373 uffer, BufferDescr │ │ │ │ -0000b620: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ -0000b640: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ -0000b650: 703b 6476 4465 7363 2c3c 2f64 6976 3e0a p;dvDesc,
    . │ │ │ │ -0000b660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -0000b780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000b790: 6e6f 223e 2020 3631 333c 2f73 7061 6e3e no"> 613 │ │ │ │ -0000b7a0: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ -0000b7b0: 4552 202a 6475 7642 7566 6665 722c 203c ER *duvBuffer, < │ │ │ │ -0000b7c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000b7d0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -0000b7e0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ -0000b7f0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ -0000b800: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duvDesc │ │ │ │ -0000b830: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000b880: 2020 3631 343c 2f73 7061 6e3e 2020 2020 614 │ │ │ │ -0000b890: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ -0000b8a0: 6476 7642 7566 6665 722c 203c 6120 636c dvvBuffer, BufferDe │ │ │ │ -0000b8e0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ -0000b910: 2661 6d70 3b64 7676 4465 7363 2c3c 2f64 &dvvDesc,.
    61 │ │ │ │ -0000b970: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ │ -0000b980: 3c73 7061 6e20 636c 6173 733d 226b 6579 int numPatchCoo │ │ │ │ -0000b9b0: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    616 │ │ │ │ -0000ba10: 2020 2020 2020 2050 4154 4348 434f 4f52 PATCHCOOR │ │ │ │ -0000ba20: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ -0000ba30: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ -0000ba50: 6120 6964 3d22 6c30 3036 3137 2220 6e61 a id="l00617" na │ │ │ │ -0000ba60: 6d65 3d22 6c30 3036 3137 223e 3c2f 613e me="l00617"> │ │ │ │ -0000ba70: 3c73 7061 6e20 636c 6173 733d 226c 696e 617 PATCH_T │ │ │ │ -0000baa0: 4142 4c45 202a 7061 7463 6854 6162 6c65 ABLE *patchTable │ │ │ │ -0000bab0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000bb00: 2020 3631 383c 2f73 7061 6e3e 2020 2020 618 │ │ │ │ -0000bb10: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ -0000bb40: 4370 7545 7661 6c75 6174 6f72 3c2f 613e CpuEvaluator │ │ │ │ -0000bb50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const *instance = │ │ │ │ -0000bb80: 4e55 4c4c 2c3c 2f64 6976 3e0a 3c64 6976 NULL,
    .
    < │ │ │ │ -0000bbc0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000bbd0: 6e6f 223e 2020 3631 393c 2f73 7061 6e3e no"> 619 │ │ │ │ -0000bbe0: 2020 2020 2020 2020 3c73 7061 6e20 636c void * │ │ │ │ -0000bc10: 6465 7669 6365 436f 6e74 6578 7420 3d20 deviceContext = │ │ │ │ -0000bc20: 4e55 4c4c 2920 7b3c 2f64 6976 3e0a 3c64 NULL) {
    . │ │ │ │ -0000bc40: 3c61 2069 643d 226c 3030 3632 3022 206e 620
    .
    621 │ │ │ │ -0000bce0: 2020 2020 2020 2876 6f69 6429 696e 7374 (void)inst │ │ │ │ -0000bcf0: 616e 6365 3b20 2020 2020 2020 3c73 7061 ance; // unused
    .
    622 │ │ │ │ -0000bd80: 2020 2020 2028 766f 6964 2964 6576 6963 (void)devic │ │ │ │ -0000bd90: 6543 6f6e 7465 7874 3b20 203c 7370 616e eContext; // unused
    .
    │ │ │ │ -0000be10: 2020 3632 333c 2f73 7061 6e3e 203c 2f64 623 .
    62 │ │ │ │ -0000be70: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ -0000be80: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // XXX: Pa │ │ │ │ -0000bea0: 7463 6843 6f6f 7264 7320 6973 2073 6f6d tchCoords is som │ │ │ │ -0000beb0: 6577 6861 7420 6162 7573 696e 6720 7665 ewhat abusing ve │ │ │ │ -0000bec0: 7274 6578 2070 7269 6d76 6172 2062 7566 rtex primvar buf │ │ │ │ -0000bed0: 6665 7220 696e 7465 726f 702e 3c2f 7370 fer interop.
    .
    625 │ │ │ │ -0000bf40: 2020 2020 2020 3c73 7061 6e20 636c 6173 // │ │ │ │ -0000bf60: 2020 2020 6964 6561 6c6c 7920 616c 6c20 ideally all │ │ │ │ -0000bf70: 6275 6666 6572 2063 6c61 7373 6573 2073 buffer classes s │ │ │ │ -0000bf80: 686f 756c 6420 6861 7665 2074 656d 706c hould have templ │ │ │ │ -0000bf90: 6174 6564 2062 7920 6461 7461 7479 7065 ated by datatype │ │ │ │ -0000bfa0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000bfc0: 3c61 2069 643d 226c 3030 3632 3622 206e 626 │ │ │ │ -0000c020: 2f2f 2020 2020 2020 736f 2074 6861 7420 // so that │ │ │ │ -0000c030: 646f 776e 6361 7374 2069 736e 2623 3339 downcast isn' │ │ │ │ -0000c040: 3b74 206e 6565 6465 6420 7468 6572 652e ;t needed there. │ │ │ │ -0000c050: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000c070: 3c61 2069 643d 226c 3030 3632 3722 206e 627 │ │ │ │ -0000c0d0: 2f2f 2020 2020 2020 2865 2e67 2e20 4f73 // (e.g. Os │ │ │ │ -0000c0e0: 643a 3a43 7075 4275 6666 6572 266c 743b d::CpuBuffer< │ │ │ │ -0000c0f0: 5061 7463 6843 6f6f 7264 2667 743b 2029 PatchCoord> ) │ │ │ │ -0000c100: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0000c120: 3c61 2069 643d 226c 3030 3632 3822 206e 628 │ │ │ │ -0000c180: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    . │ │ │ │ -0000c190: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0000c1c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 629 return EvalPatches │ │ │ │ -0000c270: 3c2f 613e 2873 7263 4275 6666 6572 2d26 (srcBuffer-& │ │ │ │ -0000c280: 6774 3b42 696e 6443 7075 4275 6666 6572 gt;BindCpuBuffer │ │ │ │ -0000c290: 2829 2c20 7372 6344 6573 632c 3c2f 6469 (), srcDesc,.
    630 │ │ │ │ -0000c2f0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -0000c300: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c310: 2020 6473 7442 7566 6665 722d 2667 743b dstBuffer-> │ │ │ │ -0000c320: 4269 6e64 4370 7542 7566 6665 7228 292c BindCpuBuffer(), │ │ │ │ -0000c330: 2064 7374 4465 7363 2c3c 2f64 6976 3e0a dstDesc,
    . │ │ │ │ -0000c340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -0000c410: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000c420: 6e6f 223e 2020 3633 323c 2f73 7061 6e3e no"> 632 │ │ │ │ -0000c430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c440: 2020 2020 2020 2020 2020 2064 7642 7566 dvBuf │ │ │ │ -0000c450: 6665 722d 2667 743b 4269 6e64 4370 7542 fer->BindCpuB │ │ │ │ -0000c460: 7566 6665 7228 292c 2020 6476 4465 7363 uffer(), dvDesc │ │ │ │ -0000c470: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000c4c0: 2020 3633 333c 2f73 7061 6e3e 2020 2020 633 │ │ │ │ -0000c4d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c4e0: 2020 2020 2020 2064 7575 4275 6666 6572 duuBuffer │ │ │ │ -0000c4f0: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -0000c500: 6572 2829 2c20 6475 7544 6573 632c 3c2f er(), duuDesc,.
    6 │ │ │ │ -0000c560: 3334 3c2f 7370 616e 3e20 2020 2020 2020 34 │ │ │ │ -0000c570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c580: 2020 2020 6475 7642 7566 6665 722d 2667 duvBuffer-&g │ │ │ │ -0000c590: 743b 4269 6e64 4370 7542 7566 6665 7228 t;BindCpuBuffer( │ │ │ │ -0000c5a0: 292c 2064 7576 4465 7363 2c3c 2f64 6976 ), duvDesc,
    .
    635< │ │ │ │ -0000c600: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -0000c610: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c620: 2064 7676 4275 6666 6572 2d26 6774 3b42 dvvBuffer->B │ │ │ │ -0000c630: 696e 6443 7075 4275 6666 6572 2829 2c20 indCpuBuffer(), │ │ │ │ -0000c640: 6476 7644 6573 632c 3c2f 6469 763e 0a3c dvvDesc,
    .< │ │ │ │ -0000c650: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000c660: 3e3c 6120 6964 3d22 6c30 3036 3336 2220 > 636 │ │ │ │ -0000c6b0: 2020 2020 2020 2020 2020 2020 2020 6e75 nu │ │ │ │ -0000c6c0: 6d50 6174 6368 436f 6f72 6473 2c3c 2f64 mPatchCoords,.
    63 │ │ │ │ -0000c720: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ │ -0000c730: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c740: 2020 2028 3c73 7061 6e20 636c 6173 733d (const< │ │ │ │ -0000c760: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> PatchCoord*)patchCoords- │ │ │ │ -0000c7b0: 2667 743b 4269 6e64 4370 7542 7566 6665 >BindCpuBuffe │ │ │ │ -0000c7c0: 7228 292c 3c2f 6469 763e 0a3c 6469 7620 r(),
    .
    638 │ │ │ │ -0000c820: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c830: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ -0000c840: 6162 6c65 2d26 6774 3b47 6574 5061 7463 able->GetPatc │ │ │ │ -0000c850: 6841 7272 6179 4275 6666 6572 2829 2c3c hArrayBuffer(),< │ │ │ │ -0000c860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000c8b0: 3633 393c 2f73 7061 6e3e 2020 2020 2020 639 │ │ │ │ -0000c8c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c8d0: 2020 2020 2070 6174 6368 5461 626c 652d patchTable- │ │ │ │ -0000c8e0: 2667 743b 4765 7450 6174 6368 496e 6465 >GetPatchInde │ │ │ │ -0000c8f0: 7842 7566 6665 7228 292c 3c2f 6469 763e xBuffer(),
    │ │ │ │ -0000c900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000c930: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 640 │ │ │ │ -0000c960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000c970: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ -0000c980: 6574 5061 7463 6850 6172 616d 4275 6666 etPatchParamBuff │ │ │ │ -0000c990: 6572 2829 293b 3c2f 6469 763e 0a3c 6469 er());
    .< │ │ │ │ -0000c9b0: 6120 6964 3d22 6c30 3036 3431 2220 6e61 a id="l00641" na │ │ │ │ -0000c9c0: 6d65 3d22 6c30 3036 3431 223e 3c2f 613e me="l00641"> │ │ │ │ -0000c9d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 641 }
    ..
    64 │ │ │ │ -0000ca50: 323c 2f73 7061 6e3e 203c 2f64 6976 3e0a 2
    . │ │ │ │ -0000ca60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0000ca90: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 6 │ │ │ │ -0000caf0: 3730 3c2f 613e 3c2f 7370 616e 3e20 2020 70 │ │ │ │ -0000cb00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 static b │ │ │ │ -0000cb40: 6f6f 6c3c 2f73 7061 6e3e 203c 6120 636c ool Eval │ │ │ │ -0000cba0: 5061 7463 6865 733c 2f61 3e28 3c2f 6469 Patches(.
    671 │ │ │ │ -0000cc00: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -0000cc10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000cc20: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const floa │ │ │ │ -0000cc50: 743c 2f73 7061 6e3e 202a 7372 632c 203c t *src, < │ │ │ │ -0000cc60: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000cc70: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -0000cc80: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ -0000cc90: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ -0000cca0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &srcDesc │ │ │ │ -0000ccd0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000cd20: 2020 3637 323c 2f73 7061 6e3e 2020 2020 672 │ │ │ │ -0000cd30: 2020 2020 3c73 7061 6e20 636c 6173 733d fl │ │ │ │ -0000cd50: 6f61 743c 2f73 7061 6e3e 202a 6473 742c oat *dst, │ │ │ │ -0000cd60: 2020 2020 2020 203c 6120 636c 6173 733d BufferDescri │ │ │ │ -0000cda0: 7074 6f72 3c2f 613e 203c 7370 616e 2063 ptor c │ │ │ │ -0000cdc0: 6f6e 7374 3c2f 7370 616e 3e20 2661 6d70 onst & │ │ │ │ -0000cdd0: 3b64 7374 4465 7363 2c3c 2f64 6976 3e0a ;dstDesc,
    . │ │ │ │ -0000cde0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ -0000cec0: 2036 3734 3c2f 7370 616e 3e20 2020 2020 674 │ │ │ │ -0000ced0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const PatchCoord *patchCoords,< │ │ │ │ -0000cf40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000cf90: 3637 353c 2f73 7061 6e3e 2020 2020 2020 675 │ │ │ │ -0000cfa0: 2020 3c73 7061 6e20 636c 6173 733d 226b const PatchArray │ │ │ │ -0000d000: 202a 7061 7463 6841 7272 6179 732c 3c2f *patchArrays,.
    6 │ │ │ │ -0000d060: 3736 3c2f 7370 616e 3e20 2020 2020 2020 76 │ │ │ │ -0000d070: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const in │ │ │ │ -0000d0b0: 743c 2f73 7061 6e3e 202a 7061 7463 6849 t *patchI │ │ │ │ -0000d0c0: 6e64 6578 4275 6666 6572 2c3c 2f64 6976 ndexBuffer,
    .
    677< │ │ │ │ -0000d120: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> const │ │ │ │ -0000d150: 203c 6120 636c 6173 733d 2263 6f64 6520 Pa │ │ │ │ -0000d180: 7463 6850 6172 616d 3c2f 613e 202a 7061 tchParam *pa │ │ │ │ -0000d190: 7463 6850 6172 616d 4275 6666 6572 293b tchParamBuffer); │ │ │ │ -0000d1a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000d1f0: 2036 3738 3c2f 7370 616e 3e20 3c2f 6469 678 .
    │ │ │ │ -0000d290: 2020 3731 363c 2f61 3e3c 2f73 7061 6e3e 716 │ │ │ │ -0000d2a0: 2020 2020 3c73 7061 6e20 636c 6173 733d static │ │ │ │ -0000d2c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c bool E │ │ │ │ -0000d340: 7661 6c50 6174 6368 6573 3c2f 613e 283c valPatches(< │ │ │ │ -0000d350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000d3a0: 3731 373c 2f73 7061 6e3e 2020 2020 2020 717 │ │ │ │ -0000d3b0: 2020 3c73 7061 6e20 636c 6173 733d 226b const f │ │ │ │ -0000d3f0: 6c6f 6174 3c2f 7370 616e 3e20 2a73 7263 loat *src │ │ │ │ -0000d400: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ -0000d430: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ -0000d440: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ -0000d460: 2f73 7061 6e3e 2026 616d 703b 7372 6344 /span> &srcD │ │ │ │ -0000d470: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    718 │ │ │ │ -0000d4d0: 2020 2020 2020 203c 7370 616e 2063 6c61 float *d │ │ │ │ -0000d500: 7374 2c20 2020 2020 2020 3c61 2063 6c61 st, BufferDes │ │ │ │ -0000d540: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ -0000d570: 616d 703b 6473 7444 6573 632c 3c2f 6469 amp;dstDesc,.
    719 │ │ │ │ -0000d5d0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -0000d5e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000d5f0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype">float *du, │ │ │ │ -0000d610: 2020 3c61 2063 6c61 7373 3d22 636f 6465 B │ │ │ │ -0000d640: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ -0000d650: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ -0000d670: 2f73 7061 6e3e 2026 616d 703b 6475 4465 /span> &duDe │ │ │ │ -0000d680: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    720 │ │ │ │ -0000d6e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -0000d700: 666c 6f61 743c 2f73 7061 6e3e 202a 6476 float *dv │ │ │ │ -0000d710: 2c20 2020 2020 2020 203c 6120 636c 6173 , BufferDesc │ │ │ │ -0000d750: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -0000d780: 6d70 3b64 7644 6573 632c 3c2f 6469 763e mp;dvDesc,
    │ │ │ │ -0000d790: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000d7c0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 721 int numPatchCoords │ │ │ │ -0000d820: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000d870: 2020 3732 323c 2f73 7061 6e3e 2020 2020 722 │ │ │ │ -0000d880: 2020 2020 3c61 2063 6c61 7373 3d22 636f PatchCoord │ │ │ │ -0000d8c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const *patchCoords, │ │ │ │ -0000d8f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000d940: 2037 3233 3c2f 7370 616e 3e20 2020 2020 723 │ │ │ │ -0000d950: 2020 203c 6120 636c 6173 733d 2263 6f64 │ │ │ │ -0000d980: 5061 7463 6841 7272 6179 3c2f 613e 203c PatchArray < │ │ │ │ -0000d990: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000d9a0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const *patchArrays,< │ │ │ │ -0000d9c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000da10: 3732 343c 2f73 7061 6e3e 2020 2020 2020 724 │ │ │ │ -0000da20: 2020 3c73 7061 6e20 636c 6173 733d 226b const i │ │ │ │ -0000da60: 6e74 3c2f 7370 616e 3e20 2a70 6174 6368 nt *patch │ │ │ │ -0000da70: 496e 6465 7842 7566 6665 722c 3c2f 6469 IndexBuffer,.
    725 │ │ │ │ -0000dad0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -0000dae0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000daf0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -0000db00: 3031 3332 312e 6874 6d6c 223e 5061 7463 01321.html">Patc │ │ │ │ -0000db10: 6850 6172 616d 3c2f 613e 203c 7370 616e hParam const *p │ │ │ │ -0000db40: 6174 6368 5061 7261 6d42 7566 6665 7229 atchParamBuffer) │ │ │ │ -0000db50: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0000dba0: 2020 3732 363c 2f73 7061 6e3e 203c 2f64 726 .
    779 stati │ │ │ │ -0000dc70: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c bool < │ │ │ │ -0000dca0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000dcb0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ -0000dcc0: 2261 3031 3135 372e 6874 6d6c 2361 3762 "a01157.html#a7b │ │ │ │ -0000dcd0: 3535 3631 3438 6436 6566 3265 3034 6662 556148d6ef2e04fb │ │ │ │ -0000dce0: 6539 3936 3737 6533 6138 3765 3931 223e e99677e3a87e91"> │ │ │ │ -0000dcf0: 4576 616c 5061 7463 6865 733c 2f61 3e28 EvalPatches( │ │ │ │ -0000dd00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000dd50: 2037 3830 3c2f 7370 616e 3e20 2020 2020 780 │ │ │ │ -0000dd60: 2020 203c 7370 616e 2063 6c61 7373 3d22 const │ │ │ │ -0000dda0: 666c 6f61 743c 2f73 7061 6e3e 202a 7372 float *sr │ │ │ │ -0000ddb0: 632c 203c 6120 636c 6173 733d 2263 6f64 c, │ │ │ │ -0000dde0: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ -0000ddf0: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ -0000de10: 3c2f 7370 616e 3e20 2661 6d70 3b73 7263 &src │ │ │ │ -0000de20: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ -0000de60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000de70: 6e6f 223e 2020 3738 313c 2f73 7061 6e3e no"> 781 │ │ │ │ -0000de80: 2020 2020 2020 2020 3c73 7061 6e20 636c float * │ │ │ │ -0000deb0: 6473 742c 2020 2020 2020 203c 6120 636c dst, BufferDe │ │ │ │ -0000def0: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ -0000df20: 2661 6d70 3b64 7374 4465 7363 2c3c 2f64 &dstDesc,.
    78 │ │ │ │ -0000df80: 323c 2f73 7061 6e3e 2020 2020 2020 2020 2 │ │ │ │ -0000df90: 3c73 7061 6e20 636c 6173 733d 226b 6579 float< │ │ │ │ -0000dfb0: 2f73 7061 6e3e 202a 6475 2c20 2020 2020 /span> *du, │ │ │ │ -0000dfc0: 2020 203c 6120 636c 6173 733d 2263 6f64 │ │ │ │ -0000dff0: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ -0000e000: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ -0000e020: 3c2f 7370 616e 3e20 2661 6d70 3b64 7544 &duD │ │ │ │ -0000e030: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    783 │ │ │ │ -0000e090: 2020 2020 2020 203c 7370 616e 2063 6c61 float *d │ │ │ │ -0000e0c0: 762c 2020 2020 2020 2020 3c61 2063 6c61 v, BufferDes │ │ │ │ -0000e100: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ -0000e130: 616d 703b 6476 4465 7363 2c3c 2f64 6976 amp;dvDesc,
    .
    784< │ │ │ │ -0000e190: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> float *duu, │ │ │ │ -0000e1d0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -0000e200: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &duuDe │ │ │ │ -0000e240: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    785 │ │ │ │ -0000e2a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -0000e2c0: 666c 6f61 743c 2f73 7061 6e3e 202a 6475 float *du │ │ │ │ -0000e2d0: 762c 2020 2020 2020 203c 6120 636c 6173 v, BufferDesc │ │ │ │ -0000e310: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -0000e340: 6d70 3b64 7576 4465 7363 2c3c 2f64 6976 mp;duvDesc,
    .
    786< │ │ │ │ -0000e3a0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> float *dvv, │ │ │ │ -0000e3e0: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -0000e410: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dvvDe │ │ │ │ -0000e450: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    787 │ │ │ │ -0000e4b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -0000e4d0: 696e 743c 2f73 7061 6e3e 206e 756d 5061 int numPa │ │ │ │ -0000e4e0: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ -0000e4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000e520: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 788 PatchC │ │ │ │ -0000e580: 6f6f 7264 3c2f 613e 203c 7370 616e 2063 oord c │ │ │ │ -0000e5a0: 6f6e 7374 3c2f 7370 616e 3e20 2a70 6174 onst *pat │ │ │ │ -0000e5b0: 6368 436f 6f72 6473 2c3c 2f64 6976 3e0a chCoords,
    . │ │ │ │ -0000e5c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -0000e5f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 789 PatchAr │ │ │ │ -0000e650: 7261 793c 2f61 3e20 3c73 7061 6e20 636c ray co │ │ │ │ -0000e670: 6e73 743c 2f73 7061 6e3e 202a 7061 7463 nst *patc │ │ │ │ -0000e680: 6841 7272 6179 732c 3c2f 6469 763e 0a3c hArrays,
    .< │ │ │ │ -0000e690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000e6a0: 3e3c 6120 6964 3d22 6c30 3037 3930 2220 > 790
    const int *patchIndexBu │ │ │ │ -0000e740: 6666 6572 2c3c 2f64 6976 3e0a 3c64 6976 ffer,
    .
    < │ │ │ │ -0000e780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000e790: 6e6f 223e 2020 3739 313c 2f73 7061 6e3e no"> 791 │ │ │ │ -0000e7a0: 2020 2020 2020 2020 3c61 2063 6c61 7373 PatchParam< │ │ │ │ -0000e7e0: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ -0000e800: 2f73 7061 6e3e 202a 7061 7463 6850 6172 /span> *patchPar │ │ │ │ -0000e810: 616d 4275 6666 6572 293b 3c2f 6469 763e amBuffer);
    │ │ │ │ -0000e820: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -0000e890: 6120 6964 3d22 6c30 3038 3231 2220 6e61 a id="l00821" na │ │ │ │ -0000e8a0: 6d65 3d22 6c30 3038 3231 223e 3c2f 613e me="l00821"> │ │ │ │ -0000e8b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 821 templ │ │ │ │ -0000e8f0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ -0000e900: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000e910: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    SRC_BUFFER, │ │ │ │ -0000e930: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ -0000e950: 2f73 7061 6e3e 2044 5354 5f42 5546 4645 /span> DST_BUFFE │ │ │ │ -0000e960: 522c 3c2f 6469 763e 0a3c 6469 7620 636c R,
    .
    822 │ │ │ │ -0000e9c0: 2020 2020 2020 2020 2020 203c 7370 616e typename │ │ │ │ -0000e9f0: 2050 4154 4348 434f 4f52 445f 4255 4646 PATCHCOORD_BUFF │ │ │ │ -0000ea00: 4552 2c20 3c73 7061 6e20 636c 6173 733d ER, typena │ │ │ │ -0000ea20: 6d65 3c2f 7370 616e 3e20 5041 5443 485f me PATCH_ │ │ │ │ -0000ea30: 5441 424c 4526 6774 3b3c 2f64 6976 3e0a TABLE>
    . │ │ │ │ -0000ea40: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    823 sta │ │ │ │ -0000eb40: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic bool │ │ │ │ -0000eb70: 203c 6120 636c 6173 733d 2263 6f64 6520 EvalPatchesVar │ │ │ │ -0000ebd0: 7969 6e67 3c2f 613e 283c 2f64 6976 3e0a ying(
    . │ │ │ │ -0000ebe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -0000ed00: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000ed10: 6e6f 223e 2020 3832 353c 2f73 7061 6e3e no"> 825 │ │ │ │ -0000ed20: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ -0000ed30: 4552 202a 6473 7442 7566 6665 722c 203c ER *dstBuffer, < │ │ │ │ -0000ed40: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -0000ed50: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -0000ed60: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ -0000ed70: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ -0000ed80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dstDesc │ │ │ │ -0000edb0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000ee00: 2020 3832 363c 2f73 7061 6e3e 2020 2020 826 │ │ │ │ -0000ee10: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -0000ee30: 743c 2f73 7061 6e3e 206e 756d 5061 7463 t numPatc │ │ │ │ -0000ee40: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ +00003740: 2020 2020 2020 2020 3c61 2063 6c61 7373 Crea │ │ │ │ +000037a0: 7365 3a3a 5275 6c65 3c2f 613e 2070 6172 se::Rule par │ │ │ │ +000037b0: 656e 7452 756c 6520 3d20 3c61 2063 6c61 entRule = Cre │ │ │ │ +00003830: 6173 653a 3a52 554c 455f 554e 4b4e 4f57 ase::RULE_UNKNOW │ │ │ │ +00003840: 4e3c 2f61 3e2c 3c2f 6469 763e 0a3c 6469 N,
    .< │ │ │ │ +00003860: 6120 6964 3d22 6c30 3031 3031 2220 6e61 a id="l00101" na │ │ │ │ +00003870: 6d65 3d22 6c30 3031 3031 223e 3c2f 613e me="l00101"> │ │ │ │ +00003880: 3c73 7061 6e20 636c 6173 733d 226c 696e 101 │ │ │ │ +000038b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000038c0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ +00003920: 3c2f 613e 2063 6869 6c64 5275 6c65 203d childRule = │ │ │ │ +00003930: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::RULE │ │ │ │ +000039b0: 5f55 4e4b 4e4f 574e 3c2f 613e 2920 3c73 _UNKNOWN) const │ │ │ │ +000039e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00003a30: 2020 3130 323c 2f73 7061 6e3e 203c 2f64 102 .
    11 │ │ │ │ +00003a90: 323c 2f73 7061 6e3e 2020 2020 3c73 7061 2 template <type │ │ │ │ +00003ae0: 6e61 6d65 3c2f 7370 616e 3e20 5645 5254 name VERT │ │ │ │ +00003af0: 4558 2c20 3c73 7061 6e20 636c 6173 733d EX, typena │ │ │ │ +00003b10: 6d65 3c2f 7370 616e 3e20 4d41 534b 2667 me MASK&g │ │ │ │ +00003b20: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    ..
    114 │ │ │ │ +00003cd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00003ce0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00003cf0: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::Rul │ │ │ │ +00003d50: 653c 2f61 3e20 7061 7265 6e74 5275 6c65 e parentRule │ │ │ │ +00003d60: 203d 203c 6120 636c 6173 733d 2263 6f64 = Crease::RU │ │ │ │ +00003de0: 4c45 5f55 4e4b 4e4f 574e 3c2f 613e 2c3c LE_UNKNOWN,< │ │ │ │ +00003df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00003e40: 3131 353c 2f73 7061 6e3e 2020 2020 2020 115 │ │ │ │ +00003e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00003e60: 2020 2020 2020 2020 2020 2020 2020 3c61 Crease::Rule childRule = < │ │ │ │ +00003ee0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00003ef0: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ +00003f00: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ +00003f10: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ +00003f20: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ +00003f30: 6232 3939 6165 6662 3236 3031 3361 3739 b299aefb26013a79 │ │ │ │ +00003f40: 6435 3231 3931 6137 3838 3766 6561 3533 d52191a7887fea53 │ │ │ │ +00003f50: 223e 4372 6561 7365 3a3a 5255 4c45 5f55 ">Crease::RULE_U │ │ │ │ +00003f60: 4e4b 4e4f 574e 3c2f 613e 2920 3c73 7061 NKNOWN) const;< │ │ │ │ +00003f90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00003fe0: 3131 363c 2f73 7061 6e3e 203c 2f64 6976 116
    .
    141< │ │ │ │ +00004040: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00004060: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ +00004070: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ │ +00004090: 6d65 3c2f 7370 616e 3e20 5645 5254 4558 me VERTEX │ │ │ │ +000040a0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ │ +000040c0: 3c2f 7370 616e 3e20 4d41 534b 2667 743b MASK> │ │ │ │ +000040d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00004120: 2031 3432 3c2f 7370 616e 3e20 2020 203c 142 < │ │ │ │ +00004130: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00004140: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void ComputeVer │ │ │ │ +000041b0: 7465 784c 696d 6974 4d61 736b 3c2f 613e texLimitMask │ │ │ │ +000041c0: 2856 4552 5445 5820 3c73 7061 6e20 636c (VERTEX co │ │ │ │ +000041e0: 6e73 743c 2f73 7061 6e3e 2661 6d70 3b20 nst& │ │ │ │ +000041f0: 7665 7274 6578 4e65 6967 6862 6f72 686f vertexNeighborho │ │ │ │ +00004200: 6f64 2c20 4d41 534b 2661 6d70 3b20 706f od, MASK& po │ │ │ │ +00004210: 7369 7469 6f6e 4d61 736b 2c3c 2f64 6976 sitionMask,
    .
    143< │ │ │ │ +00004270: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00004280: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00004290: 2020 2020 2020 3c61 2063 6c61 7373 3d22 Crease │ │ │ │ +000042f0: 3a3a 5275 6c65 3c2f 613e 2076 6572 7465 ::Rule verte │ │ │ │ +00004300: 7852 756c 6529 203c 7370 616e 2063 6c61 xRule) con │ │ │ │ +00004320: 7374 3c2f 7370 616e 3e3b 3c2f 6469 763e st;
    │ │ │ │ +00004330: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +000043a0: 6120 6964 3d22 6c30 3031 3435 2220 6e61 a id="l00145" na │ │ │ │ +000043b0: 6d65 3d22 6c30 3031 3435 223e 3c2f 613e me="l00145"> │ │ │ │ +000043c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 145 templ │ │ │ │ +00004400: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +00004410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00004420: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename VERTEX, typename MASK>
    .
    146< │ │ │ │ +000044c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ +000044f0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 ComputeVertexLi │ │ │ │ +00004550: 6d69 744d 6173 6b3c 2f61 3e28 5645 5254 mitMask(VERT │ │ │ │ +00004560: 4558 203c 7370 616e 2063 6c61 7373 3d22 EX const& verte │ │ │ │ +00004590: 784e 6569 6768 626f 7268 6f6f 642c 204d xNeighborhood, M │ │ │ │ +000045a0: 4153 4b26 616d 703b 2070 6f73 6974 696f ASK& positio │ │ │ │ +000045b0: 6e4d 6173 6b2c 3c2f 6469 763e 0a3c 6469 nMask,
    .< │ │ │ │ +000045d0: 6120 6964 3d22 6c30 3031 3437 2220 6e61 a id="l00147" na │ │ │ │ +000045e0: 6d65 3d22 6c30 3031 3437 223e 3c2f 613e me="l00147"> │ │ │ │ +000045f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 147 │ │ │ │ +00004620: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00004630: 204d 4153 4b26 616d 703b 2074 616e 6765 MASK& tange │ │ │ │ +00004640: 6e74 314d 6173 6b2c 204d 4153 4b26 616d nt1Mask, MASK&am │ │ │ │ +00004650: 703b 2074 616e 6765 6e74 324d 6173 6b2c p; tangent2Mask, │ │ │ │ +00004660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000046b0: 2031 3438 3c2f 7370 616e 3e20 2020 2020 148 │ │ │ │ +000046c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000046d0: 2020 2020 2020 2020 2020 203c 6120 636c C │ │ │ │ +00004730: 7265 6173 653a 3a52 756c 653c 2f61 3e20 rease::Rule │ │ │ │ +00004740: 7665 7274 6578 5275 6c65 2920 3c73 7061 vertexRule) const;< │ │ │ │ +00004770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000047c0: 3134 393c 2f73 7061 6e3e 203c 2f64 6976 149
    .
    150< │ │ │ │ +00004820: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00004840: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    . │ │ │ │ +00004850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00004950: 2020 3135 323c 2f73 7061 6e3e 2020 2020 152 │ │ │ │ +00004960: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +00004980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..< │ │ │ │ +00004b20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00004b30: 3e3c 6120 6964 3d22 6c30 3031 3534 2220 > 15 │ │ │ │ +00004bb0: 343c 2f61 3e3c 2f73 7061 6e3e 2020 2020 4 │ │ │ │ +00004bc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in │ │ │ │ +00004c00: 743c 2f73 7061 6e3e 2020 203c 6120 636c t GetR │ │ │ │ +00004c60: 6567 756c 6172 4661 6365 5369 7a65 3c2f egularFaceSize();
    .. │ │ │ │ +00004df0: 3c61 2069 643d 226c 3030 3135 3622 206e 156 │ │ │ │ +00004e70: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ +00004e80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00004e90: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord">static int │ │ │ │ +00004ec0: 3c2f 7370 616e 3e20 2020 3c61 2063 6c61 GetLo │ │ │ │ +00004f20: 6361 6c4e 6569 6768 626f 7268 6f6f 6453 calNeighborhoodS │ │ │ │ +00004f30: 697a 653c 2f61 3e28 293b 3c2f 6469 763e ize();
    │ │ │ │ +00004f40: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00004fb0: 6120 6964 3d22 6c30 3031 3538 2220 6e61 a id="l00158" na │ │ │ │ +00004fc0: 6d65 3d22 6c30 3031 3538 223e 3c2f 613e me="l00158"> │ │ │ │ +00004fd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 158protected │ │ │ │ +00005010: 3c2f 7370 616e 3e3a 3c2f 6469 763e 0a3c :
    .< │ │ │ │ +00005020: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00005030: 3e3c 6120 6964 3d22 6c30 3031 3539 2220 > 159
    .
    160 │ │ │ │ +000050d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
    .
    161 │ │ │ │ +00005150: 203c 7370 616e 2063 6c61 7373 3d22 636f // Suppo │ │ │ │ +00005170: 7274 696e 6720 696e 7465 726e 616c 206d rting internal m │ │ │ │ +00005180: 6574 686f 6473 202d 2d20 6f70 7469 6f6e ethods -- option │ │ │ │ +00005190: 616c 6c79 2069 6d70 6c65 6d65 6e74 6564 ally implemented │ │ │ │ +000051a0: 2c20 6465 7065 6e64 696e 6720 6f6e 2073 , depending on s │ │ │ │ +000051b0: 7065 6369 616c 697a 6174 696f 6e3a 3c2f pecialization:
    .
    < │ │ │ │ +00005200: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00005210: 6e6f 223e 2020 3136 323c 2f73 7061 6e3e no"> 162 │ │ │ │ +00005220: 2020 2020 3c73 7061 6e20 636c 6173 733d //
    .
    163 < │ │ │ │ +000052a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000052f0: 3136 343c 2f73 7061 6e3e 2020 2020 3c73 164 // Subdivis │ │ │ │ +00005320: 696f 6e2f 7265 6669 6e65 6d65 6e74 206d ion/refinement m │ │ │ │ +00005330: 6173 6b73 202d 2d20 7477 6f20 666f 7220 asks -- two for │ │ │ │ +00005340: 6564 6765 2d76 6572 7469 6365 7320 616e edge-vertices an │ │ │ │ +00005350: 6420 7468 7265 6520 666f 7220 7665 7274 d three for vert │ │ │ │ +00005360: 6578 2d76 6572 7469 6365 733a 3c2f 7370 ex-vertices:
    .
    165 │ │ │ │ +000053d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 //
    .
    │ │ │ │ +00005440: 2020 3136 363c 2f73 7061 6e3e 2020 2020 166 │ │ │ │ +00005450: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ +00005490: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +000054a0: 4544 4745 2c20 3c73 7061 6e20 636c 6173 EDGE, type │ │ │ │ +000054c0: 6e61 6d65 3c2f 7370 616e 3e20 4d41 534b name MASK │ │ │ │ +000054d0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    167 │ │ │ │ +00005530: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ +00005550: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d assign │ │ │ │ +000055b0: 4372 6561 7365 4d61 736b 466f 7245 6467 CreaseMaskForEdg │ │ │ │ +000055c0: 653c 2f61 3e28 4544 4745 203c 7370 616e e(EDGE const&am │ │ │ │ +000055f0: 703b 2065 6467 652c 204d 4153 4b26 616d p; edge, MASK&am │ │ │ │ +00005600: 703b 206d 6173 6b29 203c 7370 616e 2063 p; mask) c │ │ │ │ +00005620: 6f6e 7374 3c2f 7370 616e 3e3b 3c2f 6469 onst;.
    168 │ │ │ │ +00005680: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ +000056b0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ +000056d0: 616d 653c 2f73 7061 6e3e 2045 4447 452c ame EDGE, │ │ │ │ +000056e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +00005700: 2f73 7061 6e3e 204d 4153 4b26 6774 3b3c /span> MASK>< │ │ │ │ +00005710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    169 void as │ │ │ │ +00005830: 7369 676e 536d 6f6f 7468 4d61 736b 466f signSmoothMaskFo │ │ │ │ +00005840: 7245 6467 653c 2f61 3e28 4544 4745 203c rEdge(EDGE < │ │ │ │ +00005850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00005860: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& edge, MAS │ │ │ │ +00005880: 4b26 616d 703b 206d 6173 6b29 203c 7370 K& mask) const; │ │ │ │ +000058b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00005900: 2031 3730 3c2f 7370 616e 3e20 3c2f 6469 170 .
    171 │ │ │ │ +00005960: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ +00005990: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ +000059b0: 616d 653c 2f73 7061 6e3e 2056 4552 5445 ame VERTE │ │ │ │ +000059c0: 582c 203c 7370 616e 2063 6c61 7373 3d22 X, typenam │ │ │ │ +000059e0: 653c 2f73 7061 6e3e 204d 4153 4b26 6774 e MASK> │ │ │ │ +000059f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00005a40: 2020 3137 323c 2f73 7061 6e3e 2020 2020 172 │ │ │ │ +00005a50: 3c73 7061 6e20 636c 6173 733d 226b 6579 void assignCor │ │ │ │ +00005ad0: 6e65 724d 6173 6b46 6f72 5665 7274 6578 nerMaskForVertex │ │ │ │ +00005ae0: 3c2f 613e 2856 4552 5445 5820 3c73 7061 (VERTEX const&a │ │ │ │ +00005b10: 6d70 3b20 6564 6765 2c20 4d41 534b 2661 mp; edge, MASK&a │ │ │ │ +00005b20: 6d70 3b20 6d61 736b 2920 3c73 7061 6e20 mp; mask) │ │ │ │ +00005b40: 636f 6e73 743c 2f73 7061 6e3e 3b3c 2f64 const;.
    17 │ │ │ │ +00005ba0: 333c 2f73 7061 6e3e 2020 2020 3c73 7061 3 template <type │ │ │ │ +00005bf0: 6e61 6d65 3c2f 7370 616e 3e20 5645 5254 name VERT │ │ │ │ +00005c00: 4558 2c20 3c73 7061 6e20 636c 6173 733d EX, typena │ │ │ │ +00005c20: 6d65 3c2f 7370 616e 3e20 4d41 534b 2667 me MASK&g │ │ │ │ +00005c30: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    174< │ │ │ │ +00005cd0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ │ +00005d00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 assignCreaseMas │ │ │ │ +00005d60: 6b46 6f72 5665 7274 6578 3c2f 613e 2856 kForVertex(V │ │ │ │ +00005d70: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ +00005d90: 743c 2f73 7061 6e3e 2661 6d70 3b20 6564 t& ed │ │ │ │ +00005da0: 6765 2c20 4d41 534b 2661 6d70 3b20 6d61 ge, MASK& ma │ │ │ │ +00005db0: 736b 2c20 3c73 7061 6e20 636c 6173 733d sk, in │ │ │ │ +00005dd0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t c │ │ │ │ +00005df0: 6f6e 7374 3c2f 7370 616e 3e20 6372 6561 onst crea │ │ │ │ +00005e00: 7365 456e 6473 5b32 5d29 203c 7370 616e seEnds[2]) const;.
    1 │ │ │ │ +00005e80: 3735 3c2f 7370 616e 3e20 2020 203c 7370 75 template <typ │ │ │ │ +00005ed0: 656e 616d 653c 2f73 7061 6e3e 2056 4552 ename VER │ │ │ │ +00005ee0: 5445 582c 203c 7370 616e 2063 6c61 7373 TEX, typen │ │ │ │ +00005f00: 616d 653c 2f73 7061 6e3e 204d 4153 4b26 ame MASK& │ │ │ │ +00005f10: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    176 │ │ │ │ +00005fb0: 3c2f 7370 616e 3e20 2020 203c 7370 616e void │ │ │ │ +00005fe0: 203c 6120 636c 6173 733d 2263 6f64 6520 assignSmoothMa │ │ │ │ +00006040: 736b 466f 7256 6572 7465 783c 2f61 3e28 skForVertex( │ │ │ │ +00006050: 5645 5254 4558 203c 7370 616e 2063 6c61 VERTEX con │ │ │ │ +00006070: 7374 3c2f 7370 616e 3e26 616d 703b 2065 st& e │ │ │ │ +00006080: 6467 652c 204d 4153 4b26 616d 703b 206d dge, MASK& m │ │ │ │ +00006090: 6173 6b29 203c 7370 616e 2063 6c61 7373 ask) const │ │ │ │ +000060b0: 3c2f 7370 616e 3e3b 3c2f 6469 763e 0a3c ;
    .< │ │ │ │ +000060c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000060d0: 3e3c 6120 6964 3d22 6c30 3031 3737 2220 > 177
    .
    178 │ │ │ │ +00006170: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
    .
    179 │ │ │ │ +000061f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // Limit │ │ │ │ +00006210: 206d 6173 6b73 2066 6f72 2070 6f73 6974 masks for posit │ │ │ │ +00006220: 696f 6e20 616e 6420 7461 6e67 656e 7473 ion and tangents │ │ │ │ +00006230: 2061 7420 7665 7274 6963 6573 202d 2d20 at vertices -- │ │ │ │ +00006240: 7468 7265 6520 6361 7365 7320 666f 7220 three cases for │ │ │ │ +00006250: 6561 6368 3a3c 2f73 7061 6e3e 3c2f 6469 each:.
    180 │ │ │ │ +000062b0: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
    │ │ │ │ +000062e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00006310: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 181 t │ │ │ │ +00006350: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ │ +00006360: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ │ +00006380: 653c 2f73 7061 6e3e 2056 4552 5445 582c e VERTEX, │ │ │ │ +00006390: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ +000063b0: 2f73 7061 6e3e 204d 4153 4b26 6774 3b3c /span> MASK>< │ │ │ │ +000063c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    182 void as │ │ │ │ +000064e0: 7369 676e 436f 726e 6572 4c69 6d69 744d signCornerLimitM │ │ │ │ +000064f0: 6173 6b3c 2f61 3e28 5645 5254 4558 203c ask(VERTEX < │ │ │ │ +00006500: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00006510: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ +00006530: 4153 4b26 616d 703b 2070 6f73 2920 3c73 ASK& pos) const │ │ │ │ +00006560: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +000065b0: 2020 3138 333c 2f73 7061 6e3e 2020 2020 183 │ │ │ │ +000065c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ +00006600: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +00006610: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ +00006630: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ +00006640: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ +00006660: 6120 6964 3d22 6c30 3031 3834 2220 6e61 a id="l00184" na │ │ │ │ +00006670: 6d65 3d22 6c30 3031 3834 223e 3c2f 613e me="l00184"> │ │ │ │ +00006680: 3c73 7061 6e20 636c 6173 733d 226c 696e 184< │ │ │ │ +000066e0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 3c73 /a> void assignCreas │ │ │ │ +00006770: 654c 696d 6974 4d61 736b 3c2f 613e 2856 eLimitMask(V │ │ │ │ +00006780: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ +000067a0: 743c 2f73 7061 6e3e 2661 6d70 3b20 7665 t& ve │ │ │ │ +000067b0: 7274 6578 2c20 4d41 534b 2661 6d70 3b20 rtex, MASK& │ │ │ │ +000067c0: 706f 732c 203c 7370 616e 2063 6c61 7373 pos, i │ │ │ │ +000067e0: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt │ │ │ │ +00006800: 636f 6e73 743c 2f73 7061 6e3e 2063 7265 const cre │ │ │ │ +00006810: 6173 6545 6e64 735b 325d 2920 3c73 7061 aseEnds[2]) const
    ;< │ │ │ │ +00006840: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00006890: 3138 353c 2f73 7061 6e3e 2020 2020 3c73 185 template <ty │ │ │ │ +000068e0: 7065 6e61 6d65 3c2f 7370 616e 3e20 5645 pename VE │ │ │ │ +000068f0: 5254 4558 2c20 3c73 7061 6e20 636c 6173 RTEX, type │ │ │ │ +00006910: 6e61 6d65 3c2f 7370 616e 3e20 4d41 534b name MASK │ │ │ │ +00006920: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    186 void assignSmoothL │ │ │ │ +00006a50: 696d 6974 4d61 736b 3c2f 613e 2856 4552 imitMask(VER │ │ │ │ +00006a60: 5445 5820 3c73 7061 6e20 636c 6173 733d TEX const< │ │ │ │ +00006a80: 2f73 7061 6e3e 2661 6d70 3b20 7665 7274 /span>& vert │ │ │ │ +00006a90: 6578 2c20 4d41 534b 2661 6d70 3b20 706f ex, MASK& po │ │ │ │ +00006aa0: 7329 203c 7370 616e 2063 6c61 7373 3d22 s) const;
    .< │ │ │ │ +00006ae0: 6120 6964 3d22 6c30 3031 3837 2220 6e61 a id="l00187" na │ │ │ │ +00006af0: 6d65 3d22 6c30 3031 3837 223e 3c2f 613e me="l00187"> │ │ │ │ +00006b00: 3c73 7061 6e20 636c 6173 733d 226c 696e 187
    .
    188 │ │ │ │ +00006b80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +00006ba0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +00006bd0: 2056 4552 5445 582c 203c 7370 616e 2063 VERTEX, t │ │ │ │ +00006bf0: 7970 656e 616d 653c 2f73 7061 6e3e 204d ypename M │ │ │ │ +00006c00: 4153 4b26 6774 3b3c 2f64 6976 3e0a 3c64 ASK>
    . │ │ │ │ +00006c20: 3c61 2069 643d 226c 3030 3138 3922 206e 189 │ │ │ │ +00006ca0: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ +00006cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00006cc0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    assignCorn │ │ │ │ +00006d30: 6572 4c69 6d69 7454 616e 6765 6e74 4d61 erLimitTangentMa │ │ │ │ +00006d40: 736b 733c 2f61 3e28 5645 5254 4558 203c sks(VERTEX < │ │ │ │ +00006d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00006d60: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ +00006d80: 4153 4b26 616d 703b 2074 616e 312c 204d ASK& tan1, M │ │ │ │ +00006d90: 4153 4b26 616d 703b 2074 616e 3229 203c ASK& tan2) < │ │ │ │ +00006da0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00006db0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const;
    .
    190 │ │ │ │ +00006e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +00006e40: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +00006e70: 2056 4552 5445 582c 203c 7370 616e 2063 VERTEX, t │ │ │ │ +00006e90: 7970 656e 616d 653c 2f73 7061 6e3e 204d ypename M │ │ │ │ +00006ea0: 4153 4b26 6774 3b3c 2f64 6976 3e0a 3c64 ASK>
    . │ │ │ │ +00006ec0: 3c61 2069 643d 226c 3030 3139 3122 206e 191 │ │ │ │ +00006f40: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ +00006f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00006f60: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    assignCrea │ │ │ │ +00006fd0: 7365 4c69 6d69 7454 616e 6765 6e74 4d61 seLimitTangentMa │ │ │ │ +00006fe0: 736b 733c 2f61 3e28 5645 5254 4558 203c sks(VERTEX < │ │ │ │ +00006ff0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00007000: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const& vertex, M │ │ │ │ +00007020: 4153 4b26 616d 703b 2074 616e 312c 204d ASK& tan1, M │ │ │ │ +00007030: 4153 4b26 616d 703b 2074 616e 322c 203c ASK& tan2, < │ │ │ │ +00007040: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00007050: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int const< │ │ │ │ +00007080: 2f73 7061 6e3e 2063 7265 6173 6545 6e64 /span> creaseEnd │ │ │ │ +00007090: 735b 325d 2920 3c73 7061 6e20 636c 6173 s[2]) cons │ │ │ │ +000070b0: 743c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a t;
    . │ │ │ │ +000070c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000070f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 192 te │ │ │ │ +00007130: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ │ +00007140: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ │ +00007160: 3c2f 7370 616e 3e20 5645 5254 4558 2c20 VERTEX, │ │ │ │ +00007170: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename MASK>.
    193 │ │ │ │ +00007260: 766f 6964 3c2f 7370 616e 3e20 3c61 2063 void ass │ │ │ │ +000072c0: 6967 6e53 6d6f 6f74 684c 696d 6974 5461 ignSmoothLimitTa │ │ │ │ +000072d0: 6e67 656e 744d 6173 6b73 3c2f 613e 2856 ngentMasks(V │ │ │ │ +000072e0: 4552 5445 5820 3c73 7061 6e20 636c 6173 ERTEX cons │ │ │ │ +00007300: 743c 2f73 7061 6e3e 2661 6d70 3b20 7665 t& ve │ │ │ │ +00007310: 7274 6578 2c20 4d41 534b 2661 6d70 3b20 rtex, MASK& │ │ │ │ +00007320: 7461 6e31 2c20 4d41 534b 2661 6d70 3b20 tan1, MASK& │ │ │ │ +00007330: 7461 6e32 2920 3c73 7061 6e20 636c 6173 tan2) cons │ │ │ │ +00007350: 743c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a t;
    . │ │ │ │ +00007360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +000073f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00007400: 6e6f 223e 2020 3139 353c 2f73 7061 6e3e no"> 195 │ │ │ │ +00007410: 3c73 7061 6e20 636c 6173 733d 226b 6579 private:
    .
    < │ │ │ │ +00007470: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00007480: 6e6f 223e 2020 3139 363c 2f73 7061 6e3e no"> 196 │ │ │ │ +00007490: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ +000074c0: 4f70 7469 6f6e 733c 2f61 3e20 5f6f 7074 Options _opt │ │ │ │ +000074d0: 696f 6e73 3b3c 2f64 6976 3e0a 3c64 6976 ions;
    .
    < │ │ │ │ +00007510: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00007520: 6e6f 223e 2020 3139 373c 2f73 7061 6e3e no"> 197 │ │ │ │ +00007530: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +00007580: 2020 3139 383c 2f73 7061 6e3e 3c73 7061 198protected:
    .
    199 < │ │ │ │ +00007610: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00007660: 3230 303c 2f73 7061 6e3e 2020 2020 3c73 200 //.
    20 │ │ │ │ +000076e0: 313c 2f73 7061 6e3e 2020 2020 3c73 7061 1 // Internal i │ │ │ │ +00007710: 6d70 6c65 6d65 6e74 6174 696f 6e20 7375 mplementation su │ │ │ │ +00007720: 7070 6f72 743a 3c2f 7370 616e 3e3c 2f64 pport:.
    20 │ │ │ │ +00007780: 323c 2f73 7061 6e3e 2020 2020 3c73 7061 2 //
    .
    203< │ │ │ │ +00007800: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00007820: 2f2f 2020 5765 206e 6565 6420 6120 6c6f // We need a lo │ │ │ │ +00007830: 6361 6c20 2671 756f 743b 6d61 736b 2671 cal "mask&q │ │ │ │ +00007840: 756f 743b 2063 6c61 7373 2074 6f20 6265 uot; class to be │ │ │ │ +00007850: 2064 6563 6c61 7265 6420 6c6f 6361 6c6c declared locall │ │ │ │ +00007860: 7920 7769 7468 696e 2074 6865 2076 6572 y within the ver │ │ │ │ +00007870: 7465 782d 7665 7274 6578 206d 6173 6b20 tex-vertex mask │ │ │ │ +00007880: 7175 6572 793c 2f73 7061 6e3e 3c2f 6469 query.
    204 │ │ │ │ +000078e0: 3c2f 7370 616e 3e20 2020 203c 7370 616e // to hold one │ │ │ │ +00007910: 206f 6620 7468 6520 7477 6f20 706f 7373 of the two poss │ │ │ │ +00007920: 6962 6c65 206d 6173 6b73 2072 6571 7569 ible masks requi │ │ │ │ +00007930: 7265 6420 616e 6420 746f 2063 6f6d 6269 red and to combi │ │ │ │ +00007940: 6e65 2074 6865 206c 6f63 616c 206d 6173 ne the local mas │ │ │ │ +00007950: 6b20 7769 7468 2074 6865 206d 6173 6b3c k with the mask< │ │ │ │ +00007960: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00007980: 6120 6964 3d22 6c30 3032 3035 2220 6e61 a id="l00205" na │ │ │ │ +00007990: 6d65 3d22 6c30 3032 3035 223e 3c2f 613e me="l00205"> │ │ │ │ +000079a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 205 // t │ │ │ │ +000079e0: 6865 2063 616c 6c65 7220 7072 6f76 6964 he caller provid │ │ │ │ +000079f0: 6573 2e20 2049 7420 6861 7320 6265 656e es. It has been │ │ │ │ +00007a00: 2070 6172 616d 6574 6572 697a 6564 2062 parameterized b │ │ │ │ +00007a10: 7920 266c 743b 5745 4947 4854 2667 743b y <WEIGHT> │ │ │ │ +00007a20: 2073 6f20 7468 6174 2061 2076 6572 7369 so that a versi │ │ │ │ +00007a30: 6f6e 2063 6f6d 7061 7469 626c 653c 2f73 on compatible
    .
    206 │ │ │ │ +00007aa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // wit │ │ │ │ +00007ac0: 6820 7468 6520 6361 6c6c 6572 2623 3339 h the caller' │ │ │ │ +00007ad0: 3b73 206d 6173 6b20 636c 6173 7320 6973 ;s mask class is │ │ │ │ +00007ae0: 2063 7265 6174 6564 2e3c 2f73 7061 6e3e created. │ │ │ │ +00007af0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00007b40: 2032 3037 3c2f 7370 616e 3e20 2020 203c 207 < │ │ │ │ +00007b50: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00007b60: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    2 │ │ │ │ +00007bc0: 3038 3c2f 7370 616e 3e20 2020 203c 7370 08 template <typ │ │ │ │ +00007c10: 656e 616d 653c 2f73 7061 6e3e 2057 4549 ename WEI │ │ │ │ +00007c20: 4748 5426 6774 3b3c 2f64 6976 3e0a 3c64 GHT>
    ..
    │ │ │ │ +00007ce0: 2020 3230 393c 2f61 3e3c 2f73 7061 6e3e 209 │ │ │ │ +00007cf0: 2020 2020 3c73 7061 6e20 636c 6173 733d class │ │ │ │ +00007d10: 3c2f 7370 616e 3e3c 6120 636c 6173 733d LocalMask │ │ │ │ +00007d50: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    210 .
    2 │ │ │ │ +00007e00: 3131 3c2f 7370 616e 3e20 2020 203c 7370 11 public │ │ │ │ +00007e30: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ │ +00007e80: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 212 typedef WEIGHT Weight< │ │ │ │ +00007f60: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
    .
    213 │ │ │ │ +00007fc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00008010: 2032 3134 3c2f 7370 616e 3e20 2020 203c 214 < │ │ │ │ +00008020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00008030: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
    .
    215 │ │ │ │ +000080e0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +000080f0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00008100: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00008110: 2261 3031 3333 372e 6874 6d6c 2361 6334 "a01337.html#ac4 │ │ │ │ +00008120: 6234 6335 3566 6232 3464 6139 3566 3135 b4c55fb24da95f15 │ │ │ │ +00008130: 3466 3461 3966 3531 3764 6230 3739 223e 4f4a9f517db079"> │ │ │ │ +00008140: 4c6f 6361 6c4d 6173 6b3c 2f61 3e28 3c61 LocalMask(We │ │ │ │ +000081a0: 6967 6874 3c2f 613e 2a20 762c 203c 6120 ight* v, Wei │ │ │ │ +00008200: 6768 743c 2f61 3e2a 2065 2c20 3c61 2063 ght* e, Weig │ │ │ │ +00008260: 6874 3c2f 613e 2a20 6629 203a 205f 7657 ht* f) : _vW │ │ │ │ +00008270: 6569 6768 7473 2876 292c 205f 6557 6569 eights(v), _eWei │ │ │ │ +00008280: 6768 7473 2865 292c 205f 6657 6569 6768 ghts(e), _fWeigh │ │ │ │ +00008290: 7473 2866 2920 7b20 7d3c 2f64 6976 3e0a ts(f) { }
    . │ │ │ │ +000082a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 │ │ │ │ +000083b0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00008420: 6120 6964 3d22 6c30 3032 3138 2220 6e61 a id="l00218" na │ │ │ │ +00008430: 6d65 3d22 6c30 3032 3138 223e 3c2f 613e me="l00218"> │ │ │ │ +00008440: 3c73 7061 6e20 636c 6173 733d 226c 696e 218 publi │ │ │ │ +00008480: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
    . │ │ │ │ +00008490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ +00008520: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00008530: 6e6f 223e 2020 3232 303c 2f73 7061 6e3e no"> 220 │ │ │ │ +00008540: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ +00008560: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00008580: 3c61 2069 643d 226c 3030 3232 3122 206e 221 │ │ │ │ +000085e0: 2f2f 2020 4d65 7468 6f64 7320 7265 7175 // Methods requ │ │ │ │ +000085f0: 6972 6564 2066 6f72 2067 656e 6572 616c ired for general │ │ │ │ +00008600: 206d 6173 6b20 6173 7369 676e 6d65 6e74 mask assignment │ │ │ │ +00008610: 7320 616e 6420 7175 6572 6965 733a 3c2f s and queries:
    .
    < │ │ │ │ +00008660: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00008670: 6e6f 223e 2020 3232 323c 2f73 7061 6e3e no"> 222 │ │ │ │ +00008680: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ +000086a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000086c0: 3c61 2069 643d 226c 3030 3232 3322 206e 223 │ │ │ │ +00008740: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ +00008750: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +00008770: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 GetNumV │ │ │ │ +000087d0: 6572 7465 7857 6569 6768 7473 3c2f 613e ertexWeights │ │ │ │ +000087e0: 2829 3c73 7061 6e20 636c 6173 733d 226b () const < │ │ │ │ +00008800: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ +00008830: 5f76 436f 756e 743b 207d 3c2f 6469 763e _vCount; }
    │ │ │ │ +00008840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00008870: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ +000088d0: 3232 343c 2f61 3e3c 2f73 7061 6e3e 2020 224 │ │ │ │ +000088e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +00008900: 696e 743c 2f73 7061 6e3e 203c 6120 636c int GetN │ │ │ │ +00008960: 756d 4564 6765 5765 6967 6874 733c 2f61 umEdgeWeights() cons │ │ │ │ +00008990: 7420 3c2f 7370 616e 3e7b 203c 7370 616e t { return _eCount; }.
    225 int G │ │ │ │ +00008af0: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ +00008b00: 3c2f 613e 2829 3c73 7061 6e20 636c 6173 () c │ │ │ │ +00008b20: 6f6e 7374 203c 2f73 7061 6e3e 7b20 3c73 onst { return _fCount; } │ │ │ │ +00008b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00008bb0: 2032 3236 3c2f 7370 616e 3e20 3c2f 6469 226 .
    │ │ │ │ +00008c50: 2020 3232 373c 2f61 3e3c 2f73 7061 6e3e 227 │ │ │ │ +00008c60: 2020 2020 2020 2020 3c73 7061 6e20 636c void S │ │ │ │ +00008ce0: 6574 4e75 6d56 6572 7465 7857 6569 6768 etNumVertexWeigh │ │ │ │ +00008cf0: 7473 3c2f 613e 283c 7370 616e 2063 6c61 ts(int coun │ │ │ │ +00008d20: 7429 207b 205f 7643 6f75 6e74 203d 2063 t) { _vCount = c │ │ │ │ +00008d30: 6f75 6e74 3b20 7d3c 2f64 6976 3e0a 3c64 ount; }
    . │ │ │ │ +00008d50: 3c61 2069 643d 226c 3030 3232 3822 206e 228 │ │ │ │ +00008dd0: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ +00008de0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ +00008e00: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d SetNum │ │ │ │ +00008e60: 4564 6765 5765 6967 6874 733c 2f61 3e28 EdgeWeights( │ │ │ │ +00008e70: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +00008e90: 2f73 7061 6e3e 2063 6f75 6e74 2920 7b20 /span> count) { │ │ │ │ +00008ea0: 5f65 436f 756e 7420 3d20 636f 756e 743b _eCount = count; │ │ │ │ +00008eb0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    229< │ │ │ │ +00008f50: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> void SetNumFaceW │ │ │ │ +00008fe0: 6569 6768 7473 3c2f 613e 2820 203c 7370 eights( int count) { _fCou │ │ │ │ +00009020: 6e74 203d 2063 6f75 6e74 3b20 7d3c 2f64 nt = count; }.
    23 │ │ │ │ +00009080: 303c 2f73 7061 6e3e 203c 2f64 6976 3e0a 0
    . │ │ │ │ +00009090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000090c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2 │ │ │ │ +00009120: 3331 3c2f 613e 3c2f 7370 616e 3e20 2020 31 │ │ │ │ +00009130: 2020 2020 203c 6120 636c 6173 733d 2263 Weight │ │ │ │ +00009190: 3c73 7061 6e20 636c 6173 733d 226b 6579 const& VertexW │ │ │ │ +00009210: 6569 6768 743c 2f61 3e28 3c73 7061 6e20 eight(int i │ │ │ │ +00009240: 6e64 6578 293c 7370 616e 2063 6c61 7373 ndex) cons │ │ │ │ +00009260: 7420 3c2f 7370 616e 3e7b 203c 7370 616e t { return _vWeights[ind │ │ │ │ +000092a0: 6578 5d3b 207d 3c2f 6469 763e 0a3c 6469 ex]; }
    .< │ │ │ │ +000092c0: 6120 6964 3d22 6c30 3032 3332 2220 6e61 a id="l00232" na │ │ │ │ +000092d0: 6d65 3d22 6c30 3032 3332 223e 3c2f 613e me="l00232"> │ │ │ │ +000092e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 232< │ │ │ │ +00009340: 2f61 3e3c 2f73 7061 6e3e 2020 2020 2020 /a> │ │ │ │ +00009350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Weight const& │ │ │ │ +000093d0: 616d 703b 203c 6120 636c 6173 733d 2263 amp; EdgeWeight │ │ │ │ +00009430: 3c2f 613e 2820 203c 7370 616e 2063 6c61 ( int inde │ │ │ │ +00009460: 7829 3c73 7061 6e20 636c 6173 733d 226b x) const < │ │ │ │ +00009480: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return │ │ │ │ +000094b0: 5f65 5765 6967 6874 735b 696e 6465 785d _eWeights[index] │ │ │ │ +000094c0: 3b20 7d3c 2f64 6976 3e0a 3c64 6976 2063 ; }
    .
    233 │ │ │ │ +00009560: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00009570: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00009580: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ │ +00009590: 6130 3133 3337 2e68 746d 6c23 6131 3733 a01337.html#a173 │ │ │ │ +000095a0: 6539 3865 3064 3162 3364 3135 6635 6333 e98e0d1b3d15f5c3 │ │ │ │ +000095b0: 6164 3433 3664 3066 6564 3430 3122 3e57 ad436d0fed401">W │ │ │ │ +000095c0: 6569 6768 743c 2f61 3e20 3c73 7061 6e20 eight │ │ │ │ +000095e0: 636f 6e73 743c 2f73 7061 6e3e 2661 6d70 const& │ │ │ │ +000095f0: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; FaceWeight( in │ │ │ │ +00009670: 743c 2f73 7061 6e3e 2069 6e64 6578 293c t index)< │ │ │ │ +00009680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00009690: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const { r │ │ │ │ +000096c0: 6574 7572 6e3c 2f73 7061 6e3e 205f 6657 eturn _fW │ │ │ │ +000096d0: 6569 6768 7473 5b69 6e64 6578 5d3b 207d eights[index]; } │ │ │ │ +000096e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00009730: 2032 3334 3c2f 7370 616e 3e20 3c2f 6469 234 .
    │ │ │ │ +000097d0: 2020 3233 353c 2f61 3e3c 2f73 7061 6e3e 235 │ │ │ │ +000097e0: 2020 2020 2020 2020 3c61 2063 6c61 7373 Weight& VertexW │ │ │ │ +000098a0: 6569 6768 743c 2f61 3e28 3c73 7061 6e20 eight(int i │ │ │ │ +000098d0: 6e64 6578 2920 7b20 3c73 7061 6e20 636c ndex) { return │ │ │ │ +00009900: 5f76 5765 6967 6874 735b 696e 6465 785d _vWeights[index] │ │ │ │ +00009910: 3b20 7d3c 2f64 6976 3e0a 3c64 6976 2063 ; }
    .
    236 │ │ │ │ +000099b0: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +000099c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +000099d0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ │ +000099e0: 6130 3133 3337 2e68 746d 6c23 6131 3733 a01337.html#a173 │ │ │ │ +000099f0: 6539 3865 3064 3162 3364 3135 6635 6333 e98e0d1b3d15f5c3 │ │ │ │ +00009a00: 6164 3433 3664 3066 6564 3430 3122 3e57 ad436d0fed401">W │ │ │ │ +00009a10: 6569 6768 743c 2f61 3e26 616d 703b 203c eight& < │ │ │ │ +00009a20: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00009a30: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00009a40: 2261 3031 3333 372e 6874 6d6c 2361 3533 "a01337.html#a53 │ │ │ │ +00009a50: 3364 6261 3332 6139 3436 3835 3463 3366 3dba32a946854c3f │ │ │ │ +00009a60: 3235 6532 3762 3532 3165 6637 6466 223e 25e27b521ef7df"> │ │ │ │ +00009a70: 4564 6765 5765 6967 6874 3c2f 613e 2820 EdgeWeight( │ │ │ │ +00009a80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int index) { < │ │ │ │ +00009ab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00009ac0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +00009ad0: 2f73 7061 6e3e 205f 6557 6569 6768 7473 /span> _eWeights │ │ │ │ +00009ae0: 5b69 6e64 6578 5d3b 207d 3c2f 6469 763e [index]; }
    │ │ │ │ +00009af0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00009b20: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ │ +00009b80: 3233 373c 2f61 3e3c 2f73 7061 6e3e 2020 237 │ │ │ │ +00009b90: 2020 2020 2020 3c61 2063 6c61 7373 3d22 Weight │ │ │ │ +00009bf0: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & FaceWeigh │ │ │ │ +00009c50: 743c 2f61 3e28 2020 3c73 7061 6e20 636c t( int ind │ │ │ │ +00009c80: 6578 2920 7b20 3c73 7061 6e20 636c 6173 ex) { │ │ │ │ +00009ca0: 7265 7475 726e 3c2f 7370 616e 3e20 5f66 return _f │ │ │ │ +00009cb0: 5765 6967 6874 735b 696e 6465 785d 3b20 Weights[index]; │ │ │ │ +00009cc0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ +00009d10: 2020 3233 383c 2f73 7061 6e3e 203c 2f64 238 .
    239 bool < │ │ │ │ +00009df0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00009e00: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00009e10: 2261 3031 3333 372e 6874 6d6c 2361 3335 "a01337.html#a35 │ │ │ │ +00009e20: 3139 6535 6530 3536 3331 3032 3666 6164 19e5e05631026fad │ │ │ │ +00009e30: 3934 6337 3631 3666 3565 3065 3637 223e 94c7616f5e0e67"> │ │ │ │ +00009e40: 4172 6546 6163 6557 6569 6768 7473 466f AreFaceWeightsFo │ │ │ │ +00009e50: 7246 6163 6543 656e 7465 7273 3c2f 613e rFaceCenters │ │ │ │ +00009e60: 2829 3c73 7061 6e20 636c 6173 733d 226b () const │ │ │ │ +00009e80: 3c2f 7370 616e 3e7b 203c 7370 616e 2063 { return │ │ │ │ +00009eb0: 205f 6657 6569 6768 7473 466f 7243 656e _fWeightsForCen │ │ │ │ +00009ec0: 7465 7273 3b20 7d3c 2f64 6976 3e0a 3c64 ters; }
    . │ │ │ │ +00009ee0: 3c61 2069 643d 226c 3030 3234 3022 206e 240 │ │ │ │ +00009f60: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ │ +00009f70: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ +00009f90: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d SetFac │ │ │ │ +00009ff0: 6557 6569 6768 7473 466f 7246 6163 6543 eWeightsForFaceC │ │ │ │ +0000a000: 656e 7465 7273 3c2f 613e 283c 7370 616e enters(bool │ │ │ │ +0000a030: 206f 6e29 207b 205f 6657 6569 6768 7473 on) { _fWeights │ │ │ │ +0000a040: 466f 7243 656e 7465 7273 203d 206f 6e3b ForCenters = on; │ │ │ │ +0000a050: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    241 .
    2 │ │ │ │ +0000a100: 3432 3c2f 7370 616e 3e20 2020 203c 7370 42 public │ │ │ │ +0000a130: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ │ +0000a180: 2020 3234 333c 2f73 7061 6e3e 203c 2f64 243 .
    24 │ │ │ │ +0000a1e0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ +0000a1f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +0000a210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000a260: 3234 353c 2f73 7061 6e3e 2020 2020 2020 245 │ │ │ │ +0000a270: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Addi │ │ │ │ +0000a290: 7469 6f6e 616c 206d 6574 686f 6473 202d tional methods - │ │ │ │ +0000a2a0: 2d20 6d61 696e 6c79 2074 6865 2062 6c65 - mainly the ble │ │ │ │ +0000a2b0: 6e64 696e 6720 6d65 7468 6f64 2066 6f72 nding method for │ │ │ │ +0000a2c0: 2076 6572 7465 782d 7665 7274 6578 206d vertex-vertex m │ │ │ │ +0000a2d0: 6173 6b73 3a3c 2f73 7061 6e3e 3c2f 6469 asks:.
    246 │ │ │ │ +0000a330: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +0000a340: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0000a350: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    2 │ │ │ │ +0000a3b0: 3437 3c2f 7370 616e 3e20 2020 2020 2020 47 │ │ │ │ +0000a3c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ │ +0000a3e0: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ │ +0000a410: 2055 5345 525f 4d41 534b 2667 743b 3c2f USER_MASK>.
    2 │ │ │ │ +0000a470: 3438 3c2f 7370 616e 3e20 2020 2020 2020 48 │ │ │ │ +0000a480: 203c 7370 616e 2063 6c61 7373 3d22 6b65 inline v │ │ │ │ +0000a4c0: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ +0000a4d0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ +0000a560: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +0000a570: 7265 663d 2261 3031 3333 372e 6874 6d6c ref="a01337.html │ │ │ │ +0000a580: 2361 3565 6438 3030 6539 6437 3032 6635 #a5ed800e9d702f5 │ │ │ │ +0000a590: 3761 6539 3738 6665 3630 6261 3261 3337 7ae978fe60ba2a37 │ │ │ │ +0000a5a0: 6463 223e 2020 3234 393c 2f61 3e3c 2f73 dc"> 249 Com │ │ │ │ +0000a610: 6269 6e65 5665 7274 6578 5665 7274 6578 bineVertexVertex │ │ │ │ +0000a620: 4d61 736b 733c 2f61 3e28 3c61 2063 6c61 Masks(Weight │ │ │ │ +0000a680: 3c2f 613e 2074 6869 7343 6f65 6666 2c20 thisCoeff, │ │ │ │ +0000a690: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ │ +0000a6e0: 5765 6967 6874 3c2f 613e 2064 7374 436f Weight dstCo │ │ │ │ +0000a6f0: 6566 662c 2055 5345 525f 4d41 534b 2661 eff, USER_MASK&a │ │ │ │ +0000a700: 6d70 3b20 6473 7429 3c73 7061 6e20 636c mp; dst) c │ │ │ │ +0000a720: 6f6e 7374 203c 2f73 7061 6e3e 7b3c 2f64 onst {.
    25 │ │ │ │ +0000a780: 303c 2f73 7061 6e3e 203c 2f64 6976 3e0a 0
    . │ │ │ │ +0000a790: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0000a7c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 251 │ │ │ │ +0000a7f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +0000a810: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000a860: 3235 323c 2f73 7061 6e3e 2020 2020 2020 252 │ │ │ │ +0000a870: 2020 2020 2020 3c73 7061 6e20 636c 6173 // │ │ │ │ +0000a890: 5468 6973 2069 6d70 6c65 6d65 6e74 6174 This implementat │ │ │ │ +0000a8a0: 696f 6e20 6973 2063 6f6e 766f 6c75 7465 ion is convolute │ │ │ │ +0000a8b0: 6420 6279 2074 6865 2070 6f74 656e 7469 d by the potenti │ │ │ │ +0000a8c0: 616c 2073 7061 7273 6974 7920 6f66 2065 al sparsity of e │ │ │ │ +0000a8d0: 6163 6820 6d61 736b 2e20 2053 696e 6365 ach mask. Since │ │ │ │ +0000a8e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0000a900: 3c61 2069 643d 226c 3030 3235 3322 206e 253 // it is sp │ │ │ │ +0000a970: 6563 6966 6963 2074 6f20 6120 7665 7274 ecific to a vert │ │ │ │ +0000a980: 6578 2d76 6572 7465 7820 6d61 736b 2c20 ex-vertex mask, │ │ │ │ +0000a990: 7765 2061 7265 2067 7561 7261 6e74 6565 we are guarantee │ │ │ │ +0000a9a0: 6420 746f 2068 6176 6520 6578 6163 746c d to have exactl │ │ │ │ +0000a9b0: 7920 6f6e 653c 2f73 7061 6e3e 3c2f 6469 y one.
    254 │ │ │ │ +0000aa10: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000aa20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // ver │ │ │ │ +0000aa40: 7465 782d 7765 6967 6874 2066 6f72 2062 tex-weight for b │ │ │ │ +0000aa50: 6f74 6820 6d61 736b 732c 2062 7574 2074 oth masks, but t │ │ │ │ +0000aa60: 6865 2065 6467 652d 2061 6e64 2066 6163 he edge- and fac │ │ │ │ +0000aa70: 652d 7765 6967 6874 7320 6172 6520 6f70 e-weights are op │ │ │ │ +0000aa80: 7469 6f6e 616c 2e20 2054 6865 3c2f 7370 tional. The
    .
    255 │ │ │ │ +0000aaf0: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +0000ab10: 2f2f 2020 6368 696c 6420 6d61 736b 2028 // child mask ( │ │ │ │ +0000ab20: 7468 6520 2671 756f 743b 736f 7572 6365 the "source │ │ │ │ +0000ab30: 2671 756f 743b 2920 7368 6f75 6c64 2068 ") should h │ │ │ │ +0000ab40: 6176 6520 6120 7375 7065 7273 6574 206f ave a superset o │ │ │ │ +0000ab50: 6620 7468 6520 7765 6967 6874 7320 6f66 f the weights of │ │ │ │ +0000ab60: 2074 6865 2070 6172 656e 743c 2f73 7061 the parent
    .
    256 │ │ │ │ +0000abd0: 2020 2020 2020 2020 203c 7370 616e 2063 / │ │ │ │ +0000abf0: 2f20 2028 7468 6520 2671 756f 743b 6465 / (the "de │ │ │ │ +0000ac00: 7374 696e 6174 696f 6e26 7175 6f74 3b29 stination") │ │ │ │ +0000ac10: 2067 6976 656e 2069 7473 2072 6564 7563 given its reduc │ │ │ │ +0000ac20: 6564 2073 6861 7270 6e65 7373 2c20 736f ed sharpness, so │ │ │ │ +0000ac30: 2077 6520 666f 7274 756e 6174 656c 7920 we fortunately │ │ │ │ +0000ac40: 646f 6e26 2333 393b 7420 6e65 6564 2074 don't need t │ │ │ │ +0000ac50: 6f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c o
    .< │ │ │ │ +0000ac60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000ac70: 3e3c 6120 6964 3d22 6c30 3032 3537 2220 > 257 < │ │ │ │ +0000acc0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0000acd0: 656e 7422 3e2f 2f20 2074 6573 7420 616c ent">// test al │ │ │ │ +0000ace0: 6c20 7065 726d 7574 6174 696f 6e73 2e3c l permutations.< │ │ │ │ +0000acf0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0000ad10: 6120 6964 3d22 6c30 3032 3538 2220 6e61 a id="l00258" na │ │ │ │ +0000ad20: 6d65 3d22 6c30 3032 3538 223e 3c2f 613e me="l00258"> │ │ │ │ +0000ad30: 3c73 7061 6e20 636c 6173 733d 226c 696e 258 //.
    259 │ │ │ │ +0000add0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0000ade0: 2020 2064 7374 2e56 6572 7465 7857 6569 dst.VertexWei │ │ │ │ +0000adf0: 6768 7428 3029 203d 2064 7374 436f 6566 ght(0) = dstCoef │ │ │ │ +0000ae00: 6620 2a20 6473 742e 5665 7274 6578 5765 f * dst.VertexWe │ │ │ │ +0000ae10: 6967 6874 2830 2920 2b20 7468 6973 436f ight(0) + thisCo │ │ │ │ +0000ae20: 6566 6620 2a20 7468 6973 2d26 6774 3b3c eff * this->< │ │ │ │ +0000ae30: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0000ae40: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0000ae50: 2261 3031 3333 372e 6874 6d6c 2361 6563 "a01337.html#aec │ │ │ │ +0000ae60: 3563 3261 6266 6466 6264 6534 6464 3933 5c2abfdfbde4dd93 │ │ │ │ +0000ae70: 3463 3036 3136 3235 3939 3437 3931 223e 4c061625994791"> │ │ │ │ +0000ae80: 5665 7274 6578 5765 6967 6874 3c2f 613e VertexWeight │ │ │ │ +0000ae90: 2830 293b 3c2f 6469 763e 0a3c 6469 7620 (0);
    .
    260 │ │ │ │ +0000aef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000af40: 2032 3631 3c2f 7370 616e 3e20 2020 2020 261 │ │ │ │ +0000af50: 2020 2020 2020 203c 7370 616e 2063 6c61 int edge │ │ │ │ +0000af80: 5765 6967 6874 436f 756e 7420 3d20 7468 WeightCount = th │ │ │ │ +0000af90: 6973 2d26 6774 3b3c 6120 636c 6173 733d is->GetNumEd │ │ │ │ +0000aff0: 6765 5765 6967 6874 733c 2f61 3e28 293b geWeights(); │ │ │ │ +0000b000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000b050: 2032 3632 3c2f 7370 616e 3e20 2020 2020 262 │ │ │ │ +0000b060: 2020 2020 2020 203c 7370 616e 2063 6c61 if (edge │ │ │ │ +0000b090: 5765 6967 6874 436f 756e 7429 207b 3c2f WeightCount) {.
    2 │ │ │ │ +0000b0f0: 3633 3c2f 7370 616e 3e20 2020 2020 2020 63 │ │ │ │ +0000b100: 2020 2020 2020 2020 203c 7370 616e 2063 if (ds │ │ │ │ +0000b130: 742e 4765 744e 756d 4564 6765 5765 6967 t.GetNumEdgeWeig │ │ │ │ +0000b140: 6874 7328 2920 3d3d 2030 2920 7b3c 2f64 hts() == 0) {.
    26 │ │ │ │ +0000b1a0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ +0000b1b0: 2020 2020 2020 2020 2020 2020 6473 742e dst. │ │ │ │ +0000b1c0: 5365 744e 756d 4564 6765 5765 6967 6874 SetNumEdgeWeight │ │ │ │ +0000b1d0: 7328 6564 6765 5765 6967 6874 436f 756e s(edgeWeightCoun │ │ │ │ +0000b1e0: 7429 3b3c 2f64 6976 3e0a 3c64 6976 2063 t);
    .
    265 │ │ │ │ +0000b240: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b250: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ │ +0000b270: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (int i = │ │ │ │ +0000b2a0: 2030 3b20 6920 266c 743b 2065 6467 6557 0; i < edgeW │ │ │ │ +0000b2b0: 6569 6768 7443 6f75 6e74 3b20 2b2b 6929 eightCount; ++i) │ │ │ │ +0000b2c0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    266 │ │ │ │ +0000b320: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b330: 2020 2020 2064 7374 2e45 6467 6557 6569 dst.EdgeWei │ │ │ │ +0000b340: 6768 7428 6929 203d 2074 6869 7343 6f65 ght(i) = thisCoe │ │ │ │ +0000b350: 6666 202a 2074 6869 732d 2667 743b 3c61 ff * this->E │ │ │ │ +0000b3b0: 6467 6557 6569 6768 743c 2f61 3e28 6929 dgeWeight(i) │ │ │ │ +0000b3c0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +0000b410: 2020 3236 373c 2f73 7061 6e3e 2020 2020 267 │ │ │ │ +0000b420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b430: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ +0000b480: 2020 3236 383c 2f73 7061 6e3e 2020 2020 268 │ │ │ │ +0000b490: 2020 2020 2020 2020 2020 2020 7d20 3c73 } else {
    .
    < │ │ │ │ +0000b500: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000b510: 6e6f 223e 2020 3236 393c 2f73 7061 6e3e no"> 269 │ │ │ │ +0000b520: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b530: 2020 2020 3c73 7061 6e20 636c 6173 733d fo │ │ │ │ +0000b550: 723c 2f73 7061 6e3e 2028 3c73 7061 6e20 r (int i │ │ │ │ +0000b580: 203d 2030 3b20 6920 266c 743b 2065 6467 = 0; i < edg │ │ │ │ +0000b590: 6557 6569 6768 7443 6f75 6e74 3b20 2b2b eWeightCount; ++ │ │ │ │ +0000b5a0: 6929 207b 3c2f 6469 763e 0a3c 6469 7620 i) {
    .
    270 │ │ │ │ +0000b600: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b610: 2020 2020 2020 2064 7374 2e45 6467 6557 dst.EdgeW │ │ │ │ +0000b620: 6569 6768 7428 6929 203d 2064 7374 436f eight(i) = dstCo │ │ │ │ +0000b630: 6566 6620 2a20 6473 742e 4564 6765 5765 eff * dst.EdgeWe │ │ │ │ +0000b640: 6967 6874 2869 2920 2b20 7468 6973 436f ight(i) + thisCo │ │ │ │ +0000b650: 6566 6620 2a20 7468 6973 2d26 6774 3b3c eff * this->< │ │ │ │ +0000b660: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +0000b670: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +0000b680: 2261 3031 3333 372e 6874 6d6c 2361 3464 "a01337.html#a4d │ │ │ │ +0000b690: 6239 3332 6138 6133 3366 6430 3632 3263 b932a8a33fd0622c │ │ │ │ +0000b6a0: 3764 3031 3136 3765 6231 3462 3532 223e 7d01167eb14b52"> │ │ │ │ +0000b6b0: 4564 6765 5765 6967 6874 3c2f 613e 2869 EdgeWeight(i │ │ │ │ +0000b6c0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    271 │ │ │ │ +0000b720: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000b730: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    272 │ │ │ │ +0000b790: 2020 2020 2020 2020 2020 2020 207d 3c2f }.
    2 │ │ │ │ +0000b7f0: 3733 3c2f 7370 616e 3e20 2020 2020 2020 73 │ │ │ │ +0000b800: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ │ +0000b820: 6120 6964 3d22 6c30 3032 3734 2220 6e61 a id="l00274" na │ │ │ │ +0000b830: 6d65 3d22 6c30 3032 3734 223e 3c2f 613e me="l00274"> │ │ │ │ +0000b840: 3c73 7061 6e20 636c 6173 733d 226c 696e 274
    .
    275 │ │ │ │ +0000b8c0: 2020 2020 2020 2020 203c 7370 616e 2063 int fa │ │ │ │ +0000b8f0: 6365 5765 6967 6874 436f 756e 7420 3d20 ceWeightCount = │ │ │ │ +0000b900: 7468 6973 2d26 6774 3b3c 6120 636c 6173 this->GetNum │ │ │ │ +0000b960: 4661 6365 5765 6967 6874 733c 2f61 3e28 FaceWeights( │ │ │ │ +0000b970: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    276 │ │ │ │ +0000b9d0: 2020 2020 2020 2020 203c 7370 616e 2063 if (fa │ │ │ │ +0000ba00: 6365 5765 6967 6874 436f 756e 7429 207b ceWeightCount) { │ │ │ │ +0000ba10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000ba60: 2032 3737 3c2f 7370 616e 3e20 2020 2020 277 │ │ │ │ +0000ba70: 2020 2020 2020 2020 2020 203c 7370 616e //
    │ │ │ │ +0000baa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000bad0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 278 │ │ │ │ +0000bb00: 2020 2020 203c 7370 616e 2063 6c61 7373 // I │ │ │ │ +0000bb20: 6620 636f 6d62 696e 696e 6720 6661 6365 f combining face │ │ │ │ +0000bb30: 2077 6569 6768 7473 2c20 6265 2073 7572 weights, be sur │ │ │ │ +0000bb40: 6520 7468 6569 7220 696e 7465 7270 7265 e their interpre │ │ │ │ +0000bb50: 7461 7469 6f6e 2028 692e 652e 2066 6163 tation (i.e. fac │ │ │ │ +0000bb60: 652d 6365 6e74 6572 733c 2f73 7061 6e3e e-centers │ │ │ │ +0000bb70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000bbc0: 2032 3739 3c2f 7370 616e 3e20 2020 2020 279 │ │ │ │ +0000bbd0: 2020 2020 2020 2020 2020 203c 7370 616e // or opposite │ │ │ │ +0000bc00: 2076 6572 7469 6365 7329 2069 7320 7072 vertices) is pr │ │ │ │ +0000bc10: 6f70 6572 6c79 2073 6574 2069 6e20 7468 operly set in th │ │ │ │ +0000bc20: 6520 6465 7374 696e 6174 696f 6e20 6d61 e destination ma │ │ │ │ +0000bc30: 736b 3a3c 2f73 7061 6e3e 3c2f 6469 763e sk:
    │ │ │ │ +0000bc40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000bc70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 280 │ │ │ │ +0000bca0: 2020 2020 203c 7370 616e 2063 6c61 7373 //
    .
    281 │ │ │ │ +0000bd20: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +0000bd30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000bd40: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (dst.GetNumFa │ │ │ │ +0000bd60: 6365 5765 6967 6874 7328 2920 3d3d 2030 ceWeights() == 0 │ │ │ │ +0000bd70: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    282 │ │ │ │ +0000bdd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000bde0: 2020 6473 742e 5365 744e 756d 4661 6365 dst.SetNumFace │ │ │ │ +0000bdf0: 5765 6967 6874 7328 6661 6365 5765 6967 Weights(faceWeig │ │ │ │ +0000be00: 6874 436f 756e 7429 3b3c 2f64 6976 3e0a htCount);
    . │ │ │ │ +0000be10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +0000bf30: 3c61 2069 643d 226c 3030 3238 3422 206e 284
    .
    285 │ │ │ │ +0000bfd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000bfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ │ +0000c000: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (int i = │ │ │ │ +0000c030: 2030 3b20 6920 266c 743b 2066 6163 6557 0; i < faceW │ │ │ │ +0000c040: 6569 6768 7443 6f75 6e74 3b20 2b2b 6929 eightCount; ++i) │ │ │ │ +0000c050: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    286 │ │ │ │ +0000c0b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000c0c0: 2020 2020 2064 7374 2e46 6163 6557 6569 dst.FaceWei │ │ │ │ +0000c0d0: 6768 7428 6929 203d 2074 6869 7343 6f65 ght(i) = thisCoe │ │ │ │ +0000c0e0: 6666 202a 2074 6869 732d 2667 743b 3c61 ff * this->F │ │ │ │ +0000c140: 6163 6557 6569 6768 743c 2f61 3e28 6929 aceWeight(i) │ │ │ │ +0000c150: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +0000c1a0: 2020 3238 373c 2f73 7061 6e3e 2020 2020 287 │ │ │ │ +0000c1b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000c1c0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ +0000c210: 2020 3238 383c 2f73 7061 6e3e 2020 2020 288 │ │ │ │ +0000c220: 2020 2020 2020 2020 2020 2020 7d20 3c73 } else {
    .
    < │ │ │ │ +0000c290: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000c2a0: 6e6f 223e 2020 3238 393c 2f73 7061 6e3e no"> 289 │ │ │ │ +0000c2b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000c2c0: 2020 2020 6173 7365 7274 2874 6869 732d assert(this- │ │ │ │ +0000c2d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >AreFaceWeig │ │ │ │ +0000c330: 6874 7346 6f72 4661 6365 4365 6e74 6572 htsForFaceCenter │ │ │ │ +0000c340: 733c 2f61 3e28 2920 3d3d 2064 7374 2e41 s() == dst.A │ │ │ │ +0000c350: 7265 4661 6365 5765 6967 6874 7346 6f72 reFaceWeightsFor │ │ │ │ +0000c360: 4661 6365 4365 6e74 6572 7328 2929 3b3c FaceCenters());< │ │ │ │ +0000c370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000c3c0: 3239 303c 2f73 7061 6e3e 203c 2f64 6976 290
    .
    291< │ │ │ │ +0000c420: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +0000c430: 2020 2020 2020 2020 2020 3c73 7061 6e20 for ( │ │ │ │ +0000c460: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i = 0; i &l │ │ │ │ +0000c490: 743b 2066 6163 6557 6569 6768 7443 6f75 t; faceWeightCou │ │ │ │ +0000c4a0: 6e74 3b20 2b2b 6929 207b 3c2f 6469 763e nt; ++i) {
    │ │ │ │ +0000c4b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000c4e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 292 │ │ │ │ +0000c510: 2020 2020 2020 2020 2020 2020 2064 7374 dst │ │ │ │ +0000c520: 2e46 6163 6557 6569 6768 7428 6929 203d .FaceWeight(i) = │ │ │ │ +0000c530: 2064 7374 436f 6566 6620 2a20 6473 742e dstCoeff * dst. │ │ │ │ +0000c540: 4661 6365 5765 6967 6874 2869 2920 2b20 FaceWeight(i) + │ │ │ │ +0000c550: 7468 6973 436f 6566 6620 2a20 7468 6973 thisCoeff * this │ │ │ │ +0000c560: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->FaceWeight │ │ │ │ +0000c5c0: 3c2f 613e 2869 293b 3c2f 6469 763e 0a3c (i);
    .< │ │ │ │ +0000c5d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000c5e0: 3e3c 6120 6964 3d22 6c30 3032 3933 2220 > 293 │ │ │ │ +0000c630: 2020 2020 2020 207d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ +0000c640: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000c650: 3e3c 6120 6964 3d22 6c30 3032 3934 2220 > 294 │ │ │ │ +0000c6a0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    295 │ │ │ │ +0000c700: 2020 2020 2020 2020 2020 207d 3c2f 6469 }.
    296 │ │ │ │ +0000c760: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ │ +0000c770: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ +0000c790: 3c61 2069 643d 226c 3030 3239 3722 206e 297
    .
    298 │ │ │ │ +0000c830: 2020 3c73 7061 6e20 636c 6173 733d 226b private< │ │ │ │ +0000c850: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    . │ │ │ │ +0000c870: 3c61 2069 643d 226c 3030 3239 3922 206e 299 Weight │ │ │ │ +0000c910: 3c2f 613e 2a20 5f76 5765 6967 6874 733b * _vWeights; │ │ │ │ +0000c920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000c970: 2033 3030 3c2f 7370 616e 3e20 2020 2020 300 │ │ │ │ +0000c980: 2020 203c 6120 636c 6173 733d 2263 6f64 Weight* _ │ │ │ │ +0000c9e0: 6557 6569 6768 7473 3b3c 2f64 6976 3e0a eWeights;
    . │ │ │ │ +0000c9f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    302 │ │ │ │ +0000cb10: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +0000cb30: 6e74 3c2f 7370 616e 3e20 5f76 436f 756e nt _vCoun │ │ │ │ +0000cb40: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    303 │ │ │ │ +0000cba0: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +0000cbc0: 6e74 3c2f 7370 616e 3e20 5f65 436f 756e nt _eCoun │ │ │ │ +0000cbd0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    304 │ │ │ │ +0000cc30: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +0000cc50: 6e74 3c2f 7370 616e 3e20 5f66 436f 756e nt _fCoun │ │ │ │ +0000cc60: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    305 │ │ │ │ +0000ccc0: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ │ +0000cce0: 6f6f 6c3c 2f73 7061 6e3e 205f 6657 6569 ool _fWei │ │ │ │ +0000ccf0: 6768 7473 466f 7243 656e 7465 7273 3b3c ghtsForCenters;< │ │ │ │ +0000cd00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000cd50: 3330 363c 2f73 7061 6e3e 2020 2020 7d3b 306 }; │ │ │ │ +0000cd60: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ │ +0000cd80: 3c61 2069 643d 226c 3030 3330 3722 206e 307};
    .
    .
    308< │ │ │ │ +0000ce20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0000ce40: 3c61 2069 643d 226c 3030 3330 3922 206e 309
    .
    310//.
    31 │ │ │ │ +0000cf50: 313c 2f73 7061 6e3e 3c73 7061 6e20 636c 1// │ │ │ │ +0000cf70: 2020 4372 6561 7365 2061 6e64 2063 6f72 Crease and cor │ │ │ │ +0000cf80: 6e65 7220 6d61 736b 7320 6172 6520 636f ner masks are co │ │ │ │ +0000cf90: 6d6d 6f6e 2074 6f20 6d6f 7374 2073 6368 mmon to most sch │ │ │ │ +0000cfa0: 656d 6573 202d 2d20 7468 6520 7265 7374 emes -- the rest │ │ │ │ +0000cfb0: 206e 6565 6420 746f 2062 6520 7072 6f76 need to be prov │ │ │ │ +0000cfc0: 6964 6564 3c2f 7370 616e 3e3c 2f64 6976 ided
    .
    312< │ │ │ │ +0000d020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +0000d040: 666f 7220 6561 6368 2053 6368 656d 6520 for each Scheme │ │ │ │ +0000d050: 7370 6563 6961 6c69 7a61 7469 6f6e 2e3c specialization.< │ │ │ │ +0000d060: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0000d080: 6120 6964 3d22 6c30 3033 3133 2220 6e61 a id="l00313" na │ │ │ │ +0000d090: 6d65 3d22 6c30 3033 3133 223e 3c2f 613e me="l00313"> │ │ │ │ +0000d0a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 313// │ │ │ │ +0000d0e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000d130: 2033 3134 3c2f 7370 616e 3e3c 7370 616e 314template │ │ │ │ +0000d160: 2026 6c74 3b53 6368 656d 6554 7970 6520 <SchemeType │ │ │ │ +0000d170: 5343 4845 4d45 2667 743b 3c2f 6469 763e SCHEME>
    │ │ │ │ +0000d180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000d1b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 315templ │ │ │ │ +0000d1f0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ │ +0000d200: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000d210: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename EDGE, typename │ │ │ │ +0000d250: 204d 4153 4b26 6774 3b3c 2f64 6976 3e0a MASK>
    . │ │ │ │ +0000d260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0000d290: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 316inline │ │ │ │ +0000d2d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c void.
    .
    317 │ │ │ │ +0000d3e0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d Scheme&l │ │ │ │ +0000d440: 743b 5343 4845 4d45 2667 743b 3a3a 6173 t;SCHEME>::as │ │ │ │ +0000d450: 7369 676e 4372 6561 7365 4d61 736b 466f signCreaseMaskFo │ │ │ │ +0000d460: 7245 6467 653c 2f61 3e28 4544 4745 203c rEdge(EDGE < │ │ │ │ +0000d470: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0000d480: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const&, MASK& │ │ │ │ +0000d4a0: 3b20 6d61 736b 293c 7370 616e 2063 6c61 ; mask) co │ │ │ │ +0000d4c0: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    318 │ │ │ │ +0000d520: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0000d530: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000d540: 3e3c 6120 6964 3d22 6c30 3033 3139 2220 > 319
    mask.SetN │ │ │ │ +0000d590: 756d 5665 7274 6578 5765 6967 6874 7328 umVertexWeights( │ │ │ │ +0000d5a0: 3229 3b3c 2f64 6976 3e0a 3c64 6976 2063 2);
    .
    320 │ │ │ │ +0000d600: 2020 6d61 736b 2e53 6574 4e75 6d45 6467 mask.SetNumEdg │ │ │ │ +0000d610: 6557 6569 6768 7473 2830 293b 3c2f 6469 eWeights(0);.
    321 │ │ │ │ +0000d670: 3c2f 7370 616e 3e20 2020 206d 6173 6b2e mask. │ │ │ │ +0000d680: 5365 744e 756d 4661 6365 5765 6967 6874 SetNumFaceWeight │ │ │ │ +0000d690: 7328 3029 3b3c 2f64 6976 3e0a 3c64 6976 s(0);
    .
    < │ │ │ │ +0000d6d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000d6e0: 6e6f 223e 2020 3332 323c 2f73 7061 6e3e no"> 322 │ │ │ │ +0000d6f0: 2020 2020 6d61 736b 2e53 6574 4661 6365 mask.SetFace │ │ │ │ +0000d700: 5765 6967 6874 7346 6f72 4661 6365 4365 WeightsForFaceCe │ │ │ │ +0000d710: 6e74 6572 7328 3c73 7061 6e20 636c 6173 nters(fals │ │ │ │ +0000d730: 653c 2f73 7061 6e3e 293b 3c2f 6469 763e e);
    │ │ │ │ +0000d740: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0000d7b0: 6120 6964 3d22 6c30 3033 3234 2220 6e61 a id="l00324" na │ │ │ │ +0000d7c0: 6d65 3d22 6c30 3033 3234 223e 3c2f 613e me="l00324"> │ │ │ │ +0000d7d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 324 mask.Vertex │ │ │ │ +0000d800: 5765 6967 6874 2830 2920 3d20 302e 3566 Weight(0) = 0.5f │ │ │ │ +0000d810: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +0000d860: 2020 3332 353c 2f73 7061 6e3e 2020 2020 325 │ │ │ │ +0000d870: 6d61 736b 2e56 6572 7465 7857 6569 6768 mask.VertexWeigh │ │ │ │ +0000d880: 7428 3129 203d 2030 2e35 663b 3c2f 6469 t(1) = 0.5f;.
    326 │ │ │ │ +0000d8e0: 3c2f 7370 616e 3e7d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ +0000d8f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0000d940: 3332 373c 2f73 7061 6e3e 203c 2f64 6976 327
    .
    328< │ │ │ │ +0000d9a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ +0000d9c0: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ +0000d9d0: 5363 6865 6d65 5479 7065 2053 4348 454d SchemeType SCHEM │ │ │ │ +0000d9e0: 4526 6774 3b3c 2f64 6976 3e0a 3c64 6976 E>
    .
    < │ │ │ │ +0000da20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000da30: 6e6f 223e 2020 3332 393c 2f73 7061 6e3e no"> 329 │ │ │ │ +0000da40: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ +0000da80: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +0000da90: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ +0000dab0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ +0000dac0: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ +0000dae0: 6120 6964 3d22 6c30 3033 3330 2220 6e61 a id="l00330" na │ │ │ │ +0000daf0: 6d65 3d22 6c30 3033 3330 223e 3c2f 613e me="l00330"> │ │ │ │ +0000db00: 3c73 7061 6e20 636c 6173 733d 226c 696e 330inline
    v │ │ │ │ +0000db60: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ +0000db70: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ +0000dc00: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +0000dc10: 7265 663d 2261 3031 3333 332e 6874 6d6c ref="a01333.html │ │ │ │ +0000dc20: 2361 3737 3634 3466 3639 6564 6530 3366 #a77644f69ede03f │ │ │ │ +0000dc30: 6136 3232 3232 6436 3061 3939 3937 3032 a62222d60a999702 │ │ │ │ +0000dc40: 3338 223e 2020 3333 313c 2f61 3e3c 2f73 38"> 331Scheme<S │ │ │ │ +0000dcb0: 4348 454d 4526 6774 3b3a 3a61 7373 6967 CHEME>::assig │ │ │ │ +0000dcc0: 6e43 6f72 6e65 724d 6173 6b46 6f72 5665 nCornerMaskForVe │ │ │ │ +0000dcd0: 7274 6578 3c2f 613e 2856 4552 5445 5820 rtex(VERTEX │ │ │ │ +0000dce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const&, MASK&am │ │ │ │ +0000dd10: 703b 206d 6173 6b29 3c73 7061 6e20 636c p; mask) c │ │ │ │ +0000dd30: 6f6e 7374 203c 2f73 7061 6e3e 7b3c 2f64 onst {.
    33 │ │ │ │ +0000dd90: 323c 2f73 7061 6e3e 203c 2f64 6976 3e0a 2
    . │ │ │ │ +0000dda0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    334 │ │ │ │ +0000de70: 2020 206d 6173 6b2e 5365 744e 756d 4564 mask.SetNumEd │ │ │ │ +0000de80: 6765 5765 6967 6874 7328 3029 3b3c 2f64 geWeights(0);.
    33 │ │ │ │ +0000dee0: 353c 2f73 7061 6e3e 2020 2020 6d61 736b 5 mask │ │ │ │ +0000def0: 2e53 6574 4e75 6d46 6163 6557 6569 6768 .SetNumFaceWeigh │ │ │ │ +0000df00: 7473 2830 293b 3c2f 6469 763e 0a3c 6469 ts(0);
    .< │ │ │ │ +0000df20: 6120 6964 3d22 6c30 3033 3336 2220 6e61 a id="l00336" na │ │ │ │ +0000df30: 6d65 3d22 6c30 3033 3336 223e 3c2f 613e me="l00336"> │ │ │ │ +0000df40: 3c73 7061 6e20 636c 6173 733d 226c 696e 336 mask.SetFac │ │ │ │ +0000df70: 6557 6569 6768 7473 466f 7246 6163 6543 eWeightsForFaceC │ │ │ │ +0000df80: 656e 7465 7273 283c 7370 616e 2063 6c61 enters(fal │ │ │ │ +0000dfa0: 7365 3c2f 7370 616e 3e29 3b3c 2f64 6976 se);
    .
    337< │ │ │ │ +0000e000: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0000e020: 3c61 2069 643d 226c 3030 3333 3822 206e 338 mask.Verte │ │ │ │ +0000e070: 7857 6569 6768 7428 3029 203d 2031 2e30 xWeight(0) = 1.0 │ │ │ │ +0000e080: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    339}.
    .
    < │ │ │ │ +0000e120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000e130: 6e6f 223e 2020 3334 303c 2f73 7061 6e3e no"> 340 │ │ │ │ +0000e140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +0000e190: 2020 3334 313c 2f73 7061 6e3e 203c 2f64 341 .
    34 │ │ │ │ +0000e1f0: 323c 2f73 7061 6e3e 3c73 7061 6e20 636c 2// │ │ │ │ +0000e210: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0000e230: 3c61 2069 643d 226c 3030 3334 3322 206e 343// The │ │ │ │ +0000e290: 636f 6d70 7574 6174 696f 6e20 6f66 2061 computation of a │ │ │ │ +0000e2a0: 2066 6163 652d 7665 7274 6578 206d 6173 face-vertex mas │ │ │ │ +0000e2b0: 6b20 6973 2074 7269 7669 616c 2061 6e64 k is trivial and │ │ │ │ +0000e2c0: 2063 6f6e 7369 7374 656e 7420 666f 7220 consistent for │ │ │ │ +0000e2d0: 616c 6c20 7363 6865 6d65 733a 3c2f 7370 all schemes:
    .
    344//.
    34 │ │ │ │ +0000e3b0: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5te │ │ │ │ +0000e3d0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ │ +0000e3e0: 743b 5363 6865 6d65 5479 7065 2053 4348 t;SchemeType SCH │ │ │ │ +0000e3f0: 454d 4526 6774 3b3c 2f64 6976 3e0a 3c64 EME>
    . │ │ │ │ +0000e410: 3c61 2069 643d 226c 3030 3334 3622 206e 346template │ │ │ │ +0000e470: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename FACE, ty │ │ │ │ +0000e4c0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ +0000e4d0: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ +0000e4f0: 6120 6964 3d22 6c30 3033 3437 2220 6e61 a id="l00347" na │ │ │ │ +0000e500: 6d65 3d22 6c30 3033 3437 223e 3c2f 613e me="l00347"> │ │ │ │ +0000e510: 3c73 7061 6e20 636c 6173 733d 226c 696e 347void< │ │ │ │ +0000e550: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    ..
    │ │ │ │ +0000e630: 2020 3334 383c 2f61 3e3c 2f73 7061 6e3e 348 │ │ │ │ +0000e640: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Scheme<SCHEM │ │ │ │ +0000e6a0: 4526 6774 3b3a 3a43 6f6d 7075 7465 4661 E>::ComputeFa │ │ │ │ +0000e6b0: 6365 5665 7274 6578 4d61 736b 3c2f 613e ceVertexMask │ │ │ │ +0000e6c0: 2846 4143 4520 3c73 7061 6e20 636c 6173 (FACE cons │ │ │ │ +0000e6e0: 743c 2f73 7061 6e3e 2661 6d70 3b20 6661 t& fa │ │ │ │ +0000e6f0: 6365 2c20 4d41 534b 2661 6d70 3b20 6d61 ce, MASK& ma │ │ │ │ +0000e700: 736b 293c 7370 616e 2063 6c61 7373 3d22 sk) const │ │ │ │ +0000e720: 3c2f 7370 616e 3e7b 3c2f 6469 763e 0a3c {
    .< │ │ │ │ +0000e730: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000e740: 3e3c 6120 6964 3d22 6c30 3033 3439 2220 > 349
    .
    350 │ │ │ │ +0000e7e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +0000e800: 3c2f 7370 616e 3e20 7665 7274 436f 756e vertCoun │ │ │ │ +0000e810: 7420 3d20 6661 6365 2e47 6574 4e75 6d56 t = face.GetNumV │ │ │ │ +0000e820: 6572 7469 6365 7328 293b 3c2f 6469 763e ertices();
    │ │ │ │ +0000e830: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0000e8a0: 6120 6964 3d22 6c30 3033 3532 2220 6e61 a id="l00352" na │ │ │ │ +0000e8b0: 6d65 3d22 6c30 3033 3532 223e 3c2f 613e me="l00352"> │ │ │ │ +0000e8c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 352 mask.SetNum │ │ │ │ +0000e8f0: 5665 7274 6578 5765 6967 6874 7328 7665 VertexWeights(ve │ │ │ │ +0000e900: 7274 436f 756e 7429 3b3c 2f64 6976 3e0a rtCount);
    . │ │ │ │ +0000e910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    354 │ │ │ │ +0000e9e0: 206d 6173 6b2e 5365 744e 756d 4661 6365 mask.SetNumFace │ │ │ │ +0000e9f0: 5765 6967 6874 7328 3029 3b3c 2f64 6976 Weights(0);
    .
    355< │ │ │ │ +0000ea50: 2f73 7061 6e3e 2020 2020 6d61 736b 2e53 /span> mask.S │ │ │ │ +0000ea60: 6574 4661 6365 5765 6967 6874 7346 6f72 etFaceWeightsFor │ │ │ │ +0000ea70: 4661 6365 4365 6e74 6572 7328 3c73 7061 FaceCenters(false); │ │ │ │ +0000eaa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000eaf0: 2033 3536 3c2f 7370 616e 3e20 3c2f 6469 356 .
    357 │ │ │ │ +0000eb50: 3c2f 7370 616e 3e20 2020 203c 7370 616e typename │ │ │ │ +0000eb80: 204d 4153 4b3a 3a57 6569 6768 7420 7657 MASK::Weight vW │ │ │ │ +0000eb90: 6569 6768 7420 3d20 312e 3066 202f 2028 eight = 1.0f / ( │ │ │ │ +0000eba0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename MASK::Weig │ │ │ │ +0000ebd0: 6874 2920 7665 7274 436f 756e 743b 3c2f ht) vertCount;.
    3 │ │ │ │ +0000ec30: 3538 3c2f 7370 616e 3e20 2020 203c 7370 58 for (int │ │ │ │ +0000ec80: 3c2f 7370 616e 3e20 6920 3d20 303b 2069 i = 0; i │ │ │ │ +0000ec90: 2026 6c74 3b20 7665 7274 436f 756e 743b < vertCount; │ │ │ │ +0000eca0: 202b 2b69 2920 7b3c 2f64 6976 3e0a 3c64 ++i) {
    . │ │ │ │ +0000ecc0: 3c61 2069 643d 226c 3030 3335 3922 206e 359 mask.V │ │ │ │ +0000ed10: 6572 7465 7857 6569 6768 7428 6929 203d ertexWeight(i) = │ │ │ │ +0000ed20: 2076 5765 6967 6874 3b3c 2f64 6976 3e0a vWeight;
    . │ │ │ │ +0000ed30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +0000ed90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ..
    362 │ │ │ │ +0000ee40: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ 0000ee50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0000ee60: 3e3c 6120 6964 3d22 6c30 3038 3237 2220 > 827 PATCH │ │ │ │ -0000eeb0: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ -0000eec0: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ -0000eed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -0000ef00: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 828 PAT │ │ │ │ -0000ef30: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ -0000ef40: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ -0000ef80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000ef90: 6e6f 223e 2020 3832 393c 2f73 7061 6e3e no"> 829 │ │ │ │ -0000efa0: 2020 2020 2020 2020 3c61 2063 6c61 7373 CpuEvaluator │ │ │ │ -0000efe0: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ -0000f000: 3c2f 7370 616e 3e20 2a69 6e73 7461 6e63 *instanc │ │ │ │ -0000f010: 6520 3d20 4e55 4c4c 2c3c 2f64 6976 3e0a e = NULL,
    . │ │ │ │ -0000f020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    831< │ │ │ │ -0000f110: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0000f130: 3c61 2069 643d 226c 3030 3833 3222 206e 832 (void) │ │ │ │ -0000f180: 696e 7374 616e 6365 3b20 2020 2020 2020 instance; │ │ │ │ -0000f190: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // unused< │ │ │ │ -0000f1b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0000f1d0: 6120 6964 3d22 6c30 3038 3333 2220 6e61 a id="l00833" na │ │ │ │ -0000f1e0: 6d65 3d22 6c30 3038 3333 223e 3c2f 613e me="l00833"> │ │ │ │ -0000f1f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 833 (void)d │ │ │ │ -0000f220: 6576 6963 6543 6f6e 7465 7874 3b20 203c eviceContext; < │ │ │ │ -0000f230: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0000f240: 656e 7422 3e2f 2f20 756e 7573 6564 3c2f ent">// unused
    .
    < │ │ │ │ -0000f290: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -0000f2a0: 6e6f 223e 2020 3833 343c 2f73 7061 6e3e no"> 834 │ │ │ │ -0000f2b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0000f300: 2020 3833 353c 2f73 7061 6e3e 2020 2020 835 │ │ │ │ -0000f310: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -0000f330: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn Eva │ │ │ │ -0000f390: 6c50 6174 6368 6573 3c2f 613e 2873 7263 lPatches(src │ │ │ │ -0000f3a0: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ -0000f3b0: 7075 4275 6666 6572 2829 2c20 7372 6344 puBuffer(), srcD │ │ │ │ -0000f3c0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    836 │ │ │ │ -0000f420: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000f430: 2020 2020 2020 2020 2020 6473 7442 7566 dstBuf │ │ │ │ -0000f440: 6665 722d 2667 743b 4269 6e64 4370 7542 fer->BindCpuB │ │ │ │ -0000f450: 7566 6665 7228 292c 2064 7374 4465 7363 uffer(), dstDesc │ │ │ │ -0000f460: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000f4b0: 2020 3833 373c 2f73 7061 6e3e 2020 2020 837 │ │ │ │ -0000f4c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000f4d0: 2020 2020 2020 206e 756d 5061 7463 6843 numPatchC │ │ │ │ -0000f4e0: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ -0000f500: 6120 6964 3d22 6c30 3038 3338 2220 6e61 a id="l00838" na │ │ │ │ -0000f510: 6d65 3d22 6c30 3038 3338 223e 3c2f 613e me="l00838"> │ │ │ │ -0000f520: 3c73 7061 6e20 636c 6173 733d 226c 696e 838 │ │ │ │ -0000f550: 2020 2020 2020 2020 2020 2020 283c 7370 (const │ │ │ │ -0000f580: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Pat │ │ │ │ -0000f5b0: 6368 436f 6f72 643c 2f61 3e2a 2970 6174 chCoord*)pat │ │ │ │ -0000f5c0: 6368 436f 6f72 6473 2d26 6774 3b42 696e chCoords->Bin │ │ │ │ -0000f5d0: 6443 7075 4275 6666 6572 2829 2c3c 2f64 dCpuBuffer(),.
    83 │ │ │ │ -0000f630: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ -0000f640: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000f650: 2020 2070 6174 6368 5461 626c 652d 2667 patchTable-&g │ │ │ │ -0000f660: 743b 4765 7456 6172 7969 6e67 5061 7463 t;GetVaryingPatc │ │ │ │ -0000f670: 6841 7272 6179 4275 6666 6572 2829 2c3c hArrayBuffer(),< │ │ │ │ -0000f680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000f6d0: 3834 303c 2f73 7061 6e3e 2020 2020 2020 840 │ │ │ │ -0000f6e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000f6f0: 2020 2020 2070 6174 6368 5461 626c 652d patchTable- │ │ │ │ -0000f700: 2667 743b 4765 7456 6172 7969 6e67 5061 >GetVaryingPa │ │ │ │ -0000f710: 7463 6849 6e64 6578 4275 6666 6572 2829 tchIndexBuffer() │ │ │ │ -0000f720: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000f770: 2020 3834 313c 2f73 7061 6e3e 2020 2020 841 │ │ │ │ -0000f780: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000f790: 2020 2020 2020 2070 6174 6368 5461 626c patchTabl │ │ │ │ -0000f7a0: 652d 2667 743b 4765 7450 6174 6368 5061 e->GetPatchPa │ │ │ │ -0000f7b0: 7261 6d42 7566 6665 7228 2929 3b3c 2f64 ramBuffer());.
    84 │ │ │ │ -0000f810: 323c 2f73 7061 6e3e 2020 2020 7d3c 2f64 2 }.
    .
    843 │ │ │ │ -0000f880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0000f8d0: 2038 3834 3c2f 7370 616e 3e20 2020 203c 884 < │ │ │ │ -0000f8e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000f8f0: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ │ -0000f920: 7970 656e 616d 653c 2f73 7061 6e3e 2053 ypename S │ │ │ │ -0000f930: 5243 5f42 5546 4645 522c 203c 7370 616e RC_BUFFER, typename │ │ │ │ -0000f960: 2044 5354 5f42 5546 4645 522c 3c2f 6469 DST_BUFFER,.
    885 │ │ │ │ -0000f9c0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -0000f9d0: 2020 2020 203c 7370 616e 2063 6c61 7373 typen │ │ │ │ -0000f9f0: 616d 653c 2f73 7061 6e3e 2050 4154 4348 ame PATCH │ │ │ │ -0000fa00: 434f 4f52 445f 4255 4646 4552 2c20 3c73 COORD_BUFFER, typename PATCH_TABLE& │ │ │ │ -0000fa40: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ │ -0000fa90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    887 │ │ │ │ -0000fc40: 2020 2020 2020 5352 435f 4255 4646 4552 SRC_BUFFER │ │ │ │ -0000fc50: 202a 7372 6342 7566 6665 722c 203c 6120 *srcBuffer, Buffer │ │ │ │ -0000fc90: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -0000fca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0000fcb0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &srcDesc,< │ │ │ │ -0000fcd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0000fd20: 3838 383c 2f73 7061 6e3e 2020 2020 2020 888 │ │ │ │ -0000fd30: 2020 4453 545f 4255 4646 4552 202a 6473 DST_BUFFER *ds │ │ │ │ -0000fd40: 7442 7566 6665 722c 203c 6120 636c 6173 tBuffer, BufferDesc │ │ │ │ -0000fd80: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -0000fdb0: 6d70 3b64 7374 4465 7363 2c3c 2f64 6976 mp;dstDesc,
    .
    889< │ │ │ │ -0000fe10: 2f73 7061 6e3e 2020 2020 2020 2020 4453 /span> DS │ │ │ │ -0000fe20: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ -0000fe30: 6572 2c20 203c 6120 636c 6173 733d 2263 er, BufferDescript │ │ │ │ -0000fe70: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ -0000fe90: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ -0000fea0: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ -0000fec0: 6120 6964 3d22 6c30 3038 3930 2220 6e61 a id="l00890" na │ │ │ │ -0000fed0: 6d65 3d22 6c30 3038 3930 223e 3c2f 613e me="l00890"> │ │ │ │ -0000fee0: 3c73 7061 6e20 636c 6173 733d 226c 696e 890 DST_BUF │ │ │ │ -0000ff10: 4645 5220 2a64 7642 7566 6665 722c 2020 FER *dvBuffer, │ │ │ │ -0000ff20: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ -0000ff50: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &dvDesc │ │ │ │ -0000ff90: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -0000ffe0: 2020 3839 313c 2f73 7061 6e3e 2020 2020 891 │ │ │ │ -0000fff0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -00010010: 743c 2f73 7061 6e3e 206e 756d 5061 7463 t numPatc │ │ │ │ -00010020: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ -00010030: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00010040: 3e3c 6120 6964 3d22 6c30 3038 3932 2220 > 892 PATCH │ │ │ │ -00010090: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ -000100a0: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ -000100b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000100e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 893 PAT │ │ │ │ -00010110: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ -00010120: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ -00010160: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00010170: 6e6f 223e 2020 3839 343c 2f73 7061 6e3e no"> 894 │ │ │ │ -00010180: 2020 2020 2020 2020 3c61 2063 6c61 7373 CpuEvaluator │ │ │ │ -000101c0: 3c2f 613e 203c 7370 616e 2063 6c61 7373 const │ │ │ │ -000101e0: 3c2f 7370 616e 3e20 2a69 6e73 7461 6e63 *instanc │ │ │ │ -000101f0: 6520 3d20 4e55 4c4c 2c3c 2f64 6976 3e0a e = NULL,
    . │ │ │ │ -00010200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    896< │ │ │ │ -000102f0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -00010310: 3c61 2069 643d 226c 3030 3839 3722 206e 897 (void) │ │ │ │ -00010360: 696e 7374 616e 6365 3b20 2020 2020 2020 instance; │ │ │ │ -00010370: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // unused< │ │ │ │ -00010390: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -000103b0: 6120 6964 3d22 6c30 3038 3938 2220 6e61 a id="l00898" na │ │ │ │ -000103c0: 6d65 3d22 6c30 3038 3938 223e 3c2f 613e me="l00898"> │ │ │ │ -000103d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 898 (void)d │ │ │ │ -00010400: 6576 6963 6543 6f6e 7465 7874 3b20 203c eviceContext; < │ │ │ │ -00010410: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00010420: 656e 7422 3e2f 2f20 756e 7573 6564 3c2f ent">// unused
    .
    < │ │ │ │ -00010470: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00010480: 6e6f 223e 2020 3839 393c 2f73 7061 6e3e no"> 899 │ │ │ │ -00010490: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -000104e0: 2020 3930 303c 2f73 7061 6e3e 2020 2020 900 │ │ │ │ -000104f0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -00010510: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn Eva │ │ │ │ -00010570: 6c50 6174 6368 6573 3c2f 613e 2873 7263 lPatches(src │ │ │ │ -00010580: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ -00010590: 7075 4275 6666 6572 2829 2c20 7372 6344 puBuffer(), srcD │ │ │ │ -000105a0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    901 │ │ │ │ -00010600: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00010610: 2020 2020 2020 2020 2020 6473 7442 7566 dstBuf │ │ │ │ -00010620: 6665 722d 2667 743b 4269 6e64 4370 7542 fer->BindCpuB │ │ │ │ -00010630: 7566 6665 7228 292c 2064 7374 4465 7363 uffer(), dstDesc │ │ │ │ -00010640: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00010690: 2020 3930 323c 2f73 7061 6e3e 2020 2020 902 │ │ │ │ -000106a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000106b0: 2020 2020 2020 2064 7542 7566 6665 722d duBuffer- │ │ │ │ -000106c0: 2667 743b 4269 6e64 4370 7542 7566 6665 >BindCpuBuffe │ │ │ │ -000106d0: 7228 292c 2020 6475 4465 7363 2c3c 2f64 r(), duDesc,.
    90 │ │ │ │ -00010730: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ -00010740: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00010750: 2020 2064 7642 7566 6665 722d 2667 743b dvBuffer-> │ │ │ │ -00010760: 4269 6e64 4370 7542 7566 6665 7228 292c BindCpuBuffer(), │ │ │ │ -00010770: 2020 6476 4465 7363 2c3c 2f64 6976 3e0a dvDesc,
    . │ │ │ │ -00010780: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000107b0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 904 │ │ │ │ -000107e0: 2020 2020 2020 2020 2020 2020 2020 206e n │ │ │ │ -000107f0: 756d 5061 7463 6843 6f6f 7264 732c 3c2f umPatchCoords,.
    9 │ │ │ │ -00010850: 3035 3c2f 7370 616e 3e20 2020 2020 2020 05 │ │ │ │ -00010860: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00010870: 2020 2020 283c 7370 616e 2063 6c61 7373 (const │ │ │ │ -00010890: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 PatchCoord< │ │ │ │ -000108d0: 2f61 3e2a 2970 6174 6368 436f 6f72 6473 /a>*)patchCoords │ │ │ │ -000108e0: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -000108f0: 6572 2829 2c3c 2f64 6976 3e0a 3c64 6976 er(),
    .
    < │ │ │ │ -00010930: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00010940: 6e6f 223e 2020 3930 363c 2f73 7061 6e3e no"> 906 │ │ │ │ -00010950: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00010960: 2020 2020 2020 2020 2020 2070 6174 6368 patch │ │ │ │ -00010970: 5461 626c 652d 2667 743b 4765 7456 6172 Table->GetVar │ │ │ │ -00010980: 7969 6e67 5061 7463 6841 7272 6179 4275 yingPatchArrayBu │ │ │ │ -00010990: 6666 6572 2829 2c3c 2f64 6976 3e0a 3c64 ffer(),
    . │ │ │ │ -000109b0: 3c61 2069 643d 226c 3030 3930 3722 206e 907 │ │ │ │ -00010a00: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ -00010a10: 6368 5461 626c 652d 2667 743b 4765 7456 chTable->GetV │ │ │ │ -00010a20: 6172 7969 6e67 5061 7463 6849 6e64 6578 aryingPatchIndex │ │ │ │ -00010a30: 4275 6666 6572 2829 2c3c 2f64 6976 3e0a Buffer(),
    . │ │ │ │ -00010a40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -00010b10: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00010b20: 6e6f 223e 2020 3930 393c 2f73 7061 6e3e no"> 909 │ │ │ │ -00010b30: 2020 2020 7d3c 2f64 6976 3e0a 3c2f 6469 }
    ..
    910 │ │ │ │ -00010b90: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00010ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00010bb0: 3e3c 6120 6964 3d22 6c30 3039 3639 2220 > 969 tem │ │ │ │ -00010c10: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ │ -00010c20: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ │ -00010c40: 2f73 7061 6e3e 2053 5243 5f42 5546 4645 /span> SRC_BUFFE │ │ │ │ -00010c50: 522c 203c 7370 616e 2063 6c61 7373 3d22 R, typenam │ │ │ │ -00010c70: 653c 2f73 7061 6e3e 2044 5354 5f42 5546 e DST_BUF │ │ │ │ -00010c80: 4645 522c 3c2f 6469 763e 0a3c 6469 7620 FER,
    .
    970 │ │ │ │ -00010ce0: 2020 2020 2020 2020 2020 2020 203c 7370 typename PATCHCOORD_BU │ │ │ │ -00010d20: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ -00010d40: 6e61 6d65 3c2f 7370 616e 3e20 5041 5443 name PATC │ │ │ │ -00010d50: 485f 5441 424c 4526 6774 3b3c 2f64 6976 H_TABLE>
    .
    .
    │ │ │ │ -00010df0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 971 s │ │ │ │ -00010e60: 7461 7469 633c 2f73 7061 6e3e 203c 7370 tatic bool EvalPatchesV │ │ │ │ -00010ef0: 6172 7969 6e67 3c2f 613e 283c 2f64 6976 arying(
    .
    972< │ │ │ │ -00010f50: 2f73 7061 6e3e 2020 2020 2020 2020 5352 /span> SR │ │ │ │ -00010f60: 435f 4255 4646 4552 202a 7372 6342 7566 C_BUFFER *srcBuf │ │ │ │ -00010f70: 6665 722c 203c 6120 636c 6173 733d 2263 fer, BufferDescript │ │ │ │ -00010fb0: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ -00010fd0: 7374 3c2f 7370 616e 3e20 2661 6d70 3b73 st &s │ │ │ │ -00010fe0: 7263 4465 7363 2c3c 2f64 6976 3e0a 3c64 rcDesc,
    . │ │ │ │ -00011000: 3c61 2069 643d 226c 3030 3937 3322 206e 973 DST_BU │ │ │ │ -00011050: 4646 4552 202a 6473 7442 7566 6665 722c FFER *dstBuffer, │ │ │ │ -00011060: 203c 6120 636c 6173 733d 2263 6f64 6520 Bu │ │ │ │ -00011090: 6666 6572 4465 7363 7269 7074 6f72 3c2f fferDescriptor const &dstDe │ │ │ │ -000110d0: 7363 2c3c 2f64 6976 3e0a 3c64 6976 2063 sc,
    .
    974 │ │ │ │ -00011130: 2020 2020 2020 4453 545f 4255 4646 4552 DST_BUFFER │ │ │ │ -00011140: 202a 6475 4275 6666 6572 2c20 203c 6120 *duBuffer, Buffer │ │ │ │ -00011180: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -00011190: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000111a0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &duDesc,.
    9 │ │ │ │ -00011210: 3735 3c2f 7370 616e 3e20 2020 2020 2020 75 │ │ │ │ -00011220: 2044 5354 5f42 5546 4645 5220 2a64 7642 DST_BUFFER *dvB │ │ │ │ -00011230: 7566 6665 722c 2020 3c61 2063 6c61 7373 uffer, BufferDescr │ │ │ │ -00011270: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ -00011290: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ -000112a0: 703b 6476 4465 7363 2c3c 2f64 6976 3e0a p;dvDesc,
    . │ │ │ │ -000112b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -000113d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000113e0: 6e6f 223e 2020 3937 373c 2f73 7061 6e3e no"> 977 │ │ │ │ -000113f0: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ -00011400: 4552 202a 6475 7642 7566 6665 722c 203c ER *duvBuffer, < │ │ │ │ -00011410: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00011420: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -00011430: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ -00011440: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ -00011450: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &duvDesc │ │ │ │ -00011480: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -000114d0: 2020 3937 383c 2f73 7061 6e3e 2020 2020 978 │ │ │ │ -000114e0: 2020 2020 4453 545f 4255 4646 4552 202a DST_BUFFER * │ │ │ │ -000114f0: 6476 7642 7566 6665 722c 203c 6120 636c dvvBuffer, BufferDe │ │ │ │ -00011530: 7363 7269 7074 6f72 3c2f 613e 203c 7370 scriptor const │ │ │ │ -00011560: 2661 6d70 3b64 7676 4465 7363 2c3c 2f64 &dvvDesc,.
    97 │ │ │ │ -000115c0: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ -000115d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int numPatchCoo │ │ │ │ -00011600: 7264 732c 3c2f 6469 763e 0a3c 6469 7620 rds,
    .
    980 │ │ │ │ -00011660: 2020 2020 2020 2050 4154 4348 434f 4f52 PATCHCOOR │ │ │ │ -00011670: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ -00011680: 6f6f 7264 732c 3c2f 6469 763e 0a3c 6469 oords,
    .< │ │ │ │ -000116a0: 6120 6964 3d22 6c30 3039 3831 2220 6e61 a id="l00981" na │ │ │ │ -000116b0: 6d65 3d22 6c30 3039 3831 223e 3c2f 613e me="l00981"> │ │ │ │ -000116c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 981 PATCH_T │ │ │ │ -000116f0: 4142 4c45 202a 7061 7463 6854 6162 6c65 ABLE *patchTable │ │ │ │ -00011700: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00011750: 2020 3938 323c 2f73 7061 6e3e 2020 2020 982 │ │ │ │ -00011760: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ -00011790: 4370 7545 7661 6c75 6174 6f72 3c2f 613e CpuEvaluator │ │ │ │ -000117a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const *instance = │ │ │ │ -000117d0: 4e55 4c4c 2c3c 2f64 6976 3e0a 3c64 6976 NULL,
    .
    < │ │ │ │ -00011810: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00011820: 6e6f 223e 2020 3938 333c 2f73 7061 6e3e no"> 983 │ │ │ │ -00011830: 2020 2020 2020 2020 3c73 7061 6e20 636c void * │ │ │ │ -00011860: 6465 7669 6365 436f 6e74 6578 7420 3d20 deviceContext = │ │ │ │ -00011870: 4e55 4c4c 2920 7b3c 2f64 6976 3e0a 3c64 NULL) {
    . │ │ │ │ -00011890: 3c61 2069 643d 226c 3030 3938 3422 206e 984
    .
    985 │ │ │ │ -00011930: 2020 2020 2020 2876 6f69 6429 696e 7374 (void)inst │ │ │ │ -00011940: 616e 6365 3b20 2020 2020 2020 3c73 7061 ance; // unused
    .
    986 │ │ │ │ -000119d0: 2020 2020 2028 766f 6964 2964 6576 6963 (void)devic │ │ │ │ -000119e0: 6543 6f6e 7465 7874 3b20 203c 7370 616e eContext; // unused
    .
    │ │ │ │ -00011a60: 2020 3938 373c 2f73 7061 6e3e 203c 2f64 987 .
    98 │ │ │ │ -00011ac0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ -00011ad0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -00011af0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 EvalPat │ │ │ │ -00011b50: 6368 6573 3c2f 613e 2873 7263 4275 6666 ches(srcBuff │ │ │ │ -00011b60: 6572 2d26 6774 3b42 696e 6443 7075 4275 er->BindCpuBu │ │ │ │ -00011b70: 6666 6572 2829 2c20 7372 6344 6573 632c ffer(), srcDesc, │ │ │ │ -00011b80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00011bd0: 2039 3839 3c2f 7370 616e 3e20 2020 2020 989 │ │ │ │ -00011be0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011bf0: 2020 2020 2020 6473 7442 7566 6665 722d dstBuffer- │ │ │ │ -00011c00: 2667 743b 4269 6e64 4370 7542 7566 6665 >BindCpuBuffe │ │ │ │ -00011c10: 7228 292c 2064 7374 4465 7363 2c3c 2f64 r(), dstDesc,.
    99 │ │ │ │ -00011c70: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ -00011c80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011c90: 2020 2064 7542 7566 6665 722d 2667 743b duBuffer-> │ │ │ │ -00011ca0: 4269 6e64 4370 7542 7566 6665 7228 292c BindCpuBuffer(), │ │ │ │ -00011cb0: 2020 6475 4465 7363 2c3c 2f64 6976 3e0a duDesc,
    . │ │ │ │ -00011cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -00011d90: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00011da0: 6e6f 223e 2020 3939 323c 2f73 7061 6e3e no"> 992 │ │ │ │ -00011db0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011dc0: 2020 2020 2020 2020 2020 2064 7575 4275 duuBu │ │ │ │ -00011dd0: 6666 6572 2d26 6774 3b42 696e 6443 7075 ffer->BindCpu │ │ │ │ -00011de0: 4275 6666 6572 2829 2c20 6475 7544 6573 Buffer(), duuDes │ │ │ │ -00011df0: 632c 3c2f 6469 763e 0a3c 6469 7620 636c c,
    .
    993 │ │ │ │ -00011e50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011e60: 2020 2020 2020 2020 6475 7642 7566 6665 duvBuffe │ │ │ │ -00011e70: 722d 2667 743b 4269 6e64 4370 7542 7566 r->BindCpuBuf │ │ │ │ -00011e80: 6665 7228 292c 2064 7576 4465 7363 2c3c fer(), duvDesc,< │ │ │ │ -00011e90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00011ee0: 3939 343c 2f73 7061 6e3e 2020 2020 2020 994 │ │ │ │ -00011ef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011f00: 2020 2020 2064 7676 4275 6666 6572 2d26 dvvBuffer-& │ │ │ │ -00011f10: 6774 3b42 696e 6443 7075 4275 6666 6572 gt;BindCpuBuffer │ │ │ │ -00011f20: 2829 2c20 6476 7644 6573 632c 3c2f 6469 (), dvvDesc,.
    995 │ │ │ │ -00011f80: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00011f90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00011fa0: 2020 6e75 6d50 6174 6368 436f 6f72 6473 numPatchCoords │ │ │ │ -00011fb0: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00012000: 2020 3939 363c 2f73 7061 6e3e 2020 2020 996 │ │ │ │ -00012010: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00012020: 2020 2020 2020 2028 3c73 7061 6e20 636c (co │ │ │ │ -00012040: 6e73 743c 2f73 7061 6e3e 203c 6120 636c nst PatchCoo │ │ │ │ -00012080: 7264 3c2f 613e 2a29 7061 7463 6843 6f6f rd*)patchCoo │ │ │ │ -00012090: 7264 732d 2667 743b 4269 6e64 4370 7542 rds->BindCpuB │ │ │ │ -000120a0: 7566 6665 7228 292c 3c2f 6469 763e 0a3c uffer(),
    .< │ │ │ │ -000120b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000120c0: 3e3c 6120 6964 3d22 6c30 3039 3937 2220 > 997 │ │ │ │ -00012110: 2020 2020 2020 2020 2020 2020 2020 7061 pa │ │ │ │ -00012120: 7463 6854 6162 6c65 2d26 6774 3b47 6574 tchTable->Get │ │ │ │ -00012130: 5661 7279 696e 6750 6174 6368 4172 7261 VaryingPatchArra │ │ │ │ -00012140: 7942 7566 6665 7228 292c 3c2f 6469 763e yBuffer(),
    │ │ │ │ -00012150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00012180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 998 │ │ │ │ -000121b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000121c0: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ -000121d0: 6574 5661 7279 696e 6750 6174 6368 496e etVaryingPatchIn │ │ │ │ -000121e0: 6465 7842 7566 6665 7228 292c 3c2f 6469 dexBuffer(),.
    999 │ │ │ │ -00012240: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00012250: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00012260: 2020 7061 7463 6854 6162 6c65 2d26 6774 patchTable-> │ │ │ │ -00012270: 3b47 6574 5061 7463 6850 6172 616d 4275 ;GetPatchParamBu │ │ │ │ -00012280: 6666 6572 2829 293b 3c2f 6469 763e 0a3c ffer());
    .< │ │ │ │ -00012290: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000122a0: 3e3c 6120 6964 3d22 6c30 3130 3030 2220 > 1000 }
    .< │ │ │ │ -000122f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ -00012340: 3030 313c 2f73 7061 6e3e 203c 2f64 6976 001
    .
    1032< │ │ │ │ -000123a0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -000123c0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -000123d0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ │ -000123f0: 6d65 3c2f 7370 616e 3e20 5352 435f 4255 me SRC_BU │ │ │ │ -00012400: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ -00012420: 6e61 6d65 3c2f 7370 616e 3e20 4453 545f name DST_ │ │ │ │ -00012430: 4255 4646 4552 2c3c 2f64 6976 3e0a 3c64 BUFFER,
    . │ │ │ │ -00012450: 3c61 2069 643d 226c 3031 3033 3322 206e 1033
    │ │ │ │ -000124a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename PATCHCOORD │ │ │ │ -000124d0: 5f42 5546 4645 522c 203c 7370 616e 2063 _BUFFER, t │ │ │ │ -000124f0: 7970 656e 616d 653c 2f73 7061 6e3e 2050 ypename P │ │ │ │ -00012500: 4154 4348 5f54 4142 4c45 2667 743b 3c2f ATCH_TABLE>.
    .
    1034 static │ │ │ │ -00012620: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool EvalPatch │ │ │ │ -000126a0: 6573 4661 6365 5661 7279 696e 673c 2f61 esFaceVarying(
    .
    1035 │ │ │ │ -00012710: 2020 2020 2053 5243 5f42 5546 4645 5220 SRC_BUFFER │ │ │ │ -00012720: 2a73 7263 4275 6666 6572 2c20 3c61 2063 *srcBuffer, BufferD │ │ │ │ -00012760: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ -00012790: 2026 616d 703b 7372 6344 6573 632c 3c2f &srcDesc,.
    10 │ │ │ │ -000127f0: 3336 3c2f 7370 616e 3e20 2020 2020 2020 36 │ │ │ │ -00012800: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ -00012810: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ -00012850: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ -00012870: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ -00012880: 703b 6473 7444 6573 632c 3c2f 6469 763e p;dstDesc,
    │ │ │ │ -00012890: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -000128c0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1037 int numPatchCoords │ │ │ │ -00012920: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00012970: 2031 3033 383c 2f73 7061 6e3e 2020 2020 1038 │ │ │ │ -00012980: 2020 2020 5041 5443 4843 4f4f 5244 5f42 PATCHCOORD_B │ │ │ │ -00012990: 5546 4645 5220 2a70 6174 6368 436f 6f72 UFFER *patchCoor │ │ │ │ -000129a0: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    1039 │ │ │ │ -00012a00: 2020 2020 2020 5041 5443 485f 5441 424c PATCH_TABL │ │ │ │ -00012a10: 4520 2a70 6174 6368 5461 626c 652c 3c2f E *patchTable,.
    10 │ │ │ │ -00012a70: 3430 3c2f 7370 616e 3e20 2020 2020 2020 40 │ │ │ │ -00012a80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int fvarChanne │ │ │ │ -00012ab0: 6c2c 3c2f 6469 763e 0a3c 6469 7620 636c l,
    .
    1041 │ │ │ │ -00012b10: 2020 2020 203c 6120 636c 6173 733d 2263 CpuEvaluator const *instance = │ │ │ │ -00012b80: 204e 554c 4c2c 3c2f 6469 763e 0a3c 6469 NULL,
    .< │ │ │ │ -00012ba0: 6120 6964 3d22 6c30 3130 3432 2220 6e61 a id="l01042" na │ │ │ │ -00012bb0: 6d65 3d22 6c30 3130 3432 223e 3c2f 613e me="l01042"> │ │ │ │ -00012bc0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1042 void * │ │ │ │ -00012c10: 2064 6576 6963 6543 6f6e 7465 7874 203d deviceContext = │ │ │ │ -00012c20: 204e 554c 4c29 207b 3c2f 6469 763e 0a3c NULL) {
    .< │ │ │ │ -00012c30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00012c40: 3e3c 6120 6964 3d22 6c30 3130 3433 2220 > 1043
    .
    1044 │ │ │ │ -00012ce0: 2020 2020 2020 2028 766f 6964 2969 6e73 (void)ins │ │ │ │ -00012cf0: 7461 6e63 653b 2020 2020 2020 203c 7370 tance; // unused
    .
    1045 │ │ │ │ -00012d80: 2020 2020 2020 2876 6f69 6429 6465 7669 (void)devi │ │ │ │ -00012d90: 6365 436f 6e74 6578 743b 2020 3c73 7061 ceContext; // unused
    .
    1046 .
    10 │ │ │ │ -00012e70: 3437 3c2f 7370 616e 3e20 2020 2020 2020 47 │ │ │ │ -00012e80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -00012ea0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n EvalPa │ │ │ │ -00012f00: 7463 6865 733c 2f61 3e28 7372 6342 7566 tches(srcBuf │ │ │ │ -00012f10: 6665 722d 2667 743b 4269 6e64 4370 7542 fer->BindCpuB │ │ │ │ -00012f20: 7566 6665 7228 292c 2073 7263 4465 7363 uffer(), srcDesc │ │ │ │ -00012f30: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00012f80: 2031 3034 383c 2f73 7061 6e3e 2020 2020 1048 │ │ │ │ -00012f90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00012fa0: 2020 2020 2020 2064 7374 4275 6666 6572 dstBuffer │ │ │ │ -00012fb0: 2d26 6774 3b42 696e 6443 7075 4275 6666 ->BindCpuBuff │ │ │ │ -00012fc0: 6572 2829 2c20 6473 7444 6573 632c 3c2f er(), dstDesc,.
    10 │ │ │ │ -00013020: 3439 3c2f 7370 616e 3e20 2020 2020 2020 49 │ │ │ │ -00013030: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00013040: 2020 2020 6e75 6d50 6174 6368 436f 6f72 numPatchCoor │ │ │ │ -00013050: 6473 2c3c 2f64 6976 3e0a 3c64 6976 2063 ds,
    .
    1050 │ │ │ │ -000130b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000130c0: 2020 2020 2020 2020 2028 3c73 7061 6e20 ( │ │ │ │ -000130e0: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const PatchC │ │ │ │ -00013120: 6f6f 7264 3c2f 613e 2a29 7061 7463 6843 oord*)patchC │ │ │ │ -00013130: 6f6f 7264 732d 2667 743b 4269 6e64 4370 oords->BindCp │ │ │ │ -00013140: 7542 7566 6665 7228 292c 3c2f 6469 763e uBuffer(),
    │ │ │ │ -00013150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00013180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1051 │ │ │ │ -000131b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000131c0: 7061 7463 6854 6162 6c65 2d26 6774 3b47 patchTable->G │ │ │ │ -000131d0: 6574 4656 6172 5061 7463 6841 7272 6179 etFVarPatchArray │ │ │ │ -000131e0: 4275 6666 6572 2866 7661 7243 6861 6e6e Buffer(fvarChann │ │ │ │ -000131f0: 656c 292c 3c2f 6469 763e 0a3c 6469 7620 el),
    .
    1052 │ │ │ │ -00013250: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00013260: 2020 2020 2020 2020 2020 7061 7463 6854 patchT │ │ │ │ -00013270: 6162 6c65 2d26 6774 3b47 6574 4656 6172 able->GetFVar │ │ │ │ -00013280: 5061 7463 6849 6e64 6578 4275 6666 6572 PatchIndexBuffer │ │ │ │ -00013290: 2866 7661 7243 6861 6e6e 656c 292c 3c2f (fvarChannel),.
    10 │ │ │ │ -000132f0: 3533 3c2f 7370 616e 3e20 2020 2020 2020 53 │ │ │ │ -00013300: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00013310: 2020 2020 7061 7463 6854 6162 6c65 2d26 patchTable-& │ │ │ │ -00013320: 6774 3b47 6574 4656 6172 5061 7463 6850 gt;GetFVarPatchP │ │ │ │ -00013330: 6172 616d 4275 6666 6572 2866 7661 7243 aramBuffer(fvarC │ │ │ │ -00013340: 6861 6e6e 656c 2929 3b3c 2f64 6976 3e0a hannel));
    . │ │ │ │ -00013350: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ -000133b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00013400: 3130 3535 3c2f 7370 616e 3e20 3c2f 6469 1055 .
    1098 │ │ │ │ -00013460: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ │ -00013490: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ -000134b0: 616d 653c 2f73 7061 6e3e 2053 5243 5f42 ame SRC_B │ │ │ │ -000134c0: 5546 4645 522c 203c 7370 616e 2063 6c61 UFFER, typ │ │ │ │ -000134e0: 656e 616d 653c 2f73 7061 6e3e 2044 5354 ename DST │ │ │ │ -000134f0: 5f42 5546 4645 522c 3c2f 6469 763e 0a3c _BUFFER,
    .< │ │ │ │ -00013500: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00013510: 3e3c 6120 6964 3d22 6c30 3130 3939 2220 > 1099 │ │ │ │ -00013560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ │ -00013580: 2f73 7061 6e3e 2050 4154 4348 434f 4f52 /span> PATCHCOOR │ │ │ │ -00013590: 445f 4255 4646 4552 2c20 3c73 7061 6e20 D_BUFFER, │ │ │ │ -000135b0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ -000135c0: 5041 5443 485f 5441 424c 4526 6774 3b3c PATCH_TABLE>< │ │ │ │ -000135d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..
    1101 │ │ │ │ -000137d0: 2020 2020 2020 5352 435f 4255 4646 4552 SRC_BUFFER │ │ │ │ -000137e0: 202a 7372 6342 7566 6665 722c 203c 6120 *srcBuffer, Buffer │ │ │ │ -00013820: 4465 7363 7269 7074 6f72 3c2f 613e 203c Descriptor < │ │ │ │ -00013830: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00013840: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const &srcDesc,< │ │ │ │ -00013860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ -000138b0: 3130 323c 2f73 7061 6e3e 2020 2020 2020 102 │ │ │ │ -000138c0: 2020 4453 545f 4255 4646 4552 202a 6473 DST_BUFFER *ds │ │ │ │ -000138d0: 7442 7566 6665 722c 203c 6120 636c 6173 tBuffer, BufferDesc │ │ │ │ -00013910: 7269 7074 6f72 3c2f 613e 203c 7370 616e riptor const &a │ │ │ │ -00013940: 6d70 3b64 7374 4465 7363 2c3c 2f64 6976 mp;dstDesc,
    .
    1103< │ │ │ │ -000139a0: 2f73 7061 6e3e 2020 2020 2020 2020 4453 /span> DS │ │ │ │ -000139b0: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ -000139c0: 6572 2c20 203c 6120 636c 6173 733d 2263 er, BufferDescript │ │ │ │ -00013a00: 6f72 3c2f 613e 203c 7370 616e 2063 6c61 or con │ │ │ │ -00013a20: 7374 3c2f 7370 616e 3e20 2661 6d70 3b64 st &d │ │ │ │ -00013a30: 7544 6573 632c 3c2f 6469 763e 0a3c 6469 uDesc,
    .< │ │ │ │ -00013a50: 6120 6964 3d22 6c30 3131 3034 2220 6e61 a id="l01104" na │ │ │ │ -00013a60: 6d65 3d22 6c30 3131 3034 223e 3c2f 613e me="l01104"> │ │ │ │ -00013a70: 3c73 7061 6e20 636c 6173 733d 226c 696e 1104 DST_BUF │ │ │ │ -00013aa0: 4645 5220 2a64 7642 7566 6665 722c 2020 FER *dvBuffer, │ │ │ │ -00013ab0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Buf │ │ │ │ -00013ae0: 6665 7244 6573 6372 6970 746f 723c 2f61 ferDescriptor const
    &dvDesc │ │ │ │ -00013b20: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00013b70: 2031 3130 353c 2f73 7061 6e3e 2020 2020 1105 │ │ │ │ -00013b80: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -00013ba0: 743c 2f73 7061 6e3e 206e 756d 5061 7463 t numPatc │ │ │ │ -00013bb0: 6843 6f6f 7264 732c 3c2f 6469 763e 0a3c hCoords,
    .< │ │ │ │ -00013bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00013bd0: 3e3c 6120 6964 3d22 6c30 3131 3036 2220 > 1106 PATCH │ │ │ │ -00013c20: 434f 4f52 445f 4255 4646 4552 202a 7061 COORD_BUFFER *pa │ │ │ │ -00013c30: 7463 6843 6f6f 7264 732c 3c2f 6469 763e tchCoords,
    │ │ │ │ -00013c40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00013c70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1107 PAT │ │ │ │ -00013ca0: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ -00013cb0: 6162 6c65 2c3c 2f64 6976 3e0a 3c64 6976 able,
    .
    < │ │ │ │ -00013cf0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00013d00: 6e6f 223e 2031 3130 383c 2f73 7061 6e3e no"> 1108 │ │ │ │ -00013d10: 2020 2020 2020 2020 3c73 7061 6e20 636c int fva │ │ │ │ -00013d40: 7243 6861 6e6e 656c 2c3c 2f64 6976 3e0a rChannel,
    . │ │ │ │ -00013d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -00013d80: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1109 CpuEvalu │ │ │ │ -00013de0: 6174 6f72 3c2f 613e 203c 7370 616e 2063 ator c │ │ │ │ -00013e00: 6f6e 7374 3c2f 7370 616e 3e20 2a69 6e73 onst *ins │ │ │ │ -00013e10: 7461 6e63 6520 3d20 4e55 4c4c 2c3c 2f64 tance = NULL,.
    111 │ │ │ │ -00013e70: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ │ -00013e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 void * deviceCo │ │ │ │ -00013eb0: 6e74 6578 7420 3d20 4e55 4c4c 2920 7b3c ntext = NULL) {< │ │ │ │ -00013ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ -00013f10: 3131 313c 2f73 7061 6e3e 203c 2f64 6976 111
    .
    1112< │ │ │ │ -00013f70: 2f73 7061 6e3e 2020 2020 2020 2020 2876 /span> (v │ │ │ │ -00013f80: 6f69 6429 696e 7374 616e 6365 3b20 2020 oid)instance; │ │ │ │ -00013f90: 2020 2020 3c73 7061 6e20 636c 6173 733d // unu │ │ │ │ -00013fb0: 7365 643c 2f73 7061 6e3e 3c2f 6469 763e sed
    │ │ │ │ -00013fc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00013ff0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1113 (vo │ │ │ │ -00014020: 6964 2964 6576 6963 6543 6f6e 7465 7874 id)deviceContext │ │ │ │ -00014030: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // unus │ │ │ │ -00014050: 6564 3c2f 7370 616e 3e3c 2f64 6976 3e0a ed
    . │ │ │ │ -00014060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ -000140f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014100: 6e6f 223e 2031 3131 353c 2f73 7061 6e3e no"> 1115 │ │ │ │ -00014110: 2020 2020 2020 2020 3c73 7061 6e20 636c return │ │ │ │ -00014140: 3c61 2063 6c61 7373 3d22 636f 6465 2068 EvalPatches │ │ │ │ -000141a0: 2873 7263 4275 6666 6572 2d26 6774 3b42 (srcBuffer->B │ │ │ │ -000141b0: 696e 6443 7075 4275 6666 6572 2829 2c20 indCpuBuffer(), │ │ │ │ -000141c0: 7372 6344 6573 632c 3c2f 6469 763e 0a3c srcDesc,
    .< │ │ │ │ -000141d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000141e0: 3e3c 6120 6964 3d22 6c30 3131 3136 2220 > 1116 │ │ │ │ -00014230: 2020 2020 2020 2020 2020 2020 2020 6473 ds │ │ │ │ -00014240: 7442 7566 6665 722d 2667 743b 4269 6e64 tBuffer->Bind │ │ │ │ -00014250: 4370 7542 7566 6665 7228 292c 2064 7374 CpuBuffer(), dst │ │ │ │ -00014260: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ -000142a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -000142b0: 6e6f 223e 2031 3131 373c 2f73 7061 6e3e no"> 1117 │ │ │ │ -000142c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000142d0: 2020 2020 2020 2020 2020 2064 7542 7566 duBuf │ │ │ │ -000142e0: 6665 722d 2667 743b 4269 6e64 4370 7542 fer->BindCpuB │ │ │ │ -000142f0: 7566 6665 7228 292c 2020 6475 4465 7363 uffer(), duDesc │ │ │ │ -00014300: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ │ -00014350: 2031 3131 383c 2f73 7061 6e3e 2020 2020 1118 │ │ │ │ -00014360: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00014370: 2020 2020 2020 2064 7642 7566 6665 722d dvBuffer- │ │ │ │ -00014380: 2667 743b 4269 6e64 4370 7542 7566 6665 >BindCpuBuffe │ │ │ │ -00014390: 7228 292c 2020 6476 4465 7363 2c3c 2f64 r(), dvDesc,.
    111 │ │ │ │ -000143f0: 393c 2f73 7061 6e3e 2020 2020 2020 2020 9 │ │ │ │ -00014400: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00014410: 2020 206e 756d 5061 7463 6843 6f6f 7264 numPatchCoord │ │ │ │ -00014420: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    1120 │ │ │ │ -00014480: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00014490: 2020 2020 2020 2020 283c 7370 616e 2063 (c │ │ │ │ -000144b0: 6f6e 7374 3c2f 7370 616e 3e20 3c61 2063 onst PatchCo │ │ │ │ -000144f0: 6f72 643c 2f61 3e2a 2970 6174 6368 436f ord*)patchCo │ │ │ │ -00014500: 6f72 6473 2d26 6774 3b42 696e 6443 7075 ords->BindCpu │ │ │ │ -00014510: 4275 6666 6572 2829 2c3c 2f64 6976 3e0a Buffer(),
    . │ │ │ │ -00014520: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    1122 │ │ │ │ -00014620: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00014630: 2020 2020 2020 2020 2070 6174 6368 5461 patchTa │ │ │ │ -00014640: 626c 652d 2667 743b 4765 7446 5661 7250 ble->GetFVarP │ │ │ │ -00014650: 6174 6368 496e 6465 7842 7566 6665 7228 atchIndexBuffer( │ │ │ │ -00014660: 6676 6172 4368 616e 6e65 6c29 2c3c 2f64 fvarChannel),.
    112 │ │ │ │ -000146c0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ │ -000146d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000146e0: 2020 2070 6174 6368 5461 626c 652d 2667 patchTable-&g │ │ │ │ -000146f0: 743b 4765 7446 5661 7250 6174 6368 5061 t;GetFVarPatchPa │ │ │ │ -00014700: 7261 6d42 7566 6665 7228 6676 6172 4368 ramBuffer(fvarCh │ │ │ │ -00014710: 616e 6e65 6c29 293b 3c2f 6469 763e 0a3c annel));
    .< │ │ │ │ -00014720: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00014730: 3e3c 6120 6964 3d22 6c30 3131 3234 2220 > 1124
    }
    .< │ │ │ │ -00014780: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    1 │ │ │ │ -000147d0: 3132 353c 2f73 7061 6e3e 203c 2f64 6976 125
    .
    1186< │ │ │ │ -00014830: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ -00014850: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -00014860: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ │ -00014880: 6d65 3c2f 7370 616e 3e20 5352 435f 4255 me SRC_BU │ │ │ │ -00014890: 4646 4552 2c20 3c73 7061 6e20 636c 6173 FFER, type │ │ │ │ -000148b0: 6e61 6d65 3c2f 7370 616e 3e20 4453 545f name DST_ │ │ │ │ -000148c0: 4255 4646 4552 2c3c 2f64 6976 3e0a 3c64 BUFFER,
    . │ │ │ │ -000148e0: 3c61 2069 643d 226c 3031 3138 3722 206e 1187 │ │ │ │ -00014930: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename PATCHCOORD │ │ │ │ -00014960: 5f42 5546 4645 522c 203c 7370 616e 2063 _BUFFER, t │ │ │ │ -00014980: 7970 656e 616d 653c 2f73 7061 6e3e 2050 ypename P │ │ │ │ -00014990: 4154 4348 5f54 4142 4c45 2667 743b 3c2f ATCH_TABLE>.
    .
    1188 static │ │ │ │ -00014ab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool EvalPatch │ │ │ │ -00014b30: 6573 4661 6365 5661 7279 696e 673c 2f61 esFaceVarying(
    .
    1189 │ │ │ │ -00014ba0: 2020 2020 2053 5243 5f42 5546 4645 5220 SRC_BUFFER │ │ │ │ -00014bb0: 2a73 7263 4275 6666 6572 2c20 3c61 2063 *srcBuffer, BufferD │ │ │ │ -00014bf0: 6573 6372 6970 746f 723c 2f61 3e20 3c73 escriptor const │ │ │ │ -00014c20: 2026 616d 703b 7372 6344 6573 632c 3c2f &srcDesc,.
    11 │ │ │ │ -00014c80: 3930 3c2f 7370 616e 3e20 2020 2020 2020 90 │ │ │ │ -00014c90: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ -00014ca0: 4275 6666 6572 2c20 3c61 2063 6c61 7373 Buffer, BufferDescr │ │ │ │ -00014ce0: 6970 746f 723c 2f61 3e20 3c73 7061 6e20 iptor │ │ │ │ -00014d00: 636f 6e73 743c 2f73 7061 6e3e 2026 616d const &am │ │ │ │ -00014d10: 703b 6473 7444 6573 632c 3c2f 6469 763e p;dstDesc,
    │ │ │ │ -00014d20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00014d50: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1191 DST │ │ │ │ -00014d80: 5f42 5546 4645 5220 2a64 7542 7566 6665 _BUFFER *duBuffe │ │ │ │ -00014d90: 722c 2020 3c61 2063 6c61 7373 3d22 636f r, BufferDescripto │ │ │ │ -00014dd0: 723c 2f61 3e20 3c73 7061 6e20 636c 6173 r cons │ │ │ │ -00014df0: 743c 2f73 7061 6e3e 2026 616d 703b 6475 t &du │ │ │ │ -00014e00: 4465 7363 2c3c 2f64 6976 3e0a 3c64 6976 Desc,
    .
    < │ │ │ │ -00014e40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00014e50: 6e6f 223e 2031 3139 323c 2f73 7061 6e3e no"> 1192 │ │ │ │ -00014e60: 2020 2020 2020 2020 4453 545f 4255 4646 DST_BUFF │ │ │ │ -00014e70: 4552 202a 6476 4275 6666 6572 2c20 203c ER *dvBuffer, < │ │ │ │ -00014e80: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00014e90: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ │ -00014ea0: 3031 3133 332e 6874 6d6c 223e 4275 6666 01133.html">Buff │ │ │ │ -00014eb0: 6572 4465 7363 7269 7074 6f72 3c2f 613e erDescriptor │ │ │ │ -00014ec0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const &dvDesc, │ │ │ │ -00014ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00014f40: 3131 3933 3c2f 7370 616e 3e20 2020 2020 1193 │ │ │ │ -00014f50: 2020 2044 5354 5f42 5546 4645 5220 2a64 DST_BUFFER *d │ │ │ │ -00014f60: 7575 4275 6666 6572 2c20 3c61 2063 6c61 uuBuffer, BufferDes │ │ │ │ -00014fa0: 6372 6970 746f 723c 2f61 3e20 3c73 7061 criptor const & │ │ │ │ -00014fd0: 616d 703b 6475 7544 6573 632c 3c2f 6469 amp;duuDesc,.
    1194 │ │ │ │ -00015030: 3c2f 7370 616e 3e20 2020 2020 2020 2044 D │ │ │ │ -00015040: 5354 5f42 5546 4645 5220 2a64 7576 4275 ST_BUFFER *duvBu │ │ │ │ -00015050: 6666 6572 2c20 3c61 2063 6c61 7373 3d22 ffer, BufferDescrip │ │ │ │ -00015090: 746f 723c 2f61 3e20 3c73 7061 6e20 636c tor co │ │ │ │ -000150b0: 6e73 743c 2f73 7061 6e3e 2026 616d 703b nst & │ │ │ │ -000150c0: 6475 7644 6573 632c 3c2f 6469 763e 0a3c duvDesc,
    .< │ │ │ │ -000150d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000150e0: 3e3c 6120 6964 3d22 6c30 3131 3935 2220 > 1195 DST_B │ │ │ │ -00015130: 5546 4645 5220 2a64 7676 4275 6666 6572 UFFER *dvvBuffer │ │ │ │ -00015140: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , B │ │ │ │ -00015170: 7566 6665 7244 6573 6372 6970 746f 723c ufferDescriptor< │ │ │ │ -00015180: 2f61 3e20 3c73 7061 6e20 636c 6173 733d /a> const< │ │ │ │ -000151a0: 2f73 7061 6e3e 2026 616d 703b 6476 7644 /span> &dvvD │ │ │ │ -000151b0: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1196 │ │ │ │ -00015210: 2020 2020 2020 203c 7370 616e 2063 6c61 int numP │ │ │ │ -00015240: 6174 6368 436f 6f72 6473 2c3c 2f64 6976 atchCoords,
    .
    1197< │ │ │ │ -000152a0: 2f73 7061 6e3e 2020 2020 2020 2020 5041 /span> PA │ │ │ │ -000152b0: 5443 4843 4f4f 5244 5f42 5546 4645 5220 TCHCOORD_BUFFER │ │ │ │ -000152c0: 2a70 6174 6368 436f 6f72 6473 2c3c 2f64 *patchCoords,.
    119 │ │ │ │ -00015320: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ -00015330: 5041 5443 485f 5441 424c 4520 2a70 6174 PATCH_TABLE *pat │ │ │ │ -00015340: 6368 5461 626c 652c 3c2f 6469 763e 0a3c chTable,
    .< │ │ │ │ -00015350: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00015360: 3e3c 6120 6964 3d22 6c30 3131 3939 2220 > 1199 int │ │ │ │ -000153d0: 6676 6172 4368 616e 6e65 6c2c 3c2f 6469 fvarChannel,.
    1200 │ │ │ │ -00015430: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ -00015440: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ -00015450: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ -00015460: 3131 3537 2e68 746d 6c22 3e43 7075 4576 1157.html">CpuEv │ │ │ │ -00015470: 616c 7561 746f 723c 2f61 3e20 3c73 7061 aluator const * │ │ │ │ -000154a0: 696e 7374 616e 6365 203d 204e 554c 4c2c instance = NULL, │ │ │ │ -000154b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00015500: 3132 3031 3c2f 7370 616e 3e20 2020 2020 1201 │ │ │ │ -00015510: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -00015530: 643c 2f73 7061 6e3e 202a 2064 6576 6963 d * devic │ │ │ │ -00015540: 6543 6f6e 7465 7874 203d 204e 554c 4c29 eContext = NULL) │ │ │ │ -00015550: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    1202 .
    12 │ │ │ │ -00015600: 3033 3c2f 7370 616e 3e20 2020 2020 2020 03 │ │ │ │ -00015610: 2028 766f 6964 2969 6e73 7461 6e63 653b (void)instance; │ │ │ │ -00015620: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -00015640: 756e 7573 6564 3c2f 7370 616e 3e3c 2f64 unused.
    120 │ │ │ │ -000156a0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ │ -000156b0: 2876 6f69 6429 6465 7669 6365 436f 6e74 (void)deviceCont │ │ │ │ -000156c0: 6578 743b 2020 3c73 7061 6e20 636c 6173 ext; // u │ │ │ │ -000156e0: 6e75 7365 643c 2f73 7061 6e3e 3c2f 6469 nused.
    1205 │ │ │ │ -00015740: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00015750: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00015760: 3e3c 6120 6964 3d22 6c30 3132 3036 2220 > 1206 return EvalPatches< │ │ │ │ -00015830: 2f61 3e28 7372 6342 7566 6665 722d 2667 /a>(srcBuffer-&g │ │ │ │ -00015840: 743b 4269 6e64 4370 7542 7566 6665 7228 t;BindCpuBuffer( │ │ │ │ -00015850: 292c 2073 7263 4465 7363 2c3c 2f64 6976 ), srcDesc,
    .
    1207< │ │ │ │ -000158b0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ -000158c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000158d0: 2064 7374 4275 6666 6572 2d26 6774 3b42 dstBuffer->B │ │ │ │ -000158e0: 696e 6443 7075 4275 6666 6572 2829 2c20 indCpuBuffer(), │ │ │ │ -000158f0: 6473 7444 6573 632c 3c2f 6469 763e 0a3c dstDesc,
    .< │ │ │ │ -00015900: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00015910: 3e3c 6120 6964 3d22 6c30 3132 3038 2220 > 1208 │ │ │ │ -00015960: 2020 2020 2020 2020 2020 2020 2020 6475 du │ │ │ │ -00015970: 4275 6666 6572 2d26 6774 3b42 696e 6443 Buffer->BindC │ │ │ │ -00015980: 7075 4275 6666 6572 2829 2c20 2064 7544 puBuffer(), duD │ │ │ │ -00015990: 6573 632c 3c2f 6469 763e 0a3c 6469 7620 esc,
    .
    1209 │ │ │ │ -000159f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015a00: 2020 2020 2020 2020 2020 6476 4275 6666 dvBuff │ │ │ │ -00015a10: 6572 2d26 6774 3b42 696e 6443 7075 4275 er->BindCpuBu │ │ │ │ -00015a20: 6666 6572 2829 2c20 2064 7644 6573 632c ffer(), dvDesc, │ │ │ │ -00015a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00015a80: 3132 3130 3c2f 7370 616e 3e20 2020 2020 1210 │ │ │ │ -00015a90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015aa0: 2020 2020 2020 6475 7542 7566 6665 722d duuBuffer- │ │ │ │ -00015ab0: 2667 743b 4269 6e64 4370 7542 7566 6665 >BindCpuBuffe │ │ │ │ -00015ac0: 7228 292c 2064 7575 4465 7363 2c3c 2f64 r(), duuDesc,.
    121 │ │ │ │ -00015b20: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ │ -00015b30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015b40: 2020 2064 7576 4275 6666 6572 2d26 6774 duvBuffer-> │ │ │ │ -00015b50: 3b42 696e 6443 7075 4275 6666 6572 2829 ;BindCpuBuffer() │ │ │ │ -00015b60: 2c20 6475 7644 6573 632c 3c2f 6469 763e , duvDesc,
    │ │ │ │ -00015b70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ -00015ba0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 1212 │ │ │ │ -00015bd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015be0: 6476 7642 7566 6665 722d 2667 743b 4269 dvvBuffer->Bi │ │ │ │ -00015bf0: 6e64 4370 7542 7566 6665 7228 292c 2064 ndCpuBuffer(), d │ │ │ │ -00015c00: 7676 4465 7363 2c3c 2f64 6976 3e0a 3c64 vvDesc,
    . │ │ │ │ -00015c20: 3c61 2069 643d 226c 3031 3231 3322 206e 1213 │ │ │ │ -00015c70: 2020 2020 2020 2020 2020 2020 206e 756d num │ │ │ │ -00015c80: 5061 7463 6843 6f6f 7264 732c 3c2f 6469 PatchCoords,.
    1214 │ │ │ │ -00015ce0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ -00015cf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015d00: 2020 283c 7370 616e 2063 6c61 7373 3d22 (const PatchCoord*)patchCoords-& │ │ │ │ -00015d70: 6774 3b42 696e 6443 7075 4275 6666 6572 gt;BindCpuBuffer │ │ │ │ -00015d80: 2829 2c3c 2f64 6976 3e0a 3c64 6976 2063 (),
    .
    1215 │ │ │ │ -00015de0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015df0: 2020 2020 2020 2020 2070 6174 6368 5461 patchTa │ │ │ │ -00015e00: 626c 652d 2667 743b 4765 7446 5661 7250 ble->GetFVarP │ │ │ │ -00015e10: 6174 6368 4172 7261 7942 7566 6665 7228 atchArrayBuffer( │ │ │ │ -00015e20: 6676 6172 4368 616e 6e65 6c29 2c3c 2f64 fvarChannel),.
    121 │ │ │ │ -00015e80: 363c 2f73 7061 6e3e 2020 2020 2020 2020 6 │ │ │ │ -00015e90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00015ea0: 2020 2070 6174 6368 5461 626c 652d 2667 patchTable-&g │ │ │ │ -00015eb0: 743b 4765 7446 5661 7250 6174 6368 496e t;GetFVarPatchIn │ │ │ │ -00015ec0: 6465 7842 7566 6665 7228 6676 6172 4368 dexBuffer(fvarCh │ │ │ │ -00015ed0: 616e 6e65 6c29 2c3c 2f64 6976 3e0a 3c64 annel),
    . │ │ │ │ -00015ef0: 3c61 2069 643d 226c 3031 3231 3722 206e 1217 │ │ │ │ -00015f40: 2020 2020 2020 2020 2020 2020 2070 6174 pat │ │ │ │ -00015f50: 6368 5461 626c 652d 2667 743b 4765 7446 chTable->GetF │ │ │ │ -00015f60: 5661 7250 6174 6368 5061 7261 6d42 7566 VarPatchParamBuf │ │ │ │ -00015f70: 6665 7228 6676 6172 4368 616e 6e65 6c29 fer(fvarChannel) │ │ │ │ -00015f80: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    1218 │ │ │ │ -00015fe0: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ │ -00015ff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ -00016080: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00016090: 6e6f 223e 2031 3232 353c 2f73 7061 6e3e no"> 1225 │ │ │ │ -000160a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    . │ │ │ │ -00016100: 3c61 2069 643d 226c 3031 3232 3722 206e 1227 │ │ │ │ -00016180: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ │ -00016190: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000161a0: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord">static voi │ │ │ │ -000161d0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d Synchr │ │ │ │ -00016230: 6f6e 697a 653c 2f61 3e28 3c73 7061 6e20 onize(void │ │ │ │ -00016260: 2a20 3c73 7061 6e20 636c 6173 733d 2263 * /*device │ │ │ │ -00016280: 436f 6e74 6578 7420 3d20 4e55 4c4c 2a2f Context = NULL*/ │ │ │ │ -00016290: 3c2f 7370 616e 3e29 207b 3c2f 6469 763e ) {
    │ │ │ │ -000162a0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    < │ │ │ │ -00016360: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ -00016370: 6e6f 223e 2031 3232 393c 2f73 7061 6e3e no"> 1229 │ │ │ │ -00016380: 2020 2020 7d3c 2f64 6976 3e0a 3c2f 6469 }
    ..
    1230 │ │ │ │ -000163e0: 3c2f 7370 616e 3e7d 3b3c 2f64 6976 3e0a };
    . │ │ │ │ -000163f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00016440: 3132 3331 3c2f 7370 616e 3e20 3c2f 6469 1231 .
    1232 │ │ │ │ -000164a0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -000164b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000164c0: 3e3c 6120 6964 3d22 6c30 3132 3333 2220 > 1233} // e │ │ │ │ -00016520: 6e64 206e 616d 6573 7061 6365 204f 7364 nd namespace Osd │ │ │ │ -00016530: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00016550: 3c61 2069 643d 226c 3031 3233 3422 206e 1234
    .
    1235} │ │ │ │ -000165f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // end na │ │ │ │ -00016610: 6d65 7370 6163 6520 4f50 454e 5355 4244 mespace OPENSUBD │ │ │ │ -00016620: 4956 5f56 4552 5349 4f4e 3c2f 7370 616e IV_VERSION
    .
    │ │ │ │ -00016680: 2031 3233 363c 2f73 7061 6e3e 3c73 7061 1236using namespac │ │ │ │ -000166b0: 6520 3c2f 7370 616e 3e4f 5045 4e53 5542 e OPENSUB │ │ │ │ -000166c0: 4449 565f 5645 5253 494f 4e3b 3c2f 6469 DIV_VERSION;.
    1237 │ │ │ │ -00016720: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00016730: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00016740: 3e3c 6120 6964 3d22 6c30 3132 3338 2220 > 1238} // e │ │ │ │ -000167a0: 6e64 206e 616d 6573 7061 6365 204f 7065 nd namespace Ope │ │ │ │ -000167b0: 6e53 7562 6469 763c 2f73 7061 6e3e 3c2f nSubdiv.
    12 │ │ │ │ -00016810: 3339 3c2f 7370 616e 3e20 3c2f 6469 763e 39
    │ │ │ │ -00016820: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00016890: 6120 6964 3d22 6c30 3132 3431 2220 6e61 a id="l01241" na │ │ │ │ -000168a0: 6d65 3d22 6c30 3132 3431 223e 3c2f 613e me="l01241"> │ │ │ │ -000168b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 1241#end │ │ │ │ -000168f0: 6966 2020 3c2f 7370 616e 3e3c 7370 616e if // OPENSUBDIV3_ │ │ │ │ -00016920: 4f53 445f 4350 555f 4556 414c 5541 544f OSD_CPU_EVALUATO │ │ │ │ -00016930: 525f 483c 2f73 7061 6e3e 3c2f 6469 763e R_H
    │ │ │ │ -00016940: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    Op │ │ │ │ -00016990: 656e 5375 6264 6976 3c2f 613e 3c2f 6469 enSubdiv
    Definiti │ │ │ │ -000169c0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on limit │ │ │ │ -000169f0: 732e 683a 3332 3c2f 613e 3c2f 6469 763e s.h:32
    │ │ │ │ -00016a00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    OpenSubdiv:: │ │ │ │ -00016a60: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ -00016a70: 4f4e 3a3a 4f73 643a 3a42 7566 6665 7244 ON::Osd::BufferD │ │ │ │ -00016a80: 6573 6372 6970 746f 723c 2f61 3e3c 2f64 escriptor
    BufferDesc │ │ │ │ -00016ab0: 7269 7074 6f72 2069 7320 6120 7374 7275 riptor is a stru │ │ │ │ -00016ac0: 6374 2077 6869 6368 2064 6573 6372 6962 ct which describ │ │ │ │ -00016ad0: 6573 2062 7566 6665 7220 656c 656d 656e es buffer elemen │ │ │ │ -00016ae0: 7473 2069 6e20 696e 7465 726c 6561 7665 ts in interleave │ │ │ │ -00016af0: 6420 6461 7461 2062 7566 6665 7273 2e2e d data buffers.. │ │ │ │ -00016b00: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ -00016b20: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition bufferDescripto │ │ │ │ -00016b60: 722e 683a 3631 3c2f 613e 3c2f 6469 763e r.h:61
    │ │ │ │ -00016b70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -00016c00: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -00016c10: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ │ -00016c20: 2f62 3e20 3c61 2068 7265 663d 2261 3030 /b> cpuEvalu │ │ │ │ -00016c50: 6174 6f72 2e68 3a33 393c 2f61 3e3c 2f64 ator.h:39
    .static bool Ev │ │ │ │ -00016d70: 616c 5061 7463 6865 7346 6163 6556 6172 alPatchesFaceVar │ │ │ │ -00016d80: 7969 6e67 2853 5243 5f42 5546 4645 5220 ying(SRC_BUFFER │ │ │ │ -00016d90: 2a73 7263 4275 6666 6572 2c20 4275 6666 *srcBuffer, Buff │ │ │ │ -00016da0: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ -00016db0: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ -00016dc0: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ -00016dd0: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ -00016de0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ -00016df0: 616d 703b 6473 7444 6573 632c 2069 6e74 amp;dstDesc, int │ │ │ │ -00016e00: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ -00016e10: 2050 4154 4348 434f 4f52 445f 4255 4646 PATCHCOORD_BUFF │ │ │ │ -00016e20: 4552 202a 7061 7463 6843 6f6f 7264 732c ER *patchCoords, │ │ │ │ -00016e30: 2050 4154 4348 5f54 4142 4c45 202a 7061 PATCH_TABLE *pa │ │ │ │ -00016e40: 7463 6854 6162 6c65 2c20 696e 7420 6676 tchTable, int fv │ │ │ │ -00016e50: 6172 4368 616e 6e65 6c2c 2043 7075 4576 arChannel, CpuEv │ │ │ │ -00016e60: 616c 7561 746f 7220 636f 6e73 7420 2a69 aluator const *i │ │ │ │ -00016e70: 6e73 7461 6e63 653d 4e55 4c4c 2c20 766f nstance=NULL, vo │ │ │ │ -00016e80: 6964 202a 6465 7669 6365 436f 6e74 6578 id *deviceContex │ │ │ │ -00016e90: 743d 4e55 4c4c 293c 2f64 6976 3e3c 6469 t=NULL)
    │ │ │ │ -00016eb0: 4765 6e65 7269 6320 6c69 6d69 7420 6576 Generic limit ev │ │ │ │ -00016ec0: 616c 2066 756e 6374 696f 6e2e 2054 6869 al function. Thi │ │ │ │ -00016ed0: 7320 6675 6e63 7469 6f6e 2068 6173 2061 s function has a │ │ │ │ -00016ee0: 2073 616d 6520 7369 676e 6174 7572 6520 same signature │ │ │ │ -00016ef0: 6173 206f 7468 6572 2064 6576 6963 6520 as other device │ │ │ │ -00016f00: 6b65 726e 656c 7320 6861 7665 2073 6f20 kernels have so │ │ │ │ -00016f10: 7468 6174 202e 2e2e 3c2f 6469 763e 3c64 that ...
    Definition cpuEvalua │ │ │ │ -00016f70: 746f 722e 683a 3130 3334 3c2f 613e 3c2f tor.h:1034
    .
    │ │ │ │ -00016fd0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 < │ │ │ │ -00017070: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00017080: 6922 3e73 7461 7469 6320 626f 6f6c 2045 i">static bool E │ │ │ │ -00017090: 7661 6c50 6174 6368 6573 4661 6365 5661 valPatchesFaceVa │ │ │ │ -000170a0: 7279 696e 6728 5352 435f 4255 4646 4552 rying(SRC_BUFFER │ │ │ │ -000170b0: 202a 7372 6342 7566 6665 722c 2042 7566 *srcBuffer, Buf │ │ │ │ -000170c0: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -000170d0: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ -000170e0: 2c20 4453 545f 4255 4646 4552 202a 6473 , DST_BUFFER *ds │ │ │ │ -000170f0: 7442 7566 6665 722c 2042 7566 6665 7244 tBuffer, BufferD │ │ │ │ -00017100: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00017110: 2661 6d70 3b64 7374 4465 7363 2c20 4453 &dstDesc, DS │ │ │ │ -00017120: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ -00017130: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ -00017140: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ -00017150: 6475 4465 7363 2c20 4453 545f 4255 4646 duDesc, DST_BUFF │ │ │ │ -00017160: 4552 202a 6476 4275 6666 6572 2c20 4275 ER *dvBuffer, Bu │ │ │ │ -00017170: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ -00017180: 6f6e 7374 2026 616d 703b 6476 4465 7363 onst &dvDesc │ │ │ │ -00017190: 2c20 696e 7420 6e75 6d50 6174 6368 436f , int numPatchCo │ │ │ │ -000171a0: 6f72 6473 2c20 5041 5443 4843 4f4f 5244 ords, PATCHCOORD │ │ │ │ -000171b0: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ -000171c0: 6f72 6473 2c20 5041 5443 485f 5441 424c ords, PATCH_TABL │ │ │ │ -000171d0: 4520 2a70 6174 6368 5461 626c 652c 2069 E *patchTable, i │ │ │ │ -000171e0: 6e74 2066 7661 7243 6861 6e6e 656c 2c20 nt fvarChannel, │ │ │ │ -000171f0: 4370 7545 7661 6c75 6174 6f72 2063 6f6e CpuEvaluator con │ │ │ │ -00017200: 7374 202a 696e 7374 616e 6365 3d4e 554c st *instance=NUL │ │ │ │ -00017210: 4c2c 2076 6f69 6420 2a64 6576 6963 6543 L, void *deviceC │ │ │ │ -00017220: 6f6e 7465 7874 3d4e 554c 4c29 3c2f 6469 ontext=NULL)
    Generic lim │ │ │ │ -00017250: 6974 2065 7661 6c20 6675 6e63 7469 6f6e it eval function │ │ │ │ -00017260: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ │ -00017270: 6861 7320 6120 7361 6d65 2073 6967 6e61 has a same signa │ │ │ │ -00017280: 7475 7265 2061 7320 6f74 6865 7220 6465 ture as other de │ │ │ │ -00017290: 7669 6365 206b 6572 6e65 6c73 2068 6176 vice kernels hav │ │ │ │ -000172a0: 6520 736f 2074 6861 7420 2e2e 2e3c 2f64 e so that ...
    . │ │ │ │ -00017320: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    st │ │ │ │ -00017410: 6174 6963 2062 6f6f 6c20 4576 616c 5374 atic bool EvalSt │ │ │ │ -00017420: 656e 6369 6c73 2863 6f6e 7374 2066 6c6f encils(const flo │ │ │ │ -00017430: 6174 202a 7372 632c 2042 7566 6665 7244 at *src, BufferD │ │ │ │ -00017440: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00017450: 2661 6d70 3b73 7263 4465 7363 2c20 666c &srcDesc, fl │ │ │ │ -00017460: 6f61 7420 2a64 7374 2c20 4275 6666 6572 oat *dst, Buffer │ │ │ │ -00017470: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -00017480: 2026 616d 703b 6473 7444 6573 632c 2063 &dstDesc, c │ │ │ │ -00017490: 6f6e 7374 2069 6e74 202a 7369 7a65 732c onst int *sizes, │ │ │ │ -000174a0: 2063 6f6e 7374 2069 6e74 202a 6f66 6673 const int *offs │ │ │ │ -000174b0: 6574 732c 2063 6f6e 7374 2069 6e74 202a ets, const int * │ │ │ │ -000174c0: 696e 6469 6365 732c 2063 6f6e 7374 2066 indices, const f │ │ │ │ -000174d0: 6c6f 6174 202a 7765 6967 6874 732c 2069 loat *weights, i │ │ │ │ -000174e0: 6e74 2073 7461 7274 2c20 696e 7420 656e nt start, int en │ │ │ │ -000174f0: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
    Stati │ │ │ │ -00017510: 6320 6576 616c 2073 7465 6e63 696c 7320 c eval stencils │ │ │ │ -00017520: 6675 6e63 7469 6f6e 2077 6869 6368 2074 function which t │ │ │ │ -00017530: 616b 6573 2072 6177 2043 5055 2070 6f69 akes raw CPU poi │ │ │ │ -00017540: 6e74 6572 7320 666f 7220 696e 7075 7420 nters for input │ │ │ │ -00017550: 616e 6420 6f75 7470 7574 2e3c 2f64 6976 and output.
    .
    │ │ │ │ -00017660: 7374 6174 6963 2062 6f6f 6c20 4576 616c static bool Eval │ │ │ │ -00017670: 5061 7463 6865 7346 6163 6556 6172 7969 PatchesFaceVaryi │ │ │ │ -00017680: 6e67 2853 5243 5f42 5546 4645 5220 2a73 ng(SRC_BUFFER *s │ │ │ │ -00017690: 7263 4275 6666 6572 2c20 4275 6666 6572 rcBuffer, Buffer │ │ │ │ -000176a0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -000176b0: 2026 616d 703b 7372 6344 6573 632c 2044 &srcDesc, D │ │ │ │ -000176c0: 5354 5f42 5546 4645 5220 2a64 7374 4275 ST_BUFFER *dstBu │ │ │ │ -000176d0: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ -000176e0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ -000176f0: 703b 6473 7444 6573 632c 2044 5354 5f42 p;dstDesc, DST_B │ │ │ │ -00017700: 5546 4645 5220 2a64 7542 7566 6665 722c UFFER *duBuffer, │ │ │ │ -00017710: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -00017720: 7220 636f 6e73 7420 2661 6d70 3b64 7544 r const &duD │ │ │ │ -00017730: 6573 632c 2044 5354 5f42 5546 4645 5220 esc, DST_BUFFER │ │ │ │ -00017740: 2a64 7642 7566 6665 722c 2042 7566 6665 *dvBuffer, Buffe │ │ │ │ -00017750: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ -00017760: 7420 2661 6d70 3b64 7644 6573 632c 2044 t &dvDesc, D │ │ │ │ -00017770: 5354 5f42 5546 4645 5220 2a64 7575 4275 ST_BUFFER *duuBu │ │ │ │ -00017780: 6666 6572 2c20 4275 6666 6572 4465 7363 ffer, BufferDesc │ │ │ │ -00017790: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ -000177a0: 703b 6475 7544 6573 632c 2044 5354 5f42 p;duuDesc, DST_B │ │ │ │ -000177b0: 5546 4645 5220 2a64 7576 4275 6666 6572 UFFER *duvBuffer │ │ │ │ -000177c0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -000177d0: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ -000177e0: 7644 6573 632c 2044 5354 5f42 5546 4645 vDesc, DST_BUFFE │ │ │ │ -000177f0: 5220 2a64 7676 4275 6666 6572 2c20 4275 R *dvvBuffer, Bu │ │ │ │ -00017800: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ -00017810: 6f6e 7374 2026 616d 703b 6476 7644 6573 onst &dvvDes │ │ │ │ -00017820: 632c 2069 6e74 206e 756d 5061 7463 6843 c, int numPatchC │ │ │ │ -00017830: 6f6f 7264 732c 2050 4154 4348 434f 4f52 oords, PATCHCOOR │ │ │ │ -00017840: 445f 4255 4646 4552 202a 7061 7463 6843 D_BUFFER *patchC │ │ │ │ -00017850: 6f6f 7264 732c 2050 4154 4348 5f54 4142 oords, PATCH_TAB │ │ │ │ -00017860: 4c45 202a 7061 7463 6854 6162 6c65 2c20 LE *patchTable, │ │ │ │ -00017870: 696e 7420 6676 6172 4368 616e 6e65 6c2c int fvarChannel, │ │ │ │ -00017880: 2043 7075 4576 616c 7561 746f 7220 636f CpuEvaluator co │ │ │ │ -00017890: 6e73 7420 2a69 6e73 7461 6e63 653d 4e55 nst *instance=NU │ │ │ │ -000178a0: 4c4c 2c20 766f 6964 202a 6465 7669 6365 LL, void *device │ │ │ │ -000178b0: 436f 6e74 6578 743d 4e55 4c4c 293c 2f64 Context=NULL)
    Generic li │ │ │ │ -000178e0: 6d69 7420 6576 616c 2066 756e 6374 696f mit eval functio │ │ │ │ -000178f0: 6e2e 2054 6869 7320 6675 6e63 7469 6f6e n. This function │ │ │ │ -00017900: 2068 6173 2061 2073 616d 6520 7369 676e has a same sign │ │ │ │ -00017910: 6174 7572 6520 6173 206f 7468 6572 2064 ature as other d │ │ │ │ -00017920: 6576 6963 6520 6b65 726e 656c 7320 6861 evice kernels ha │ │ │ │ -00017930: 7665 2073 6f20 7468 6174 202e 2e2e 3c2f ve so that ...
    │ │ │ │ -000179b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    static bool │ │ │ │ -00017ab0: 2045 7661 6c50 6174 6368 6573 5661 7279 EvalPatchesVary │ │ │ │ -00017ac0: 696e 6728 5352 435f 4255 4646 4552 202a ing(SRC_BUFFER * │ │ │ │ -00017ad0: 7372 6342 7566 6665 722c 2042 7566 6665 srcBuffer, Buffe │ │ │ │ -00017ae0: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ -00017af0: 7420 2661 6d70 3b73 7263 4465 7363 2c20 t &srcDesc, │ │ │ │ -00017b00: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ -00017b10: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ -00017b20: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -00017b30: 6d70 3b64 7374 4465 7363 2c20 4453 545f mp;dstDesc, DST_ │ │ │ │ -00017b40: 4255 4646 4552 202a 6475 4275 6666 6572 BUFFER *duBuffer │ │ │ │ -00017b50: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -00017b60: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ -00017b70: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ -00017b80: 202a 6476 4275 6666 6572 2c20 4275 6666 *dvBuffer, Buff │ │ │ │ -00017b90: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ -00017ba0: 7374 2026 616d 703b 6476 4465 7363 2c20 st &dvDesc, │ │ │ │ -00017bb0: 4453 545f 4255 4646 4552 202a 6475 7542 DST_BUFFER *duuB │ │ │ │ -00017bc0: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ -00017bd0: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -00017be0: 6d70 3b64 7575 4465 7363 2c20 4453 545f mp;duuDesc, DST_ │ │ │ │ -00017bf0: 4255 4646 4552 202a 6475 7642 7566 6665 BUFFER *duvBuffe │ │ │ │ -00017c00: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ -00017c10: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ -00017c20: 7576 4465 7363 2c20 4453 545f 4255 4646 uvDesc, DST_BUFF │ │ │ │ -00017c30: 4552 202a 6476 7642 7566 6665 722c 2042 ER *dvvBuffer, B │ │ │ │ -00017c40: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ -00017c50: 636f 6e73 7420 2661 6d70 3b64 7676 4465 const &dvvDe │ │ │ │ -00017c60: 7363 2c20 696e 7420 6e75 6d50 6174 6368 sc, int numPatch │ │ │ │ -00017c70: 436f 6f72 6473 2c20 5041 5443 4843 4f4f Coords, PATCHCOO │ │ │ │ -00017c80: 5244 5f42 5546 4645 5220 2a70 6174 6368 RD_BUFFER *patch │ │ │ │ -00017c90: 436f 6f72 6473 2c20 5041 5443 485f 5441 Coords, PATCH_TA │ │ │ │ -00017ca0: 424c 4520 2a70 6174 6368 5461 626c 652c BLE *patchTable, │ │ │ │ -00017cb0: 2043 7075 4576 616c 7561 746f 7220 636f CpuEvaluator co │ │ │ │ -00017cc0: 6e73 7420 2a69 6e73 7461 6e63 653d 4e55 nst *instance=NU │ │ │ │ -00017cd0: 4c4c 2c20 766f 6964 202a 6465 7669 6365 LL, void *device │ │ │ │ -00017ce0: 436f 6e74 6578 743d 4e55 4c4c 293c 2f64 Context=NULL)
    Generic li │ │ │ │ -00017d10: 6d69 7420 6576 616c 2066 756e 6374 696f mit eval functio │ │ │ │ -00017d20: 6e2e 2054 6869 7320 6675 6e63 7469 6f6e n. This function │ │ │ │ -00017d30: 2068 6173 2061 2073 616d 6520 7369 676e has a same sign │ │ │ │ -00017d40: 6174 7572 6520 6173 206f 7468 6572 2064 ature as other d │ │ │ │ -00017d50: 6576 6963 6520 6b65 726e 656c 7320 6861 evice kernels ha │ │ │ │ -00017d60: 7665 2073 6f20 7468 6174 202e 2e2e 3c2f ve so that ...
    . │ │ │ │ -00017de0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    st │ │ │ │ -00017ed0: 6174 6963 2062 6f6f 6c20 4576 616c 5374 atic bool EvalSt │ │ │ │ -00017ee0: 656e 6369 6c73 2863 6f6e 7374 2066 6c6f encils(const flo │ │ │ │ -00017ef0: 6174 202a 7372 632c 2042 7566 6665 7244 at *src, BufferD │ │ │ │ -00017f00: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00017f10: 2661 6d70 3b73 7263 4465 7363 2c20 666c &srcDesc, fl │ │ │ │ -00017f20: 6f61 7420 2a64 7374 2c20 4275 6666 6572 oat *dst, Buffer │ │ │ │ -00017f30: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -00017f40: 2026 616d 703b 6473 7444 6573 632c 2066 &dstDesc, f │ │ │ │ -00017f50: 6c6f 6174 202a 6475 2c20 4275 6666 6572 loat *du, Buffer │ │ │ │ -00017f60: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -00017f70: 2026 616d 703b 6475 4465 7363 2c20 666c &duDesc, fl │ │ │ │ -00017f80: 6f61 7420 2a64 762c 2042 7566 6665 7244 oat *dv, BufferD │ │ │ │ -00017f90: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00017fa0: 2661 6d70 3b64 7644 6573 632c 2063 6f6e &dvDesc, con │ │ │ │ -00017fb0: 7374 2069 6e74 202a 7369 7a65 732c 2063 st int *sizes, c │ │ │ │ -00017fc0: 6f6e 7374 2069 6e74 202a 6f66 6673 6574 onst int *offset │ │ │ │ -00017fd0: 732c 2063 6f6e 7374 2069 6e74 202a 696e s, const int *in │ │ │ │ -00017fe0: 6469 6365 732c 2063 6f6e 7374 2066 6c6f dices, const flo │ │ │ │ -00017ff0: 6174 202a 7765 6967 6874 732c 2063 6f6e at *weights, con │ │ │ │ -00018000: 7374 2066 6c6f 6174 202a 6475 5765 6967 st float *duWeig │ │ │ │ -00018010: 6874 732c 2063 6f6e 7374 2066 6c6f 6174 hts, const float │ │ │ │ -00018020: 202a 6476 5765 6967 6874 732c 2069 6e74 *dvWeights, int │ │ │ │ -00018030: 2073 7461 7274 2c20 696e 7420 656e 6429 start, int end) │ │ │ │ -00018040: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Static │ │ │ │ -00018060: 6576 616c 2073 7465 6e63 696c 7320 6675 eval stencils fu │ │ │ │ -00018070: 6e63 7469 6f6e 2077 6974 6820 6465 7269 nction with deri │ │ │ │ -00018080: 7661 7469 7665 732c 2077 6869 6368 2074 vatives, which t │ │ │ │ -00018090: 616b 6573 2072 6177 2043 5055 2070 6f69 akes raw CPU poi │ │ │ │ -000180a0: 6e74 6572 7320 666f 7220 696e 7075 7420 nters for input │ │ │ │ -000180b0: 616e 6420 6f75 7470 7574 2e3c 2f64 6976 and output.
    .
    OpenSub │ │ │ │ -00018160: 6469 763a 3a4f 5045 4e53 5542 4449 565f div::OPENSUBDIV_ │ │ │ │ -00018170: 5645 5253 494f 4e3a 3a4f 7364 3a3a 4370 VERSION::Osd::Cp │ │ │ │ -00018180: 7545 7661 6c75 6174 6f72 3a3a 4576 616c uEvaluator::Eval │ │ │ │ -00018190: 5374 656e 6369 6c73 3c2f 613e 3c2f 6469 Stencils
    static boo │ │ │ │ -000181c0: 6c20 4576 616c 5374 656e 6369 6c73 2863 l EvalStencils(c │ │ │ │ -000181d0: 6f6e 7374 2066 6c6f 6174 202a 7372 632c onst float *src, │ │ │ │ -000181e0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -000181f0: 7220 636f 6e73 7420 2661 6d70 3b73 7263 r const &src │ │ │ │ -00018200: 4465 7363 2c20 666c 6f61 7420 2a64 7374 Desc, float *dst │ │ │ │ -00018210: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -00018220: 6f72 2063 6f6e 7374 2026 616d 703b 6473 or const &ds │ │ │ │ -00018230: 7444 6573 632c 2066 6c6f 6174 202a 6475 tDesc, float *du │ │ │ │ -00018240: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -00018250: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ -00018260: 4465 7363 2c20 666c 6f61 7420 2a64 762c Desc, float *dv, │ │ │ │ -00018270: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -00018280: 7220 636f 6e73 7420 2661 6d70 3b64 7644 r const &dvD │ │ │ │ -00018290: 6573 632c 2066 6c6f 6174 202a 6475 752c esc, float *duu, │ │ │ │ -000182a0: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -000182b0: 7220 636f 6e73 7420 2661 6d70 3b64 7575 r const &duu │ │ │ │ -000182c0: 4465 7363 2c20 666c 6f61 7420 2a64 7576 Desc, float *duv │ │ │ │ -000182d0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -000182e0: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ -000182f0: 7644 6573 632c 2066 6c6f 6174 202a 6476 vDesc, float *dv │ │ │ │ -00018300: 762c 2042 7566 6665 7244 6573 6372 6970 v, BufferDescrip │ │ │ │ -00018310: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ -00018320: 7676 4465 7363 2c20 636f 6e73 7420 696e vvDesc, const in │ │ │ │ -00018330: 7420 2a73 697a 6573 2c20 636f 6e73 7420 t *sizes, const │ │ │ │ -00018340: 696e 7420 2a6f 6666 7365 7473 2c20 636f int *offsets, co │ │ │ │ -00018350: 6e73 7420 696e 7420 2a69 6e64 6963 6573 nst int *indices │ │ │ │ -00018360: 2c20 636f 6e73 7420 666c 6f61 7420 2a77 , const float *w │ │ │ │ -00018370: 6569 6768 7473 2c20 636f 6e73 7420 666c eights, const fl │ │ │ │ -00018380: 6f61 7420 2a64 7557 6569 6768 7473 2c20 oat *duWeights, │ │ │ │ -00018390: 636f 6e73 7420 666c 6f61 7420 2a64 7657 const float *dvW │ │ │ │ -000183a0: 6569 6768 7473 2c20 636f 6e73 7420 666c eights, const fl │ │ │ │ -000183b0: 6f61 7420 2a64 7575 5765 6967 6874 732c oat *duuWeights, │ │ │ │ -000183c0: 2063 6f6e 7374 2066 6c6f 6174 202a 6475 const float *du │ │ │ │ -000183d0: 7657 6569 6768 7473 2c20 636f 6e73 7420 vWeights, const │ │ │ │ -000183e0: 666c 6f61 7420 2a64 7676 5765 6967 6874 float *dvvWeight │ │ │ │ -000183f0: 732c 2069 6e74 2073 7461 7274 2c20 696e s, int start, in │ │ │ │ -00018400: 7420 656e 6429 3c2f 6469 763e 3c64 6976 t end)
    S │ │ │ │ -00018420: 7461 7469 6320 6576 616c 2073 7465 6e63 tatic eval stenc │ │ │ │ -00018430: 696c 7320 6675 6e63 7469 6f6e 2077 6974 ils function wit │ │ │ │ -00018440: 6820 6465 7269 7661 7469 7665 732c 2077 h derivatives, w │ │ │ │ -00018450: 6869 6368 2074 616b 6573 2072 6177 2043 hich takes raw C │ │ │ │ -00018460: 5055 2070 6f69 6e74 6572 7320 666f 7220 PU pointers for │ │ │ │ -00018470: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output │ │ │ │ -00018480: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    stati │ │ │ │ -00018580: 6320 626f 6f6c 2045 7661 6c50 6174 6368 c bool EvalPatch │ │ │ │ -00018590: 6573 2863 6f6e 7374 2066 6c6f 6174 202a es(const float * │ │ │ │ -000185a0: 7372 632c 2042 7566 6665 7244 6573 6372 src, BufferDescr │ │ │ │ -000185b0: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ -000185c0: 3b73 7263 4465 7363 2c20 666c 6f61 7420 ;srcDesc, float │ │ │ │ -000185d0: 2a64 7374 2c20 4275 6666 6572 4465 7363 *dst, BufferDesc │ │ │ │ -000185e0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ -000185f0: 703b 6473 7444 6573 632c 2066 6c6f 6174 p;dstDesc, float │ │ │ │ -00018600: 202a 6475 2c20 4275 6666 6572 4465 7363 *du, BufferDesc │ │ │ │ -00018610: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ -00018620: 703b 6475 4465 7363 2c20 666c 6f61 7420 p;duDesc, float │ │ │ │ -00018630: 2a64 762c 2042 7566 6665 7244 6573 6372 *dv, BufferDescr │ │ │ │ -00018640: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ -00018650: 3b64 7644 6573 632c 2066 6c6f 6174 202a ;dvDesc, float * │ │ │ │ -00018660: 6475 752c 2042 7566 6665 7244 6573 6372 duu, BufferDescr │ │ │ │ -00018670: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ -00018680: 3b64 7575 4465 7363 2c20 666c 6f61 7420 ;duuDesc, float │ │ │ │ -00018690: 2a64 7576 2c20 4275 6666 6572 4465 7363 *duv, BufferDesc │ │ │ │ -000186a0: 7269 7074 6f72 2063 6f6e 7374 2026 616d riptor const &am │ │ │ │ -000186b0: 703b 6475 7644 6573 632c 2066 6c6f 6174 p;duvDesc, float │ │ │ │ -000186c0: 202a 6476 762c 2042 7566 6665 7244 6573 *dvv, BufferDes │ │ │ │ -000186d0: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -000186e0: 6d70 3b64 7676 4465 7363 2c20 696e 7420 mp;dvvDesc, int │ │ │ │ -000186f0: 6e75 6d50 6174 6368 436f 6f72 6473 2c20 numPatchCoords, │ │ │ │ -00018700: 5061 7463 6843 6f6f 7264 2063 6f6e 7374 PatchCoord const │ │ │ │ -00018710: 202a 7061 7463 6843 6f6f 7264 732c 2050 *patchCoords, P │ │ │ │ -00018720: 6174 6368 4172 7261 7920 636f 6e73 7420 atchArray const │ │ │ │ -00018730: 2a70 6174 6368 4172 7261 7973 2c20 636f *patchArrays, co │ │ │ │ -00018740: 6e73 7420 696e 7420 2a70 6174 6368 496e nst int *patchIn │ │ │ │ -00018750: 6465 7842 7566 6665 722c 2050 6174 6368 dexBuffer, Patch │ │ │ │ -00018760: 5061 7261 6d20 636f 6e73 7420 2a70 6174 Param const *pat │ │ │ │ -00018770: 6368 5061 7261 6d42 7566 6665 7229 3c2f chParamBuffer)
    Static li │ │ │ │ -000187a0: 6d69 7420 6576 616c 2066 756e 6374 696f mit eval functio │ │ │ │ -000187b0: 6e2e 2049 7420 7461 6b65 7320 616e 2061 n. It takes an a │ │ │ │ -000187c0: 7272 6179 206f 6620 5061 7463 6843 6f6f rray of PatchCoo │ │ │ │ -000187d0: 7264 2061 6e64 2065 7661 6c75 6174 6520 rd and evaluate │ │ │ │ -000187e0: 6c69 6d69 7420 7661 6c75 6573 206f 6e20 limit values on │ │ │ │ -000187f0: 6769 7665 6e20 5061 7463 6854 2e2e 2e3c given PatchT...< │ │ │ │ -00018800: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    Ope │ │ │ │ -000188a0: 6e53 7562 6469 763a 3a4f 5045 4e53 5542 nSubdiv::OPENSUB │ │ │ │ -000188b0: 4449 565f 5645 5253 494f 4e3a 3a4f 7364 DIV_VERSION::Osd │ │ │ │ -000188c0: 3a3a 4370 7545 7661 6c75 6174 6f72 3a3a ::CpuEvaluator:: │ │ │ │ -000188d0: 4576 616c 5061 7463 6865 733c 2f61 3e3c EvalPatches< │ │ │ │ -000188e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    static │ │ │ │ -00018900: 626f 6f6c 2045 7661 6c50 6174 6368 6573 bool EvalPatches │ │ │ │ -00018910: 2853 5243 5f42 5546 4645 5220 2a73 7263 (SRC_BUFFER *src │ │ │ │ -00018920: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ -00018930: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ -00018940: 616d 703b 7372 6344 6573 632c 2044 5354 amp;srcDesc, DST │ │ │ │ -00018950: 5f42 5546 4645 5220 2a64 7374 4275 6666 _BUFFER *dstBuff │ │ │ │ -00018960: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ -00018970: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ -00018980: 6473 7444 6573 632c 2069 6e74 206e 756d dstDesc, int num │ │ │ │ -00018990: 5061 7463 6843 6f6f 7264 732c 2050 4154 PatchCoords, PAT │ │ │ │ -000189a0: 4348 434f 4f52 445f 4255 4646 4552 202a CHCOORD_BUFFER * │ │ │ │ -000189b0: 7061 7463 6843 6f6f 7264 732c 2050 4154 patchCoords, PAT │ │ │ │ -000189c0: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ -000189d0: 6162 6c65 2c20 4370 7545 7661 6c75 6174 able, CpuEvaluat │ │ │ │ -000189e0: 6f72 2063 6f6e 7374 202a 696e 7374 616e or const *instan │ │ │ │ -000189f0: 6365 3d4e 554c 4c2c 2076 6f69 6420 2a64 ce=NULL, void *d │ │ │ │ -00018a00: 6576 6963 6543 6f6e 7465 7874 3d4e 554c eviceContext=NUL │ │ │ │ -00018a10: 4c29 3c2f 6469 763e 3c64 6976 2063 6c61 L)
    Gener │ │ │ │ -00018a30: 6963 206c 696d 6974 2065 7661 6c20 6675 ic limit eval fu │ │ │ │ -00018a40: 6e63 7469 6f6e 2e20 5468 6973 2066 756e nction. This fun │ │ │ │ -00018a50: 6374 696f 6e20 6861 7320 6120 7361 6d65 ction has a same │ │ │ │ -00018a60: 2073 6967 6e61 7475 7265 2061 7320 6f74 signature as ot │ │ │ │ -00018a70: 6865 7220 6465 7669 6365 206b 6572 6e65 her device kerne │ │ │ │ -00018a80: 6c73 2068 6176 6520 736f 2074 6861 7420 ls have so that │ │ │ │ -00018a90: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ -00018ab0: 6566 696e 6974 696f 6e3c 2f62 3e20 3c61 efinition cpuEvaluator.h │ │ │ │ -00018af0: 3a34 3534 3c2f 613e 3c2f 6469 763e 3c2f :454
    .
    static bool Ev │ │ │ │ -00018c00: 616c 5061 7463 6865 7328 5352 435f 4255 alPatches(SRC_BU │ │ │ │ -00018c10: 4646 4552 202a 7372 6342 7566 6665 722c FFER *srcBuffer, │ │ │ │ -00018c20: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -00018c30: 7220 636f 6e73 7420 2661 6d70 3b73 7263 r const &src │ │ │ │ -00018c40: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ -00018c50: 202a 6473 7442 7566 6665 722c 2042 7566 *dstBuffer, Buf │ │ │ │ -00018c60: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -00018c70: 6e73 7420 2661 6d70 3b64 7374 4465 7363 nst &dstDesc │ │ │ │ -00018c80: 2c20 4453 545f 4255 4646 4552 202a 6475 , DST_BUFFER *du │ │ │ │ -00018c90: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ -00018ca0: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ -00018cb0: 616d 703b 6475 4465 7363 2c20 4453 545f amp;duDesc, DST_ │ │ │ │ -00018cc0: 4255 4646 4552 202a 6476 4275 6666 6572 BUFFER *dvBuffer │ │ │ │ -00018cd0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -00018ce0: 6f72 2063 6f6e 7374 2026 616d 703b 6476 or const &dv │ │ │ │ -00018cf0: 4465 7363 2c20 696e 7420 6e75 6d50 6174 Desc, int numPat │ │ │ │ -00018d00: 6368 436f 6f72 6473 2c20 5041 5443 4843 chCoords, PATCHC │ │ │ │ -00018d10: 4f4f 5244 5f42 5546 4645 5220 2a70 6174 OORD_BUFFER *pat │ │ │ │ -00018d20: 6368 436f 6f72 6473 2c20 5041 5443 485f chCoords, PATCH_ │ │ │ │ -00018d30: 5441 424c 4520 2a70 6174 6368 5461 626c TABLE *patchTabl │ │ │ │ -00018d40: 652c 2043 7075 4576 616c 7561 746f 7220 e, CpuEvaluator │ │ │ │ -00018d50: 636f 6e73 7420 2a69 6e73 7461 6e63 653d const *instance= │ │ │ │ -00018d60: 4e55 4c4c 2c20 766f 6964 202a 6465 7669 NULL, void *devi │ │ │ │ -00018d70: 6365 436f 6e74 6578 743d 4e55 4c4c 293c ceContext=NULL)< │ │ │ │ -00018d80: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Generic │ │ │ │ -00018da0: 6c69 6d69 7420 6576 616c 2066 756e 6374 limit eval funct │ │ │ │ -00018db0: 696f 6e20 7769 7468 2064 6572 6976 6174 ion with derivat │ │ │ │ -00018dc0: 6976 6573 2e20 5468 6973 2066 756e 6374 ives. This funct │ │ │ │ -00018dd0: 696f 6e20 6861 7320 6120 7361 6d65 2073 ion has a same s │ │ │ │ -00018de0: 6967 6e61 7475 7265 2061 7320 6f74 6865 ignature as othe │ │ │ │ -00018df0: 7220 6465 7669 6365 206b 6572 6e2e 2e2e r device kern... │ │ │ │ -00018e00: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    .
    s │ │ │ │ -00018f60: 7461 7469 6320 626f 6f6c 2045 7661 6c50 tatic bool EvalP │ │ │ │ -00018f70: 6174 6368 6573 2863 6f6e 7374 2066 6c6f atches(const flo │ │ │ │ -00018f80: 6174 202a 7372 632c 2042 7566 6665 7244 at *src, BufferD │ │ │ │ -00018f90: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00018fa0: 2661 6d70 3b73 7263 4465 7363 2c20 666c &srcDesc, fl │ │ │ │ -00018fb0: 6f61 7420 2a64 7374 2c20 4275 6666 6572 oat *dst, Buffer │ │ │ │ -00018fc0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -00018fd0: 2026 616d 703b 6473 7444 6573 632c 2066 &dstDesc, f │ │ │ │ -00018fe0: 6c6f 6174 202a 6475 2c20 4275 6666 6572 loat *du, Buffer │ │ │ │ -00018ff0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -00019000: 2026 616d 703b 6475 4465 7363 2c20 666c &duDesc, fl │ │ │ │ -00019010: 6f61 7420 2a64 762c 2042 7566 6665 7244 oat *dv, BufferD │ │ │ │ -00019020: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00019030: 2661 6d70 3b64 7644 6573 632c 2069 6e74 &dvDesc, int │ │ │ │ -00019040: 206e 756d 5061 7463 6843 6f6f 7264 732c numPatchCoords, │ │ │ │ -00019050: 2050 6174 6368 436f 6f72 6420 636f 6e73 PatchCoord cons │ │ │ │ -00019060: 7420 2a70 6174 6368 436f 6f72 6473 2c20 t *patchCoords, │ │ │ │ -00019070: 5061 7463 6841 7272 6179 2063 6f6e 7374 PatchArray const │ │ │ │ -00019080: 202a 7061 7463 6841 7272 6179 732c 2063 *patchArrays, c │ │ │ │ -00019090: 6f6e 7374 2069 6e74 202a 7061 7463 6849 onst int *patchI │ │ │ │ -000190a0: 6e64 6578 4275 6666 6572 2c20 5061 7463 ndexBuffer, Patc │ │ │ │ -000190b0: 6850 6172 616d 2063 6f6e 7374 202a 7061 hParam const *pa │ │ │ │ -000190c0: 7463 6850 6172 616d 4275 6666 6572 293c tchParamBuffer)< │ │ │ │ -000190d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Static l │ │ │ │ -000190f0: 696d 6974 2065 7661 6c20 6675 6e63 7469 imit eval functi │ │ │ │ -00019100: 6f6e 2e20 4974 2074 616b 6573 2061 6e20 on. It takes an │ │ │ │ -00019110: 6172 7261 7920 6f66 2050 6174 6368 436f array of PatchCo │ │ │ │ -00019120: 6f72 6420 616e 6420 6576 616c 7561 7465 ord and evaluate │ │ │ │ -00019130: 206c 696d 6974 2076 616c 7565 7320 6f6e limit values on │ │ │ │ -00019140: 2067 6976 656e 2050 6174 6368 542e 2e2e given PatchT... │ │ │ │ -00019150: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    stati │ │ │ │ -00019250: 6320 626f 6f6c 2045 7661 6c53 7465 6e63 c bool EvalStenc │ │ │ │ -00019260: 696c 7328 5352 435f 4255 4646 4552 202a ils(SRC_BUFFER * │ │ │ │ -00019270: 7372 6342 7566 6665 722c 2042 7566 6665 srcBuffer, Buffe │ │ │ │ -00019280: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ -00019290: 7420 2661 6d70 3b73 7263 4465 7363 2c20 t &srcDesc, │ │ │ │ -000192a0: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ -000192b0: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ -000192c0: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -000192d0: 6d70 3b64 7374 4465 7363 2c20 4453 545f mp;dstDesc, DST_ │ │ │ │ -000192e0: 4255 4646 4552 202a 6475 4275 6666 6572 BUFFER *duBuffer │ │ │ │ -000192f0: 2c20 4275 6666 6572 4465 7363 7269 7074 , BufferDescript │ │ │ │ -00019300: 6f72 2063 6f6e 7374 2026 616d 703b 6475 or const &du │ │ │ │ -00019310: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ -00019320: 202a 6476 4275 6666 6572 2c20 4275 6666 *dvBuffer, Buff │ │ │ │ -00019330: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ -00019340: 7374 2026 616d 703b 6476 4465 7363 2c20 st &dvDesc, │ │ │ │ -00019350: 4453 545f 4255 4646 4552 202a 6475 7542 DST_BUFFER *duuB │ │ │ │ -00019360: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ -00019370: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -00019380: 6d70 3b64 7575 4465 7363 2c20 4453 545f mp;duuDesc, DST_ │ │ │ │ -00019390: 4255 4646 4552 202a 6475 7642 7566 6665 BUFFER *duvBuffe │ │ │ │ -000193a0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ -000193b0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ -000193c0: 7576 4465 7363 2c20 4453 545f 4255 4646 uvDesc, DST_BUFF │ │ │ │ -000193d0: 4552 202a 6476 7642 7566 6665 722c 2042 ER *dvvBuffer, B │ │ │ │ -000193e0: 7566 6665 7244 6573 6372 6970 746f 7220 ufferDescriptor │ │ │ │ -000193f0: 636f 6e73 7420 2661 6d70 3b64 7676 4465 const &dvvDe │ │ │ │ -00019400: 7363 2c20 5354 454e 4349 4c5f 5441 424c sc, STENCIL_TABL │ │ │ │ -00019410: 4520 636f 6e73 7420 2a73 7465 6e63 696c E const *stencil │ │ │ │ -00019420: 5461 626c 652c 2063 6f6e 7374 2043 7075 Table, const Cpu │ │ │ │ -00019430: 4576 616c 7561 746f 7220 2a69 6e73 7461 Evaluator *insta │ │ │ │ -00019440: 6e63 653d 4e55 4c4c 2c20 766f 6964 202a nce=NULL, void * │ │ │ │ -00019450: 6465 7669 6365 436f 6e74 6578 743d 4e55 deviceContext=NU │ │ │ │ -00019460: 4c4c 293c 2f64 6976 3e3c 6469 7620 636c LL)
    Gene │ │ │ │ -00019480: 7269 6320 7374 6174 6963 2065 7661 6c20 ric static eval │ │ │ │ -00019490: 7374 656e 6369 6c73 2066 756e 6374 696f stencils functio │ │ │ │ -000194a0: 6e20 7769 7468 2064 6572 6976 6174 6976 n with derivativ │ │ │ │ -000194b0: 6573 2e20 5468 6973 2066 756e 6374 696f es. This functio │ │ │ │ -000194c0: 6e20 6861 7320 6120 7361 6d65 2073 6967 n has a same sig │ │ │ │ -000194d0: 6e61 7475 7265 2061 7320 6f74 6865 7220 nature as other │ │ │ │ -000194e0: 642e 2e2e 3c2f 6469 763e 3c64 6976 2063 d...
    │ │ │ │ -00019500: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ -00019510: 6120 6872 6566 3d22 6130 3038 3231 5f73 a href="a00821_s │ │ │ │ -00019520: 6f75 7263 652e 6874 6d6c 236c 3030 3330 ource.html#l0030 │ │ │ │ -00019530: 3322 3e63 7075 4576 616c 7561 746f 722e 3">cpuEvaluator. │ │ │ │ -00019540: 683a 3330 333c 2f61 3e3c 2f64 6976 3e3c h:303
    < │ │ │ │ -00019550: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -000195b0: 6120 6872 6566 3d22 6130 3131 3537 2e68 a href="a01157.h │ │ │ │ -000195c0: 746d 6c23 6164 3562 3930 3763 3232 6466 tml#ad5b907c22df │ │ │ │ -000195d0: 6362 3934 3365 3566 3235 6633 6331 3635 cb943e5f25f3c165 │ │ │ │ -000195e0: 3433 3533 3522 3e4f 7065 6e53 7562 6469 43535">OpenSubdi │ │ │ │ -000195f0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ -00019600: 5253 494f 4e3a 3a4f 7364 3a3a 4370 7545 RSION::Osd::CpuE │ │ │ │ -00019610: 7661 6c75 6174 6f72 3a3a 4576 616c 5061 valuator::EvalPa │ │ │ │ -00019620: 7463 6865 733c 2f61 3e3c 2f64 6976 3e3c tches
    < │ │ │ │ -00019630: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00019640: 6922 3e73 7461 7469 6320 626f 6f6c 2045 i">static bool E │ │ │ │ -00019650: 7661 6c50 6174 6368 6573 2863 6f6e 7374 valPatches(const │ │ │ │ -00019660: 2066 6c6f 6174 202a 7372 632c 2042 7566 float *src, Buf │ │ │ │ -00019670: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -00019680: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ -00019690: 2c20 666c 6f61 7420 2a64 7374 2c20 4275 , float *dst, Bu │ │ │ │ -000196a0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ -000196b0: 6f6e 7374 2026 616d 703b 6473 7444 6573 onst &dstDes │ │ │ │ -000196c0: 632c 2069 6e74 206e 756d 5061 7463 6843 c, int numPatchC │ │ │ │ -000196d0: 6f6f 7264 732c 2063 6f6e 7374 2050 6174 oords, const Pat │ │ │ │ -000196e0: 6368 436f 6f72 6420 2a70 6174 6368 436f chCoord *patchCo │ │ │ │ -000196f0: 6f72 6473 2c20 636f 6e73 7420 5061 7463 ords, const Patc │ │ │ │ -00019700: 6841 7272 6179 202a 7061 7463 6841 7272 hArray *patchArr │ │ │ │ -00019710: 6179 732c 2063 6f6e 7374 2069 6e74 202a ays, const int * │ │ │ │ -00019720: 7061 7463 6849 6e64 6578 4275 6666 6572 patchIndexBuffer │ │ │ │ -00019730: 2c20 636f 6e73 7420 5061 7463 6850 6172 , const PatchPar │ │ │ │ -00019740: 616d 202a 7061 7463 6850 6172 616d 4275 am *patchParamBu │ │ │ │ -00019750: 6666 6572 293c 2f64 6976 3e3c 6469 7620 ffer)
    St │ │ │ │ -00019770: 6174 6963 206c 696d 6974 2065 7661 6c20 atic limit eval │ │ │ │ -00019780: 6675 6e63 7469 6f6e 2e20 4974 2074 616b function. It tak │ │ │ │ -00019790: 6573 2061 6e20 6172 7261 7920 6f66 2050 es an array of P │ │ │ │ -000197a0: 6174 6368 436f 6f72 6420 616e 6420 6576 atchCoord and ev │ │ │ │ -000197b0: 616c 7561 7465 206c 696d 6974 2076 616c aluate limit val │ │ │ │ -000197c0: 7565 7320 6f6e 2067 6976 656e 2050 6174 ues on given Pat │ │ │ │ -000197d0: 6368 542e 2e2e 3c2f 6469 763e 3c2f 6469 chT...
    .
    OpenSubdiv:: │ │ │ │ -00019880: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ -00019890: 4f4e 3a3a 4f73 643a 3a43 7075 4576 616c ON::Osd::CpuEval │ │ │ │ -000198a0: 7561 746f 723a 3a45 7661 6c50 6174 6368 uator::EvalPatch │ │ │ │ -000198b0: 6573 5661 7279 696e 673c 2f61 3e3c 2f64 esVarying
    static bo │ │ │ │ -000198e0: 6f6c 2045 7661 6c50 6174 6368 6573 5661 ol EvalPatchesVa │ │ │ │ -000198f0: 7279 696e 6728 5352 435f 4255 4646 4552 rying(SRC_BUFFER │ │ │ │ -00019900: 202a 7372 6342 7566 6665 722c 2042 7566 *srcBuffer, Buf │ │ │ │ -00019910: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -00019920: 6e73 7420 2661 6d70 3b73 7263 4465 7363 nst &srcDesc │ │ │ │ -00019930: 2c20 4453 545f 4255 4646 4552 202a 6473 , DST_BUFFER *ds │ │ │ │ -00019940: 7442 7566 6665 722c 2042 7566 6665 7244 tBuffer, BufferD │ │ │ │ -00019950: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -00019960: 2661 6d70 3b64 7374 4465 7363 2c20 4453 &dstDesc, DS │ │ │ │ -00019970: 545f 4255 4646 4552 202a 6475 4275 6666 T_BUFFER *duBuff │ │ │ │ -00019980: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ -00019990: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ -000199a0: 6475 4465 7363 2c20 4453 545f 4255 4646 duDesc, DST_BUFF │ │ │ │ -000199b0: 4552 202a 6476 4275 6666 6572 2c20 4275 ER *dvBuffer, Bu │ │ │ │ -000199c0: 6666 6572 4465 7363 7269 7074 6f72 2063 fferDescriptor c │ │ │ │ -000199d0: 6f6e 7374 2026 616d 703b 6476 4465 7363 onst &dvDesc │ │ │ │ -000199e0: 2c20 696e 7420 6e75 6d50 6174 6368 436f , int numPatchCo │ │ │ │ -000199f0: 6f72 6473 2c20 5041 5443 4843 4f4f 5244 ords, PATCHCOORD │ │ │ │ -00019a00: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ -00019a10: 6f72 6473 2c20 5041 5443 485f 5441 424c ords, PATCH_TABL │ │ │ │ -00019a20: 4520 2a70 6174 6368 5461 626c 652c 2043 E *patchTable, C │ │ │ │ -00019a30: 7075 4576 616c 7561 746f 7220 636f 6e73 puEvaluator cons │ │ │ │ -00019a40: 7420 2a69 6e73 7461 6e63 653d 4e55 4c4c t *instance=NULL │ │ │ │ -00019a50: 2c20 766f 6964 202a 6465 7669 6365 436f , void *deviceCo │ │ │ │ -00019a60: 6e74 6578 743d 4e55 4c4c 293c 2f64 6976 ntext=NULL)
    Generic limi │ │ │ │ -00019a90: 7420 6576 616c 2066 756e 6374 696f 6e2e t eval function. │ │ │ │ -00019aa0: 2054 6869 7320 6675 6e63 7469 6f6e 2068 This function h │ │ │ │ -00019ab0: 6173 2061 2073 616d 6520 7369 676e 6174 as a same signat │ │ │ │ -00019ac0: 7572 6520 6173 206f 7468 6572 2064 6576 ure as other dev │ │ │ │ -00019ad0: 6963 6520 6b65 726e 656c 7320 6861 7665 ice kernels have │ │ │ │ -00019ae0: 2073 6f20 7468 6174 202e 2e2e 3c2f 6469 so that ...
    Definiti │ │ │ │ -00019b10: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on cpuEv │ │ │ │ -00019b40: 616c 7561 746f 722e 683a 3838 363c 2f61 aluator.h:886
    .static bool Ev │ │ │ │ -00019c60: 616c 5061 7463 6865 7356 6172 7969 6e67 alPatchesVarying │ │ │ │ -00019c70: 2853 5243 5f42 5546 4645 5220 2a73 7263 (SRC_BUFFER *src │ │ │ │ -00019c80: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ -00019c90: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ -00019ca0: 616d 703b 7372 6344 6573 632c 2044 5354 amp;srcDesc, DST │ │ │ │ -00019cb0: 5f42 5546 4645 5220 2a64 7374 4275 6666 _BUFFER *dstBuff │ │ │ │ -00019cc0: 6572 2c20 4275 6666 6572 4465 7363 7269 er, BufferDescri │ │ │ │ -00019cd0: 7074 6f72 2063 6f6e 7374 2026 616d 703b ptor const & │ │ │ │ -00019ce0: 6473 7444 6573 632c 2069 6e74 206e 756d dstDesc, int num │ │ │ │ -00019cf0: 5061 7463 6843 6f6f 7264 732c 2050 4154 PatchCoords, PAT │ │ │ │ -00019d00: 4348 434f 4f52 445f 4255 4646 4552 202a CHCOORD_BUFFER * │ │ │ │ -00019d10: 7061 7463 6843 6f6f 7264 732c 2050 4154 patchCoords, PAT │ │ │ │ -00019d20: 4348 5f54 4142 4c45 202a 7061 7463 6854 CH_TABLE *patchT │ │ │ │ -00019d30: 6162 6c65 2c20 4370 7545 7661 6c75 6174 able, CpuEvaluat │ │ │ │ -00019d40: 6f72 2063 6f6e 7374 202a 696e 7374 616e or const *instan │ │ │ │ -00019d50: 6365 3d4e 554c 4c2c 2076 6f69 6420 2a64 ce=NULL, void *d │ │ │ │ -00019d60: 6576 6963 6543 6f6e 7465 7874 3d4e 554c eviceContext=NUL │ │ │ │ -00019d70: 4c29 3c2f 6469 763e 3c64 6976 2063 6c61 L)
    Gener │ │ │ │ -00019d90: 6963 206c 696d 6974 2065 7661 6c20 6675 ic limit eval fu │ │ │ │ -00019da0: 6e63 7469 6f6e 2e20 5468 6973 2066 756e nction. This fun │ │ │ │ -00019db0: 6374 696f 6e20 6861 7320 6120 7361 6d65 ction has a same │ │ │ │ -00019dc0: 2073 6967 6e61 7475 7265 2061 7320 6f74 signature as ot │ │ │ │ -00019dd0: 6865 7220 6465 7669 6365 206b 6572 6e65 her device kerne │ │ │ │ -00019de0: 6c73 2068 6176 6520 736f 2074 6861 7420 ls have so that │ │ │ │ -00019df0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ -00019e10: 6566 696e 6974 696f 6e3c 2f62 3e20 3c61 efinition cpuEvaluator.h │ │ │ │ -00019e50: 3a38 3233 3c2f 613e 3c2f 6469 763e 3c2f :823
    .
    synchr │ │ │ │ -00019f90: 6f6e 697a 6520 616c 6c20 6173 796e 6368 onize all asynch │ │ │ │ -00019fa0: 726f 6e6f 7573 2063 6f6d 7075 7461 7469 ronous computati │ │ │ │ -00019fb0: 6f6e 2069 6e76 6f6b 6564 206f 6e20 7468 on invoked on th │ │ │ │ -00019fc0: 6973 2064 6576 6963 652e 3c2f 6469 763e is device.
    │ │ │ │ -00019fd0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00019ff0: 3c2f 623e 203c 6120 6872 6566 3d22 6130 cpuEval │ │ │ │ -0001a020: 7561 746f 722e 683a 3132 3237 3c2f 613e uator.h:1227 │ │ │ │ -0001a030: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    stati │ │ │ │ -0001a130: 6320 626f 6f6c 2045 7661 6c53 7465 6e63 c bool EvalStenc │ │ │ │ -0001a140: 696c 7328 5352 435f 4255 4646 4552 202a ils(SRC_BUFFER * │ │ │ │ -0001a150: 7372 6342 7566 6665 722c 2042 7566 6665 srcBuffer, Buffe │ │ │ │ -0001a160: 7244 6573 6372 6970 746f 7220 636f 6e73 rDescriptor cons │ │ │ │ -0001a170: 7420 2661 6d70 3b73 7263 4465 7363 2c20 t &srcDesc, │ │ │ │ -0001a180: 4453 545f 4255 4646 4552 202a 6473 7442 DST_BUFFER *dstB │ │ │ │ -0001a190: 7566 6665 722c 2042 7566 6665 7244 6573 uffer, BufferDes │ │ │ │ -0001a1a0: 6372 6970 746f 7220 636f 6e73 7420 2661 criptor const &a │ │ │ │ -0001a1b0: 6d70 3b64 7374 4465 7363 2c20 5354 454e mp;dstDesc, STEN │ │ │ │ -0001a1c0: 4349 4c5f 5441 424c 4520 636f 6e73 7420 CIL_TABLE const │ │ │ │ -0001a1d0: 2a73 7465 6e63 696c 5461 626c 652c 2063 *stencilTable, c │ │ │ │ -0001a1e0: 6f6e 7374 2043 7075 4576 616c 7561 746f onst CpuEvaluato │ │ │ │ -0001a1f0: 7220 2a69 6e73 7461 6e63 653d 4e55 4c4c r *instance=NULL │ │ │ │ -0001a200: 2c20 766f 6964 202a 6465 7669 6365 436f , void *deviceCo │ │ │ │ -0001a210: 6e74 6578 743d 4e55 4c4c 293c 2f64 6976 ntext=NULL)
    Generic stat │ │ │ │ -0001a240: 6963 2065 7661 6c20 7374 656e 6369 6c73 ic eval stencils │ │ │ │ -0001a250: 2066 756e 6374 696f 6e2e 2054 6869 7320 function. This │ │ │ │ -0001a260: 6675 6e63 7469 6f6e 2068 6173 2061 2073 function has a s │ │ │ │ -0001a270: 616d 6520 7369 676e 6174 7572 6520 6173 ame signature as │ │ │ │ -0001a280: 206f 7468 6572 2064 6576 6963 6520 6b65 other device ke │ │ │ │ -0001a290: 726e 656c 7320 6861 762e 2e2e 3c2f 6469 rnels hav...
    Definiti │ │ │ │ -0001a2c0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on cpuEv │ │ │ │ -0001a2f0: 616c 7561 746f 722e 683a 3732 3c2f 613e aluator.h:72 │ │ │ │ -0001a300: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    static │ │ │ │ -0001a400: 2062 6f6f 6c20 4576 616c 5061 7463 6865 bool EvalPatche │ │ │ │ -0001a410: 7328 5352 435f 4255 4646 4552 202a 7372 s(SRC_BUFFER *sr │ │ │ │ -0001a420: 6342 7566 6665 722c 2042 7566 6665 7244 cBuffer, BufferD │ │ │ │ -0001a430: 6573 6372 6970 746f 7220 636f 6e73 7420 escriptor const │ │ │ │ -0001a440: 2661 6d70 3b73 7263 4465 7363 2c20 4453 &srcDesc, DS │ │ │ │ -0001a450: 545f 4255 4646 4552 202a 6473 7442 7566 T_BUFFER *dstBuf │ │ │ │ -0001a460: 6665 722c 2042 7566 6665 7244 6573 6372 fer, BufferDescr │ │ │ │ -0001a470: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ -0001a480: 3b64 7374 4465 7363 2c20 4453 545f 4255 ;dstDesc, DST_BU │ │ │ │ -0001a490: 4646 4552 202a 6475 4275 6666 6572 2c20 FFER *duBuffer, │ │ │ │ -0001a4a0: 4275 6666 6572 4465 7363 7269 7074 6f72 BufferDescriptor │ │ │ │ -0001a4b0: 2063 6f6e 7374 2026 616d 703b 6475 4465 const &duDe │ │ │ │ -0001a4c0: 7363 2c20 4453 545f 4255 4646 4552 202a sc, DST_BUFFER * │ │ │ │ -0001a4d0: 6476 4275 6666 6572 2c20 4275 6666 6572 dvBuffer, Buffer │ │ │ │ -0001a4e0: 4465 7363 7269 7074 6f72 2063 6f6e 7374 Descriptor const │ │ │ │ -0001a4f0: 2026 616d 703b 6476 4465 7363 2c20 4453 &dvDesc, DS │ │ │ │ -0001a500: 545f 4255 4646 4552 202a 6475 7542 7566 T_BUFFER *duuBuf │ │ │ │ -0001a510: 6665 722c 2042 7566 6665 7244 6573 6372 fer, BufferDescr │ │ │ │ -0001a520: 6970 746f 7220 636f 6e73 7420 2661 6d70 iptor const & │ │ │ │ -0001a530: 3b64 7575 4465 7363 2c20 4453 545f 4255 ;duuDesc, DST_BU │ │ │ │ -0001a540: 4646 4552 202a 6475 7642 7566 6665 722c FFER *duvBuffer, │ │ │ │ -0001a550: 2042 7566 6665 7244 6573 6372 6970 746f BufferDescripto │ │ │ │ -0001a560: 7220 636f 6e73 7420 2661 6d70 3b64 7576 r const &duv │ │ │ │ -0001a570: 4465 7363 2c20 4453 545f 4255 4646 4552 Desc, DST_BUFFER │ │ │ │ -0001a580: 202a 6476 7642 7566 6665 722c 2042 7566 *dvvBuffer, Buf │ │ │ │ -0001a590: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -0001a5a0: 6e73 7420 2661 6d70 3b64 7676 4465 7363 nst &dvvDesc │ │ │ │ -0001a5b0: 2c20 696e 7420 6e75 6d50 6174 6368 436f , int numPatchCo │ │ │ │ -0001a5c0: 6f72 6473 2c20 5041 5443 4843 4f4f 5244 ords, PATCHCOORD │ │ │ │ -0001a5d0: 5f42 5546 4645 5220 2a70 6174 6368 436f _BUFFER *patchCo │ │ │ │ -0001a5e0: 6f72 6473 2c20 5041 5443 485f 5441 424c ords, PATCH_TABL │ │ │ │ -0001a5f0: 4520 2a70 6174 6368 5461 626c 652c 2043 E *patchTable, C │ │ │ │ -0001a600: 7075 4576 616c 7561 746f 7220 636f 6e73 puEvaluator cons │ │ │ │ -0001a610: 7420 2a69 6e73 7461 6e63 653d 4e55 4c4c t *instance=NULL │ │ │ │ -0001a620: 2c20 766f 6964 202a 6465 7669 6365 436f , void *deviceCo │ │ │ │ -0001a630: 6e74 6578 743d 4e55 4c4c 293c 2f64 6976 ntext=NULL)
    Generic limi │ │ │ │ -0001a660: 7420 6576 616c 2066 756e 6374 696f 6e20 t eval function │ │ │ │ -0001a670: 7769 7468 2064 6572 6976 6174 6976 6573 with derivatives │ │ │ │ -0001a680: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ │ -0001a690: 6861 7320 6120 7361 6d65 2073 6967 6e61 has a same signa │ │ │ │ -0001a6a0: 7475 7265 2061 7320 6f74 6865 7220 6465 ture as other de │ │ │ │ -0001a6b0: 7669 6365 206b 6572 6e2e 2e2e 3c2f 6469 vice kern...
    Definiti │ │ │ │ -0001a6e0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on cpuEv │ │ │ │ -0001a710: 616c 7561 746f 722e 683a 3630 373c 2f61 aluator.h:607
    .
    stat │ │ │ │ -0001a820: 6963 2062 6f6f 6c20 4576 616c 5374 656e ic bool EvalSten │ │ │ │ -0001a830: 6369 6c73 2853 5243 5f42 5546 4645 5220 cils(SRC_BUFFER │ │ │ │ -0001a840: 2a73 7263 4275 6666 6572 2c20 4275 6666 *srcBuffer, Buff │ │ │ │ -0001a850: 6572 4465 7363 7269 7074 6f72 2063 6f6e erDescriptor con │ │ │ │ -0001a860: 7374 2026 616d 703b 7372 6344 6573 632c st &srcDesc, │ │ │ │ -0001a870: 2044 5354 5f42 5546 4645 5220 2a64 7374 DST_BUFFER *dst │ │ │ │ -0001a880: 4275 6666 6572 2c20 4275 6666 6572 4465 Buffer, BufferDe │ │ │ │ -0001a890: 7363 7269 7074 6f72 2063 6f6e 7374 2026 scriptor const & │ │ │ │ -0001a8a0: 616d 703b 6473 7444 6573 632c 2044 5354 amp;dstDesc, DST │ │ │ │ -0001a8b0: 5f42 5546 4645 5220 2a64 7542 7566 6665 _BUFFER *duBuffe │ │ │ │ -0001a8c0: 722c 2042 7566 6665 7244 6573 6372 6970 r, BufferDescrip │ │ │ │ -0001a8d0: 746f 7220 636f 6e73 7420 2661 6d70 3b64 tor const &d │ │ │ │ -0001a8e0: 7544 6573 632c 2044 5354 5f42 5546 4645 uDesc, DST_BUFFE │ │ │ │ -0001a8f0: 5220 2a64 7642 7566 6665 722c 2042 7566 R *dvBuffer, Buf │ │ │ │ -0001a900: 6665 7244 6573 6372 6970 746f 7220 636f ferDescriptor co │ │ │ │ -0001a910: 6e73 7420 2661 6d70 3b64 7644 6573 632c nst &dvDesc, │ │ │ │ -0001a920: 2053 5445 4e43 494c 5f54 4142 4c45 2063 STENCIL_TABLE c │ │ │ │ -0001a930: 6f6e 7374 202a 7374 656e 6369 6c54 6162 onst *stencilTab │ │ │ │ -0001a940: 6c65 2c20 636f 6e73 7420 4370 7545 7661 le, const CpuEva │ │ │ │ -0001a950: 6c75 6174 6f72 202a 696e 7374 616e 6365 luator *instance │ │ │ │ -0001a960: 3d4e 554c 4c2c 2076 6f69 6420 2a64 6576 =NULL, void *dev │ │ │ │ -0001a970: 6963 6543 6f6e 7465 7874 3d4e 554c 4c29 iceContext=NULL) │ │ │ │ -0001a980: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    . │ │ │ │ -0001ac80: 0a3c 6469 7620 636c 6173 733d 2274 7463 ..
    . │ │ │ │ -0001add0: 0a3c 6469 7620 6964 3d22 6e61 762d 7061 ...< │ │ │ │ -0001b030: 2f68 746d 6c3e 0a /html>. │ │ │ │ +0000ee90: 696e 656e 6f22 3e20 2033 3633 3c2f 7370 ineno"> 363
    .
    364< │ │ │ │ +0000ef00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0000ef10: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    3 │ │ │ │ +0000ef70: 3635 3c2f 7370 616e 3e3c 7370 616e 2063 65/ │ │ │ │ +0000ef90: 2f20 2054 6865 2063 6f6d 7075 7461 7469 / The computati │ │ │ │ +0000efa0: 6f6e 206f 6620 616e 2065 6467 652d 7665 on of an edge-ve │ │ │ │ +0000efb0: 7274 6578 206d 6173 6b20 7265 7175 6972 rtex mask requir │ │ │ │ +0000efc0: 6573 2069 6e73 7065 6374 696f 6e20 6f66 es inspection of │ │ │ │ +0000efd0: 2073 6861 7270 6e65 7373 2076 616c 7565 sharpness value │ │ │ │ +0000efe0: 7320 746f 3c2f 7370 616e 3e3c 2f64 6976 s to
    .
    366< │ │ │ │ +0000f040: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +0000f060: 6465 7465 726d 696e 6520 6966 2073 6d6f determine if smo │ │ │ │ +0000f070: 6f74 6820 6f72 2061 2063 7265 6173 652c oth or a crease, │ │ │ │ +0000f080: 2061 6e64 2061 6c73 6f20 746f 2064 6574 and also to det │ │ │ │ +0000f090: 6563 7420 616e 6420 6170 706c 7920 6120 ect and apply a │ │ │ │ +0000f0a0: 7472 616e 7369 7469 6f6e 2066 726f 6d20 transition from │ │ │ │ +0000f0b0: 613c 2f73 7061 6e3e 3c2f 6469 763e 0a3c a
    .< │ │ │ │ +0000f0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000f0d0: 3e3c 6120 6964 3d22 6c30 3033 3637 2220 > 367// cre │ │ │ │ +0000f130: 6173 6520 746f 2073 6d6f 6f74 682e 2020 ase to smooth. │ │ │ │ +0000f140: 5573 696e 6720 7468 6520 7072 6f74 6563 Using the protec │ │ │ │ +0000f150: 7465 6420 6d65 7468 6f64 7320 746f 2061 ted methods to a │ │ │ │ +0000f160: 7373 6967 6e20 7468 6520 7370 6563 6966 ssign the specif │ │ │ │ +0000f170: 6963 206d 6173 6b73 2028 6f6e 6c79 3c2f ic masks (only
    .
    < │ │ │ │ +0000f1c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0000f1d0: 6e6f 223e 2020 3336 383c 2f73 7061 6e3e no"> 368 │ │ │ │ +0000f1e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // two -- │ │ │ │ +0000f200: 2073 6d6f 6f74 6820 6f72 2063 7265 6173 smooth or creas │ │ │ │ +0000f210: 6529 2074 6869 7320 696d 706c 656d 656e e) this implemen │ │ │ │ +0000f220: 7461 7469 6f6e 2073 686f 756c 6420 7365 tation should se │ │ │ │ +0000f230: 7276 6520 616c 6c20 6e6f 6e2d 6c69 6e65 rve all non-line │ │ │ │ +0000f240: 6172 2073 6368 656d 6573 3c2f 7370 616e ar schemes
    .
    │ │ │ │ +0000f2a0: 2020 3336 393c 2f73 7061 6e3e 3c73 7061 369// (currently │ │ │ │ +0000f2d0: 2043 6174 6d61 726b 2061 6e64 204c 6f6f Catmark and Loo │ │ │ │ +0000f2e0: 7029 2061 6e64 206f 6e6c 7920 6e65 6564 p) and only need │ │ │ │ +0000f2f0: 7320 746f 2062 6520 7370 6563 6961 6c69 s to be speciali │ │ │ │ +0000f300: 7a65 6420 666f 7220 4269 6c69 6e65 6172 zed for Bilinear │ │ │ │ +0000f310: 2074 6f3c 2f73 7061 6e3e 3c2f 6469 763e to
    │ │ │ │ +0000f320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0000f350: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 370// t │ │ │ │ +0000f390: 7269 7669 616c 697a 6520 6974 2074 6f20 rivialize it to │ │ │ │ +0000f3a0: 7468 6520 6372 6561 7365 2063 6173 652e the crease case. │ │ │ │ +0000f3b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0000f3d0: 3c61 2069 643d 226c 3030 3337 3122 206e 371//
    .
    │ │ │ │ +0000f480: 2020 3337 323c 2f73 7061 6e3e 3c73 7061 372// The implem │ │ │ │ +0000f4b0: 656e 7461 7469 6f6e 2068 6572 6520 6973 entation here is │ │ │ │ +0000f4c0: 2073 6c69 6768 746c 7920 636f 6d70 6c69 slightly compli │ │ │ │ +0000f4d0: 6361 7465 6420 6279 2063 6f6d 6269 6e69 cated by combini │ │ │ │ +0000f4e0: 6e67 2074 776f 2073 6365 6e61 7269 6f73 ng two scenarios │ │ │ │ +0000f4f0: 2069 6e74 6f20 613c 2f73 7061 6e3e 3c2f into a.
    3 │ │ │ │ +0000f550: 3733 3c2f 7370 616e 3e3c 7370 616e 2063 73/ │ │ │ │ +0000f570: 2f20 2073 696e 676c 6520 696d 706c 656d / single implem │ │ │ │ +0000f580: 656e 7461 7469 6f6e 202d 2d20 6569 7468 entation -- eith │ │ │ │ +0000f590: 6572 2074 6865 2063 616c 6c65 7220 6b6e er the caller kn │ │ │ │ +0000f5a0: 6f77 7320 7468 6520 7061 7265 6e74 2061 ows the parent a │ │ │ │ +0000f5b0: 6e64 2063 6869 6c64 2072 756c 6573 2061 nd child rules a │ │ │ │ +0000f5c0: 6e64 3c2f 7370 616e 3e3c 2f64 6976 3e0a nd
    . │ │ │ │ +0000f5d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +0000f6a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000f6b0: 3e3c 6120 6964 3d22 6c30 3033 3735 2220 > 375// val │ │ │ │ +0000f710: 7565 732e 2020 426f 7468 2063 6173 6573 ues. Both cases │ │ │ │ +0000f720: 2069 6e63 6c75 6465 2071 7569 636b 2072 include quick r │ │ │ │ +0000f730: 6574 7572 6e20 6f6e 6365 2074 6865 2070 eturn once the p │ │ │ │ +0000f740: 6172 656e 7420 6973 2064 6574 6572 6d69 arent is determi │ │ │ │ +0000f750: 6e65 6420 746f 2062 653c 2f73 7061 6e3e ned to be │ │ │ │ +0000f760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0000f7b0: 2033 3736 3c2f 7370 616e 3e3c 7370 616e 376// smooth or t │ │ │ │ +0000f7e0: 6865 2063 6869 6c64 2061 2063 7265 6173 he child a creas │ │ │ │ +0000f7f0: 652c 206c 6561 7669 6e67 2074 6865 2074 e, leaving the t │ │ │ │ +0000f800: 7261 6e73 6974 696f 6e61 6c20 6361 7365 ransitional case │ │ │ │ +0000f810: 2072 656d 6169 6e69 6e67 2e3c 2f73 7061 remaining.
    .
    377//.
    378 │ │ │ │ +0000f8f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +0000f910: 2054 6865 206f 7665 7261 6c6c 2070 726f The overall pro │ │ │ │ +0000f920: 6365 7373 2069 7320 6173 2066 6f6c 6c6f cess is as follo │ │ │ │ +0000f930: 7773 3a3c 2f73 7061 6e3e 3c2f 6469 763e ws:
    │ │ │ │ +0000f940: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    380< │ │ │ │ +0000fa10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0000fa20: 656e 7422 3e2f 2f20 2020 2020 202d 2071 ent">// - q │ │ │ │ +0000fa30: 7569 636b 6c79 2064 6574 6563 7420 7468 uickly detect th │ │ │ │ +0000fa40: 6520 6d6f 7374 2063 6f6d 6d6f 6e20 7370 e most common sp │ │ │ │ +0000fa50: 6563 6966 6965 6420 6f72 2064 6574 6563 ecified or detec │ │ │ │ +0000fa60: 7465 6420 536d 6f6f 7468 2063 6173 6520 ted Smooth case │ │ │ │ +0000fa70: 616e 6420 7265 7475 726e 3c2f 7370 616e and return
    .
    │ │ │ │ +0000fad0: 2020 3338 313c 2f73 7061 6e3e 3c73 7061 381// - quic │ │ │ │ +0000fb00: 6b6c 7920 6465 7465 6374 2061 2066 756c kly detect a ful │ │ │ │ +0000fb10: 6c20 4372 6561 7365 2062 7920 6368 696c l Crease by chil │ │ │ │ +0000fb20: 6420 5275 6c65 2061 7373 6967 6e6d 656e d Rule assignmen │ │ │ │ +0000fb30: 7420 616e 6420 7265 7475 726e 3c2f 7370 t and return
    .
    382// - de │ │ │ │ +0000fbc0: 7465 726d 696e 6520 6672 6f6d 2073 6861 termine from sha │ │ │ │ +0000fbd0: 7270 6e65 7373 2069 6620 756e 7370 6563 rpness if unspec │ │ │ │ +0000fbe0: 6966 6965 6420 6368 696c 6420 6973 2061 ified child is a │ │ │ │ +0000fbf0: 2063 7265 6173 6520 2d2d 2072 6574 7572 crease -- retur │ │ │ │ +0000fc00: 6e20 6966 2073 6f3c 2f73 7061 6e3e 3c2f n if so.
    3 │ │ │ │ +0000fc60: 3833 3c2f 7370 616e 3e3c 7370 616e 2063 83/ │ │ │ │ +0000fc80: 2f20 2020 2020 202d 2063 6f6d 7075 7465 / - compute │ │ │ │ +0000fc90: 2073 6d6f 6f74 6820 6d61 736b 2066 6f72 smooth mask for │ │ │ │ +0000fca0: 2063 6869 6c64 2061 6e64 2063 6f6d 6269 child and combi │ │ │ │ +0000fcb0: 6e65 2077 6974 6820 6372 6561 7365 2066 ne with crease f │ │ │ │ +0000fcc0: 726f 6d20 7061 7265 6e74 3c2f 7370 616e rom parent
    .
    │ │ │ │ +0000fd20: 2020 3338 343c 2f73 7061 6e3e 3c73 7061 384//
    .
    385< │ │ │ │ +0000fda0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +0000fdc0: 5573 6167 6520 6f66 2074 6865 2070 6172 Usage of the par │ │ │ │ +0000fdd0: 656e 7420 5275 6c65 2068 6572 6520 616c ent Rule here al │ │ │ │ +0000fde0: 6c6f 7773 2073 6f6d 6520 6d69 7375 7365 lows some misuse │ │ │ │ +0000fdf0: 2069 6e20 7468 6174 206f 6e6c 7920 7468 in that only th │ │ │ │ +0000fe00: 7265 6520 6f66 2066 6976 6520 706f 7373 ree of five poss │ │ │ │ +0000fe10: 6962 6c65 3c2f 7370 616e 3e3c 2f64 6976 ible
    .
    386< │ │ │ │ +0000fe70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +0000fe90: 6173 7369 676e 6d65 6e74 7320 6172 6520 assignments are │ │ │ │ +0000fea0: 6c65 6769 7469 6d61 7465 2066 6f72 2074 legitimate for t │ │ │ │ +0000feb0: 6865 2070 6172 656e 7420 616e 6420 666f he parent and fo │ │ │ │ +0000fec0: 7572 2066 6f72 2074 6865 2063 6869 6c64 ur for the child │ │ │ │ +0000fed0: 2028 4461 7274 2062 6569 6e67 206f 6e6c (Dart being onl │ │ │ │ +0000fee0: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
    .< │ │ │ │ +0000fef0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0000ff00: 3e3c 6120 6964 3d22 6c30 3033 3837 2220 > 387
    // val │ │ │ │ +0000ff60: 6964 2066 6f72 2074 6865 2063 6869 6c64 id for the child │ │ │ │ +0000ff70: 2061 6e64 2043 6f72 6e65 7220 666f 7220 and Corner for │ │ │ │ +0000ff80: 6e65 6974 6865 7229 2e20 2052 6573 756c neither). Resul │ │ │ │ +0000ff90: 7473 2061 7265 2075 6e64 6566 696e 6564 ts are undefined │ │ │ │ +0000ffa0: 2069 6e20 7468 6573 6520 6361 7365 732e in these cases. │ │ │ │ +0000ffb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0000ffd0: 3c61 2069 643d 226c 3030 3338 3822 206e 388//
    .
    │ │ │ │ +00010080: 2020 3338 393c 2f73 7061 6e3e 3c73 7061 389template <SchemeType │ │ │ │ +000100c0: 2053 4348 454d 4526 6774 3b3c 2f64 6976 SCHEME>
    .
    390< │ │ │ │ +00010120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ +00010140: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ +00010150: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename EDGE, typename MASK>
    │ │ │ │ +000101b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000101e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 391v │ │ │ │ +00010220: 6f69 643c 2f73 7061 6e3e 3c2f 6469 763e oid
    │ │ │ │ +00010230: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ │ +000102c0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ │ +000102d0: 7265 663d 2261 3031 3333 332e 6874 6d6c ref="a01333.html │ │ │ │ +000102e0: 2361 3562 3561 3533 3737 6130 3165 6234 #a5b5a5377a01eb4 │ │ │ │ +000102f0: 6261 3434 3665 3137 3465 6666 3965 3435 ba446e174eff9e45 │ │ │ │ +00010300: 6163 223e 2020 3339 323c 2f61 3e3c 2f73 ac"> 392Scheme<S │ │ │ │ +00010370: 4348 454d 4526 6774 3b3a 3a43 6f6d 7075 CHEME>::Compu │ │ │ │ +00010380: 7465 4564 6765 5665 7274 6578 4d61 736b teEdgeVertexMask │ │ │ │ +00010390: 3c2f 613e 2845 4447 4520 3c73 7061 6e20 (EDGE │ │ │ │ +000103b0: 636f 6e73 743c 2f73 7061 6e3e 2661 6d70 const& │ │ │ │ +000103c0: 3b20 2020 2020 6564 6765 2c3c 2f64 6976 ; edge,
    .
    393< │ │ │ │ +00010420: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00010430: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00010440: 2020 2020 2020 2020 2020 2020 2020 204d M │ │ │ │ +00010450: 4153 4b26 616d 703b 2020 2020 2020 2020 ASK& │ │ │ │ +00010460: 2020 206d 6173 6b2c 3c2f 6469 763e 0a3c mask,
    .< │ │ │ │ +00010470: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00010480: 3e3c 6120 6964 3d22 6c30 3033 3934 2220 > 394 │ │ │ │ +000104d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000104e0: 2020 2020 2020 2020 2020 2020 3c61 2063 │ │ │ │ +00010540: 4372 6561 7365 3a3a 5275 6c65 3c2f 613e Crease::Rule │ │ │ │ +00010550: 2070 6172 656e 7452 756c 652c 3c2f 6469 parentRule,.
    395 │ │ │ │ +000105b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +000105c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000105d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000105e0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ +00010640: 3c2f 613e 2063 6869 6c64 5275 6c65 293c childRule)< │ │ │ │ +00010650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00010660: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    396 │ │ │ │ +000106d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00010720: 2033 3937 3c2f 7370 616e 3e20 2020 203c 397 < │ │ │ │ +00010730: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00010740: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    3 │ │ │ │ +000107a0: 3938 3c2f 7370 616e 3e20 2020 203c 7370 98 // If the pa │ │ │ │ +000107d0: 7265 6e74 2077 6173 2073 7065 6369 6669 rent was specifi │ │ │ │ +000107e0: 6564 206f 7220 6465 7465 726d 696e 6564 ed or determined │ │ │ │ +000107f0: 2074 6f20 6265 2053 6d6f 6f74 682c 2077 to be Smooth, w │ │ │ │ +00010800: 6520 6361 6e20 7175 6963 6b6c 7920 7265 e can quickly re │ │ │ │ +00010810: 7475 726e 3c2f 7370 616e 3e3c 2f64 6976 turn
    .
    399< │ │ │ │ +00010870: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00010890: 2f2f 2020 7769 7468 2061 2053 6d6f 6f74 // with a Smoot │ │ │ │ +000108a0: 6820 6d61 736b 2e20 204f 7468 6572 7769 h mask. Otherwi │ │ │ │ +000108b0: 7365 2074 6865 2070 6172 656e 7420 6973 se the parent is │ │ │ │ +000108c0: 2061 2063 7265 6173 6520 2d2d 2069 6620 a crease -- if │ │ │ │ +000108d0: 7468 6520 6368 696c 6420 7761 733c 2f73 the child was
    .
    400 │ │ │ │ +00010940: 2020 203c 7370 616e 2063 6c61 7373 3d22 // als │ │ │ │ +00010960: 6f20 7370 6563 6966 6965 6420 746f 2062 o specified to b │ │ │ │ +00010970: 6520 6120 6372 6561 7365 2c20 7765 2063 e a crease, we c │ │ │ │ +00010980: 616e 2071 7569 636b 6c79 2072 6574 7572 an quickly retur │ │ │ │ +00010990: 6e20 7769 7468 2061 2043 7265 6173 6520 n with a Crease │ │ │ │ +000109a0: 6d61 736b 2e3c 2f73 7061 6e3e 3c2f 6469 mask..
    401 │ │ │ │ +00010a00: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
    │ │ │ │ +00010a30: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    403< │ │ │ │ +00010ba0: 2f73 7061 6e3e 2020 2020 2020 2028 2870 /span> ((p │ │ │ │ +00010bb0: 6172 656e 7452 756c 6520 3d3d 203c 6120 arentRule == │ │ │ │ +00010c30: 4372 6561 7365 3a3a 5255 4c45 5f55 4e4b Crease::RULE_UNK │ │ │ │ +00010c40: 4e4f 574e 3c2f 613e 2920 2661 6d70 3b26 NOWN) && │ │ │ │ +00010c50: 616d 703b 2028 6564 6765 2e47 6574 5368 amp; (edge.GetSh │ │ │ │ +00010c60: 6172 706e 6573 7328 2920 266c 743b 3d20 arpness() <= │ │ │ │ +00010c70: 302e 3066 2929 2920 7b3c 2f64 6976 3e0a 0.0f))) {
    . │ │ │ │ +00010c80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00010d50: 2034 3035 3c2f 7370 616e 3e20 2020 2020 405 │ │ │ │ +00010d60: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +00010d80: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    406< │ │ │ │ +00010de0: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    407< │ │ │ │ +00010e40: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (c │ │ │ │ +00010e70: 6869 6c64 5275 6c65 203d 3d20 3c61 2063 hildRule == C │ │ │ │ +00010ef0: 7265 6173 653a 3a52 554c 455f 4352 4541 rease::RULE_CREA │ │ │ │ +00010f00: 5345 3c2f 613e 2920 7b3c 2f64 6976 3e0a SE) {
    . │ │ │ │ +00010f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00010fe0: 2034 3039 3c2f 7370 616e 3e20 2020 2020 409 │ │ │ │ +00010ff0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +00011010: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    410< │ │ │ │ +00011070: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    411< │ │ │ │ +000110d0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +000110f0: 3c61 2069 643d 226c 3030 3431 3222 206e 412 //
    .
    < │ │ │ │ +00011190: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000111a0: 6e6f 223e 2020 3431 333c 2f73 7061 6e3e no"> 413 │ │ │ │ +000111b0: 2020 2020 3c73 7061 6e20 636c 6173 733d // We │ │ │ │ +000111d0: 2068 6176 6520 6120 4372 6561 7365 206f have a Crease o │ │ │ │ +000111e0: 6e20 7468 6520 7061 7265 6e74 2061 6e64 n the parent and │ │ │ │ +000111f0: 2074 6865 2063 6869 6c64 2077 6173 2065 the child was e │ │ │ │ +00011200: 6974 6865 7220 7370 6563 6966 6965 6420 ither specified │ │ │ │ +00011210: 6173 2053 6d6f 6f74 683c 2f73 7061 6e3e as Smooth │ │ │ │ +00011220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00011270: 2034 3134 3c2f 7370 616e 3e20 2020 203c 414 < │ │ │ │ +00011280: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00011290: 656e 7422 3e2f 2f20 206f 7220 7761 7320 ent">// or was │ │ │ │ +000112a0: 6e6f 7420 7370 6563 6966 6965 6420 6174 not specified at │ │ │ │ +000112b0: 2061 6c6c 202d 2d20 6465 616c 2077 6974 all -- deal wit │ │ │ │ +000112c0: 6820 7468 6520 756e 7370 6563 6966 6965 h the unspecifie │ │ │ │ +000112d0: 6420 6361 7365 2066 6972 7374 2028 6167 d case first (ag │ │ │ │ +000112e0: 6169 6e3c 2f73 7061 6e3e 3c2f 6469 763e ain
    │ │ │ │ +000112f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00011320: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 415 / │ │ │ │ +00011360: 2f20 2072 6574 7572 6e69 6e67 2061 2043 / returning a C │ │ │ │ +00011370: 7265 6173 6520 6d61 736b 2069 6620 7468 rease mask if th │ │ │ │ +00011380: 6520 6368 696c 6420 6973 2061 6c73 6f20 e child is also │ │ │ │ +00011390: 6465 7465 726d 696e 6564 2074 6f20 6265 determined to be │ │ │ │ +000113a0: 2061 2043 7265 6173 6529 2061 6e64 3c2f a Crease) and
    .
    < │ │ │ │ +000113f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00011400: 6e6f 223e 2020 3431 363c 2f73 7061 6e3e no"> 416 │ │ │ │ +00011410: 2020 2020 3c73 7061 6e20 636c 6173 733d // co │ │ │ │ +00011430: 6e74 696e 7565 2069 6620 7765 2068 6176 ntinue if we hav │ │ │ │ +00011440: 6520 6120 7472 616e 7369 7469 6f6e 2074 e a transition t │ │ │ │ +00011450: 6f20 536d 6f6f 7468 2e3c 2f73 7061 6e3e o Smooth. │ │ │ │ +00011460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000114b0: 2034 3137 3c2f 7370 616e 3e20 2020 203c 417 < │ │ │ │ +000114c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000114d0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    4 │ │ │ │ +00011530: 3138 3c2f 7370 616e 3e20 2020 203c 7370 18 // Note when │ │ │ │ +00011560: 2071 7561 6c69 6679 696e 6720 7468 6520 qualifying the │ │ │ │ +00011570: 6368 696c 6420 7468 6174 2069 6620 7468 child that if th │ │ │ │ +00011580: 6520 7061 7265 6e74 2073 6861 7270 6e65 e parent sharpne │ │ │ │ +00011590: 7373 2026 6774 3b20 312e 302c 2072 6567 ss > 1.0, reg │ │ │ │ +000115a0: 6172 646c 6573 733c 2f73 7061 6e3e 3c2f ardless.
    4 │ │ │ │ +00011600: 3139 3c2f 7370 616e 3e20 2020 203c 7370 19 // of the cr │ │ │ │ +00011630: 6561 7369 6e67 206d 6574 686f 642c 2077 easing method, w │ │ │ │ +00011640: 6865 7468 6572 2074 6865 2063 6869 6c64 hether the child │ │ │ │ +00011650: 2073 6861 7270 6e65 7373 2076 616c 7565 sharpness value │ │ │ │ +00011660: 7320 6465 6361 7920 746f 207a 6572 6f20 s decay to zero │ │ │ │ +00011670: 6973 3c2f 7370 616e 3e3c 2f64 6976 3e0a is
    . │ │ │ │ +00011680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ +00011780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00011790: 6e6f 223e 2020 3432 313c 2f73 7061 6e3e no"> 421 │ │ │ │ +000117a0: 2020 2020 3c73 7061 6e20 636c 6173 733d // sh │ │ │ │ +000117c0: 6172 706e 6573 7329 2069 7320 2667 743b arpness) is > │ │ │ │ +000117d0: 2031 2e30 2c20 616e 6420 7768 656e 2063 1.0, and when c │ │ │ │ +000117e0: 6c61 6d70 6564 2074 6f20 3120 6566 6665 lamped to 1 effe │ │ │ │ +000117f0: 6374 6976 656c 7920 7969 656c 6473 2061 ctively yields a │ │ │ │ +00011800: 2066 756c 6c20 6372 6561 7365 2e3c 2f73 full crease.
    .
    422 │ │ │ │ +00011870: 2020 203c 7370 616e 2063 6c61 7373 3d22 //
    .
    423 │ │ │ │ +000118f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (childRule │ │ │ │ +00011920: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ +000119a0: 4c45 5f55 4e4b 4e4f 574e 3c2f 613e 2920 LE_UNKNOWN) │ │ │ │ +000119b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00011a00: 2020 3432 343c 2f73 7061 6e3e 2020 2020 424 │ │ │ │ +00011a10: 2020 2020 3c61 2063 6c61 7373 3d22 636f │ │ │ │ +00011a40: 4372 6561 7365 3c2f 613e 2063 7265 6173 Crease creas │ │ │ │ +00011a50: 6528 5f6f 7074 696f 6e73 293b 3c2f 6469 e(_options);.
    425 │ │ │ │ +00011ab0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00011ac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00011ad0: 3e3c 6120 6964 3d22 6c30 3034 3236 2220 > 426 bool │ │ │ │ +00011b40: 2063 6869 6c64 4973 4372 6561 7365 203d childIsCrease = │ │ │ │ +00011b50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 false;
    .
    427 │ │ │ │ +00011bd0: 2020 2020 2020 203c 7370 616e 2063 6c61 if (pare │ │ │ │ +00011c00: 6e74 5275 6c65 203d 3d20 3c61 2063 6c61 ntRule == Cre │ │ │ │ +00011c80: 6173 653a 3a52 554c 455f 4352 4541 5345 ase::RULE_CREASE │ │ │ │ +00011c90: 3c2f 613e 2920 7b3c 2f64 6976 3e0a 3c64 ) {
    . │ │ │ │ +00011cb0: 3c61 2069 643d 226c 3030 3432 3822 206e 428 // Child un │ │ │ │ +00011d20: 6b6e 6f77 6e20 6173 2064 6566 6175 6c74 known as default │ │ │ │ +00011d30: 2076 616c 7565 2062 7574 2070 6172 656e value but paren │ │ │ │ +00011d40: 7420 5275 6c65 2073 7065 6369 6669 6564 t Rule specified │ │ │ │ +00011d50: 2061 7320 4372 6561 7365 3c2f 7370 616e as Crease
    .
    │ │ │ │ +00011db0: 2020 3432 393c 2f73 7061 6e3e 2020 2020 429 │ │ │ │ +00011dc0: 2020 2020 2020 2020 6368 696c 6449 7343 childIsC │ │ │ │ +00011dd0: 7265 6173 6520 3d20 3c73 7061 6e20 636c rease = tr │ │ │ │ +00011df0: 7565 3c2f 7370 616e 3e3b 3c2f 6469 763e ue;
    │ │ │ │ +00011e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00011e30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 430 } < │ │ │ │ +00011e60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00011e70: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else i │ │ │ │ +00011ea0: 663c 2f73 7061 6e3e 2028 6564 6765 2e47 f (edge.G │ │ │ │ +00011eb0: 6574 5368 6172 706e 6573 7328 2920 2667 etSharpness() &g │ │ │ │ +00011ec0: 743b 3d20 312e 3066 2920 7b3c 2f64 6976 t;= 1.0f) {
    .
    431< │ │ │ │ +00011f20: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00011f30: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Shar │ │ │ │ +00011f50: 706e 6573 7320 2667 743b 3d20 312e 3020 pness >= 1.0 │ │ │ │ +00011f60: 616c 7761 7973 2061 2063 7265 6173 6520 always a crease │ │ │ │ +00011f70: 2d2d 2073 6565 206e 6f74 6520 6162 6f76 -- see note abov │ │ │ │ +00011f80: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ +00011f90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00011fa0: 3e3c 6120 6964 3d22 6c30 3034 3332 2220 > 432 c │ │ │ │ +00011ff0: 6869 6c64 4973 4372 6561 7365 203d 203c hildIsCrease = < │ │ │ │ +00012000: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00012010: 6f72 6422 3e74 7275 653c 2f73 7061 6e3e ord">true │ │ │ │ +00012020: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00012070: 2020 3433 333c 2f73 7061 6e3e 2020 2020 433 │ │ │ │ +00012080: 2020 2020 7d20 3c73 7061 6e20 636c 6173 } │ │ │ │ +000120a0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if │ │ │ │ +000120d0: 2863 7265 6173 652e 3c61 2063 6c61 7373 (crease.IsUnifo │ │ │ │ +00012130: 726d 3c2f 613e 2829 2920 7b3c 2f64 6976 rm()) {
    .
    434< │ │ │ │ +00012190: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000121a0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Shar │ │ │ │ +000121c0: 706e 6573 7320 266c 743b 2031 2e30 2069 pness < 1.0 i │ │ │ │ +000121d0: 7320 6775 6172 616e 7465 6564 2074 6f20 s guaranteed to │ │ │ │ +000121e0: 6465 6361 7920 746f 2030 2e30 2066 6f72 decay to 0.0 for │ │ │ │ +000121f0: 2055 6e69 666f 726d 2063 6869 6c64 2065 Uniform child e │ │ │ │ +00012200: 6467 6573 3c2f 7370 616e 3e3c 2f64 6976 dges
    .
    435< │ │ │ │ +00012260: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00012270: 2020 6368 696c 6449 7343 7265 6173 6520 childIsCrease │ │ │ │ +00012280: 3d20 3c73 7061 6e20 636c 6173 733d 226b = false;
    .
    < │ │ │ │ +000122e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000122f0: 6e6f 223e 2020 3433 363c 2f73 7061 6e3e no"> 436 │ │ │ │ +00012300: 2020 2020 2020 2020 7d20 3c73 7061 6e20 } else │ │ │ │ +00012330: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00012380: 2020 3433 373c 2f73 7061 6e3e 2020 2020 437 │ │ │ │ +00012390: 2020 2020 2020 2020 3c73 7061 6e20 636c // │ │ │ │ +000123b0: 2020 5368 6172 706e 6573 7320 266c 743b Sharpness < │ │ │ │ +000123c0: 3d20 312e 3020 646f 6573 206e 6f74 206e = 1.0 does not n │ │ │ │ +000123d0: 6563 6573 7361 7269 6c79 2064 6563 6179 ecessarily decay │ │ │ │ +000123e0: 2074 6f20 302e 3020 666f 7220 626f 7468 to 0.0 for both │ │ │ │ +000123f0: 2063 6869 6c64 2065 6467 6573 2e2e 2e3c child edges...< │ │ │ │ +00012400: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00012420: 6120 6964 3d22 6c30 3034 3338 2220 6e61 a id="l00438" na │ │ │ │ +00012430: 6d65 3d22 6c30 3034 3338 223e 3c2f 613e me="l00438"> │ │ │ │ +00012440: 3c73 7061 6e20 636c 6173 733d 226c 696e 438 float cEdgeSharpne │ │ │ │ +000124a0: 7373 5b32 5d3b 3c2f 6469 763e 0a3c 6469 ss[2];
    .< │ │ │ │ +000124c0: 6120 6964 3d22 6c30 3034 3339 2220 6e61 a id="l00439" na │ │ │ │ +000124d0: 6d65 3d22 6c30 3034 3339 223e 3c2f 613e me="l00439"> │ │ │ │ +000124e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 439 edg │ │ │ │ +00012510: 652e 4765 7443 6869 6c64 5368 6172 706e e.GetChildSharpn │ │ │ │ +00012520: 6573 7365 7328 6372 6561 7365 2c20 6345 esses(crease, cE │ │ │ │ +00012530: 6467 6553 6861 7270 6e65 7373 293b 3c2f dgeSharpness);.
    4 │ │ │ │ +00012590: 3430 3c2f 7370 616e 3e20 2020 2020 2020 40 │ │ │ │ +000125a0: 2020 2020 2063 6869 6c64 4973 4372 6561 childIsCrea │ │ │ │ +000125b0: 7365 203d 2028 6345 6467 6553 6861 7270 se = (cEdgeSharp │ │ │ │ +000125c0: 6e65 7373 5b30 5d20 2667 743b 2030 2e30 ness[0] > 0.0 │ │ │ │ +000125d0: 6629 2026 616d 703b 2661 6d70 3b20 2863 f) && (c │ │ │ │ +000125e0: 4564 6765 5368 6172 706e 6573 735b 315d EdgeSharpness[1] │ │ │ │ +000125f0: 2026 6774 3b20 302e 3066 293b 3c2f 6469 > 0.0f);.
    441 │ │ │ │ +00012650: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ │ +00012660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000126b0: 2034 3432 3c2f 7370 616e 3e20 2020 2020 442 │ │ │ │ +000126c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +000126e0: 2f73 7061 6e3e 2028 6368 696c 6449 7343 /span> (childIsC │ │ │ │ +000126f0: 7265 6173 6529 207b 3c2f 6469 763e 0a3c rease) {
    .< │ │ │ │ +00012700: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00012710: 3e3c 6120 6964 3d22 6c30 3034 3433 2220 > 443 a │ │ │ │ +00012760: 7373 6967 6e43 7265 6173 654d 6173 6b46 ssignCreaseMaskF │ │ │ │ +00012770: 6f72 4564 6765 2865 6467 652c 206d 6173 orEdge(edge, mas │ │ │ │ +00012780: 6b29 3b3c 2f64 6976 3e0a 3c64 6976 2063 k);
    .
    444 │ │ │ │ +000127e0: 2020 2020 2020 2020 2020 3c73 7061 6e20 return;
    .
    445 │ │ │ │ +00012870: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ │ +00012890: 6120 6964 3d22 6c30 3034 3436 2220 6e61 a id="l00446" na │ │ │ │ +000128a0: 6d65 3d22 6c30 3034 3436 223e 3c2f 613e me="l00446"> │ │ │ │ +000128b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 446 }
    .< │ │ │ │ +000128f0: 6120 6964 3d22 6c30 3034 3437 2220 6e61 a id="l00447" na │ │ │ │ +00012900: 6d65 3d22 6c30 3034 3437 223e 3c2f 613e me="l00447"> │ │ │ │ +00012910: 3c73 7061 6e20 636c 6173 733d 226c 696e 447
    .
    448 │ │ │ │ +00012990: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ +000129b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00012a00: 2034 3439 3c2f 7370 616e 3e20 2020 203c 449 < │ │ │ │ +00012a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00012a20: 656e 7422 3e2f 2f20 2057 6520 6172 6520 ent">// We are │ │ │ │ +00012a30: 6e6f 7720 6c65 6674 2077 6974 6820 7468 now left with th │ │ │ │ +00012a40: 6520 4372 6561 7365 2d74 6f2d 536d 6f6f e Crease-to-Smoo │ │ │ │ +00012a50: 7468 2063 6173 6520 2d2d 2063 6f6d 7075 th case -- compu │ │ │ │ +00012a60: 7465 2074 6865 2053 6d6f 6f74 6820 6d61 te the Smooth ma │ │ │ │ +00012a70: 736b 3c2f 7370 616e 3e3c 2f64 6976 3e0a sk
    . │ │ │ │ +00012a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ │ +00012b90: 2020 3435 313c 2f73 7061 6e3e 2020 2020 451 │ │ │ │ +00012ba0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +00012bc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00012c10: 3435 323c 2f73 7061 6e3e 2020 2020 3c73 452 // A genera │ │ │ │ +00012c40: 6c20 636f 6d62 696e 6174 696f 6e20 6f66 l combination of │ │ │ │ +00012c50: 2073 6570 6172 6174 656c 7920 6173 7369 separately assi │ │ │ │ +00012c60: 676e 6564 206d 6173 6b73 2068 6572 6520 gned masks here │ │ │ │ +00012c70: 2861 7320 646f 6e65 2069 6e20 7468 6520 (as done in the │ │ │ │ +00012c80: 7665 7274 6578 2d3c 2f73 7061 6e3e 3c2f vertex-.
    4 │ │ │ │ +00012ce0: 3533 3c2f 7370 616e 3e20 2020 203c 7370 53 // vertex ca │ │ │ │ +00012d10: 7365 2920 6973 206f 7665 726b 696c 6c20 se) is overkill │ │ │ │ +00012d20: 2d2d 2074 7269 7669 616c 6c79 2063 6f6d -- trivially com │ │ │ │ +00012d30: 6269 6e65 2074 6865 2030 2e35 6620 7665 bine the 0.5f ve │ │ │ │ +00012d40: 7274 6578 2063 6f65 6666 6963 6965 6e74 rtex coefficient │ │ │ │ +00012d50: 2066 6f72 3c2f 7370 616e 3e3c 2f64 6976 for
    .
    454< │ │ │ │ +00012db0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00012dd0: 2f2f 2020 7468 6520 4372 6561 7365 206f // the Crease o │ │ │ │ +00012de0: 6620 7468 6520 7061 7265 6e74 2077 6974 f the parent wit │ │ │ │ +00012df0: 6820 7468 6520 7665 7274 6578 2077 6569 h the vertex wei │ │ │ │ +00012e00: 6768 7473 2061 6e64 2061 7474 656e 7561 ghts and attenua │ │ │ │ +00012e10: 7465 2074 6865 2066 6163 6520 7765 6967 te the face weig │ │ │ │ +00012e20: 6874 733c 2f73 7061 6e3e 3c2f 6469 763e hts
    │ │ │ │ +00012e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00012e60: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 455 / │ │ │ │ +00012ea0: 2f20 2061 6363 6f72 6469 6e67 6c79 2e3c / accordingly.< │ │ │ │ +00012eb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00012ed0: 6120 6964 3d22 6c30 3034 3536 2220 6e61 a id="l00456" na │ │ │ │ +00012ee0: 6d65 3d22 6c30 3034 3536 223e 3c2f 613e me="l00456"> │ │ │ │ +00012ef0: 3c73 7061 6e20 636c 6173 733d 226c 696e 456 //
    .
    457 │ │ │ │ +00012f90: 2020 2061 7373 6967 6e53 6d6f 6f74 684d assignSmoothM │ │ │ │ +00012fa0: 6173 6b46 6f72 4564 6765 2865 6467 652c askForEdge(edge, │ │ │ │ +00012fb0: 206d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 mask);
    . │ │ │ │ +00012fd0: 3c61 2069 643d 226c 3030 3435 3822 206e 458
    .
    459 │ │ │ │ +00013070: 2020 3c73 7061 6e20 636c 6173 733d 226b typedef< │ │ │ │ +00013090: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ │ │ │ │ +000130b0: 656e 616d 653c 2f73 7061 6e3e 204d 4153 ename MAS │ │ │ │ +000130c0: 4b3a 3a57 6569 6768 7420 5765 6967 6874 K::Weight Weight │ │ │ │ +000130d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00013120: 2020 3436 303c 2f73 7061 6e3e 203c 2f64 460 .
    46 │ │ │ │ +00013180: 313c 2f73 7061 6e3e 2020 2020 5765 6967 1 Weig │ │ │ │ +00013190: 6874 2070 5765 6967 6874 203d 2065 6467 ht pWeight = edg │ │ │ │ +000131a0: 652e 4765 7453 6861 7270 6e65 7373 2829 e.GetSharpness() │ │ │ │ +000131b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00013200: 2020 3436 323c 2f73 7061 6e3e 2020 2020 462 │ │ │ │ +00013210: 5765 6967 6874 2063 5765 6967 6874 203d Weight cWeight = │ │ │ │ +00013220: 2031 2e30 6620 2d20 7057 6569 6768 743b 1.0f - pWeight; │ │ │ │ +00013230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00013280: 2034 3633 3c2f 7370 616e 3e20 3c2f 6469 463 .
    464 │ │ │ │ +000132e0: 3c2f 7370 616e 3e20 2020 206d 6173 6b2e mask. │ │ │ │ +000132f0: 5665 7274 6578 5765 6967 6874 2830 2920 VertexWeight(0) │ │ │ │ +00013300: 3d20 7057 6569 6768 7420 2a20 302e 3566 = pWeight * 0.5f │ │ │ │ +00013310: 202b 2063 5765 6967 6874 202a 206d 6173 + cWeight * mas │ │ │ │ +00013320: 6b2e 5665 7274 6578 5765 6967 6874 2830 k.VertexWeight(0 │ │ │ │ +00013330: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    465 │ │ │ │ +00013390: 206d 6173 6b2e 5665 7274 6578 5765 6967 mask.VertexWeig │ │ │ │ +000133a0: 6874 2831 2920 3d20 7057 6569 6768 7420 ht(1) = pWeight │ │ │ │ +000133b0: 2a20 302e 3566 202b 2063 5765 6967 6874 * 0.5f + cWeight │ │ │ │ +000133c0: 202a 206d 6173 6b2e 5665 7274 6578 5765 * mask.VertexWe │ │ │ │ +000133d0: 6967 6874 2831 293b 3c2f 6469 763e 0a3c ight(1);
    .< │ │ │ │ +000133e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000133f0: 3e3c 6120 6964 3d22 6c30 3034 3636 2220 > 466
    .
    467 │ │ │ │ +00013490: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +000134b0: 3c2f 7370 616e 3e20 6661 6365 436f 756e faceCoun │ │ │ │ +000134c0: 7420 3d20 6d61 736b 2e47 6574 4e75 6d46 t = mask.GetNumF │ │ │ │ +000134d0: 6163 6557 6569 6768 7473 2829 3b3c 2f64 aceWeights();.
    46 │ │ │ │ +00013530: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 for │ │ │ │ +00013560: 2028 3c73 7061 6e20 636c 6173 733d 226b (int< │ │ │ │ +00013580: 2f73 7061 6e3e 2069 203d 2030 3b20 6920 /span> i = 0; i │ │ │ │ +00013590: 266c 743b 2066 6163 6543 6f75 6e74 3b20 < faceCount; │ │ │ │ +000135a0: 2b2b 6929 207b 3c2f 6469 763e 0a3c 6469 ++i) {
    .< │ │ │ │ +000135c0: 6120 6964 3d22 6c30 3034 3639 2220 6e61 a id="l00469" na │ │ │ │ +000135d0: 6d65 3d22 6c30 3034 3639 223e 3c2f 613e me="l00469"> │ │ │ │ +000135e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 469 mask.Fa │ │ │ │ +00013610: 6365 5765 6967 6874 2869 2920 2a3d 2063 ceWeight(i) *= c │ │ │ │ +00013620: 5765 6967 6874 3b3c 2f64 6976 3e0a 3c64 Weight;
    . │ │ │ │ +00013640: 3c61 2069 643d 226c 3030 3437 3022 206e 470 }
    . │ │ │ │ +000136a0: 3c61 2069 643d 226c 3030 3437 3122 206e 471}
    .
    │ │ │ │ +000136f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00013760: 6120 6964 3d22 6c30 3034 3733 2220 6e61 a id="l00473" na │ │ │ │ +00013770: 6d65 3d22 6c30 3034 3733 223e 3c2f 613e me="l00473"> │ │ │ │ +00013780: 3c73 7061 6e20 636c 6173 733d 226c 696e 473// │ │ │ │ +000137c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00013810: 2034 3734 3c2f 7370 616e 3e3c 7370 616e 474// The computa │ │ │ │ +00013840: 7469 6f6e 206f 6620 6120 7665 7274 6578 tion of a vertex │ │ │ │ +00013850: 2d76 6572 7465 7820 6d61 736b 2072 6571 -vertex mask req │ │ │ │ +00013860: 7569 7265 7320 696e 7370 6563 7469 6f6e uires inspection │ │ │ │ +00013870: 206f 6620 6372 6561 7369 6e67 2073 6861 of creasing sha │ │ │ │ +00013880: 7270 6e65 7373 2076 616c 7565 733c 2f73 rpness values
    .
    475< │ │ │ │ +000138f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00013900: 656e 7422 3e2f 2f20 2074 6f20 6465 7465 ent">// to dete │ │ │ │ +00013910: 726d 696e 6520 7768 6174 2073 7562 6469 rmine what subdi │ │ │ │ +00013920: 7669 7369 6f6e 2052 756c 6573 2061 7070 vision Rules app │ │ │ │ +00013930: 6c79 2074 6f20 7468 6520 7061 7265 6e74 ly to the parent │ │ │ │ +00013940: 2061 6e64 2069 7473 2063 6869 6c64 2076 and its child v │ │ │ │ +00013950: 6572 7465 782c 2061 6e64 2061 6c73 6f20 ertex, and also │ │ │ │ +00013960: 746f 3c2f 7370 616e 3e3c 2f64 6976 3e0a to
    . │ │ │ │ +00013970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000139a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 476// de │ │ │ │ +000139e0: 7465 6374 2061 6e64 2061 7070 6c79 2061 tect and apply a │ │ │ │ +000139f0: 2074 7261 6e73 6974 696f 6e20 6265 7477 transition betw │ │ │ │ +00013a00: 6565 6e20 7477 6f20 6469 6666 6572 696e een two differin │ │ │ │ +00013a10: 6720 5275 6c65 732e 2020 5573 696e 6720 g Rules. Using │ │ │ │ +00013a20: 7468 6520 7072 6f74 6563 7465 6420 6d65 the protected me │ │ │ │ +00013a30: 7468 6f64 7320 746f 3c2f 7370 616e 3e3c thods to< │ │ │ │ +00013a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00013a90: 3437 373c 2f73 7061 6e3e 3c73 7061 6e20 477 │ │ │ │ +00013ab0: 2f2f 2020 6173 7369 676e 2073 7065 6369 // assign speci │ │ │ │ +00013ac0: 6669 6320 6d61 736b 732c 2074 6869 7320 fic masks, this │ │ │ │ +00013ad0: 696d 706c 656d 656e 7461 7469 6f6e 2073 implementation s │ │ │ │ +00013ae0: 686f 756c 6420 7365 7276 6520 616c 6c20 hould serve all │ │ │ │ +00013af0: 6e6f 6e2d 6c69 6e65 6172 2073 6368 656d non-linear schem │ │ │ │ +00013b00: 6573 2028 6375 7272 656e 746c 793c 2f73 es (currently
    .
    478< │ │ │ │ +00013b70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00013b80: 656e 7422 3e2f 2f20 2043 6174 6d61 726b ent">// Catmark │ │ │ │ +00013b90: 2061 6e64 204c 6f6f 7029 2061 6e64 206f and Loop) and o │ │ │ │ +00013ba0: 6e6c 7920 6e65 6564 7320 746f 2062 6520 nly needs to be │ │ │ │ +00013bb0: 7370 6563 6961 6c69 7a65 6420 666f 7220 specialized for │ │ │ │ +00013bc0: 4269 6c69 6e65 6172 2074 6f20 7265 6d6f Bilinear to remo │ │ │ │ +00013bd0: 7665 2061 6c6c 2075 6e6e 6563 6573 7361 ve all unnecessa │ │ │ │ +00013be0: 7279 3c2f 7370 616e 3e3c 2f64 6976 3e0a ry
    . │ │ │ │ +00013bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ +00013ce0: 2020 3438 303c 2f73 7061 6e3e 3c73 7061 480//
    .
    481< │ │ │ │ +00013d60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +00013d80: 5468 6520 696d 706c 656d 656e 7461 7469 The implementati │ │ │ │ +00013d90: 6f6e 2068 6572 6520 6973 2073 6c69 6768 on here is sligh │ │ │ │ +00013da0: 746c 7920 636f 6d70 6c69 6361 7465 6420 tly complicated │ │ │ │ +00013db0: 6279 2063 6f6d 6269 6e69 6e67 2074 776f by combining two │ │ │ │ +00013dc0: 2073 6365 6e61 7269 6f73 2069 6e74 6f20 scenarios into │ │ │ │ +00013dd0: 6f6e 6520 2d2d 3c2f 7370 616e 3e3c 2f64 one --.
    48 │ │ │ │ +00013e30: 323c 2f73 7061 6e3e 3c73 7061 6e20 636c 2// │ │ │ │ +00013e50: 2020 6569 7468 6572 2074 6865 2063 616c either the cal │ │ │ │ +00013e60: 6c65 7220 6b6e 6f77 7320 7468 6520 7061 ler knows the pa │ │ │ │ +00013e70: 7265 6e74 2061 6e64 2063 6869 6c64 2072 rent and child r │ │ │ │ +00013e80: 756c 6573 2061 6e64 2070 726f 7669 6465 ules and provide │ │ │ │ +00013e90: 7320 7468 656d 2c20 6f72 2074 6865 7920 s them, or they │ │ │ │ +00013ea0: 646f 6e26 2333 393b 7420 616e 643c 2f73 don't and
    .
    483< │ │ │ │ +00013f10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00013f20: 656e 7422 3e2f 2f20 2074 6865 2052 756c ent">// the Rul │ │ │ │ +00013f30: 6573 2068 6176 6520 746f 2062 6520 6465 es have to be de │ │ │ │ +00013f40: 7465 726d 696e 6564 2066 726f 6d20 7368 termined from sh │ │ │ │ +00013f50: 6172 706e 6573 7320 7661 6c75 6573 2e20 arpness values. │ │ │ │ +00013f60: 2045 7665 6e20 7768 656e 2074 6865 2052 Even when the R │ │ │ │ +00013f70: 756c 6573 2061 7265 206b 6e6f 776e 2061 ules are known a │ │ │ │ +00013f80: 6e64 3c2f 7370 616e 3e3c 2f64 6976 3e0a nd
    . │ │ │ │ +00013f90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +00013fc0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 484// pr │ │ │ │ +00014000: 6f76 6964 6564 2074 686f 7567 682c 2074 ovided though, t │ │ │ │ +00014010: 6865 7265 2061 7265 2063 6173 6573 2077 here are cases w │ │ │ │ +00014020: 6865 7265 2074 6865 2070 6172 656e 7420 here the parent │ │ │ │ +00014030: 616e 6420 6368 696c 6420 7368 6172 706e and child sharpn │ │ │ │ +00014040: 6573 7320 7661 6c75 6573 206e 6565 6420 ess values need │ │ │ │ +00014050: 746f 2062 653c 2f73 7061 6e3e 3c2f 6469 to be.
    485 │ │ │ │ +000140b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +000140d0: 2069 6465 6e74 6966 6965 642c 2073 6f20 identified, so │ │ │ │ +000140e0: 6163 636f 756e 7469 6e67 2066 6f72 2074 accounting for t │ │ │ │ +000140f0: 6865 2075 6e6b 6e6f 776e 2052 756c 6573 he unknown Rules │ │ │ │ +00014100: 2074 6f6f 2069 7320 6e6f 7420 6d75 6368 too is not much │ │ │ │ +00014110: 206f 6620 616e 2061 6464 6564 2063 6f6d of an added com │ │ │ │ +00014120: 706c 6963 6174 696f 6e2e 3c2f 7370 616e plication.
    .
    │ │ │ │ +00014180: 2020 3438 363c 2f73 7061 6e3e 3c73 7061 486//
    .
    487< │ │ │ │ +00014200: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>// │ │ │ │ +00014220: 5468 6520 6265 6e65 6669 7420 6f66 2073 The benefit of s │ │ │ │ +00014230: 7570 706f 7274 696e 6720 7370 6563 6966 upporting specif │ │ │ │ +00014240: 6965 6420 5275 6c65 7320 6973 2074 6861 ied Rules is tha │ │ │ │ +00014250: 7420 7468 6579 2063 616e 206f 6674 656e t they can often │ │ │ │ +00014260: 2062 6520 7472 6976 6961 6c6c 793c 2f73 be trivially
    .
    488< │ │ │ │ +000142d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000142e0: 656e 7422 3e2f 2f20 2064 6574 6572 6d69 ent">// determi │ │ │ │ +000142f0: 6e65 6420 6672 6f6d 2063 6f6e 7465 7874 ned from context │ │ │ │ +00014300: 2028 652e 672e 2061 2076 6572 7465 7820 (e.g. a vertex │ │ │ │ +00014310: 6465 7269 7665 6420 6672 6f6d 2061 2066 derived from a f │ │ │ │ +00014320: 6163 6520 6174 2061 2070 7265 7669 6f75 ace at a previou │ │ │ │ +00014330: 7320 6c65 7665 6c20 7769 6c6c 2061 6c77 s level will alw │ │ │ │ +00014340: 6179 733c 2f73 7061 6e3e 3c2f 6469 763e ays
    │ │ │ │ +00014350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00014380: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 489// b │ │ │ │ +000143c0: 6520 736d 6f6f 7468 2920 7261 7468 6572 e smooth) rather │ │ │ │ +000143d0: 2074 6861 6e20 6d6f 7265 2067 656e 6572 than more gener │ │ │ │ +000143e0: 616c 6c79 2c20 616e 6420 6174 2067 7265 ally, and at gre │ │ │ │ +000143f0: 6174 6572 2063 6f73 742c 2069 6e73 7065 ater cost, inspe │ │ │ │ +00014400: 6374 696e 6720 6e65 6967 6862 6f72 696e cting neighborin │ │ │ │ +00014410: 6720 616e 643c 2f73 7061 6e3e 3c2f 6469 g and.
    490 │ │ │ │ +00014470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 // │ │ │ │ +00014490: 2074 6865 7920 6172 6520 6f66 7465 6e20 they are often │ │ │ │ +000144a0: 7468 6520 7361 6d65 2066 6f72 2070 6172 the same for par │ │ │ │ +000144b0: 656e 7420 616e 6420 6368 696c 642e 3c2f ent and child.
    .
    < │ │ │ │ +00014500: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014510: 6e6f 223e 2020 3439 313c 2f73 7061 6e3e no"> 491 │ │ │ │ +00014520: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +00014540: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00014590: 3439 323c 2f73 7061 6e3e 3c73 7061 6e20 492 │ │ │ │ +000145b0: 2f2f 2020 5468 6520 6f76 6572 616c 6c20 // The overall │ │ │ │ +000145c0: 7072 6f63 6573 7320 6973 2061 7320 666f process is as fo │ │ │ │ +000145d0: 6c6c 6f77 733a 3c2f 7370 616e 3e3c 2f64 llows:.
    49 │ │ │ │ +00014630: 333c 2f73 7061 6e3e 3c73 7061 6e20 636c 3// │ │ │ │ +00014650: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00014670: 3c61 2069 643d 226c 3030 3439 3422 206e 494// │ │ │ │ +000146d0: 2d20 7175 6963 6b6c 7920 6465 7465 6374 - quickly detect │ │ │ │ +000146e0: 2074 6865 206d 6f73 7420 636f 6d6d 6f6e the most common │ │ │ │ +000146f0: 2053 6d6f 6f74 6820 6361 7365 2077 6865 Smooth case whe │ │ │ │ +00014700: 6e20 7370 6563 6966 6965 6420 616e 6420 n specified and │ │ │ │ +00014710: 7265 7475 726e 3c2f 7370 616e 3e3c 2f64 return.
    49 │ │ │ │ +00014770: 353c 2f73 7061 6e3e 3c73 7061 6e20 636c 5// │ │ │ │ +00014790: 2020 2020 2020 2d20 6465 7465 726d 696e - determin │ │ │ │ +000147a0: 6520 6966 2073 6861 7270 6e65 7373 2066 e if sharpness f │ │ │ │ +000147b0: 6f72 2070 6172 656e 7420 6973 2072 6571 or parent is req │ │ │ │ +000147c0: 7569 7265 6420 616e 6420 6761 7468 6572 uired and gather │ │ │ │ +000147d0: 2069 6620 736f 3c2f 7370 616e 3e3c 2f64 if so.
    49 │ │ │ │ +00014830: 363c 2f73 7061 6e3e 3c73 7061 6e20 636c 6// │ │ │ │ +00014850: 2020 2020 2020 2d20 6966 2075 6e73 7065 - if unspe │ │ │ │ +00014860: 6369 6669 6564 2c20 6465 7465 726d 696e cified, determin │ │ │ │ +00014870: 6520 7468 6520 7061 7265 6e74 2072 756c e the parent rul │ │ │ │ +00014880: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ +00014890: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000148a0: 3e3c 6120 6964 3d22 6c30 3034 3937 2220 > 497// │ │ │ │ +00014900: 202d 2061 7373 6967 6e20 6d61 736b 2066 - assign mask f │ │ │ │ +00014910: 6f72 2074 6865 2070 6172 656e 7420 7275 or the parent ru │ │ │ │ +00014920: 6c65 202d 2d20 7265 7475 726e 696e 6720 le -- returning │ │ │ │ +00014930: 6966 2053 6d6f 6f74 682f 4461 7274 3c2f if Smooth/Dart
    .
    < │ │ │ │ +00014980: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014990: 6e6f 223e 2020 3439 383c 2f73 7061 6e3e no"> 498 │ │ │ │ +000149a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // - │ │ │ │ +000149c0: 7265 7475 726e 2069 6620 6368 696c 6420 return if child │ │ │ │ +000149d0: 7275 6c65 206d 6174 6368 6573 2070 6172 rule matches par │ │ │ │ +000149e0: 656e 743c 2f73 7061 6e3e 3c2f 6469 763e ent
    │ │ │ │ +000149f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00014a20: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 499// │ │ │ │ +00014a60: 2020 202d 2067 6174 6865 7220 7368 6172 - gather shar │ │ │ │ +00014a70: 706e 6573 7320 666f 7220 6368 696c 6420 pness for child │ │ │ │ +00014a80: 746f 2064 6574 6572 6d69 6e65 206f 7220 to determine or │ │ │ │ +00014a90: 636f 6d62 696e 6520 6368 696c 6420 7275 combine child ru │ │ │ │ +00014aa0: 6c65 3c2f 7370 616e 3e3c 2f64 6976 3e0a le
    . │ │ │ │ +00014ab0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    501// - as │ │ │ │ +00014bf0: 7369 676e 206c 6f63 616c 206d 6173 6b20 sign local mask │ │ │ │ +00014c00: 666f 7220 6368 696c 6420 7275 6c65 3c2f for child rule
    .
    < │ │ │ │ +00014c50: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014c60: 6e6f 223e 2020 3530 323c 2f73 7061 6e3e no"> 502 │ │ │ │ +00014c70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // - │ │ │ │ +00014c90: 636f 6d62 696e 6520 6c6f 6361 6c20 6368 combine local ch │ │ │ │ +00014ca0: 696c 6420 6d61 736b 2077 6974 6820 7468 ild mask with th │ │ │ │ +00014cb0: 6520 7061 7265 6e74 206d 6173 6b3c 2f73 e parent mask
    .
    503< │ │ │ │ +00014d20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00014d30: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    5 │ │ │ │ +00014d90: 3034 3c2f 7370 616e 3e3c 7370 616e 2063 04/ │ │ │ │ +00014db0: 2f20 2052 656d 656d 6265 7220 2d2d 2069 / Remember -- i │ │ │ │ +00014dc0: 6620 7468 6520 7061 7265 6e74 2072 756c f the parent rul │ │ │ │ +00014dd0: 6520 6973 2073 7065 6369 6669 6564 2062 e is specified b │ │ │ │ +00014de0: 7574 2074 6865 2063 6869 6c64 2069 7320 ut the child is │ │ │ │ +00014df0: 6e6f 742c 2074 6869 7320 696d 706c 6965 not, this implie │ │ │ │ +00014e00: 7320 6f6e 6c79 206f 6e65 3c2f 7370 616e s only one
    .
    │ │ │ │ +00014e60: 2020 3530 353c 2f73 7061 6e3e 3c73 7061 505// of the two │ │ │ │ +00014e90: 206f 7074 696f 6e61 6c20 7275 6c65 7320 optional rules │ │ │ │ +00014ea0: 7761 7320 7370 6563 6966 6965 6420 616e was specified an │ │ │ │ +00014eb0: 6420 6973 206d 6561 6e74 2074 6f20 696e d is meant to in │ │ │ │ +00014ec0: 6469 6361 7465 2074 6865 7265 2069 7320 dicate there is │ │ │ │ +00014ed0: 6e6f 2074 7261 6e73 6974 696f 6e2c 3c2f no transition,
    .
    < │ │ │ │ +00014f20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00014f30: 6e6f 223e 2020 3530 363c 2f73 7061 6e3e no"> 506 │ │ │ │ +00014f40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // so the │ │ │ │ +00014f60: 2063 6869 6c64 2072 756c 6520 7368 6f75 child rule shou │ │ │ │ +00014f70: 6c64 2062 6520 6173 7369 676e 6564 2074 ld be assigned t │ │ │ │ +00014f80: 6f20 6265 2074 6865 2073 616d 6520 2877 o be the same (w │ │ │ │ +00014f90: 6973 6820 7468 6520 636f 6d70 696c 6572 ish the compiler │ │ │ │ +00014fa0: 2077 6f75 6c64 2061 6c6c 6f77 2074 6869 would allow thi │ │ │ │ +00014fb0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ +00014fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00014fd0: 3e3c 6120 6964 3d22 6c30 3035 3037 2220 > 507// in │ │ │ │ +00015030: 6465 6661 756c 7420 7661 6c75 6520 6173 default value as │ │ │ │ +00015040: 7369 676e 6d65 6e74 292e 3c2f 7370 616e signment).
    .
    │ │ │ │ +000150a0: 2020 3530 383c 2f73 7061 6e3e 3c73 7061 508//
    .
    509< │ │ │ │ +00015120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>temp │ │ │ │ +00015140: 6c61 7465 3c2f 7370 616e 3e20 266c 743b late < │ │ │ │ +00015150: 5363 6865 6d65 5479 7065 2053 4348 454d SchemeType SCHEM │ │ │ │ +00015160: 4526 6774 3b3c 2f64 6976 3e0a 3c64 6976 E>
    .
    < │ │ │ │ +000151a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000151b0: 6e6f 223e 2020 3531 303c 2f73 7061 6e3e no"> 510 │ │ │ │ +000151c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ │ +00015200: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ │ +00015210: 5645 5254 4558 2c20 3c73 7061 6e20 636c VERTEX, ty │ │ │ │ +00015230: 7065 6e61 6d65 3c2f 7370 616e 3e20 4d41 pename MA │ │ │ │ +00015240: 534b 2667 743b 3c2f 6469 763e 0a3c 6469 SK>
    .< │ │ │ │ +00015260: 6120 6964 3d22 6c30 3035 3131 2220 6e61 a id="l00511" na │ │ │ │ +00015270: 6d65 3d22 6c30 3035 3131 223e 3c2f 613e me="l00511"> │ │ │ │ +00015280: 3c73 7061 6e20 636c 6173 733d 226c 696e 511void< │ │ │ │ +000152c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    ...
    513< │ │ │ │ +000154c0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +000154d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000154e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000154f0: 204d 4153 4b26 616d 703b 2020 2020 2020 MASK& │ │ │ │ +00015500: 2020 2020 206d 6173 6b2c 3c2f 6469 763e mask,
    │ │ │ │ +00015510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00015540: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 514 │ │ │ │ +00015570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00015580: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00015590: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::Rule │ │ │ │ +000155f0: 3c2f 613e 2070 5275 6c65 2c3c 2f64 6976 pRule,
    .
    515< │ │ │ │ +00015650: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ │ +00015660: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00015670: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00015680: 203c 6120 636c 6173 733d 2263 6f64 6520 Crease::Rul │ │ │ │ +000156e0: 653c 2f61 3e20 6352 756c 6529 3c73 7061 e cRule) const │ │ │ │ +00015710: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +00015760: 2020 3531 363c 2f73 7061 6e3e 203c 2f64 516 .
    51 │ │ │ │ +000157c0: 373c 2f73 7061 6e3e 2020 2020 3c73 7061 7 // Quick assi │ │ │ │ +000157f0: 676e 6d65 6e74 2061 6e64 2072 6574 7572 gnment and retur │ │ │ │ +00015800: 6e20 666f 7220 7468 6520 6d6f 7374 2063 n for the most c │ │ │ │ +00015810: 6f6d 6d6f 6e20 6361 7365 3a3c 2f73 7061 ommon case:
    .
    518 │ │ │ │ +00015880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if ((pRule == │ │ │ │ +000158b0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Crease::RULE_ │ │ │ │ +00015930: 534d 4f4f 5448 3c2f 613e 2920 7c7c 2028 SMOOTH) || ( │ │ │ │ +00015940: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ +000159c0: 7365 3a3a 5255 4c45 5f44 4152 543c 2f61 se::RULE_DART)) {
    .
    < │ │ │ │ +00015a10: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00015a20: 6e6f 223e 2020 3531 393c 2f73 7061 6e3e no"> 519 │ │ │ │ +00015a30: 2020 2020 2020 2020 6173 7369 676e 536d assignSm │ │ │ │ +00015a40: 6f6f 7468 4d61 736b 466f 7256 6572 7465 oothMaskForVerte │ │ │ │ +00015a50: 7828 7665 7274 6578 2c20 6d61 736b 293b x(vertex, mask); │ │ │ │ +00015a60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00015ab0: 2035 3230 3c2f 7370 616e 3e20 2020 2020 520 │ │ │ │ +00015ac0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +00015ae0: 7572 6e3c 2f73 7061 6e3e 3b3c 2f64 6976 urn;
    .
    521< │ │ │ │ +00015b40: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    522< │ │ │ │ +00015ba0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +00015bc0: 2f2f 2020 4966 2075 6e73 7065 6369 6669 // If unspecifi │ │ │ │ +00015bd0: 6564 2c20 6173 7369 676e 2074 6865 2063 ed, assign the c │ │ │ │ +00015be0: 6869 6c64 2072 756c 6520 746f 206d 6174 hild rule to mat │ │ │ │ +00015bf0: 6368 2074 6865 2070 6172 656e 7420 7275 ch the parent ru │ │ │ │ +00015c00: 6c65 2069 6620 7370 6563 6966 6965 643a le if specified: │ │ │ │ +00015c10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00015c30: 3c61 2069 643d 226c 3030 3532 3322 206e 523 │ │ │ │ +00015c90: 6966 3c2f 7370 616e 3e20 2828 6352 756c if ((cRul │ │ │ │ +00015ca0: 6520 3d3d 203c 6120 636c 6173 733d 2263 e == Crease:: │ │ │ │ +00015d20: 5255 4c45 5f55 4e4b 4e4f 574e 3c2f 613e RULE_UNKNOWN │ │ │ │ +00015d30: 2920 2661 6d70 3b26 616d 703b 2028 7052 ) && (pR │ │ │ │ +00015d40: 756c 6520 213d 203c 6120 636c 6173 733d ule != Crease │ │ │ │ +00015dc0: 3a3a 5255 4c45 5f55 4e4b 4e4f 574e 3c2f ::RULE_UNKNOWN)) {
    .< │ │ │ │ +00015df0: 6120 6964 3d22 6c30 3035 3234 2220 6e61 a id="l00524" na │ │ │ │ +00015e00: 6d65 3d22 6c30 3035 3234 223e 3c2f 613e me="l00524"> │ │ │ │ +00015e10: 3c73 7061 6e20 636c 6173 733d 226c 696e 524 cRule = │ │ │ │ +00015e40: 2070 5275 6c65 3b3c 2f64 6976 3e0a 3c64 pRule;
    . │ │ │ │ +00015e60: 3c61 2069 643d 226c 3030 3532 3522 206e 525 }
    . │ │ │ │ +00015ec0: 3c61 2069 643d 226c 3030 3532 3622 206e 526 │ │ │ │ +00015f20: 696e 743c 2f73 7061 6e3e 2076 616c 656e int valen │ │ │ │ +00015f30: 6365 203d 2076 6572 7465 782e 4765 744e ce = vertex.GetN │ │ │ │ +00015f40: 756d 4564 6765 7328 293b 3c2f 6469 763e umEdges();
    │ │ │ │ +00015f50: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00015fc0: 6120 6964 3d22 6c30 3035 3238 2220 6e61 a id="l00528" na │ │ │ │ +00015fd0: 6d65 3d22 6c30 3035 3238 223e 3c2f 613e me="l00528"> │ │ │ │ +00015fe0: 3c73 7061 6e20 636c 6173 733d 226c 696e 528 //
    .
    529 │ │ │ │ +00016080: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Det │ │ │ │ +000160a0: 6572 6d69 6e65 2069 6620 7765 206e 6565 ermine if we nee │ │ │ │ +000160b0: 6420 7468 6520 7061 7265 6e74 2065 6467 d the parent edg │ │ │ │ +000160c0: 6520 7368 6172 706e 6573 7320 7661 6c75 e sharpness valu │ │ │ │ +000160d0: 6573 202d 2d20 6964 656e 7469 6679 2f67 es -- identify/g │ │ │ │ +000160e0: 6174 6865 7220 6966 2073 6f3c 2f73 7061 ather if so
    .
    530 │ │ │ │ +00016150: 203c 7370 616e 2063 6c61 7373 3d22 636f // and u │ │ │ │ +00016170: 7365 2069 7420 746f 2063 6f6d 7075 7465 se it to compute │ │ │ │ +00016180: 2074 6865 2070 6172 656e 7420 7275 6c65 the parent rule │ │ │ │ +00016190: 2069 6620 756e 7370 6563 6966 6965 643a if unspecified: │ │ │ │ +000161a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000161c0: 3c61 2069 643d 226c 3030 3533 3122 206e 531 //
    .
    < │ │ │ │ +00016260: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00016270: 6e6f 223e 2020 3533 323c 2f73 7061 6e3e no"> 532 │ │ │ │ +00016280: 2020 2020 3c73 7061 6e20 636c 6173 733d fl │ │ │ │ +000162a0: 6f61 743c 2f73 7061 6e3e 202a 2070 4564 oat * pEd │ │ │ │ +000162b0: 6765 5368 6172 706e 6573 7342 7566 6665 geSharpnessBuffe │ │ │ │ +000162c0: 7220 3d20 283c 7370 616e 2063 6c61 7373 r = (f │ │ │ │ +000162e0: 6c6f 6174 3c2f 7370 616e 3e20 2a29 616c loat *)al │ │ │ │ +000162f0: 6c6f 6361 2876 616c 656e 6365 2a3c 7370 loca(valence*sizeof │ │ │ │ +00016320: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (float │ │ │ │ +00016340: 3c2f 7370 616e 3e29 292c 3c2f 6469 763e )),
    │ │ │ │ +00016350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00016380: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 533 * │ │ │ │ +000163b0: 2070 4564 6765 5368 6172 706e 6573 7320 pEdgeSharpness │ │ │ │ +000163c0: 2020 3d20 302c 3c2f 6469 763e 0a3c 6469 = 0,
    .< │ │ │ │ +000163e0: 6120 6964 3d22 6c30 3035 3334 2220 6e61 a id="l00534" na │ │ │ │ +000163f0: 6d65 3d22 6c30 3035 3334 223e 3c2f 613e me="l00534"> │ │ │ │ +00016400: 3c73 7061 6e20 636c 6173 733d 226c 696e 534 pVe │ │ │ │ +00016430: 7274 6578 5368 6172 706e 6573 7320 3d20 rtexSharpness = │ │ │ │ +00016440: 302e 3066 3b3c 2f64 6976 3e0a 3c64 6976 0.0f;
    .
    < │ │ │ │ +00016480: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00016490: 6e6f 223e 2020 3533 353c 2f73 7061 6e3e no"> 535 │ │ │ │ +000164a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +000164f0: 2020 3533 363c 2f73 7061 6e3e 2020 2020 536 │ │ │ │ +00016500: 3c73 7061 6e20 636c 6173 733d 226b 6579 bool requirePar │ │ │ │ +00016530: 656e 7453 6861 7270 6e65 7373 203d 2028 entSharpness = ( │ │ │ │ +00016540: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ +000165c0: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ +000165d0: 3c2f 613e 2920 7c7c 3c2f 6469 763e 0a3c ) ||
    .< │ │ │ │ +000165e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000165f0: 3e3c 6120 6964 3d22 6c30 3035 3337 2220 > 537 │ │ │ │ +00016640: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016650: 2020 2020 2028 7052 756c 6520 3d3d 203c (pRule == < │ │ │ │ +00016660: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00016670: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ +00016680: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ +00016690: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ +000166a0: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ +000166b0: 3936 3666 6131 6165 3861 6562 3835 3837 966fa1ae8aeb8587 │ │ │ │ +000166c0: 6334 3938 6366 3661 3932 6363 3333 3335 c498cf6a92cc3335 │ │ │ │ +000166d0: 223e 4372 6561 7365 3a3a 5255 4c45 5f43 ">Crease::RULE_C │ │ │ │ +000166e0: 5245 4153 453c 2f61 3e29 207c 7c3c 2f64 REASE) ||.
    53 │ │ │ │ +00016740: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ │ +00016750: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00016760: 2020 2020 2020 2020 2020 2870 5275 6c65 (pRule │ │ │ │ +00016770: 2021 3d20 6352 756c 6529 3b3c 2f64 6976 != cRule);
    .
    539< │ │ │ │ +000167d0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (r │ │ │ │ +00016800: 6571 7569 7265 5061 7265 6e74 5368 6172 equireParentShar │ │ │ │ +00016810: 706e 6573 7329 207b 3c2f 6469 763e 0a3c pness) {
    .< │ │ │ │ +00016820: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00016830: 3e3c 6120 6964 3d22 6c30 3035 3430 2220 > 540 pVert │ │ │ │ +00016880: 6578 5368 6172 706e 6573 7320 3d20 7665 exSharpness = ve │ │ │ │ +00016890: 7274 6578 2e47 6574 5368 6172 706e 6573 rtex.GetSharpnes │ │ │ │ +000168a0: 7328 293b 3c2f 6469 763e 0a3c 6469 7620 s();
    .
    541 │ │ │ │ +00016900: 2020 2020 2020 2070 4564 6765 5368 6172 pEdgeShar │ │ │ │ +00016910: 706e 6573 7320 2020 3d20 7665 7274 6578 pness = vertex │ │ │ │ +00016920: 2e47 6574 5368 6172 706e 6573 7350 6572 .GetSharpnessPer │ │ │ │ +00016930: 4564 6765 2870 4564 6765 5368 6172 706e Edge(pEdgeSharpn │ │ │ │ +00016940: 6573 7342 7566 6665 7229 3b3c 2f64 6976 essBuffer);
    .
    542< │ │ │ │ +000169a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +000169c0: 3c61 2069 643d 226c 3030 3534 3322 206e 543 if (p │ │ │ │ +00016a30: 5275 6c65 203d 3d20 3c61 2063 6c61 7373 Rule == Creas │ │ │ │ +00016ab0: 653a 3a52 554c 455f 554e 4b4e 4f57 4e3c e::RULE_UNKNOWN< │ │ │ │ +00016ac0: 2f61 3e29 207b 3c2f 6469 763e 0a3c 6469 /a>) {
    .< │ │ │ │ +00016ae0: 6120 6964 3d22 6c30 3035 3434 2220 6e61 a id="l00544" na │ │ │ │ +00016af0: 6d65 3d22 6c30 3035 3434 223e 3c2f 613e me="l00544"> │ │ │ │ +00016b00: 3c73 7061 6e20 636c 6173 733d 226c 696e 544 pRu │ │ │ │ +00016b30: 6c65 203d 203c 6120 636c 6173 733d 2263 le = Crease(_opt │ │ │ │ +00016b70: 696f 6e73 292e 3c61 2063 6c61 7373 3d22 ions).Determine │ │ │ │ +00016bd0: 5665 7274 6578 5665 7274 6578 5275 6c65 VertexVertexRule │ │ │ │ +00016be0: 3c2f 613e 2870 5665 7274 6578 5368 6172 (pVertexShar │ │ │ │ +00016bf0: 706e 6573 732c 2076 616c 656e 6365 2c20 pness, valence, │ │ │ │ +00016c00: 7045 6467 6553 6861 7270 6e65 7373 293b pEdgeSharpness); │ │ │ │ +00016c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00016c60: 2035 3435 3c2f 7370 616e 3e20 2020 2020 545 │ │ │ │ +00016c70: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    546 │ │ │ │ +00016cd0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    547 │ │ │ │ +00016d30: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +00016d50: 2f73 7061 6e3e 2028 2870 5275 6c65 203d /span> ((pRule = │ │ │ │ +00016d60: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = Crease::RUL │ │ │ │ +00016de0: 455f 534d 4f4f 5448 3c2f 613e 2920 7c7c E_SMOOTH) || │ │ │ │ +00016df0: 2028 7052 756c 6520 3d3d 203c 6120 636c (pRule == Cr │ │ │ │ +00016e70: 6561 7365 3a3a 5255 4c45 5f44 4152 543c ease::RULE_DART< │ │ │ │ +00016e80: 2f61 3e29 2920 7b3c 2f64 6976 3e0a 3c64 /a>)) {
    . │ │ │ │ +00016ea0: 3c61 2069 643d 226c 3030 3534 3822 206e 548 assign │ │ │ │ +00016ef0: 536d 6f6f 7468 4d61 736b 466f 7256 6572 SmoothMaskForVer │ │ │ │ +00016f00: 7465 7828 7665 7274 6578 2c20 6d61 736b tex(vertex, mask │ │ │ │ +00016f10: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    549 │ │ │ │ +00016f70: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ +00016f90: 6574 7572 6e3c 2f73 7061 6e3e 3b20 203c eturn; < │ │ │ │ +00016fa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00016fb0: 656e 7422 3e2f 2f20 2041 7320 646f 6e65 ent">// As done │ │ │ │ +00016fc0: 206f 6e20 656e 7472 792c 2077 6520 6361 on entry, we ca │ │ │ │ +00016fd0: 6e20 7265 7475 726e 2069 6d6d 6564 6961 n return immedia │ │ │ │ +00016fe0: 7465 6c79 2069 6620 7061 7265 6e74 2069 tely if parent i │ │ │ │ +00016ff0: 7320 536d 6f6f 7468 2f44 6172 743c 2f73 s Smooth/Dart
    .
    550 │ │ │ │ +00017060: 2020 207d 203c 7370 616e 2063 6c61 7373 } e │ │ │ │ +00017080: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if ( │ │ │ │ +000170b0: 7052 756c 6520 3d3d 203c 6120 636c 6173 pRule == Crea │ │ │ │ +00017130: 7365 3a3a 5255 4c45 5f43 5245 4153 453c se::RULE_CREASE< │ │ │ │ +00017140: 2f61 3e29 207b 3c2f 6469 763e 0a3c 6469 /a>) {
    .< │ │ │ │ +00017160: 6120 6964 3d22 6c30 3035 3531 2220 6e61 a id="l00551" na │ │ │ │ +00017170: 6d65 3d22 6c30 3035 3531 223e 3c2f 613e me="l00551"> │ │ │ │ +00017180: 3c73 7061 6e20 636c 6173 733d 226c 696e 551 int cr │ │ │ │ +000171d0: 6561 7365 456e 6473 5b32 5d3b 3c2f 6469 easeEnds[2];.
    552 │ │ │ │ +00017230: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ │ +00017240: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00017250: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ │ +00017260: 3133 3235 2e68 746d 6c22 3e43 7265 6173 1325.html">Creas │ │ │ │ +00017270: 653c 2f61 3e28 5f6f 7074 696f 6e73 292e e(_options). │ │ │ │ +00017280: 3c61 2063 6c61 7373 3d22 636f 6465 2068 GetSharpEdgePai │ │ │ │ +000172e0: 724f 6643 7265 6173 653c 2f61 3e28 7045 rOfCrease(pE │ │ │ │ +000172f0: 6467 6553 6861 7270 6e65 7373 2c20 7661 dgeSharpness, va │ │ │ │ +00017300: 6c65 6e63 652c 2063 7265 6173 6545 6e64 lence, creaseEnd │ │ │ │ +00017310: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    553 < │ │ │ │ +00017370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +000173c0: 3535 343c 2f73 7061 6e3e 2020 2020 2020 554 │ │ │ │ +000173d0: 2020 6173 7369 676e 4372 6561 7365 4d61 assignCreaseMa │ │ │ │ +000173e0: 736b 466f 7256 6572 7465 7828 7665 7274 skForVertex(vert │ │ │ │ +000173f0: 6578 2c20 6d61 736b 2c20 6372 6561 7365 ex, mask, crease │ │ │ │ +00017400: 456e 6473 293b 3c2f 6469 763e 0a3c 6469 Ends);
    .< │ │ │ │ +00017420: 6120 6964 3d22 6c30 3035 3535 2220 6e61 a id="l00555" na │ │ │ │ +00017430: 6d65 3d22 6c30 3035 3535 223e 3c2f 613e me="l00555"> │ │ │ │ +00017440: 3c73 7061 6e20 636c 6173 733d 226c 696e 555 } else {.
    5 │ │ │ │ +000174e0: 3536 3c2f 7370 616e 3e20 2020 2020 2020 56 │ │ │ │ +000174f0: 2061 7373 6967 6e43 6f72 6e65 724d 6173 assignCornerMas │ │ │ │ +00017500: 6b46 6f72 5665 7274 6578 2876 6572 7465 kForVertex(verte │ │ │ │ +00017510: 782c 206d 6173 6b29 3b3c 2f64 6976 3e0a x, mask);
    . │ │ │ │ +00017520: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ │ +00017580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +00017670: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00017680: 6e6f 223e 2020 3535 393c 2f73 7061 6e3e no"> 559 │ │ │ │ +00017690: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +000176e0: 2020 3536 303c 2f73 7061 6e3e 2020 2020 560 │ │ │ │ +000176f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +00017710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00017760: 3536 313c 2f73 7061 6e3e 2020 2020 3c73 561 // Identify │ │ │ │ +00017790: 2f67 6174 6865 7220 6368 696c 6420 7368 /gather child sh │ │ │ │ +000177a0: 6172 706e 6573 7320 746f 2063 6f6d 6269 arpness to combi │ │ │ │ +000177b0: 6e65 206d 6173 6b73 2066 6f72 2074 6865 ne masks for the │ │ │ │ +000177c0: 2074 776f 2064 6966 6665 7269 6e67 2052 two differing R │ │ │ │ +000177d0: 756c 6573 3a3c 2f73 7061 6e3e 3c2f 6469 ules:.
    562 │ │ │ │ +00017830: 3c2f 7370 616e 3e20 2020 203c 7370 616e //
    │ │ │ │ +00017860: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00017890: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 563 Crease │ │ │ │ +000178f0: 6372 6561 7365 285f 6f70 7469 6f6e 7329 crease(_options) │ │ │ │ +00017900: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +00017950: 2020 3536 343c 2f73 7061 6e3e 203c 2f64 564 .
    56 │ │ │ │ +000179b0: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 float * cEdgeSharpn │ │ │ │ +000179f0: 6573 7342 7566 6665 7220 3d20 283c 7370 essBuffer = (float *)alloca(val │ │ │ │ +00017a30: 656e 6365 2a3c 7370 616e 2063 6c61 7373 ence*sizeo │ │ │ │ +00017a50: 663c 2f73 7061 6e3e 283c 7370 616e 2063 f(float) │ │ │ │ +00017a80: 292c 3c2f 6469 763e 0a3c 6469 7620 636c ),
    .
    566 │ │ │ │ +00017ae0: 2020 2020 2020 202a 2063 4564 6765 5368 * cEdgeSh │ │ │ │ +00017af0: 6172 706e 6573 7320 3d20 7665 7274 6578 arpness = vertex │ │ │ │ +00017b00: 2e47 6574 4368 696c 6453 6861 7270 6e65 .GetChildSharpne │ │ │ │ +00017b10: 7373 5065 7245 6467 6528 6372 6561 7365 ssPerEdge(crease │ │ │ │ +00017b20: 2c20 6345 6467 6553 6861 7270 6e65 7373 , cEdgeSharpness │ │ │ │ +00017b30: 4275 6666 6572 292c 3c2f 6469 763e 0a3c Buffer),
    .< │ │ │ │ +00017b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00017b50: 3e3c 6120 6964 3d22 6c30 3035 3637 2220 > 567 c │ │ │ │ +00017ba0: 5665 7274 6578 5368 6172 706e 6573 7320 VertexSharpness │ │ │ │ +00017bb0: 3d20 7665 7274 6578 2e47 6574 4368 696c = vertex.GetChil │ │ │ │ +00017bc0: 6453 6861 7270 6e65 7373 2863 7265 6173 dSharpness(creas │ │ │ │ +00017bd0: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    568 < │ │ │ │ +00017c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>. │ │ │ │ +00017d50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00017d80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 570 cRu │ │ │ │ +00017db0: 6c65 203d 2063 7265 6173 652e 3c61 2063 le = crease.Det │ │ │ │ +00017e10: 6572 6d69 6e65 5665 7274 6578 5665 7274 ermineVertexVert │ │ │ │ +00017e20: 6578 5275 6c65 3c2f 613e 2863 5665 7274 exRule(cVert │ │ │ │ +00017e30: 6578 5368 6172 706e 6573 732c 2076 616c exSharpness, val │ │ │ │ +00017e40: 656e 6365 2c20 6345 6467 6553 6861 7270 ence, cEdgeSharp │ │ │ │ +00017e50: 6e65 7373 293b 3c2f 6469 763e 0a3c 6469 ness);
    .< │ │ │ │ +00017e70: 6120 6964 3d22 6c30 3035 3731 2220 6e61 a id="l00571" na │ │ │ │ +00017e80: 6d65 3d22 6c30 3035 3731 223e 3c2f 613e me="l00571"> │ │ │ │ +00017e90: 3c73 7061 6e20 636c 6173 733d 226c 696e 571 if (cR │ │ │ │ +00017ee0: 756c 6520 3d3d 2070 5275 6c65 2920 3c73 ule == pRule) return;
    .< │ │ │ │ +00017f30: 6120 6964 3d22 6c30 3035 3732 2220 6e61 a id="l00572" na │ │ │ │ +00017f40: 6d65 3d22 6c30 3035 3732 223e 3c2f 613e me="l00572"> │ │ │ │ +00017f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 572 }
    .< │ │ │ │ +00017f90: 6120 6964 3d22 6c30 3035 3733 2220 6e61 a id="l00573" na │ │ │ │ +00017fa0: 6d65 3d22 6c30 3035 3733 223e 3c2f 613e me="l00573"> │ │ │ │ +00017fb0: 3c73 7061 6e20 636c 6173 733d 226c 696e 573
    .
    574 │ │ │ │ +00018030: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ +00018050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000180a0: 2035 3735 3c2f 7370 616e 3e20 2020 203c 575 < │ │ │ │ +000180b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000180c0: 656e 7422 3e2f 2f20 2049 6e69 7469 616c ent">// Initial │ │ │ │ +000180d0: 697a 6520 6120 6c6f 6361 6c20 6368 696c ize a local chil │ │ │ │ +000180e0: 6420 6d61 736b 2c20 636f 6d70 7574 6520 d mask, compute │ │ │ │ +000180f0: 7468 6520 6672 6163 7469 6f6e 616c 2077 the fractional w │ │ │ │ +00018100: 6569 6768 7420 6672 6f6d 2070 6172 656e eight from paren │ │ │ │ +00018110: 7420 616e 6420 6368 696c 643c 2f73 7061 t and child
    .
    576 │ │ │ │ +00018180: 203c 7370 616e 2063 6c61 7373 3d22 636f // sharp │ │ │ │ +000181a0: 6e65 7373 2076 616c 7565 7320 616e 6420 ness values and │ │ │ │ +000181b0: 636f 6d62 696e 6520 7468 6520 7477 6f20 combine the two │ │ │ │ +000181c0: 6d61 736b 733a 3c2f 7370 616e 3e3c 2f64 masks:.
    57 │ │ │ │ +00018220: 373c 2f73 7061 6e3e 2020 2020 3c73 7061 7 //
    .
    578< │ │ │ │ +000182a0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ │ +000182c0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef < │ │ │ │ +000182d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000182e0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename MASK::Weigh │ │ │ │ +00018300: 7420 5765 6967 6874 3b3c 2f64 6976 3e0a t Weight;
    . │ │ │ │ +00018310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ │ +000183a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +000183b0: 6e6f 223e 2020 3538 303c 2f73 7061 6e3e no"> 580 │ │ │ │ +000183c0: 2020 2020 5765 6967 6874 202a 2063 4d61 Weight * cMa │ │ │ │ +000183d0: 736b 5765 6967 6874 7320 3d20 2857 6569 skWeights = (Wei │ │ │ │ +000183e0: 6768 7420 2a29 616c 6c6f 6361 2828 3120 ght *)alloca((1 │ │ │ │ +000183f0: 2b20 3220 2a20 7661 6c65 6e63 6529 2a3c + 2 * valence)*< │ │ │ │ +00018400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00018410: 6f72 6422 3e73 697a 656f 663c 2f73 7061 ord">sizeof(Weight));..
    < │ │ │ │ +00018550: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00018560: 6e6f 223e 2020 3538 323c 2f73 7061 6e3e no"> 582 │ │ │ │ +00018570: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +000185c0: 2020 3538 333c 2f73 7061 6e3e 2020 2020 583 │ │ │ │ +000185d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if ((cRule == < │ │ │ │ +00018600: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00018610: 5f65 6e75 6d76 616c 7565 2220 6872 6566 _enumvalue" href │ │ │ │ +00018620: 3d22 6130 3133 3235 2e68 746d 6c23 6131 ="a01325.html#a1 │ │ │ │ +00018630: 3166 6364 3531 6566 3836 3131 3866 3635 1fcd51ef86118f65 │ │ │ │ +00018640: 6536 3033 6331 3437 3433 3737 6137 3861 e603c1474377a78a │ │ │ │ +00018650: 3631 6431 3337 6638 3636 3939 3765 6433 61d137f866997ed3 │ │ │ │ +00018660: 3639 3365 3366 6361 6437 3664 6566 3566 693e3fcad76def5f │ │ │ │ +00018670: 223e 4372 6561 7365 3a3a 5255 4c45 5f53 ">Crease::RULE_S │ │ │ │ +00018680: 4d4f 4f54 483c 2f61 3e29 207c 7c20 2863 MOOTH) || (c │ │ │ │ +00018690: 5275 6c65 203d 3d20 3c61 2063 6c61 7373 Rule == Creas │ │ │ │ +00018710: 653a 3a52 554c 455f 4441 5254 3c2f 613e e::RULE_DART │ │ │ │ +00018720: 2929 207b 3c2f 6469 763e 0a3c 6469 7620 )) {
    .
    584 │ │ │ │ +00018780: 2020 2020 2020 2061 7373 6967 6e53 6d6f assignSmo │ │ │ │ +00018790: 6f74 684d 6173 6b46 6f72 5665 7274 6578 othMaskForVertex │ │ │ │ +000187a0: 2876 6572 7465 782c 2063 4d61 736b 293b (vertex, cMask); │ │ │ │ +000187b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00018800: 2035 3835 3c2f 7370 616e 3e20 2020 207d 585 } │ │ │ │ +00018810: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +00018830: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (cRul │ │ │ │ +00018860: 6520 3d3d 203c 6120 636c 6173 733d 2263 e == Crease:: │ │ │ │ +000188e0: 5255 4c45 5f43 5245 4153 453c 2f61 3e29 RULE_CREASE) │ │ │ │ +000188f0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    586 │ │ │ │ +00018950: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +00018970: 6e74 3c2f 7370 616e 3e20 6372 6561 7365 nt crease │ │ │ │ +00018980: 456e 6473 5b32 5d3b 3c2f 6469 763e 0a3c Ends[2];
    .< │ │ │ │ +00018990: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000189a0: 3e3c 6120 6964 3d22 6c30 3035 3837 2220 > 587 Crease(_options).Get │ │ │ │ +00018a80: 5368 6172 7045 6467 6550 6169 724f 6643 SharpEdgePairOfC │ │ │ │ +00018a90: 7265 6173 653c 2f61 3e28 6345 6467 6553 rease(cEdgeS │ │ │ │ +00018aa0: 6861 7270 6e65 7373 2c20 7661 6c65 6e63 harpness, valenc │ │ │ │ +00018ab0: 652c 2063 7265 6173 6545 6e64 7329 3b3c e, creaseEnds);< │ │ │ │ +00018ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00018b10: 3538 383c 2f73 7061 6e3e 203c 2f64 6976 588
    .
    589< │ │ │ │ +00018b70: 2f73 7061 6e3e 2020 2020 2020 2020 6173 /span> as │ │ │ │ +00018b80: 7369 676e 4372 6561 7365 4d61 736b 466f signCreaseMaskFo │ │ │ │ +00018b90: 7256 6572 7465 7828 7665 7274 6578 2c20 rVertex(vertex, │ │ │ │ +00018ba0: 634d 6173 6b2c 2063 7265 6173 6545 6e64 cMask, creaseEnd │ │ │ │ +00018bb0: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    590 │ │ │ │ +00018c10: 2020 7d20 3c73 7061 6e20 636c 6173 733d } el │ │ │ │ +00018c30: 7365 3c2f 7370 616e 3e20 7b3c 2f64 6976 se {
    .
    591< │ │ │ │ +00018c90: 2f73 7061 6e3e 2020 2020 2020 2020 6173 /span> as │ │ │ │ +00018ca0: 7369 676e 436f 726e 6572 4d61 736b 466f signCornerMaskFo │ │ │ │ +00018cb0: 7256 6572 7465 7828 7665 7274 6578 2c20 rVertex(vertex, │ │ │ │ +00018cc0: 634d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 cMask);
    . │ │ │ │ +00018ce0: 3c61 2069 643d 226c 3030 3539 3222 206e 592 }
    . │ │ │ │ +00018d40: 3c61 2069 643d 226c 3030 3539 3322 206e 593
    .
    594 │ │ │ │ +00018de0: 2020 5765 6967 6874 2070 5765 6967 6874 Weight pWeight │ │ │ │ +00018df0: 203d 2063 7265 6173 652e 3c61 2063 6c61 = crease.Compu │ │ │ │ +00018e50: 7465 4672 6163 7469 6f6e 616c 5765 6967 teFractionalWeig │ │ │ │ +00018e60: 6874 4174 5665 7274 6578 3c2f 613e 2870 htAtVertex(p │ │ │ │ +00018e70: 5665 7274 6578 5368 6172 706e 6573 732c VertexSharpness, │ │ │ │ +00018e80: 2063 5665 7274 6578 5368 6172 706e 6573 cVertexSharpnes │ │ │ │ +00018e90: 732c 3c2f 6469 763e 0a3c 6469 7620 636c s,
    .
    595 │ │ │ │ +00018ef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018f10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018f20: 7661 6c65 6e63 652c 2070 4564 6765 5368 valence, pEdgeSh │ │ │ │ +00018f30: 6172 706e 6573 732c 2063 4564 6765 5368 arpness, cEdgeSh │ │ │ │ +00018f40: 6172 706e 6573 7329 3b3c 2f64 6976 3e0a arpness);
    . │ │ │ │ +00018f50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +00018fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00018fe0: 3e3c 6120 6964 3d22 6c30 3035 3937 2220 > 597
    .
    598 │ │ │ │ +00019080: 2020 2063 4d61 736b 2e3c 6120 636c 6173 cMask.Combin │ │ │ │ +000190e0: 6556 6572 7465 7856 6572 7465 784d 6173 eVertexVertexMas │ │ │ │ +000190f0: 6b73 3c2f 613e 2863 5765 6967 6874 2c20 ks(cWeight, │ │ │ │ +00019100: 7057 6569 6768 742c 206d 6173 6b29 3b3c pWeight, mask);< │ │ │ │ +00019110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00019160: 3539 393c 2f73 7061 6e3e 7d3c 2f64 6976 599}
    .
    .
    600 .
    6 │ │ │ │ +00019220: 3031 3c2f 7370 616e 3e3c 7370 616e 2063 01/ │ │ │ │ +00019240: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +00019250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00019260: 3e3c 6120 6964 3d22 6c30 3036 3032 2220 > 602// The │ │ │ │ +000192c0: 2063 6f6d 7075 7461 7469 6f6e 206f 6620 computation of │ │ │ │ +000192d0: 6c69 6d69 7420 6d61 736b 7320 666f 7220 limit masks for │ │ │ │ +000192e0: 7665 7274 6963 6573 3a3c 2f73 7061 6e3e vertices: │ │ │ │ +000192f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00019340: 2036 3033 3c2f 7370 616e 3e3c 7370 616e 603//
    │ │ │ │ +00019370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +000193a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 604templ │ │ │ │ +000193e0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b53 ate <S │ │ │ │ +000193f0: 6368 656d 6554 7970 6520 5343 4845 4d45 chemeType SCHEME │ │ │ │ +00019400: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    605< │ │ │ │ +00019460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00019470: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ │ +000194a0: 7970 656e 616d 653c 2f73 7061 6e3e 2056 ypename V │ │ │ │ +000194b0: 4552 5445 582c 203c 7370 616e 2063 6c61 ERTEX, typ │ │ │ │ +000194d0: 656e 616d 653c 2f73 7061 6e3e 204d 4153 ename MAS │ │ │ │ +000194e0: 4b26 6774 3b3c 2f64 6976 3e0a 3c64 6976 K>
    .
    < │ │ │ │ +00019520: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +00019530: 6e6f 223e 2020 3630 363c 2f73 7061 6e3e no"> 606 │ │ │ │ +00019540: 3c73 7061 6e20 636c 6173 733d 226b 6579 void
    .
    .
    │ │ │ │ +00019640: 2036 3037 3c2f 613e 3c2f 7370 616e 3e3c 607< │ │ │ │ +00019650: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ │ +00019660: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ │ +00019670: 2261 3031 3333 332e 6874 6d6c 2361 3363 "a01333.html#a3c │ │ │ │ +00019680: 3864 3736 3363 6131 3863 3435 3763 3933 8d763ca18c457c93 │ │ │ │ +00019690: 3664 6230 6534 3739 3937 3436 6632 223e 6db0e4799746f2"> │ │ │ │ +000196a0: 5363 6865 6d65 266c 743b 5343 4845 4d45 Scheme<SCHEME │ │ │ │ +000196b0: 2667 743b 3a3a 436f 6d70 7574 6556 6572 >::ComputeVer │ │ │ │ +000196c0: 7465 784c 696d 6974 4d61 736b 3c2f 613e texLimitMask │ │ │ │ +000196d0: 2856 4552 5445 5820 3c73 7061 6e20 636c (VERTEX co │ │ │ │ +000196f0: 6e73 743c 2f73 7061 6e3e 2661 6d70 3b20 nst& │ │ │ │ +00019700: 7665 7274 6578 2c3c 2f64 6976 3e0a 3c64 vertex,
    . │ │ │ │ +00019720: 3c61 2069 643d 226c 3030 3630 3822 206e 608 │ │ │ │ +00019770: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019780: 2020 2020 2020 2020 204d 4153 4b26 616d MASK&am │ │ │ │ +00019790: 703b 2020 2020 2020 2020 206d 6173 6b2c p; mask, │ │ │ │ +000197a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000197f0: 2036 3039 3c2f 7370 616e 3e20 2020 2020 609 │ │ │ │ +00019800: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019810: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019820: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Crease::Ru │ │ │ │ +00019880: 6c65 3c2f 613e 2020 7275 6c65 293c 7370 le rule) const {
    .
    610 .
    6 │ │ │ │ +00019960: 3131 3c2f 7370 616e 3e20 2020 203c 7370 11 if │ │ │ │ +00019990: 2028 2872 756c 6520 3d3d 203c 6120 636c ((rule == Cr │ │ │ │ +00019a10: 6561 7365 3a3a 5255 4c45 5f53 4d4f 4f54 ease::RULE_SMOOT │ │ │ │ +00019a20: 483c 2f61 3e29 207c 7c20 2872 756c 6520 H) || (rule │ │ │ │ +00019a30: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ +00019ab0: 4c45 5f44 4152 543c 2f61 3e29 2920 7b3c LE_DART)) {< │ │ │ │ +00019ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00019b10: 3631 323c 2f73 7061 6e3e 2020 2020 2020 612 │ │ │ │ +00019b20: 2020 6173 7369 676e 536d 6f6f 7468 4c69 assignSmoothLi │ │ │ │ +00019b30: 6d69 744d 6173 6b28 7665 7274 6578 2c20 mitMask(vertex, │ │ │ │ +00019b40: 6d61 736b 293b 3c2f 6469 763e 0a3c 6469 mask);
    .< │ │ │ │ +00019b60: 6120 6964 3d22 6c30 3036 3133 2220 6e61 a id="l00613" na │ │ │ │ +00019b70: 6d65 3d22 6c30 3036 3133 223e 3c2f 613e me="l00613"> │ │ │ │ +00019b80: 3c73 7061 6e20 636c 6173 733d 226c 696e 613 } else if │ │ │ │ +00019bf0: 2028 7275 6c65 203d 3d20 3c61 2063 6c61 (rule == Cre │ │ │ │ +00019c70: 6173 653a 3a52 554c 455f 4352 4541 5345 ase::RULE_CREASE │ │ │ │ +00019c80: 3c2f 613e 2920 7b3c 2f64 6976 3e0a 3c64 ) {
    . │ │ │ │ +00019ca0: 3c61 2069 643d 226c 3030 3631 3422 206e 614
    float │ │ │ │ +00019d10: 202a 2065 6467 6553 6861 7270 6e65 7373 * edgeSharpness │ │ │ │ +00019d20: 203d 2028 3c73 7061 6e20 636c 6173 733d = (fl │ │ │ │ +00019d40: 6f61 743c 2f73 7061 6e3e 202a 2961 6c6c oat *)all │ │ │ │ +00019d50: 6f63 6128 7665 7274 6578 2e47 6574 4e75 oca(vertex.GetNu │ │ │ │ +00019d60: 6d45 6467 6573 2829 202a 203c 7370 616e mEdges() * sizeof(f │ │ │ │ +00019d90: 6c6f 6174 2929 3b3c 2f64 6976 3e0a 3c64 loat));
    . │ │ │ │ +00019db0: 3c61 2069 643d 226c 3030 3631 3522 206e 615 vertex │ │ │ │ +00019e00: 2e47 6574 5368 6172 706e 6573 7350 6572 .GetSharpnessPer │ │ │ │ +00019e10: 4564 6765 2865 6467 6553 6861 7270 6e65 Edge(edgeSharpne │ │ │ │ +00019e20: 7373 293b 3c2f 6469 763e 0a3c 6469 7620 ss);
    .
    616 │ │ │ │ +00019e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00019ed0: 2036 3137 3c2f 7370 616e 3e20 2020 2020 617 │ │ │ │ +00019ee0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +00019f00: 3c2f 7370 616e 3e20 6372 6561 7365 456e creaseEn │ │ │ │ +00019f10: 6473 5b32 5d3b 3c2f 6469 763e 0a3c 6469 ds[2];
    .< │ │ │ │ +00019f30: 6120 6964 3d22 6c30 3036 3138 2220 6e61 a id="l00618" na │ │ │ │ +00019f40: 6d65 3d22 6c30 3036 3138 223e 3c2f 613e me="l00618"> │ │ │ │ +00019f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 618 Crease( │ │ │ │ +00019fb0: 5f6f 7074 696f 6e73 292e 3c61 2063 6c61 _options).GetSh │ │ │ │ +0001a010: 6172 7045 6467 6550 6169 724f 6643 7265 arpEdgePairOfCre │ │ │ │ +0001a020: 6173 653c 2f61 3e28 6564 6765 5368 6172 ase(edgeShar │ │ │ │ +0001a030: 706e 6573 732c 2076 6572 7465 782e 4765 pness, vertex.Ge │ │ │ │ +0001a040: 744e 756d 4564 6765 7328 292c 2063 7265 tNumEdges(), cre │ │ │ │ +0001a050: 6173 6545 6e64 7329 3b3c 2f64 6976 3e0a aseEnds);
    . │ │ │ │ +0001a060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ │ +0001a0f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001a100: 6e6f 223e 2020 3632 303c 2f73 7061 6e3e no"> 620 │ │ │ │ +0001a110: 2020 2020 2020 2020 6173 7369 676e 4372 assignCr │ │ │ │ +0001a120: 6561 7365 4c69 6d69 744d 6173 6b28 7665 easeLimitMask(ve │ │ │ │ +0001a130: 7274 6578 2c20 6d61 736b 2c20 6372 6561 rtex, mask, crea │ │ │ │ +0001a140: 7365 456e 6473 293b 3c2f 6469 763e 0a3c seEnds);
    .< │ │ │ │ +0001a150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001a160: 3e3c 6120 6964 3d22 6c30 3036 3231 2220 > 621 } else { │ │ │ │ +0001a1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001a220: 2036 3232 3c2f 7370 616e 3e20 2020 2020 622 │ │ │ │ +0001a230: 2020 2061 7373 6967 6e43 6f72 6e65 724c assignCornerL │ │ │ │ +0001a240: 696d 6974 4d61 736b 2876 6572 7465 782c imitMask(vertex, │ │ │ │ +0001a250: 206d 6173 6b29 3b3c 2f64 6976 3e0a 3c64 mask);
    . │ │ │ │ +0001a270: 3c61 2069 643d 226c 3030 3632 3322 206e 623 }
    . │ │ │ │ +0001a2d0: 3c61 2069 643d 226c 3030 3632 3422 206e 624}
    .
    │ │ │ │ +0001a320: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +0001a390: 6120 6964 3d22 6c30 3036 3236 2220 6e61 a id="l00626" na │ │ │ │ +0001a3a0: 6d65 3d22 6c30 3036 3236 223e 3c2f 613e me="l00626"> │ │ │ │ +0001a3b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 626template< │ │ │ │ +0001a3f0: 2f73 7061 6e3e 2026 6c74 3b53 6368 656d /span> <Schem │ │ │ │ +0001a400: 6554 7970 6520 5343 4845 4d45 2667 743b eType SCHEME> │ │ │ │ +0001a410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001a460: 2036 3237 3c2f 7370 616e 3e3c 7370 616e 627template │ │ │ │ +0001a490: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ │ +0001a4b0: 616d 653c 2f73 7061 6e3e 2056 4552 5445 ame VERTE │ │ │ │ +0001a4c0: 582c 203c 7370 616e 2063 6c61 7373 3d22 X, typenam │ │ │ │ +0001a4e0: 653c 2f73 7061 6e3e 204d 4153 4b26 6774 e MASK> │ │ │ │ +0001a4f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +0001a540: 2020 3632 383c 2f73 7061 6e3e 3c73 7061 628void
    .
    . │ │ │ │ +0001a5d0: 3c61 2069 643d 226c 3030 3632 3922 206e 629 │ │ │ │ +0001a650: 3c2f 613e 3c2f 7370 616e 3e3c 6120 636c Sche │ │ │ │ +0001a6b0: 6d65 266c 743b 5343 4845 4d45 2667 743b me<SCHEME> │ │ │ │ +0001a6c0: 3a3a 436f 6d70 7574 6556 6572 7465 784c ::ComputeVertexL │ │ │ │ +0001a6d0: 696d 6974 4d61 736b 3c2f 613e 2856 4552 imitMask(VER │ │ │ │ +0001a6e0: 5445 5820 3c73 7061 6e20 636c 6173 733d TEX const< │ │ │ │ +0001a700: 2f73 7061 6e3e 2661 6d70 3b20 7665 7274 /span>& vert │ │ │ │ +0001a710: 6578 2c3c 2f64 6976 3e0a 3c64 6976 2063 ex,
    .
    630 │ │ │ │ +0001a770: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a780: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a790: 2020 2020 204d 4153 4b26 616d 703b 2020 MASK& │ │ │ │ +0001a7a0: 2020 2020 2020 2070 6f73 4d61 736b 2c3c posMask,< │ │ │ │ +0001a7b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0001a800: 3633 313c 2f73 7061 6e3e 2020 2020 2020 631 │ │ │ │ +0001a810: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a820: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a830: 204d 4153 4b26 616d 703b 2020 2020 2020 MASK& │ │ │ │ +0001a840: 2020 2074 616e 314d 6173 6b2c 3c2f 6469 tan1Mask,.
    632 │ │ │ │ +0001a8a0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ │ +0001a8b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001a8c0: 2020 2020 2020 2020 2020 2020 2020 4d41 MA │ │ │ │ +0001a8d0: 534b 2661 6d70 3b20 2020 2020 2020 2020 SK& │ │ │ │ +0001a8e0: 7461 6e32 4d61 736b 2c3c 2f64 6976 3e0a tan2Mask,
    . │ │ │ │ +0001a8f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    634< │ │ │ │ +0001aa50: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0001aa70: 3c61 2069 643d 226c 3030 3633 3522 206e 635 │ │ │ │ +0001aad0: 6966 3c2f 7370 616e 3e20 2828 7275 6c65 if ((rule │ │ │ │ +0001aae0: 203d 3d20 3c61 2063 6c61 7373 3d22 636f == Crease::R │ │ │ │ +0001ab60: 554c 455f 534d 4f4f 5448 3c2f 613e 2920 ULE_SMOOTH) │ │ │ │ +0001ab70: 7c7c 2028 7275 6c65 203d 3d20 3c61 2063 || (rule == C │ │ │ │ +0001abf0: 7265 6173 653a 3a52 554c 455f 4441 5254 rease::RULE_DART │ │ │ │ +0001ac00: 3c2f 613e 2929 207b 3c2f 6469 763e 0a3c )) {
    .< │ │ │ │ +0001ac10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0001ac20: 3e3c 6120 6964 3d22 6c30 3036 3336 2220 > 636 assig │ │ │ │ +0001ac70: 6e53 6d6f 6f74 684c 696d 6974 4d61 736b nSmoothLimitMask │ │ │ │ +0001ac80: 2876 6572 7465 782c 2070 6f73 4d61 736b (vertex, posMask │ │ │ │ +0001ac90: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    637 │ │ │ │ +0001acf0: 2020 2020 2061 7373 6967 6e53 6d6f 6f74 assignSmoot │ │ │ │ +0001ad00: 684c 696d 6974 5461 6e67 656e 744d 6173 hLimitTangentMas │ │ │ │ +0001ad10: 6b73 2876 6572 7465 782c 2074 616e 314d ks(vertex, tan1M │ │ │ │ +0001ad20: 6173 6b2c 2074 616e 324d 6173 6b29 3b3c ask, tan2Mask);< │ │ │ │ +0001ad30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0001ad80: 3633 383c 2f73 7061 6e3e 2020 2020 7d20 638 } │ │ │ │ +0001ad90: 3c73 7061 6e20 636c 6173 733d 226b 6579 else │ │ │ │ +0001add0: 6966 3c2f 7370 616e 3e20 2872 756c 6520 if (rule │ │ │ │ +0001ade0: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == Crease::RU │ │ │ │ +0001ae60: 4c45 5f43 5245 4153 453c 2f61 3e29 207b LE_CREASE) { │ │ │ │ +0001ae70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001aec0: 2036 3339 3c2f 7370 616e 3e20 2020 2020 639 │ │ │ │ +0001aed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo │ │ │ │ +0001aef0: 6174 3c2f 7370 616e 3e20 2a20 6564 6765 at * edge │ │ │ │ +0001af00: 5368 6172 706e 6573 7320 3d20 283c 7370 Sharpness = (float *)alloca(ver │ │ │ │ +0001af40: 7465 782e 4765 744e 756d 4564 6765 7328 tex.GetNumEdges( │ │ │ │ +0001af50: 2920 2a20 3c73 7061 6e20 636c 6173 733d ) * sizeof │ │ │ │ +0001af70: 3c2f 7370 616e 3e28 666c 6f61 7429 293b (float)); │ │ │ │ +0001af80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0001afd0: 2036 3430 3c2f 7370 616e 3e20 2020 2020 640 │ │ │ │ +0001afe0: 2020 2076 6572 7465 782e 4765 7453 6861 vertex.GetSha │ │ │ │ +0001aff0: 7270 6e65 7373 5065 7245 6467 6528 6564 rpnessPerEdge(ed │ │ │ │ +0001b000: 6765 5368 6172 706e 6573 7329 3b3c 2f64 geSharpness);.
    64 │ │ │ │ +0001b060: 313c 2f73 7061 6e3e 203c 2f64 6976 3e0a 1
    . │ │ │ │ +0001b070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0001b0a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 642 int │ │ │ │ +0001b0f0: 2063 7265 6173 6545 6e64 735b 325d 3b3c creaseEnds[2];< │ │ │ │ +0001b100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0001b150: 3634 333c 2f73 7061 6e3e 2020 2020 2020 643 │ │ │ │ +0001b160: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Cr │ │ │ │ +0001b190: 6561 7365 3c2f 613e 285f 6f70 7469 6f6e ease(_option │ │ │ │ +0001b1a0: 7329 2e3c 6120 636c 6173 733d 2263 6f64 s).GetSharpEdge │ │ │ │ +0001b200: 5061 6972 4f66 4372 6561 7365 3c2f 613e PairOfCrease │ │ │ │ +0001b210: 2865 6467 6553 6861 7270 6e65 7373 2c20 (edgeSharpness, │ │ │ │ +0001b220: 7665 7274 6578 2e47 6574 4e75 6d45 6467 vertex.GetNumEdg │ │ │ │ +0001b230: 6573 2829 2c20 6372 6561 7365 456e 6473 es(), creaseEnds │ │ │ │ +0001b240: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    644 .
    6 │ │ │ │ +0001b2f0: 3435 3c2f 7370 616e 3e20 2020 2020 2020 45 │ │ │ │ +0001b300: 2061 7373 6967 6e43 7265 6173 654c 696d assignCreaseLim │ │ │ │ +0001b310: 6974 4d61 736b 2876 6572 7465 782c 2070 itMask(vertex, p │ │ │ │ +0001b320: 6f73 4d61 736b 2c20 6372 6561 7365 456e osMask, creaseEn │ │ │ │ +0001b330: 6473 293b 3c2f 6469 763e 0a3c 6469 7620 ds);
    .
    646 │ │ │ │ +0001b390: 2020 2020 2020 2061 7373 6967 6e43 7265 assignCre │ │ │ │ +0001b3a0: 6173 654c 696d 6974 5461 6e67 656e 744d aseLimitTangentM │ │ │ │ +0001b3b0: 6173 6b73 2876 6572 7465 782c 2074 616e asks(vertex, tan │ │ │ │ +0001b3c0: 314d 6173 6b2c 2074 616e 324d 6173 6b2c 1Mask, tan2Mask, │ │ │ │ +0001b3d0: 2063 7265 6173 6545 6e64 7329 3b3c 2f64 creaseEnds);.
    64 │ │ │ │ +0001b430: 373c 2f73 7061 6e3e 2020 2020 7d20 3c73 7 } else {
    .
    < │ │ │ │ +0001b4a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001b4b0: 6e6f 223e 2020 3634 383c 2f73 7061 6e3e no"> 648 │ │ │ │ +0001b4c0: 2020 2020 2020 2020 6173 7369 676e 436f assignCo │ │ │ │ +0001b4d0: 726e 6572 4c69 6d69 744d 6173 6b28 7665 rnerLimitMask(ve │ │ │ │ +0001b4e0: 7274 6578 2c20 706f 734d 6173 6b29 3b3c rtex, posMask);< │ │ │ │ +0001b4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0001b540: 3634 393c 2f73 7061 6e3e 2020 2020 2020 649 │ │ │ │ +0001b550: 2020 6173 7369 676e 436f 726e 6572 4c69 assignCornerLi │ │ │ │ +0001b560: 6d69 7454 616e 6765 6e74 4d61 736b 7328 mitTangentMasks( │ │ │ │ +0001b570: 7665 7274 6578 2c20 7461 6e31 4d61 736b vertex, tan1Mask │ │ │ │ +0001b580: 2c20 7461 6e32 4d61 736b 293b 3c2f 6469 , tan2Mask);.
    650 │ │ │ │ +0001b5e0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    651 │ │ │ │ +0001b640: 3c2f 7370 616e 3e7d 3c2f 6469 763e 0a3c }
    .< │ │ │ │ +0001b650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0001b6a0: 3635 323c 2f73 7061 6e3e 203c 2f64 6976 652
    .
    653< │ │ │ │ +0001b700: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0001b720: 3c61 2069 643d 226c 3030 3635 3422 206e 654} // end │ │ │ │ +0001b780: 206e 616d 6573 7061 6365 2073 6463 3c2f namespace sdc
    .
    < │ │ │ │ +0001b7d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ │ +0001b7e0: 6e6f 223e 2020 3635 353c 2f73 7061 6e3e no"> 655 │ │ │ │ +0001b7f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +0001b840: 2020 3635 363c 2f73 7061 6e3e 7d20 3c73 656} // end names │ │ │ │ +0001b870: 7061 6365 204f 5045 4e53 5542 4449 565f pace OPENSUBDIV_ │ │ │ │ +0001b880: 5645 5253 494f 4e3c 2f73 7061 6e3e 3c2f VERSION.
    6 │ │ │ │ +0001b8e0: 3537 3c2f 7370 616e 3e3c 7370 616e 2063 57u │ │ │ │ +0001b900: 7369 6e67 206e 616d 6573 7061 6365 203c sing namespace < │ │ │ │ +0001b910: 2f73 7061 6e3e 4f50 454e 5355 4244 4956 /span>OPENSUBDIV │ │ │ │ +0001b920: 5f56 4552 5349 4f4e 3b3c 2f64 6976 3e0a _VERSION;
    . │ │ │ │ +0001b930: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +0001b960: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 658} // e │ │ │ │ +0001b9a0: 6e64 206e 616d 6573 7061 6365 204f 7065 nd namespace Ope │ │ │ │ +0001b9b0: 6e53 7562 6469 763c 2f73 7061 6e3e 3c2f nSubdiv.
    6 │ │ │ │ +0001ba10: 3539 3c2f 7370 616e 3e20 3c2f 6469 763e 59
    │ │ │ │ +0001ba20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +0001ba50: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 660 │ │ │ │ +0001ba90: 2365 6e64 6966 203c 2f73 7061 6e3e 3c73 #endif /* OPENSUBDI │ │ │ │ +0001bac0: 5633 5f53 4443 5f53 4348 454d 455f 4820 V3_SDC_SCHEME_H │ │ │ │ +0001bad0: 2a2f 3c2f 7370 616e 3e3c 7370 616e 2063 */
    .
    E │ │ │ │ +0001bcc0: 6e75 6d65 7261 7465 6420 7479 7065 2066 numerated type f │ │ │ │ +0001bcd0: 6f72 2061 6c6c 2066 6163 6520 7370 6c69 or all face spli │ │ │ │ +0001bce0: 7474 696e 6720 7363 6865 6d65 732e 3c2f tting schemes.
    Defini │ │ │ │ +0001bd10: 7469 6f6e 3c2f 623e 203c 6120 6872 6566 tion typ │ │ │ │ +0001bd40: 6573 2e68 3a34 373c 2f61 3e3c 2f64 6976 es.h:47
    .
    < │ │ │ │ +0001bd90: 6120 6872 6566 3d22 6130 3133 3235 2e68 a href="a01325.h │ │ │ │ +0001bda0: 746d 6c22 3e4f 7065 6e53 7562 6469 763a tml">OpenSubdiv: │ │ │ │ +0001bdb0: 3a4f 5045 4e53 5542 4449 565f 5645 5253 :OPENSUBDIV_VERS │ │ │ │ +0001bdc0: 494f 4e3a 3a53 6463 3a3a 4372 6561 7365 ION::Sdc::Crease │ │ │ │ +0001bdd0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    Typ │ │ │ │ +0001bdf0: 6573 2c20 636f 6e73 7461 6e74 7320 616e es, constants an │ │ │ │ +0001be00: 6420 7574 696c 6974 6965 7320 7265 6c61 d utilities rela │ │ │ │ +0001be10: 7465 6420 746f 2073 656d 692d 7368 6172 ted to semi-shar │ │ │ │ +0001be20: 7020 6372 6561 7369 6e67 20e2 8093 2077 p creasing ... w │ │ │ │ +0001be30: 686f 7365 2069 6d70 6c65 6d65 6e74 6174 hose implementat │ │ │ │ +0001be40: 696f 6e20 6973 2069 6e64 6570 656e 6465 ion is independe │ │ │ │ +0001be50: 6e74 206f 2e2e 2e3c 2f64 6976 3e3c 6469 nt o...
    │ │ │ │ +0001be70: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition crease.h:6 │ │ │ │ +0001beb0: 323c 2f61 3e3c 2f64 6976 3e3c 2f64 6976 2
    .
    < │ │ │ │ +0001bfc0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ +0001bfd0: 203c 6120 6872 6566 3d22 6130 3038 3330 crease.h:82 │ │ │ │ +0001c000: 3c2f 613e 3c2f 6469 763e 3c2f 6469 763e
    │ │ │ │ +0001c010: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    .
    OpenSubdiv::OPE │ │ │ │ +0001c290: 4e53 5542 4449 565f 5645 5253 494f 4e3a NSUBDIV_VERSION: │ │ │ │ +0001c2a0: 3a53 6463 3a3a 4372 6561 7365 3a3a 5255 :Sdc::Crease::RU │ │ │ │ +0001c2b0: 4c45 5f53 4d4f 4f54 483c 2f61 3e3c 2f64 LE_SMOOTH
    @ RULE_SM │ │ │ │ +0001c2e0: 4f4f 5448 3c2f 6469 763e 3c64 6976 2063 OOTH
    │ │ │ │ +0001c300: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ +0001c310: 6120 6872 6566 3d22 6130 3038 3330 5f73 a href="a00830_s │ │ │ │ +0001c320: 6f75 7263 652e 6874 6d6c 236c 3030 3038 ource.html#l0008 │ │ │ │ +0001c330: 3422 3e63 7265 6173 652e 683a 3834 3c2f 4">crease.h:84
    .< │ │ │ │ +0001c350: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0001c360: 6964 3d22 6161 3031 3332 355f 6874 6d6c id="aa01325_html │ │ │ │ +0001c370: 5f61 3131 6663 6435 3165 6638 3631 3138 _a11fcd51ef86118 │ │ │ │ +0001c380: 6636 3565 3630 3363 3134 3734 3337 3761 f65e603c1474377a │ │ │ │ +0001c390: 3738 6139 3636 6661 3161 6538 6165 6238 78a966fa1ae8aeb8 │ │ │ │ +0001c3a0: 3538 3763 3439 3863 6636 6139 3263 6333 587c498cf6a92cc3 │ │ │ │ +0001c3b0: 3333 3522 3e3c 6469 7620 636c 6173 733d 335">. │ │ │ │ +0001c4f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322 .
    OpenSubdiv:: │ │ │ │ +0001c730: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ +0001c740: 4f4e 3a3a 5364 633a 3a43 7265 6173 653a ON::Sdc::Crease: │ │ │ │ +0001c750: 3a47 6574 5368 6172 7045 6467 6550 6169 :GetSharpEdgePai │ │ │ │ +0001c760: 724f 6643 7265 6173 653c 2f61 3e3c 2f64 rOfCrease
    void GetS │ │ │ │ +0001c790: 6861 7270 4564 6765 5061 6972 4f66 4372 harpEdgePairOfCr │ │ │ │ +0001c7a0: 6561 7365 2866 6c6f 6174 2063 6f6e 7374 ease(float const │ │ │ │ +0001c7b0: 202a 696e 6369 6465 6e74 4564 6765 5368 *incidentEdgeSh │ │ │ │ +0001c7c0: 6172 706e 6573 732c 2069 6e74 2069 6e63 arpness, int inc │ │ │ │ +0001c7d0: 6964 656e 7445 6467 6543 6f75 6e74 2c20 identEdgeCount, │ │ │ │ +0001c7e0: 696e 7420 7368 6172 7045 6467 6550 6169 int sharpEdgePai │ │ │ │ +0001c7f0: 725b 325d 2920 636f 6e73 743c 2f64 6976 r[2]) const
    Definitio │ │ │ │ +0001c820: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n crease │ │ │ │ +0001c850: 2e68 3a32 3238 3c2f 613e 3c2f 6469 763e .h:228
    │ │ │ │ +0001c860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..< │ │ │ │ +0001c9e0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0001c9f0: 6964 3d22 6161 3031 3332 355f 6874 6d6c id="aa01325_html │ │ │ │ +0001ca00: 5f61 3564 6661 3638 3130 6635 3130 6661 _a5dfa6810f510fa │ │ │ │ +0001ca10: 6331 6563 3632 3166 6339 6536 6235 3330 c1ec621fc9e6b530 │ │ │ │ +0001ca20: 6334 223e 3c64 6976 2063 6c61 7373 3d22 c4"> │ │ │ │ +0001cab0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool IsUnifo │ │ │ │ +0001cad0: 726d 2829 2063 6f6e 7374 3c2f 6469 763e rm() const
    │ │ │ │ +0001cae0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +0001cb00: 3c2f 623e 203c 6120 6872 6566 3d22 6130 crease. │ │ │ │ +0001cb30: 683a 3935 3c2f 613e 3c2f 6469 763e 3c2f h:95
    .
    │ │ │ │ +0001cc40: 666c 6f61 7420 436f 6d70 7574 6546 7261 float ComputeFra │ │ │ │ +0001cc50: 6374 696f 6e61 6c57 6569 6768 7441 7456 ctionalWeightAtV │ │ │ │ +0001cc60: 6572 7465 7828 666c 6f61 7420 7665 7274 ertex(float vert │ │ │ │ +0001cc70: 6578 5368 6172 706e 6573 732c 2066 6c6f exSharpness, flo │ │ │ │ +0001cc80: 6174 2063 6869 6c64 5665 7274 6578 5368 at childVertexSh │ │ │ │ +0001cc90: 6172 706e 6573 732c 2069 6e74 2069 6e63 arpness, int inc │ │ │ │ +0001cca0: 6964 656e 7445 6467 6543 6f75 6e74 2c20 identEdgeCount, │ │ │ │ +0001ccb0: 666c 6f61 7420 636f 6e73 7420 2a69 6e63 float const *inc │ │ │ │ +0001ccc0: 6964 656e 7445 6467 6553 6861 7270 6e65 identEdgeSharpne │ │ │ │ +0001ccd0: 7373 2c20 666c 6f61 7420 636f 6e73 7420 ss, float const │ │ │ │ +0001cce0: 2a63 6869 6c64 4564 6765 7353 6861 7270 *childEdgesSharp │ │ │ │ +0001ccf0: 6e65 7373 2920 636f 6e73 743c 2f64 6976 ness) const
    Transitional │ │ │ │ +0001cd20: 2077 6569 6768 7469 6e67 3a20 5768 656e weighting: When │ │ │ │ +0001cd30: 2074 6865 2072 756c 6573 2061 7070 6c69 the rules appli │ │ │ │ +0001cd40: 6361 626c 6520 746f 2061 2070 6172 656e cable to a paren │ │ │ │ +0001cd50: 7420 7665 7274 6578 2061 6e64 2069 7473 t vertex and its │ │ │ │ +0001cd60: 2063 6869 6c64 2064 6966 6665 722c 2e2e child differ,.. │ │ │ │ +0001cd70: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    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
    .
    Scheme │ │ │ │ +0001cf50: 2069 7320 6120 636c 6173 7320 7465 6d70 is a class temp │ │ │ │ +0001cf60: 6c61 7465 2077 6869 6368 2070 726f 7669 late which provi │ │ │ │ +0001cf70: 6465 7320 616c 6c20 696d 706c 656d 656e des all implemen │ │ │ │ +0001cf80: 7461 7469 6f6e 2066 6f72 2074 6865 2073 tation for the s │ │ │ │ +0001cf90: 7562 6469 7669 7369 6f6e 2073 6368 656d ubdivision schem │ │ │ │ +0001cfa0: 6573 2073 7570 706f 7274 6564 2062 792e es supported by. │ │ │ │ +0001cfb0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ +0001cfd0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:66 │ │ │ │ +0001d010: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    │ │ │ │ +0001d110: 766f 6964 2061 7373 6967 6e53 6d6f 6f74 void assignSmoot │ │ │ │ +0001d120: 684d 6173 6b46 6f72 4564 6765 2845 4447 hMaskForEdge(EDG │ │ │ │ +0001d130: 4520 636f 6e73 7420 2661 6d70 3b65 6467 E const &edg │ │ │ │ +0001d140: 652c 204d 4153 4b20 2661 6d70 3b6d 6173 e, MASK &mas │ │ │ │ +0001d150: 6b29 2063 6f6e 7374 3c2f 6469 763e 3c2f k) const
    .
    OpenSubdiv │ │ │ │ +0001d200: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ +0001d210: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ +0001d220: 653a 3a47 6574 546f 706f 6c6f 6769 6361 e::GetTopologica │ │ │ │ +0001d230: 6c53 706c 6974 5479 7065 3c2f 613e 3c2f lSplitType
    static S │ │ │ │ +0001d260: 706c 6974 2047 6574 546f 706f 6c6f 6769 plit GetTopologi │ │ │ │ +0001d270: 6361 6c53 706c 6974 5479 7065 2829 3c2f calSplitType()
    .
    │ │ │ │ +0001d2d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ +0001d380: 766f 6964 2061 7373 6967 6e43 7265 6173 void assignCreas │ │ │ │ +0001d390: 654d 6173 6b46 6f72 5665 7274 6578 2856 eMaskForVertex(V │ │ │ │ +0001d3a0: 4552 5445 5820 636f 6e73 7420 2661 6d70 ERTEX const & │ │ │ │ +0001d3b0: 3b65 6467 652c 204d 4153 4b20 2661 6d70 ;edge, MASK & │ │ │ │ +0001d3c0: 3b6d 6173 6b2c 2069 6e74 2063 6f6e 7374 ;mask, int const │ │ │ │ +0001d3d0: 2063 7265 6173 6545 6e64 735b 325d 2920 creaseEnds[2]) │ │ │ │ +0001d3e0: 636f 6e73 743c 2f64 6976 3e3c 2f64 6976 const
    .
    void Comput │ │ │ │ +0001d4f0: 6556 6572 7465 7856 6572 7465 784d 6173 eVertexVertexMas │ │ │ │ +0001d500: 6b28 5645 5254 4558 2063 6f6e 7374 2026 k(VERTEX const & │ │ │ │ +0001d510: 616d 703b 7665 7274 6578 4e65 6967 6862 amp;vertexNeighb │ │ │ │ +0001d520: 6f72 686f 6f64 2c20 4d41 534b 2026 616d orhood, MASK &am │ │ │ │ +0001d530: 703b 7665 7274 6578 5665 7274 6578 4d61 p;vertexVertexMa │ │ │ │ +0001d540: 736b 2c20 4372 6561 7365 3a3a 5275 6c65 sk, Crease::Rule │ │ │ │ +0001d550: 2070 6172 656e 7452 756c 653d 4372 6561 parentRule=Crea │ │ │ │ +0001d560: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ +0001d570: 2c20 4372 6561 7365 3a3a 5275 6c65 2063 , Crease::Rule c │ │ │ │ +0001d580: 6869 6c64 5275 6c65 3d43 7265 6173 653a hildRule=Crease: │ │ │ │ +0001d590: 3a52 554c 455f 554e 4b4e 4f57 4e29 2063 :RULE_UNKNOWN) c │ │ │ │ +0001d5a0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    Ver │ │ │ │ +0001d5c0: 7465 782d 7665 7274 6578 206d 6173 6b73 tex-vertex masks │ │ │ │ +0001d5d0: 2049 6620 6b6e 6f77 6e2c 2061 2073 696e If known, a sin │ │ │ │ +0001d5e0: 676c 6520 5275 6c65 206f 7220 7061 6972 gle Rule or pair │ │ │ │ +0001d5f0: 206f 6620 5275 6c65 7320 6361 6e20 6265 of Rules can be │ │ │ │ +0001d600: 2073 7065 6369 6669 6564 2028 696e 6469 specified (indi │ │ │ │ +0001d610: 6361 7469 6e67 2061 2063 7265 6173 6520 cating a crease │ │ │ │ +0001d620: 7472 2e2e 2e3c 2f64 6976 3e3c 6469 7620 tr...
    Definition │ │ │ │ +0001d650: 3c61 2068 7265 663d 2261 3030 3832 315f scheme.h:512 │ │ │ │ +0001d680: 3c2f 613e 3c2f 6469 763e 3c2f 6469 763e
    │ │ │ │ +0001d690: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    < │ │ │ │ +0001d770: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0001d780: 6922 3e76 6f69 6420 436f 6d70 7574 6556 i">void ComputeV │ │ │ │ +0001d790: 6572 7465 784c 696d 6974 4d61 736b 2856 ertexLimitMask(V │ │ │ │ +0001d7a0: 4552 5445 5820 636f 6e73 7420 2661 6d70 ERTEX const & │ │ │ │ +0001d7b0: 3b76 6572 7465 784e 6569 6768 626f 7268 ;vertexNeighborh │ │ │ │ +0001d7c0: 6f6f 642c 204d 4153 4b20 2661 6d70 3b70 ood, MASK &p │ │ │ │ +0001d7d0: 6f73 6974 696f 6e4d 6173 6b2c 2043 7265 ositionMask, Cre │ │ │ │ +0001d7e0: 6173 653a 3a52 756c 6520 7665 7274 6578 ase::Rule vertex │ │ │ │ +0001d7f0: 5275 6c65 2920 636f 6e73 743c 2f64 6976 Rule) const
    Limit masks │ │ │ │ +0001d820: 666f 7220 7665 7274 6963 6573 20e2 8093 for vertices ... │ │ │ │ +0001d830: 2070 6f73 6974 696f 6e20 616e 6420 7461 position and ta │ │ │ │ +0001d840: 6e67 656e 7473 2054 6865 7365 2070 7265 ngents These pre │ │ │ │ +0001d850: 7375 6d65 2074 6861 7420 6120 7665 7274 sume that a vert │ │ │ │ +0001d860: 6578 2069 7320 7375 6974 6162 6c79 2069 ex is suitably i │ │ │ │ +0001d870: 736f 6c61 7465 6420 666f 722e 2e2e 3c2f solated for...
    Defini │ │ │ │ +0001d8a0: 7469 6f6e 3c2f 623e 203c 6120 6872 6566 tion sch │ │ │ │ +0001d8d0: 656d 652e 683a 3630 373c 2f61 3e3c 2f64 eme.h:607
    .< │ │ │ │ +0001d9d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0001d9e0: 6922 3e76 6f69 6420 6173 7369 676e 4372 i">void assignCr │ │ │ │ +0001d9f0: 6561 7365 4c69 6d69 7454 616e 6765 6e74 easeLimitTangent │ │ │ │ +0001da00: 4d61 736b 7328 5645 5254 4558 2063 6f6e Masks(VERTEX con │ │ │ │ +0001da10: 7374 2026 616d 703b 7665 7274 6578 2c20 st &vertex, │ │ │ │ +0001da20: 4d41 534b 2026 616d 703b 7461 6e31 2c20 MASK &tan1, │ │ │ │ +0001da30: 4d41 534b 2026 616d 703b 7461 6e32 2c20 MASK &tan2, │ │ │ │ +0001da40: 696e 7420 636f 6e73 7420 6372 6561 7365 int const crease │ │ │ │ +0001da50: 456e 6473 5b32 5d29 2063 6f6e 7374 3c2f Ends[2]) const
    .
    │ │ │ │ +0001dab0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    Open │ │ │ │ +0001db00: 5375 6264 6976 3a3a 4f50 454e 5355 4244 Subdiv::OPENSUBD │ │ │ │ +0001db10: 4956 5f56 4552 5349 4f4e 3a3a 5364 633a IV_VERSION::Sdc: │ │ │ │ +0001db20: 3a53 6368 656d 653a 3a47 6574 5265 6775 :Scheme::GetRegu │ │ │ │ +0001db30: 6c61 7246 6163 6553 697a 653c 2f61 3e3c larFaceSize< │ │ │ │ +0001db40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    static │ │ │ │ +0001db60: 696e 7420 4765 7452 6567 756c 6172 4661 int GetRegularFa │ │ │ │ +0001db70: 6365 5369 7a65 2829 3c2f 6469 763e 3c2f ceSize()
    .
    OpenSubdiv │ │ │ │ +0001dc20: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ +0001dc30: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ +0001dc40: 653a 3a61 7373 6967 6e43 7265 6173 654d e::assignCreaseM │ │ │ │ +0001dc50: 6173 6b46 6f72 4564 6765 3c2f 613e 3c2f askForEdge
    void ass │ │ │ │ +0001dc80: 6967 6e43 7265 6173 654d 6173 6b46 6f72 ignCreaseMaskFor │ │ │ │ +0001dc90: 4564 6765 2845 4447 4520 636f 6e73 7420 Edge(EDGE const │ │ │ │ +0001dca0: 2661 6d70 3b65 6467 652c 204d 4153 4b20 &edge, MASK │ │ │ │ +0001dcb0: 2661 6d70 3b6d 6173 6b29 2063 6f6e 7374 &mask) const │ │ │ │ +0001dcc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +0001dce0: 6e69 7469 6f6e 3c2f 623e 203c 6120 6872 nition s │ │ │ │ +0001dd10: 6368 656d 652e 683a 3331 373c 2f61 3e3c cheme.h:317< │ │ │ │ +0001dd20: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    voi │ │ │ │ +0001de20: 6420 436f 6d70 7574 6545 6467 6556 6572 d ComputeEdgeVer │ │ │ │ +0001de30: 7465 784d 6173 6b28 4544 4745 2063 6f6e texMask(EDGE con │ │ │ │ +0001de40: 7374 2026 616d 703b 6564 6765 4e65 6967 st &edgeNeig │ │ │ │ +0001de50: 6862 6f72 686f 6f64 2c20 4d41 534b 2026 hborhood, MASK & │ │ │ │ +0001de60: 616d 703b 6564 6765 5665 7274 6578 4d61 amp;edgeVertexMa │ │ │ │ +0001de70: 736b 2c20 4372 6561 7365 3a3a 5275 6c65 sk, Crease::Rule │ │ │ │ +0001de80: 2070 6172 656e 7452 756c 653d 4372 6561 parentRule=Crea │ │ │ │ +0001de90: 7365 3a3a 5255 4c45 5f55 4e4b 4e4f 574e se::RULE_UNKNOWN │ │ │ │ +0001dea0: 2c20 4372 6561 7365 3a3a 5275 6c65 2063 , Crease::Rule c │ │ │ │ +0001deb0: 6869 6c64 5275 6c65 3d43 7265 6173 653a hildRule=Crease: │ │ │ │ +0001dec0: 3a52 554c 455f 554e 4b4e 4f57 4e29 2063 :RULE_UNKNOWN) c │ │ │ │ +0001ded0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    │ │ │ │ +0001dfc0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    Definitio │ │ │ │ +0001e0d0: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ +0001e100: 2e68 3a37 303c 2f61 3e3c 2f64 6976 3e3c .h:70
    < │ │ │ │ +0001e110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +0001e170: 6120 6872 6566 3d22 6130 3133 3333 2e68 a href="a01333.h │ │ │ │ +0001e180: 746d 6c23 6137 3336 6331 3039 3434 6362 tml#a736c10944cb │ │ │ │ +0001e190: 3932 3162 3333 3466 6264 3862 3831 3836 921b334fbd8b8186 │ │ │ │ +0001e1a0: 3664 3539 6622 3e4f 7065 6e53 7562 6469 6d59f">OpenSubdi │ │ │ │ +0001e1b0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +0001e1c0: 5253 494f 4e3a 3a53 6463 3a3a 5363 6865 RSION::Sdc::Sche │ │ │ │ +0001e1d0: 6d65 3a3a 6173 7369 676e 536d 6f6f 7468 me::assignSmooth │ │ │ │ +0001e1e0: 4c69 6d69 744d 6173 6b3c 2f61 3e3c 2f64 LimitMask
    void assi │ │ │ │ +0001e210: 676e 536d 6f6f 7468 4c69 6d69 744d 6173 gnSmoothLimitMas │ │ │ │ +0001e220: 6b28 5645 5254 4558 2063 6f6e 7374 2026 k(VERTEX const & │ │ │ │ +0001e230: 616d 703b 7665 7274 6578 2c20 4d41 534b amp;vertex, MASK │ │ │ │ +0001e240: 2026 616d 703b 706f 7329 2063 6f6e 7374 &pos) const │ │ │ │ +0001e250: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .static int GetL │ │ │ │ +0001e360: 6f63 616c 4e65 6967 6862 6f72 686f 6f64 ocalNeighborhood │ │ │ │ +0001e370: 5369 7a65 2829 3c2f 6469 763e 3c2f 6469 Size()
    .
    OpenSubdiv:: │ │ │ │ +0001e420: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ +0001e430: 4f4e 3a3a 5364 633a 3a53 6368 656d 653a ON::Sdc::Scheme: │ │ │ │ +0001e440: 3a61 7373 6967 6e43 6f72 6e65 724d 6173 :assignCornerMas │ │ │ │ +0001e450: 6b46 6f72 5665 7274 6578 3c2f 613e 3c2f kForVertex
    void ass │ │ │ │ +0001e480: 6967 6e43 6f72 6e65 724d 6173 6b46 6f72 ignCornerMaskFor │ │ │ │ +0001e490: 5665 7274 6578 2856 4552 5445 5820 636f Vertex(VERTEX co │ │ │ │ +0001e4a0: 6e73 7420 2661 6d70 3b65 6467 652c 204d nst &edge, M │ │ │ │ +0001e4b0: 4153 4b20 2661 6d70 3b6d 6173 6b29 2063 ASK &mask) c │ │ │ │ +0001e4c0: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    │ │ │ │ +0001e4e0: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ +0001e4f0: 6120 6872 6566 3d22 6130 3038 3231 5f73 a href="a00821_s │ │ │ │ +0001e500: 6f75 7263 652e 6874 6d6c 236c 3030 3333 ource.html#l0033 │ │ │ │ +0001e510: 3122 3e73 6368 656d 652e 683a 3333 313c 1">scheme.h:331< │ │ │ │ +0001e520: 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3e0a /a>
    . │ │ │ │ +0001e530: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void assignCrea │ │ │ │ +0001e630: 7365 4c69 6d69 744d 6173 6b28 5645 5254 seLimitMask(VERT │ │ │ │ +0001e640: 4558 2063 6f6e 7374 2026 616d 703b 7665 EX const &ve │ │ │ │ +0001e650: 7274 6578 2c20 4d41 534b 2026 616d 703b rtex, MASK & │ │ │ │ +0001e660: 706f 732c 2069 6e74 2063 6f6e 7374 2063 pos, int const c │ │ │ │ +0001e670: 7265 6173 6545 6e64 735b 325d 2920 636f reaseEnds[2]) co │ │ │ │ +0001e680: 6e73 743c 2f64 6976 3e3c 2f64 6976 3e0a nst
    . │ │ │ │ +0001e690: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void assign │ │ │ │ +0001e790: 536d 6f6f 7468 4d61 736b 466f 7256 6572 SmoothMaskForVer │ │ │ │ +0001e7a0: 7465 7828 5645 5254 4558 2063 6f6e 7374 tex(VERTEX const │ │ │ │ +0001e7b0: 2026 616d 703b 6564 6765 2c20 4d41 534b &edge, MASK │ │ │ │ +0001e7c0: 2026 616d 703b 6d61 736b 2920 636f 6e73 &mask) cons │ │ │ │ +0001e7d0: 743c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 t
    .static int GetR │ │ │ │ +0001e8e0: 6567 756c 6172 5665 7274 6578 5661 6c65 egularVertexVale │ │ │ │ +0001e8f0: 6e63 6528 293c 2f64 6976 3e3c 2f64 6976 nce()
    .
    OpenSubdiv::O │ │ │ │ +0001e9a0: 5045 4e53 5542 4449 565f 5645 5253 494f PENSUBDIV_VERSIO │ │ │ │ +0001e9b0: 4e3a 3a53 6463 3a3a 5363 6865 6d65 3a3a N::Sdc::Scheme:: │ │ │ │ +0001e9c0: 4765 744f 7074 696f 6e73 3c2f 613e 3c2f GetOptions
    Options │ │ │ │ +0001e9f0: 4765 744f 7074 696f 6e73 2829 2063 6f6e GetOptions() con │ │ │ │ +0001ea00: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    De │ │ │ │ +0001ea20: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:74 │ │ │ │ +0001ea60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    Op │ │ │ │ +0001eb00: 656e 5375 6264 6976 3a3a 4f50 454e 5355 enSubdiv::OPENSU │ │ │ │ +0001eb10: 4244 4956 5f56 4552 5349 4f4e 3a3a 5364 BDIV_VERSION::Sd │ │ │ │ +0001eb20: 633a 3a53 6368 656d 653a 3a61 7373 6967 c::Scheme::assig │ │ │ │ +0001eb30: 6e53 6d6f 6f74 684c 696d 6974 5461 6e67 nSmoothLimitTang │ │ │ │ +0001eb40: 656e 744d 6173 6b73 3c2f 613e 3c2f 6469 entMasks
    void assig │ │ │ │ +0001eb70: 6e53 6d6f 6f74 684c 696d 6974 5461 6e67 nSmoothLimitTang │ │ │ │ +0001eb80: 656e 744d 6173 6b73 2856 4552 5445 5820 entMasks(VERTEX │ │ │ │ +0001eb90: 636f 6e73 7420 2661 6d70 3b76 6572 7465 const &verte │ │ │ │ +0001eba0: 782c 204d 4153 4b20 2661 6d70 3b74 616e x, MASK &tan │ │ │ │ +0001ebb0: 312c 204d 4153 4b20 2661 6d70 3b74 616e 1, MASK &tan │ │ │ │ +0001ebc0: 3229 2063 6f6e 7374 3c2f 6469 763e 3c2f 2) const
    .
    OpenSubdiv │ │ │ │ +0001ec70: 3a3a 4f50 454e 5355 4244 4956 5f56 4552 ::OPENSUBDIV_VER │ │ │ │ +0001ec80: 5349 4f4e 3a3a 5364 633a 3a53 6368 656d SION::Sdc::Schem │ │ │ │ +0001ec90: 653a 3a61 7373 6967 6e43 6f72 6e65 724c e::assignCornerL │ │ │ │ +0001eca0: 696d 6974 4d61 736b 3c2f 613e 3c2f 6469 imitMask
    void assig │ │ │ │ +0001ecd0: 6e43 6f72 6e65 724c 696d 6974 4d61 736b nCornerLimitMask │ │ │ │ +0001ece0: 2856 4552 5445 5820 636f 6e73 7420 2661 (VERTEX const &a │ │ │ │ +0001ecf0: 6d70 3b76 6572 7465 782c 204d 4153 4b20 mp;vertex, MASK │ │ │ │ +0001ed00: 2661 6d70 3b70 6f73 2920 636f 6e73 743c &pos) const< │ │ │ │ +0001ed10: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    Sc │ │ │ │ +0001ee00: 6865 6d65 284f 7074 696f 6e73 2063 6f6e heme(Options con │ │ │ │ +0001ee10: 7374 2026 616d 703b 6f70 7469 6f6e 7329 st &options) │ │ │ │ +0001ee20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +0001ee40: 6e69 7469 6f6e 3c2f 623e 203c 6120 6872 nition s │ │ │ │ +0001ee70: 6368 656d 652e 683a 3732 3c2f 613e 3c2f cheme.h:72
    .
    │ │ │ │ +0001f090: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void a │ │ │ │ +0001f190: 7373 6967 6e43 6f72 6e65 724c 696d 6974 ssignCornerLimit │ │ │ │ +0001f1a0: 5461 6e67 656e 744d 6173 6b73 2856 4552 TangentMasks(VER │ │ │ │ +0001f1b0: 5445 5820 636f 6e73 7420 2661 6d70 3b76 TEX const &v │ │ │ │ +0001f1c0: 6572 7465 782c 204d 4153 4b20 2661 6d70 ertex, MASK & │ │ │ │ +0001f1d0: 3b74 616e 312c 204d 4153 4b20 2661 6d70 ;tan1, MASK & │ │ │ │ +0001f1e0: 3b74 616e 3229 2063 6f6e 7374 3c2f 6469 ;tan2) const
    .
    v │ │ │ │ +0001f2e0: 6f69 6420 5365 744f 7074 696f 6e73 2863 oid SetOptions(c │ │ │ │ +0001f2f0: 6f6e 7374 204f 7074 696f 6e73 2026 616d onst Options &am │ │ │ │ +0001f300: 703b 6e65 774f 7074 696f 6e73 293c 2f64 p;newOptions)
    Definit │ │ │ │ +0001f330: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ +0001f360: 6d65 2e68 3a37 353c 2f61 3e3c 2f64 6976 me.h:75
    .
    < │ │ │ │ +0001f3b0: 6120 6872 6566 3d22 6130 3133 3337 2e68 a href="a01337.h │ │ │ │ +0001f3c0: 746d 6c22 3e4f 7065 6e53 7562 6469 763a tml">OpenSubdiv: │ │ │ │ +0001f3d0: 3a4f 5045 4e53 5542 4449 565f 5645 5253 :OPENSUBDIV_VERS │ │ │ │ +0001f3e0: 494f 4e3a 3a53 6463 3a3a 5363 6865 6d65 ION::Sdc::Scheme │ │ │ │ +0001f3f0: 3a3a 4c6f 6361 6c4d 6173 6b3c 2f61 3e3c ::LocalMask< │ │ │ │ +0001f400: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +0001f420: 6974 696f 6e3c 2f62 3e20 3c61 2068 7265 ition sc │ │ │ │ +0001f450: 6865 6d65 2e68 3a32 3039 3c2f 613e 3c2f heme.h:209
    .
    │ │ │ │ +0001f4b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 │ │ │ │ +0001f5d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ +0001f6c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool AreFace │ │ │ │ +0001f6e0: 5765 6967 6874 7346 6f72 4661 6365 4365 WeightsForFaceCe │ │ │ │ +0001f6f0: 6e74 6572 7328 2920 636f 6e73 743c 2f64 nters() const
    Definit │ │ │ │ +0001f720: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ +0001f750: 6d65 2e68 3a32 3339 3c2f 613e 3c2f 6469 me.h:239
    .void SetNumEdge │ │ │ │ +0001f870: 5765 6967 6874 7328 696e 7420 636f 756e Weights(int coun │ │ │ │ +0001f880: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    De │ │ │ │ +0001f8a0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:228
    .
    W │ │ │ │ +0001f9e0: 6569 6768 7420 636f 6e73 7420 2661 6d70 eight const & │ │ │ │ +0001f9f0: 3b20 4564 6765 5765 6967 6874 2869 6e74 ; EdgeWeight(int │ │ │ │ +0001fa00: 2069 6e64 6578 2920 636f 6e73 743c 2f64 index) const
    Definit │ │ │ │ +0001fa30: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ +0001fa60: 6d65 2e68 3a32 3332 3c2f 613e 3c2f 6469 me.h:232
    .
    Weight │ │ │ │ +0001fb70: 2026 616d 703b 2045 6467 6557 6569 6768 & EdgeWeigh │ │ │ │ +0001fb80: 7428 696e 7420 696e 6465 7829 3c2f 6469 t(int index)
    Definiti │ │ │ │ +0001fbb0: 6f6e 3c2f 623e 203c 6120 6872 6566 3d22 on schem │ │ │ │ +0001fbe0: 652e 683a 3233 363c 2f61 3e3c 2f64 6976 e.h:236
    .
    OpenSub │ │ │ │ +0001fc90: 6469 763a 3a4f 5045 4e53 5542 4449 565f div::OPENSUBDIV_ │ │ │ │ +0001fca0: 5645 5253 494f 4e3a 3a53 6463 3a3a 5363 VERSION::Sdc::Sc │ │ │ │ +0001fcb0: 6865 6d65 3a3a 4c6f 6361 6c4d 6173 6b3a heme::LocalMask: │ │ │ │ +0001fcc0: 3a43 6f6d 6269 6e65 5665 7274 6578 5665 :CombineVertexVe │ │ │ │ +0001fcd0: 7274 6578 4d61 736b 733c 2f61 3e3c 2f64 rtexMasks
    void Comb │ │ │ │ +0001fd00: 696e 6556 6572 7465 7856 6572 7465 784d ineVertexVertexM │ │ │ │ +0001fd10: 6173 6b73 2857 6569 6768 7420 7468 6973 asks(Weight this │ │ │ │ +0001fd20: 436f 6566 662c 2057 6569 6768 7420 6473 Coeff, Weight ds │ │ │ │ +0001fd30: 7443 6f65 6666 2c20 5553 4552 5f4d 4153 tCoeff, USER_MAS │ │ │ │ +0001fd40: 4b20 2661 6d70 3b64 7374 2920 636f 6e73 K &dst) cons │ │ │ │ +0001fd50: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Def │ │ │ │ +0001fd70: 696e 6974 696f 6e3c 2f62 3e20 3c61 2068 inition │ │ │ │ +0001fda0: 7363 6865 6d65 2e68 3a32 3439 3c2f 613e scheme.h:249 │ │ │ │ +0001fdb0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    ..
    void S │ │ │ │ +00020040: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ +00020050: 2869 6e74 2063 6f75 6e74 293c 2f64 6976 (int count)
    Definitio │ │ │ │ +00020080: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ +000200b0: 2e68 3a32 3239 3c2f 613e 3c2f 6469 763e .h:229
    │ │ │ │ +000200c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00020120: 3c61 2068 7265 663d 2261 3031 3333 372e OpenSubd │ │ │ │ +00020160: 6976 3a3a 4f50 454e 5355 4244 4956 5f56 iv::OPENSUBDIV_V │ │ │ │ +00020170: 4552 5349 4f4e 3a3a 5364 633a 3a53 6368 ERSION::Sdc::Sch │ │ │ │ +00020180: 656d 653a 3a4c 6f63 616c 4d61 736b 3a3a eme::LocalMask:: │ │ │ │ +00020190: 4661 6365 5765 6967 6874 3c2f 613e 3c2f FaceWeight
    Weight c │ │ │ │ +000201c0: 6f6e 7374 2026 616d 703b 2046 6163 6557 onst & FaceW │ │ │ │ +000201d0: 6569 6768 7428 696e 7420 696e 6465 7829 eight(int index) │ │ │ │ +000201e0: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    < │ │ │ │ +00020200: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ │ +00020210: 203c 6120 6872 6566 3d22 6130 3038 3231 scheme.h:23 │ │ │ │ +00020240: 333c 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3
    .
    int Ge │ │ │ │ +00020350: 744e 756d 4564 6765 5765 6967 6874 7328 tNumEdgeWeights( │ │ │ │ +00020360: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ │ +00020380: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition scheme.h:2 │ │ │ │ +000203c0: 3234 3c2f 613e 3c2f 6469 763e 3c2f 6469 24
    .
    OpenSubdiv:: │ │ │ │ +00020470: 4f50 454e 5355 4244 4956 5f56 4552 5349 OPENSUBDIV_VERSI │ │ │ │ +00020480: 4f4e 3a3a 5364 633a 3a53 6368 656d 653a ON::Sdc::Scheme: │ │ │ │ +00020490: 3a4c 6f63 616c 4d61 736b 3a3a 5665 7274 :LocalMask::Vert │ │ │ │ +000204a0: 6578 5765 6967 6874 3c2f 613e 3c2f 6469 exWeight
    Weight &am │ │ │ │ +000204d0: 703b 2056 6572 7465 7857 6569 6768 7428 p; VertexWeight( │ │ │ │ +000204e0: 696e 7420 696e 6465 7829 3c2f 6469 763e int index)
    │ │ │ │ +000204f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00020510: 3c2f 623e 203c 6120 6872 6566 3d22 6130 scheme. │ │ │ │ +00020540: 683a 3233 353c 2f61 3e3c 2f64 6976 3e3c h:235
    < │ │ │ │ +00020550: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +000205b0: 6120 6872 6566 3d22 6130 3133 3337 2e68 a href="a01337.h │ │ │ │ +000205c0: 746d 6c23 6139 3366 3537 6535 3333 3733 tml#a93f57e53373 │ │ │ │ +000205d0: 3931 6332 3064 3436 6465 6664 6233 6161 91c20d46defdb3aa │ │ │ │ +000205e0: 3263 3166 6522 3e4f 7065 6e53 7562 6469 2c1fe">OpenSubdi │ │ │ │ +000205f0: 763a 3a4f 5045 4e53 5542 4449 565f 5645 v::OPENSUBDIV_VE │ │ │ │ +00020600: 5253 494f 4e3a 3a53 6463 3a3a 5363 6865 RSION::Sdc::Sche │ │ │ │ +00020610: 6d65 3a3a 4c6f 6361 6c4d 6173 6b3a 3a47 me::LocalMask::G │ │ │ │ +00020620: 6574 4e75 6d46 6163 6557 6569 6768 7473 etNumFaceWeights │ │ │ │ +00020630: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    in │ │ │ │ +00020650: 7420 4765 744e 756d 4661 6365 5765 6967 t GetNumFaceWeig │ │ │ │ +00020660: 6874 7328 2920 636f 6e73 743c 2f64 6976 hts() const
    Definitio │ │ │ │ +00020690: 6e3c 2f62 3e20 3c61 2068 7265 663d 2261 n scheme │ │ │ │ +000206c0: 2e68 3a32 3235 3c2f 613e 3c2f 6469 763e .h:225
    │ │ │ │ +000206d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void S │ │ │ │ +000207e0: 6574 4661 6365 5765 6967 6874 7346 6f72 etFaceWeightsFor │ │ │ │ +000207f0: 4661 6365 4365 6e74 6572 7328 626f 6f6c FaceCenters(bool │ │ │ │ +00020800: 206f 6e29 3c2f 6469 763e 3c64 6976 2063 on)
    │ │ │ │ +00020820: 4465 6669 6e69 7469 6f6e 3c2f 623e 203c Definition < │ │ │ │ +00020830: 6120 6872 6566 3d22 6130 3038 3231 5f73 a href="a00821_s │ │ │ │ +00020840: 6f75 7263 652e 6874 6d6c 236c 3030 3234 ource.html#l0024 │ │ │ │ +00020850: 3022 3e73 6368 656d 652e 683a 3234 303c 0">scheme.h:240< │ │ │ │ +00020860: 2f61 3e3c 2f64 6976 3e3c 2f64 6976 3e0a /a>
    . │ │ │ │ +00020870: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    void S │ │ │ │ +00020970: 6574 4e75 6d56 6572 7465 7857 6569 6768 etNumVertexWeigh │ │ │ │ +00020980: 7473 2869 6e74 2063 6f75 6e74 293c 2f64 ts(int count)
    Definit │ │ │ │ +000209b0: 696f 6e3c 2f62 3e20 3c61 2068 7265 663d ion sche │ │ │ │ +000209e0: 6d65 2e68 3a32 3237 3c2f 613e 3c2f 6469 me.h:227
    .
    OpenSu │ │ │ │ +00020a90: 6264 6976 3a3a 4f50 454e 5355 4244 4956 bdiv::OPENSUBDIV │ │ │ │ +00020aa0: 5f56 4552 5349 4f4e 3a3a 5364 633a 3a53 _VERSION::Sdc::S │ │ │ │ +00020ab0: 6368 656d 653a 3a4c 6f63 616c 4d61 736b cheme::LocalMask │ │ │ │ +00020ac0: 3a3a 4c6f 6361 6c4d 6173 6b3c 2f61 3e3c ::LocalMask< │ │ │ │ +00020ad0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    LocalMa │ │ │ │ +00020af0: 736b 2857 6569 6768 7420 2a76 2c20 5765 sk(Weight *v, We │ │ │ │ +00020b00: 6967 6874 202a 652c 2057 6569 6768 7420 ight *e, Weight │ │ │ │ +00020b10: 2a66 293c 2f64 6976 3e3c 6469 7620 636c *f)
    D │ │ │ │ +00020b30: 6566 696e 6974 696f 6e3c 2f62 3e20 3c61 efinition scheme.h:215
    .< │ │ │ │ +00020b80: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00020b90: 6964 3d22 6161 3031 3333 375f 6874 6d6c id="aa01337_html │ │ │ │ +00020ba0: 5f61 6563 3563 3261 6266 6466 6264 6534 _aec5c2abfdfbde4 │ │ │ │ +00020bb0: 6464 3933 3463 3036 3136 3235 3939 3437 dd934c0616259947 │ │ │ │ +00020bc0: 3931 223e 3c64 6976 2063 6c61 7373 3d22 91">Weight const & │ │ │ │ +00020c80: 616d 703b 2056 6572 7465 7857 6569 6768 amp; VertexWeigh │ │ │ │ +00020c90: 7428 696e 7420 696e 6465 7829 2063 6f6e t(int index) con │ │ │ │ +00020ca0: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    De │ │ │ │ +00020cc0: 6669 6e69 7469 6f6e 3c2f 623e 203c 6120 finition scheme.h:231
    .
    W │ │ │ │ +00020e00: 6569 6768 7420 2661 6d70 3b20 4661 6365 eight & Face │ │ │ │ +00020e10: 5765 6967 6874 2869 6e74 2069 6e64 6578 Weight(int index │ │ │ │ +00020e20: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Def │ │ │ │ +00020e40: 696e 6974 696f 6e3c 2f62 3e20 3c61 2068 inition │ │ │ │ +00020e70: 7363 6865 6d65 2e68 3a32 3337 3c2f 613e scheme.h:237 │ │ │ │ +00020e80: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    ~L │ │ │ │ +00020f80: 6f63 616c 4d61 736b 2829 3c2f 6469 763e ocalMask()
    │ │ │ │ +00020f90: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00020fb0: 3c2f 623e 203c 6120 6872 6566 3d22 6130 scheme. │ │ │ │ +00020fe0: 683a 3231 363c 2f61 3e3c 2f64 6976 3e3c h:216
    < │ │ │ │ +00020ff0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
    .
    . │ │ │ │ +00021040: 3c21 2d2d 2073 7461 7274 2066 6f6f 7465 .... │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuEvaluator.h │ │ │ │ │ +scheme.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 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,656 +23,847 @@ │ │ │ │ │ 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_OSD_CPU_EVALUATOR_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_EVALUATOR_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29#include "../osd/bufferDescriptor.h" │ │ │ │ │ -30#include "../osd/types.h" │ │ │ │ │ -31 │ │ │ │ │ -32#include │ │ │ │ │ -33 │ │ │ │ │ -34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_SCHEME_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_SCHEME_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/types.h" │ │ │ │ │ +30#include "../sdc/options.h" │ │ │ │ │ +31#include "../sdc/crease.h" │ │ │ │ │ +32 │ │ │ │ │ +33#include │ │ │ │ │ +34#include │ │ │ │ │ +35#include │ │ │ │ │ 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 } │ │ │ │ │ +37namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +38namespace OPENSUBDIV_VERSION { │ │ │ │ │ +39 │ │ │ │ │ +40namespace Sdc { │ │ │ │ │ +41 │ │ │ │ │ +65template │ │ │ │ │ +_6_6class _S_c_h_e_m_e { │ │ │ │ │ +67 │ │ │ │ │ +68public: │ │ │ │ │ +69 │ │ │ │ │ +_7_0 _S_c_h_e_m_e() : _options() { } │ │ │ │ │ +71 │ │ │ │ │ +_7_2 _S_c_h_e_m_e(_O_p_t_i_o_n_s const& options) : _options(options) { } │ │ │ │ │ +73 │ │ │ │ │ +_7_4 _O_p_t_i_o_n_s _G_e_t_O_p_t_i_o_n_s() const { return _options; } │ │ │ │ │ +_7_5 void _S_e_t_O_p_t_i_o_n_s(const _O_p_t_i_o_n_s& newOptions) { _options = newOptions; } │ │ │ │ │ +76 │ │ │ │ │ +80 template │ │ │ │ │ +81 void _C_o_m_p_u_t_e_F_a_c_e_V_e_r_t_e_x_M_a_s_k(FACE const& faceNeighborhood, MASK& │ │ │ │ │ +faceVertexMask) const; │ │ │ │ │ +82 │ │ │ │ │ +98 template │ │ │ │ │ +99 void _C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k(EDGE const& edgeNeighborhood, MASK& │ │ │ │ │ +edgeVertexMask, │ │ │ │ │ +100 _C_r_e_a_s_e_:_:_R_u_l_e parentRule = _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N, │ │ │ │ │ +101 _C_r_e_a_s_e_:_:_R_u_l_e childRule = _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) const; │ │ │ │ │ +102 │ │ │ │ │ +112 template │ │ │ │ │ +113 void _C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k(VERTEX const& vertexNeighborhood, MASK& │ │ │ │ │ +vertexVertexMask, │ │ │ │ │ +114 _C_r_e_a_s_e_:_:_R_u_l_e parentRule = _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N, │ │ │ │ │ +115 _C_r_e_a_s_e_:_:_R_u_l_e childRule = _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) const; │ │ │ │ │ +116 │ │ │ │ │ +141 template │ │ │ │ │ +142 void _C_o_m_p_u_t_e_V_e_r_t_e_x_L_i_m_i_t_M_a_s_k(VERTEX const& vertexNeighborhood, MASK& │ │ │ │ │ +positionMask, │ │ │ │ │ +143 _C_r_e_a_s_e_:_:_R_u_l_e vertexRule) const; │ │ │ │ │ +144 │ │ │ │ │ +145 template │ │ │ │ │ +146 void _C_o_m_p_u_t_e_V_e_r_t_e_x_L_i_m_i_t_M_a_s_k(VERTEX const& vertexNeighborhood, MASK& │ │ │ │ │ +positionMask, │ │ │ │ │ +147 MASK& tangent1Mask, MASK& tangent2Mask, │ │ │ │ │ +148 _C_r_e_a_s_e_:_:_R_u_l_e vertexRule) const; │ │ │ │ │ +149 │ │ │ │ │ +150 // │ │ │ │ │ +151 // Static methods defining traits/properties of the scheme: │ │ │ │ │ +152 // │ │ │ │ │ +_1_5_3 static _S_p_l_i_t _G_e_t_T_o_p_o_l_o_g_i_c_a_l_S_p_l_i_t_T_y_p_e(); │ │ │ │ │ +_1_5_4 static int _G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e(); │ │ │ │ │ +_1_5_5 static int _G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e(); │ │ │ │ │ +_1_5_6 static int _G_e_t_L_o_c_a_l_N_e_i_g_h_b_o_r_h_o_o_d_S_i_z_e(); │ │ │ │ │ +157 │ │ │ │ │ +158protected: │ │ │ │ │ +159 │ │ │ │ │ +160 // │ │ │ │ │ +161 // Supporting internal methods -- optionally implemented, depending on │ │ │ │ │ +specialization: │ │ │ │ │ +162 // │ │ │ │ │ +163 │ │ │ │ │ +164 // Subdivision/refinement masks -- two for edge-vertices and three for │ │ │ │ │ +vertex-vertices: │ │ │ │ │ +165 // │ │ │ │ │ +166 template │ │ │ │ │ +167 void _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& edge, MASK& mask) const; │ │ │ │ │ +168 template │ │ │ │ │ +_1_6_9 void _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; │ │ │ │ │ +170 │ │ │ │ │ +171 template │ │ │ │ │ +172 void _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& edge, MASK& mask) const; │ │ │ │ │ +173 template │ │ │ │ │ +_1_7_4 void _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& edge, MASK& mask, int const │ │ │ │ │ +creaseEnds[2]) const; │ │ │ │ │ +175 template │ │ │ │ │ +_1_7_6 void _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& edge, MASK& mask) const; │ │ │ │ │ +177 │ │ │ │ │ +178 // │ │ │ │ │ +179 // Limit masks for position and tangents at vertices -- three cases for │ │ │ │ │ +each: │ │ │ │ │ +180 // │ │ │ │ │ +181 template │ │ │ │ │ +_1_8_2 void _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& pos) const; │ │ │ │ │ +183 template │ │ │ │ │ +_1_8_4 void _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& pos, int const │ │ │ │ │ +creaseEnds[2]) const; │ │ │ │ │ +185 template │ │ │ │ │ +_1_8_6 void _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& pos) const; │ │ │ │ │ +187 │ │ │ │ │ +188 template │ │ │ │ │ +_1_8_9 void _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, MASK& tan1, MASK& │ │ │ │ │ +tan2) const; │ │ │ │ │ +190 template │ │ │ │ │ +_1_9_1 void _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, MASK& tan1, MASK& │ │ │ │ │ +tan2, int const creaseEnds[2]) const; │ │ │ │ │ +192 template │ │ │ │ │ +_1_9_3 void _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, MASK& tan1, MASK& │ │ │ │ │ +tan2) const; │ │ │ │ │ +194 │ │ │ │ │ +195private: │ │ │ │ │ +196 _O_p_t_i_o_n_s _options; │ │ │ │ │ +197 │ │ │ │ │ +198protected: │ │ │ │ │ +199 │ │ │ │ │ +200 // │ │ │ │ │ +201 // Internal implementation support: │ │ │ │ │ +202 // │ │ │ │ │ +203 // We need a local "mask" class to be declared locally within the vertex- │ │ │ │ │ +vertex mask query │ │ │ │ │ +204 // to hold one of the two possible masks required and to combine the local │ │ │ │ │ +mask with the mask │ │ │ │ │ +205 // the caller provides. It has been parameterized by so that a │ │ │ │ │ +version compatible │ │ │ │ │ +206 // with the caller's mask class is created. │ │ │ │ │ +207 // │ │ │ │ │ +208 template │ │ │ │ │ +_2_0_9 class _L_o_c_a_l_M_a_s_k { │ │ │ │ │ +210 │ │ │ │ │ +211 public: │ │ │ │ │ +_2_1_2 typedef WEIGHT _W_e_i_g_h_t; │ │ │ │ │ +213 │ │ │ │ │ +214 public: │ │ │ │ │ +_2_1_5 _L_o_c_a_l_M_a_s_k(_W_e_i_g_h_t* v, _W_e_i_g_h_t* e, _W_e_i_g_h_t* f) : _vWeights(v), _eWeights(e), │ │ │ │ │ +_fWeights(f) { } │ │ │ │ │ +_2_1_6 _~_L_o_c_a_l_M_a_s_k() { } │ │ │ │ │ +217 │ │ │ │ │ +218 public: │ │ │ │ │ +219 │ │ │ │ │ +220 // │ │ │ │ │ +221 // Methods required for general mask assignments and queries: │ │ │ │ │ +222 // │ │ │ │ │ +_2_2_3 int _G_e_t_N_u_m_V_e_r_t_e_x_W_e_i_g_h_t_s() const { return _vCount; } │ │ │ │ │ +_2_2_4 int _G_e_t_N_u_m_E_d_g_e_W_e_i_g_h_t_s() const { return _eCount; } │ │ │ │ │ +_2_2_5 int _G_e_t_N_u_m_F_a_c_e_W_e_i_g_h_t_s() const { return _fCount; } │ │ │ │ │ +226 │ │ │ │ │ +_2_2_7 void _S_e_t_N_u_m_V_e_r_t_e_x_W_e_i_g_h_t_s(int count) { _vCount = count; } │ │ │ │ │ +_2_2_8 void _S_e_t_N_u_m_E_d_g_e_W_e_i_g_h_t_s( int count) { _eCount = count; } │ │ │ │ │ +_2_2_9 void _S_e_t_N_u_m_F_a_c_e_W_e_i_g_h_t_s( int count) { _fCount = count; } │ │ │ │ │ +230 │ │ │ │ │ +_2_3_1 _W_e_i_g_h_t const& _V_e_r_t_e_x_W_e_i_g_h_t(int index) const { return _vWeights[index]; } │ │ │ │ │ +_2_3_2 _W_e_i_g_h_t const& _E_d_g_e_W_e_i_g_h_t( int index) const { return _eWeights[index]; } │ │ │ │ │ +_2_3_3 _W_e_i_g_h_t const& _F_a_c_e_W_e_i_g_h_t( int index) const { return _fWeights[index]; } │ │ │ │ │ +234 │ │ │ │ │ +_2_3_5 _W_e_i_g_h_t& _V_e_r_t_e_x_W_e_i_g_h_t(int index) { return _vWeights[index]; } │ │ │ │ │ +_2_3_6 _W_e_i_g_h_t& _E_d_g_e_W_e_i_g_h_t( int index) { return _eWeights[index]; } │ │ │ │ │ +_2_3_7 _W_e_i_g_h_t& _F_a_c_e_W_e_i_g_h_t( int index) { return _fWeights[index]; } │ │ │ │ │ +238 │ │ │ │ │ +_2_3_9 bool _A_r_e_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s() const { return _fWeightsForCenters; } │ │ │ │ │ +_2_4_0 void _S_e_t_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s(bool on) { _fWeightsForCenters = on; } │ │ │ │ │ +241 │ │ │ │ │ +242 public: │ │ │ │ │ +243 │ │ │ │ │ +244 // │ │ │ │ │ +245 // Additional methods -- mainly the blending method for vertex-vertex │ │ │ │ │ +masks: │ │ │ │ │ +246 // │ │ │ │ │ +247 template │ │ │ │ │ +248 inline void │ │ │ │ │ +_2_4_9 _C_o_m_b_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k_s(_W_e_i_g_h_t thisCoeff, _W_e_i_g_h_t dstCoeff, USER_MASK& dst) │ │ │ │ │ +const { │ │ │ │ │ +250 │ │ │ │ │ +251 // │ │ │ │ │ +252 // This implementation is convoluted by the potential sparsity of each │ │ │ │ │ +mask. Since │ │ │ │ │ +253 // it is specific to a vertex-vertex mask, we are guaranteed to have │ │ │ │ │ +exactly one │ │ │ │ │ +254 // vertex-weight for both masks, but the edge- and face-weights are │ │ │ │ │ +optional. The │ │ │ │ │ +255 // child mask (the "source") should have a superset of the weights of the │ │ │ │ │ +parent │ │ │ │ │ +256 // (the "destination") given its reduced sharpness, so we fortunately don't │ │ │ │ │ +need to │ │ │ │ │ +257 // test all permutations. │ │ │ │ │ +258 // │ │ │ │ │ +259 dst.VertexWeight(0) = dstCoeff * dst.VertexWeight(0) + thisCoeff * this- │ │ │ │ │ +>_V_e_r_t_e_x_W_e_i_g_h_t(0); │ │ │ │ │ +260 │ │ │ │ │ +261 int edgeWeightCount = this->_G_e_t_N_u_m_E_d_g_e_W_e_i_g_h_t_s(); │ │ │ │ │ +262 if (edgeWeightCount) { │ │ │ │ │ +263 if (dst.GetNumEdgeWeights() == 0) { │ │ │ │ │ +264 dst.SetNumEdgeWeights(edgeWeightCount); │ │ │ │ │ +265 for (int i = 0; i < edgeWeightCount; ++i) { │ │ │ │ │ +266 dst.EdgeWeight(i) = thisCoeff * this->_E_d_g_e_W_e_i_g_h_t(i); │ │ │ │ │ +267 } │ │ │ │ │ +268 } else { │ │ │ │ │ +269 for (int i = 0; i < edgeWeightCount; ++i) { │ │ │ │ │ +270 dst.EdgeWeight(i) = dstCoeff * dst.EdgeWeight(i) + thisCoeff * this- │ │ │ │ │ +>_E_d_g_e_W_e_i_g_h_t(i); │ │ │ │ │ +271 } │ │ │ │ │ +272 } │ │ │ │ │ +273 } │ │ │ │ │ +274 │ │ │ │ │ +275 int faceWeightCount = this->_G_e_t_N_u_m_F_a_c_e_W_e_i_g_h_t_s(); │ │ │ │ │ +276 if (faceWeightCount) { │ │ │ │ │ +277 // │ │ │ │ │ +278 // If combining face weights, be sure their interpretation (i.e. face- │ │ │ │ │ +centers │ │ │ │ │ +279 // or opposite vertices) is properly set in the destination mask: │ │ │ │ │ +280 // │ │ │ │ │ +281 if (dst.GetNumFaceWeights() == 0) { │ │ │ │ │ +282 dst.SetNumFaceWeights(faceWeightCount); │ │ │ │ │ +283 dst.SetFaceWeightsForFaceCenters(this->_A_r_e_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s()); │ │ │ │ │ +284 │ │ │ │ │ +285 for (int i = 0; i < faceWeightCount; ++i) { │ │ │ │ │ +286 dst.FaceWeight(i) = thisCoeff * this->_F_a_c_e_W_e_i_g_h_t(i); │ │ │ │ │ +287 } │ │ │ │ │ +288 } else { │ │ │ │ │ +289 assert(this->_A_r_e_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s() == │ │ │ │ │ +dst.AreFaceWeightsForFaceCenters()); │ │ │ │ │ +290 │ │ │ │ │ +291 for (int i = 0; i < faceWeightCount; ++i) { │ │ │ │ │ +292 dst.FaceWeight(i) = dstCoeff * dst.FaceWeight(i) + thisCoeff * this- │ │ │ │ │ +>_F_a_c_e_W_e_i_g_h_t(i); │ │ │ │ │ +293 } │ │ │ │ │ +294 } │ │ │ │ │ +295 } │ │ │ │ │ +296 } │ │ │ │ │ +297 │ │ │ │ │ +298 private: │ │ │ │ │ +299 _W_e_i_g_h_t* _vWeights; │ │ │ │ │ +300 _W_e_i_g_h_t* _eWeights; │ │ │ │ │ +301 _W_e_i_g_h_t* _fWeights; │ │ │ │ │ +302 int _vCount; │ │ │ │ │ +303 int _eCount; │ │ │ │ │ +304 int _fCount; │ │ │ │ │ +305 bool _fWeightsForCenters; │ │ │ │ │ +306 }; │ │ │ │ │ +307}; │ │ │ │ │ +308 │ │ │ │ │ +309 │ │ │ │ │ +310// │ │ │ │ │ +311// Crease and corner masks are common to most schemes -- the rest need to be │ │ │ │ │ +provided │ │ │ │ │ +312// for each Scheme specialization. │ │ │ │ │ +313// │ │ │ │ │ +314template │ │ │ │ │ +315template │ │ │ │ │ +316inline void │ │ │ │ │ +_3_1_7_S_c_h_e_m_e_<_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(EDGE const&, MASK& mask) const { │ │ │ │ │ +318 │ │ │ │ │ +319 mask.SetNumVertexWeights(2); │ │ │ │ │ +320 mask.SetNumEdgeWeights(0); │ │ │ │ │ +321 mask.SetNumFaceWeights(0); │ │ │ │ │ +322 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +323 │ │ │ │ │ +324 mask.VertexWeight(0) = 0.5f; │ │ │ │ │ +325 mask.VertexWeight(1) = 0.5f; │ │ │ │ │ +326} │ │ │ │ │ +327 │ │ │ │ │ +328template │ │ │ │ │ +329template │ │ │ │ │ +330inline void │ │ │ │ │ +_3_3_1_S_c_h_e_m_e_<_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(VERTEX const&, MASK& mask) const { │ │ │ │ │ +332 │ │ │ │ │ +333 mask.SetNumVertexWeights(1); │ │ │ │ │ +334 mask.SetNumEdgeWeights(0); │ │ │ │ │ +335 mask.SetNumFaceWeights(0); │ │ │ │ │ +336 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ 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) { │ │ │ │ │ +338 mask.VertexWeight(0) = 1.0f; │ │ │ │ │ +339} │ │ │ │ │ +340 │ │ │ │ │ +341 │ │ │ │ │ +342// │ │ │ │ │ +343// The computation of a face-vertex mask is trivial and consistent for all │ │ │ │ │ +schemes: │ │ │ │ │ +344// │ │ │ │ │ +345template │ │ │ │ │ +346template │ │ │ │ │ +347void │ │ │ │ │ +_3_4_8_S_c_h_e_m_e_<_S_C_H_E_M_E_>_:_:_C_o_m_p_u_t_e_F_a_c_e_V_e_r_t_e_x_M_a_s_k(FACE const& face, MASK& mask) const { │ │ │ │ │ +349 │ │ │ │ │ +350 int vertCount = face.GetNumVertices(); │ │ │ │ │ +351 │ │ │ │ │ +352 mask.SetNumVertexWeights(vertCount); │ │ │ │ │ +353 mask.SetNumEdgeWeights(0); │ │ │ │ │ +354 mask.SetNumFaceWeights(0); │ │ │ │ │ +355 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +356 │ │ │ │ │ +357 typename MASK::Weight vWeight = 1.0f / (typename MASK::Weight) vertCount; │ │ │ │ │ +358 for (int i = 0; i < vertCount; ++i) { │ │ │ │ │ +359 mask.VertexWeight(i) = vWeight; │ │ │ │ │ +360 } │ │ │ │ │ +361} │ │ │ │ │ +362 │ │ │ │ │ +363 │ │ │ │ │ +364// │ │ │ │ │ +365// The computation of an edge-vertex mask requires inspection of sharpness │ │ │ │ │ +values to │ │ │ │ │ +366// determine if smooth or a crease, and also to detect and apply a │ │ │ │ │ +transition from a │ │ │ │ │ +367// crease to smooth. Using the protected methods to assign the specific │ │ │ │ │ +masks (only │ │ │ │ │ +368// two -- smooth or crease) this implementation should serve all non-linear │ │ │ │ │ +schemes │ │ │ │ │ +369// (currently Catmark and Loop) and only needs to be specialized for │ │ │ │ │ +Bilinear to │ │ │ │ │ +370// trivialize it to the crease case. │ │ │ │ │ +371// │ │ │ │ │ +372// The implementation here is slightly complicated by combining two │ │ │ │ │ +scenarios into a │ │ │ │ │ +373// single implementation -- either the caller knows the parent and child │ │ │ │ │ +rules and │ │ │ │ │ +374// provides them, or they don't and the Rules have to be determined from │ │ │ │ │ +sharpness │ │ │ │ │ +375// values. Both cases include quick return once the parent is determined to │ │ │ │ │ +be │ │ │ │ │ +376// smooth or the child a crease, leaving the transitional case remaining. │ │ │ │ │ +377// │ │ │ │ │ +378// The overall process is as follows: │ │ │ │ │ +379// │ │ │ │ │ +380// - quickly detect the most common specified or detected Smooth case and │ │ │ │ │ +return │ │ │ │ │ +381// - quickly detect a full Crease by child Rule assignment and return │ │ │ │ │ +382// - determine from sharpness if unspecified child is a crease -- return if │ │ │ │ │ +so │ │ │ │ │ +383// - compute smooth mask for child and combine with crease from parent │ │ │ │ │ +384// │ │ │ │ │ +385// Usage of the parent Rule here allows some misuse in that only three of │ │ │ │ │ +five possible │ │ │ │ │ +386// assignments are legitimate for the parent and four for the child (Dart │ │ │ │ │ +being only │ │ │ │ │ +387// valid for the child and Corner for neither). Results are undefined in │ │ │ │ │ +these cases. │ │ │ │ │ +388// │ │ │ │ │ +389template │ │ │ │ │ +390template │ │ │ │ │ +391void │ │ │ │ │ +_3_9_2_S_c_h_e_m_e_<_S_C_H_E_M_E_>_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k(EDGE const& edge, │ │ │ │ │ +393 MASK& mask, │ │ │ │ │ +394 _C_r_e_a_s_e_:_:_R_u_l_e parentRule, │ │ │ │ │ +395 _C_r_e_a_s_e_:_:_R_u_l_e childRule) const { │ │ │ │ │ +396 │ │ │ │ │ +397 // │ │ │ │ │ +398 // If the parent was specified or determined to be Smooth, we can quickly │ │ │ │ │ +return │ │ │ │ │ +399 // with a Smooth mask. Otherwise the parent is a crease -- if the child was │ │ │ │ │ +400 // also specified to be a crease, we can quickly return with a Crease mask. │ │ │ │ │ +401 // │ │ │ │ │ +402 if ((parentRule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || │ │ │ │ │ +403 ((parentRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) && (edge.GetSharpness() <= 0.0f))) { │ │ │ │ │ +404 assignSmoothMaskForEdge(edge, mask); │ │ │ │ │ +405 return; │ │ │ │ │ +406 } │ │ │ │ │ +407 if (childRule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +408 assignCreaseMaskForEdge(edge, mask); │ │ │ │ │ +409 return; │ │ │ │ │ +410 } │ │ │ │ │ +411 │ │ │ │ │ +412 // │ │ │ │ │ +413 // We have a Crease on the parent and the child was either specified as │ │ │ │ │ +Smooth │ │ │ │ │ +414 // or was not specified at all -- deal with the unspecified case first │ │ │ │ │ +(again │ │ │ │ │ +415 // returning a Crease mask if the child is also determined to be a Crease) │ │ │ │ │ +and │ │ │ │ │ +416 // continue if we have a transition to Smooth. │ │ │ │ │ +417 // │ │ │ │ │ +418 // Note when qualifying the child that if the parent sharpness > 1.0, │ │ │ │ │ +regardless │ │ │ │ │ +419 // of the creasing method, whether the child sharpness values decay to zero │ │ │ │ │ +is │ │ │ │ │ +420 // irrelevant -- the fractional weight for such a case (the value of the │ │ │ │ │ +parent │ │ │ │ │ +421 // sharpness) is > 1.0, and when clamped to 1 effectively yields a full │ │ │ │ │ +crease. │ │ │ │ │ +422 // │ │ │ │ │ +423 if (childRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) { │ │ │ │ │ +424 _C_r_e_a_s_e crease(_options); │ │ │ │ │ +425 │ │ │ │ │ +426 bool childIsCrease = false; │ │ │ │ │ +427 if (parentRule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +428 // Child unknown as default value but parent Rule specified as Crease │ │ │ │ │ +429 childIsCrease = true; │ │ │ │ │ +430 } else if (edge.GetSharpness() >= 1.0f) { │ │ │ │ │ +431 // Sharpness >= 1.0 always a crease -- see note above │ │ │ │ │ +432 childIsCrease = true; │ │ │ │ │ +433 } else if (crease._I_s_U_n_i_f_o_r_m()) { │ │ │ │ │ +434 // Sharpness < 1.0 is guaranteed to decay to 0.0 for Uniform child edges │ │ │ │ │ +435 childIsCrease = false; │ │ │ │ │ +436 } else { │ │ │ │ │ +437 // Sharpness <= 1.0 does not necessarily decay to 0.0 for both child │ │ │ │ │ +edges... │ │ │ │ │ +438 float cEdgeSharpness[2]; │ │ │ │ │ +439 edge.GetChildSharpnesses(crease, cEdgeSharpness); │ │ │ │ │ +440 childIsCrease = (cEdgeSharpness[0] > 0.0f) && (cEdgeSharpness[1] > 0.0f); │ │ │ │ │ +441 } │ │ │ │ │ +442 if (childIsCrease) { │ │ │ │ │ +443 assignCreaseMaskForEdge(edge, mask); │ │ │ │ │ +444 return; │ │ │ │ │ +445 } │ │ │ │ │ +446 } │ │ │ │ │ +447 │ │ │ │ │ +448 // │ │ │ │ │ +449 // We are now left with the Crease-to-Smooth case -- compute the Smooth │ │ │ │ │ +mask │ │ │ │ │ +450 // for the child and augment it with the transitional Crease of the parent. │ │ │ │ │ +451 // │ │ │ │ │ +452 // A general combination of separately assigned masks here (as done in the │ │ │ │ │ +vertex- │ │ │ │ │ +453 // vertex case) is overkill -- trivially combine the 0.5f vertex │ │ │ │ │ +coefficient for │ │ │ │ │ +454 // the Crease of the parent with the vertex weights and attenuate the face │ │ │ │ │ +weights │ │ │ │ │ +455 // accordingly. │ │ │ │ │ +456 // │ │ │ │ │ +457 assignSmoothMaskForEdge(edge, mask); │ │ │ │ │ +458 │ │ │ │ │ +459 typedef typename MASK::Weight Weight; │ │ │ │ │ +460 │ │ │ │ │ +461 Weight pWeight = edge.GetSharpness(); │ │ │ │ │ +462 Weight cWeight = 1.0f - pWeight; │ │ │ │ │ +463 │ │ │ │ │ +464 mask.VertexWeight(0) = pWeight * 0.5f + cWeight * mask.VertexWeight(0); │ │ │ │ │ +465 mask.VertexWeight(1) = pWeight * 0.5f + cWeight * mask.VertexWeight(1); │ │ │ │ │ +466 │ │ │ │ │ +467 int faceCount = mask.GetNumFaceWeights(); │ │ │ │ │ +468 for (int i = 0; i < faceCount; ++i) { │ │ │ │ │ +469 mask.FaceWeight(i) *= cWeight; │ │ │ │ │ +470 } │ │ │ │ │ +471} │ │ │ │ │ +472 │ │ │ │ │ +473// │ │ │ │ │ +474// The computation of a vertex-vertex mask requires inspection of creasing │ │ │ │ │ +sharpness values │ │ │ │ │ +475// to determine what subdivision Rules apply to the parent and its child │ │ │ │ │ +vertex, and also to │ │ │ │ │ +476// detect and apply a transition between two differing Rules. Using the │ │ │ │ │ +protected methods to │ │ │ │ │ +477// assign specific masks, this implementation should serve all non-linear │ │ │ │ │ +schemes (currently │ │ │ │ │ +478// Catmark and Loop) and only needs to be specialized for Bilinear to remove │ │ │ │ │ +all unnecessary │ │ │ │ │ +479// complexity relating to creasing, Rules, etc. │ │ │ │ │ +480// │ │ │ │ │ +481// The implementation here is slightly complicated by combining two │ │ │ │ │ +scenarios into one -- │ │ │ │ │ +482// either the caller knows the parent and child rules and provides them, or │ │ │ │ │ +they don't and │ │ │ │ │ +483// the Rules have to be determined from sharpness values. Even when the │ │ │ │ │ +Rules are known and │ │ │ │ │ +484// provided though, there are cases where the parent and child sharpness │ │ │ │ │ +values need to be │ │ │ │ │ +485// identified, so accounting for the unknown Rules too is not much of an │ │ │ │ │ +added complication. │ │ │ │ │ +486// │ │ │ │ │ +487// The benefit of supporting specified Rules is that they can often be │ │ │ │ │ +trivially │ │ │ │ │ +488// determined from context (e.g. a vertex derived from a face at a previous │ │ │ │ │ +level will always │ │ │ │ │ +489// be smooth) rather than more generally, and at greater cost, inspecting │ │ │ │ │ +neighboring and │ │ │ │ │ +490// they are often the same for parent and child. │ │ │ │ │ +491// │ │ │ │ │ +492// The overall process is as follows: │ │ │ │ │ +493// │ │ │ │ │ +494// - quickly detect the most common Smooth case when specified and return │ │ │ │ │ +495// - determine if sharpness for parent is required and gather if so │ │ │ │ │ +496// - if unspecified, determine the parent rule │ │ │ │ │ +497// - assign mask for the parent rule -- returning if Smooth/Dart │ │ │ │ │ +498// - return if child rule matches parent │ │ │ │ │ +499// - gather sharpness for child to determine or combine child rule │ │ │ │ │ +500// - if unspecified, determine the child rule, returning if it matches │ │ │ │ │ +parent │ │ │ │ │ +501// - assign local mask for child rule │ │ │ │ │ +502// - combine local child mask with the parent mask │ │ │ │ │ +503// │ │ │ │ │ +504// Remember -- if the parent rule is specified but the child is not, this │ │ │ │ │ +implies only one │ │ │ │ │ +505// of the two optional rules was specified and is meant to indicate there is │ │ │ │ │ +no transition, │ │ │ │ │ +506// so the child rule should be assigned to be the same (wish the compiler │ │ │ │ │ +would allow this │ │ │ │ │ +507// in default value assignment). │ │ │ │ │ +508// │ │ │ │ │ +509template │ │ │ │ │ +510template │ │ │ │ │ +511void │ │ │ │ │ +_5_1_2_S_c_h_e_m_e_<_S_C_H_E_M_E_>_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k(VERTEX const& vertex, │ │ │ │ │ +513 MASK& mask, │ │ │ │ │ +514 _C_r_e_a_s_e_:_:_R_u_l_e pRule, │ │ │ │ │ +515 _C_r_e_a_s_e_:_:_R_u_l_e cRule) const { │ │ │ │ │ +516 │ │ │ │ │ +517 // Quick assignment and return for the most common case: │ │ │ │ │ +518 if ((pRule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T)) { │ │ │ │ │ +519 assignSmoothMaskForVertex(vertex, mask); │ │ │ │ │ +520 return; │ │ │ │ │ +521 } │ │ │ │ │ +522 // If unspecified, assign the child rule to match the parent rule if │ │ │ │ │ +specified: │ │ │ │ │ +523 if ((cRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) && (pRule != _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N)) { │ │ │ │ │ +524 cRule = pRule; │ │ │ │ │ +525 } │ │ │ │ │ +526 int valence = vertex.GetNumEdges(); │ │ │ │ │ 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()); │ │ │ │ │ +528 // │ │ │ │ │ +529 // Determine if we need the parent edge sharpness values -- identify/gather │ │ │ │ │ +if so │ │ │ │ │ +530 // and use it to compute the parent rule if unspecified: │ │ │ │ │ +531 // │ │ │ │ │ +532 float * pEdgeSharpnessBuffer = (float *)alloca(valence*sizeof(float)), │ │ │ │ │ +533 * pEdgeSharpness = 0, │ │ │ │ │ +534 pVertexSharpness = 0.0f; │ │ │ │ │ +535 │ │ │ │ │ +536 bool requireParentSharpness = (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) || │ │ │ │ │ +537 (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) || │ │ │ │ │ +538 (pRule != cRule); │ │ │ │ │ +539 if (requireParentSharpness) { │ │ │ │ │ +540 pVertexSharpness = vertex.GetSharpness(); │ │ │ │ │ +541 pEdgeSharpness = vertex.GetSharpnessPerEdge(pEdgeSharpnessBuffer); │ │ │ │ │ +542 │ │ │ │ │ +543 if (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) { │ │ │ │ │ +544 pRule = _C_r_e_a_s_e(_options)._D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(pVertexSharpness, │ │ │ │ │ +valence, pEdgeSharpness); │ │ │ │ │ 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 │ │ │ │ │ +546 } │ │ │ │ │ +547 if ((pRule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T)) { │ │ │ │ │ +548 assignSmoothMaskForVertex(vertex, mask); │ │ │ │ │ +549 return; // As done on entry, we can return immediately if parent is Smooth/ │ │ │ │ │ +Dart │ │ │ │ │ +550 } else if (pRule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +551 int creaseEnds[2]; │ │ │ │ │ +552 _C_r_e_a_s_e(_options)._G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(pEdgeSharpness, valence, │ │ │ │ │ +creaseEnds); │ │ │ │ │ +553 │ │ │ │ │ +554 assignCreaseMaskForVertex(vertex, mask, creaseEnds); │ │ │ │ │ +555 } else { │ │ │ │ │ +556 assignCornerMaskForVertex(vertex, mask); │ │ │ │ │ +557 } │ │ │ │ │ +558 if (cRule == pRule) return; │ │ │ │ │ +559 │ │ │ │ │ +560 // │ │ │ │ │ +561 // Identify/gather child sharpness to combine masks for the two differing │ │ │ │ │ +Rules: │ │ │ │ │ +562 // │ │ │ │ │ +563 _C_r_e_a_s_e crease(_options); │ │ │ │ │ +564 │ │ │ │ │ +565 float * cEdgeSharpnessBuffer = (float *)alloca(valence*sizeof(float)), │ │ │ │ │ +566 * cEdgeSharpness = vertex.GetChildSharpnessPerEdge(crease, │ │ │ │ │ +cEdgeSharpnessBuffer), │ │ │ │ │ +567 cVertexSharpness = vertex.GetChildSharpness(crease); │ │ │ │ │ +568 │ │ │ │ │ +569 if (cRule == _C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N) { │ │ │ │ │ +570 cRule = crease._D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(cVertexSharpness, valence, │ │ │ │ │ +cEdgeSharpness); │ │ │ │ │ +571 if (cRule == pRule) return; │ │ │ │ │ +572 } │ │ │ │ │ +573 │ │ │ │ │ +574 // │ │ │ │ │ +575 // Initialize a local child mask, compute the fractional weight from parent │ │ │ │ │ +and child │ │ │ │ │ +576 // sharpness values and combine the two masks: │ │ │ │ │ +577 // │ │ │ │ │ +578 typedef typename MASK::Weight Weight; │ │ │ │ │ +579 │ │ │ │ │ +580 Weight * cMaskWeights = (Weight *)alloca((1 + 2 * valence)*sizeof(Weight)); │ │ │ │ │ +581 _L_o_c_a_l_M_a_s_k_<_W_e_i_g_h_t_> cMask(cMaskWeights, cMaskWeights + 1, cMaskWeights + 1 + │ │ │ │ │ +valence); │ │ │ │ │ +582 │ │ │ │ │ +583 if ((cRule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || (cRule == _C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T)) { │ │ │ │ │ +584 assignSmoothMaskForVertex(vertex, cMask); │ │ │ │ │ +585 } else if (cRule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +586 int creaseEnds[2]; │ │ │ │ │ +587 _C_r_e_a_s_e(_options)._G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(cEdgeSharpness, valence, │ │ │ │ │ +creaseEnds); │ │ │ │ │ +588 │ │ │ │ │ +589 assignCreaseMaskForVertex(vertex, cMask, creaseEnds); │ │ │ │ │ +590 } else { │ │ │ │ │ +591 assignCornerMaskForVertex(vertex, cMask); │ │ │ │ │ +592 } │ │ │ │ │ +593 │ │ │ │ │ +594 Weight pWeight = crease._C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x(pVertexSharpness, │ │ │ │ │ +cVertexSharpness, │ │ │ │ │ +595 valence, pEdgeSharpness, cEdgeSharpness); │ │ │ │ │ +596 Weight cWeight = 1.0f - pWeight; │ │ │ │ │ +597 │ │ │ │ │ +598 cMask._C_o_m_b_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k_s(cWeight, pWeight, mask); │ │ │ │ │ +599} │ │ │ │ │ +600 │ │ │ │ │ +601// │ │ │ │ │ +602// The computation of limit masks for vertices: │ │ │ │ │ +603// │ │ │ │ │ +604template │ │ │ │ │ +605template │ │ │ │ │ +606void │ │ │ │ │ +_6_0_7_S_c_h_e_m_e_<_S_C_H_E_M_E_>_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, │ │ │ │ │ +608 MASK& mask, │ │ │ │ │ +609 _C_r_e_a_s_e_:_:_R_u_l_e rule) const { │ │ │ │ │ +610 │ │ │ │ │ +611 if ((rule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || (rule == _C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T)) { │ │ │ │ │ +612 assignSmoothLimitMask(vertex, mask); │ │ │ │ │ +613 } else if (rule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +614 float * edgeSharpness = (float *)alloca(vertex.GetNumEdges() * sizeof │ │ │ │ │ +(float)); │ │ │ │ │ +615 vertex.GetSharpnessPerEdge(edgeSharpness); │ │ │ │ │ +616 │ │ │ │ │ +617 int creaseEnds[2]; │ │ │ │ │ +618 _C_r_e_a_s_e(_options)._G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(edgeSharpness, vertex.GetNumEdges │ │ │ │ │ +(), creaseEnds); │ │ │ │ │ +619 │ │ │ │ │ +620 assignCreaseLimitMask(vertex, mask, creaseEnds); │ │ │ │ │ +621 } else { │ │ │ │ │ +622 assignCornerLimitMask(vertex, mask); │ │ │ │ │ +623 } │ │ │ │ │ +624} │ │ │ │ │ +625 │ │ │ │ │ +626template │ │ │ │ │ +627template │ │ │ │ │ +628void │ │ │ │ │ +_6_2_9_S_c_h_e_m_e_<_S_C_H_E_M_E_>_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_L_i_m_i_t_M_a_s_k(VERTEX const& vertex, │ │ │ │ │ +630 MASK& posMask, │ │ │ │ │ +631 MASK& tan1Mask, │ │ │ │ │ +632 MASK& tan2Mask, │ │ │ │ │ +633 _C_r_e_a_s_e_:_:_R_u_l_e rule) const { │ │ │ │ │ +634 │ │ │ │ │ +635 if ((rule == _C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H) || (rule == _C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T)) { │ │ │ │ │ +636 assignSmoothLimitMask(vertex, posMask); │ │ │ │ │ +637 assignSmoothLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ +638 } else if (rule == _C_r_e_a_s_e_:_:_R_U_L_E___C_R_E_A_S_E) { │ │ │ │ │ +639 float * edgeSharpness = (float *)alloca(vertex.GetNumEdges() * sizeof │ │ │ │ │ +(float)); │ │ │ │ │ +640 vertex.GetSharpnessPerEdge(edgeSharpness); │ │ │ │ │ +641 │ │ │ │ │ +642 int creaseEnds[2]; │ │ │ │ │ +643 _C_r_e_a_s_e(_options)._G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(edgeSharpness, vertex.GetNumEdges │ │ │ │ │ +(), creaseEnds); │ │ │ │ │ +644 │ │ │ │ │ +645 assignCreaseLimitMask(vertex, posMask, creaseEnds); │ │ │ │ │ +646 assignCreaseLimitTangentMasks(vertex, tan1Mask, tan2Mask, creaseEnds); │ │ │ │ │ +647 } else { │ │ │ │ │ +648 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ +649 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ +650 } │ │ │ │ │ +651} │ │ │ │ │ +652 │ │ │ │ │ +653 │ │ │ │ │ +654} // end namespace sdc │ │ │ │ │ +655 │ │ │ │ │ +656} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +657using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +658} // end namespace OpenSubdiv │ │ │ │ │ +659 │ │ │ │ │ +660#endif /* OPENSUBDIV3_SDC_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_:_:_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 │ │ │ │ │ -*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_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_:_:_C_r_e_a_s_e │ │ │ │ │ +Types, constants and utilities related to semi-sharp creasing – whose │ │ │ │ │ +implementation is independent o... │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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___D_A_R_T │ │ │ │ │ +@ RULE_DART │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H │ │ │ │ │ +@ RULE_SMOOTH │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N │ │ │ │ │ +@ RULE_UNKNOWN │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e │ │ │ │ │ +void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int │ │ │ │ │ +incidentEdgeCount, int sharpEdgePair[2]) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ +Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, │ │ │ │ │ +float const *incidentEdgeSharpness) 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_:_:_C_r_e_a_s_e_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ +bool IsUniform() const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x │ │ │ │ │ +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,... │ │ │ │ │ +_O_p_e_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_:_:_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_:_:_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_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +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... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_5_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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_L_i_m_i_t_M_a_s_k │ │ │ │ │ +void ComputeVertexLimitMask(VERTEX const &vertexNeighborhood, MASK │ │ │ │ │ +&positionMask, Crease::Rule vertexRule) const │ │ │ │ │ +Limit masks for vertices – position and tangents These presume that a vertex │ │ │ │ │ +is suitably isolated for... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_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_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, │ │ │ │ │ +Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease:: │ │ │ │ │ +RULE_UNKNOWN) const │ │ │ │ │ +Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can │ │ │ │ │ +be specified to accel... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_S_c_h_e_m_e │ │ │ │ │ +Scheme() │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_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_:_:_G_e_t_O_p_t_i_o_n_s │ │ │ │ │ +Options GetOptions() const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_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_:_:_S_c_h_e_m_e │ │ │ │ │ +Scheme(Options const &options) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_C_o_m_p_u_t_e_F_a_c_e_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +void ComputeFaceVertexMask(FACE const &faceNeighborhood, MASK &faceVertexMask) │ │ │ │ │ +const │ │ │ │ │ +Face-vertex masks - trivial for all current schemes. │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_3_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_:_:_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_:_:_S_c_h_e_m_e_:_:_S_e_t_O_p_t_i_o_n_s │ │ │ │ │ +void SetOptions(const Options &newOptions) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_W_e_i_g_h_t │ │ │ │ │ +WEIGHT Weight │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_: │ │ │ │ │ +_A_r_e_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s │ │ │ │ │ +bool AreFaceWeightsForFaceCenters() const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_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_c_a_l_M_a_s_k_:_:_S_e_t_N_u_m_E_d_g_e_W_e_i_g_h_t_s │ │ │ │ │ +void SetNumEdgeWeights(int count) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_E_d_g_e_W_e_i_g_h_t │ │ │ │ │ +Weight const & EdgeWeight(int index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_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_:_:_L_o_c_a_l_M_a_s_k_:_:_E_d_g_e_W_e_i_g_h_t │ │ │ │ │ +Weight & EdgeWeight(int index) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_: │ │ │ │ │ +_C_o_m_b_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k_s │ │ │ │ │ +void CombineVertexVertexMasks(Weight thisCoeff, Weight dstCoeff, USER_MASK │ │ │ │ │ +&dst) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_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_:_:_L_o_c_a_l_M_a_s_k_:_:_G_e_t_N_u_m_V_e_r_t_e_x_W_e_i_g_h_t_s │ │ │ │ │ +int GetNumVertexWeights() const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_S_e_t_N_u_m_F_a_c_e_W_e_i_g_h_t_s │ │ │ │ │ +void SetNumFaceWeights(int count) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_F_a_c_e_W_e_i_g_h_t │ │ │ │ │ +Weight const & FaceWeight(int index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_G_e_t_N_u_m_E_d_g_e_W_e_i_g_h_t_s │ │ │ │ │ +int GetNumEdgeWeights() const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_V_e_r_t_e_x_W_e_i_g_h_t │ │ │ │ │ +Weight & VertexWeight(int index) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_G_e_t_N_u_m_F_a_c_e_W_e_i_g_h_t_s │ │ │ │ │ +int GetNumFaceWeights() const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_: │ │ │ │ │ +_S_e_t_F_a_c_e_W_e_i_g_h_t_s_F_o_r_F_a_c_e_C_e_n_t_e_r_s │ │ │ │ │ +void SetFaceWeightsForFaceCenters(bool on) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_S_e_t_N_u_m_V_e_r_t_e_x_W_e_i_g_h_t_s │ │ │ │ │ +void SetNumVertexWeights(int count) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_L_o_c_a_l_M_a_s_k │ │ │ │ │ +LocalMask(Weight *v, Weight *e, Weight *f) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_V_e_r_t_e_x_W_e_i_g_h_t │ │ │ │ │ +Weight const & VertexWeight(int index) const │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_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_:_:_L_o_c_a_l_M_a_s_k_:_:_F_a_c_e_W_e_i_g_h_t │ │ │ │ │ +Weight & FaceWeight(int index) │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._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_:_:_S_d_c_:_:_S_c_h_e_m_e_:_:_L_o_c_a_l_M_a_s_k_:_:_~_L_o_c_a_l_M_a_s_k │ │ │ │ │ +~LocalMask() │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_2_1_6 │ │ │ │ │ * _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 │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _s_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00824.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlCommon.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/loopScheme.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,42 +88,38 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    mtlCommon.h File Reference
    │ │ │ │ +
    loopScheme.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │ +#include "../sdc/scheme.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cmath>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  MTLContext
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    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 │ │ │ │ │ -mtlCommon.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +loopScheme.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +#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   _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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00824_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/mtlCommon.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/loopScheme.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    mtlCommon.h
    │ │ │ │ +
    loopScheme.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,54 +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
    │ │ │ │ -
    25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include <cstddef>
    │ │ │ │ -
    31
    │ │ │ │ -
    32@protocol MTLDevice;
    │ │ │ │ -
    33@protocol MTLCommandQueue;
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H
    │ │ │ │ +
    25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../sdc/scheme.h"
    │ │ │ │ +
    30
    │ │ │ │ +
    31#include <cassert>
    │ │ │ │ +
    32#include <cmath>
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36namespace Sdc {
    │ │ │ │
    37
    │ │ │ │ -
    38namespace Osd {
    │ │ │ │ -
    39
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    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
    │ │ │ │ +
    38
    │ │ │ │ +
    39//
    │ │ │ │ +
    40// Specializations for Sdc::Scheme<SCHEME_LOOP>:
    │ │ │ │ +
    41//
    │ │ │ │ +
    42//
    │ │ │ │ +
    43
    │ │ │ │ +
    44//
    │ │ │ │ +
    45// Loop traits:
    │ │ │ │ +
    46//
    │ │ │ │ +
    47template <>
    │ │ │ │ + │ │ │ │ +
    49
    │ │ │ │ +
    50template <>
    │ │ │ │ + │ │ │ │
    52
    │ │ │ │ -
    53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H
    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -mtlCommon.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 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,51 +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 │ │ │ │ │ -25#ifndef OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ -27 │ │ │ │ │ -28#include "../version.h" │ │ │ │ │ -29 │ │ │ │ │ -30#include │ │ │ │ │ -31 │ │ │ │ │ -32@protocol MTLDevice; │ │ │ │ │ -33@protocol MTLCommandQueue; │ │ │ │ │ -34 │ │ │ │ │ -35namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -36namespace OPENSUBDIV_VERSION { │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_LOOP_SCHEME_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/scheme.h" │ │ │ │ │ +30 │ │ │ │ │ +31#include │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36namespace Sdc { │ │ │ │ │ 37 │ │ │ │ │ -38namespace Osd { │ │ │ │ │ -39 │ │ │ │ │ -_4_0class _M_T_L_C_o_n_t_e_x_t { │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ -53#endif //OPENSUBDIV3_OSD_MTL_COMMON_H │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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_:_:_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_:_:_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_s_d │ │ │ │ │ - * _m_t_l_C_o_m_m_o_n_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _l_o_o_p_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00827.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaVertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/bilinearScheme.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,43 +88,36 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cudaVertexBuffer.h File Reference
    │ │ │ │ +
    bilinearScheme.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │ +#include "../sdc/scheme.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ -Classes

    class  CudaVertexBuffer
     Concrete vertex buffer class for Cuda subdivision. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,20 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cudaVertexBuffer.h File Reference │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +bilinearScheme.h File Reference │ │ │ │ │ #include "../version.h" │ │ │ │ │ -#include │ │ │ │ │ +#include "_._._/_s_d_c_/_s_c_h_e_m_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for Cuda 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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00827_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cudaVertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/bilinearScheme.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    cudaVertexBuffer.h
    │ │ │ │ +
    bilinearScheme.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,80 +118,193 @@ │ │ │ │
    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_OSD_CUDA_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#include "../version.h"
    │ │ │ │ -
    29
    │ │ │ │ -
    30#include <cstddef>
    │ │ │ │ -
    31
    │ │ │ │ -
    32namespace OpenSubdiv {
    │ │ │ │ -
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    34
    │ │ │ │ -
    35namespace Osd {
    │ │ │ │ -
    36
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    43
    │ │ │ │ -
    44public:
    │ │ │ │ -
    46 static CudaVertexBuffer * Create(int numElements, int numVertices,
    │ │ │ │ -
    47 void *deviceContext = NULL);
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
    │ │ │ │ +
    25#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../sdc/scheme.h"
    │ │ │ │ +
    30
    │ │ │ │ +
    31namespace OpenSubdiv {
    │ │ │ │ +
    32namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    33
    │ │ │ │ +
    │ │ │ │ +
    34namespace Sdc {
    │ │ │ │ +
    35
    │ │ │ │ +
    36//
    │ │ │ │ +
    37// Specializations for Scheme<SCHEME_BILINEAR>:
    │ │ │ │ +
    38//
    │ │ │ │ +
    39
    │ │ │ │ +
    40//
    │ │ │ │ +
    41// Bilinear traits:
    │ │ │ │ +
    42//
    │ │ │ │ +
    43template <>
    │ │ │ │ + │ │ │ │ +
    45
    │ │ │ │ +
    46template <>
    │ │ │ │ + │ │ │ │
    48
    │ │ │ │ - │ │ │ │ +
    49template <>
    │ │ │ │ + │ │ │ │
    51
    │ │ │ │ -
    54 void UpdateData(const float *src, int startVertex, int numVertices,
    │ │ │ │ -
    55 void *deviceContext=NULL);
    │ │ │ │ -
    56
    │ │ │ │ -
    58 int GetNumElements() const;
    │ │ │ │ -
    59
    │ │ │ │ -
    61 int GetNumVertices() const;
    │ │ │ │ -
    62
    │ │ │ │ -
    64 float * BindCudaBuffer();
    │ │ │ │ -
    65
    │ │ │ │ -
    66protected:
    │ │ │ │ -
    68 CudaVertexBuffer(int numElements, int numVertices);
    │ │ │ │ -
    69
    │ │ │ │ -
    72 bool allocate();
    │ │ │ │ -
    73
    │ │ │ │ -
    74private:
    │ │ │ │ -
    75 int _numElements;
    │ │ │ │ -
    76 int _numVertices;
    │ │ │ │ -
    77 void *_cudaMem;
    │ │ │ │ -
    78
    │ │ │ │ -
    79};
    │ │ │ │ -
    │ │ │ │ -
    80
    │ │ │ │ -
    81} // end namespace Osd
    │ │ │ │ -
    82
    │ │ │ │ -
    83} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    84using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    52template <>
    │ │ │ │ + │ │ │ │ +
    54
    │ │ │ │ +
    55
    │ │ │ │ +
    56//
    │ │ │ │ +
    57// Refinement masks:
    │ │ │ │ +
    58//
    │ │ │ │ +
    59template <>
    │ │ │ │ +
    60template <typename EDGE, typename MASK>
    │ │ │ │ +
    61void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ + │ │ │ │ +
    64 // This should be inline, otherwise trivially replicate it:
    │ │ │ │ +
    65 assignCreaseMaskForEdge(edge, mask);
    │ │ │ │ +
    66}
    │ │ │ │ +
    │ │ │ │ +
    67
    │ │ │ │ +
    68template <>
    │ │ │ │ +
    69template <typename VERTEX, typename MASK>
    │ │ │ │ +
    70void
    │ │ │ │ +
    │ │ │ │ +
    71Scheme<SCHEME_BILINEAR>::ComputeVertexVertexMask(VERTEX const& vertex, MASK& mask,
    │ │ │ │ + │ │ │ │ +
    73 // This should be inline, otherwise trivially replicate it:
    │ │ │ │ +
    74 assignCornerMaskForVertex(vertex, mask);
    │ │ │ │ +
    75}
    │ │ │ │ +
    │ │ │ │ +
    76
    │ │ │ │ +
    77
    │ │ │ │ +
    78//
    │ │ │ │ +
    79// Limit masks for position -- the limit position of all vertices is the refined vertex.
    │ │ │ │ +
    80//
    │ │ │ │ +
    81template <>
    │ │ │ │ +
    82template <typename VERTEX, typename MASK>
    │ │ │ │ +
    83inline void
    │ │ │ │ +
    │ │ │ │ +
    84Scheme<SCHEME_BILINEAR>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
    │ │ │ │
    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.
    │ │ │ │ - │ │ │ │ -
    CudaVertexBuffer(int numElements, int numVertices)
    Constructor.
    │ │ │ │ +
    86 posMask.SetNumVertexWeights(1);
    │ │ │ │ +
    87 posMask.SetNumEdgeWeights(0);
    │ │ │ │ +
    88 posMask.SetNumFaceWeights(0);
    │ │ │ │ +
    89 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    90
    │ │ │ │ +
    91 posMask.VertexWeight(0) = 1.0f;
    │ │ │ │ +
    92}
    │ │ │ │ +
    │ │ │ │ +
    93
    │ │ │ │ +
    94template <>
    │ │ │ │ +
    95template <typename VERTEX, typename MASK>
    │ │ │ │ +
    96inline void
    │ │ │ │ +
    │ │ │ │ +
    97Scheme<SCHEME_BILINEAR>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
    │ │ │ │ +
    98 int const /* creaseEnds */[2]) const {
    │ │ │ │ +
    99
    │ │ │ │ +
    100 assignCornerLimitMask(vertex, posMask);
    │ │ │ │ +
    101}
    │ │ │ │ +
    │ │ │ │ +
    102
    │ │ │ │ +
    103template <>
    │ │ │ │ +
    104template <typename VERTEX, typename MASK>
    │ │ │ │ +
    105inline void
    │ │ │ │ +
    │ │ │ │ +
    106Scheme<SCHEME_BILINEAR>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
    │ │ │ │ +
    107
    │ │ │ │ +
    108 assignCornerLimitMask(vertex, posMask);
    │ │ │ │ +
    109}
    │ │ │ │ +
    │ │ │ │ +
    110
    │ │ │ │ +
    111//
    │ │ │ │ +
    112// Limit masks for tangents -- these are ambiguous around all vertices. Provide
    │ │ │ │ +
    113// the tangents based on the incident edges of the first face.
    │ │ │ │ +
    114//
    │ │ │ │ +
    115template <>
    │ │ │ │ +
    116template <typename VERTEX, typename MASK>
    │ │ │ │ +
    117inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    119 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ +
    120
    │ │ │ │ +
    121 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    122 tan1Mask.SetNumEdgeWeights(2);
    │ │ │ │ +
    123 tan1Mask.SetNumFaceWeights(0);
    │ │ │ │ +
    124 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    125
    │ │ │ │ +
    126 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    127 tan2Mask.SetNumEdgeWeights(2);
    │ │ │ │ +
    128 tan2Mask.SetNumFaceWeights(0);
    │ │ │ │ +
    129 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    130
    │ │ │ │ +
    131 tan1Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ +
    132 tan1Mask.EdgeWeight(0) = 1.0f;
    │ │ │ │ +
    133 tan1Mask.EdgeWeight(1) = 0.0f;
    │ │ │ │ +
    134
    │ │ │ │ +
    135 tan2Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ +
    136 tan2Mask.EdgeWeight(0) = 0.0f;
    │ │ │ │ +
    137 tan2Mask.EdgeWeight(1) = 1.0f;
    │ │ │ │ +
    138}
    │ │ │ │ +
    │ │ │ │ +
    139
    │ │ │ │ +
    140template <>
    │ │ │ │ +
    141template <typename VERTEX, typename MASK>
    │ │ │ │ +
    142inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    144 MASK& tan1Mask, MASK& tan2Mask, int const /* creaseEnds */[2]) const {
    │ │ │ │ +
    145
    │ │ │ │ +
    146 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
    │ │ │ │ +
    147}
    │ │ │ │ +
    │ │ │ │ +
    148
    │ │ │ │ +
    149template <>
    │ │ │ │ +
    150template <typename VERTEX, typename MASK>
    │ │ │ │ +
    151inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    153 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ +
    154
    │ │ │ │ +
    155 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
    │ │ │ │ +
    156}
    │ │ │ │ +
    │ │ │ │ +
    157
    │ │ │ │ +
    158} // end namespace sdc
    │ │ │ │ +
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ +
    void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease::RULE_UNKNOWN) const
    Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can be specified to accel...
    Definition scheme.h:392
    │ │ │ │ +
    void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
    │ │ │ │ + │ │ │ │ +
    void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const creaseEnds[2]) 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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cudaVertexBuffer.h │ │ │ │ │ +bilinearScheme.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,90 +23,211 @@ │ │ │ │ │ 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_OSD_CUDA_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -43 │ │ │ │ │ -44public: │ │ │ │ │ -_4_6 static _C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -47 void *deviceContext = NULL); │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_BILINEAR_SCHEME_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/scheme.h" │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +33 │ │ │ │ │ +_3_4namespace Sdc { │ │ │ │ │ +35 │ │ │ │ │ +36// │ │ │ │ │ +37// Specializations for Scheme: │ │ │ │ │ +38// │ │ │ │ │ +39 │ │ │ │ │ +40// │ │ │ │ │ +41// Bilinear traits: │ │ │ │ │ +42// │ │ │ │ │ +43template <> │ │ │ │ │ +_4_4inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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___Q_U_A_D_S; } │ │ │ │ │ +45 │ │ │ │ │ +46template <> │ │ │ │ │ +_4_7inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 4; } │ │ │ │ │ 48 │ │ │ │ │ -_5_0 _~_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r(); │ │ │ │ │ +49template <> │ │ │ │ │ +_5_0inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 4; } │ │ │ │ │ 51 │ │ │ │ │ -_5_4 void _U_p_d_a_t_e_D_a_t_a(const float *src, int startVertex, int numVertices, │ │ │ │ │ -55 void *deviceContext=NULL); │ │ │ │ │ -56 │ │ │ │ │ -_5_8 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -59 │ │ │ │ │ -_6_1 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ -62 │ │ │ │ │ -_6_4 float * _B_i_n_d_C_u_d_a_B_u_f_f_e_r(); │ │ │ │ │ -65 │ │ │ │ │ -66protected: │ │ │ │ │ -_6_8 _C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -69 │ │ │ │ │ -_7_2 bool _a_l_l_o_c_a_t_e(); │ │ │ │ │ -73 │ │ │ │ │ -74private: │ │ │ │ │ -75 int _numElements; │ │ │ │ │ -76 int _numVertices; │ │ │ │ │ -77 void *_cudaMem; │ │ │ │ │ -78 │ │ │ │ │ -79}; │ │ │ │ │ -80 │ │ │ │ │ -81} // end namespace Osd │ │ │ │ │ -82 │ │ │ │ │ -83} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -84using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +52template <> │ │ │ │ │ +_5_3inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 0; } │ │ │ │ │ +54 │ │ │ │ │ +55 │ │ │ │ │ +56// │ │ │ │ │ +57// Refinement masks: │ │ │ │ │ +58// │ │ │ │ │ +59template <> │ │ │ │ │ +60template │ │ │ │ │ +61void │ │ │ │ │ +_6_2_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k(EDGE const& edge, MASK& mask, │ │ │ │ │ +63 _C_r_e_a_s_e_:_:_R_u_l_e, _C_r_e_a_s_e_:_:_R_u_l_e) const { │ │ │ │ │ +64 // This should be inline, otherwise trivially replicate it: │ │ │ │ │ +65 assignCreaseMaskForEdge(edge, mask); │ │ │ │ │ +66} │ │ │ │ │ +67 │ │ │ │ │ +68template <> │ │ │ │ │ +69template │ │ │ │ │ +70void │ │ │ │ │ +_7_1_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k(VERTEX const& vertex, MASK& │ │ │ │ │ +mask, │ │ │ │ │ +72 _C_r_e_a_s_e_:_:_R_u_l_e, _C_r_e_a_s_e_:_:_R_u_l_e) const { │ │ │ │ │ +73 // This should be inline, otherwise trivially replicate it: │ │ │ │ │ +74 assignCornerMaskForVertex(vertex, mask); │ │ │ │ │ +75} │ │ │ │ │ +76 │ │ │ │ │ +77 │ │ │ │ │ +78// │ │ │ │ │ +79// Limit masks for position -- the limit position of all vertices is the │ │ │ │ │ +refined vertex. │ │ │ │ │ +80// │ │ │ │ │ +81template <> │ │ │ │ │ +82template │ │ │ │ │ +83inline void │ │ │ │ │ +_8_4_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 { │ │ │ │ │ 85 │ │ │ │ │ -86} // end namespace OpenSubdiv │ │ │ │ │ -87 │ │ │ │ │ -88#endif // OPENSUBDIV3_OSD_CUDA_VERTEX_BUFFER_H │ │ │ │ │ +86 posMask.SetNumVertexWeights(1); │ │ │ │ │ +87 posMask.SetNumEdgeWeights(0); │ │ │ │ │ +88 posMask.SetNumFaceWeights(0); │ │ │ │ │ +89 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +90 │ │ │ │ │ +91 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ +92} │ │ │ │ │ +93 │ │ │ │ │ +94template <> │ │ │ │ │ +95template │ │ │ │ │ +96inline void │ │ │ │ │ +_9_7_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ +98 int const /* creaseEnds */[2]) const { │ │ │ │ │ +99 │ │ │ │ │ +100 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ +101} │ │ │ │ │ +102 │ │ │ │ │ +103template <> │ │ │ │ │ +104template │ │ │ │ │ +105inline void │ │ │ │ │ +_1_0_6_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 { │ │ │ │ │ +107 │ │ │ │ │ +108 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ +109} │ │ │ │ │ +110 │ │ │ │ │ +111// │ │ │ │ │ +112// Limit masks for tangents -- these are ambiguous around all vertices. │ │ │ │ │ +Provide │ │ │ │ │ +113// the tangents based on the incident edges of the first face. │ │ │ │ │ +114// │ │ │ │ │ +115template <> │ │ │ │ │ +116template │ │ │ │ │ +117inline void │ │ │ │ │ +_1_1_8_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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 */, │ │ │ │ │ +119 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +120 │ │ │ │ │ +121 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +122 tan1Mask.SetNumEdgeWeights(2); │ │ │ │ │ +123 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ +124 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +125 │ │ │ │ │ +126 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +127 tan2Mask.SetNumEdgeWeights(2); │ │ │ │ │ +128 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ +129 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +130 │ │ │ │ │ +131 tan1Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ +132 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ +133 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ +134 │ │ │ │ │ +135 tan2Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ +136 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ +137 tan2Mask.EdgeWeight(1) = 1.0f; │ │ │ │ │ +138} │ │ │ │ │ +139 │ │ │ │ │ +140template <> │ │ │ │ │ +141template │ │ │ │ │ +142inline void │ │ │ │ │ +_1_4_3_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ +144 MASK& tan1Mask, MASK& tan2Mask, int const /* creaseEnds */[2]) const { │ │ │ │ │ +145 │ │ │ │ │ +146 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ +147} │ │ │ │ │ +148 │ │ │ │ │ +149template <> │ │ │ │ │ +150template │ │ │ │ │ +151inline void │ │ │ │ │ +_1_5_2_S_c_h_e_m_e_<_S_C_H_E_M_E___B_I_L_I_N_E_A_R_>_:_:_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, │ │ │ │ │ +153 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +154 │ │ │ │ │ +155 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ +156} │ │ │ │ │ +157 │ │ │ │ │ +158} // end namespace sdc │ │ │ │ │ +159 │ │ │ │ │ +160} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +161using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +162} // end namespace OpenSubdiv │ │ │ │ │ +163 │ │ │ │ │ +164#endif /* OPENSUBDIV3_SDC_BILINEAR_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_:_:_O_s_d_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for Cuda subdivision. │ │ │ │ │ -DDeeffiinniittiioonn _c_u_d_a_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_C_u_d_a_B_u_f_f_e_r │ │ │ │ │ -float * BindCudaBuffer() │ │ │ │ │ -Returns cuda memory. │ │ │ │ │ -_O_p_e_n_S_u_b_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_V_e_r_t_e_x_B_u_f_f_e_r_:_:_~_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -~CudaVertexBuffer() │ │ │ │ │ -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_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_u_d_a_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_u_d_a_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_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CudaVertexBuffer * 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_u_d_a_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_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CudaVertexBuffer(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_:_:_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___Q_U_A_D_S │ │ │ │ │ +@ SPLIT_TO_QUADS │ │ │ │ │ +Used by Catmark and Bilinear. │ │ │ │ │ +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_:_:_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_:_:_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_:_:_C_o_m_p_u_t_e_V_e_r_t_e_x_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +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... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_e_._h_:_5_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_:_:_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_:_:_C_o_m_p_u_t_e_E_d_g_e_V_e_r_t_e_x_M_a_s_k │ │ │ │ │ +void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, │ │ │ │ │ +Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease:: │ │ │ │ │ +RULE_UNKNOWN) const │ │ │ │ │ +Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can │ │ │ │ │ +be specified to accel... │ │ │ │ │ +DDeeffiinniittiioonn _s_c_h_e_m_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_:_:_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_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_:_:_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_s_d │ │ │ │ │ - * _c_u_d_a_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _b_i_l_i_n_e_a_r_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00830.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/crease.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,45 +90,41 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    d3d11PatchTable.h File Reference
    │ │ │ │ +
    crease.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <vector>
    │ │ │ │ -#include "../far/patchDescriptor.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/types.h"
    │ │ │ │ +#include "../sdc/options.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

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

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Far
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -d3d11PatchTable.h File Reference │ │ │ │ │ +crease.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 "_._._/_s_d_c_/_o_p_t_i_o_n_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_P_a_t_c_h_T_a_b_l_e │ │ │ │ │ +class   _C_r_e_a_s_e │ │ │ │ │ +  Types, constants and utilities related to semi-sharp creasing – whose │ │ │ │ │ + implementation is independent of the 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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _c_r_e_a_s_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00830.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ var a00830 = [ │ │ │ │ │ - ["D3D11PatchTable", "a01201.html", "a01201"] │ │ │ │ │ + ["Crease", "a01325.html", "a01325"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00830_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/d3d11PatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/crease.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    d3d11PatchTable.h
    │ │ │ │ +
    crease.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2015 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,119 +118,221 @@ │ │ │ │
    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_OSD_GL_PATCH_TABLE_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_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;
    │ │ │ │ -
    39
    │ │ │ │ -
    40namespace OpenSubdiv {
    │ │ │ │ -
    41namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    42
    │ │ │ │ -
    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 }
    │ │ │ │ -
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_SDC_CREASE_H
    │ │ │ │ +
    25#define OPENSUBDIV3_SDC_CREASE_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../sdc/options.h"
    │ │ │ │ +
    30
    │ │ │ │ +
    31namespace OpenSubdiv {
    │ │ │ │ +
    32namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace Sdc {
    │ │ │ │ +
    35
    │ │ │ │
    61
    │ │ │ │ -
    62 static D3D11PatchTable *Create(Far::PatchTable const *farPatchTable,
    │ │ │ │ -
    63 ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    64
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    66 return _patchArrays;
    │ │ │ │ -
    67 }
    │ │ │ │ -
    │ │ │ │ -
    68
    │ │ │ │ -
    │ │ │ │ -
    70 ID3D11Buffer* GetPatchIndexBuffer() const {
    │ │ │ │ -
    71 return _indexBuffer;
    │ │ │ │ -
    72 }
    │ │ │ │ -
    │ │ │ │ -
    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};
    │ │ │ │ -
    │ │ │ │ -
    90
    │ │ │ │ -
    91
    │ │ │ │ -
    92} // end namespace Osd
    │ │ │ │ -
    93
    │ │ │ │ -
    94} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ -
    95using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    │ │ │ │ +
    62class Crease {
    │ │ │ │ +
    63public:
    │ │ │ │ +
    65
    │ │ │ │ +
    67 static float const SHARPNESS_SMOOTH; // = 0.0f, do we really need this?
    │ │ │ │ +
    68 static float const SHARPNESS_INFINITE; // = 10.0f;
    │ │ │ │ +
    69
    │ │ │ │ +
    70 static bool IsSmooth(float sharpness) { return sharpness <= SHARPNESS_SMOOTH; }
    │ │ │ │ +
    71 static bool IsSharp(float sharpness) { return sharpness > SHARPNESS_SMOOTH; }
    │ │ │ │ +
    72 static bool IsInfinite(float sharpness) { return sharpness >= SHARPNESS_INFINITE; }
    │ │ │ │ +
    73 static bool IsSemiSharp(float sharpness) { return (SHARPNESS_SMOOTH < sharpness) && (sharpness < SHARPNESS_INFINITE); }
    │ │ │ │ +
    75
    │ │ │ │ +
    │ │ │ │ +
    82 enum Rule {
    │ │ │ │ + │ │ │ │ +
    84 RULE_SMOOTH = (1 << 0),
    │ │ │ │ +
    85 RULE_DART = (1 << 1),
    │ │ │ │ +
    86 RULE_CREASE = (1 << 2),
    │ │ │ │ +
    87 RULE_CORNER = (1 << 3)
    │ │ │ │ +
    88 };
    │ │ │ │ +
    │ │ │ │ +
    89
    │ │ │ │ +
    90public:
    │ │ │ │ +
    91 Crease() : _options() { }
    │ │ │ │ +
    92 Crease(Options const& options) : _options(options) { }
    │ │ │ │ +
    93 ~Crease() { }
    │ │ │ │ +
    94
    │ │ │ │ +
    95 bool IsUniform() const { return _options.GetCreasingMethod() == Options::CREASE_UNIFORM; }
    │ │ │ │
    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.
    │ │ │ │ - │ │ │ │ +
    104 float SharpenBoundaryEdge(float edgeSharpness) const;
    │ │ │ │ +
    105 float SharpenBoundaryVertex(float edgeSharpness) const;
    │ │ │ │ +
    106
    │ │ │ │ +
    107 // For future consideration
    │ │ │ │ +
    108 //float SharpenNonManifoldEdge(float edgeSharpness) const;
    │ │ │ │ +
    109 //float SharpenNonManifoldVertex(float edgeSharpness) const;
    │ │ │ │ +
    111
    │ │ │ │ +
    113
    │ │ │ │ +
    124 float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const;
    │ │ │ │ +
    125
    │ │ │ │ +
    126 float SubdivideVertexSharpness(float vertexSharpness) const;
    │ │ │ │ +
    127
    │ │ │ │ +
    128 float SubdivideEdgeSharpnessAtVertex(float edgeSharpness,
    │ │ │ │ +
    129 int incidentEdgeCountAtEndVertex,
    │ │ │ │ +
    130 float const* edgeSharpnessAroundEndVertex) const;
    │ │ │ │ +
    131
    │ │ │ │ +
    132 void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex,
    │ │ │ │ +
    133 float const* incidentEdgeSharpnessAroundVertex,
    │ │ │ │ +
    134 float* childEdgesSharpnessAroundVertex) const;
    │ │ │ │ +
    136
    │ │ │ │ +
    138
    │ │ │ │ +
    144 Rule DetermineVertexVertexRule(float vertexSharpness,
    │ │ │ │ +
    145 int incidentEdgeCount,
    │ │ │ │ +
    146 float const* incidentEdgeSharpness) const;
    │ │ │ │ +
    147 Rule DetermineVertexVertexRule(float vertexSharpness,
    │ │ │ │ +
    148 int sharpEdgeCount) const;
    │ │ │ │ +
    150
    │ │ │ │ +
    162 float ComputeFractionalWeightAtVertex(float vertexSharpness,
    │ │ │ │ +
    163 float childVertexSharpness,
    │ │ │ │ +
    164 int incidentEdgeCount,
    │ │ │ │ +
    165 float const* incidentEdgeSharpness,
    │ │ │ │ +
    166 float const* childEdgesSharpness) const;
    │ │ │ │ +
    167
    │ │ │ │ +
    168 void GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness,
    │ │ │ │ +
    169 int incidentEdgeCount,
    │ │ │ │ +
    170 int sharpEdgePair[2]) const;
    │ │ │ │ +
    171
    │ │ │ │ +
    172 // Would these really help? Maybe only need Rules for the vertex-vertex case...
    │ │ │ │ +
    173 //
    │ │ │ │ +
    174 // Rule DetermineEdgeVertexRule(float parentEdgeSharpness) const;
    │ │ │ │ +
    175 // Rule DetermineEdgeVertexRule(float childEdge1Sharpness, float childEdge2Sharpness) const;
    │ │ │ │ +
    176
    │ │ │ │ +
    177protected:
    │ │ │ │ +
    178 float decrementSharpness(float sharpness) const;
    │ │ │ │ +
    179
    │ │ │ │ +
    180private:
    │ │ │ │ +
    181 Options _options;
    │ │ │ │ +
    182};
    │ │ │ │ +
    │ │ │ │ +
    183
    │ │ │ │ +
    184
    │ │ │ │ +
    185//
    │ │ │ │ +
    186// Inline declarations:
    │ │ │ │ +
    187//
    │ │ │ │ +
    188inline float
    │ │ │ │ +
    │ │ │ │ +
    189Crease::SharpenBoundaryEdge(float /* edgeSharpness */) const {
    │ │ │ │ +
    190
    │ │ │ │ +
    191 //
    │ │ │ │ +
    192 // Despite the presence of the BOUNDARY_NONE option, boundary edges are always sharpened.
    │ │ │ │ +
    193 // Much of the code relies on sharpness to indicate boundaries to avoid the more complex
    │ │ │ │ +
    194 // topological inspection
    │ │ │ │ +
    195 //
    │ │ │ │ +
    196 return SHARPNESS_INFINITE;
    │ │ │ │ +
    197}
    │ │ │ │ +
    │ │ │ │ +
    198
    │ │ │ │ +
    199inline float
    │ │ │ │ +
    │ │ │ │ +
    200Crease::SharpenBoundaryVertex(float vertexSharpness) const {
    │ │ │ │ +
    201
    │ │ │ │ + │ │ │ │ +
    203 SHARPNESS_INFINITE : vertexSharpness;
    │ │ │ │ +
    204}
    │ │ │ │ +
    │ │ │ │ +
    205
    │ │ │ │ +
    206inline float
    │ │ │ │ +
    │ │ │ │ +
    207Crease::decrementSharpness(float sharpness) const {
    │ │ │ │ +
    208
    │ │ │ │ +
    209 if (IsSmooth(sharpness)) return Crease::SHARPNESS_SMOOTH; // redundant but most common
    │ │ │ │ +
    210 if (IsInfinite(sharpness)) return Crease::SHARPNESS_INFINITE;
    │ │ │ │ +
    211 if (sharpness > 1.0f) return (sharpness - 1.0f);
    │ │ │ │ + │ │ │ │ +
    213}
    │ │ │ │ +
    │ │ │ │ +
    214
    │ │ │ │ +
    215inline float
    │ │ │ │ +
    │ │ │ │ +
    216Crease::SubdivideUniformSharpness(float vertexOrEdgeSharpness) const {
    │ │ │ │ +
    217
    │ │ │ │ +
    218 return decrementSharpness(vertexOrEdgeSharpness);
    │ │ │ │ +
    219}
    │ │ │ │ +
    │ │ │ │ +
    220
    │ │ │ │ +
    221inline float
    │ │ │ │ +
    │ │ │ │ +
    222Crease::SubdivideVertexSharpness(float vertexSharpness) const {
    │ │ │ │ +
    223
    │ │ │ │ +
    224 return decrementSharpness(vertexSharpness);
    │ │ │ │ +
    225}
    │ │ │ │ +
    │ │ │ │ +
    226
    │ │ │ │ +
    227inline void
    │ │ │ │ +
    │ │ │ │ +
    228Crease::GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness, int incidentEdgeCount,
    │ │ │ │ +
    229 int sharpEdgePair[2]) const {
    │ │ │ │ +
    230
    │ │ │ │ +
    231 // Only to be called when a crease is present at a vertex -- exactly two sharp
    │ │ │ │ +
    232 // edges are expected here:
    │ │ │ │ +
    233 //
    │ │ │ │ +
    234 sharpEdgePair[0] = 0;
    │ │ │ │ +
    235 while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair[0];
    │ │ │ │ +
    236
    │ │ │ │ +
    237 sharpEdgePair[1] = incidentEdgeCount - 1;
    │ │ │ │ +
    238 while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair[1];
    │ │ │ │ +
    239}
    │ │ │ │ +
    │ │ │ │ +
    240
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    float SharpenBoundaryVertex(float edgeSharpness) const
    Definition crease.h:200
    │ │ │ │ + │ │ │ │ +
    void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int incidentEdgeCount, int sharpEdgePair[2]) const
    Definition crease.h:228
    │ │ │ │ + │ │ │ │ +
    Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness) const
    │ │ │ │ +
    float decrementSharpness(float sharpness) const
    Definition crease.h:207
    │ │ │ │ +
    static bool IsSmooth(float sharpness)
    Definition crease.h:70
    │ │ │ │ +
    Rule DetermineVertexVertexRule(float vertexSharpness, int sharpEdgeCount) const
    │ │ │ │ + │ │ │ │ +
    static bool IsSemiSharp(float sharpness)
    Definition crease.h:73
    │ │ │ │ + │ │ │ │ +
    void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float const *incidentEdgeSharpnessAroundVertex, float *childEdgesSharpnessAroundVertex) const
    │ │ │ │ +
    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
    │ │ │ │ + │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -d3d11PatchTable.h │ │ │ │ │ +crease.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 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,135 +23,289 @@ │ │ │ │ │ 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_OSD_GL_PATCH_TABLE_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_GL_PATCH_TABLE_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; │ │ │ │ │ -39 │ │ │ │ │ -40namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -41namespace OPENSUBDIV_VERSION { │ │ │ │ │ -42 │ │ │ │ │ -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 } │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_CREASE_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_CREASE_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/options.h" │ │ │ │ │ +30 │ │ │ │ │ +31namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +32namespace OPENSUBDIV_VERSION { │ │ │ │ │ +33 │ │ │ │ │ +34namespace Sdc { │ │ │ │ │ +35 │ │ │ │ │ 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; │ │ │ │ │ -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_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}; │ │ │ │ │ -90 │ │ │ │ │ -91 │ │ │ │ │ -92} // end namespace Osd │ │ │ │ │ -93 │ │ │ │ │ -94} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -95using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +_6_2class _C_r_e_a_s_e { │ │ │ │ │ +63public: │ │ │ │ │ +65 │ │ │ │ │ +_6_7 static float const _S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; // = 0.0f, do we really need this? │ │ │ │ │ +_6_8 static float const _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; // = 10.0f; │ │ │ │ │ +69 │ │ │ │ │ +_7_0 static bool _I_s_S_m_o_o_t_h(float sharpness) { return sharpness <= │ │ │ │ │ +_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; } │ │ │ │ │ +_7_1 static bool _I_s_S_h_a_r_p(float sharpness) { return sharpness > _S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; │ │ │ │ │ +} │ │ │ │ │ +_7_2 static bool _I_s_I_n_f_i_n_i_t_e(float sharpness) { return sharpness >= │ │ │ │ │ +_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; } │ │ │ │ │ +_7_3 static bool _I_s_S_e_m_i_S_h_a_r_p(float sharpness) { return (_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H < │ │ │ │ │ +sharpness) && (sharpness < _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E); } │ │ │ │ │ +75 │ │ │ │ │ +_8_2 enum _R_u_l_e { │ │ │ │ │ +_8_3 _R_U_L_E___U_N_K_N_O_W_N = 0, │ │ │ │ │ +_8_4 _R_U_L_E___S_M_O_O_T_H = (1 << 0), │ │ │ │ │ +_8_5 _R_U_L_E___D_A_R_T = (1 << 1), │ │ │ │ │ +_8_6 _R_U_L_E___C_R_E_A_S_E = (1 << 2), │ │ │ │ │ +87 _R_U_L_E___C_O_R_N_E_R = (1 << 3) │ │ │ │ │ +_8_8 }; │ │ │ │ │ +89 │ │ │ │ │ +90public: │ │ │ │ │ +_9_1 _C_r_e_a_s_e() : _options() { } │ │ │ │ │ +_9_2 _C_r_e_a_s_e(_O_p_t_i_o_n_s const& options) : _options(options) { } │ │ │ │ │ +_9_3 _~_C_r_e_a_s_e() { } │ │ │ │ │ +94 │ │ │ │ │ +_9_5 bool _I_s_U_n_i_f_o_r_m() const { return _options._G_e_t_C_r_e_a_s_i_n_g_M_e_t_h_o_d() == _O_p_t_i_o_n_s_:_: │ │ │ │ │ +_C_R_E_A_S_E___U_N_I_F_O_R_M; } │ │ │ │ │ 96 │ │ │ │ │ -97} // end namespace OpenSubdiv │ │ │ │ │ 98 │ │ │ │ │ -99#endif // OPENSUBDIV3_OSD_GL_PATCH_TABLE_H │ │ │ │ │ +104 float _S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e(float edgeSharpness) const; │ │ │ │ │ +105 float _S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x(float edgeSharpness) const; │ │ │ │ │ +106 │ │ │ │ │ +107 // For future consideration │ │ │ │ │ +108 //float SharpenNonManifoldEdge(float edgeSharpness) const; │ │ │ │ │ +109 //float SharpenNonManifoldVertex(float edgeSharpness) const; │ │ │ │ │ +111 │ │ │ │ │ +113 │ │ │ │ │ +124 float _S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s(float vertexOrEdgeSharpness) const; │ │ │ │ │ +125 │ │ │ │ │ +126 float _S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertexSharpness) const; │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 float _S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_A_t_V_e_r_t_e_x(float edgeSharpness, │ │ │ │ │ +129 int incidentEdgeCountAtEndVertex, │ │ │ │ │ +130 float const* edgeSharpnessAroundEndVertex) const; │ │ │ │ │ +131 │ │ │ │ │ +_1_3_2 void _S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_e_s_A_r_o_u_n_d_V_e_r_t_e_x(int incidentEdgeCountAtVertex, │ │ │ │ │ +133 float const* incidentEdgeSharpnessAroundVertex, │ │ │ │ │ +134 float* childEdgesSharpnessAroundVertex) const; │ │ │ │ │ +136 │ │ │ │ │ +138 │ │ │ │ │ +_1_4_4 _R_u_l_e _D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(float vertexSharpness, │ │ │ │ │ +145 int incidentEdgeCount, │ │ │ │ │ +146 float const* incidentEdgeSharpness) const; │ │ │ │ │ +_1_4_7 _R_u_l_e _D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e(float vertexSharpness, │ │ │ │ │ +148 int sharpEdgeCount) const; │ │ │ │ │ +150 │ │ │ │ │ +_1_6_2 float _C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x(float vertexSharpness, │ │ │ │ │ +163 float childVertexSharpness, │ │ │ │ │ +164 int incidentEdgeCount, │ │ │ │ │ +165 float const* incidentEdgeSharpness, │ │ │ │ │ +166 float const* childEdgesSharpness) const; │ │ │ │ │ +167 │ │ │ │ │ +168 void _G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(float const * incidentEdgeSharpness, │ │ │ │ │ +169 int incidentEdgeCount, │ │ │ │ │ +170 int sharpEdgePair[2]) const; │ │ │ │ │ +171 │ │ │ │ │ +172 // Would these really help? Maybe only need Rules for the vertex-vertex │ │ │ │ │ +case... │ │ │ │ │ +173 // │ │ │ │ │ +174 // Rule DetermineEdgeVertexRule(float parentEdgeSharpness) const; │ │ │ │ │ +175 // Rule DetermineEdgeVertexRule(float childEdge1Sharpness, float │ │ │ │ │ +childEdge2Sharpness) const; │ │ │ │ │ +176 │ │ │ │ │ +177protected: │ │ │ │ │ +178 float _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(float sharpness) const; │ │ │ │ │ +179 │ │ │ │ │ +180private: │ │ │ │ │ +181 _O_p_t_i_o_n_s _options; │ │ │ │ │ +182}; │ │ │ │ │ +183 │ │ │ │ │ +184 │ │ │ │ │ +185// │ │ │ │ │ +186// Inline declarations: │ │ │ │ │ +187// │ │ │ │ │ +188inline float │ │ │ │ │ +_1_8_9_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e(float /* edgeSharpness */) const { │ │ │ │ │ +190 │ │ │ │ │ +191 // │ │ │ │ │ +192 // Despite the presence of the BOUNDARY_NONE option, boundary edges are │ │ │ │ │ +always sharpened. │ │ │ │ │ +193 // Much of the code relies on sharpness to indicate boundaries to avoid the │ │ │ │ │ +more complex │ │ │ │ │ +194 // topological inspection │ │ │ │ │ +195 // │ │ │ │ │ +196 return _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; │ │ │ │ │ +197} │ │ │ │ │ +198 │ │ │ │ │ +199inline float │ │ │ │ │ +_2_0_0_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x(float vertexSharpness) const { │ │ │ │ │ +201 │ │ │ │ │ +202 return (_options._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() == _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) ? │ │ │ │ │ +203 _S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E : vertexSharpness; │ │ │ │ │ +204} │ │ │ │ │ +205 │ │ │ │ │ +206inline float │ │ │ │ │ +_2_0_7_C_r_e_a_s_e_:_:_d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(float sharpness) const { │ │ │ │ │ +208 │ │ │ │ │ +209 if (_I_s_S_m_o_o_t_h(sharpness)) return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; // redundant but │ │ │ │ │ +most common │ │ │ │ │ +210 if (_I_s_I_n_f_i_n_i_t_e(sharpness)) return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E; │ │ │ │ │ +211 if (sharpness > 1.0f) return (sharpness - 1.0f); │ │ │ │ │ +212 return _C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H; │ │ │ │ │ +213} │ │ │ │ │ +214 │ │ │ │ │ +215inline float │ │ │ │ │ +_2_1_6_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s(float vertexOrEdgeSharpness) const { │ │ │ │ │ +217 │ │ │ │ │ +218 return _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(vertexOrEdgeSharpness); │ │ │ │ │ +219} │ │ │ │ │ +220 │ │ │ │ │ +221inline float │ │ │ │ │ +_2_2_2_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s(float vertexSharpness) const { │ │ │ │ │ +223 │ │ │ │ │ +224 return _d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s(vertexSharpness); │ │ │ │ │ +225} │ │ │ │ │ +226 │ │ │ │ │ +227inline void │ │ │ │ │ +_2_2_8_C_r_e_a_s_e_:_:_G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e(float const * incidentEdgeSharpness, int │ │ │ │ │ +incidentEdgeCount, │ │ │ │ │ +229 int sharpEdgePair[2]) const { │ │ │ │ │ +230 │ │ │ │ │ +231 // Only to be called when a crease is present at a vertex -- exactly two │ │ │ │ │ +sharp │ │ │ │ │ +232 // edges are expected here: │ │ │ │ │ +233 // │ │ │ │ │ +234 sharpEdgePair[0] = 0; │ │ │ │ │ +235 while (_I_s_S_m_o_o_t_h(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair │ │ │ │ │ +[0]; │ │ │ │ │ +236 │ │ │ │ │ +237 sharpEdgePair[1] = incidentEdgeCount - 1; │ │ │ │ │ +238 while (_I_s_S_m_o_o_t_h(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair │ │ │ │ │ +[1]; │ │ │ │ │ +239} │ │ │ │ │ +240 │ │ │ │ │ +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 */ │ │ │ │ │ _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, │ │ │ │ │ -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_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 │ │ │ │ │ +Types, constants and utilities related to semi-sharp creasing – whose │ │ │ │ │ +implementation is independent o... │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_V_e_r_t_e_x_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float SubdivideVertexSharpness(float vertexSharpness) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_I_n_f_i_n_i_t_e │ │ │ │ │ +static bool IsInfinite(float sharpness) │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_O_R_N_E_R │ │ │ │ │ +@ RULE_CORNER │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___D_A_R_T │ │ │ │ │ +@ RULE_DART │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_R_U_L_E___S_M_O_O_T_H │ │ │ │ │ +@ RULE_SMOOTH │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_C_r_e_a_s_e_:_:_R_U_L_E___U_N_K_N_O_W_N │ │ │ │ │ +@ RULE_UNKNOWN │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_V_e_r_t_e_x │ │ │ │ │ +float SharpenBoundaryVertex(float edgeSharpness) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_2_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___S_M_O_O_T_H │ │ │ │ │ +static float const SHARPNESS_SMOOTH │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_G_e_t_S_h_a_r_p_E_d_g_e_P_a_i_r_O_f_C_r_e_a_s_e │ │ │ │ │ +void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int │ │ │ │ │ +incidentEdgeCount, int sharpEdgePair[2]) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_H_A_R_P_N_E_S_S___I_N_F_I_N_I_T_E │ │ │ │ │ +static float const SHARPNESS_INFINITE │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ +Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, │ │ │ │ │ +float const *incidentEdgeSharpness) 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_:_:_C_r_e_a_s_e_:_:_d_e_c_r_e_m_e_n_t_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float decrementSharpness(float sharpness) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_S_m_o_o_t_h │ │ │ │ │ +static bool IsSmooth(float sharpness) │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_D_e_t_e_r_m_i_n_e_V_e_r_t_e_x_V_e_r_t_e_x_R_u_l_e │ │ │ │ │ +Rule DetermineVertexVertexRule(float vertexSharpness, int sharpEdgeCount) 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_:_:_C_r_e_a_s_e_:_:_I_s_U_n_i_f_o_r_m │ │ │ │ │ +bool IsUniform() const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_I_s_S_e_m_i_S_h_a_r_p │ │ │ │ │ +static bool IsSemiSharp(float sharpness) │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_C_r_e_a_s_e │ │ │ │ │ +Crease(Options const &options) │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_: │ │ │ │ │ +_S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_e_s_A_r_o_u_n_d_V_e_r_t_e_x │ │ │ │ │ +void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float │ │ │ │ │ +const *incidentEdgeSharpnessAroundVertex, float │ │ │ │ │ +*childEdgesSharpnessAroundVertex) 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_:_:_C_r_e_a_s_e_:_:_S_u_b_d_i_v_i_d_e_U_n_i_f_o_r_m_S_h_a_r_p_n_e_s_s │ │ │ │ │ +float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_C_r_e_a_s_e │ │ │ │ │ +Crease() │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_S_h_a_r_p_e_n_B_o_u_n_d_a_r_y_E_d_g_e │ │ │ │ │ +float SharpenBoundaryEdge(float edgeSharpness) const │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_e_._h_:_1_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_:_:_C_r_e_a_s_e_:_:_C_o_m_p_u_t_e_F_r_a_c_t_i_o_n_a_l_W_e_i_g_h_t_A_t_V_e_r_t_e_x │ │ │ │ │ +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,... │ │ │ │ │ +_O_p_e_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_:_:_S_u_b_d_i_v_i_d_e_E_d_g_e_S_h_a_r_p_n_e_s_s_A_t_V_e_r_t_e_x │ │ │ │ │ +float SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int │ │ │ │ │ +incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) 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_:_:_C_r_e_a_s_e_:_:_I_s_S_h_a_r_p │ │ │ │ │ +static bool IsSharp(float sharpness) │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_S_d_c_:_:_C_r_e_a_s_e_:_:_~_C_r_e_a_s_e │ │ │ │ │ +~Crease() │ │ │ │ │ +DDeeffiinniittiioonn _c_r_e_a_s_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_s_d │ │ │ │ │ - * _d_3_d_1_1_P_a_t_c_h_T_a_b_l_e_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _c_r_e_a_s_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00833.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/opencl.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/sdc/catmarkScheme.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -87,24 +87,39 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    opencl.h File Reference
    │ │ │ │ +
    │ │ │ │ +Namespaces
    │ │ │ │ +
    catmarkScheme.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │ -
    #include <CL/opencl.h>
    │ │ │ │ +
    #include "../version.h"
    │ │ │ │ +#include "../sdc/scheme.h"
    │ │ │ │ +#include <cassert>
    │ │ │ │ +#include <cmath>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ +Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Sdc
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,22 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -opencl.h File Reference │ │ │ │ │ -#include │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +catmarkScheme.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_. │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _o_p_e_n_c_l_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _c_a_t_m_a_r_k_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00833_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/opencl.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/sdc/catmarkScheme.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    opencl.h
    │ │ │ │ +
    catmarkScheme.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2014 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,33 +118,566 @@ │ │ │ │
    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_OSD_OPENCL_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_OPENCL_H
    │ │ │ │ -
    27
    │ │ │ │ -
    28#if defined(OPENSUBDIV_HAS_CLEW)
    │ │ │ │ -
    29# include <clew.h>
    │ │ │ │ -
    30#else
    │ │ │ │ -
    31# if defined(__APPLE__)
    │ │ │ │ -
    32# include <OpenCL/opencl.h>
    │ │ │ │ -
    33# else
    │ │ │ │ -
    34# include <CL/opencl.h>
    │ │ │ │ -
    35# endif
    │ │ │ │ -
    36#endif
    │ │ │ │ -
    37
    │ │ │ │ -
    38#endif // OPENSUBDIV3_OSD_CL_UTIL_H
    │ │ │ │ +
    24#ifndef OPENSUBDIV3_SDC_CATMARK_SCHEME_H
    │ │ │ │ +
    25#define OPENSUBDIV3_SDC_CATMARK_SCHEME_H
    │ │ │ │ +
    26
    │ │ │ │ +
    27#include "../version.h"
    │ │ │ │ +
    28
    │ │ │ │ +
    29#include "../sdc/scheme.h"
    │ │ │ │ +
    30
    │ │ │ │ +
    31#include <cassert>
    │ │ │ │ +
    32#include <cmath>
    │ │ │ │ +
    33
    │ │ │ │ +
    34namespace OpenSubdiv {
    │ │ │ │ +
    35namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    36
    │ │ │ │ +
    37namespace Sdc {
    │ │ │ │ +
    38
    │ │ │ │ +
    39//
    │ │ │ │ +
    40// Specializations for Scheme<SCHEME_CATMARK>:
    │ │ │ │ +
    41//
    │ │ │ │ +
    42
    │ │ │ │ +
    43//
    │ │ │ │ +
    44// Catmark traits:
    │ │ │ │ +
    45//
    │ │ │ │ +
    46template <>
    │ │ │ │ + │ │ │ │ +
    48
    │ │ │ │ +
    49template <>
    │ │ │ │ + │ │ │ │ +
    51
    │ │ │ │ +
    52template <>
    │ │ │ │ + │ │ │ │ +
    54
    │ │ │ │ +
    55template <>
    │ │ │ │ + │ │ │ │ +
    57
    │ │ │ │ +
    58
    │ │ │ │ +
    59//
    │ │ │ │ +
    60// Masks for edge-vertices: the hard Crease mask does not need to be specialized
    │ │ │ │ +
    61// (simply the midpoint), so all that is left is the Smooth case:
    │ │ │ │ +
    62//
    │ │ │ │ +
    63// The Smooth mask is complicated by the need to support the "triangle subdivision"
    │ │ │ │ +
    64// option, which applies different weighting in the presence of triangles. It is
    │ │ │ │ +
    65// up for debate as to whether this is useful or not -- we may be able to deprecate
    │ │ │ │ +
    66// this option.
    │ │ │ │ +
    67//
    │ │ │ │ +
    68template <>
    │ │ │ │ +
    69template <typename EDGE, typename MASK>
    │ │ │ │ +
    70inline void
    │ │ │ │ +
    │ │ │ │ +
    71Scheme<SCHEME_CATMARK>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const {
    │ │ │ │ +
    72
    │ │ │ │ +
    73 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    74
    │ │ │ │ +
    75 int faceCount = edge.GetNumFaces();
    │ │ │ │ +
    76
    │ │ │ │ +
    77 mask.SetNumVertexWeights(2);
    │ │ │ │ +
    78 mask.SetNumEdgeWeights(0);
    │ │ │ │ +
    79 mask.SetNumFaceWeights(faceCount);
    │ │ │ │ +
    80 mask.SetFaceWeightsForFaceCenters(true);
    │ │ │ │ +
    81
    │ │ │ │ +
    82 //
    │ │ │ │ +
    83 // Determine if we need to inspect incident faces and apply alternate weighting for
    │ │ │ │ +
    84 // triangles -- and if so, determine which of the two are triangles.
    │ │ │ │ +
    85 //
    │ │ │ │ +
    86 bool face0IsTri = false;
    │ │ │ │ +
    87 bool face1IsTri = false;
    │ │ │ │ +
    88 bool useTriangleOption = (_options.GetTriangleSubdivision() == Options::TRI_SUB_SMOOTH);
    │ │ │ │ +
    89 if (useTriangleOption) {
    │ │ │ │ +
    90 if (faceCount == 2) {
    │ │ │ │ +
    91 //
    │ │ │ │ +
    92 // Ideally we want to avoid this inspection when we have already subdivided at
    │ │ │ │ +
    93 // least once -- need something in the Edge interface to help avoid this, e.g.
    │ │ │ │ +
    94 // an IsRegular() query, the subdivision level...
    │ │ │ │ +
    95 //
    │ │ │ │ +
    96 int vertsPerFace[2];
    │ │ │ │ +
    97 edge.GetNumVerticesPerFace(vertsPerFace);
    │ │ │ │ +
    98
    │ │ │ │ +
    99 face0IsTri = (vertsPerFace[0] == 3);
    │ │ │ │ +
    100 face1IsTri = (vertsPerFace[1] == 3);
    │ │ │ │ +
    101 useTriangleOption = face0IsTri || face1IsTri;
    │ │ │ │ +
    102 } else {
    │ │ │ │ +
    103 useTriangleOption = false;
    │ │ │ │ +
    104 }
    │ │ │ │ +
    105 }
    │ │ │ │ +
    106
    │ │ │ │ +
    107 if (! useTriangleOption) {
    │ │ │ │ +
    108 mask.VertexWeight(0) = 0.25f;
    │ │ │ │ +
    109 mask.VertexWeight(1) = 0.25f;
    │ │ │ │ +
    110
    │ │ │ │ +
    111 if (faceCount == 2) {
    │ │ │ │ +
    112 mask.FaceWeight(0) = 0.25f;
    │ │ │ │ +
    113 mask.FaceWeight(1) = 0.25f;
    │ │ │ │ +
    114 } else {
    │ │ │ │ +
    115 Weight fWeight = 0.5f / (Weight)faceCount;
    │ │ │ │ +
    116 for (int i = 0; i < faceCount; ++i) {
    │ │ │ │ +
    117 mask.FaceWeight(i) = fWeight;
    │ │ │ │ +
    118 }
    │ │ │ │ +
    119 }
    │ │ │ │ +
    120 } else {
    │ │ │ │ +
    121 //
    │ │ │ │ +
    122 // This mimics the implementation in Hbr in terms of order of operations.
    │ │ │ │ +
    123 //
    │ │ │ │ +
    124 const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470;
    │ │ │ │ +
    125
    │ │ │ │ +
    126 Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
    │ │ │ │ +
    127 Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
    │ │ │ │ +
    128
    │ │ │ │ +
    129 Weight fWeight = 0.5f * (f0Weight + f1Weight);
    │ │ │ │ +
    130 Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight);
    │ │ │ │ +
    131
    │ │ │ │ +
    132 mask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    133 mask.VertexWeight(1) = vWeight;
    │ │ │ │ +
    134
    │ │ │ │ +
    135 mask.FaceWeight(0) = fWeight;
    │ │ │ │ +
    136 mask.FaceWeight(1) = fWeight;
    │ │ │ │ +
    137 }
    │ │ │ │ +
    138}
    │ │ │ │ +
    │ │ │ │ +
    139
    │ │ │ │ +
    140
    │ │ │ │ +
    141//
    │ │ │ │ +
    142// Masks for vertex-vertices: the hard Corner mask does not need to be specialized
    │ │ │ │ +
    143// (simply the vertex itself), leaving the Crease and Smooth cases (Dart is smooth):
    │ │ │ │ +
    144//
    │ │ │ │ +
    145template <>
    │ │ │ │ +
    146template <typename VERTEX, typename MASK>
    │ │ │ │ +
    147inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    149 int const creaseEnds[2]) const {
    │ │ │ │ +
    150 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    151
    │ │ │ │ +
    152 int valence = vertex.GetNumEdges();
    │ │ │ │ +
    153
    │ │ │ │ +
    154 mask.SetNumVertexWeights(1);
    │ │ │ │ +
    155 mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    156 mask.SetNumFaceWeights(0);
    │ │ │ │ +
    157 mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    158
    │ │ │ │ +
    159 Weight vWeight = 0.75f;
    │ │ │ │ +
    160 Weight eWeight = 0.125f;
    │ │ │ │ +
    161
    │ │ │ │ +
    162 mask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    163 for (int i = 0; i < valence; ++i) {
    │ │ │ │ +
    164 mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    165 }
    │ │ │ │ +
    166 mask.EdgeWeight(creaseEnds[0]) = eWeight;
    │ │ │ │ +
    167 mask.EdgeWeight(creaseEnds[1]) = eWeight;
    │ │ │ │ +
    168}
    │ │ │ │ +
    │ │ │ │ +
    169
    │ │ │ │ +
    170template <>
    │ │ │ │ +
    171template <typename VERTEX, typename MASK>
    │ │ │ │ +
    172inline void
    │ │ │ │ +
    │ │ │ │ +
    173Scheme<SCHEME_CATMARK>::assignSmoothMaskForVertex(VERTEX const& vertex, MASK& mask) const {
    │ │ │ │ +
    174
    │ │ │ │ +
    175 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    176
    │ │ │ │ +
    177 //
    │ │ │ │ +
    178 // A Smooth vertex must be manifold and interior -- manifold boundary vertices will be
    │ │ │ │ +
    179 // Creases and non-manifold vertices of any kind will be Corners or Creases. If smooth
    │ │ │ │ +
    180 // rules for non-manifold vertices are ever defined, this will need adjusting:
    │ │ │ │ +
    181 //
    │ │ │ │ +
    182 assert(vertex.GetNumFaces() == vertex.GetNumEdges());
    │ │ │ │ +
    183
    │ │ │ │ +
    184 int valence = vertex.GetNumFaces();
    │ │ │ │ +
    185
    │ │ │ │ +
    186 mask.SetNumVertexWeights(1);
    │ │ │ │ +
    187 mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    188 mask.SetNumFaceWeights(valence);
    │ │ │ │ +
    189 mask.SetFaceWeightsForFaceCenters(true);
    │ │ │ │ +
    190
    │ │ │ │ +
    191 Weight vWeight = (Weight)(valence - 2) / (Weight)valence;
    │ │ │ │ +
    192 Weight fWeight = 1.0f / (Weight)(valence * valence);
    │ │ │ │ +
    193 Weight eWeight = fWeight;
    │ │ │ │ +
    194
    │ │ │ │ +
    195 mask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    196 for (int i = 0; i < valence; ++i) {
    │ │ │ │ +
    197 mask.EdgeWeight(i) = eWeight;
    │ │ │ │ +
    198 mask.FaceWeight(i) = fWeight;
    │ │ │ │ +
    199 }
    │ │ │ │ +
    200}
    │ │ │ │ +
    │ │ │ │ +
    201
    │ │ │ │ +
    202//
    │ │ │ │ +
    203// Limit masks for position:
    │ │ │ │ +
    204//
    │ │ │ │ +
    205template <>
    │ │ │ │ +
    206template <typename VERTEX, typename MASK>
    │ │ │ │ +
    207inline void
    │ │ │ │ +
    │ │ │ │ +
    208Scheme<SCHEME_CATMARK>::assignCornerLimitMask(VERTEX const& /* vertex */, MASK& posMask) const {
    │ │ │ │ +
    209
    │ │ │ │ +
    210 posMask.SetNumVertexWeights(1);
    │ │ │ │ +
    211 posMask.SetNumEdgeWeights(0);
    │ │ │ │ +
    212 posMask.SetNumFaceWeights(0);
    │ │ │ │ +
    213 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    214
    │ │ │ │ +
    215 posMask.VertexWeight(0) = 1.0f;
    │ │ │ │ +
    216}
    │ │ │ │ +
    │ │ │ │ +
    217
    │ │ │ │ +
    218template <>
    │ │ │ │ +
    219template <typename VERTEX, typename MASK>
    │ │ │ │ +
    220inline void
    │ │ │ │ +
    │ │ │ │ +
    221Scheme<SCHEME_CATMARK>::assignCreaseLimitMask(VERTEX const& vertex, MASK& posMask,
    │ │ │ │ +
    222 int const creaseEnds[2]) const {
    │ │ │ │ +
    223
    │ │ │ │ +
    224 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    225
    │ │ │ │ +
    226 int valence = vertex.GetNumEdges();
    │ │ │ │ +
    227
    │ │ │ │ +
    228 posMask.SetNumVertexWeights(1);
    │ │ │ │ +
    229 posMask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    230 posMask.SetNumFaceWeights(0);
    │ │ │ │ +
    231 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    232
    │ │ │ │ +
    233 Weight vWeight = (Weight)(2.0 / 3.0);
    │ │ │ │ +
    234 Weight eWeight = (Weight)(1.0 / 6.0);
    │ │ │ │ +
    235
    │ │ │ │ +
    236 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    237 for (int i = 0; i < valence; ++i) {
    │ │ │ │ +
    238 posMask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    239 }
    │ │ │ │ +
    240 posMask.EdgeWeight(creaseEnds[0]) = eWeight;
    │ │ │ │ +
    241 posMask.EdgeWeight(creaseEnds[1]) = eWeight;
    │ │ │ │ +
    242}
    │ │ │ │ +
    │ │ │ │ +
    243
    │ │ │ │ +
    244template <>
    │ │ │ │ +
    245template <typename VERTEX, typename MASK>
    │ │ │ │ +
    246inline void
    │ │ │ │ +
    │ │ │ │ +
    247Scheme<SCHEME_CATMARK>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const {
    │ │ │ │ +
    248
    │ │ │ │ +
    249 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    250
    │ │ │ │ +
    251 int valence = vertex.GetNumFaces();
    │ │ │ │ +
    252 if (valence == 2) {
    │ │ │ │ +
    253 assignCornerLimitMask(vertex, posMask);
    │ │ │ │ +
    254 return;
    │ │ │ │ +
    255 }
    │ │ │ │ +
    256
    │ │ │ │ +
    257 posMask.SetNumVertexWeights(1);
    │ │ │ │ +
    258 posMask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    259 posMask.SetNumFaceWeights(valence);
    │ │ │ │ +
    260 posMask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    261
    │ │ │ │ +
    262 // Specialize for the regular case:
    │ │ │ │ +
    263 if (valence == 4) {
    │ │ │ │ +
    264 Weight fWeight = (Weight)(1.0 / 36.0);
    │ │ │ │ +
    265 Weight eWeight = (Weight)(1.0 / 9.0);
    │ │ │ │ +
    266 Weight vWeight = (Weight)(4.0 / 9.0);
    │ │ │ │ +
    267
    │ │ │ │ +
    268 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    269
    │ │ │ │ +
    270 posMask.EdgeWeight(0) = eWeight;
    │ │ │ │ +
    271 posMask.EdgeWeight(1) = eWeight;
    │ │ │ │ +
    272 posMask.EdgeWeight(2) = eWeight;
    │ │ │ │ +
    273 posMask.EdgeWeight(3) = eWeight;
    │ │ │ │ +
    274
    │ │ │ │ +
    275 posMask.FaceWeight(0) = fWeight;
    │ │ │ │ +
    276 posMask.FaceWeight(1) = fWeight;
    │ │ │ │ +
    277 posMask.FaceWeight(2) = fWeight;
    │ │ │ │ +
    278 posMask.FaceWeight(3) = fWeight;
    │ │ │ │ +
    279 } else {
    │ │ │ │ +
    280 Weight Valence = (Weight) valence;
    │ │ │ │ +
    281
    │ │ │ │ +
    282 Weight fWeight = 1.0f / (Valence * (Valence + 5.0f));
    │ │ │ │ +
    283 Weight eWeight = 4.0f * fWeight;
    │ │ │ │ +
    284 Weight vWeight = 1.0f - Valence * (eWeight + fWeight);
    │ │ │ │ +
    285
    │ │ │ │ +
    286 posMask.VertexWeight(0) = vWeight;
    │ │ │ │ +
    287 for (int i = 0; i < valence; ++i) {
    │ │ │ │ +
    288 posMask.EdgeWeight(i) = eWeight;
    │ │ │ │ +
    289 posMask.FaceWeight(i) = fWeight;
    │ │ │ │ +
    290 }
    │ │ │ │ +
    291 }
    │ │ │ │ +
    292}
    │ │ │ │ +
    │ │ │ │ +
    293
    │ │ │ │ +
    294//
    │ │ │ │ +
    295// Limit masks for tangents -- these are stubs for now, or have a temporary
    │ │ │ │ +
    296// implementation
    │ │ │ │ +
    297//
    │ │ │ │ +
    298template <>
    │ │ │ │ +
    299template <typename VERTEX, typename MASK>
    │ │ │ │ +
    300inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    302 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ +
    303
    │ │ │ │ +
    304 int valence = vertex.GetNumEdges();
    │ │ │ │ +
    305
    │ │ │ │ +
    306 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    307 tan1Mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    308 tan1Mask.SetNumFaceWeights(0);
    │ │ │ │ +
    309 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    310
    │ │ │ │ +
    311 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    312 tan2Mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    313 tan2Mask.SetNumFaceWeights(0);
    │ │ │ │ +
    314 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    315
    │ │ │ │ +
    316 // Should be at least 2 edges -- be sure to clear weights for any more:
    │ │ │ │ +
    317 tan1Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ +
    318 tan1Mask.EdgeWeight(0) = 1.0f;
    │ │ │ │ +
    319 tan1Mask.EdgeWeight(1) = 0.0f;
    │ │ │ │ +
    320
    │ │ │ │ +
    321 tan2Mask.VertexWeight(0) = -1.0f;
    │ │ │ │ +
    322 tan2Mask.EdgeWeight(0) = 0.0f;
    │ │ │ │ +
    323 tan2Mask.EdgeWeight(1) = 1.0f;
    │ │ │ │ +
    324
    │ │ │ │ +
    325 for (int i = 2; i < valence; ++i) {
    │ │ │ │ +
    326 tan1Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    327 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    328 }
    │ │ │ │ +
    329}
    │ │ │ │ +
    │ │ │ │ +
    330
    │ │ │ │ +
    331template <>
    │ │ │ │ +
    332template <typename VERTEX, typename MASK>
    │ │ │ │ +
    333inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    335 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const {
    │ │ │ │ +
    336
    │ │ │ │ +
    337 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    338
    │ │ │ │ +
    339 //
    │ │ │ │ +
    340 // First, the tangent along the crease:
    │ │ │ │ +
    341 // The first crease edge is considered the "leading" edge of the span
    │ │ │ │ +
    342 // of surface for which we are evaluating tangents and the second edge the
    │ │ │ │ +
    343 // "trailing edge". By convention, the tangent along the crease is oriented
    │ │ │ │ +
    344 // in the direction of the leading edge.
    │ │ │ │ +
    345 //
    │ │ │ │ +
    346 int numEdges = vertex.GetNumEdges();
    │ │ │ │ +
    347 int numFaces = vertex.GetNumFaces();
    │ │ │ │ +
    348
    │ │ │ │ +
    349 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    350 tan1Mask.SetNumEdgeWeights(numEdges);
    │ │ │ │ +
    351 tan1Mask.SetNumFaceWeights(numFaces);
    │ │ │ │ +
    352 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    353
    │ │ │ │ +
    354 tan1Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ +
    355 for (int i = 0; i < numEdges; ++i) {
    │ │ │ │ +
    356 tan1Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    357 }
    │ │ │ │ +
    358 for (int i = 0; i < numFaces; ++i) {
    │ │ │ │ +
    359 tan1Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ +
    360 }
    │ │ │ │ +
    361
    │ │ │ │ +
    362 tan1Mask.EdgeWeight(creaseEnds[0]) = 0.5f;
    │ │ │ │ +
    363 tan1Mask.EdgeWeight(creaseEnds[1]) = -0.5f;
    │ │ │ │ +
    364
    │ │ │ │ +
    365 //
    │ │ │ │ +
    366 // Second, the tangent across the interior faces:
    │ │ │ │ +
    367 // Note this is ambiguous for an interior vertex. We currently return
    │ │ │ │ +
    368 // the tangent for the surface in the counter-clockwise span between the
    │ │ │ │ +
    369 // leading and trailing edges that form the crease. Given the expected
    │ │ │ │ +
    370 // computation of a surface normal as Tan1 X Tan2, this tangent should be
    │ │ │ │ +
    371 // oriented "inward" from the crease/boundary -- across the surface rather
    │ │ │ │ +
    372 // than outward and away from it.
    │ │ │ │ +
    373 //
    │ │ │ │ +
    374 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    375 tan2Mask.SetNumEdgeWeights(numEdges);
    │ │ │ │ +
    376 tan2Mask.SetNumFaceWeights(numFaces);
    │ │ │ │ +
    377 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    378
    │ │ │ │ +
    379 // Prepend weights of 0 preceding the crease:
    │ │ │ │ +
    380 for (int i = 0; i < creaseEnds[0]; ++i) {
    │ │ │ │ +
    381 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    382 tan2Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ +
    383 }
    │ │ │ │ +
    384
    │ │ │ │ +
    385 // Assign weights to crease edge and interior points:
    │ │ │ │ +
    386 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1;
    │ │ │ │ +
    387 if (interiorEdgeCount == 1) {
    │ │ │ │ +
    388 // The regular case -- uniform B-spline cross-tangent:
    │ │ │ │ +
    389
    │ │ │ │ +
    390 tan2Mask.VertexWeight(0) = (Weight)(-4.0 / 6.0);
    │ │ │ │ +
    391
    │ │ │ │ +
    392 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight)(-1.0 / 6.0);
    │ │ │ │ +
    393 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = (Weight)( 4.0 / 6.0);
    │ │ │ │ +
    394 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight)(-1.0 / 6.0);
    │ │ │ │ +
    395
    │ │ │ │ +
    396 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight)(1.0 / 6.0);
    │ │ │ │ +
    397 tan2Mask.FaceWeight(creaseEnds[0] + 1) = (Weight)(1.0 / 6.0);
    │ │ │ │ +
    398 } else if (interiorEdgeCount > 1) {
    │ │ │ │ +
    399 // The irregular case -- formulae from Biermann et al:
    │ │ │ │ +
    400
    │ │ │ │ +
    401 double k = (double) (interiorEdgeCount + 1);
    │ │ │ │ +
    402 double theta = M_PI / k;
    │ │ │ │ +
    403
    │ │ │ │ +
    404 double cosTheta = std::cos(theta);
    │ │ │ │ +
    405 double sinTheta = std::sin(theta);
    │ │ │ │ +
    406
    │ │ │ │ +
    407 // Loop/Schaefer use a different divisor here (3*k + cos(theta)):
    │ │ │ │ +
    408 double commonDenom = 1.0f / (k * (3.0f + cosTheta));
    │ │ │ │ +
    409 double R = (cosTheta + 1.0f) / sinTheta;
    │ │ │ │ +
    410
    │ │ │ │ +
    411 double vertexWeight = 4.0f * R * (cosTheta - 1.0f);
    │ │ │ │ +
    412 double creaseWeight = -R * (1.0f + 2.0f * cosTheta);
    │ │ │ │ +
    413
    │ │ │ │ +
    414 tan2Mask.VertexWeight(0) = (Weight) (vertexWeight * commonDenom);
    │ │ │ │ +
    415
    │ │ │ │ +
    416 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight) (creaseWeight * commonDenom);
    │ │ │ │ +
    417 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight) (creaseWeight * commonDenom);
    │ │ │ │ +
    418
    │ │ │ │ +
    419 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight) (sinTheta * commonDenom);
    │ │ │ │ +
    420
    │ │ │ │ +
    421 double sinThetaI = 0.0f;
    │ │ │ │ +
    422 double sinThetaIplus1 = sinTheta;
    │ │ │ │ +
    423 for (int i = 1; i < k; ++i) {
    │ │ │ │ +
    424 sinThetaI = sinThetaIplus1;
    │ │ │ │ +
    425 sinThetaIplus1 = std::sin((i+1)*theta);
    │ │ │ │ +
    426
    │ │ │ │ +
    427 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) ((4.0f * sinThetaI) * commonDenom);
    │ │ │ │ +
    428 tan2Mask.FaceWeight(creaseEnds[0] + i) = (Weight) ((sinThetaI + sinThetaIplus1) * commonDenom);
    │ │ │ │ +
    429 }
    │ │ │ │ +
    430 } else {
    │ │ │ │ +
    431 // Special case for a single face -- simple average of boundary edges:
    │ │ │ │ +
    432
    │ │ │ │ +
    433 tan2Mask.VertexWeight(0) = -6.0f;
    │ │ │ │ +
    434
    │ │ │ │ +
    435 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f;
    │ │ │ │ +
    436 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f;
    │ │ │ │ +
    437
    │ │ │ │ +
    438 tan2Mask.FaceWeight(creaseEnds[0]) = 0.0f;
    │ │ │ │ +
    439 }
    │ │ │ │ +
    440
    │ │ │ │ +
    441 // Append weights of 0 following the crease:
    │ │ │ │ +
    442 for (int i = creaseEnds[1]; i < numFaces; ++i) {
    │ │ │ │ +
    443 tan2Mask.FaceWeight(i) = 0.0f;
    │ │ │ │ +
    444 }
    │ │ │ │ +
    445 for (int i = creaseEnds[1] + 1; i < numEdges; ++i) {
    │ │ │ │ +
    446 tan2Mask.EdgeWeight(i) = 0.0f;
    │ │ │ │ +
    447 }
    │ │ │ │ +
    448}
    │ │ │ │ +
    │ │ │ │ +
    449
    │ │ │ │ +
    450template <>
    │ │ │ │ +
    451template <typename VERTEX, typename MASK>
    │ │ │ │ +
    452inline void
    │ │ │ │ +
    │ │ │ │ + │ │ │ │ +
    454 MASK& tan1Mask, MASK& tan2Mask) const {
    │ │ │ │ +
    455
    │ │ │ │ +
    456 typedef typename MASK::Weight Weight;
    │ │ │ │ +
    457
    │ │ │ │ +
    458 int valence = vertex.GetNumFaces();
    │ │ │ │ +
    459 if (valence == 2) {
    │ │ │ │ +
    460 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
    │ │ │ │ +
    461 return;
    │ │ │ │ +
    462 }
    │ │ │ │ +
    463
    │ │ │ │ +
    464 // Compute tan1 initially -- tan2 is simply a rotation:
    │ │ │ │ +
    465 tan1Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    466 tan1Mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    467 tan1Mask.SetNumFaceWeights(valence);
    │ │ │ │ +
    468 tan1Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    469
    │ │ │ │ +
    470 tan1Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ +
    471
    │ │ │ │ +
    472 if (valence == 4) {
    │ │ │ │ +
    473 tan1Mask.EdgeWeight(0) = 4.0f;
    │ │ │ │ +
    474 tan1Mask.EdgeWeight(1) = 0.0f;
    │ │ │ │ +
    475 tan1Mask.EdgeWeight(2) = -4.0f;
    │ │ │ │ +
    476 tan1Mask.EdgeWeight(3) = 0.0f;
    │ │ │ │ +
    477
    │ │ │ │ +
    478 tan1Mask.FaceWeight(0) = 1.0f;
    │ │ │ │ +
    479 tan1Mask.FaceWeight(1) = -1.0f;
    │ │ │ │ +
    480 tan1Mask.FaceWeight(2) = -1.0f;
    │ │ │ │ +
    481 tan1Mask.FaceWeight(3) = 1.0f;
    │ │ │ │ +
    482 } else {
    │ │ │ │ +
    483 double theta = 2.0f * M_PI / (double)valence;
    │ │ │ │ +
    484
    │ │ │ │ +
    485 double cosTheta = std::cos(theta);
    │ │ │ │ +
    486 double cosHalfTheta = std::cos(theta * 0.5f);
    │ │ │ │ +
    487
    │ │ │ │ +
    488 double lambda = (5.0 / 16.0) + (1.0 / 16.0) *
    │ │ │ │ +
    489 (cosTheta + cosHalfTheta * std::sqrt(2.0f * (9.0f + cosTheta)));
    │ │ │ │ +
    490
    │ │ │ │ +
    491 double edgeWeightScale = 4.0f;
    │ │ │ │ +
    492 double faceWeightScale = 1.0f / (4.0f * lambda - 1.0f);
    │ │ │ │ +
    493
    │ │ │ │ +
    494 for (int i = 0; i < valence; ++i) {
    │ │ │ │ +
    495 double cosThetaI = std::cos( i * theta);
    │ │ │ │ +
    496 double cosThetaIplus1 = std::cos((i+1)* theta);
    │ │ │ │ +
    497
    │ │ │ │ +
    498 tan1Mask.EdgeWeight(i) = (Weight) (edgeWeightScale * cosThetaI);
    │ │ │ │ +
    499 tan1Mask.FaceWeight(i) = (Weight) (faceWeightScale * (cosThetaI + cosThetaIplus1));
    │ │ │ │ +
    500 }
    │ │ │ │ +
    501 }
    │ │ │ │ +
    502
    │ │ │ │ +
    503 // Now rotate/copy tan1 weights to tan2:
    │ │ │ │ +
    504 tan2Mask.SetNumVertexWeights(1);
    │ │ │ │ +
    505 tan2Mask.SetNumEdgeWeights(valence);
    │ │ │ │ +
    506 tan2Mask.SetNumFaceWeights(valence);
    │ │ │ │ +
    507 tan2Mask.SetFaceWeightsForFaceCenters(false);
    │ │ │ │ +
    508
    │ │ │ │ +
    509 tan2Mask.VertexWeight(0) = 0.0f;
    │ │ │ │ +
    510 if (valence == 4) {
    │ │ │ │ +
    511 tan2Mask.EdgeWeight(0) = 0.0f;
    │ │ │ │ +
    512 tan2Mask.EdgeWeight(1) = 4.0f;
    │ │ │ │ +
    513 tan2Mask.EdgeWeight(2) = 0.0f;
    │ │ │ │ +
    514 tan2Mask.EdgeWeight(3) = -4.0f;
    │ │ │ │ +
    515
    │ │ │ │ +
    516 tan2Mask.FaceWeight(0) = 1.0f;
    │ │ │ │ +
    517 tan2Mask.FaceWeight(1) = 1.0f;
    │ │ │ │ +
    518 tan2Mask.FaceWeight(2) = -1.0f;
    │ │ │ │ +
    519 tan2Mask.FaceWeight(3) = -1.0f;
    │ │ │ │ +
    520 } else {
    │ │ │ │ +
    521 tan2Mask.EdgeWeight(0) = tan1Mask.EdgeWeight(valence-1);
    │ │ │ │ +
    522 tan2Mask.FaceWeight(0) = tan1Mask.FaceWeight(valence-1);
    │ │ │ │ +
    523 for (int i = 1; i < valence; ++i) {
    │ │ │ │ +
    524 tan2Mask.EdgeWeight(i) = tan1Mask.EdgeWeight(i-1);
    │ │ │ │ +
    525 tan2Mask.FaceWeight(i) = tan1Mask.FaceWeight(i-1);
    │ │ │ │ +
    526 }
    │ │ │ │ +
    527 }
    │ │ │ │ +
    528}
    │ │ │ │ +
    │ │ │ │ +
    529
    │ │ │ │ +
    530} // end namespace sdc
    │ │ │ │ +
    531
    │ │ │ │ +
    532} // end namespace OPENSUBDIV_VERSION
    │ │ │ │ +
    533using namespace OPENSUBDIV_VERSION;
    │ │ │ │ +
    534} // end namespace OpenSubdiv
    │ │ │ │ +
    535
    │ │ │ │ +
    536#endif /* OPENSUBDIV3_SDC_CATMARK_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
    │ │ │ │ +
    @ TRI_SUB_SMOOTH
    "smooth triangle" weights (Catmark scheme only)
    Definition options.h:74
    │ │ │ │ +
    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 assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
    │ │ │ │ + │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -opencl.h │ │ │ │ │ +catmarkScheme.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 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,26 +23,592 @@ │ │ │ │ │ 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_OSD_OPENCL_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_OPENCL_H │ │ │ │ │ -27 │ │ │ │ │ -28#if defined(OPENSUBDIV_HAS_CLEW) │ │ │ │ │ -29# include │ │ │ │ │ -30#else │ │ │ │ │ -31# if defined(__APPLE__) │ │ │ │ │ -32# include │ │ │ │ │ -33# else │ │ │ │ │ -34# include │ │ │ │ │ -35# endif │ │ │ │ │ -36#endif │ │ │ │ │ -37 │ │ │ │ │ -38#endif // OPENSUBDIV3_OSD_CL_UTIL_H │ │ │ │ │ +24#ifndef OPENSUBDIV3_SDC_CATMARK_SCHEME_H │ │ │ │ │ +25#define OPENSUBDIV3_SDC_CATMARK_SCHEME_H │ │ │ │ │ +26 │ │ │ │ │ +27#include "../version.h" │ │ │ │ │ +28 │ │ │ │ │ +29#include "../sdc/scheme.h" │ │ │ │ │ +30 │ │ │ │ │ +31#include │ │ │ │ │ +32#include │ │ │ │ │ +33 │ │ │ │ │ +34namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ +35namespace OPENSUBDIV_VERSION { │ │ │ │ │ +36 │ │ │ │ │ +37namespace Sdc { │ │ │ │ │ +38 │ │ │ │ │ +39// │ │ │ │ │ +40// Specializations for Scheme: │ │ │ │ │ +41// │ │ │ │ │ +42 │ │ │ │ │ +43// │ │ │ │ │ +44// Catmark traits: │ │ │ │ │ +45// │ │ │ │ │ +46template <> │ │ │ │ │ +_4_7inline _S_p_l_i_t _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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___Q_U_A_D_S; } │ │ │ │ │ +48 │ │ │ │ │ +49template <> │ │ │ │ │ +_5_0inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_G_e_t_R_e_g_u_l_a_r_F_a_c_e_S_i_z_e() { return 4; } │ │ │ │ │ +51 │ │ │ │ │ +52template <> │ │ │ │ │ +_5_3inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_G_e_t_R_e_g_u_l_a_r_V_e_r_t_e_x_V_a_l_e_n_c_e() { return 4; } │ │ │ │ │ +54 │ │ │ │ │ +55template <> │ │ │ │ │ +_5_6inline int _S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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; } │ │ │ │ │ +57 │ │ │ │ │ +58 │ │ │ │ │ +59// │ │ │ │ │ +60// Masks for edge-vertices: the hard Crease mask does not need to be │ │ │ │ │ +specialized │ │ │ │ │ +61// (simply the midpoint), so all that is left is the Smooth case: │ │ │ │ │ +62// │ │ │ │ │ +63// The Smooth mask is complicated by the need to support the "triangle │ │ │ │ │ +subdivision" │ │ │ │ │ +64// option, which applies different weighting in the presence of triangles. It │ │ │ │ │ +is │ │ │ │ │ +65// up for debate as to whether this is useful or not -- we may be able to │ │ │ │ │ +deprecate │ │ │ │ │ +66// this option. │ │ │ │ │ +67// │ │ │ │ │ +68template <> │ │ │ │ │ +69template │ │ │ │ │ +70inline void │ │ │ │ │ +_7_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ +72 │ │ │ │ │ +73 typedef typename MASK::Weight Weight; │ │ │ │ │ +74 │ │ │ │ │ +75 int faceCount = edge.GetNumFaces(); │ │ │ │ │ +76 │ │ │ │ │ +77 mask.SetNumVertexWeights(2); │ │ │ │ │ +78 mask.SetNumEdgeWeights(0); │ │ │ │ │ +79 mask.SetNumFaceWeights(faceCount); │ │ │ │ │ +80 mask.SetFaceWeightsForFaceCenters(true); │ │ │ │ │ +81 │ │ │ │ │ +82 // │ │ │ │ │ +83 // Determine if we need to inspect incident faces and apply alternate │ │ │ │ │ +weighting for │ │ │ │ │ +84 // triangles -- and if so, determine which of the two are triangles. │ │ │ │ │ +85 // │ │ │ │ │ +86 bool face0IsTri = false; │ │ │ │ │ +87 bool face1IsTri = false; │ │ │ │ │ +88 bool useTriangleOption = (_options.GetTriangleSubdivision() == _O_p_t_i_o_n_s_:_: │ │ │ │ │ +_T_R_I___S_U_B___S_M_O_O_T_H); │ │ │ │ │ +89 if (useTriangleOption) { │ │ │ │ │ +90 if (faceCount == 2) { │ │ │ │ │ +91 // │ │ │ │ │ +92 // Ideally we want to avoid this inspection when we have already subdivided │ │ │ │ │ +at │ │ │ │ │ +93 // least once -- need something in the Edge interface to help avoid this, │ │ │ │ │ +e.g. │ │ │ │ │ +94 // an IsRegular() query, the subdivision level... │ │ │ │ │ +95 // │ │ │ │ │ +96 int vertsPerFace[2]; │ │ │ │ │ +97 edge.GetNumVerticesPerFace(vertsPerFace); │ │ │ │ │ +98 │ │ │ │ │ +99 face0IsTri = (vertsPerFace[0] == 3); │ │ │ │ │ +100 face1IsTri = (vertsPerFace[1] == 3); │ │ │ │ │ +101 useTriangleOption = face0IsTri || face1IsTri; │ │ │ │ │ +102 } else { │ │ │ │ │ +103 useTriangleOption = false; │ │ │ │ │ +104 } │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +107 if (! useTriangleOption) { │ │ │ │ │ +108 mask.VertexWeight(0) = 0.25f; │ │ │ │ │ +109 mask.VertexWeight(1) = 0.25f; │ │ │ │ │ +110 │ │ │ │ │ +111 if (faceCount == 2) { │ │ │ │ │ +112 mask.FaceWeight(0) = 0.25f; │ │ │ │ │ +113 mask.FaceWeight(1) = 0.25f; │ │ │ │ │ +114 } else { │ │ │ │ │ +115 Weight fWeight = 0.5f / (Weight)faceCount; │ │ │ │ │ +116 for (int i = 0; i < faceCount; ++i) { │ │ │ │ │ +117 mask.FaceWeight(i) = fWeight; │ │ │ │ │ +118 } │ │ │ │ │ +119 } │ │ │ │ │ +120 } else { │ │ │ │ │ +121 // │ │ │ │ │ +122 // This mimics the implementation in Hbr in terms of order of operations. │ │ │ │ │ +123 // │ │ │ │ │ +124 const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470; │ │ │ │ │ +125 │ │ │ │ │ +126 Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f; │ │ │ │ │ +127 Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f; │ │ │ │ │ +128 │ │ │ │ │ +129 Weight fWeight = 0.5f * (f0Weight + f1Weight); │ │ │ │ │ +130 Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight); │ │ │ │ │ +131 │ │ │ │ │ +132 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +133 mask.VertexWeight(1) = vWeight; │ │ │ │ │ +134 │ │ │ │ │ +135 mask.FaceWeight(0) = fWeight; │ │ │ │ │ +136 mask.FaceWeight(1) = fWeight; │ │ │ │ │ +137 } │ │ │ │ │ +138} │ │ │ │ │ +139 │ │ │ │ │ +140 │ │ │ │ │ +141// │ │ │ │ │ +142// Masks for vertex-vertices: the hard Corner mask does not need to be │ │ │ │ │ +specialized │ │ │ │ │ +143// (simply the vertex itself), leaving the Crease and Smooth cases (Dart is │ │ │ │ │ +smooth): │ │ │ │ │ +144// │ │ │ │ │ +145template <> │ │ │ │ │ +146template │ │ │ │ │ +147inline void │ │ │ │ │ +_1_4_8_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ +149 int const creaseEnds[2]) const { │ │ │ │ │ +150 typedef typename MASK::Weight Weight; │ │ │ │ │ +151 │ │ │ │ │ +152 int valence = vertex.GetNumEdges(); │ │ │ │ │ +153 │ │ │ │ │ +154 mask.SetNumVertexWeights(1); │ │ │ │ │ +155 mask.SetNumEdgeWeights(valence); │ │ │ │ │ +156 mask.SetNumFaceWeights(0); │ │ │ │ │ +157 mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +158 │ │ │ │ │ +159 Weight vWeight = 0.75f; │ │ │ │ │ +160 Weight eWeight = 0.125f; │ │ │ │ │ +161 │ │ │ │ │ +162 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +163 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +164 mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +165 } │ │ │ │ │ +166 mask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ +167 mask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ +168} │ │ │ │ │ +169 │ │ │ │ │ +170template <> │ │ │ │ │ +171template │ │ │ │ │ +172inline void │ │ │ │ │ +_1_7_3_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ +174 │ │ │ │ │ +175 typedef typename MASK::Weight Weight; │ │ │ │ │ +176 │ │ │ │ │ +177 // │ │ │ │ │ +178 // A Smooth vertex must be manifold and interior -- manifold boundary │ │ │ │ │ +vertices will be │ │ │ │ │ +179 // Creases and non-manifold vertices of any kind will be Corners or │ │ │ │ │ +Creases. If smooth │ │ │ │ │ +180 // rules for non-manifold vertices are ever defined, this will need │ │ │ │ │ +adjusting: │ │ │ │ │ +181 // │ │ │ │ │ +182 assert(vertex.GetNumFaces() == vertex.GetNumEdges()); │ │ │ │ │ +183 │ │ │ │ │ +184 int valence = vertex.GetNumFaces(); │ │ │ │ │ +185 │ │ │ │ │ +186 mask.SetNumVertexWeights(1); │ │ │ │ │ +187 mask.SetNumEdgeWeights(valence); │ │ │ │ │ +188 mask.SetNumFaceWeights(valence); │ │ │ │ │ +189 mask.SetFaceWeightsForFaceCenters(true); │ │ │ │ │ +190 │ │ │ │ │ +191 Weight vWeight = (Weight)(valence - 2) / (Weight)valence; │ │ │ │ │ +192 Weight fWeight = 1.0f / (Weight)(valence * valence); │ │ │ │ │ +193 Weight eWeight = fWeight; │ │ │ │ │ +194 │ │ │ │ │ +195 mask.VertexWeight(0) = vWeight; │ │ │ │ │ +196 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +197 mask.EdgeWeight(i) = eWeight; │ │ │ │ │ +198 mask.FaceWeight(i) = fWeight; │ │ │ │ │ +199 } │ │ │ │ │ +200} │ │ │ │ │ +201 │ │ │ │ │ +202// │ │ │ │ │ +203// Limit masks for position: │ │ │ │ │ +204// │ │ │ │ │ +205template <> │ │ │ │ │ +206template │ │ │ │ │ +207inline void │ │ │ │ │ +_2_0_8_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ +209 │ │ │ │ │ +210 posMask.SetNumVertexWeights(1); │ │ │ │ │ +211 posMask.SetNumEdgeWeights(0); │ │ │ │ │ +212 posMask.SetNumFaceWeights(0); │ │ │ │ │ +213 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +214 │ │ │ │ │ +215 posMask.VertexWeight(0) = 1.0f; │ │ │ │ │ +216} │ │ │ │ │ +217 │ │ │ │ │ +218template <> │ │ │ │ │ +219template │ │ │ │ │ +220inline void │ │ │ │ │ +_2_2_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ +222 int const creaseEnds[2]) const { │ │ │ │ │ +223 │ │ │ │ │ +224 typedef typename MASK::Weight Weight; │ │ │ │ │ +225 │ │ │ │ │ +226 int valence = vertex.GetNumEdges(); │ │ │ │ │ +227 │ │ │ │ │ +228 posMask.SetNumVertexWeights(1); │ │ │ │ │ +229 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ +230 posMask.SetNumFaceWeights(0); │ │ │ │ │ +231 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +232 │ │ │ │ │ +233 Weight vWeight = (Weight)(2.0 / 3.0); │ │ │ │ │ +234 Weight eWeight = (Weight)(1.0 / 6.0); │ │ │ │ │ +235 │ │ │ │ │ +236 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +237 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +238 posMask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +239 } │ │ │ │ │ +240 posMask.EdgeWeight(creaseEnds[0]) = eWeight; │ │ │ │ │ +241 posMask.EdgeWeight(creaseEnds[1]) = eWeight; │ │ │ │ │ +242} │ │ │ │ │ +243 │ │ │ │ │ +244template <> │ │ │ │ │ +245template │ │ │ │ │ +246inline void │ │ │ │ │ +_2_4_7_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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 { │ │ │ │ │ +248 │ │ │ │ │ +249 typedef typename MASK::Weight Weight; │ │ │ │ │ +250 │ │ │ │ │ +251 int valence = vertex.GetNumFaces(); │ │ │ │ │ +252 if (valence == 2) { │ │ │ │ │ +253 assignCornerLimitMask(vertex, posMask); │ │ │ │ │ +254 return; │ │ │ │ │ +255 } │ │ │ │ │ +256 │ │ │ │ │ +257 posMask.SetNumVertexWeights(1); │ │ │ │ │ +258 posMask.SetNumEdgeWeights(valence); │ │ │ │ │ +259 posMask.SetNumFaceWeights(valence); │ │ │ │ │ +260 posMask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +261 │ │ │ │ │ +262 // Specialize for the regular case: │ │ │ │ │ +263 if (valence == 4) { │ │ │ │ │ +264 Weight fWeight = (Weight)(1.0 / 36.0); │ │ │ │ │ +265 Weight eWeight = (Weight)(1.0 / 9.0); │ │ │ │ │ +266 Weight vWeight = (Weight)(4.0 / 9.0); │ │ │ │ │ +267 │ │ │ │ │ +268 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +269 │ │ │ │ │ +270 posMask.EdgeWeight(0) = eWeight; │ │ │ │ │ +271 posMask.EdgeWeight(1) = eWeight; │ │ │ │ │ +272 posMask.EdgeWeight(2) = eWeight; │ │ │ │ │ +273 posMask.EdgeWeight(3) = eWeight; │ │ │ │ │ +274 │ │ │ │ │ +275 posMask.FaceWeight(0) = fWeight; │ │ │ │ │ +276 posMask.FaceWeight(1) = fWeight; │ │ │ │ │ +277 posMask.FaceWeight(2) = fWeight; │ │ │ │ │ +278 posMask.FaceWeight(3) = fWeight; │ │ │ │ │ +279 } else { │ │ │ │ │ +280 Weight Valence = (Weight) valence; │ │ │ │ │ +281 │ │ │ │ │ +282 Weight fWeight = 1.0f / (Valence * (Valence + 5.0f)); │ │ │ │ │ +283 Weight eWeight = 4.0f * fWeight; │ │ │ │ │ +284 Weight vWeight = 1.0f - Valence * (eWeight + fWeight); │ │ │ │ │ +285 │ │ │ │ │ +286 posMask.VertexWeight(0) = vWeight; │ │ │ │ │ +287 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +288 posMask.EdgeWeight(i) = eWeight; │ │ │ │ │ +289 posMask.FaceWeight(i) = fWeight; │ │ │ │ │ +290 } │ │ │ │ │ +291 } │ │ │ │ │ +292} │ │ │ │ │ +293 │ │ │ │ │ +294// │ │ │ │ │ +295// Limit masks for tangents -- these are stubs for now, or have a temporary │ │ │ │ │ +296// implementation │ │ │ │ │ +297// │ │ │ │ │ +298template <> │ │ │ │ │ +299template │ │ │ │ │ +300inline void │ │ │ │ │ +_3_0_1_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ +302 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +303 │ │ │ │ │ +304 int valence = vertex.GetNumEdges(); │ │ │ │ │ +305 │ │ │ │ │ +306 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +307 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +308 tan1Mask.SetNumFaceWeights(0); │ │ │ │ │ +309 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +310 │ │ │ │ │ +311 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +312 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +313 tan2Mask.SetNumFaceWeights(0); │ │ │ │ │ +314 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +315 │ │ │ │ │ +316 // Should be at least 2 edges -- be sure to clear weights for any more: │ │ │ │ │ +317 tan1Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ +318 tan1Mask.EdgeWeight(0) = 1.0f; │ │ │ │ │ +319 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ +320 │ │ │ │ │ +321 tan2Mask.VertexWeight(0) = -1.0f; │ │ │ │ │ +322 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ +323 tan2Mask.EdgeWeight(1) = 1.0f; │ │ │ │ │ +324 │ │ │ │ │ +325 for (int i = 2; i < valence; ++i) { │ │ │ │ │ +326 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +327 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +328 } │ │ │ │ │ +329} │ │ │ │ │ +330 │ │ │ │ │ +331template <> │ │ │ │ │ +332template │ │ │ │ │ +333inline void │ │ │ │ │ +_3_3_4_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ +335 MASK& tan1Mask, MASK& tan2Mask, int const creaseEnds[2]) const { │ │ │ │ │ +336 │ │ │ │ │ +337 typedef typename MASK::Weight Weight; │ │ │ │ │ +338 │ │ │ │ │ +339 // │ │ │ │ │ +340 // First, the tangent along the crease: │ │ │ │ │ +341 // The first crease edge is considered the "leading" edge of the span │ │ │ │ │ +342 // of surface for which we are evaluating tangents and the second edge the │ │ │ │ │ +343 // "trailing edge". By convention, the tangent along the crease is oriented │ │ │ │ │ +344 // in the direction of the leading edge. │ │ │ │ │ +345 // │ │ │ │ │ +346 int numEdges = vertex.GetNumEdges(); │ │ │ │ │ +347 int numFaces = vertex.GetNumFaces(); │ │ │ │ │ +348 │ │ │ │ │ +349 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +350 tan1Mask.SetNumEdgeWeights(numEdges); │ │ │ │ │ +351 tan1Mask.SetNumFaceWeights(numFaces); │ │ │ │ │ +352 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +353 │ │ │ │ │ +354 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +355 for (int i = 0; i < numEdges; ++i) { │ │ │ │ │ +356 tan1Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +357 } │ │ │ │ │ +358 for (int i = 0; i < numFaces; ++i) { │ │ │ │ │ +359 tan1Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ +360 } │ │ │ │ │ +361 │ │ │ │ │ +362 tan1Mask.EdgeWeight(creaseEnds[0]) = 0.5f; │ │ │ │ │ +363 tan1Mask.EdgeWeight(creaseEnds[1]) = -0.5f; │ │ │ │ │ +364 │ │ │ │ │ +365 // │ │ │ │ │ +366 // Second, the tangent across the interior faces: │ │ │ │ │ +367 // Note this is ambiguous for an interior vertex. We currently return │ │ │ │ │ +368 // the tangent for the surface in the counter-clockwise span between the │ │ │ │ │ +369 // leading and trailing edges that form the crease. Given the expected │ │ │ │ │ +370 // computation of a surface normal as Tan1 X Tan2, this tangent should be │ │ │ │ │ +371 // oriented "inward" from the crease/boundary -- across the surface rather │ │ │ │ │ +372 // than outward and away from it. │ │ │ │ │ +373 // │ │ │ │ │ +374 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +375 tan2Mask.SetNumEdgeWeights(numEdges); │ │ │ │ │ +376 tan2Mask.SetNumFaceWeights(numFaces); │ │ │ │ │ +377 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +378 │ │ │ │ │ +379 // Prepend weights of 0 preceding the crease: │ │ │ │ │ +380 for (int i = 0; i < creaseEnds[0]; ++i) { │ │ │ │ │ +381 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +382 tan2Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ +383 } │ │ │ │ │ +384 │ │ │ │ │ +385 // Assign weights to crease edge and interior points: │ │ │ │ │ +386 int interiorEdgeCount = creaseEnds[1] - creaseEnds[0] - 1; │ │ │ │ │ +387 if (interiorEdgeCount == 1) { │ │ │ │ │ +388 // The regular case -- uniform B-spline cross-tangent: │ │ │ │ │ +389 │ │ │ │ │ +390 tan2Mask.VertexWeight(0) = (Weight)(-4.0 / 6.0); │ │ │ │ │ +391 │ │ │ │ │ +392 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight)(-1.0 / 6.0); │ │ │ │ │ +393 tan2Mask.EdgeWeight(creaseEnds[0] + 1) = (Weight)( 4.0 / 6.0); │ │ │ │ │ +394 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight)(-1.0 / 6.0); │ │ │ │ │ +395 │ │ │ │ │ +396 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight)(1.0 / 6.0); │ │ │ │ │ +397 tan2Mask.FaceWeight(creaseEnds[0] + 1) = (Weight)(1.0 / 6.0); │ │ │ │ │ +398 } else if (interiorEdgeCount > 1) { │ │ │ │ │ +399 // The irregular case -- formulae from Biermann et al: │ │ │ │ │ +400 │ │ │ │ │ +401 double k = (double) (interiorEdgeCount + 1); │ │ │ │ │ +402 double theta = M_PI / k; │ │ │ │ │ +403 │ │ │ │ │ +404 double cosTheta = std::cos(theta); │ │ │ │ │ +405 double sinTheta = std::sin(theta); │ │ │ │ │ +406 │ │ │ │ │ +407 // Loop/Schaefer use a different divisor here (3*k + cos(theta)): │ │ │ │ │ +408 double commonDenom = 1.0f / (k * (3.0f + cosTheta)); │ │ │ │ │ +409 double R = (cosTheta + 1.0f) / sinTheta; │ │ │ │ │ +410 │ │ │ │ │ +411 double vertexWeight = 4.0f * R * (cosTheta - 1.0f); │ │ │ │ │ +412 double creaseWeight = -R * (1.0f + 2.0f * cosTheta); │ │ │ │ │ +413 │ │ │ │ │ +414 tan2Mask.VertexWeight(0) = (Weight) (vertexWeight * commonDenom); │ │ │ │ │ +415 │ │ │ │ │ +416 tan2Mask.EdgeWeight(creaseEnds[0]) = (Weight) (creaseWeight * commonDenom); │ │ │ │ │ +417 tan2Mask.EdgeWeight(creaseEnds[1]) = (Weight) (creaseWeight * commonDenom); │ │ │ │ │ +418 │ │ │ │ │ +419 tan2Mask.FaceWeight(creaseEnds[0]) = (Weight) (sinTheta * commonDenom); │ │ │ │ │ +420 │ │ │ │ │ +421 double sinThetaI = 0.0f; │ │ │ │ │ +422 double sinThetaIplus1 = sinTheta; │ │ │ │ │ +423 for (int i = 1; i < k; ++i) { │ │ │ │ │ +424 sinThetaI = sinThetaIplus1; │ │ │ │ │ +425 sinThetaIplus1 = std::sin((i+1)*theta); │ │ │ │ │ +426 │ │ │ │ │ +427 tan2Mask.EdgeWeight(creaseEnds[0] + i) = (Weight) ((4.0f * sinThetaI) * │ │ │ │ │ +commonDenom); │ │ │ │ │ +428 tan2Mask.FaceWeight(creaseEnds[0] + i) = (Weight) ((sinThetaI + │ │ │ │ │ +sinThetaIplus1) * commonDenom); │ │ │ │ │ +429 } │ │ │ │ │ +430 } else { │ │ │ │ │ +431 // Special case for a single face -- simple average of boundary edges: │ │ │ │ │ +432 │ │ │ │ │ +433 tan2Mask.VertexWeight(0) = -6.0f; │ │ │ │ │ +434 │ │ │ │ │ +435 tan2Mask.EdgeWeight(creaseEnds[0]) = 3.0f; │ │ │ │ │ +436 tan2Mask.EdgeWeight(creaseEnds[1]) = 3.0f; │ │ │ │ │ +437 │ │ │ │ │ +438 tan2Mask.FaceWeight(creaseEnds[0]) = 0.0f; │ │ │ │ │ +439 } │ │ │ │ │ +440 │ │ │ │ │ +441 // Append weights of 0 following the crease: │ │ │ │ │ +442 for (int i = creaseEnds[1]; i < numFaces; ++i) { │ │ │ │ │ +443 tan2Mask.FaceWeight(i) = 0.0f; │ │ │ │ │ +444 } │ │ │ │ │ +445 for (int i = creaseEnds[1] + 1; i < numEdges; ++i) { │ │ │ │ │ +446 tan2Mask.EdgeWeight(i) = 0.0f; │ │ │ │ │ +447 } │ │ │ │ │ +448} │ │ │ │ │ +449 │ │ │ │ │ +450template <> │ │ │ │ │ +451template │ │ │ │ │ +452inline void │ │ │ │ │ +_4_5_3_S_c_h_e_m_e_<_S_C_H_E_M_E___C_A_T_M_A_R_K_>_:_:_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, │ │ │ │ │ +454 MASK& tan1Mask, MASK& tan2Mask) const { │ │ │ │ │ +455 │ │ │ │ │ +456 typedef typename MASK::Weight Weight; │ │ │ │ │ +457 │ │ │ │ │ +458 int valence = vertex.GetNumFaces(); │ │ │ │ │ +459 if (valence == 2) { │ │ │ │ │ +460 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask); │ │ │ │ │ +461 return; │ │ │ │ │ +462 } │ │ │ │ │ +463 │ │ │ │ │ +464 // Compute tan1 initially -- tan2 is simply a rotation: │ │ │ │ │ +465 tan1Mask.SetNumVertexWeights(1); │ │ │ │ │ +466 tan1Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +467 tan1Mask.SetNumFaceWeights(valence); │ │ │ │ │ +468 tan1Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +469 │ │ │ │ │ +470 tan1Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +471 │ │ │ │ │ +472 if (valence == 4) { │ │ │ │ │ +473 tan1Mask.EdgeWeight(0) = 4.0f; │ │ │ │ │ +474 tan1Mask.EdgeWeight(1) = 0.0f; │ │ │ │ │ +475 tan1Mask.EdgeWeight(2) = -4.0f; │ │ │ │ │ +476 tan1Mask.EdgeWeight(3) = 0.0f; │ │ │ │ │ +477 │ │ │ │ │ +478 tan1Mask.FaceWeight(0) = 1.0f; │ │ │ │ │ +479 tan1Mask.FaceWeight(1) = -1.0f; │ │ │ │ │ +480 tan1Mask.FaceWeight(2) = -1.0f; │ │ │ │ │ +481 tan1Mask.FaceWeight(3) = 1.0f; │ │ │ │ │ +482 } else { │ │ │ │ │ +483 double theta = 2.0f * M_PI / (double)valence; │ │ │ │ │ +484 │ │ │ │ │ +485 double cosTheta = std::cos(theta); │ │ │ │ │ +486 double cosHalfTheta = std::cos(theta * 0.5f); │ │ │ │ │ +487 │ │ │ │ │ +488 double lambda = (5.0 / 16.0) + (1.0 / 16.0) * │ │ │ │ │ +489 (cosTheta + cosHalfTheta * std::sqrt(2.0f * (9.0f + cosTheta))); │ │ │ │ │ +490 │ │ │ │ │ +491 double edgeWeightScale = 4.0f; │ │ │ │ │ +492 double faceWeightScale = 1.0f / (4.0f * lambda - 1.0f); │ │ │ │ │ +493 │ │ │ │ │ +494 for (int i = 0; i < valence; ++i) { │ │ │ │ │ +495 double cosThetaI = std::cos( i * theta); │ │ │ │ │ +496 double cosThetaIplus1 = std::cos((i+1)* theta); │ │ │ │ │ +497 │ │ │ │ │ +498 tan1Mask.EdgeWeight(i) = (Weight) (edgeWeightScale * cosThetaI); │ │ │ │ │ +499 tan1Mask.FaceWeight(i) = (Weight) (faceWeightScale * (cosThetaI + │ │ │ │ │ +cosThetaIplus1)); │ │ │ │ │ +500 } │ │ │ │ │ +501 } │ │ │ │ │ +502 │ │ │ │ │ +503 // Now rotate/copy tan1 weights to tan2: │ │ │ │ │ +504 tan2Mask.SetNumVertexWeights(1); │ │ │ │ │ +505 tan2Mask.SetNumEdgeWeights(valence); │ │ │ │ │ +506 tan2Mask.SetNumFaceWeights(valence); │ │ │ │ │ +507 tan2Mask.SetFaceWeightsForFaceCenters(false); │ │ │ │ │ +508 │ │ │ │ │ +509 tan2Mask.VertexWeight(0) = 0.0f; │ │ │ │ │ +510 if (valence == 4) { │ │ │ │ │ +511 tan2Mask.EdgeWeight(0) = 0.0f; │ │ │ │ │ +512 tan2Mask.EdgeWeight(1) = 4.0f; │ │ │ │ │ +513 tan2Mask.EdgeWeight(2) = 0.0f; │ │ │ │ │ +514 tan2Mask.EdgeWeight(3) = -4.0f; │ │ │ │ │ +515 │ │ │ │ │ +516 tan2Mask.FaceWeight(0) = 1.0f; │ │ │ │ │ +517 tan2Mask.FaceWeight(1) = 1.0f; │ │ │ │ │ +518 tan2Mask.FaceWeight(2) = -1.0f; │ │ │ │ │ +519 tan2Mask.FaceWeight(3) = -1.0f; │ │ │ │ │ +520 } else { │ │ │ │ │ +521 tan2Mask.EdgeWeight(0) = tan1Mask.EdgeWeight(valence-1); │ │ │ │ │ +522 tan2Mask.FaceWeight(0) = tan1Mask.FaceWeight(valence-1); │ │ │ │ │ +523 for (int i = 1; i < valence; ++i) { │ │ │ │ │ +524 tan2Mask.EdgeWeight(i) = tan1Mask.EdgeWeight(i-1); │ │ │ │ │ +525 tan2Mask.FaceWeight(i) = tan1Mask.FaceWeight(i-1); │ │ │ │ │ +526 } │ │ │ │ │ +527 } │ │ │ │ │ +528} │ │ │ │ │ +529 │ │ │ │ │ +530} // end namespace sdc │ │ │ │ │ +531 │ │ │ │ │ +532} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ +533using namespace OPENSUBDIV_VERSION; │ │ │ │ │ +534} // end namespace OpenSubdiv │ │ │ │ │ +535 │ │ │ │ │ +536#endif /* OPENSUBDIV3_SDC_CATMARK_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_:_:_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___Q_U_A_D_S │ │ │ │ │ +@ SPLIT_TO_QUADS │ │ │ │ │ +Used by Catmark and Bilinear. │ │ │ │ │ +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_:_:_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_:_:_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_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_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_s_d │ │ │ │ │ - * _o_p_e_n_c_l_._h │ │ │ │ │ + * _s_d_c │ │ │ │ │ + * _c_a_t_m_a_r_k_S_c_h_e_m_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00836.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuD3D11VertexBuffer.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,41 +90,41 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    cpuD3D11VertexBuffer.h File Reference
    │ │ │ │ +
    surfaceFactoryMeshAdapter.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include <cstddef>
    │ │ │ │ +#include <cstdint>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  CpuD3D11VertexBuffer
     Concrete vertex buffer class for Cpu subdivision and DirectX drawing. More...
    class  SurfaceFactoryMeshAdapter
     Abstract interface adapting SurfaceFactory to a connected mesh representation. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +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 │ │ │ │ │ -cpuD3D11VertexBuffer.h File Reference │ │ │ │ │ +surfaceFactoryMeshAdapter.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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -  Concrete vertex buffer class for Cpu subdivision and DirectX drawing. │ │ │ │ │ - _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_:_:_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_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _o_p_e_n_s_u_b_d_i_v │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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 = [ │ │ │ │ │ - ["CpuD3D11VertexBuffer", "a01153.html", "a01153"] │ │ │ │ │ + ["SurfaceFactoryMeshAdapter", "a00957.html", "a00957"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00836_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/cpuD3D11VertexBuffer.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryMeshAdapter.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    cpuD3D11VertexBuffer.h
    │ │ │ │ +
    surfaceFactoryMeshAdapter.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2013 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,91 +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_OSD_CPU_D3D11_VERTEX_BUFFER_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_CPU_D3D11_VERTEX_BUFFER_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │ -
    29#include <cstddef>
    │ │ │ │ -
    30
    │ │ │ │ -
    31struct ID3D11Buffer;
    │ │ │ │ -
    32struct ID3D11Device;
    │ │ │ │ -
    33struct ID3D11DeviceContext;
    │ │ │ │ +
    29
    │ │ │ │ +
    30#include <cstdint>
    │ │ │ │ +
    31
    │ │ │ │ +
    32namespace OpenSubdiv {
    │ │ │ │ +
    33namespace OPENSUBDIV_VERSION {
    │ │ │ │
    34
    │ │ │ │ -
    35namespace OpenSubdiv {
    │ │ │ │ -
    36namespace OPENSUBDIV_VERSION {
    │ │ │ │ -
    37
    │ │ │ │ -
    38namespace Osd {
    │ │ │ │ -
    39
    │ │ │ │ -
    │ │ │ │ - │ │ │ │ -
    49public:
    │ │ │ │ -
    51 static CpuD3D11VertexBuffer * Create(int numElements, int numVertices,
    │ │ │ │ -
    52 ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    53
    │ │ │ │ - │ │ │ │ -
    56
    │ │ │ │ -
    59 void UpdateData(const float *src, int startVertex, int numVertices,
    │ │ │ │ -
    60 void *deviceContext = NULL);
    │ │ │ │ -
    61
    │ │ │ │ -
    63 int GetNumElements() const;
    │ │ │ │ -
    64
    │ │ │ │ -
    66 int GetNumVertices() const;
    │ │ │ │ -
    67
    │ │ │ │ -
    69 float * BindCpuBuffer();
    │ │ │ │ -
    70
    │ │ │ │ -
    72 ID3D11Buffer *BindD3D11Buffer(ID3D11DeviceContext *deviceContext);
    │ │ │ │ -
    73
    │ │ │ │ -
    │ │ │ │ -
    75 ID3D11Buffer *BindVBO(ID3D11DeviceContext *deviceContext) {
    │ │ │ │ -
    76 return BindD3D11Buffer(deviceContext);
    │ │ │ │ -
    77 }
    │ │ │ │ -
    │ │ │ │ -
    78
    │ │ │ │ -
    79protected:
    │ │ │ │ -
    81 CpuD3D11VertexBuffer(int numElements, int numVertices);
    │ │ │ │ -
    82
    │ │ │ │ -
    83 bool allocate(ID3D11Device *device);
    │ │ │ │ -
    84
    │ │ │ │ -
    85private:
    │ │ │ │ -
    86 int _numElements;
    │ │ │ │ -
    87 int _numVertices;
    │ │ │ │ -
    88 ID3D11Buffer *_d3d11Buffer;
    │ │ │ │ -
    89 float *_cpuBuffer;
    │ │ │ │ -
    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_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.
    │ │ │ │ -
    float * BindCpuBuffer()
    Returns the address of CPU buffer.
    │ │ │ │ - │ │ │ │ - │ │ │ │ -
    ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext)
    Returns the D3D11 buffer object (for Osd::Mesh interface)
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -cpuD3D11VertexBuffer.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 2013 Pixar │ │ │ │ │ +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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,105 +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_OSD_CPU_D3D11_VERTEX_BUFFER_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_CPU_D3D11_VERTEX_BUFFER_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_SURFACE_FACTORY_ADAPTER_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ -29#include │ │ │ │ │ -30 │ │ │ │ │ -31struct ID3D11Buffer; │ │ │ │ │ -32struct ID3D11Device; │ │ │ │ │ -33struct ID3D11DeviceContext; │ │ │ │ │ +29 │ │ │ │ │ +30#include │ │ │ │ │ +31 │ │ │ │ │ +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 Osd { │ │ │ │ │ -39 │ │ │ │ │ -_4_8class _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r { │ │ │ │ │ -49public: │ │ │ │ │ -_5_1 static _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r * _C_r_e_a_t_e(int numElements, int numVertices, │ │ │ │ │ -52 ID3D11DeviceContext *deviceContext); │ │ │ │ │ -53 │ │ │ │ │ -_5_5 virtual _~_C_p_u_D_3_D_1_1_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, │ │ │ │ │ -60 void *deviceContext = NULL); │ │ │ │ │ -61 │ │ │ │ │ -_6_3 int _G_e_t_N_u_m_E_l_e_m_e_n_t_s() const; │ │ │ │ │ -64 │ │ │ │ │ -_6_6 int _G_e_t_N_u_m_V_e_r_t_i_c_e_s() const; │ │ │ │ │ -67 │ │ │ │ │ -_6_9 float * _B_i_n_d_C_p_u_B_u_f_f_e_r(); │ │ │ │ │ -70 │ │ │ │ │ -_7_2 ID3D11Buffer *_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(ID3D11DeviceContext *deviceContext); │ │ │ │ │ -73 │ │ │ │ │ -_7_5 ID3D11Buffer *_B_i_n_d_V_B_O(ID3D11DeviceContext *deviceContext) { │ │ │ │ │ -76 return _B_i_n_d_D_3_D_1_1_B_u_f_f_e_r(deviceContext); │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79protected: │ │ │ │ │ -_8_1 _C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r(int numElements, int numVertices); │ │ │ │ │ -82 │ │ │ │ │ -_8_3 bool _a_l_l_o_c_a_t_e(ID3D11Device *device); │ │ │ │ │ -84 │ │ │ │ │ -85private: │ │ │ │ │ -86 int _numElements; │ │ │ │ │ -87 int _numVertices; │ │ │ │ │ -88 ID3D11Buffer *_d3d11Buffer; │ │ │ │ │ -89 float *_cpuBuffer; │ │ │ │ │ -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_CPU_D3D11_VERTEX_BUFFER_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_:_:_O_s_d_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -Concrete vertex buffer class for Cpu subdivision and DirectX drawing. │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_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_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_r_e_a_t_e │ │ │ │ │ -static CpuD3D11VertexBuffer * Create(int numElements, int numVertices, │ │ │ │ │ -ID3D11DeviceContext *deviceContext) │ │ │ │ │ -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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -CpuD3D11VertexBuffer(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_D_3_D_1_1_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_D_3_D_1_1_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_D_3_D_1_1_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_D_3_D_1_1_B_u_f_f_e_r │ │ │ │ │ -ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Returns the D3D11 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_:_:_C_p_u_D_3_D_1_1_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_a_l_l_o_c_a_t_e │ │ │ │ │ -bool allocate(ID3D11Device *device) │ │ │ │ │ -_O_p_e_n_S_u_b_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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_: │ │ │ │ │ -_~_C_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r │ │ │ │ │ -virtual ~CpuD3D11VertexBuffer() │ │ │ │ │ -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_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_:_:_B_i_n_d_V_B_O │ │ │ │ │ -ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext) │ │ │ │ │ -Returns the D3D11 buffer object (for Osd::Mesh interface) │ │ │ │ │ -DDeeffiinniittiioonn _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_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_:_:_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_s_d │ │ │ │ │ - * _c_p_u_D_3_D_1_1_V_e_r_t_e_x_B_u_f_f_e_r_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/ompKernel.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -88,45 +88,49 @@ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -Namespaces | │ │ │ │ -Functions
    │ │ │ │ -
    ompKernel.h File Reference
    │ │ │ │ +Classes | │ │ │ │ +Namespaces
    │ │ │ │ +
    refinerSurfaceFactory.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ +#include "../bfr/surfaceFactory.h"
    │ │ │ │ +#include "../bfr/surfaceFactoryCache.h"
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ +Classes

    class  RefinerSurfaceFactoryBase
     Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh. More...
     
    class  RefinerSurfaceFactory< CACHE_TYPE >
     Template for concrete subclasses of RefinerSurfaceFactoryBase. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ -

    │ │ │ │ Namespaces

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

    │ │ │ │ -Functions

    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)
     
    void OmpEvalStencils (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 OmpEvalStencils (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)
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,31 @@ │ │ │ │ │ [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 │ │ │ │ │ -ompKernel.h File Reference │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +refinerSurfaceFactory.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" │ │ │ │ │ _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   _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_:_:_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 │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -void  _O_m_p_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  _O_m_p_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  _O_m_p_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) │ │ │ │ │ +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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _o_m_p_K_e_r_n_e_l_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 for OpenSubdiv by _[_d_o_x_y_g_e_n_]1.9.8 │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00839.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -1,5 +1,4 @@ │ │ │ │ │ var a00839 = [ │ │ │ │ │ - ["OmpEvalStencils", "a00839.html#a44a05502feb5015035bc81b93cffb99c", null], │ │ │ │ │ - ["OmpEvalStencils", "a00839.html#a907dc53421460557871ddc35f77751f5", null], │ │ │ │ │ - ["OmpEvalStencils", "a00839.html#a870745ff3e883b32547d4db42b3be2bd", null] │ │ │ │ │ + ["RefinerSurfaceFactoryBase", "a00925.html", "a00925"], │ │ │ │ │ + ["RefinerSurfaceFactory< CACHE_TYPE >", "a00929.html", "a00929"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00839_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/ompKernel.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/refinerSurfaceFactory.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -
    ompKernel.h
    │ │ │ │ +
    refinerSurfaceFactory.h
    │ │ │ │
    │ │ │ │
    │ │ │ │ Go to the documentation of this file.
    1//
    │ │ │ │ -
    2// Copyright 2013 Pixar
    │ │ │ │ +
    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:
    │ │ │ │
    7// Section 6. Trademarks. is deleted and replaced with:
    │ │ │ │
    8//
    │ │ │ │
    9// 6. Trademarks. This License does not grant permission to use the trade
    │ │ │ │ @@ -119,82 +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_OSD_OMP_KERNEL_H
    │ │ │ │ -
    26#define OPENSUBDIV3_OSD_OMP_KERNEL_H
    │ │ │ │ +
    25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
    │ │ │ │ +
    26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
    │ │ │ │
    27
    │ │ │ │
    28#include "../version.h"
    │ │ │ │
    29
    │ │ │ │ -
    30namespace OpenSubdiv {
    │ │ │ │ -
    31namespace OPENSUBDIV_VERSION {
    │ │ │ │ +
    30#include "../bfr/surfaceFactory.h"
    │ │ │ │ +
    31#include "../bfr/surfaceFactoryCache.h"
    │ │ │ │
    32
    │ │ │ │ -
    33namespace Osd {
    │ │ │ │ -
    34
    │ │ │ │ -
    35struct BufferDescriptor;
    │ │ │ │ -
    36
    │ │ │ │ -
    37void
    │ │ │ │ -
    38OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    39 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    40 int const * sizes,
    │ │ │ │ -
    41 int const * offsets,
    │ │ │ │ -
    42 int const * indices,
    │ │ │ │ -
    43 float const * weights,
    │ │ │ │ -
    44 int start, int end);
    │ │ │ │ -
    45
    │ │ │ │ -
    46void
    │ │ │ │ -
    47OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    48 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    49 float * dstDu, BufferDescriptor const &dstDuDesc,
    │ │ │ │ -
    50 float * dstDv, BufferDescriptor const &dstDvDesc,
    │ │ │ │ -
    51 int const * sizes,
    │ │ │ │ -
    52 int const * offsets,
    │ │ │ │ -
    53 int const * indices,
    │ │ │ │ -
    54 float const * weights,
    │ │ │ │ -
    55 float const * duWeights,
    │ │ │ │ -
    56 float const * dvWeights,
    │ │ │ │ -
    57 int start, int end);
    │ │ │ │ -
    58
    │ │ │ │ -
    59void
    │ │ │ │ -
    60OmpEvalStencils(float const * src, BufferDescriptor const &srcDesc,
    │ │ │ │ -
    61 float * dst, BufferDescriptor const &dstDesc,
    │ │ │ │ -
    62 float * dstDu, BufferDescriptor const &dstDuDesc,
    │ │ │ │ -
    63 float * dstDv, BufferDescriptor const &dstDvDesc,
    │ │ │ │ -
    64 float * dstDuu, BufferDescriptor const &dstDuuDesc,
    │ │ │ │ -
    65 float * dstDuv, BufferDescriptor const &dstDuvDesc,
    │ │ │ │ -
    66 float * dstDvv, BufferDescriptor const &dstDvvDesc,
    │ │ │ │ -
    67 int const * sizes,
    │ │ │ │ -
    68 int const * offsets,
    │ │ │ │ -
    69 int const * indices,
    │ │ │ │ -
    70 float const * weights,
    │ │ │ │ -
    71 float const * duWeights,
    │ │ │ │ -
    72 float const * dvWeights,
    │ │ │ │ -
    73 float const * duuWeights,
    │ │ │ │ -
    74 float const * duvWeights,
    │ │ │ │ -
    75 float const * dvvWeights,
    │ │ │ │ -
    76 int start, int end);
    │ │ │ │ +
    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
    │ │ │ │
    77
    │ │ │ │ -
    78} // end namespace Osd
    │ │ │ │ -
    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....
    │ │ │ │ +
    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;
    │ │ │ │ +
    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
    │ │ │ │ +
    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
    │ │ │ │ +
    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,15 +1,15 @@ │ │ │ │ │ [Logo] OpenSubdiv │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ -ompKernel.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 2013 Pixar │ │ │ │ │ +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: │ │ │ │ │ 7// Section 6. Trademarks. is deleted and replaced with: │ │ │ │ │ 8// │ │ │ │ │ 9// 6. Trademarks. This License does not grant permission to use the trade │ │ │ │ │ @@ -24,82 +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_OSD_OMP_KERNEL_H │ │ │ │ │ -26#define OPENSUBDIV3_OSD_OMP_KERNEL_H │ │ │ │ │ +25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ +26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H │ │ │ │ │ 27 │ │ │ │ │ 28#include "../version.h" │ │ │ │ │ 29 │ │ │ │ │ -30namespace _O_p_e_n_S_u_b_d_i_v { │ │ │ │ │ -31namespace OPENSUBDIV_VERSION { │ │ │ │ │ +30#include "../bfr/surfaceFactory.h" │ │ │ │ │ +31#include "../bfr/surfaceFactoryCache.h" │ │ │ │ │ 32 │ │ │ │ │ -33namespace Osd { │ │ │ │ │ -34 │ │ │ │ │ -35struct BufferDescriptor; │ │ │ │ │ -36 │ │ │ │ │ -37void │ │ │ │ │ -_3_8_O_m_p_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, │ │ │ │ │ -39 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -40 int const * sizes, │ │ │ │ │ -41 int const * offsets, │ │ │ │ │ -42 int const * indices, │ │ │ │ │ -43 float const * weights, │ │ │ │ │ -44 int start, int end); │ │ │ │ │ -45 │ │ │ │ │ -46void │ │ │ │ │ -_4_7_O_m_p_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, │ │ │ │ │ -48 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -49 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -50 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -51 int const * sizes, │ │ │ │ │ -52 int const * offsets, │ │ │ │ │ -53 int const * indices, │ │ │ │ │ -54 float const * weights, │ │ │ │ │ -55 float const * duWeights, │ │ │ │ │ -56 float const * dvWeights, │ │ │ │ │ -57 int start, int end); │ │ │ │ │ -58 │ │ │ │ │ -59void │ │ │ │ │ -_6_0_O_m_p_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, │ │ │ │ │ -61 float * dst, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDesc, │ │ │ │ │ -62 float * dstDu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuDesc, │ │ │ │ │ -63 float * dstDv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvDesc, │ │ │ │ │ -64 float * dstDuu, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuuDesc, │ │ │ │ │ -65 float * dstDuv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDuvDesc, │ │ │ │ │ -66 float * dstDvv, _B_u_f_f_e_r_D_e_s_c_r_i_p_t_o_r const &dstDvvDesc, │ │ │ │ │ -67 int const * sizes, │ │ │ │ │ -68 int const * offsets, │ │ │ │ │ -69 int const * indices, │ │ │ │ │ -70 float const * weights, │ │ │ │ │ -71 float const * duWeights, │ │ │ │ │ -72 float const * dvWeights, │ │ │ │ │ -73 float const * duuWeights, │ │ │ │ │ -74 float const * duvWeights, │ │ │ │ │ -75 float const * dvvWeights, │ │ │ │ │ -76 int start, int end); │ │ │ │ │ +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 │ │ │ │ │ 77 │ │ │ │ │ -78} // end namespace Osd │ │ │ │ │ -79 │ │ │ │ │ -80} // end namespace OPENSUBDIV_VERSION │ │ │ │ │ -81using namespace OPENSUBDIV_VERSION; │ │ │ │ │ -82 │ │ │ │ │ -83} // end namespace OpenSubdiv │ │ │ │ │ -84 │ │ │ │ │ -85#endif // OPENSUBDIV3_OSD_OMP_KERNEL_H │ │ │ │ │ +_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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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_:_:_O_s_d_:_:_O_m_p_E_v_a_l_S_t_e_n_c_i_l_s │ │ │ │ │ -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) │ │ │ │ │ -_O_p_e_n_S_u_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_:_:_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_:_:_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 │ │ │ │ │ - * _o_s_d │ │ │ │ │ - * _o_m_p_K_e_r_n_e_l_._h │ │ │ │ │ + * _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 │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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/glLegacyGregoryPatchTable.h File Reference │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -90,42 +90,46 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ Classes | │ │ │ │ Namespaces
    │ │ │ │ -
    glLegacyGregoryPatchTable.h File Reference
    │ │ │ │ +
    surfaceFactoryCache.h File Reference
    │ │ │ │
    │ │ │ │
    │ │ │ │
    #include "../version.h"
    │ │ │ │ -#include "../far/patchTable.h"
    │ │ │ │ -#include "../osd/nonCopyable.h"
    │ │ │ │ -#include "../osd/opengl.h"
    │ │ │ │ +#include "../bfr/irregularPatchType.h"
    │ │ │ │ +#include <map>
    │ │ │ │ +#include <cstdint>
    │ │ │ │
    │ │ │ │

    Go to the source code of this file.

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

    │ │ │ │ Classes

    class  GLLegacyGregoryPatchTable
    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...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

    │ │ │ │ Namespaces

    namespace  OpenSubdiv
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION
     
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Osd
    namespace  OpenSubdiv::OPENSUBDIV_VERSION::Bfr
     
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -glLegacyGregoryPatchTable.h File Reference │ │ │ │ │ +surfaceFactoryCache.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_/_o_p_e_n_g_l_._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   _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   _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_:_:_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_:_:_B_f_r │ │ │ │ │   │ │ │ │ │ * _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 │ │ │ │ │ + * _b_f_r │ │ │ │ │ + * _s_u_r_f_a_c_e_F_a_c_t_o_r_y_C_a_c_h_e_._h │ │ │ │ │ * Generated on Thu Feb 29 2024 12:58:19 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 = [ │ │ │ │ │ - ["GLLegacyGregoryPatchTable", "a01225.html", "a01225"] │ │ │ │ │ + ["SurfaceFactoryCache", "a00949.html", "a00949"], │ │ │ │ │ + ["SurfaceFactoryCacheThreaded< MUTEX_TYPE, READ_LOCK_GUARD_TYPE, WRITE_LOCK_GUARD_TYPE >", "a00953.html", "a00953"] │ │ │ │ │ ]; │ │ │ ├── ./usr/share/doc/opensubdiv/doxy_html/a00842_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -OpenSubdiv: opensubdiv/osd/glLegacyGregoryPatchTable.h Source File │ │ │ │ +OpenSubdiv: opensubdiv/bfr/surfaceFactoryCache.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -92,19 +92,19 @@ │ │ │ │
    No Matches
    │ │ │ │
    │ │ │ │