Commit Graph

82 Commits

Author SHA1 Message Date
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
jcowles
9d32712ec4 Prefix header guards and add pragma once. 2015-05-19 11:22:37 -07:00
George ElKoura
687cc4f8d9 Return *this from operator= in vtr/stackBuffer.h 2015-04-30 19:11:51 -07:00
George ElKoura
12c421e36c Satisfy compiler warnings about unused parameters.
In vtr/stackBuffer.h, removed  unnecessary symbols for parameters to silence
compiler warnings about them not being used.
2015-04-30 18:40:44 -07:00
barfowl
abce99950d Minor improvements to definition and use of Vtr::StackBuffer:
- removed default value for its <SIZE> parameter
    - updated all usage to specify a value for <SIZE>
    - added explicit element destruction missing from destructor
    - corrected comment regarding VLA's being non-standard
2015-04-28 17:31:43 -07:00
David G Yu
46b2cac54b Fixed gathering of patches near non-manifold topo
The previous change to the gathering of patch points went
a bit too far. Near non-manifold features it is important
to be careful when traversing the faces in a level to avoid
assumptions that are valid only for manifold topology.

Also, removed Vtr::Level::gatherQuadRegularPatchPoints().
This method was added in my previous change, but it is
unsafe to use in the presence of non-manifold topology.
2015-04-27 12:40:18 -07:00
barfowl
ce223949f2 Introduced StackBuffer class to replace/extend usage of alloca():
- add Vtr::StackBuffer to allocate from heap beyond local arena size
    - replaced usage of alloca() with Vtr
2015-04-26 17:04:18 -07:00
David G Yu
f19a41105d Fixed orientation of boundary and corner patches
Now a boundary and corner patch remains
aligned with its underlying parametric
orientation. This simplifies both the
gathering of patch vertices and downstream
evaluation of patches.

Added a method to Vtr::Level which gathers
the 16 patch points for a B-spline patch
even if the patch has boundary or corner
edges.  The undefined patch vertex index
values along boundary and corner edges are
assigned Vtr::INDEX_INVALID.

In order to simplifiy the process of drawing
B-spline patches with boundary or corner
edges, the Far::PatchTablesFactory will
replace any invalid vertex indices with
a known good value, i.e. the index of the
first patch face vertex.

Single-crease patches are still a slightly
special case, which will be resolved later.
2015-04-24 15:33:04 -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
barfowl
898d68ae79 Minor additions and revisions to TopologyRefiner interface:
- new Options for Refine() methods for base face and vertex ordering
    - removed ignored/unused "full topology" choice from AdaptiveOptions
    - added base face and vertex ordering logic to Refinement
    - addition of TopologyRefiner members for component counts and max valence
    - refactoring of Level additions to update all new member totals
    - addition of GetMaxValence() to TopologyRefiner
    - updated PatchTablesFactory to user new GetMaxValence() method
    - renaming of "Hole" methods for TopologyRefiner and Vtr::Level
2015-04-01 20:44:33 -07:00
barfowl
068ea4c7fa Face-varying fixes to support non-manifold features:
- updated original FVar inspection to deal witn non-manifold vertices
    - updated FVar refinement to handle > 2 faces per edge
    - couple of fixes to use parent topology when child not present
2015-03-31 11:50:58 -07:00
George ElKoura
d38d683d0a Make sure to update the _maxEdgeFaces in the child from the parent
level before we do any further population from the parent as that may
further modify the child's _maxEdgeFaces.  When _maxEdgeFaces is incorrect
we may end up with stack corruption problems when
Far::TopologyRefiner::interpolateChildVertsFromEdges() goes to use this data
to allocate some stack space.
2015-03-30 18:49:26 -07:00
barfowl
7ebb04bdcb Fixed bugs arising from degenerate edges and triangles:
- avoid repeated edges within the same face on construction
    - corrected degenerate edge detection in tri-split refinement
2015-03-24 17:37:37 -07:00
barfowl
e583b80271 Completed support for non-manifold topology (degenerate, reversed edges, etc.):
- added edge-face local-indices to Vtr::Level members
    - added internal and public access to edge-face local-indices
    - updated refinement methods to use and populate edge-face local-indices
    - updated refinement methods to be sensitive to degenerate edges
    - added Vtr::VALENCE_LIMIT constant for internal use
    - updated Vtr::Level topology completion to fail on valence overflow
    - simplfied non-manifold edge handling in Vtr::Level topology completion
    - updated warnings for all topology construction failures
    - added detection and warning when passing non-triangles for Loop
2015-03-15 20:22:00 -07:00
barfowl
9a41cf59c4 Minor revisions to recent promotion regarding smooth UV's in Far:
- changed return type of Vtr array empty() to bool
    - renamed and adjusted arguments to Vtr gather methods for consistency
    - removed lone Vtr gather method that took an explicit offset
    - updated usage of revised Vtr gather methods in Far
    - fixed warnings redeclaring names of local variables already in use
2015-03-05 13:09:27 -08:00
manuelk
d0a624f373 Add "smooth UVs" to Far
- extend Far::PatchTables data structures & interfaces to store requisite
  information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
  channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
2015-02-26 13:57:47 -08:00
barfowl
4ced1b1461 Revised Level::VTags for semi-sharpness and added corner tag:
- added new tag for sharp corner, now used in isolation
    - split single semi-sharp tag in two for vertex and edge sharpness
    - updated tag propagation and all tests of previous semi-sharp tag
    - added clear() methods for all tags and simplified initialization
2015-02-25 20:02:10 -08:00
barfowl
2213d86a59 Fixed bug retrieving and merging tags for FVar values:
- added Vtr::FVarLevel method to resolve correct index in level 0 case
    - updated tag retrieval methods that used face-value array as input
    - changed signatures to accept face-verts when needed and updated usage
2015-02-25 11:02:53 -08:00
barfowl
588c3060b3 Added Vtr::FVarLevel method to merge FVar edge tags with Vtr::Level::Etags 2015-02-17 14:16:35 -08:00
barfowl
7152b1b1bf More support for feature-adaptive consideration of face-varying topology:
- added methods to FVarLevel to combine FVar tags with vertex tags
    - use composite of combined tag to find FVar features needing isolation
    - added more tagging related to the "linear borders" interpolation case
2015-02-11 20:51:00 -08:00
barfowl
5d868200db Introduction of face-varying channels influencing feature adaptive refinement:
- added FVar channel consideration to TopologyRefiner's feature selection
    - added more simple access methods to FVarLevel
    - added _xordinary tag to FVarLevel::ValueTag; initialize and refine
    - added composite tag method for FVarLevel::ValueTag similar to Level::VTag
    - parameterize FVar topology initialization with regular valence
2015-02-09 17:41:19 -08:00
barfowl
2f69c34c88 Extended Vtr patch gathering methods to access face-varying values:
- renamed and extended gathering methods with fvar channel index
    - renamed usage of gathering methods in far/patchTablesFactory
2015-01-29 21:06:47 -08:00
barfowl
47a24444e7 Make sure vertex-face relation enabled in Vtr when refining FVar channels. 2015-01-14 16:52:06 -08:00
manuelk
1c27755564 Change subdivision vertex ordering
- switch to vert-verts first ordering (advantageous as it preserves the index of a parent vertex at all subsequent levels)
2015-01-09 11:38:32 -08:00
barfowl
0817488b0d Merge branch 'dev' of github.com:PixarAnimationStudios/OpenSubdiv into dev 2015-01-06 17:41:54 -08:00
manuelk
32139c40e1 Remove duplicate header 2015-01-06 16:26:32 -08:00
barfowl
f8e7549d1b Removed old to COMPUTE_MASK_WEIGHTS and store them within a Refinement. 2015-01-06 16:08:11 -08:00
barfowl
6115eb9c4d Moved <sdc/type.h> to <sdc/types.h> 2015-01-06 14:26:20 -08:00
manuelk
e1b6434968 Fix build warnings (icc -w3) 2015-01-06 10:56:29 -08:00
barfowl
6b71744a26 Minor changes to address warnings and remarks issues by ICC. 2015-01-05 18:56:24 -08:00