CBaseMaterialGroup
-
class Lib3MF::CBaseMaterialGroup : public CResource
The BaseMaterialGroup corresponds to a basematerials-element within a 3MF document
-
Lib3MF_uint32 GetCount()
Retrieves the count of base materials in the material group.
- Returns:
returns the count of base materials.
-
void GetAllPropertyIDs(std::vector<Lib3MF_uint32> &PropertyIDsBuffer)
returns all the PropertyIDs of all materials in this group
- Parameters:
PropertyIDsBuffer – PropertyID of the material in the material group.
-
Lib3MF_uint32 AddMaterial(const std::string &sName, const sColor &DisplayColor)
Adds a new material to the material group
- Parameters:
sName – new name of the base material.
DisplayColor – Display color of the material
- Returns:
returns new PropertyID of the new material in the material group.
-
void RemoveMaterial(const Lib3MF_uint32 nPropertyID)
Removes a material from the material group.
- Parameters:
nPropertyID – PropertyID of the material in the material group.
-
std::string GetName(const Lib3MF_uint32 nPropertyID)
Returns the base material’s name
- Parameters:
nPropertyID – PropertyID of the material in the material group.
- Returns:
returns the name of the base material.
-
void SetName(const Lib3MF_uint32 nPropertyID, const std::string &sName)
Sets a base material’s name
- Parameters:
nPropertyID – PropertyID of the material in the material group.
sName – new name of the base material.
-
void SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sColor &TheColor)
Sets a base material’s display color.
- Parameters:
nPropertyID – PropertyID of the material in the material group.
TheColor – The base material’s display color
-
sColor GetDisplayColor(const Lib3MF_uint32 nPropertyID)
Returns a base material’s display color.
- Parameters:
nPropertyID – PropertyID of the material in the material group.
- Returns:
The base material’s display color
-
Lib3MF_uint32 GetCount()
-
typedef std::shared_ptr<CBaseMaterialGroup> Lib3MF::PBaseMaterialGroup
Shared pointer to CBaseMaterialGroup to easily allow reference counting.