This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HdMeshTopology Class Reference

Topology data for meshes. More...

#include <meshTopology.h>

Inherits HdTopology.

Public Member Functions

HD_API HdMeshTopology (const HdMeshTopology &, int refineLevel=0)
 
HD_API HdMeshTopology (const PxOsdMeshTopology &, int refineLevel=0)
 
HD_API HdMeshTopology (const TfToken &scheme, const TfToken &orientation, const VtIntArray &faceVertexCounts, const VtIntArray &faceVertexIndices, int refineLevel=0)
 
HD_API HdMeshTopology (const TfToken &scheme, const TfToken &orientation, const VtIntArray &faceVertexCounts, const VtIntArray &faceVertexIndices, const VtIntArray &holeIndices, int refineLevel=0)
 
HD_API HdMeshTopologyoperator= (const HdMeshTopology &copy)
 
PxOsdMeshTopology const & GetPxOsdMeshTopology () const
 
HD_API int GetNumFaces () const
 Returns the num faces.
 
HD_API int GetNumFaceVaryings () const
 Returns the num facevarying primvars.
 
HD_API int GetNumPoints () const
 Returns the num points of the topology vert indices array.
 
TfToken const GetScheme () const
 Returns the subdivision scheme.
 
int GetRefineLevel () const
 Returns the refinement level.
 
VtIntArray const & GetFaceVertexCounts () const
 Returns face vertex counts.
 
VtIntArray const & GetFaceVertexIndices () const
 Returns face vertex indics.
 
TfToken const & GetOrientation () const
 Returns orientation.
 
virtual HD_API ID ComputeHash () const
 Returns the hash value of this topology to be used for instancing.
 
HD_API bool operator== (HdMeshTopology const &other) const
 Equality check between two mesh topologies.
 
Hole
void SetHoleIndices (VtIntArray const &holeIndices)
 Sets hole face indices.
 
VtIntArray const & GetHoleIndices () const
 Returns the hole face indices.
 
Subdivision
void SetSubdivTags (PxOsdSubdivTags const &subdivTags)
 Sets subdivision tags.
 
PxOsdSubdivTags const & GetSubdivTags () const
 Returns subdivision tags.
 
Geometry subsets
HD_API void SetGeomSubsets (HdGeomSubsets const &geomSubsets)
 Sets geometry subsets.
 
HD_API HdGeomSubsets const & GetGeomSubsets () const
 Returns geometry subsets.
 
Topological invisibility
HD_API void SetInvisiblePoints (VtIntArray const &invisiblePoints)
 
HD_API VtIntArray const & GetInvisiblePoints () const
 
HD_API void SetInvisibleFaces (VtIntArray const &invisibleFaces)
 
HD_API VtIntArray const & GetInvisibleFaces () const
 

Static Public Member Functions

static HD_API bool IsEnabledAdaptive ()
 Returns whether adaptive subdivision is enabled or not.
 
static HD_API int ComputeNumPoints (VtIntArray const &verts)
 Returns the num points by looking vert indices array.
 

Protected Attributes

PxOsdMeshTopology _topology
 
HdGeomSubsets _geomSubsets
 
VtIntArray _invisiblePoints
 
VtIntArray _invisibleFaces
 
int _refineLevel
 
int _numPoints
 

Detailed Description

Topology data for meshes.

HdMeshTopology holds the raw input topology data for a mesh and is capable of computing derivative topological data (such as indices or subdivision stencil tables and patch tables).

Definition at line 38 of file meshTopology.h.

Member Function Documentation

◆ ComputeHash()

virtual HD_API ID ComputeHash ( ) const
virtual

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

◆ ComputeNumPoints()

static HD_API int ComputeNumPoints ( VtIntArray const &  verts)
static

Returns the num points by looking vert indices array.

◆ GetFaceVertexCounts()

VtIntArray const & GetFaceVertexCounts ( ) const
inline

Returns face vertex counts.

Definition at line 100 of file meshTopology.h.

◆ GetFaceVertexIndices()

VtIntArray const & GetFaceVertexIndices ( ) const
inline

Returns face vertex indics.

Definition at line 105 of file meshTopology.h.

◆ GetGeomSubsets()

HD_API HdGeomSubsets const & GetGeomSubsets ( ) const
inline

Returns geometry subsets.

Definition at line 167 of file meshTopology.h.

◆ GetHoleIndices()

VtIntArray const & GetHoleIndices ( ) const
inline

Returns the hole face indices.

Definition at line 133 of file meshTopology.h.

◆ GetInvisibleFaces()

HD_API VtIntArray const & GetInvisibleFaces ( ) const
inline

Definition at line 193 of file meshTopology.h.

◆ GetInvisiblePoints()

HD_API VtIntArray const & GetInvisiblePoints ( ) const
inline

Definition at line 183 of file meshTopology.h.

◆ GetNumFaces()

HD_API int GetNumFaces ( ) const

Returns the num faces.

◆ GetNumFaceVaryings()

HD_API int GetNumFaceVaryings ( ) const

Returns the num facevarying primvars.

◆ GetNumPoints()

HD_API int GetNumPoints ( ) const

Returns the num points of the topology vert indices array.

◆ GetOrientation()

TfToken const & GetOrientation ( ) const
inline

Returns orientation.

Definition at line 110 of file meshTopology.h.

◆ GetPxOsdMeshTopology()

PxOsdMeshTopology const & GetPxOsdMeshTopology ( ) const
inline

Definition at line 69 of file meshTopology.h.

◆ GetRefineLevel()

int GetRefineLevel ( ) const
inline

Returns the refinement level.

Definition at line 95 of file meshTopology.h.

◆ GetScheme()

TfToken const GetScheme ( ) const
inline

Returns the subdivision scheme.

Definition at line 90 of file meshTopology.h.

◆ GetSubdivTags()

PxOsdSubdivTags const & GetSubdivTags ( ) const
inline

Returns subdivision tags.

Definition at line 149 of file meshTopology.h.

◆ IsEnabledAdaptive()

static HD_API bool IsEnabledAdaptive ( )
static

Returns whether adaptive subdivision is enabled or not.

◆ operator==()

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

Equality check between two mesh topologies.

◆ SetGeomSubsets()

HD_API void SetGeomSubsets ( HdGeomSubsets const &  geomSubsets)
inline

Sets geometry subsets.

Definition at line 161 of file meshTopology.h.

◆ SetHoleIndices()

void SetHoleIndices ( VtIntArray const &  holeIndices)
inline

Sets hole face indices.

faceIndices needs to be sorted in ascending order.

Definition at line 128 of file meshTopology.h.

◆ SetInvisibleFaces()

HD_API void SetInvisibleFaces ( VtIntArray const &  invisibleFaces)
inline

Definition at line 188 of file meshTopology.h.

◆ SetInvisiblePoints()

HD_API void SetInvisiblePoints ( VtIntArray const &  invisiblePoints)
inline

Definition at line 178 of file meshTopology.h.

◆ SetSubdivTags()

void SetSubdivTags ( PxOsdSubdivTags const &  subdivTags)
inline

Sets subdivision tags.

Definition at line 144 of file meshTopology.h.

Member Data Documentation

◆ _geomSubsets

HdGeomSubsets _geomSubsets
protected

Definition at line 200 of file meshTopology.h.

◆ _invisibleFaces

VtIntArray _invisibleFaces
protected

Definition at line 202 of file meshTopology.h.

◆ _invisiblePoints

VtIntArray _invisiblePoints
protected

Definition at line 201 of file meshTopology.h.

◆ _numPoints

int _numPoints
protected

Definition at line 204 of file meshTopology.h.

◆ _refineLevel

int _refineLevel
protected

Definition at line 203 of file meshTopology.h.

◆ _topology

PxOsdMeshTopology _topology
protected

Definition at line 199 of file meshTopology.h.


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