FDatasmithMeshElementImpl Class Reference
Inheritance diagram for FDatasmithMeshElementImpl:
FDatasmithElementImpl< IDatasmithMeshElement > IDatasmithMeshElement IDatasmithElement

Public Member Functions

 FDatasmithMeshElementImpl (const TCHAR *InName)
 
virtual FMD5Hash CalculateElementHash (bool bForce) override
 Return a MD5 hash of the content of the Element. More...
 
virtual const TCHAR * GetFile () const override
 Get the output filename, it can be absolute or relative to the scene file. More...
 
virtual void SetFile (const TCHAR *InFile) override
 Set the output filename, it can be absolute or relative to the scene file. More...
 
virtual FMD5Hash GetFileHash () const override
 Return a MD5 hash of the content of the Mesh Element. More...
 
virtual void SetFileHash (FMD5Hash Hash) override
 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) override
 Set surface area and bounding box dimensions to be used on lightmap size calculation. More...
 
virtual FVector GetDimensions () const override
 Get the bounding box dimension of the mesh, in a vector in the form of (Width, Height, Depth ) More...
 
virtual float GetArea () const override
 Get the total surface area. More...
 
virtual float GetWidth () const override
 Get the bounding box width. More...
 
virtual float GetHeight () const override
 Get the bounding box height. More...
 
virtual float GetDepth () const override
 Get the bounding box depth. More...
 
virtual int32 GetLightmapCoordinateIndex () const
 Get the UV channel that will be used for the lightmap. More...
 
virtual void SetLightmapCoordinateIndex (int32 UVChannel)
 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 override
 Get the source UV channel that will be used at import to generate the lightmap UVs. More...
 
virtual void SetLightmapSourceUV (int32 UVChannel) override
 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) override
 Set the material slot Id to use the material MaterialPathName. More...
 
virtual const TCHAR * GetMaterial (int32 SlotId) const override
 Get the name of the material mapped to slot Id, return nullptr if slot isn't mapped. More...
 
virtual int32 GetMaterialSlotCount () const override
 Get the number of material slot set on this mesh. More...
 
virtual TSharedPtr< const IDatasmithMaterialIDElement > GetMaterialSlotAt (int32 Index) const override
 Get the material mapping for slot Index. More...
 
virtual TSharedPtr< IDatasmithMaterialIDElement > GetMaterialSlotAt (int32 Index) override
 
- Public Member Functions inherited from FDatasmithElementImpl< IDatasmithMeshElement >
 FDatasmithElementImpl (const TCHAR *InName, EDatasmithElementType InType, uint64 InSubType=0)
 
virtual bool IsA (EDatasmithElementType InType) const override
 
virtual bool IsSubType (uint64 InSubType) const override
 
virtual const TCHAR * GetName () const override
 
virtual void SetName (const TCHAR *InName) override
 
virtual const TCHAR * GetLabel () const override
 
virtual void SetLabel (const TCHAR *InLabel) override
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from FDatasmithElementImpl< IDatasmithMeshElement >
FString Name
 
FString Label
 
FMD5Hash ElementHash
 
EDatasmithElementType Type
 
uint64 SubType
 

Member Function Documentation

◆ CalculateElementHash()

virtual FMD5Hash FDatasmithMeshElementImpl::CalculateElementHash ( bool  bForce)
overridevirtual

Return a MD5 hash of the content of the Element.

Used to quickly identify Element with identical content.

Parameters
bForceForce recalculation of the hash if it was already cached
Returns
The MD5 hash of the Element properties

Reimplemented from FDatasmithElementImpl< IDatasmithMeshElement >.

◆ GetArea()

virtual float FDatasmithMeshElementImpl::GetArea ( ) const
inlineoverridevirtual

Get the total surface area.

Implements IDatasmithMeshElement.

◆ GetDepth()

virtual float FDatasmithMeshElementImpl::GetDepth ( ) const
inlineoverridevirtual

Get the bounding box depth.

Implements IDatasmithMeshElement.

◆ GetDimensions()

virtual FVector FDatasmithMeshElementImpl::GetDimensions ( ) const
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ GetFile()

virtual const TCHAR* FDatasmithMeshElementImpl::GetFile ( ) const
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ GetFileHash()

virtual FMD5Hash FDatasmithMeshElementImpl::GetFileHash ( ) const
inlineoverridevirtual

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

Used in CalculateElementHash to quickly identify Element with identical content

Implements IDatasmithMeshElement.

◆ GetHeight()

virtual float FDatasmithMeshElementImpl::GetHeight ( ) const
inlineoverridevirtual

Get the bounding box height.

Implements IDatasmithMeshElement.

◆ GetLightmapCoordinateIndex()

virtual int32 FDatasmithMeshElementImpl::GetLightmapCoordinateIndex ( ) const
inlinevirtual

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

Implements IDatasmithMeshElement.

◆ GetLightmapSourceUV()

virtual int32 FDatasmithMeshElementImpl::GetLightmapSourceUV ( ) const
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ GetLODCount()

virtual int32 FDatasmithMeshElementImpl::GetLODCount ( ) const
inlineoverrideprotectedvirtual

Get number of LODs.

Implements IDatasmithMeshElement.

◆ GetMaterial()

virtual const TCHAR* FDatasmithMeshElementImpl::GetMaterial ( int32  SlotId) const
overridevirtual

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

Implements IDatasmithMeshElement.

◆ GetMaterialSlotAt()

virtual TSharedPtr<const IDatasmithMaterialIDElement> FDatasmithMeshElementImpl::GetMaterialSlotAt ( int32  Index) const
overridevirtual

Get the material mapping for slot Index.

Implements IDatasmithMeshElement.

◆ GetMaterialSlotCount()

virtual int32 FDatasmithMeshElementImpl::GetMaterialSlotCount ( ) const
overridevirtual

Get the number of material slot set on this mesh.

Implements IDatasmithMeshElement.

◆ GetWidth()

virtual float FDatasmithMeshElementImpl::GetWidth ( ) const
inlineoverridevirtual

Get the bounding box width.

Implements IDatasmithMeshElement.

◆ SetDimensions()

virtual void FDatasmithMeshElementImpl::SetDimensions ( const float  InArea,
const float  InWidth,
const float  InHeight,
const float  InDepth 
)
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ SetFile()

virtual void FDatasmithMeshElementImpl::SetFile ( const TCHAR *  InFile)
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ SetFileHash()

virtual void FDatasmithMeshElementImpl::SetFileHash ( FMD5Hash  Hash)
inlineoverridevirtual

Set the MD5 hash of the current mesh file.

This should be a hash of its content.

Implements IDatasmithMeshElement.

◆ SetLightmapCoordinateIndex()

virtual void FDatasmithMeshElementImpl::SetLightmapCoordinateIndex ( int32  UVChannel)
inlinevirtual

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.

Implements IDatasmithMeshElement.

◆ SetLightmapSourceUV()

virtual void FDatasmithMeshElementImpl::SetLightmapSourceUV ( int32  UVChannel)
inlineoverridevirtual

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

Implements IDatasmithMeshElement.

◆ SetLODCount()

virtual void FDatasmithMeshElementImpl::SetLODCount ( int32  Count)
inlineoverrideprotectedvirtual

Set number of LODs.

Implements IDatasmithMeshElement.

◆ SetMaterial()

virtual void FDatasmithMeshElementImpl::SetMaterial ( const TCHAR *  MaterialPathName,
int32  SlotId 
)
overridevirtual

Set the material slot Id to use the material MaterialPathName.

Implements IDatasmithMeshElement.


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