Box

From Crumbled World Wiki
Revision as of 13:35, 5 July 2025 by Anders (talk | contribs) (Created page with "{{:BoxExampleCode}} ==Constructor== {| class="wikitable" !|function !|description |- |Box(Vec3 minPos, Vec3 maxPos) | |- |Box(Sphere sphere) | |- |Box() | |- |} ==Functions== {| class="wikitable" !|return !|function !|description |- |Vec3 |getMinPos() |Returns the box minPos. |- |Vec3 |getMaxPos() |Returns the box maxPos. |- |Vec3 |getCenterPosition() |Returns the box center po...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BoxExampleCode

Constructor

function description
Box(Vec3 minPos, Vec3 maxPos)
Box(Sphere sphere)
Box()

Functions

return function description
Vec3 getMinPos() Returns the box minPos.
Vec3 getMaxPos() Returns the box maxPos.
Vec3 getCenterPosition() Returns the box center position.
float getVolume() Returns the box volume.
bool isPositionInsideBox(Vec3 position) Returns true if the position is inside the box.
setMaxPos(Vec3 maxPos) set the box maxPos.
setMinPos(Vec3 minPos) set the box minPos.
expand(Box box) Expand box to include the box.
expand(Sphere sphere) Expand box to include the sphere.
expand(Vec3 point) Expand box to include the point.