OpenSceneGraph/doc/osg/BoundingBox.html
2001-01-10 16:32:10 +00:00

235 lines
9.7 KiB
HTML

<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::BoundingBox</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.3">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::BoundingBox</A></H2>
<BLOCKQUOTE>General purpose axis-aligned bounding box class for enclosing objects/vertices.</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<A HREF="#DOC.2.3.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>_min</B>
<DD><I>The corner with the smallest values for each coordinate of the bounding box</I>
<DT>
<A HREF="#DOC.2.3.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>_max</B>
<DD><I>The corner with the largest values for each coordinate of the bounding box</I>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<A HREF="#DOC.2.3.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> <B>BoundingBox</B>()
<DD><I>construct to invalid values to represent an unset bounding box</I>
<DT>
<A HREF="#DOC.2.3.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>init</B>()
<DD><I>initialize to invalid values to represent an unset bounding box</I>
<DT>
<A HREF="#DOC.2.3.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool <B>isValid</B>() const
<DD><I>return true if the bounding box contains valid values, false if the bounding box is effectively unset/empty</I>
<DT>
<A HREF="#DOC.2.3.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>xMin</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>xMin</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>yMin</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>yMin</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>zMin</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>zMin</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.20"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>xMax</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.21"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>xMax</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.22"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>yMax</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.23"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>yMax</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.24"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>zMax</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.25"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>zMax</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.3.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>center</B>() const
<DD><I>Calculate and return the center of the bounding box</I>
<DT>
<A HREF="#DOC.2.3.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>radius</B>() const
<DD><I>Calculate and return the radius of the bounding box</I>
<DT>
<A HREF="#DOC.2.3.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>radius2</B>() const
<DD><I>Calculate and return the radius squared of the bounding box.</I>
<DT>
<A HREF="#DOC.2.3.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>corner</B>(unsigned int pos) const
<DD><I>return the corner of the bounding box.</I>
<DT>
<A HREF="#DOC.2.3.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandBy</B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)
<DD><I>If the vertex is outwith the box expand to ecompass vertex.</I>
<DT>
<A HREF="#DOC.2.3.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandBy</B>(const <!1><A HREF="BoundingBox.html#DOC.2.3.3">BoundingBox</A>&amp; bb)
<DD><I>If incomming box is outwith the box expand to ecompass incomming box.</I>
<DT>
<A HREF="#DOC.2.3.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandBy</B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; sh)
<DD><I>If incomming sphere is outwith the box expand to ecompass incomming sphere.</I>
<DT>
<A HREF="#DOC.2.3.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool <B>contains</B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)
<DD><I>return true is vertex v is within the box</I>
</DL></P>
</DL>
<A NAME="DOC.DOCU">
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>General purpose axis-aligned bounding box class for enclosing objects/vertices.
Used to bounding the leaf objects in the scene,
i.e. osg::GeoSet's to assist in view frustum culling etc.</BLOCKQUOTE>
<DL>
<A NAME="_min">
<A NAME="DOC.2.3.1">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> _min</B></TT>
<DD>The corner with the smallest values for each coordinate of the
bounding box
<DL><DT><DD></DL><P>
<A NAME="_max">
<A NAME="DOC.2.3.2">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> _max</B></TT>
<DD>The corner with the largest values for each coordinate of the
bounding box
<DL><DT><DD></DL><P>
<A NAME="BoundingBox">
<A NAME="DOC.2.3.3">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> BoundingBox()</B></TT>
<DD>construct to invalid values to represent an unset bounding box
<DL><DT><DD></DL><P>
<A NAME="init">
<A NAME="DOC.2.3.4">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void init()</B></TT>
<DD>initialize to invalid values to represent an unset bounding box
<DL><DT><DD></DL><P>
<A NAME="isValid">
<A NAME="DOC.2.3.5">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool isValid() const </B></TT>
<DD>return true if the bounding box contains valid values,
false if the bounding box is effectively unset/empty
<DL><DT><DD></DL><P>
<A NAME="xMin">
<A NAME="DOC.2.3.14">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; xMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMin">
<A NAME="DOC.2.3.15">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float xMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMin">
<A NAME="DOC.2.3.16">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; yMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMin">
<A NAME="DOC.2.3.17">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float yMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMin">
<A NAME="DOC.2.3.18">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; zMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMin">
<A NAME="DOC.2.3.19">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float zMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMax">
<A NAME="DOC.2.3.20">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; xMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMax">
<A NAME="DOC.2.3.21">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float xMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMax">
<A NAME="DOC.2.3.22">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; yMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMax">
<A NAME="DOC.2.3.23">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float yMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMax">
<A NAME="DOC.2.3.24">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; zMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMax">
<A NAME="DOC.2.3.25">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float zMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="center">
<A NAME="DOC.2.3.6">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> center() const </B></TT>
<DD>Calculate and return the center of the bounding box
<DL><DT><DD></DL><P>
<A NAME="radius">
<A NAME="DOC.2.3.7">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float radius() const </B></TT>
<DD>Calculate and return the radius of the bounding box
<DL><DT><DD></DL><P>
<A NAME="radius2">
<A NAME="DOC.2.3.8">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float radius2() const </B></TT>
<DD>Calculate and return the radius squared of the bounding box.
Note, radius2() is faster to calculate than radius().
<DL><DT><DD></DL><P>
<A NAME="corner">
<A NAME="DOC.2.3.9">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> corner(unsigned int pos) const </B></TT>
<DD>return the corner of the bounding box.
Position (pos) is specfied by a number between 0 and 7,
the first bit toggles between x min and x max, second
bit toggles between y min and y max, third bit toggles
between z min and z max.
<DL><DT><DD></DL><P>
<A NAME="expandBy">
<A NAME="DOC.2.3.10">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)</B></TT>
<DD>If the vertex is outwith the box expand to ecompass vertex.
If this box is empty then move set this box's min max to vertex.
<DL><DT><DD></DL><P>
<A NAME="expandBy">
<A NAME="DOC.2.3.11">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="BoundingBox.html#DOC.2.3.3">BoundingBox</A>&amp; bb)</B></TT>
<DD>If incomming box is outwith the box expand to ecompass incomming box.
If this box is empty then move set this box to incomming box.
<DL><DT><DD></DL><P>
<A NAME="expandBy">
<A NAME="DOC.2.3.12">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; sh)</B></TT>
<DD>If incomming sphere is outwith the box expand to ecompass incomming sphere.
If this box is empty then move set this box to encompass the sphere.
<DL><DT><DD></DL><P>
<A NAME="contains">
<A NAME="DOC.2.3.13">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool contains(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)</B></TT>
<DD>return true is vertex v is within the box
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DD></DL><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I><P><HR>
<BR>
This page was generated with the help of <A HREF="http://www.linuxsupportline.com/~doc++">DOC++</A>.
</BODY>