#include <stage.hh>
|
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 Color & | GetColor () |
|
Model * | GetModel () |
|
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) |
|
Model * | TestCollision () |
|
void | Translate (double x, double y) |
|
void | UnMap (unsigned int layer) |
|
| ~Block () |
|
Definition at line 1197 of file stage.hh.
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.
Definition at line 13 of file block.cc.
A from-file constructor
Definition at line 34 of file block.cc.
void Block::AppendTouchingModels |
( |
std::set< Model * > & |
touchers | ) |
|
find the position of a block's point in model coordinates (m)
Definition at line 240 of file block.cc.
double Block::CenterX |
( |
| ) |
|
Return the center of the block on the X axis
Definition at line 89 of file block.cc.
double Block::CenterY |
( |
| ) |
|
Return the center of the block on the Y axis
Definition at line 74 of file block.cc.
void Block::DrawFootPrint |
( |
| ) |
|
draw the projection of the block onto the z=0 plane
Definition at line 360 of file block.cc.
void Block::DrawSides |
( |
| ) |
|
|
private |
void Block::DrawSolid |
( |
bool |
topview | ) |
|
draw the block in OpenGL as a solid single color
Definition at line 368 of file block.cc.
const Color & Block::GetColor |
( |
| ) |
|
Model* Stg::Block::GetModel |
( |
| ) |
|
|
inline |
void Block::InvalidateModelPointCache |
( |
| ) |
|
|
private |
invalidate the cache of points in model coordinates
Definition at line 249 of file block.cc.
void Block::Load |
( |
Worldfile * |
wf, |
|
|
int |
entity |
|
) |
| |
void Block::Map |
( |
unsigned int |
layer | ) |
|
render the block into the world's raytrace data structure
Definition at line 197 of file block.cc.
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
Definition at line 104 of file block.cc.
void Block::SetCenterX |
( |
double |
y | ) |
|
Set the center of the block on the X axis
Definition at line 118 of file block.cc.
void Block::SetCenterY |
( |
double |
y | ) |
|
Set the center of the block on the Y axis
Definition at line 111 of file block.cc.
void Block::SetZ |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
Set the extent in Z of the block
Definition at line 125 of file block.cc.
Model * Block::TestCollision |
( |
| ) |
|
Returns the first model that shares a bitmap cell with this model
Definition at line 153 of file block.cc.
void Block::Translate |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Translate all points in the block by the indicated amounts
Definition at line 63 of file block.cc.
void Block::UnMap |
( |
unsigned int |
layer | ) |
|
remove the block from the world's raytracing data structure
Definition at line 231 of file block.cc.
z extent in global coordinates
Definition at line 1283 of file stage.hh.
bool Stg::Block::inherit_color |
|
private |
std::vector< std::list<Block*>::iterator > Stg::Block::list_entries |
|
private |
record the list entries for the cells where this block is rendered
Definition at line 1287 of file stage.hh.
z extent in local coords
Definition at line 1274 of file stage.hh.
model to which this block belongs
Definition at line 1269 of file stage.hh.
std::vector<point_t> Stg::Block::mpts |
|
private |
cache of this->pts in model coordindates
Definition at line 1270 of file stage.hh.
size_t Stg::Block::pt_count |
|
private |
the number of points
Definition at line 1271 of file stage.hh.
std::vector<point_t> Stg::Block::pts |
|
private |
points defining a polygonx
Definition at line 1272 of file stage.hh.
std::vector<Cell*> Stg::Block::rendered_cells[2] |
|
private |
record the cells into which this block has been rendered so we can remove them very quickly.
Definition at line 1291 of file stage.hh.
The documentation for this class was generated from the following files: