Colobot
Public Member Functions | List of all members
Gfx::CModel Class Reference

3D model saved in model file More...

#include <model.h>

Public Member Functions

int GetMeshCount () const
 Returns mesh count. More...
 
CModelMeshGetMesh (const std::string &name)
 Return a mesh with given name. More...
 
const CModelMeshGetMesh (const std::string &name) const
 Return a mesh with given name. More...
 
void AddMesh (const std::string &name, CModelMesh &&mesh)
 Add new mesh with given name. More...
 
std::vector< std::string > GetMeshNames () const
 Returns list of mesh names. More...
 
const std::vector< ModelCrashSphere > & GetCrashSpheres () const
 Returns the model's crash spheres. More...
 
void AddCrashSphere (const ModelCrashSphere &crashSphere)
 Adds a new crash sphere. More...
 
int GetCrashSphereCount () const
 Returns number of crash spheres. More...
 
const ModelShadowSpotGetShadowSpot () const
 Returns the shadow spot associated with model (assumes it is present) More...
 
void SetShadowSpot (const ModelShadowSpot &shadowSpot)
 Sets the shadow spot associated with model. More...
 
bool HasShadowSpot () const
 Returns whether there is shadow spot. More...
 
const Math::SphereGetCameraCollisionSphere () const
 Returns the optional shadow spot associated with model (assumes it is present) More...
 
void SetCameraCollisionSphere (const Math::Sphere &sphere)
 Sets the shadow spot associated with model. More...
 
bool HasCameraCollisionSphere () const
 Returns whether there is camera collision sphere. More...
 

Detailed Description

3D model saved in model file

Member Function Documentation

int Gfx::CModel::GetMeshCount ( ) const

Returns mesh count.

CModelMesh * Gfx::CModel::GetMesh ( const std::string &  name)

Return a mesh with given name.

const CModelMesh * Gfx::CModel::GetMesh ( const std::string &  name) const

Return a mesh with given name.

void Gfx::CModel::AddMesh ( const std::string &  name,
CModelMesh &&  mesh 
)

Add new mesh with given name.

std::vector< std::string > Gfx::CModel::GetMeshNames ( ) const

Returns list of mesh names.

const std::vector< ModelCrashSphere > & Gfx::CModel::GetCrashSpheres ( ) const

Returns the model's crash spheres.

void Gfx::CModel::AddCrashSphere ( const ModelCrashSphere crashSphere)

Adds a new crash sphere.

int Gfx::CModel::GetCrashSphereCount ( ) const

Returns number of crash spheres.

const ModelShadowSpot & Gfx::CModel::GetShadowSpot ( ) const

Returns the shadow spot associated with model (assumes it is present)

void Gfx::CModel::SetShadowSpot ( const ModelShadowSpot shadowSpot)

Sets the shadow spot associated with model.

bool Gfx::CModel::HasShadowSpot ( ) const

Returns whether there is shadow spot.

const Math::Sphere & Gfx::CModel::GetCameraCollisionSphere ( ) const

Returns the optional shadow spot associated with model (assumes it is present)

void Gfx::CModel::SetCameraCollisionSphere ( const Math::Sphere sphere)

Sets the shadow spot associated with model.

bool Gfx::CModel::HasCameraCollisionSphere ( ) const

Returns whether there is camera collision sphere.


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