CTriangleSet

class Lib3MF::CTriangleSet : public CBase
void SetName(const std::string &sName)

sets the name of the triangle set

Parameters:

sName – the new name

std::string GetName()

returns the name of the triangle set

Returns:

returns the name

void SetIdentifier(const std::string &sIdentifier)

sets the identifier of the triangle set.

Parameters:

sIdentifier – the new identifier. MUST be unique within the mesh. MUST NOT be an empty string

std::string GetIdentifier()

returns the identifier of the triangle set

Returns:

returns the identifier

void AddTriangle(const Lib3MF_uint32 nTriangleIndex)

adds a triangle to the set. Does nothing if triangle is already in the set.

Parameters:

nTriangleIndex – Triangle index to add. MUST be between 0 and TriangleCount - 1.

void RemoveTriangle(const Lib3MF_uint32 nTriangleIndex)

removes a triangle from the set

Parameters:

nTriangleIndex – Triangle index to remove. MUST be between 0 and TriangleCount - 1.

void Clear()

clears all triangles from the list

void SetTriangleList(const CInputVector<Lib3MF_uint32> &TriangleIndicesBuffer)

Sets all triangles in the list, while clearing old values. Duplicates will be merged.

Parameters:

TriangleIndicesBuffer – Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1.

void GetTriangleList(std::vector<Lib3MF_uint32> &TriangleIndicesBuffer)

Retrieves all the triangles in the TriangleSet

Parameters:

TriangleIndicesBuffer – retrieves the indices of the triangles in this TriangleSet

void AddTriangleList(const CInputVector<Lib3MF_uint32> &TriangleIndicesBuffer)

Adds multiple triangles in the list. Duplicates will be merged.

Parameters:

TriangleIndicesBuffer – Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1.

void Merge(classParam<CTriangleSet> pOtherTriangleSet, const bool bDeleteOther)

Merges another Triangle set.

Parameters:
  • pOtherTriangleSet – Other triangle set to merge.

  • bDeleteOther – Flag if other triangle set is getting removed.

void DeleteSet()

Deletes the whole set from the mesh.

PTriangleSet Duplicate(const std::string &sIdentifier)

Duplicates the set in the mesh.

Parameters:

sIdentifier – the new identifier. MUST be unique within the mesh. MUST NOT be an empty string

Returns:

Copy of the triangle set.

typedef std::shared_ptr<CTriangleSet> Lib3MF::PTriangleSet

Shared pointer to CTriangleSet to easily allow reference counting.