All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdBasisCurvesTopology Class Reference

Topology data for basisCurves. More...

Inherits HdTopology.

Inherited by HdSt_BasisCurvesTopology.

Public Member Functions

HD_API HdBasisCurvesTopology (const HdBasisCurvesTopology &src)
 
HD_API HdBasisCurvesTopology (const TfToken &curveType, const TfToken &curveBasis, const TfToken &curveWrap, const VtIntArray &curveVertexCounts, const VtIntArray &curveIndices)
 
VtIntArray const & GetCurveVertexCounts () const
 Returns segment vertex counts. More...
 
VtIntArray const & GetCurveIndices () const
 Returns indicies. More...
 
TfToken GetCurveType () const
 See class documentation for valid combination of values. More...
 
TfToken GetCurveBasis () const
 
TfToken GetCurveWrap () const
 
bool HasIndices () const
 Does the topology use an index buffer. More...
 
virtual HD_API ID ComputeHash () const
 Returns the hash value of this topology to be used for instancing. More...
 
HD_API bool operator== (HdBasisCurvesTopology const &other) const
 Equality check between two basisCurves topologies. More...
 
HD_API bool operator!= (HdBasisCurvesTopology const &other) const
 
HD_API size_t CalculateNeededNumberOfControlPoints () const
 Figure out how many vertices / control points this topology references. More...
 
HD_API size_t CalculateNeededNumberOfVaryingControlPoints () const
 Figure out how many control points with varying data this topology needs. More...
 
- Public Member Functions inherited from HdTopology
virtual ID ComputeHash () const =0
 Returns the hash value of this topology to be used for instancing. More...
 

Additional Inherited Members

- Public Types inherited from HdTopology
typedef uint64_t ID
 

Detailed Description

Topology data for basisCurves.

HdBasisCurvesTopology holds the raw input topology data for basisCurves

The Type, Basis and Wrap mode combined describe the curve and it's segments.

If Type == linear, the curve is a bunch of line segments and basis is ignored.

The wrap mode defines how the curve segments are specified:

If Wrap == segmented, this is equivalent to GL_LINES and curve vertex counts is 2 * number of segments (multiple entries in curve vertex array is optional).

If Wrap == nonperiodic, this is equivalent to GL_LINE_STRIP and curve counts is an array where each entry is the number of vertices in that line segment. The first and last vertex in the segment are not joined.

If Wrap == periodic, this is equivalent to GL_LINE_LOOP and curve counts is an array where each entry is the number of vertices in that line segment. An additional line is place between the first and last vertex in each segment.

If Type == cubic, the type of curve is specified by basis: The Basis can be bezier, bspline or catmullRom.

Wrap can be either periodic or nonperiodic (segmented is unsupported).

For each type of line, the generated vertex indices can pass through an optional index buffer to map the generated indices to actual indices in the vertex buffer.

Definition at line 82 of file basisCurvesTopology.h.

Member Function Documentation

HD_API size_t CalculateNeededNumberOfControlPoints ( ) const

Figure out how many vertices / control points this topology references.

HD_API size_t CalculateNeededNumberOfVaryingControlPoints ( ) const

Figure out how many control points with varying data this topology needs.

virtual HD_API ID ComputeHash ( ) const
virtual

Returns the hash value of this topology to be used for instancing.

VtIntArray const& GetCurveIndices ( ) const
inline

Returns indicies.

Definition at line 106 of file basisCurvesTopology.h.

TfToken GetCurveType ( ) const
inline

See class documentation for valid combination of values.

Definition at line 111 of file basisCurvesTopology.h.

VtIntArray const& GetCurveVertexCounts ( ) const
inline

Returns segment vertex counts.

Definition at line 101 of file basisCurvesTopology.h.

bool HasIndices ( ) const
inline

Does the topology use an index buffer.

Definition at line 116 of file basisCurvesTopology.h.

HD_API bool operator== ( HdBasisCurvesTopology const &  other) const

Equality check between two basisCurves topologies.


The documentation for this class was generated from the following file: