Stg::Block Class Reference
#include <stage.hh>
Public Member Functions | |
void | AddToCellArray (CellPtrVec *blocks) |
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 | Draw (Model *mod) |
void | DrawFootPrint () |
void | DrawSolid () |
void | GenerateCandidateCells () |
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 | RecordRendering (Cell *cell) |
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 | ( | ) |
Member Function Documentation
void Block::AddToCellArray | ( | CellPtrVec * | blocks | ) |
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::Draw | ( | Model * | mod | ) |
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 | ( | ) |
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 Stg::Block::RecordRendering | ( | Cell * | cell | ) | [inline] |
void Block::RemoveFromCellArray | ( | CellPtrVec * | blocks | ) |
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 Wed Jul 22 11:51:05 2009 for Stage by
