HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_TriangleMeshT< T > Class Template Reference

#include <GU_TriangleMesh.h>

+ Inheritance diagram for GU_TriangleMeshT< T >:

Public Types

enum  Tessellation { TRIANGULATE_ALL = 0, SPLIT_CONVEX_QUADS }
 
using HedgeInterface = GEO_DetachedHedgeInterface
 
using Base = UT_EmbeddedTriangleMesh< GU_TriangleMeshDetailLinkT< T > >
 
- Public Types inherited from UT_EmbeddedTriangleMesh< GU_TriangleMeshDetailLinkT< T > >
using PointCoords = typename GU_TriangleMeshDetailLinkT< T >::value_type
 
using Real = typename PointCoords::value_type
 
using Complex = typename std::complex< Real >
 
using Vector3 = UT_Vector3T< Real >
 

Public Member Functions

 GU_TriangleMeshT (const GU_Detail *gdp, GA_RWHandleI vtx_pt_attr=GA_RWHandleI(), Tessellation tessellation=TRIANGULATE_ALL, const GA_Attribute *pos_attr=nullptr)
 
SYS_FORCE_INLINE const GU_DetailgetDetail () const
 
SYS_FORCE_INLINE const
GA_OffsetArray
polys () const
 
SYS_FORCE_INLINE void appendPoly (GA_Offset poly)
 
void appendPolys (const GA_Range &polys)
 
void buildMesh (const HedgeInterface *hip=nullptr, const GA_EdgeGroup *seams=nullptr, UT_IntArray *shared_vtx_idx_array=nullptr, bool allow_zero_length_edges=false)
 
template<typename Func >
void forEachPolyVertex (Func func) const
 
template<typename Func >
void forEachDetailVertex (Func func) const
 
SYS_FORCE_INLINE int vertexFromDetailVertex (GA_Offset vtx) const
 
SYS_FORCE_INLINE int pointFromDetailVertex (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset hedgeToDetailVertex (int h) const
 
SYS_FORCE_INLINE int hedgeFromDetailVertex (GA_Offset vtx) const
 
SYS_FORCE_INLINE GA_Offset vertexToDetailVertex (int v) const
 
SYS_FORCE_INLINE GA_Offset triangleToDetailPoly (int t) const
 
SYS_FORCE_INLINE GA_Offset pointToDetailVertex (int pt) const
 
SYS_FORCE_INLINE GA_Offset pointToDetailPoint (int pt) const
 
Tessellation tessellation () const
 
fpreal area () const
 
fpreal polyArea (exint poly_idx) const
 
SYS_FORCE_INLINE bool isBuilt () const
 
int numPrimaryPoints () const
 
- Public Member Functions inherited from UT_EmbeddedTriangleMesh< GU_TriangleMeshDetailLinkT< T > >
 UT_EmbeddedTriangleMesh ()=default
 
SYS_FORCE_INLINE auto pointPosition (int pt) const
 
void setMeshPointPositions (const GU_TriangleMeshDetailLinkT< T > *ptpos)
 
bool hasEmbedding () const
 
SYS_FORCE_INLINE auto triangleBarycenter (int t) const
 
SYS_FORCE_INLINE auto triangleNormal (int t, bool normalize=true) const
 
SYS_FORCE_INLINE auto triangleArea (int t) const
 
auto triangleGradient (int t, T f0, T f1, T f2) const
 
Vector3 pointGradient (int p, const F &tri_fn, const A &pt_atlas) const
 
auto triangleLaplacian (int t, const F &tri_fn) const
 
auto pointLaplacian (int p, const F &pt_fn) const
 
SYS_FORCE_INLINE auto hedgeVector (int h) const
 
SYS_FORCE_INLINE auto hedgeLength (int h) const
 
SYS_FORCE_INLINE auto dualHedgeLength (int h) const
 
SYS_FORCE_INLINE auto hedgeDihedralAngle (int h) const
 
SYS_FORCE_INLINE auto hedgeCotan (int h) const
 
SYS_FORCE_INLINE auto hedgeAngle (int h) const
 
SYS_FORCE_INLINE auto pointDualArea (int p) const
 
SYS_FORCE_INLINE auto pointAngleSum (int p) const
 
SYS_FORCE_INLINE auto pointNormal (int p, bool area_weighted=false) const
 
SYS_FORCE_INLINE auto pointGaussCurvature (int p) const
 
SYS_FORCE_INLINE auto pointMeanCurvature (int p) const
 
SYS_FORCE_INLINE auto triangleGaussCurvature (int t) const
 
SYS_FORCE_INLINE auto triangleMeanCurvature (int t) const
 
SYS_FORCE_INLINE Complex triangleMaxPrincipalDirection (int t) const
 
Vector3 extrinsicTriangleTangent (int p, Real radial, Real angular) const
 
SYS_FORCE_INLINE Vector3 extrinsicTriangleTangent (int t, Complex z) const
 
- Public Member Functions inherited from UT_TriangleMesh
 UT_TriangleMesh ()=default
 
void build (const UT_IntArray &tri_pts, const UT_IntArray *boundary_edge_pts=nullptr, bool reindex_points=false, const UT_IntArray *hedge_pair_class=nullptr)
 
SYS_FORCE_INLINE int numTriangles () const
 
SYS_FORCE_INLINE int numPoints () const
 
SYS_FORCE_INLINE int numHedges () const
 
SYS_FORCE_INLINE int numVertices () const
 
SYS_FORCE_INLINE int triangleHedge (int t, int j=0) const
 
SYS_FORCE_INLINE int triangleVertex (int t, int j=0) const
 
SYS_FORCE_INLINE int hedgeTriangle (int h) const
 
SYS_FORCE_INLINE int vertexTriangle (int v) const
 
SYS_FORCE_INLINE int trianglePoint (int t, int j=0) const
 
SYS_FORCE_INLINE int srcVertex (int h) const
 
SYS_FORCE_INLINE int dstVertex (int h) const
 
SYS_FORCE_INLINE int apxVertex (int h) const
 
SYS_FORCE_INLINE int onext (int h) const
 
SYS_FORCE_INLINE int vertexPoint (int v) const
 
SYS_FORCE_INLINE int srcPoint (int h) const
 
SYS_FORCE_INLINE int dstPoint (int h) const
 
SYS_FORCE_INLINE int apxPoint (int h) const
 
SYS_FORCE_INLINE int lnext (int h) const
 
SYS_FORCE_INLINE int lprev (int h) const
 
SYS_FORCE_INLINE int sym (int h) const
 
SYS_FORCE_INLINE int pointVertex (int p) const
 
SYS_FORCE_INLINE int pointHedge (int p) const
 
SYS_FORCE_INLINE bool isBoundaryHedge (int h) const
 
SYS_FORCE_INLINE bool isBoundaryPoint (int p) const
 
SYS_FORCE_INLINE int numBoundaries () const
 
SYS_FORCE_INLINE int boundaryHedge (int comp) const
 
SYS_FORCE_INLINE int hedgeBoundary (int h) const
 
void traceBoundary (int h0, UT_IntArray &bd) const
 
int numInteriorHedges () const
 
int numBoundaryHedges () const
 
int numBoundaryPoints () const
 
int numInteriorPoints () const
 
int numEdges () const
 
int eulerCharacteristic () const
 

Protected Member Functions

SYS_FORCE_INLINE UT_Vector3R detailVertexPosition (GA_Offset vtx) const
 

Detailed Description

template<typename T>
class GU_TriangleMeshT< T >

Definition at line 133 of file GU_TriangleMesh.h.

Member Typedef Documentation

Definition at line 138 of file GU_TriangleMesh.h.

template<typename T >
using GU_TriangleMeshT< T >::HedgeInterface = GEO_DetachedHedgeInterface

Definition at line 137 of file GU_TriangleMesh.h.

Member Enumeration Documentation

template<typename T >
enum GU_TriangleMeshT::Tessellation
Enumerator
TRIANGULATE_ALL 
SPLIT_CONVEX_QUADS 

Definition at line 141 of file GU_TriangleMesh.h.

Constructor & Destructor Documentation

template<typename T >
GU_TriangleMeshT< T >::GU_TriangleMeshT ( const GU_Detail gdp,
GA_RWHandleI  vtx_pt_attr = GA_RWHandleI(),
Tessellation  tessellation = TRIANGULATE_ALL,
const GA_Attribute pos_attr = nullptr 
)
explicit

Member Function Documentation

template<typename T >
SYS_FORCE_INLINE void GU_TriangleMeshT< T >::appendPoly ( GA_Offset  poly)
inline

Definition at line 182 of file GU_TriangleMesh.h.

template<typename T >
void GU_TriangleMeshT< T >::appendPolys ( const GA_Range polys)
template<typename T >
fpreal GU_TriangleMeshT< T >::area ( ) const
inline

Definition at line 279 of file GU_TriangleMesh.h.

template<typename T >
void GU_TriangleMeshT< T >::buildMesh ( const HedgeInterface hip = nullptr,
const GA_EdgeGroup seams = nullptr,
UT_IntArray shared_vtx_idx_array = nullptr,
bool  allow_zero_length_edges = false 
)
template<typename T >
SYS_FORCE_INLINE UT_Vector3R GU_TriangleMeshT< T >::detailVertexPosition ( GA_Offset  vtx) const
inlineprotected

Definition at line 292 of file GU_TriangleMesh.h.

template<typename T >
template<typename Func >
void GU_TriangleMeshT< T >::forEachDetailVertex ( Func  func) const
inline

Definition at line 234 of file GU_TriangleMesh.h.

template<typename T >
template<typename Func >
void GU_TriangleMeshT< T >::forEachPolyVertex ( Func  func) const
inline

Definition at line 223 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE const GU_Detail* GU_TriangleMeshT< T >::getDetail ( ) const
inline

Definition at line 171 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE int GU_TriangleMeshT< T >::hedgeFromDetailVertex ( GA_Offset  vtx) const
inline

Definition at line 254 of file GU_TriangleMesh.h.

template<typename T >
GA_Offset GU_TriangleMeshT< T >::hedgeToDetailVertex ( int  h) const

Definition at line 356 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE bool GU_TriangleMeshT< T >::isBuilt ( ) const
inline

Definition at line 284 of file GU_TriangleMesh.h.

template<typename T >
int GU_TriangleMeshT< T >::numPrimaryPoints ( ) const
inline

Definition at line 287 of file GU_TriangleMesh.h.

template<typename T >
int GU_TriangleMeshT< T >::pointFromDetailVertex ( GA_Offset  vtx) const

Definition at line 369 of file GU_TriangleMesh.h.

template<typename T >
GA_Offset GU_TriangleMeshT< T >::pointToDetailPoint ( int  pt) const

Definition at line 346 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE GA_Offset GU_TriangleMeshT< T >::pointToDetailVertex ( int  pt) const
inline

Definition at line 270 of file GU_TriangleMesh.h.

template<typename T >
fpreal GU_TriangleMeshT< T >::polyArea ( exint  poly_idx) const
inline

Definition at line 280 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE const GA_OffsetArray& GU_TriangleMeshT< T >::polys ( ) const
inline

Definition at line 176 of file GU_TriangleMesh.h.

template<typename T >
Tessellation GU_TriangleMeshT< T >::tessellation ( ) const
inline

Definition at line 277 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE GA_Offset GU_TriangleMeshT< T >::triangleToDetailPoly ( int  t) const
inline

Definition at line 262 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE int GU_TriangleMeshT< T >::vertexFromDetailVertex ( GA_Offset  vtx) const
inline

Definition at line 238 of file GU_TriangleMesh.h.

template<typename T >
SYS_FORCE_INLINE GA_Offset GU_TriangleMeshT< T >::vertexToDetailVertex ( int  v) const
inline

Definition at line 258 of file GU_TriangleMesh.h.


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