Libprimis
Imprimis' 3D destroyable world engine
|
A representation of a rectangular volume of cubes. More...
#include <octa.h>
Public Member Functions | |
int | size () const |
Returns the volume of the selection. | |
int | us (int d) const |
Returns the absolute size of the selection along the specified axis. | |
bool | operator== (const selinfo &sel) const |
Returns whether the two selections occupy the same space. | |
bool | validate () |
Keeps the selection within the world. | |
Public Attributes | |
int | corner |
int | cx |
int | cxs |
int | cy |
int | cys |
ivec | o |
ivec | s |
int | grid |
int | orient |
A representation of a rectangular volume of cubes.
|
inline |
Returns whether the two selections occupy the same space.
Requires that the two selections are occupying the same volume in the world space, and both are of the same gridpower and orientation (selected face). Otherwise, false is returned.
|
inline |
Returns the volume of the selection.
The volume returned is in the units of the gridpower being used, so selections with the same cube dimensions but different gridpowers will have the same volume.
|
inline |
Returns the absolute size of the selection along the specified axis.
d | the dimension to query (0 for x, 1 for y, 2 for z) |
bool selinfo::validate | ( | ) |
Keeps the selection within the world.
int selinfo::grid |
the gridscale of the selection
ivec selinfo::o |
the coordinates from which the selection starts
int selinfo::orient |
the orientation of the selection
ivec selinfo::s |
the offset vector conveying the size of the selection