#include <stage.hh>
|
void | AppendTouchingModels (std::set< Model *> &touchers) |
|
| Block (BlockGroup *group, const std::vector< point_t > &pts, const Bounds &zrange) |
|
| Block (BlockGroup *group, Worldfile *wf, int entity) |
|
double | CenterX () |
|
double | CenterY () |
|
void | DrawFootPrint () |
|
void | DrawSolid (bool topview) |
|
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 1128 of file stage.hh.
◆ Block() [1/2]
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 12 of file block.cc.
◆ Block() [2/2]
A from-file constructor
Definition at line 20 of file block.cc.
◆ ~Block()
◆ AppendTouchingModels()
void Block::AppendTouchingModels |
( |
std::set< Model *> & |
touchers | ) |
|
◆ CenterX()
double Block::CenterX |
( |
| ) |
|
Return the center of the block on the X axis
Return the value half way between the min and max X position of the polygon points
Definition at line 69 of file block.cc.
◆ CenterY()
double Block::CenterY |
( |
| ) |
|
Return the center of the block on the Y axis
Return the value half way between the min and max Y position of the polygon points
Definition at line 49 of file block.cc.
◆ DrawFootPrint()
void Block::DrawFootPrint |
( |
| ) |
|
draw the projection of the block onto the z=0 plane
Definition at line 295 of file block.cc.
◆ DrawSides()
void Block::DrawSides |
( |
| ) |
|
|
private |
◆ DrawSolid()
void Block::DrawSolid |
( |
bool |
topview | ) |
|
draw the block in OpenGL as a solid single color
Definition at line 303 of file block.cc.
◆ DrawTop()
◆ Load()
void Block::Load |
( |
Worldfile * |
wf, |
|
|
int |
entity |
|
) |
| |
◆ Map()
void Block::Map |
( |
unsigned int |
layer | ) |
|
render the block into the world's raytrace data structure
Definition at line 170 of file block.cc.
◆ Rasterize()
void Block::Rasterize |
( |
uint8_t * |
data, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
meters_t |
cellwidth, |
|
|
meters_t |
cellheight |
|
) |
| |
◆ SetCenter()
void Block::SetCenter |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Set the center of the block
move the block by the distance required to bring its center to the requested position
Definition at line 88 of file block.cc.
◆ SetCenterX()
void Block::SetCenterX |
( |
double |
x | ) |
|
Set the center of the block on the X axis
move the block by the distance required to bring its center to the requested position
Definition at line 102 of file block.cc.
◆ SetCenterY()
void Block::SetCenterY |
( |
double |
y | ) |
|
Set the center of the block on the Y axis
move the block by the distance required to bring its center to the requested position
Definition at line 95 of file block.cc.
◆ SetZ()
void Block::SetZ |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
Set the extent in Z of the block
Definition at line 107 of file block.cc.
◆ TestCollision()
Model * Block::TestCollision |
( |
| ) |
|
Returns the first model that shares a bitmap cell with this model
Definition at line 129 of file block.cc.
◆ Translate()
void Block::Translate |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Translate all points in the block by the indicated amounts
Definition at line 36 of file block.cc.
◆ UnMap()
void Block::UnMap |
( |
unsigned int |
layer | ) |
|
remove the block from the world's raytracing data structure
Definition at line 183 of file block.cc.
◆ BlockGroup
◆ Canvas
◆ Cell
◆ Model
◆ SuperRegion
◆ World
◆ global_z
z extent in global coordinates.
Definition at line 1194 of file stage.hh.
◆ group
◆ local_z
z extent in local coords.
Definition at line 1193 of file stage.hh.
◆ pts
std::vector<point_t> Stg::Block::pts |
|
private |
points defining a polygon.
Definition at line 1192 of file stage.hh.
◆ rendered_cells
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. One vector for each of the two bitmap layers.
Definition at line 1199 of file stage.hh.
The documentation for this class was generated from the following files: