CollisionBox

class CollisionBox

Bases: CollisionSolid

A cuboid collision volume or object.

Inheritance diagram

Inheritance diagram of CollisionBox

explicit CollisionBox(LPoint3 const &center, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
explicit CollisionBox(LPoint3 const &min, LPoint3 const &max)

Create the Box by giving a Center and distances of each of the sides of box from the Center.

Create the Box by Specifying the Diagonal Points

Creates an invalid Box. Only used when reading from a bam file.

LPoint3 const &get_center(void) const
static TypeHandle get_class_type(void)
LVector3 get_dimensions(void) const
LPoint3 const &get_max(void) const
LPoint3 const &get_min(void) const
int get_num_planes(void) const

Returns 6: the number of faces of a rectangular solid.

int get_num_points(void) const

Returns 8: the number of vertices of a rectangular solid.

LPlane get_plane(int n) const

Returns the nth face of the rectangular solid.

LPoint3 get_point(int n) const

Returns the nth vertex of the OBB.

LPoint3 get_point_aabb(int n) const

Returns the nth vertex of the Axis Aligned Bounding Box.

void set_center(LPoint3 const &center)
void set_center(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
LPlane set_plane(int n) const

Creates the nth face of the rectangular solid.