OBJECTS Class Reference

#include <objects.h>

Collaboration diagram for OBJECTS:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OBJECTS ()
 ~OBJECTS ()
void Draw (bool cull)
void UpdateSettings ()
OBJECTNODEAdd (VERTEX pos, float rotation, string modelname, string texname, bool mip, bool fullbright, bool skybox, bool drv, bool col, bool blend, JOEPACK *pack, float f1, float f2, float bl, float bm, float rr, float rd)
void DeleteAll ()
bool Collide (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, VERTEX &normal, float seglen, OBJECTNODE *&colnode)
bool CollideD (VERTEXD origin, VERTEXD direction, VERTEXD &outtri, bool closest, VERTEXD &normal, double seglen)
bool CollideDriveable (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, VERTEX &normal)
bool CollideModel (VERTEX *modelverts, int numfaces, AABB bbox, VERTEX &outtri, bool closest, VERTEX &normal, float &depth)
void LoadObjectsFromFolder (string objectpath)
bool GetCollideAndDriveTogether ()
void GetTrisInBBox (AABB bbox, list< OBJECTTRI > &trilist)

Private Member Functions

void delmodel ()
void delobject ()
void DrawObject (OBJECTNODE *object)
OBJECTMODELAddModel (string modelname, string texname, bool mip, bool fullbright, bool skybox, bool blend, JOEPACK *pack)
void GroupObjectListByTexture ()

Private Attributes

float lod_far
int display_x
int display_y
ofstream error_log
OBJECTMODELmodel_list
OBJECTNODEobject_list
string path
OBJECTCOLLISION collision
map< string, TEXTURE_HANDLEtexture_db
TEXTURE_HANDLE sphere_reflection
bool sphere_reflection_loaded

Detailed Description

Definition at line 127 of file objects.h.


Constructor & Destructor Documentation

OBJECTS::OBJECTS  ) 
 

Definition at line 3 of file objects.cpp.

References error_log, SETTINGS::GetSettingsDir(), model_list, NULL, object_list, settings, and sphere_reflection_loaded.

OBJECTS::~OBJECTS  ) 
 

Definition at line 14 of file objects.cpp.

References DeleteAll(), and error_log.


Member Function Documentation

OBJECTNODE * OBJECTS::Add VERTEX  pos,
float  rotation,
string  modelname,
string  texname,
bool  mip,
bool  fullbright,
bool  skybox,
bool  drv,
bool  col,
bool  blend,
JOEPACK pack,
float  f1,
float  f2,
float  bl,
float  bm,
float  rr,
float  rd
 

Definition at line 276 of file objects.cpp.

References AddModel(), OBJECTNODE::bumplength, OBJECTNODE::bumpmag, OBJECTNODE::cancollide, OBJECTNODE::driveable, OBJECTNODE::friction1, OBJECTNODE::friction2, OBJECTNODE::model, model_list, OBJECTMODEL::name, OBJECTNODE::next, NULL, object_list, OBJECTNODE::pos, OBJECTNODE::rolling_drag, OBJECTNODE::rolling_resistance_factor, OBJECTNODE::texture, VERTEX::x, and VERTEX::z.

OBJECTMODEL * OBJECTS::AddModel string  modelname,
string  texname,
bool  mip,
bool  fullbright,
bool  skybox,
bool  blend,
JOEPACK pack
[private]
 

Definition at line 336 of file objects.cpp.

References OBJECTMODEL::blend, OBJECTMODEL::fullbright, OBJECTMODEL::jmodel, JOEMODEL::Load(), model_list, OBJECTMODEL::name, OBJECTMODEL::next, path, OBJECTMODEL::skybox, texture_db, and JOEMODEL::TextureID().

Referenced by Add().

bool OBJECTS::Collide VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
VERTEX normal,
float  seglen,
OBJECTNODE *&  colnode
 

Definition at line 517 of file objects.cpp.

References OBJECTCOLLISION::CollideAABB(), and collision.

Referenced by TRACK::Collide(), and LoadWorld().

bool OBJECTS::CollideD VERTEXD  origin,
VERTEXD  direction,
VERTEXD outtri,
bool  closest,
VERTEXD normal,
double  seglen
 

Definition at line 522 of file objects.cpp.

References OBJECTCOLLISION::CollideAABB_double(), and collision.

Referenced by TRACK::CollideD().

bool OBJECTS::CollideDriveable VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
VERTEX normal
 

Definition at line 527 of file objects.cpp.

References OBJECTCOLLISION::CollideDriveable(), and collision.

bool OBJECTS::CollideModel VERTEX modelverts,
int  numfaces,
AABB  bbox,
VERTEX outtri,
bool  closest,
VERTEX normal,
float &  depth
 

Definition at line 532 of file objects.cpp.

References OBJECTCOLLISION::CollideModelAABB(), and collision.

Referenced by TRACK::CollideModel().

void OBJECTS::DeleteAll  ) 
 

Definition at line 22 of file objects.cpp.

References texture_db.

Referenced by LoadObjectsFromFolder(), and ~OBJECTS().

void OBJECTS::delmodel  )  [private]
 

Definition at line 56 of file objects.cpp.

References model_list, OBJECTMODEL::next, and NULL.

void OBJECTS::delobject  )  [private]
 

Definition at line 45 of file objects.cpp.

References OBJECTNODE::next, NULL, and object_list.

void OBJECTS::Draw bool  cull  ) 
 

Definition at line 193 of file objects.cpp.

References OBJECTMODEL::blend, DrawObject(), OBJECTNODE::model, NULL, object_list, and OBJECTMODEL::skybox.

void OBJECTS::DrawObject OBJECTNODE object  )  [private]
 

Definition at line 74 of file objects.cpp.

References cam, CAMERA::frustum, JOEMODEL::GetBBOX(), AABB::GetCenter(), JOEMODEL::GetRadius(), OBJECTMODEL::jmodel, lod_far, OBJECTNODE::model, OBJECTNODE::pos, CAMERA::position, OBJECTMODEL::skybox, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by Draw().

bool OBJECTS::GetCollideAndDriveTogether  )  [inline]
 

Definition at line 170 of file objects.h.

References COLLIDE_AND_DRIVE_TOGETHER.

void OBJECTS::GetTrisInBBox AABB  bbox,
list< OBJECTTRI > &  trilist
 

Definition at line 1878 of file objects.cpp.

References collision, and OBJECTCOLLISION::GetTrisInBBox().

void OBJECTS::GroupObjectListByTexture  )  [private]
 

Definition at line 1852 of file objects.cpp.

References NULL, object_list, and OBJECTNODE::texture.

void OBJECTS::LoadObjectsFromFolder string  objectpath  ) 
 

Definition at line 372 of file objects.cpp.

References OBJECTCOLLISION::Clear(), collision, DeleteAll(), JOEPACK::LoadPack(), and NULL.

Referenced by LoadWorld().

void OBJECTS::UpdateSettings  ) 
 

Definition at line 67 of file objects.cpp.

References display_x, display_y, SETTINGS::Get(), lod_far, and settings.

Referenced by ReloadDisplay().


Member Data Documentation

OBJECTCOLLISION OBJECTS::collision [private]
 

Definition at line 145 of file objects.h.

Referenced by Collide(), CollideD(), CollideDriveable(), CollideModel(), GetTrisInBBox(), and LoadObjectsFromFolder().

int OBJECTS::display_x [private]
 

Definition at line 131 of file objects.h.

Referenced by UpdateSettings().

int OBJECTS::display_y [private]
 

Definition at line 131 of file objects.h.

Referenced by UpdateSettings().

ofstream OBJECTS::error_log [private]
 

Definition at line 132 of file objects.h.

Referenced by OBJECTS(), and ~OBJECTS().

float OBJECTS::lod_far [private]
 

Definition at line 130 of file objects.h.

Referenced by DrawObject(), and UpdateSettings().

OBJECTMODEL* OBJECTS::model_list [private]
 

Definition at line 133 of file objects.h.

Referenced by Add(), AddModel(), delmodel(), and OBJECTS().

OBJECTNODE* OBJECTS::object_list [private]
 

Definition at line 136 of file objects.h.

Referenced by Add(), delobject(), Draw(), GroupObjectListByTexture(), and OBJECTS().

string OBJECTS::path [private]
 

Definition at line 143 of file objects.h.

Referenced by AddModel().

TEXTURE_HANDLE OBJECTS::sphere_reflection [private]
 

Definition at line 151 of file objects.h.

bool OBJECTS::sphere_reflection_loaded [private]
 

Definition at line 152 of file objects.h.

Referenced by OBJECTS().

map<string, TEXTURE_HANDLE> OBJECTS::texture_db [private]
 

Definition at line 147 of file objects.h.

Referenced by AddModel(), and DeleteAll().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:17 2006 by  doxygen 1.4.6