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.Drawable
objects. Used for frustum culling etcConstructors:
-
osg.
BoundingBox
()¶ Creates an uninitialized bounding box.
-
osg.
BoundingBox
(osg.BoundingBox other) -
Параметры: other (osg.BoundingBox) –
-
osg.
BoundingBox
(osg.Vec3 min, osg.Vec3 max) Creates a bounding box initialized to the given extents.
Параметры:
Methods:
-
:
center
()¶ Calculates and returns the
osg.BoundingBox
center.Тип результата: osg.Vec3
-
:
set
(osg.Vec3 min, osg.Vec3 max)¶ Sets the
osg.BoundingBox
extents.Параметры:
-
:
xMin
()¶ -
Тип результата: double
-
:
yMin
()¶ -
Тип результата: double
-
:
zMin
()¶ -
Тип результата: double
-
:
xMax
()¶ -
Тип результата: double
-
:
yMax
()¶ -
Тип результата: double
-
:
zMax
()¶ -
Тип результата: double
-
:
radius
()¶ Calculates and returns the
osg.BoundingBox
radius.Тип результата: double
-
:
radius2
()¶ Calculates and returns the squared length of the
osg.BoundingBox
radius. Note,osg.BoundingBox.radius2()
is faster to calculate thanosg.BoundingBox.radius()
.Тип результата: double
-
:
contains
(osg.Vec3 point)¶ Returns
true
if thisosg.BoundingBox
contains the specified coordinate.Параметры: point (osg.Vec3) – Тип результата: bool
-
:
min
()¶ Helper function. Returns value of
_min
member of this C++ object asosg.Vec3
.Тип результата: osg.Vec3
-
:
max
()¶ Helper function. Returns value of
_max
member of this C++ object asosg.Vec3
.Тип результата: osg.Vec3
-
:
valid
()¶ Returns
true
if theosg.BoundingBox
extents are valid,false
otherwise.Тип результата: bool
-
:
corner
(unsigned pos)¶ Returns a specific corner of the
osg.BoundingBox
. pos specifies the corner as a number between0
and7
. 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.Параметры: pos (unsigned) – Тип результата: osg.Vec3
-
:
expandBy
(osg.Vec3 vec)¶ Expands the
osg.BoundingBox
to include the given coordinate. If theosg.BoundingBox
is uninitialized, set its min and max extents to given vec.Параметры: vec (osg.Vec3) –
-
:
expandBy
(double x, double y, double z) Expands the
osg.BoundingBox
to include the given coordinate. If theosg.BoundingBox
is uninitialized, set its min and max extents toVec3(x,y,z)
.Параметры: - x (double) –
- y (double) –
- z (double) –
-
:
expandBy
(osg.BoundingBox bb) Expands this
osg.BoundingBox
to include the givenosg.BoundingBox
. If thisosg.BoundingBox
is uninitialized, set it equal to bb.Параметры: bb (osg.BoundingBox) –
-