* The CATMARK_QUAD_FACE_VERTEX kernel calculates the face-vertex for a quadrilateral face. It applies to every face after the first subdivision step, and may be applied for the first subdivision step of a quadrilateral coarse mesh.
* The CATMARK_TRI_QUAD_FACE_VERTEX kernel calculates the face-vertex for a triangle or quadrilateral face. It may be applied for the first subdivision step of a coarse mesh composed of triangles and/or quadrilaterals.
* Both kernels calculate each face-vertex using four vertex indices (triangles are specified by repeating the third index). Therefore neither kernel uses the F_ITa codex table, and instead the first vertex offset in the F_IT index table is stored in the FarKernelBatch's table offset.
Moved transient states (current vertex buffer etc) to controller.
ComputeContext becomes constant so that it's well suited for coarse-grain
parallelism on cpu. The prims sharing same topology (ComputeContext) can
be refined simultaneously by having mutiple compute controllers.
Client facing API doesn't change.
- fix the vertesIsBSpline logic to correctly recognize these sharp corner vertices
- fix another bug where a loop was missing vertices from from quad faces with 2
non-consecutive boundaries
fixes#294
* rolled getNumFVarVertices into allocateTables
* renamed tessellate to triangulateQuads (technically speaking, Loop scheme uses a trivial triangulation)
* condensed the pointer arithmetic used for triangulating the data tables
Delete scheme specialized subdivision tables. The base class FarSubdivisionTables
already has all tables, so we just need scheme enum to identify which scheme
the subdivision tables belong to.
This brings a lot of code cleanups around far factory classes.
* replace void* of all kernel applications with CONTEXT template parameter.
It eliminates many static_casts from void* for both far and osd classes.
* move the big switch-cases of far default kernel launches out of Refine so
that osd controllers can arbitrary mix default kernels and custom kernels.
* change FarKernelBatch::kernelType from enum to int, clients can add
custom kernel types.
* remove a back-pointer to farmesh from subdivision table.
* untemplate all subdivision table classes and template their compute methods
instead. Those methods take a typed vertex storage.
* remove an unused argument FarMesh from the constructor of subdivision
table factories.
minor code cleanups:
- change Descriptor::iterator to use a static vector instead of overly complicated logic
- change the private factory PatchType struct for better readability
- variable name changes
The new table accomodates verts with valence up to 20.
Dr. DeRose provided me with a python script to generate the tables, but wants to
investigate a closed-form alternative to pre-computed tables.
Also: our logic is incorrect - it is missing adjacent face-points in the
interpolation (apparently this has been incorrect since day 1). Further fixes
coming next year...
fixes#246
The logic that invalidates the vertices in the control stencil and
the cached bspline patch weights was not triggering correctly.
Hopefully this new bit of logic should clear up some of the incorrect results.
fixes#246
Limit tangent stencil crease rule was accumulating the wrong vertices. This
change switches from using an Hbr operator to using a less efficient std::list,
but allows us to rotate around the vertex from an arbitrary starting incident
edge.
The values returned are "plausible", but more extensive testing would be required
to validate this new code.
fixes#246
The tangents were only scaled in the "bail-out" code branch that
pushes vertices to the limit and performs bi-linear interpolation.
Now we are also scaling the bi-cubic patch interpolation code branch.
There may be another code path left to fix (as well as some pointers
being currently unchecked)
fixes#243
The previous fix pointed far indexing tables to the origin vertex
of duped singular verts.
This fix goes one step further and actually shifts all vertex indexing
to start at the end of the coarse mesh vertices, using the space for
data that was previously occupied by duplicated singular verts.
The consequence is that client code no longer needs to duplicate vertex
data in vertex buffers (huzzah !).
- fix FarSubdivisionTablesFactory to shift factory vertex table offsets using Hbr's
singular verts map
- fix schema table factories (Catmark, Loop...) to correctly use these offsets
- remove vertex data duplication code from osdPolySmooth example
- remove some (unrelated) cruft from glViewer example
- shape_utils unfortunately still needs to dubplicate the singular verts to
allow the coarse edge drawing in our example viewers to work correctly
(although it could be fixed to avoid data duplication too...)
fixes#241
- Add a vector of index pairs to HbrMesh to track the index of a split
vertex and its origin vertex
- Correct the Far remap tables in FarSubdivisionTablesFactory to point split
vertices to their origin instead of themselves
- Fix regression/common/shape_utils.h to use the new HbrMesh::GetSplitVertices()
method.
- Fix the osdPolySmooth example to use the new HbrMesh::GetSplitVertices()
method.
- Add a paragraph to the documentation
fixes#241
- implement virtual accessors in FarSubdivision tables that return a Scheme enum
- implement a safe typeid comparison in FarMeshFactory to get the same information
from Hbr subdivision classes
fixes#240
set HBR_ADAPTIVE before including hbr code. Also use an ifndef in
far/meshFactory.h so that code can be included where someone else has
already defined HBR_ADAPTIVE.