cBuilding Class Reference

#include <cBuilding.h>

Inheritance diagram for cBuilding:
cObject

List of all members.

Public Member Functions

 cBuilding (int x, int y, int z, int rooms_x, int rooms_y, int rooms_z)
virtual void damageByParticle (float *localpos, float damage, cObject *enactor=NULL)
virtual float constrainParticle (float *worldpos, float radius=0.0f, float *localpos=NULL)
virtual void onSpawn ()
 Called right after object was spawned into the world.
virtual void animate (float spf)
 Advance internal timers,animation state and pose, check gamepad.
virtual void transform ()
 Precalculate neccessary transformations - matrices, mountpoints, pos ..
virtual void drawSolid ()
 Render solid non-translucent parts of the object.
virtual void drawEffect ()
 Render translucent object-parts and visual effects.

Protected Attributes

bool mDirtybase
float mBase [16]
cExplosion mExplosion
float mRooms [3]

Static Protected Attributes

static int sInstances = 0
static long sTextures [4]

Detailed Description

Models a building of varring size.


Member Function Documentation

float cBuilding::constrainParticle ( float *  worldpos,
float  radius = 0.0f,
float *  localpos = NULL 
) [virtual]

Constrain the given world position particle or given radius to the object boundary hull ie. place the worldpos to the nearest boundary hull position if the worldpos is inside the object's hull. localpos delivers in case of impact the local position relative to the object of the corrected worldpos. input location vector in world coordinates. radius of the checked particle in world dimensions. output adjusted location vector.

Returns:
the intrusion depth.

Reimplemented from cObject.


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

Generated on Tue Feb 16 18:32:39 2010 for Linwarrior 3D by  doxygen 1.6.1