|
|
| 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) |
| |
|
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 | getVertexPoint (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 | addVertexGroup (std::string name) |
| | Returns the vertex group of this name, adding one when the name is free.
|
| |
|
attr::AttributeHandleBool | addFaceGroup (std::string name) |
| | Returns the face group of this name, adding one when the name is free.
|
| |
|
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 (double cuspAngle=kDefaultCuspAngle) const |
| | Returns a handle for reading per-vertex normals.
|
| |
| PointNormalHandle | getPointNormal () const |
| | Returns a handle for reading per-point 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 () |
| |
| std::shared_ptr< attr::Attribute > | addAttribute (attr::AttributeOwner owner, std::string name, attr::AttributeType type, bool intrinsic=false, bool isInternal=false) |
| | Returns the attribute of this name and type, adding one when the name is free.
|
| |
| std::shared_ptr< attr::Attribute > | tryAddAttribute (attr::AttributeOwner owner, std::string name, attr::AttributeType type, bool intrinsic=false, bool isInternal=false) |
| | Returns the attribute of this name and type, adding one when the name is free.
|
| |
| template<typename T > |
| attr::AttributeHandle< T > | addAttribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false, bool isInternal=false) |
| | Returns a handle to the attribute of this type stored under this name, adding one when the name is free.
|
| |
| template<typename T > |
| std::optional< attr::AttributeHandle< T > > | tryAddAttribute (attr::AttributeOwner owner, std::string name, bool intrinsic=false, bool isInternal=false) |
| | Returns a handle to the attribute of this type stored under this name, adding one when the name is free.
|
| |
|
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 |
| |
| std::vector< std::shared_ptr< const attr::Attribute > > | getAttributes (attr::AttributeOwner owner, bool includeIntrinsics=false) const |
| | Returns every attribute on the owner.
|
| |
|
bool | attributeExists (attr::AttributeOwner owner, std::string name) |
| |
| attr::AttributeHandleBool | addGroup (attr::AttributeOwner owner, std::string name) |
| | Returns the group of this name on the given owner, adding one when the name is free.
|
| |
|
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.
|
| |
|
std::vector< std::shared_ptr< const attr::Attribute > > | getGroups (attr::AttributeOwner owner) const |
| | Returns every group on the owner.
|
| |
| void | addAttributesFrom (const Primitive &source, attr::AttributeOwner owner) |
| | Adds each attribute and group of the source to this primitive, keeping its name and type.
|
| |
|
attr::AttributeHandleBool | addPointGroup (std::string name) |
| | Returns the point group of this name, adding one when the name is free.
|
| |
|
attr::AttributeHandleBool | addPrimitiveGroup (std::string name) |
| | Returns the primitive group of this name, adding one when the name is free.
|
| |
|
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).