fast::MeshAccess class

CPU access to Mesh data.

Public types

using pointer = std::unique_ptr<MeshAccess>

Constructors, destructors, conversion operators

MeshAccess(std::vector<float>* mCoordinates, std::vector<float>* mNormals, std::vector<float>* mColors, std::vector<uint>* mLines, std::vector<uint>* mTriangles, std::shared_ptr<Mesh> mesh)
~MeshAccess()

Public functions

auto getVertex(uint i) -> MeshVertex
Get vertex at position i.
void setVertex(uint i, MeshVertex vertex, bool updateBoundingBox = true)
Set vertex at given index.
void addVertex(MeshVertex v)
void addVertices(const std::vector<MeshVertex>& vertices)
auto getTriangle(uint i) -> MeshTriangle
void setTriangle(uint i, MeshTriangle)
void addTriangle(MeshTriangle t)
auto getLine(uint i) -> MeshLine
void setLine(uint i, MeshLine)
void addLine(MeshLine l)
auto getTriangles() -> std::vector<MeshTriangle>
auto getLines() -> std::vector<MeshLine>
auto getVertices() -> std::vector<MeshVertex>
void release()

Function documentation

MeshVertex fast::MeshAccess::getVertex(uint i)

Get vertex at position i.

Parameters
i index

void fast::MeshAccess::setVertex(uint i, MeshVertex vertex, bool updateBoundingBox = true)

Set vertex at given index.

Parameters
i index
vertex Vertex
updateBoundingBox Whether to update the Mesh bounding box or not