IDatasmithMeshElement Class Referenceabstract

IDatasmithMeshElement defines an actual geometry. More...

#include <IDatasmithSceneElements.h>

Inheritance diagram for IDatasmithMeshElement:
IDatasmithElement FDatasmithElementImpl< IDatasmithMeshElement > FDatasmithMeshElementImpl

Public Member Functions

virtual const TCHAR * GetFile () const =0
 Get the output filename, it can be absolute or relative to the scene file. More...
 
virtual void SetFile (const TCHAR *InFile)=0
 Set the output filename, it can be absolute or relative to the scene file. More...
 
virtual FMD5Hash GetFileHash () const =0
 Return a MD5 hash of the content of the Mesh Element. More...
 
virtual void SetFileHash (FMD5Hash Hash)=0
 Set the MD5 hash of the current mesh file. More...
 
virtual void SetDimensions (const float InArea, const float InWidth, const float InHeight, const float InDepth)=0
 Set surface area and bounding box dimensions to be used on lightmap size calculation. More...
 
virtual FVector GetDimensions () const =0
 Get the bounding box dimension of the mesh, in a vector in the form of (Width, Height, Depth ) More...
 
virtual float GetArea () const =0
 Get the total surface area. More...
 
virtual float GetWidth () const =0
 Get the bounding box width. More...
 
virtual float GetHeight () const =0
 Get the bounding box height. More...
 
virtual float GetDepth () const =0
 Get the bounding box depth. More...
 
virtual int32 GetLightmapCoordinateIndex () const =0
 Get the UV channel that will be used for the lightmap. More...
 
virtual void SetLightmapCoordinateIndex (int32 UVChannel)=0
 Set the UV channel that will be used for the lightmap Note: If the lightmap coordinate index is something greater than -1 it will make the importer skip the lightmap generation. More...
 
virtual int32 GetLightmapSourceUV () const =0
 Get the source UV channel that will be used at import to generate the lightmap UVs. More...
 
virtual void SetLightmapSourceUV (int32 UVChannel)=0
 Set the source UV channel that will be used at import to generate the lightmap UVs. More...
 
virtual void SetMaterial (const TCHAR *MaterialPathName, int32 SlotId)=0
 Set the material slot Id to use the material MaterialPathName. More...
 
virtual const TCHAR * GetMaterial (int32 SlotId) const =0
 Get the name of the material mapped to slot Id, return nullptr if slot isn't mapped. More...
 
virtual int32 GetMaterialSlotCount () const =0
 Get the number of material slot set on this mesh. More...
 
virtual TSharedPtr< const IDatasmithMaterialIDElement > GetMaterialSlotAt (int32 Index) const =0
 Get the material mapping for slot Index. More...
 
virtual TSharedPtr< IDatasmithMaterialIDElement > GetMaterialSlotAt (int32 Index)=0
 
- Public Member Functions inherited from IDatasmithElement
virtual bool IsA (EDatasmithElementType Type) const =0
 returns if this DatasmithElement is of a specified type More...
 
virtual bool IsSubType (uint64 SubType) const =0
 returns if this DatasmithElement is of a specified subtype of its EDatasmithElementType More...
 
virtual const TCHAR * GetName () const =0
 Gets the element name. More...
 
virtual void SetName (const TCHAR *InName)=0
 Sets the element name. More...
 
virtual const TCHAR * GetLabel () const =0
 Gets the element label used in the UI. More...
 
virtual void SetLabel (const TCHAR *InLabel)=0
 Sets the element label used in the UI. More...
 
virtual FMD5Hash CalculateElementHash (bool bForce)=0
 Return a MD5 hash of the content of the Element. More...
 

Protected Member Functions

virtual int32 GetLODCount () const =0
 Get number of LODs. More...
 
virtual void SetLODCount (int32 Count)=0
 Set number of LODs. More...
 

Friends

class FDatasmithStaticMeshImporter
 

Detailed Description

IDatasmithMeshElement defines an actual geometry.

It won't add any instance to your scene, you'll need IDatasmithMeshActorElement for this. Notice that several IDatasmithMeshActorElements could use the this geometry.

Member Function Documentation

◆ GetArea()

virtual float IDatasmithMeshElement::GetArea ( ) const
pure virtual

Get the total surface area.

Implemented in FDatasmithMeshElementImpl.

◆ GetDepth()

virtual float IDatasmithMeshElement::GetDepth ( ) const
pure virtual

Get the bounding box depth.

Implemented in FDatasmithMeshElementImpl.

◆ GetDimensions()

virtual FVector IDatasmithMeshElement::GetDimensions ( ) const
pure virtual

Get the bounding box dimension of the mesh, in a vector in the form of (Width, Height, Depth )

Implemented in FDatasmithMeshElementImpl.

◆ GetFile()

virtual const TCHAR* IDatasmithMeshElement::GetFile ( ) const
pure virtual

Get the output filename, it can be absolute or relative to the scene file.

Implemented in FDatasmithMeshElementImpl.

◆ GetFileHash()

virtual FMD5Hash IDatasmithMeshElement::GetFileHash ( ) const
pure virtual

Return a MD5 hash of the content of the Mesh Element.

Used in CalculateElementHash to quickly identify Element with identical content

Implemented in FDatasmithMeshElementImpl.

◆ GetHeight()

virtual float IDatasmithMeshElement::GetHeight ( ) const
pure virtual

Get the bounding box height.

Implemented in FDatasmithMeshElementImpl.

◆ GetLightmapCoordinateIndex()

virtual int32 IDatasmithMeshElement::GetLightmapCoordinateIndex ( ) const
pure virtual

Get the UV channel that will be used for the lightmap.

Implemented in FDatasmithMeshElementImpl.

◆ GetLightmapSourceUV()

virtual int32 IDatasmithMeshElement::GetLightmapSourceUV ( ) const
pure virtual

Get the source UV channel that will be used at import to generate the lightmap UVs.

Implemented in FDatasmithMeshElementImpl.

◆ GetLODCount()

virtual int32 IDatasmithMeshElement::GetLODCount ( ) const
protectedpure virtual

Get number of LODs.

Implemented in FDatasmithMeshElementImpl.

◆ GetMaterial()

virtual const TCHAR* IDatasmithMeshElement::GetMaterial ( int32  SlotId) const
pure virtual

Get the name of the material mapped to slot Id, return nullptr if slot isn't mapped.

Implemented in FDatasmithMeshElementImpl.

◆ GetMaterialSlotAt()

virtual TSharedPtr<const IDatasmithMaterialIDElement> IDatasmithMeshElement::GetMaterialSlotAt ( int32  Index) const
pure virtual

Get the material mapping for slot Index.

Implemented in FDatasmithMeshElementImpl.

◆ GetMaterialSlotCount()

virtual int32 IDatasmithMeshElement::GetMaterialSlotCount ( ) const
pure virtual

Get the number of material slot set on this mesh.

Implemented in FDatasmithMeshElementImpl.

◆ GetWidth()

virtual float IDatasmithMeshElement::GetWidth ( ) const
pure virtual

Get the bounding box width.

Implemented in FDatasmithMeshElementImpl.

◆ SetDimensions()

virtual void IDatasmithMeshElement::SetDimensions ( const float  InArea,
const float  InWidth,
const float  InHeight,
const float  InDepth 
)
pure virtual

Set surface area and bounding box dimensions to be used on lightmap size calculation.

Parameters
InAreatotal surface area
InWidthbounding box width
InHeightbounding box height
InDepthbounding box depth

Implemented in FDatasmithMeshElementImpl.

◆ SetFile()

virtual void IDatasmithMeshElement::SetFile ( const TCHAR *  InFile)
pure virtual

Set the output filename, it can be absolute or relative to the scene file.

Implemented in FDatasmithMeshElementImpl.

◆ SetFileHash()

virtual void IDatasmithMeshElement::SetFileHash ( FMD5Hash  Hash)
pure virtual

Set the MD5 hash of the current mesh file.

This should be a hash of its content.

Implemented in FDatasmithMeshElementImpl.

◆ SetLightmapCoordinateIndex()

virtual void IDatasmithMeshElement::SetLightmapCoordinateIndex ( int32  UVChannel)
pure virtual

Set the UV channel that will be used for the lightmap Note: If the lightmap coordinate index is something greater than -1 it will make the importer skip the lightmap generation.

Implemented in FDatasmithMeshElementImpl.

◆ SetLightmapSourceUV()

virtual void IDatasmithMeshElement::SetLightmapSourceUV ( int32  UVChannel)
pure virtual

Set the source UV channel that will be used at import to generate the lightmap UVs.

Implemented in FDatasmithMeshElementImpl.

◆ SetLODCount()

virtual void IDatasmithMeshElement::SetLODCount ( int32  Count)
protectedpure virtual

Set number of LODs.

Implemented in FDatasmithMeshElementImpl.

◆ SetMaterial()

virtual void IDatasmithMeshElement::SetMaterial ( const TCHAR *  MaterialPathName,
int32  SlotId 
)
pure virtual

Set the material slot Id to use the material MaterialPathName.

Implemented in FDatasmithMeshElementImpl.


The documentation for this class was generated from the following file: