|
|
| Mesh (std::string_view path="/mesh") |
| |
|
| Mesh (const Mesh &other) |
| |
|
Mesh & | operator= (const Mesh &rhs) |
| |
| PrimType | getType () const override |
| |
| std::shared_ptr< Primitive > | clone () const override |
| |
| TransformClass | transformType () const override |
| |
| void | applyTransform (const Matrix4 &mat, TransformClass transformClass=TransformClass::POINT) override |
| |
|
void | applyTransform (const Transform &transform, TransformClass transformClass=TransformClass::POINT) |
| |
| bool | canMerge () const override |
| |
| void | merge (std::shared_ptr< Primitive > other) override |
| |
| bool | hasPoints () const override |
| |
| Offset | addFace (const std::vector< Offset > &pointOffsets, bool closed=true) |
| | Adds a single face. Avoid for multiple faces in a loop as a single call to addFaces is much more performant.
|
| |
| std::vector< Offset > | addFaces (std::span< const Offset > pointOffsetsFlat, std::span< const Offset > vertexCounts, bool closed=true) |
| | Adds many faces in a single call.
|
| |
|
Offset | addPoint (const Vector3 &pos) |
| |
| std::vector< Offset > | addPoints (std::span< const Vector3 > positions) |
| | Adds many points in a single call.
|
| |
| std::vector< Offset > | duplicatePoints (std::span< const Offset > srcPointOffsets, bool copyAttributes=true) |
| | Duplicates existing points into new points carrying the same positions.
|
| |
|
void | deleteFaces (const std::vector< Offset > &faceOffsets, bool andPoints=true) |
| |
|
void | deleteAllFaces (bool andPoints=true) |
| | Removes every face from the mesh.
|
| |
| void | deletePoints (const std::vector< Offset > &pointOffsets) override |
| |
|
void | deletePoints (const std::vector< Offset > &pointOffsets, bool andFaces) |
| |
|
void | deleteVertices (const std::vector< Offset > &vertOffsets) |
| |
|
bool | isValidFace (Offset offset) const |
| |
|
bool | isValidVertex (Offset offset) const |
| |
| bool | isValidPoint (Offset offset) const override |
| |
| void | defragment () override |
| | Compacts storage, removing entries marked invalid so offsets are contiguous again.
|
| |
|
void | merge (Mesh &other) |
| |
|
HeMesh | computeHalfEdgeMesh () |
| |
|
std::unordered_set< Offset >::const_iterator | soloPointsBegin () const |
| |
|
std::unordered_set< Offset >::const_iterator | soloPointsEnd () const |
| |
|
void | setPointPos (const Offset offset, const Vector3 &pos) |
| |
| std::span< const Offset > | getFaceStartVertices () const |
| | Contiguous view of each face's starting vertex offset.
|
| |
|
Vector3 | getPosFromVert (Offset vertexOffset) const |
| |
|
Vector3 | getPointPos (Offset pointOffset) const |
| |
|
unsigned int | getFaceVertCount (Offset faceOffset) const |
| |
|
unsigned int | getFacePointCount (Offset faceOffset) const |
| |
|
Offset | getVertexFace (Offset vertexOffset) const |
| |
|
Offset | getPointVertex (Offset vertexOffset) const |
| |
|
std::span< const intT > | getFacePoints (Offset faceOffset) const |
| |
| std::span< const intT > | vertexPointSpan () const |
| | Contiguous view mapping each vertex offset to its point offset.
|
| |
| std::span< const Vector3 > | pointPosSpan () const |
| | Contiguous view of every point position.
|
| |
|
Offset | getNumFaces () const |
| |
|
Offset | getNumVerts () const |
| |
|
Offset | getNumSoloPoints () const |
| |
|
FaceOffsets | getFaces () const |
| |
| attr::AttributeHandleBool | createVertexGroup (std::string name) |
| | Creates a vertex group.
|
| |
| attr::AttributeHandleBool | createFaceGroup (std::string name) |
| | Creates a face group.
|
| |
|
void | addToVertexGroup (const std::string &name, const std::vector< Offset > &offsets) |
| | Marks the given offsets as members of the vertex group.
|
| |
|
void | addToFaceGroup (const std::string &name, const std::vector< Offset > &offsets) |
| | Marks the given offsets as members of the face group.
|
| |
|
boolT | isClosed (Offset faceOffset) const |
| |
|
void | computeFaceStartVertices () const |
| |
| FaceNormalHandle | getFaceNormal (bool precompute=false) const |
| | Returns a handle for reading per-face normals.
|
| |
| VertexNormalHandle | getVertexNormal (bool precompute=false) const |
| | Returns a handle for reading per-vertex normals.
|
| |
|
| Primitive (std::string_view path="/prim") |
| |
|
| Primitive (const Primitive &other) |
| |
|
Primitive & | operator= (const Primitive &rhs) |
| |
|
void | applyTransform (const Transform &transform, TransformClass transformClass) |
| |
|
void | incrementVersion () |
| |
|
Offset | getNumPoints () const |
| |
|
virtual PointOffsets | getPoints () |
| |
|
attr::AttributeHandle< intT > | addIntAttribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false) |
| |
|
attr::AttributeHandleBool | addBoolAttribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false, bool isPrivate=false) |
| |
|
attr::AttributeHandle< Vector3 > | addVector3Attribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false) |
| |
|
attr::AttributeHandle< Matrix4 > | addMatrix4Attribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false) |
| |
|
std::shared_ptr< attr::Attribute > | getAttribByName (attr::AttributeOwner owner, std::string name, bool includeIntrinsics=false) |
| |
| std::shared_ptr< const attr::Attribute > | getAttribByName (attr::AttributeOwner owner, std::string name, bool includeIntrinsics=false) const |
| | Const counterpart of getAttribByName.
|
| |
|
const size_t | getNumAttributes (const attr::AttributeOwner owner) const |
| |
|
std::weak_ptr< const attr::Attribute > | getAttributeByIndex (attr::AttributeOwner owner, unsigned int index) const |
| |
|
bool | attributeExists (attr::AttributeOwner owner, std::string name) |
| |
| attr::AttributeHandleBool | createGroup (attr::AttributeOwner owner, std::string name) |
| | Creates a group on the given owner.
|
| |
|
void | addToGroup (attr::AttributeOwner owner, const std::string &name, const std::vector< Offset > &offsets) |
| | Marks the given offsets as members of the group.
|
| |
| std::shared_ptr< attr::Attribute > | getGroupByName (attr::AttributeOwner owner, const std::string &name) const |
| | Looks up a group by name.
|
| |
|
size_t | getNumGroups (attr::AttributeOwner owner) const |
| | Returns how many groups live on the given owner.
|
| |
|
std::weak_ptr< const attr::Attribute > | getGroupByIndex (attr::AttributeOwner owner, unsigned int index) const |
| | Returns the group at the given index in the owner's group store.
|
| |
| attr::AttributeHandleBool | createPointGroup (std::string name) |
| | Creates a point group.
|
| |
| attr::AttributeHandleBool | createPrimitiveGroup (std::string name) |
| | Creates a primitive group.
|
| |
|
void | addToPointGroup (const std::string &name, const std::vector< Offset > &offsets) |
| | Marks the given offsets as members of the point group.
|
| |
|
void | addToPrimitiveGroup (const std::string &name, const std::vector< Offset > &offsets) |
| | Marks the given offsets as members of the primitive group.
|
| |
|
String | getPath () const |
| |
|
void | setPath (const String &path) |
| |
Polygonal mesh primitive with point, vertex, and face attributes.
Extends Primitive with mesh-specific topology: points, vertices, faces, and the intrinsic attributes that describe connectivity (vertexCount, closed, point offset, and position P).