Commit Graph

9 Commits

Author SHA1 Message Date
David G Yu
53d80e0d2f Updated Far::EndCap*PatchFactory for fvar patches
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.
2016-08-05 19:08:04 -07:00
David G Yu
35d8519895 Refactored Far::PatchTableFactory
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.
2016-08-05 12:38:05 -07:00
barfowl
85b65bd2ef Moved Vtr classes within internal namespace:
- moved all major Vtr classes within namespace internal
    - updated all Vtr class access with Far
2015-05-25 20:34:50 -07:00
Takahito Tejima
a7c5179ef9 renaming (2/2) PatchTables and StencilTables to PatchTable and StencilTable
replace all occurrences reffering PatchTables, StencilTables, and their factories.
2015-05-22 11:50:01 -07:00
George ElKoura
f521c9dde3 Remove need for friending a class in PatchTables.
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.
2015-05-20 19:44:43 -07:00
jcowles
392e5e8bed Remove #pragma once
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++.
2015-05-20 09:59:18 -07:00
jcowles
9d32712ec4 Prefix header guards and add pragma once. 2015-05-19 11:22:37 -07:00
Takahito Tejima
74b78b3d17 Refactor again FarPatchTableFactory.
- 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.
2015-04-23 16:58:56 -07:00
Takahito Tejima
43aa2500c4 Refactor far factories.
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.
2015-04-20 18:59:07 -07:00