178 lines
8.8 KiB
HTML
178 lines
8.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>class SG_EXPORT osg::BoundingSphere</TITLE>
|
|
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
|
|
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::BoundingSphere</A></H2></H2><BLOCKQUOTE>General purpose bounding sphere class for enclosing nodes/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.4.1">_center</A></B>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.2.4.2">_radius</A></B>
|
|
</DL></P>
|
|
|
|
<P><DL>
|
|
<DT><H3>Public Methods</H3><DD><DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.4.3">BoundingSphere</A></B>()
|
|
<DD><I>construct to invalid values to represent an unset bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.4.4">init</A></B>()
|
|
<DD><I>initialize to invalid values to represent an unset bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.4.5">isValid</A></B>() const
|
|
<DD><I>return true if the bounding sphere contains valid values, false if the bounding sphere is effectively unset</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec3.html">Vec3</A>& <B><A HREF="#DOC.2.4.6">center</A></B>()
|
|
<DD><I>return the center of the bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A>& <B><A HREF="#DOC.2.4.7">center</A></B>() const
|
|
<DD><I>return the const center of the bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.4.8">radius</A></B>()
|
|
<DD><I>return the radius of the bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const float <B><A HREF="#DOC.2.4.9">radius</A></B>() const
|
|
<DD><I>return the const radius of the bounding sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const float <B><A HREF="#DOC.2.4.10">radius2</A></B>() const
|
|
<DD><I>return the radius squared.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.4.11">expandBy</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>& v)
|
|
<DD><I>If the vertex is outwith the sphere expand to ecompass vertex.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.4.12">expandRadiusBy</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>& v)
|
|
<DD><I>If the vertex is outwith the sphere expand radius to ecompass vertex.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.4.13">expandBy</A></B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& sh)
|
|
<DD><I>If incomming sphere is outwith the sphere expand to ecompass incomming sphere.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.4.14">expandRadiusBy</A></B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& sh)
|
|
<DD><I>If incomming sphere is outwith the sphere expand radius to ecompass incomming sphere.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.4.15">contains</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>& v) const
|
|
<DD><I>return true is vertex v is within the sphere</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.4.16">intersects</A></B>( const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& bs ) const
|
|
<DD><I>return true if bounding sphere's intersect each other</I>
|
|
</DL></P>
|
|
|
|
</DL>
|
|
|
|
<A NAME="DOC.DOCU"></A>
|
|
<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>
|
|
<A NAME="DOC.2.4.1"></A>
|
|
<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>
|
|
<A NAME="DOC.2.4.2"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float _radius</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="BoundingSphere"></A>
|
|
<A NAME="DOC.2.4.3"></A>
|
|
<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>
|
|
<A NAME="DOC.2.4.4"></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 sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="isValid"></A>
|
|
<A NAME="DOC.2.4.5"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const 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>
|
|
<A NAME="DOC.2.4.6"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec3.html">Vec3</A>& center()</B></TT>
|
|
<DD>return the center of the bounding sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="center"></A>
|
|
<A NAME="DOC.2.4.7"></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>return the const center of the bounding sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="radius"></A>
|
|
<A NAME="DOC.2.4.8"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& radius()</B></TT>
|
|
<DD>return the radius of the bounding sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="radius"></A>
|
|
<A NAME="DOC.2.4.9"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const float radius() const </B></TT>
|
|
<DD>return the const radius of the bounding sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="radius2"></A>
|
|
<A NAME="DOC.2.4.10"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const 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>
|
|
<A NAME="DOC.2.4.11"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="Vec3.html">Vec3</A>& 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>
|
|
<A NAME="DOC.2.4.12"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandRadiusBy(const <!1><A HREF="Vec3.html">Vec3</A>& 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>
|
|
<A NAME="DOC.2.4.13"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandBy(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& 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>
|
|
<A NAME="DOC.2.4.14"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void expandRadiusBy(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& 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>
|
|
<A NAME="DOC.2.4.15"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const bool contains(const <!1><A HREF="Vec3.html">Vec3</A>& v) const </B></TT>
|
|
<DD>return true is vertex v is within the sphere
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="intersects"></A>
|
|
<A NAME="DOC.2.4.16"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const bool intersects( const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>& bs ) const </B></TT>
|
|
<DD>return true if bounding sphere's intersect each other
|
|
<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>
|