panda3d.core.CollisionBox

from panda3d.core import CollisionBox
class CollisionBox

Bases: CollisionSolid

A cuboid collision volume or object.

Inheritance diagram

Inheritance diagram of CollisionBox

__init__(min: LPoint3, max: LPoint3) → None

Create the Box by Specifying the Diagonal Points

__init__(center: LPoint3, x: float, y: float, z: float) → None

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

property center
Return type

LPoint3

property dimensions
Return type

LVector3

getCenter() → LPoint3
Return type

LPoint3

static getClassType() → TypeHandle
Return type

TypeHandle

getDimensions() → LVector3
Return type

LVector3

getMax() → LPoint3
Return type

LPoint3

getMin() → LPoint3
Return type

LPoint3

getNumPlanes() → int

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

getNumPoints() → int

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

getPlane(n: int) → LPlane

Returns the nth face of the rectangular solid.

Return type

LPlane

getPoint(n: int) → LPoint3

Returns the nth vertex of the OBB.

Return type

LPoint3

getPointAabb(n: int) → LPoint3

Returns the nth vertex of the Axis Aligned Bounding Box.

Return type

LPoint3

property max
Return type

LPoint3

property min
Return type

LPoint3

setCenter(center: LPoint3) → None
setCenter(x: float, y: float, z: float) → None
setPlane(n: int) → LPlane

Creates the nth face of the rectangular solid.

Return type

LPlane