Commit Graph

624 Commits

Author SHA1 Message Date
Cory Kramer
ca6f0feecf Avoid referring to std::vector<T> members when T is incomplete.
This is not legal according to the C++ standard, and causes build errors when using --std=c++20
2022-09-27 10:15:30 -04:00
Barry Fowler
0e574f7204 Fix more internal GCC warnings with -Wconversion 2022-09-14 14:52:01 -07:00
David G Yu
4a75c5577a
Merge pull request #1254 from barfowl/gcc_warnings_bitfields
Suppression of GCC warnings from -Wconversion with bitfields
2022-09-02 15:51:11 -07:00
Barry Fowler
887ee04572 Added more methods to Far::TopologyLevel:
- test if a vertex is a corner (one incident face)
    - test if valence of a vertex is regular
    - tests if a vertex is semi- or inf-sharp
    - tests if an edge is semi- or inf-sharp
2022-09-02 12:56:29 -07:00
Barry Fowler
8b863a0009 Fix GCC warnings with -Wconversion and bitfields:
- apply bitmask in member initialization to suppress warning
    - add public Set...() with bitmask for assignment by users
    - replace any assignments with new public Set...() methods
2022-08-30 14:34:17 -07:00
Barry Fowler
57847e625c Fix GCC warnings with -Wshadow and -Wconversion:
- suppressed -Wshadow in libraries, tutorials and regressions
    - suppressed -Wconversion when casts to simple POD type required
2022-08-30 12:56:59 -07:00
Barry Fowler
810d7f671b Fix GCC warnings with current default flags:
- default flags include warnings enabled by -Wall and -Wextra
    - suppressed newer warnings in public headers and internal files
      (-Wclass-memaccess, -Wcast-function-type, -Wdeprecated-copy)
    - suppressed -Wunused-function from internal source files
2022-08-30 12:13:44 -07:00
Barry Fowler
647309a7d7 Improved mixed partial at Gregory patch corners:
- normalized the rational weights for pairs of interior points
    - fixed sign swap error in mixed partial of bilinear patches
    - applied changes to both far/patchBasis and osd/patchBasisCommon
2022-08-25 18:40:33 -07:00
Barry Fowler
a1c7be7c8e Addition of Bfr interface (1 of 4): opensubdiv/bfr
This set of commits includes the addition of a new evaluation interface
that treats a subdivision mesh more like a piecewise parametric surface
primitive.  The new interface was placed in namespace "Bfr" for "Base
Face Representation" as all concepts and classes relate to a single face
of the base mesh.
2022-08-02 20:38:17 -07:00
David G Yu
62ddd17bcb
Merge pull request #1208 from barfowl/far_unrefine_maxlevel_bug
Fixed Far::TopologyRefiner::GetMaxLevel() after call to Unrefine()
2021-01-26 14:41:40 -08:00
David G Yu
0d117082fd
Merge pull request #1207 from barfowl/far_stencil_precision_bug
Fixed bug in double precision template for Far::StencilTableFactory
2021-01-26 14:32:57 -08:00
Barry Fowler
03c19c7194 Fixed Far::TopologyRefiner::GetMaxLevel() after call to Unrefine():
- reset _maxLevel member to 0 in Unrefine()
2020-10-24 17:21:18 -07:00
Barry Fowler
75e31d88d6 Fixed bug in double precision template for Far::StencilTableFactory:
- added missing template parameter with use of Far::PrimvarRefiner
2020-10-24 17:20:38 -07:00
Barry Fowler
c1dd0bdfca Fixed bug in sparse refinement where face-varying topology differs:
- do not select face if incomplete, i.e. not descended from specified face
2020-10-24 17:19:08 -07:00
barry
8b065abb90 Formatted the modified source file to adhere to 80-column standard 2020-01-13 18:07:23 -08:00
barry
5a0e16e65d Revised tagging of boundary faces as holes if explicitly sharpened:
- tag faces containing vertices with an unsharpened incident boundary edge
2020-01-10 14:14:22 -08:00
George ElKoura
92341f7c1e Prefix OpenSubdiv CMake macros
This fixes issue #1157 by adding "osd" as a prefix to public macros.
2019-08-17 16:44:30 -07:00
barry
5e1a4b44be Minor improvements to Doxygen comments for Far header files:
- minor changes to Doxygen comments based on feedback
    - new description for PatchTableFactory::Options::EndCapType
    - fixed warnings related to Doxygen use of <REAL> in patchTable.h
2019-06-20 13:56:54 -07:00
barry
6d3e1b02af Added condition to compensate for incorrect FVar corner tags:
- re-assess corner tags for irregular patches on FVar boundaries
2019-06-18 11:24:23 -07:00
barry
69ab4d6170 Fixed Loop patch creation bug with val-3 interior vertex at third corner:
- adjusted point-sharing logic in PatchBuilder::SourcePatch to correct
2019-06-14 11:28:22 -07:00
David G Yu
943f1a8886
Merge pull request #1117 from barfowl/far_api_revisions
Minor revisions to a few precision related methods of Far classes
2019-06-07 20:56:57 -07:00
barry
b2d610fd56 Minor revisions to some precision related methods of Far classes:
- renamed PatchTable methods to query the precision of its StencilTables
    - removed the "set" prefix from precision-related PatchTableFactory::Options
2019-06-07 18:40:53 -07:00
barry
cb79eab120 Improved Loop regular patch approximations of irregular features:
- updated LoopPatchBuilder with new Gregory to Box-spline conversion matrix
2019-06-07 17:55:31 -07:00
David G Yu
17bc75b488 Compute transition mask for irregular patches
The irregular patches around extraordinary vertices
might have transitions edges depending on the secondary
refinement level specified during topological refinement.

We used to skip the computation of the transition mask
for irregular patches, but this is now necessary
since the introduction of the secondary level option.
2019-05-30 12:12:53 -07:00
barry
a18a706f93 Fixed regression in application of smooth corner patch approximation:
- only apply the approximation at corners determined to be smooth
2019-05-21 19:53:21 -07:00
barry
17218ce6fe Fixed bug estimating Gregory face-point size for sharp corner patches 2019-05-14 11:08:52 -07:00
barry
dd1949ef74 Fixed bugs in Far::PatchBuilder related to non-manifold topology:
- fixed interior/periodic assignment around non-manifold vertices
    - fixed assembly of regular triangular patches along non-manifold edges
    - removed unnecessary assert in assembly of regular quad patches
2019-05-02 15:23:02 -07:00
barry
184ae997d6 Fixed single-crease patch isolation now required without boundary isolation:
- added member to FeatureMask for single-crease option without inf-sharp
    - adjusted adaptive refinement to handle unisolated interior sharp edges
2019-04-24 14:56:49 -07:00
barry
479a297bc6 Correction to recent changes to boundary weights of box-spline triangles:
- fixed corner vertex cases (two boundary edges) in both Far and Osd
2019-02-06 18:30:26 -08:00
Barry Fowler
7b3a471cfb
Merge pull request #1055 from davidgyu/box_spline_tri_boundary_fix
Thanks, David
2019-02-05 18:40:00 -08:00
David G Yu
35065d3a2f
Merge pull request #1054 from barfowl/far_inf_sharp_darts
Fix cracks between triangular Gregory patches at inf-sharp darts
2019-02-05 13:17:44 -08:00
David G Yu
d468aca0a2
Merge pull request #1053 from barfowl/far_patch_is_adaptive
Fixed Far::PatchDescriptor::IsAdaptive() for legacy Gregory
2019-02-05 13:17:28 -08:00
David G Yu
abb8af32c5 Minor changes to BoxSplineTri boundary computation
The computation to adjust patch evaluation weights
for box spline triangle patches to account for boundaries
has been updated to use simple conditional logic instead
of index indirection tables. This results in better register
resource usage for some shader compiler implementations.
Previously, these methods could fail to compile on some
systems.
2019-02-05 12:57:41 -08:00
barry
b83dd92757 Fix cracks between triangular Gregory patches along inf-sharp dart edges:
- corrected regular vs irregular assignment of the quartic mid-edge point
2019-02-04 11:19:24 -08:00
barry
de29bc897f Fix Far::PatchDescriptor::IsAdaptive() for legacy Gregory patches:
- determine based on patch type ID rather than control point count
2019-02-04 11:04:26 -08:00
barry
d1f601ef9b Enabled Far::PtexIndices::GetAdjacency() for triangular refinement 2019-01-30 20:55:18 -08:00
barry
673088637b Added public method to derive adaptive refinement options from patch options:
- PatchTableFactory::Options method returns TopologyRefiner::AdaptiveOptions
    - far/tutorial_6 and 9 updated to illustrate use of the new method
2019-01-28 18:02:12 -08:00
barry
a0e72d80c3 Changed Gregory triangle from cubic/quartic hyrid to full quartic:
- changed Far::PatchDescriptor size for GREGORY_TRIANGLE to 18
    - modified Far::LoopPatchBuilder to construct full quartic Gregory patch
    - fixed Far::LoopPatchBuilder bug related to face points near boundaries
    - updated Far patch basis evaluation for Gregory and Bezier triangles
    - updated Osd patch basis evaluation to match Far
    - updated Osd GLSL patch size for Gregory triangle to 18
    - modified Osd GLSL Gregory triangle eval and tess settings for quartic
2019-01-24 12:56:09 -08:00
David G Yu
bf38091ac3
Merge pull request #1037 from barfowl/far_stencil_table_ptr
Simplify the private PatchTable::StencilTableHandler class
2019-01-04 16:26:00 -08:00
barry
eb658d757b Removed unnecessary condition from new stencil table initialization method:
- existence of the StencilTable is now a pre-condition
2019-01-04 16:04:19 -08:00
barry
42a0be5cb9 Patches and regression shapes for Bilinear scheme:
- Bilinear patches derived from non-quads now correctly created
    - added new regression/shapes for Bilinear (non-planar and non-quad)
2018-12-21 12:35:31 -08:00
barry
808069c123 Fixed triangular patches with apex on an interior inf-sharp edge:
- test for presence of inf-sharp edges at corner not inf-sharpness
2018-12-20 11:46:03 -08:00
barry
01648eddbc Simplified PatchTable's private StencilTableHandler class:
- stripped StencilTableHandler down to simpler StencilTablePtr wrapper
    - replaced old convenience methods with direct conditions in PatchTable
    - created new private template methods to simplify PatchTableBuilder
2018-12-18 12:52:20 -08:00
David G Yu
13f4979763
Merge pull request #1033 from barfowl/far_patch_param_regular
Assign Far::PatchParam's regular bit consistent with Osd::PatchArray
2018-12-14 16:32:07 -08:00
David G Yu
8014b3ab08
Merge pull request #1032 from barfowl/far_tri_patch_map_bug
Fixed bug in Far::PatchMap for rotated triangular patches
2018-12-14 09:51:29 -08:00
barry
eaaa03b4b2 Enforce consistent assignment of Far::PatchParam's "regular" bit:
- extended PatchBuilder::ComputePatchParam() to specify bit value
    - updated PatchParam construction in PatchTableFactory
2018-12-12 17:59:17 -08:00
barry
a308267af3 Fixed bug in Far::PatchMap for rotated triangular patches:
- cancelled the rotation when in the rotated quadrant of a rotated triangle
2018-12-12 12:27:14 -08:00
barry
9219b0fb00 Fix Far::LimitStencilTableFactory issues with uniform refinement:
- corrected stencil estimates according to the interpolation mode
    - removed the added error checking for the tables provided
    - use uniform vertex patches when varying interpolation specified
2018-12-12 12:03:54 -08:00
barry
82856a410f Fixed PatchTableFactory internal option for uniform tables:
- set non-linear uniform option back to false for linear uniform tables
2018-11-20 14:24:52 -08:00
David G Yu
c16cdefc1d
Merge pull request #1025 from barfowl/far_quad_boundaries
Remove boundary isolation requirement for quads in adaptive refinement
2018-11-20 10:59:36 -08:00