FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::SketchMaterials Namespace Reference

Functions

FORMIT_CORE_EXPORT WSM::ObjectHistoryID GetWSMMaterialForHistory (size_t historyId, size_t materialId)
 Get the WSM material from the sketch material in the given history. More...
 
FORMIT_CORE_EXPORT size_t GetSketchMaterialFromWSMMaterial (size_t historyId, size_t wsmMaterialId)
 Get the sketch material from the WSM material. More...
 
FORMIT_CORE_EXPORT void GetMaterialIDsFromObjects (const 1::vector< WSM::GroupInstancePath > &aObjects, 1::set< size_t > &aMaterials)
 Get the materials that are used by the given vector of objects. More...
 
FORMIT_CORE_EXPORT void ChangeMaterialOrder (size_t materialID, size_t newPos)
 Give the material a new position in the list. More...
 
FORMIT_CORE_EXPORT bool AssignMaterialToObjects (size_t materialID, const 1::vector< WSM::GroupInstancePath > &aObjectPaths, const WSM::Transf3d &rUVTransf3d=WSM::Transf3d::kIdentity)
 Assigns the material to the list of objects. More...
 
FORMIT_CORE_EXPORT void GetDefaultMaterialData (FormIt::Materials::MaterialData &data, bool bBack)
 Get the parameters of the default material. More...
 
FORMIT_CORE_EXPORT void SetDefaultMaterialData (const FormIt::Materials::MaterialData &data, bool bBack)
 Set the parameters of the default material. More...
 
FORMIT_CORE_EXPORT bool IsValidObjectForMaterialAssignment (size_t nHistoryId, size_t objectId)
 Check whether the given object is valid for getting a material. More...
 
FORMIT_CORE_EXPORT::vector< WSM::GroupInstancePathGetAllObjectsUsingMaterials (const 1::vector< size_t > &aMaterialIDs)
 Returns all objects which are using the given materials across all histories. More...
 
FORMIT_CORE_EXPORT void RemoveMaterialsForHistory (size_t nHistoryId)
 Removes all wsm materials in the sketch materials that are from the given history. More...
 
FORMIT_CORE_EXPORT bool IsMaterialUsed (size_t materialID)
 Returns true if the material is used by any objects. More...
 
FORMIT_CORE_EXPORT void UpdateMaterialFromParameters (size_t materialID, const WSM::Color *color, const float *gloss, const float *reflectionDirect, const float *reflectionOblique, const 1::vector< char > *diffuseTexture, const 1::vector< char > *normalTexture, const 1::vector< char > *opacityTexture, const float *uscale, const float *vscale)
 Update the rendering material with the basic parameters. More...
 
FORMIT_CORE_EXPORT void UpdateMaterialFromData (size_t materialID)
 Update the firefly material from its stored formit material data. More...
 
FORMIT_CORE_EXPORT size_t GetLastPaintToolMaterial ()
 Get the formit material, that was last used by the paint tool. More...
 
FORMIT_CORE_EXPORT uint32_t HashValueForMaterialData (const FormIt::Materials::MaterialData &data)
 Get a 32bit hash value for a material data. More...
 
FORMIT_CORE_EXPORT void RearrangeMaterials (const 1::vector< size_t > &materialIds, size_t materialBeforeOrAfterId, bool insertAfter)
 Rearrange the materials to be put before or after the given other material. More...