OpenSceneGraph/doc/doc++/osg/BoundingBox.html
2003-04-17 16:22:51 +00:00

261 lines
13 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::BoundingBox</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::BoundingBox</A></H2></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>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.28.1">_min</A></B>
<DD><I>The corner with the smallest values for each coordinate of the bounding box</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.28.2">_max</A></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>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.28.3">BoundingBox</A></B>()
<DD><I>construct to invalid values to represent an unset bounding box</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.28.4">BoundingBox</A></B>(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
<DD><I>construct to with specified min and max values</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.28.5">BoundingBox</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; min, const <!1><A HREF="Vec3.html">Vec3</A>&amp; max)
<DD><I>construct to with specified min and max values</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.28.6">init</A></B>()
<DD><I>initialize to invalid values to represent an unset bounding box</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.28.7">valid</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.28.8">set</A></B>(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.28.9">set</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; min, const <!1><A HREF="Vec3.html">Vec3</A>&amp; max)
<DD><I>construct to with specified min and max values</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.10">xMin</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.11">xMin</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.12">yMin</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.13">yMin</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.14">zMin</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.15">zMin</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.16">xMax</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.17">xMax</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.18">yMax</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.19">yMax</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.28.20">zMax</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.21">zMax</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.28.22">center</A></B>() const
<DD><I>Calculate and return the center of the bounding box</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.23">radius</A></B>() const
<DD><I>Calculate and return the radius of the bounding box</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.28.24">radius2</A></B>() const
<DD><I>Calculate and return the radius squared of the bounding box.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.28.25">corner</A></B>(unsigned int pos) const
<DD><I>return the corner of the bounding box.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.28.26">expandBy</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)
<DD><I>If the vertex is out-with the box expand to encompass vertex.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.28.27">expandBy</A></B>(float <!1><A HREF="Viewport.html#DOC.2.214.8">x</A>, float <!1><A HREF="Viewport.html#DOC.2.214.9">y</A>, float <!1><A HREF="Vec4.html#DOC.2.210.15">z</A>)
<DD><I>If the vertex is out-with the box expand to encompass vertex.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.28.28">expandBy</A></B>(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb)
<DD><I>If incoming box is out-with the box expand to encompass incoming box.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.28.29">expandBy</A></B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; sh)
<DD><I>If incoming sphere is out-with the box expand to encompass incoming sphere.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.28.30">contains</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v) const
<DD><I>return true is vertex v is within the box</I>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<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::Drawable's to assist in view frustum culling etc.</BLOCKQUOTE>
<DL>
<A NAME="_min"></A>
<A NAME="DOC.2.28.1"></A>
<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>
<A NAME="DOC.2.28.2"></A>
<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>
<A NAME="DOC.2.28.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline BoundingBox()</B></TT>
<DD>construct to invalid values to represent an unset bounding box
<DL><DT><DD></DL><P>
<A NAME="BoundingBox"></A>
<A NAME="DOC.2.28.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline BoundingBox(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)</B></TT>
<DD>construct to with specified min and max values
<DL><DT><DD></DL><P>
<A NAME="BoundingBox"></A>
<A NAME="DOC.2.28.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline BoundingBox(const <!1><A HREF="Vec3.html">Vec3</A>&amp; min, const <!1><A HREF="Vec3.html">Vec3</A>&amp; max)</B></TT>
<DD>construct to with specified min and max values
<DL><DT><DD></DL><P>
<A NAME="init"></A>
<A NAME="DOC.2.28.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void init()</B></TT>
<DD>initialize to invalid values to represent an unset bounding box
<DL><DT><DD></DL><P>
<A NAME="valid"></A>
<A NAME="DOC.2.28.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool valid() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.28.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.28.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Vec3.html">Vec3</A>&amp; min, const <!1><A HREF="Vec3.html">Vec3</A>&amp; max)</B></TT>
<DD>construct to with specified min and max values
<DL><DT><DD></DL><P>
<A NAME="xMin"></A>
<A NAME="DOC.2.28.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; xMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMin"></A>
<A NAME="DOC.2.28.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float xMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMin"></A>
<A NAME="DOC.2.28.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; yMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMin"></A>
<A NAME="DOC.2.28.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float yMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMin"></A>
<A NAME="DOC.2.28.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; zMin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMin"></A>
<A NAME="DOC.2.28.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float zMin() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMax"></A>
<A NAME="DOC.2.28.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; xMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="xMax"></A>
<A NAME="DOC.2.28.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float xMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMax"></A>
<A NAME="DOC.2.28.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; yMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="yMax"></A>
<A NAME="DOC.2.28.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float yMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMax"></A>
<A NAME="DOC.2.28.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; zMax()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="zMax"></A>
<A NAME="DOC.2.28.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float zMax() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="center"></A>
<A NAME="DOC.2.28.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!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>
<A NAME="DOC.2.28.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float radius() const </B></TT>
<DD>Calculate and return the radius of the bounding box
<DL><DT><DD></DL><P>
<A NAME="radius2"></A>
<A NAME="DOC.2.28.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline 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>
<A NAME="DOC.2.28.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!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 specified 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>
<A NAME="DOC.2.28.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void expandBy(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)</B></TT>
<DD>If the vertex is out-with the box expand to encompass 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>
<A NAME="DOC.2.28.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void expandBy(float <!1><A HREF="Viewport.html#DOC.2.214.8">x</A>, float <!1><A HREF="Viewport.html#DOC.2.214.9">y</A>, float <!1><A HREF="Vec4.html#DOC.2.210.15">z</A>)</B></TT>
<DD>If the vertex is out-with the box expand to encompass 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>
<A NAME="DOC.2.28.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb)</B></TT>
<DD>If incoming box is out-with the box expand to encompass incoming box.
If this box is empty then move set this box to incoming box.
<DL><DT><DD></DL><P>
<A NAME="expandBy"></A>
<A NAME="DOC.2.28.29"></A>
<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 incoming sphere is out-with the box expand to encompass incoming sphere.
If this box is empty then move set this box to encompass the sphere.
<DL><DT><DD></DL><P>
<A NAME="contains"></A>
<A NAME="DOC.2.28.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool contains(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v) const </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><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://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>