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

170 lines
7.9 KiB
HTML

<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::BoundingSphere</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.3">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::BoundingSphere</A></H2>
<BLOCKQUOTE>General purpose bounding sphere class for enclosing nodes/objects/vertices.</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<A HREF="#DOC.2.4.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>_center</B>
<DD><I></I>
<DT>
<A HREF="#DOC.2.4.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>_radius</B>
<DD><I></I>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<A HREF="#DOC.2.4.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> <B>BoundingSphere</B>()
<DD><I>construct to invalid values to represent an unset bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>init</B>()
<DD><I>initialize to invalid values to represent an unset bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool <B>isValid</B>() const
<DD><I>return true if the bounding sphere contains valid values, false if the bounding sphere is effectively unset</I>
<DT>
<A HREF="#DOC.2.4.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const <!1><A HREF="Vec3.html">Vec3</A>&amp; <B>center</B>() const
<DD><I>return the const center of the bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A>&amp; <B>center</B>()
<DD><I>return the center of the bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>radius</B>() const
<DD><I>return the const radius of the bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float&amp; <B>radius</B>()
<DD><I>return the radius of the bounding sphere</I>
<DT>
<A HREF="#DOC.2.4.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>radius2</B>() const
<DD><I>return the radius squared.</I>
<DT>
<A HREF="#DOC.2.4.9"><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 sphere expand to ecompass vertex.</I>
<DT>
<A HREF="#DOC.2.4.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandRadiusBy</B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)
<DD><I>If the vertex is outwith the sphere expand radius to ecompass vertex.</I>
<DT>
<A HREF="#DOC.2.4.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandBy</B>(const <!1><A HREF="BoundingSphere.html#DOC.2.4.1">BoundingSphere</A>&amp; sh)
<DD><I>If incomming sphere is outwith the sphere expand to ecompass incomming sphere.</I>
<DT>
<A HREF="#DOC.2.4.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>expandRadiusBy</B>(const <!1><A HREF="BoundingSphere.html#DOC.2.4.1">BoundingSphere</A>&amp; sh)
<DD><I>If incomming sphere is outwith the sphere expand radius to ecompass incomming sphere.</I>
<DT>
<A HREF="#DOC.2.4.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 sphere</I>
</DL></P>
</DL>
<A NAME="DOC.DOCU">
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>General purpose bounding sphere class for enclosing nodes/objects/vertices.
Used to bound internal osg::Node's in the scene,
to assist in view frustrum culling etc. Similar in function to BoundingBox
but is quicker for evaluating culling, but generally encloses a greater volume
than a BoundingBox so will not cull so aggressively.</BLOCKQUOTE>
<DL>
<A NAME="_center">
<A NAME="DOC.2.4.14">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> _center</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_radius">
<A NAME="DOC.2.4.15">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float _radius</B></TT>
<DL><DT><DD></DL><P>
<A NAME="BoundingSphere">
<A NAME="DOC.2.4.1">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> BoundingSphere()</B></TT>
<DD>construct to invalid values to represent an unset bounding sphere
<DL><DT><DD></DL><P>
<A NAME="init">
<A NAME="DOC.2.4.2">
<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 sphere
<DL><DT><DD></DL><P>
<A NAME="isValid">
<A NAME="DOC.2.4.3">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool isValid() const </B></TT>
<DD>return true if the bounding sphere contains valid values,
false if the bounding sphere is effectively unset
<DL><DT><DD></DL><P>
<A NAME="center">
<A NAME="DOC.2.4.4">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="Vec3.html">Vec3</A>&amp; center() const </B></TT>
<DD>return the const center of the bounding sphere
<DL><DT><DD></DL><P>
<A NAME="center">
<A NAME="DOC.2.4.5">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A>&amp; center()</B></TT>
<DD>return the center of the bounding sphere
<DL><DT><DD></DL><P>
<A NAME="radius">
<A NAME="DOC.2.4.6">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float radius() const </B></TT>
<DD>return the const radius of the bounding sphere
<DL><DT><DD></DL><P>
<A NAME="radius">
<A NAME="DOC.2.4.7">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float&amp; radius()</B></TT>
<DD>return the radius of the bounding sphere
<DL><DT><DD></DL><P>
<A NAME="radius2">
<A NAME="DOC.2.4.8">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float radius2() const </B></TT>
<DD>return the radius squared.
Note, for performance reasons, assumes the calling method has ensured
that the sphere is valid before calling radius2(), i.e. has _radius>=0.0,
as it does not check th validity of sphere and will eroneously return a positive value.
<DL><DT><DD></DL><P>
<A NAME="expandBy">
<A NAME="DOC.2.4.9">
<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 sphere expand to ecompass vertex.
Calculates the combination of movement of center and radius which
minimizes the radius increase. If this sphere is empty then
move the centrer to v and set radius to 0.
<DL><DT><DD></DL><P>
<A NAME="expandRadiusBy">
<A NAME="DOC.2.4.10">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandRadiusBy(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v)</B></TT>
<DD>If the vertex is outwith the sphere expand radius to ecompass vertex.
Unlike update, does not move the center, just increasing the radius.
If this sphere is empty then move the centrer to v and set radius to 0
<DL><DT><DD></DL><P>
<A NAME="expandBy">
<A NAME="DOC.2.4.11">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="BoundingSphere.html#DOC.2.4.1">BoundingSphere</A>&amp; sh)</B></TT>
<DD>If incomming sphere is outwith the sphere expand to ecompass incomming sphere.
calculates the combination of movement of center and radius which
minimizes the radius increase. If this sphere is empty then
move the centrer to v and set radius to 0.
<DL><DT><DD></DL><P>
<A NAME="expandRadiusBy">
<A NAME="DOC.2.4.12">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandRadiusBy(const <!1><A HREF="BoundingSphere.html#DOC.2.4.1">BoundingSphere</A>&amp; sh)</B></TT>
<DD>If incomming sphere is outwith the sphere expand radius to ecompass incomming sphere.
Unlike update, does not move the center, just increasing the radius.
If this sphere is empty then move the centrer to v and set radius to 0.
<DL><DT><DD></DL><P>
<A NAME="contains">
<A NAME="DOC.2.4.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 sphere
<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>