Commit Graph

112 Commits

Author SHA1 Message Date
Thomas Thomassen
c92351a6fa Correct warning: "with mismatched bound [-Warray-parameter]" in level.cpp 2022-11-29 22:10:44 +01: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
David G Yu
6dde62d48f Fixed strict-aliasing warnings
Minor update to the implementation of a few internal tagging
methods in Vtr to avoid violating strict-aliasing rules.
Specifically, switched to using std::memcpy instead of
reinterpret_cast to implement type punning.
2020-02-28 16:28:33 -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
f4a3ee1283 Fixed sharpening of semi-sharp features on face-varying boundaries:
- updated VTag initialization to tag inf-sharp crease for semi-sharp values
2019-05-22 17:05:43 -07:00
barry
5aa10c8f55 Fixed max-valence assignment in refinement to account for non-manifold edges:
- consider the vertex from the edge with the maximum number of faces
2019-05-16 14:42:23 -07:00
barry
c42482e5c4 Modified initialization of non-manifold bit for face-varying tags:
- face-varying non-manifold status now OR'd with vertex non-manifold
2019-01-03 19:17:17 -08:00
barry
662dccfe4d Extended vertex tagging to improve handling of irregular faces:
- added new TopologyRefiner member to detect presence of irregular faces
    - added new Vtr::Level::VTag to indicate vertex incident an irregular face
    - populated new VTag bit when irregular faces present
    - updated refinement to clear new bit for refined faces
    - branch adaptive refinement in linear cases to avoid testing features
    - updated feature detection for irregular faces -- now a simple bit test
    - updated PatchBuilder with now-trivial test for incident irregular faces
2018-11-07 13:16:03 -08:00
barry
0520fc53ff Extended non-manifold patches to irregular to prevent gaps:
- Far::PatchBuilder additions to identify spans around non-manifold corners
    - re-organized patch regularity test to inspect individual corner features
    - updated partial span gathering function to handle non-manifold cases
    - ensure vertex tag xordinary bit remains unset when non-manifold
2018-11-01 10:17:40 -07:00
barry
99f6a27604 Simplified access to Vtr::Level tag bits for integer operations:
- added alternate/explicit constructor to initialize from integer bits
    - added accessor to retrieve collections of bits as an integer
    - replaced pointer aliasing in bitwise combinations with use of new methods
2018-09-25 15:51:01 -07:00
barry
a79a12269b Fixed rare non-manifold topology construction bug in Vtr::Level:
- use address arithmetic instead of std::vector[] to determine vector end
2018-08-27 11:00:37 -07:00
barry
5e8e123d73 Major refactor of the construction of Far::PatchTable:
- new PatchTableBuilder class now implements PatchTableFactory::Create()
        - population of tables now independent of scheme or patch type
        - nested LocalPointHelper handles local point sharing and stencils
    - new PatchBuilder class encapsulates patch queries and conversions:
        - provides patch types associated with schemes and client options
        - handles all topological queries about patches in the base class
        - subclasses for the three subdivision schemes to support conversions
        - conversions encapsulated in new SparseMatrix class for re-use
    - removed Far end-cap factory classes and Far::GregoryBasis
    - extended adaptive refinement to support Bilinear scheme (not enabled)
    - extended Vtr::StackBuffer to avoid compiler inefficiencies
2018-05-08 17:24:14 -07:00
Mike Erwin
fc19cd2604 spelling phase 2
For completeness, ran files through an automated spell checker (Visual
Studio plugin) which caught several things missed while reading.
2017-01-24 22:48:44 -08:00
Mike Erwin
0beb654f0b spelling
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.

Didn't bother with Hbr library.

Comments only, no functional changes.
2017-01-11 12:40:49 -08:00
barry
d45b8c68a2 Bug fixes and improvements for face-varying and inf-sharp patches:
- extended smooth corner patch approximation to fvar and inf-sharp patches
    - fixed assignment and refinement bugs for inf-sharp tags in fvar space
    - fixed interpolation bug with Bilinear scheme and LINEAR_NONE option
    - added public methods for fvar topology to Far::TopologyRefiner
2016-10-12 13:08:35 -07:00
barry
4e0c2dc763 Fixed overly aggressive adaptive refinement of face-varying channels:
- added Vtr::Level method to combine VTags for all FVar values of a vertex
    - updated adaptive refinement of FVar data to use combined VTags of corners
2016-09-29 22:54:05 -07:00
barry
b3b0a93a9d Fixed face-varying tagging bug affecting refinement for patches:
- correctly tag sharpened boundaries as irregular
    - distinguish the single-value case between dart and boundary
2016-09-27 19:42:10 -07:00
barry
9832e11939 A few bug fixes and minor improvements for inf-sharp patches:
- updated face-varying VTag conversion to set VTag::_corner correctly
    - updated adaptive refinement to prevent over-isolation of inf-sharp features
    - fixed patch regularity test when inf-sharp and xord features not separated
      at level 0 or 1
    - generalized BSpline end-cap factory boundary test to defer to Gregory patch
      for any non-smooth corner
2016-09-26 19:14:42 -07:00
barry
c17b241293 Improved internal span types for better non-manifold support:
- changed Level::VSpan start member from edge to face local index
    - added additional Level::VSpan members for non-manifold cases
    - updated existing usage of Level::VSpan for new members and methods
    - moved and updated definition of FVarLevel::ValueSpan for clarity
2016-09-19 14:18:51 -07:00
barry
89c1765c73 Minor updates to tags for face-varying and inf-sharp topology:
- removed unused tag for inf-sharp features from Vtr::Level::VTag
    - added tags for inf-sharp features to Vtr::FVarLevel::ValueTag
    - updated the conversion from ValueTag to VTag
    - removed awkward and little used tagging methods from Vtr::FVarLevel
    - replaced obsolete methods in face-varying adaptive refinement
2016-09-15 23:03:48 -07:00
barry
653801588e Improved topology inspection and construction of face-varying patches:
- changes mainly involve Far::PatchTableFactory
    - treatment of patches more clearly separated into regular and irregular
    - patch identification now determines regularity and defers classification
    - topology inspection specialized for regular vs irregular patches
    - face-verying patches re-use patch information when topology matches
    - added Vtr::Level methods to improve access to tags for face-varying values
    - improved initial tagging of face-varying values in Vtr::FVarLevel
2016-09-02 20:53:24 -07:00
barry
a9ecd79c32 Added new VTags for inf-sharp features:
- 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
2016-07-20 16:16:52 -07:00
Dave Clyde
61d0c66531 Merge current github/dev into pull request 760 2016-07-16 20:52:54 -07:00
barry
da204a2d2d Improved Vtr::Level::isSingleCreasePatch() test:
- make greater use of the VTags of the face corners
    - results in quicker rejection and reduced iteration
2016-07-14 13:46:13 -07:00
barry
2d33a6ebf4 Adding VSpan to standardize representation of partial rings around vertices:
- 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
2016-07-13 18:16:11 -07:00
Thomas Thomassen
aa0599b4bc Merge branch 'dev'
Conflicts:
	opensubdiv/far/patchTableFactory.cpp
2016-06-24 23:30:44 +02:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
Thomas Thomassen
c422a79031 Rename and, or and not to &&, || and ! to address compilers that don't support them out of the box without extra headers. 2016-02-21 15:47:11 +01:00
Dave Clyde
c095f48d65 Comment typos / whitespace. 2015-11-16 14:39:58 -08:00
David G Yu
b1ab8e3f8b Fixed single crease patch classification
This fixes a regression in the function used to identify single crease
patches. This also updates the patch color values used by the glImaging
regression test to match the colors used in other example viewers so
that patch types can be more easily identified during automated testing.
2015-08-04 17:50:51 -07:00
barfowl
db3fe9a8e8 Reduced warnings resulting from GCC's -Wshadow option
- eliminated warnings from core libraries and regression code
2015-07-29 18:46:18 -07:00
barfowl
ad6b1f9117 Eliminate or encapsulate ICC pragmas:
- eliminated need for disabling warning 177 in far/patchTableFactory.cpp
    - encapsulated all floating point equality tests (1572) in local functions
    - bracketed all ICC specific warning pragmas with #ifdef __INTEL_COMPILER
    - avoided GCC's stricter shadowing warning in vtr/array.h
2015-07-20 17:56:00 -07:00
Sheng Fu
fe20023989 minimize the scope of disabled warnings 2015-07-16 09:27:48 -07:00
Sheng Fu
59382abeaa Fix Intel compiler warning 2015-07-16 09:27:48 -07:00
barfowl
50e2623b91 Fixed initialization of unconnected vertices in FVar channels
- correctly initialize FVar tag and source entry for unconnected verts
    - added regression/shape with unconnected vertices and fvar data
    - fixed edge-face vector access when unconnected edges are last
2015-07-12 18:30:26 -07:00
Christopher Jones
8a74831b2e Fix out of range access issues when a non-connected vertex occurs at the end of mesh's vertex list or mesh has face varying data. 2015-07-05 10:43:00 -06:00
barfowl
c08f6a502f Code tweak to prevent build failure in iOS with XCode7
- added space between literal strings in macro using concatenation
2015-06-18 19:47:19 -07:00
barfowl
bae35a9f1e Removed StackBuffer::operator[] to remove MSVC overloading ambiguity error
- removed operator[] -- now rely on (TYPE*)[]
    - added comments regarding reliance on implicit casting
2015-06-10 18:14:14 -07:00
barfowl
c748cf6cfa Made channel argument non-optional for internal face-varying methods
- removed default value assignment in Vtr::Level and Far::PatchTable
    - fixed one place where the expected channel argument was omitted
2015-06-03 19:23:50 -07:00
jcowles
b081055fe9 Clean up compiler warnings.
stb - potential use of uninitialized variable (this may have been safe)
farViewer - unused variable
patchTableFactory - _channelIndices potentially used uninitialized
FVarLevel - valueIndexInFace0 potentially used used uninitialized (was safe)
2015-06-03 13:17:40 -07:00
barfowl
39eae0195f Renamed internal face-varying methods for consistency with public
- renamed Vtr::Level::getFVarFaceValues() to getFaceFVarValues()
    - updated all usage
2015-06-01 20:31:27 -07:00
barfowl
13e0850ac6 Re-protected members of all major Vtr classes:
- change public status of members back to protected/private
    - mimized friends (primarily Refinements as builders for Levels)
    - added any missing accessors to prevent member access (mainly Tags)
    - added the Tri/Quad refinement subclasses to private header list
2015-06-01 17:38:11 -07:00
barfowl
2e6cab8df4 Eliminated direct member access to Vtr classes from Far:
- added required/missing access methods to Vtr
    - replaced direct member access in Far with appropriate methods
2015-05-31 18:26:13 -07:00
barfowl
6ce3292576 Moved Vtr::MaskInterface into Far::PrimvarRefiner:
- updated PrimvarRefiner to make use of now-local Mask class
    - renamed vtr/maskInterfaces.h to vtr/componentInterfaces.h
    - updated usage of renamed header file and CMakeLists.txt
2015-05-27 20:44:06 -07:00
barfowl
0a86d6fe44 Moved base-face propagation to Far::PrimvarRefiner:
- removed TopologyRefiner options to propagate base face in Refinememt
    - removed all Vtr storage and management of base face
    - added PrimvarRefiner methods to "interpolate" per-face primvar data
2015-05-26 19:56:39 -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
barfowl
b64eb5e2e0 Removing friends from Vtr classes and making more accessible internally:
- removed all friend declarations (no more Far declarations with Vtr)
    - all protected methods made public
    - intent is to move these into namespace internal
    - access between Vtr classes is under review
2015-05-22 15:52:47 -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
barfowl
05e9c48ea9 Raised maximum valence supported by Vtr and included new test shapes:
- changed Vtr::LocalIndex to 16-bit integer from 8-bit
    - added test shapes including valence 360 vertices
    - disabled new shapes in far/regression until improved accuracy accepted
2015-05-20 23:36:45 -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