Stg::Block Class Reference

#include <stage.hh>

List of all members.

Public Member Functions

void AppendTouchingModels (ModelPtrSet &touchers)
 Block (Model *mod, Worldfile *wf, int entity)
 Block (Model *mod, stg_point_t *pts, size_t pt_count, stg_meters_t zmin, stg_meters_t zmax, Color color, bool inherit_color)
double CenterX ()
double CenterY ()
void DrawFootPrint ()
void DrawSolid ()
void GenerateCandidateCells ()
const Color & GetColor ()
Model * GetModel ()
void Load (Worldfile *wf, int entity)
void Map ()
std::vector< stg_point_t > & Points ()
stg_point_t * Points (unsigned int *count)
void Rasterize (uint8_t *data, unsigned int width, unsigned int height, stg_meters_t cellwidth, stg_meters_t cellheight)
void RemoveFromCellArray (CellPtrVec *blocks)
void SetCenter (double x, double y)
void SetCenterX (double y)
void SetCenterY (double y)
void SetZ (double min, double max)
void SwitchToTestedCells ()
Model * TestCollision ()
void Translate (double x, double y)
void UnMap ()
 ~Block ()

Constructor & Destructor Documentation

Block::Block ( Model *  mod,
stg_point_t *  pts,
size_t  pt_count,
stg_meters_t  zmin,
stg_meters_t  zmax,
Color  color,
bool  inherit_color 
)

Block Constructor. A model's body is a list of these blocks. The point data is copied, so pts can safely be freed after constructing the block.

Create a new block. A model's body is a list of these blocks. The point data is copied, so pts can safely be freed after calling this.

Block::Block ( Model *  mod,
Worldfile *  wf,
int  entity 
)

A from-file constructor

Block::~Block (  ) 

Member Function Documentation

void Block::AppendTouchingModels ( ModelPtrSet &  touchers  ) 
double Block::CenterX (  ) 

Return the center of the block on the X axis

double Block::CenterY (  ) 

Return the center of the block on the Y axis

void Block::DrawFootPrint (  ) 

draw the projection of the block onto the z=0 plane

void Block::DrawSolid (  ) 

draw the block in OpenGL as a solid single color

void Block::GenerateCandidateCells (  )  [inline]
const Color & Block::GetColor (  ) 
Model* Stg::Block::GetModel (  )  [inline]
void Block::Load ( Worldfile *  wf,
int  entity 
)
void Block::Map (  ) 

render the block into the world's raytrace data structure

std::vector<stg_point_t>& Stg::Block::Points (  )  [inline]
stg_point_t* Stg::Block::Points ( unsigned int *  count  )  [inline]
void Block::Rasterize ( uint8_t *  data,
unsigned int  width,
unsigned int  height,
stg_meters_t  cellwidth,
stg_meters_t  cellheight 
)
void Block::RemoveFromCellArray ( CellPtrVec *  blocks  )  [inline]
void Block::SetCenter ( double  x,
double  y 
)

Set the center of the block

void Block::SetCenterX ( double  y  ) 

Set the center of the block on the X axis

void Block::SetCenterY ( double  y  ) 

Set the center of the block on the Y axis

void Block::SetZ ( double  min,
double  max 
)

Set the extent in Z of the block

void Block::SwitchToTestedCells (  ) 
Model * Block::TestCollision (  ) 

Returns the first model that shares a bitmap cell with this model

void Block::Translate ( double  x,
double  y 
)

Translate all points in the block by the indicated amounts

void Block::UnMap (  ) 

remove the block from the world's raytracing data structure


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

Generated on Tue Oct 20 15:42:06 2009 for Stage by  doxygen 1.6.1