Open CASCADE Technology
7.5.0
|
Material manager for exporting into glTF format. More...
#include <RWGltf_GltfMaterialMap.hxx>
Public Member Functions | |
RWGltf_GltfMaterialMap (const TCollection_AsciiString &theFile, const Standard_Integer theDefSamplerId) | |
Main constructor. More... | |
virtual | ~RWGltf_GltfMaterialMap () |
Destructor. More... | |
void | AddImages (RWGltf_GltfOStreamWriter *theWriter, const XCAFPrs_Style &theStyle, Standard_Boolean &theIsStarted) |
Add material images. More... | |
void | AddMaterial (RWGltf_GltfOStreamWriter *theWriter, const XCAFPrs_Style &theStyle, Standard_Boolean &theIsStarted) |
Add material. More... | |
void | AddTextures (RWGltf_GltfOStreamWriter *theWriter, const XCAFPrs_Style &theStyle, Standard_Boolean &theIsStarted) |
Add material textures. More... | |
Standard_Integer | NbImages () const |
Return extent of images map. More... | |
Standard_Integer | NbTextures () const |
Return extent of textures map. More... | |
Public Member Functions inherited from RWMesh_MaterialMap | |
RWMesh_MaterialMap (const TCollection_AsciiString &theFile) | |
Main constructor. More... | |
virtual | ~RWMesh_MaterialMap () |
Destructor. More... | |
const XCAFPrs_Style & | DefaultStyle () const |
Return default material definition to be used for nodes with only color defined. More... | |
void | SetDefaultStyle (const XCAFPrs_Style &theStyle) |
Set default material definition to be used for nodes with only color defined. More... | |
TCollection_AsciiString | FindMaterial (const XCAFPrs_Style &theStyle) const |
Find already registered material. More... | |
virtual bool | CreateTextureFolder () |
Create texture folder "modelName/textures"; for example: MODEL: Path/ModelName.gltf IMAGES: Path/ModelName/textures/ Warning! Output folder is NOT cleared. More... | |
virtual bool | CopyTexture (TCollection_AsciiString &theResTexture, const Handle< Image_Texture > &theTexture, const TCollection_AsciiString &theKey) |
Copy and rename texture file to the new location. More... | |
bool | IsFailed () const |
Return failed flag. More... | |
Static Public Member Functions | |
static const Handle< Image_Texture > & | baseColorTexture (const Handle< XCAFDoc_VisMaterial > &theMat) |
Return base color texture. More... | |
Protected Member Functions | |
void | addImage (RWGltf_GltfOStreamWriter *theWriter, const Handle< Image_Texture > &theTexture, Standard_Boolean &theIsStarted) |
Add texture image. More... | |
void | addTexture (RWGltf_GltfOStreamWriter *theWriter, const Handle< Image_Texture > &theTexture, Standard_Boolean &theIsStarted) |
Add texture. More... | |
virtual TCollection_AsciiString | AddMaterial (const XCAFPrs_Style &theStyle) override |
Add material. More... | |
virtual void | DefineMaterial (const XCAFPrs_Style &theStyle, const TCollection_AsciiString &theKey, const TCollection_AsciiString &theName) override |
Virtual method actually defining the material (e.g. export to the file). More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from RWMesh_MaterialMap | |
static bool | copyFileTo (const TCollection_AsciiString &theFileSrc, const TCollection_AsciiString &theFileDst) |
Copy file to another place. More... | |
Material manager for exporting into glTF format.
RWGltf_GltfMaterialMap::RWGltf_GltfMaterialMap | ( | const TCollection_AsciiString & | theFile, |
const Standard_Integer | theDefSamplerId | ||
) |
Main constructor.
|
virtual |
Destructor.
|
protected |
Add texture image.
void RWGltf_GltfMaterialMap::AddImages | ( | RWGltf_GltfOStreamWriter * | theWriter, |
const XCAFPrs_Style & | theStyle, | ||
Standard_Boolean & | theIsStarted | ||
) |
Add material images.
void RWGltf_GltfMaterialMap::AddMaterial | ( | RWGltf_GltfOStreamWriter * | theWriter, |
const XCAFPrs_Style & | theStyle, | ||
Standard_Boolean & | theIsStarted | ||
) |
Add material.
|
overrideprotectedvirtual |
Add material.
Reimplemented from RWMesh_MaterialMap.
|
protected |
Add texture.
void RWGltf_GltfMaterialMap::AddTextures | ( | RWGltf_GltfOStreamWriter * | theWriter, |
const XCAFPrs_Style & | theStyle, | ||
Standard_Boolean & | theIsStarted | ||
) |
Add material textures.
|
static |
Return base color texture.
|
overrideprotectedvirtual |
Virtual method actually defining the material (e.g. export to the file).
Implements RWMesh_MaterialMap.
|
inline |
Return extent of images map.
|
inline |
Return extent of textures map.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |