Stg::Block Class Reference

#include <stage.hh>

List of all members.

Public Member Functions

void AppendTouchingModels (std::set< Model * > &touchers)
 Block (Model *mod, const std::vector< point_t > &pts, meters_t zmin, meters_t zmax, Color color, bool inherit_color, bool wheel)
 Block (Model *mod, Worldfile *wf, int entity)
double CenterX ()
double CenterY ()
void DrawFootPrint ()
void DrawSolid (bool topview)
const ColorGetColor ()
ModelGetModel ()
void Load (Worldfile *wf, int entity)
void Map (unsigned int layer)
void Rasterize (uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
void SetCenter (double x, double y)
void SetCenterX (double y)
void SetCenterY (double y)
void SetZ (double min, double max)
ModelTestCollision ()
void Translate (double x, double y)
void UnMap (unsigned int layer)
 ~Block ()

Constructor & Destructor Documentation

Block::Block ( Model mod,
const std::vector< point_t > &  pts,
meters_t  zmin,
meters_t  zmax,
Color  color,
bool  inherit_color,
bool  wheel 
)

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 ( std::set< Model * > &  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 ( bool  topview)

draw the block in OpenGL as a solid single color

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

render the block into the world's raytrace data structure

void Block::Rasterize ( uint8_t *  data,
unsigned int  width,
unsigned int  height,
meters_t  cellwidth,
meters_t  cellheight 
)
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

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 ( unsigned int  layer)

remove the block from the world's raytracing data structure


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