All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tetMesh.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef USDGEOM_GENERATED_TETMESH_H
8#define USDGEOM_GENERATED_TETMESH_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdGeom/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
19#include "pxr/usd/usd/timeCode.h"
20
21#include "pxr/base/vt/value.h"
22
23#include "pxr/base/gf/vec3d.h"
24#include "pxr/base/gf/vec3f.h"
26
27#include "pxr/base/tf/token.h"
28#include "pxr/base/tf/type.h"
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32class SdfAssetPath;
33
34// -------------------------------------------------------------------------- //
35// TETMESH //
36// -------------------------------------------------------------------------- //
37
51{
52public:
56 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
57
62 explicit UsdGeomTetMesh(const UsdPrim& prim=UsdPrim())
63 : UsdGeomPointBased(prim)
64 {
65 }
66
70 explicit UsdGeomTetMesh(const UsdSchemaBase& schemaObj)
71 : UsdGeomPointBased(schemaObj)
72 {
73 }
74
76 USDGEOM_API
77 virtual ~UsdGeomTetMesh();
78
82 USDGEOM_API
83 static const TfTokenVector &
84 GetSchemaAttributeNames(bool includeInherited=true);
85
95 USDGEOM_API
96 static UsdGeomTetMesh
97 Get(const UsdStagePtr &stage, const SdfPath &path);
98
121 USDGEOM_API
122 static UsdGeomTetMesh
123 Define(const UsdStagePtr &stage, const SdfPath &path);
124
125protected:
129 USDGEOM_API
131
132private:
133 // needs to invoke _GetStaticTfType.
134 friend class UsdSchemaRegistry;
135 USDGEOM_API
136 static const TfType &_GetStaticTfType();
137
138 static bool _IsTypedSchema();
139
140 // override SchemaBase virtuals.
141 USDGEOM_API
142 const TfType &_GetTfType() const override;
143
144public:
145 // --------------------------------------------------------------------- //
146 // TETVERTEXINDICES
147 // --------------------------------------------------------------------- //
177 USDGEOM_API
179
185 USDGEOM_API
186 UsdAttribute CreateTetVertexIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
187
188public:
189 // --------------------------------------------------------------------- //
190 // SURFACEFACEVERTEXINDICES
191 // --------------------------------------------------------------------- //
203 USDGEOM_API
205
211 USDGEOM_API
212 UsdAttribute CreateSurfaceFaceVertexIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
213
214public:
215 // ===================================================================== //
216 // Feel free to add custom code below this line, it will be preserved by
217 // the code generator.
218 //
219 // Just remember to:
220 // - Close the class declaration with };
221 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
222 // - Close the include guard with #endif
223 // ===================================================================== //
224 // --(BEGIN CUSTOM CODE)--
225
234 USDGEOM_API
235 static bool ComputeSurfaceFaces(const UsdGeomTetMesh& tetMesh,
236 VtVec3iArray* surfaceFaceIndices,
237 const UsdTimeCode timeCode = UsdTimeCode::Default());
238
245 USDGEOM_API
246 static bool FindInvertedElements(const UsdGeomTetMesh& tetMesh,
247 VtIntArray* invertedElements,
248 const UsdTimeCode timeCode = UsdTimeCode::Default());
249};
250
251PXR_NAMESPACE_CLOSE_SCOPE
252
253#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
TfType represents a dynamic runtime type.
Definition: type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:160
Base class for all UsdGeomGprims that possess points, providing common attributes such as normals and...
Definition: pointBased.h:42
Encodes a tetrahedral mesh.
Definition: tetMesh.h:51
USDGEOM_API UsdAttribute GetSurfaceFaceVertexIndicesAttr() const
surfaceFaceVertexIndices defines the triangle surface faces indices wrt.
USDGEOM_API UsdAttribute CreateSurfaceFaceVertexIndicesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSurfaceFaceVertexIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: tetMesh.h:56
USDGEOM_API UsdAttribute GetTetVertexIndicesAttr() const
Flat list of the index (into the points attribute) of each vertex of each tetrahedron in the mesh.
static USDGEOM_API UsdGeomTetMesh Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomTetMesh holding the prim adhering to this schema at path on stage.
virtual USDGEOM_API ~UsdGeomTetMesh()
Destructor.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
UsdGeomTetMesh(const UsdSchemaBase &schemaObj)
Construct a UsdGeomTetMesh on the prim held by schemaObj .
Definition: tetMesh.h:70
USDGEOM_API UsdAttribute CreateTetVertexIndicesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTetVertexIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdGeomTetMesh(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomTetMesh on UsdPrim prim .
Definition: tetMesh.h:62
static USDGEOM_API UsdGeomTetMesh Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
static USDGEOM_API bool FindInvertedElements(const UsdGeomTetMesh &tetMesh, VtIntArray *invertedElements, const UsdTimeCode timeCode=UsdTimeCode::Default())
FindInvertedElements is used to determine if the tetMesh has inverted tetrahedral elements at the giv...
static USDGEOM_API bool ComputeSurfaceFaces(const UsdGeomTetMesh &tetMesh, VtVec3iArray *surfaceFaceIndices, const UsdTimeCode timeCode=UsdTimeCode::Default())
ComputeSurfaceFaces determines the vertex indices of the surface faces from tetVertexIndices.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:67
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition: timeCode.h:95
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440