Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Model Class Reference

#include <Solid.h>

List of all members.

Public Types

enum  { MAX_VERTS = 64000, MAX_POLYS = 16000 }

Public Member Functions

 Model ()
 Model (const Model &m)
 ~Model ()
Modeloperator= (const Model &m)
int operator== (const Model &that) const
bool Load (const char *mag_file, double scale=1.0)
bool Load (ModelFile *loader, double scale=1.0)
const char * Name () const
int NumVerts () const
int NumSurfaces () const
int NumMaterials () const
int NumPolys () const
int NumSegments () const
double Radius () const
bool IsDynamic () const
void SetDynamic (bool d)
bool IsLuminous () const
void SetLuminous (bool l)
List< Surface > & GetSurfaces ()
List< Material > & GetMaterials ()
const MaterialFindMaterial (const char *mtl_name) const
const MaterialReplaceMaterial (const Material *mtl)
void GetAllTextures (List< Bitmap > &textures)
PolyAddPolys (int nsurf, int npolys, int nverts)
void ExplodeMesh ()
void OptimizeMesh ()
void OptimizeMaterials ()
void ScaleBy (double factor)
void Normalize ()
void SelectPolys (List< Poly > &, Material *mtl)
void SelectPolys (List< Poly > &, Vec3 loc)
void AddSurface (Surface *s)
void ComputeTangents ()
void DeletePrivateData ()

Static Public Member Functions

static const char * TYPENAME ()

Friends

class Solid
class ModelFile

Detailed Description

Definition at line 106 of file Solid.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MAX_VERTS 
MAX_POLYS 

Definition at line 114 of file Solid.h.


Constructor & Destructor Documentation

Model::Model ( )

Definition at line 785 of file Solid.cpp.

Model::Model ( const Model m)

Definition at line 791 of file Solid.cpp.

Model::~Model ( )

Definition at line 799 of file Solid.cpp.


Member Function Documentation

Poly * Model::AddPolys ( int  nsurf,
int  npolys,
int  nverts 
)

Definition at line 1613 of file Solid.cpp.

void Model::AddSurface ( Surface s)

Definition at line 1540 of file Solid.cpp.

void Model::ComputeTangents ( )

Definition at line 1743 of file Solid.cpp.

void Model::DeletePrivateData ( )

Definition at line 1756 of file Solid.cpp.

void Model::ExplodeMesh ( )

Definition at line 1625 of file Solid.cpp.

const Material * Model::FindMaterial ( const char *  mtl_name) const

Definition at line 1563 of file Solid.cpp.

void Model::GetAllTextures ( List< Bitmap > &  textures)

Definition at line 758 of file Solid.cpp.

List<Material>& Model::GetMaterials ( )
inline

Definition at line 139 of file Solid.h.

List<Surface>& Model::GetSurfaces ( )
inline

Definition at line 138 of file Solid.h.

bool Model::IsDynamic ( ) const
inline

Definition at line 133 of file Solid.h.

bool Model::IsLuminous ( ) const
inline

Definition at line 135 of file Solid.h.

bool Model::Load ( const char *  mag_file,
double  scale = 1.0 
)

Definition at line 910 of file Solid.cpp.

bool Model::Load ( ModelFile loader,
double  scale = 1.0 
)

Definition at line 989 of file Solid.cpp.

const char* Model::Name ( ) const
inline

Definition at line 126 of file Solid.h.

void Model::Normalize ( )

Definition at line 1710 of file Solid.cpp.

int Model::NumMaterials ( ) const
inline

Definition at line 129 of file Solid.h.

int Model::NumPolys ( ) const
inline

Definition at line 130 of file Solid.h.

int Model::NumSegments ( ) const

Definition at line 849 of file Solid.cpp.

int Model::NumSurfaces ( ) const
inline

Definition at line 128 of file Solid.h.

int Model::NumVerts ( ) const
inline

Definition at line 127 of file Solid.h.

Model & Model::operator= ( const Model m)

Definition at line 806 of file Solid.cpp.

int Model::operator== ( const Model that) const
inline

Definition at line 121 of file Solid.h.

void Model::OptimizeMaterials ( )

Definition at line 1669 of file Solid.cpp.

void Model::OptimizeMesh ( )

Definition at line 1647 of file Solid.cpp.

double Model::Radius ( ) const
inline

Definition at line 132 of file Solid.h.

const Material * Model::ReplaceMaterial ( const Material mtl)

Definition at line 1581 of file Solid.cpp.

void Model::ScaleBy ( double  factor)

Definition at line 1697 of file Solid.cpp.

void Model::SelectPolys ( List< Poly > &  polys,
Material mtl 
)

Definition at line 1732 of file Solid.cpp.

void Model::SelectPolys ( List< Poly > &  polys,
Vec3  loc 
)

Definition at line 1721 of file Solid.cpp.

void Model::SetDynamic ( bool  d)
inline

Definition at line 134 of file Solid.h.

void Model::SetLuminous ( bool  l)
inline

Definition at line 136 of file Solid.h.

static const char* Model::TYPENAME ( )
inlinestatic

Definition at line 112 of file Solid.h.


Friends And Related Function Documentation

friend class ModelFile
friend

Definition at line 109 of file Solid.h.

friend class Solid
friend

Definition at line 108 of file Solid.h.


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