osg.BoundingBox¶
-
class
osg.BoundingBox¶ Represents: c++ class Wraps: osg::BoundingBoxImpl<osg::Vec3d> General purpose axis-aligned bounding box class for enclosing objects/vertices. Bounds leaf objects in a scene such as
osg.Drawableobjects. Used for frustum culling etcConstructors:
-
osg.BoundingBox()¶ Creates an uninitialized bounding box.
-
osg.BoundingBox(osg.BoundingBox other) -
Parameters: other ( osg.BoundingBox) –
-
osg.BoundingBox(osg.Vec3 min, osg.Vec3 max) Creates a bounding box initialized to the given extents.
Parameters:
Methods:
-
:
center()¶ Calculates and returns the
osg.BoundingBoxcenter.Return type: osg.Vec3
-
:
set(osg.Vec3 min, osg.Vec3 max)¶ Sets the
osg.BoundingBoxextents.Parameters:
-
:
xMin()¶ -
Return type: double
-
:
yMin()¶ -
Return type: double
-
:
zMin()¶ -
Return type: double
-
:
xMax()¶ -
Return type: double
-
:
yMax()¶ -
Return type: double
-
:
zMax()¶ -
Return type: double
-
:
radius()¶ Calculates and returns the
osg.BoundingBoxradius.Return type: double
-
:
radius2()¶ Calculates and returns the squared length of the
osg.BoundingBoxradius. Note,osg.BoundingBox.radius2()is faster to calculate thanosg.BoundingBox.radius().Return type: double
-
:
contains(osg.Vec3 point)¶ Returns
trueif thisosg.BoundingBoxcontains the specified coordinate.Parameters: point ( osg.Vec3) –Return type: bool
-
:
min()¶ Helper function. Returns value of
_minmember of this C++ object asosg.Vec3.Return type: osg.Vec3
-
:
max()¶ Helper function. Returns value of
_maxmember of this C++ object asosg.Vec3.Return type: osg.Vec3
-
:
valid()¶ Returns
trueif theosg.BoundingBoxextents are valid,falseotherwise.Return type: bool
-
:
corner(unsigned pos)¶ Returns a specific corner of the
osg.BoundingBox. pos specifies the corner as a number between0and7. Each bit selects an axis, X, Y, or Z from least- to most-significant. Unset bits select the minimum value for that axis, and set bits select the maximum.Parameters: pos ( unsigned) –Return type: osg.Vec3
-
:
expandBy(osg.Vec3 vec)¶ Expands the
osg.BoundingBoxto include the given coordinate. If theosg.BoundingBoxis uninitialized, set its min and max extents to given vec.Parameters: vec ( osg.Vec3) –
-
:
expandBy(double x, double y, double z) Expands the
osg.BoundingBoxto include the given coordinate. If theosg.BoundingBoxis uninitialized, set its min and max extents toVec3(x,y,z).Parameters: - x (
double) – - y (
double) – - z (
double) –
- x (
-
:
expandBy(osg.BoundingBox bb) Expands this
osg.BoundingBoxto include the givenosg.BoundingBox. If thisosg.BoundingBoxis uninitialized, set it equal to bb.Parameters: bb ( osg.BoundingBox) –
-
:
expandBy(osg.BoundingSphere bs) -
Parameters: bs ( osg.BoundingSphere) –
-