Isle
Loading...
Searching...
No Matches
TglImpl::MeshImpl Class Reference

[AI] Implementation of Tgl::Mesh, manages a mesh object and geometry data with group index [AI] More...

#include <impl.h>

Inheritance diagram for TglImpl::MeshImpl:
Collaboration diagram for TglImpl::MeshImpl:

Classes

struct  MeshData
 [AI] Holds D3DRMMesh pointer and group index for referencing geometry [AI] More...
 

Public Types

typedef MeshDataMeshDataType
 [AI] Pointer to mesh data struct [AI] More...
 

Public Member Functions

 MeshImpl ()
 [AI] Initializes mesh data pointer [AI] More...
 
 ~MeshImpl () override
 [AI] Frees resources on destruction [AI] More...
 
void * ImplementationDataPtr () override
 Returns pointer to mesh implementation data [AI]. More...
 
Result SetColor (float r, float g, float b, float a) override
 Sets the color for this mesh [AI]. More...
 
Result SetTexture (const Texture *) override
 Assigns a texture to this mesh [AI]. More...
 
Result GetTexture (Texture *&) override
 Retrieves the texture currently assigned to this mesh [AI]. More...
 
Result SetTextureMappingMode (TextureMappingMode) override
 Sets the mesh texturing mode (UV/cylindrical/etc.) [AI]. More...
 
Result SetShadingModel (ShadingModel) override
 Sets mesh shading model (flat, Gouraud, etc.) [AI]. More...
 
MeshDeepClone (MeshBuilder *) override
 Creates a deep copy of this mesh using a mesh builder [AI]. More...
 
MeshShallowClone (MeshBuilder *) override
 Creates a shallow copy of this mesh using a mesh builder [AI]. More...
 
const MeshDataTypeImplementationData () const
 Gets mesh implementation data (const) [AI]. More...
 
MeshDataTypeImplementationData ()
 Gets mesh implementation data (mutable) [AI]. More...
 
void Destroy ()
 Frees mesh and associated data [AI]. More...
 
MeshDeepClone (const MeshBuilderImpl &rMesh)
 Deep clones the mesh using an explicit MeshBuilderImpl [AI]. More...
 
virtual Result SetColor (float r, float g, float b, float a)=0
 [AI] Sets the color and transparency for the mesh. More...
 
virtual Result SetTexture (const Texture *)=0
 [AI] Sets the texture to use. More...
 
virtual Result GetTexture (Texture *&)=0
 [AI] Retrieves the currently set texture. More...
 
virtual Result SetTextureMappingMode (TextureMappingMode)=0
 [AI] Sets how texture coordinates are mapped (linear or perspective correct). More...
 
virtual Result SetShadingModel (ShadingModel)=0
 [AI] Sets the mesh's shading model (e.g., Gouraud, Phong). More...
 
virtual MeshDeepClone (MeshBuilder *)=0
 [AI] Performs a deep clone—copying all mesh and group data. More...
 
virtual MeshShallowClone (MeshBuilder *)=0
 [AI] Performs a shallow clone—new wrapper, same mesh data. More...
 
- Public Member Functions inherited from Tgl::Object
virtual ~Object ()
 [AI] Destructor; releases resources. More...
 
virtual void * ImplementationDataPtr ()=0
 [AI] Returns a pointer to internal/implementation data, if any. More...
 

Friends

class RendererImpl
 

Detailed Description

[AI] Implementation of Tgl::Mesh, manages a mesh object and geometry data with group index [AI]

Definition at line 816 of file impl.h.

Member Typedef Documentation

◆ MeshDataType

[AI] Pointer to mesh data struct [AI]

Definition at line 888 of file impl.h.

Constructor & Destructor Documentation

◆ MeshImpl()

TglImpl::MeshImpl::MeshImpl ( )
inline

[AI] Initializes mesh data pointer [AI]

Definition at line 819 of file impl.h.

◆ ~MeshImpl()

TglImpl::MeshImpl::~MeshImpl ( )
inlineoverride

[AI] Frees resources on destruction [AI]

Definition at line 822 of file impl.h.

Member Function Documentation

◆ DeepClone() [1/2]

Mesh * MeshImpl::DeepClone ( const MeshBuilderImpl rMesh)
inline

Deep clones the mesh using an explicit MeshBuilderImpl [AI].

Parameters
rMeshMeshBuilderImpl reference [AI]

Definition at line 136 of file mesh.cpp.

◆ DeepClone() [2/2]

Mesh * MeshImpl::DeepClone ( MeshBuilder pMesh)
overridevirtual

Creates a deep copy of this mesh using a mesh builder [AI].

Parameters
MeshBuilderMeshBuilder pointer [AI]
Returns
New Mesh [AI]

Implements Tgl::Mesh.

Definition at line 154 of file mesh.cpp.

◆ Destroy()

void TglImpl::MeshImpl::Destroy ( )
inline

Frees mesh and associated data [AI].

Frees mesh and disassociates group index [AI].

Definition at line 932 of file impl.h.

◆ GetTexture()

Result MeshImpl::GetTexture ( Texture *&  rpTexture)
overridevirtual

Retrieves the texture currently assigned to this mesh [AI].

Parameters
[out]Referenceto Texture pointer [AI]

Implements Tgl::Mesh.

Definition at line 180 of file mesh.cpp.

◆ ImplementationData() [1/2]

MeshDataType & TglImpl::MeshImpl::ImplementationData ( )
inline

Gets mesh implementation data (mutable) [AI].

Definition at line 899 of file impl.h.

◆ ImplementationData() [2/2]

const MeshDataType & TglImpl::MeshImpl::ImplementationData ( ) const
inline

Gets mesh implementation data (const) [AI].

Definition at line 893 of file impl.h.

◆ ImplementationDataPtr()

void * MeshImpl::ImplementationDataPtr ( )
overridevirtual

Returns pointer to mesh implementation data [AI].

Implements Tgl::Object.

Definition at line 14 of file mesh.cpp.

◆ SetColor()

Result MeshImpl::SetColor ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Sets the color for this mesh [AI].

Parameters
rRed [AI]
gGreen [AI]
bBlue [AI]
aAlpha [AI]

Implements Tgl::Mesh.

Definition at line 20 of file mesh.cpp.

◆ SetShadingModel()

Result MeshImpl::SetShadingModel ( ShadingModel  model)
overridevirtual

Sets mesh shading model (flat, Gouraud, etc.) [AI].

Parameters
modelShadingModel [AI]

Implements Tgl::Mesh.

Definition at line 63 of file mesh.cpp.

◆ SetTexture()

Result MeshImpl::SetTexture ( const Texture pTexture)
overridevirtual

Assigns a texture to this mesh [AI].

Parameters
TextureTgl::Texture pointer [AI]

Implements Tgl::Mesh.

Definition at line 37 of file mesh.cpp.

◆ SetTextureMappingMode()

Result MeshImpl::SetTextureMappingMode ( TextureMappingMode  mode)
overridevirtual

Sets the mesh texturing mode (UV/cylindrical/etc.) [AI].

Parameters
modeMapping mode [AI]

Implements Tgl::Mesh.

Definition at line 44 of file mesh.cpp.

◆ ShallowClone()

Mesh * MeshImpl::ShallowClone ( MeshBuilder pMeshBuilder)
overridevirtual

Creates a shallow copy of this mesh using a mesh builder [AI].

Parameters
MeshBuilderMeshBuilder pointer [AI]
Returns
New Mesh [AI]

Implements Tgl::Mesh.

Definition at line 163 of file mesh.cpp.

Friends And Related Function Documentation

◆ RendererImpl

friend class RendererImpl
friend

Definition at line 912 of file impl.h.


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