UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IDatasmithMeshElement Class Referenceabstract

#include <IDatasmithSceneElements.h>

+ Inheritance diagram for IDatasmithMeshElement:

Public Member Functions

virtual ~IDatasmithMeshElement ()
 
virtual const TCHARGetFile () const =0
 
virtual void SetFile (const TCHAR *InFile)=0
 
virtual FMD5Hash GetFileHash () const =0
 
virtual void SetFileHash (FMD5Hash Hash)=0
 
virtual void SetDimensions (float InArea, float InWidth, float InHeight, float InDepth)=0
 
virtual FVector3f GetDimensions () const =0
 
virtual float GetArea () const =0
 
virtual float GetWidth () const =0
 
virtual float GetHeight () const =0
 
virtual float GetDepth () const =0
 
virtual int32 GetLightmapCoordinateIndex () const =0
 
virtual void SetLightmapCoordinateIndex (int32 UVChannel)=0
 
virtual int32 GetLightmapSourceUV () const =0
 
virtual void SetLightmapSourceUV (int32 UVChannel)=0
 
virtual void SetMaterial (const TCHAR *MaterialPathName, int32 SlotId)=0
 
virtual const TCHARGetMaterial (int32 SlotId) const =0
 
virtual int32 GetMaterialSlotCount () const =0
 
virtual TSharedPtr< const IDatasmithMaterialIDElementGetMaterialSlotAt (int32 Index) const =0
 
virtual TSharedPtr< IDatasmithMaterialIDElementGetMaterialSlotAt (int32 Index)=0
 
- Public Member Functions inherited from IDatasmithElement
virtual bool IsA (EDatasmithElementType Type) const =0
 
virtual const TCHARGetName () const =0
 
virtual void SetName (const TCHAR *InName)=0
 
virtual const TCHARGetLabel () const =0
 
virtual void SetLabel (const TCHAR *InLabel)=0
 
virtual FMD5Hash CalculateElementHash (bool bForce)=0
 

Protected Member Functions

virtual int32 GetLODCount () const =0
 
virtual void SetLODCount (int32 Count)=0
 

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.

Constructor & Destructor Documentation

◆ ~IDatasmithMeshElement()

virtual IDatasmithMeshElement::~IDatasmithMeshElement ( )
inlinevirtual

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 FVector3f 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() [1/2]

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

Get the material mapping for slot Index

Implemented in FDatasmithMeshElementImpl.

◆ GetMaterialSlotAt() [2/2]

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

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 ( float  InArea,
float  InWidth,
float  InHeight,
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.

Friends And Related Symbol Documentation

◆ FDatasmithStaticMeshImporter

friend class FDatasmithStaticMeshImporter
friend

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