API
Functions and classes available in the Lua API
Public Member Functions | Public Attributes | List of all members
cCuboid Class Reference

#include <0026.h>

Public Member Functions

void Assign (int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
 cCuboid (void)
 cCuboid (const cCuboid &a_Cuboid)
 cCuboid (const Vector3i &a_p1, const Vector3i &a_p2)
 cCuboid (int a_X1, int a_Y1, int a_Z1)
 cCuboid (int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
int DifX (void) const
int DifY (void) const
int DifZ (void) const
bool DoesIntersect (const cCuboid &a_Other) const
 Returns true if the cuboids have at least one voxel in common. Both coords are considered inclusive.
bool IsCompletelyInside (const cCuboid &a_Outer) const
 Returns true if this cuboid is completely inside the specifie cuboid (in all 6 coords)
bool IsInside (const Vector3i &v) const
bool IsInside (int a_X, int a_Y, int a_Z) const
bool IsInside (const Vector3d &v) const
bool IsSorted (void) const
 Returns true if the coords are properly sorted (lesser in p1, greater in p2)
void Move (int a_OfsX, int a_OfsY, int a_OfsZ)
 Moves the cuboid by the specified offsets in each direction.
void Sort (void)

Public Attributes

Vector3i p1
Vector3i p2

Constructor & Destructor Documentation

cCuboid::cCuboid ( void  )
inline
cCuboid::cCuboid ( const cCuboid a_Cuboid)
inline
cCuboid::cCuboid ( const Vector3i a_p1,
const Vector3i a_p2 
)
inline
cCuboid::cCuboid ( int  a_X1,
int  a_Y1,
int  a_Z1 
)
inline
cCuboid::cCuboid ( int  a_X1,
int  a_Y1,
int  a_Z1,
int  a_X2,
int  a_Y2,
int  a_Z2 
)
inline

Member Function Documentation

void cCuboid::Assign ( int  a_X1,
int  a_Y1,
int  a_Z1,
int  a_X2,
int  a_Y2,
int  a_Z2 
)
int cCuboid::DifX ( void  ) const
inline
int cCuboid::DifY ( void  ) const
inline
int cCuboid::DifZ ( void  ) const
inline
bool cCuboid::DoesIntersect ( const cCuboid a_Other) const

Returns true if the cuboids have at least one voxel in common. Both coords are considered inclusive.

bool cCuboid::IsCompletelyInside ( const cCuboid a_Outer) const

Returns true if this cuboid is completely inside the specifie cuboid (in all 6 coords)

bool cCuboid::IsInside ( const Vector3i v) const
inline
bool cCuboid::IsInside ( int  a_X,
int  a_Y,
int  a_Z 
) const
inline
bool cCuboid::IsInside ( const Vector3d v) const
inline
bool cCuboid::IsSorted ( void  ) const

Returns true if the coords are properly sorted (lesser in p1, greater in p2)

void cCuboid::Move ( int  a_OfsX,
int  a_OfsY,
int  a_OfsZ 
)

Moves the cuboid by the specified offsets in each direction.

void cCuboid::Sort ( void  )

Member Data Documentation

Vector3i cCuboid::p1
Vector3i cCuboid::p2