Added support for gathering face-varying patch points to
the Far::EndCap*PatchFactory classes. Also, changed these classes
to compute varying stencils optionally, since separate varying
stencils are not needed for face-varying patches.
Also, removed a no longer used stateless factory method from
the EndCapGregoryBasisPatchFactory.
Re-organized the implementation of the patch table factory
in advance of adding support for bicubic face-varying patches.
- Renamed the AdaptiveContext internal class to BuilderContext
since this can be used (eventually) to build patch tables for
uniformly refined topology as well as adaptively refined
topology.
- Added utility methods to gather patch vertices from the
levels (and eventually fvarLevels) of a refiner.
- Replaced the FVarChannelCursor with a simpler array of integer
face-varying channel indices.
- Extracted the topology inspection needed to identify
patches into a computePatchTag() method.
- Simplified the two-pass traversal of the topology into a
single pass traversal of the refined topology followed by
an iteration over the patches that have been identified.
- Replaced internal templated PatchTypes class with simpler
and more direct accounting and patch array building facilities.
- Changed the API of the end cap patch factories to no longer
depend on the patch table factory's PatchFaceTag. This has
been superseded by the specification of appropriate
VSpans at the corners of the end patch.
PatchTables no longer needs to friend EndCapLegacyGregoryPatchFactory.
Instead we now make the patch table factory pass in the data that needs
to be updated directly to EndCapLegacyGregoryPatchFactory.
While this may be worth revisiting, we should first quantify the benefits and
identify the compilers that support it. Ultimately, we may never use pragma
once in favor of strictly using standard C++.
- rename "Regular end cap" to "BSplineBasis end cap"
- revert templating and add EndCapType into PatchTablesFactory::Options.
- make EndCapFactories internal in PatchTablesFactory.
- move end cap stencils into PatchTables, keep them relative to the max level.
- add a utility StencilTablesFactory::AppendEndCapStencilTables to splice and factorize endcap stencil tables.
This change moves all gregory patch generation from Far::PatchTablesFactory
so that we can construct patch tables without stencil tables as well as client
can chose any end patch strategies (we have 3 options for now: legacy 2.x style
gregory patch, gregory basis patch and experimental regular patch approximation).
Also Far::EndCapGregoryBasisPatchFactory provides index mapping from patch index
to vtr face index, which can be used for single gregory patch evaluation on top
of refined points, without involving heavier stencil tables generation.