These methods now compute the patch basis in terms
of Far::PatchParamBase instead of Far::PatchParam
This allows these methods to be more easily reused
for evaluating patches for face-varying data.
This refactoring of Far::PatchParam maintains source
compatibility with earlier releases while allowing the
core patch parameterization to be reused for patches
from face-varying channels.
This introduces a new internal interface class named
Far::PatchParamInterface which provides an interface to
the core patch parameterization and which is implemented
by both Far::PatchParamBase and Far::PatchParam.
Added significant documentation detail to this new
interface class as well as two new methods
MapRefinedToCoarse() and MapCoarseToRefined()
in favor of the now deprecated Normalize().
The parameterization of irregular faces is offset by one level
of refinement from the parameterization of regular faces. This
matches the parameterization used for Ptex texture mapping onto
irregular faces.
This was expressed awkwardly during the assigment of values to
Far::PatchParam, where we pre-decremented the refinement level
for non-quad patches in order to compensate for the incorrect
pre-increment of the refinement depth value stored for non-quad
patches.
In order to support a consistent API for refinement and
evaluation of varying primvar data, Far::PatchTable needs
to provide indices for varying data. This adds support to
Far::PatchTableFactory for generating these indices.
- removed obsolete and unused code from GregoryBasis and ProtoBasis
- reorganized computation in ProtoBasis to clarify interdependencies
- separated topological inspection from computation
- made a clearer distinction between interior and boundary cases
- improved clarity/consistency of formulae, particularly wrt sin/cos usage
- added comments, including concerns over consistency and efficiency
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.
- added new Vtr::Level::VTag members for inf-sharp features
- updated Vtr::Level::print() to recognize new tags
- explicitly initialized tags for new edge-verts in Vtr::Refinement
- initialized tags for base level verts in Far::TopologyRefinerFactory
This change updates Far::PatchTable to include support for
evaluating varying and face-varying data on patches.
This adds to existing API and follows the existing patterns
used for vertex patches.
This includes data and methods to evaluate varying and
face-varying basis functions as well as methods to compute
local point values for varying and face-varying primvar data.
This is the foundation for updating Far::PatchTableFactory
to generate bicubic patches for face-varying channels.
- removed PatchTableFactory assert that irreg patches exist at last level
- fixed Gregory end cap Factory to accomodate irreg patches at any level
- parameterized adaptive refinement for differing feature sets per level
- added definition and gathering method to Vtr::Level
- extended Far::EndCap...PatchFactories with VSpan[4] for patch corners
- extended Far::EndCapGregoryPatchFactory to avoid last level assumption
- adapted Far::PatchTableFactory to use above extensions
- extended Far::GregoryBasis to recognize VSpan corners
- simplified Far::GregoryBasis treatement of boundaries
- fixed bug in Far::GregoryBasis related to smooth corners
An earlier change improved transient memory used during the construction
of end cap stencil tables but could leave unused capacity in the internal
containers of the resulting stencil tables. This change adds an additional
internal factory helper method which trims this storage.
This method now returns the number of _farLevels where previously
it returned the number of _levels. This is primarily a semantic
difference, as the two containers should have equal size. But this
method is intended to accompany Far::TopologyRefiner::GetLevel()
which returns a reference to an element in _farLevels;
My previous fix added some defensive logic in case the
local point stencil table was empty when attempting to
append local point stencils to an existing stencil table.
This change fixes Far::PatchTableFactory to not return
empty local point stencil tables when there are no local
point stencils. This behavior is now more consistent with
earlier releases.
We will leave the earlier defensive logic in place as well.
Now StencilTableFactory::AppendLocalPointStencilTable() does
nothing when the localPointStencilTable is empty. This avoids
a potential crash (failed assertion) when both the baseStencilTable
and the localPointStencilTable are empty, as is the case for
simple geometry like the all-quads torus regression test shape.
- instead of accumulating GregoryBasis::Point (fixed size stencils
backed by stackbuffer), pack the stencils into StencilTable as they
are evaluated
- use single integer for varying stencils of patch points, not
a GregoryBasis::Point
- cap the reserved stencil entry size.
- replace std::vector with vtr::StackBuffer in GregoryBasis::Point
- remote getQuadOffsets call from ProtoBasis
- rewrite some inefficient code in the endcap generation.
Note that this is a temporary remedy for the performance issue in 3.0.
We'll fix it again in the later release.