OpenSceneGraph/doc/doc++/osg/Plane.html

223 lines
12 KiB
HTML
Raw Normal View History

2001-09-20 05:19:47 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::Plane</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::Plane</A></H2></H2><BLOCKQUOTE>A plane class.</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.1">Plane</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.2">Plane</A></B>(const <!1><A HREF="Plane.html#DOC.2.82.2">Plane</A>&amp; pl)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.3">Plane</A></B>(const float a, const float b, const float c, const float d)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.4">Plane</A></B>(const <!1><A HREF="Vec4.html">Vec4</A>&amp; vec)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.5">Plane</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; norm, const float d)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.82.6">Plane</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v3)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Plane.html">Plane</A>&amp; <B><A HREF="#DOC.2.82.7">operator = </A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; pl)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.8">set</A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; pl)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.9">set</A></B>(const float a, const float b, const float c, const float d)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.10">set</A></B>(const <!1><A HREF="Vec4.html">Vec4</A>&amp; vec)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.11">set</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; norm, const float d)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.12">set</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v3)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.13">makeUnitLength</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.14">calculateUpperLowerBBCorners</A></B>()
2001-09-20 05:19:47 +08:00
<DD><I>calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations</I>
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.82.15">valid</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.82.16">asVec4</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.82.17">asVec4</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.82.18">operator [] </A></B>(const int i)
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.82.19">operator [] </A></B>(const int i) const
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const float <B><A HREF="#DOC.2.82.20">distance</A></B>(const <!1><A HREF="Vec3.html">osg::Vec3</A>&amp; v) const
2001-09-20 05:19:47 +08:00
<DD><I>calculate the distance between a point and the plane</I>
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.82.21">intersect</A></B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; bs) const
<DD><I>intersection test between plane and bounding sphere.</I>
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.82.22">intersect</A></B>(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb) const
<DD><I>intersection test between plane and bounding sphere.</I>
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.23">transform</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)
2001-09-20 05:19:47 +08:00
<DD><I>Transform the plane by matrix.</I>
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.24">transformProvidingInverse</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)
2001-09-20 05:19:47 +08:00
<DD><I>Transform the plane by provide a pre inverted matrix.</I>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec4.html">Vec4</A> <B><A HREF="#DOC.2.82.25">_fv</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.82.26">_upperBBCorner</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-12-25 05:56:22 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.82.27">_lowerBBCorner</A></B>
2001-09-20 05:19:47 +08:00
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A plane class. It can be used to represent an infinite plane.</BLOCKQUOTE>
<DL>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.1"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="Plane.html#DOC.2.82.2">Plane</A>&amp; pl)</B></TT>
2001-09-20 05:19:47 +08:00
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.3"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const float a, const float b, const float c, const float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.4"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="Vec4.html">Vec4</A>&amp; vec)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.5"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="Vec3.html">Vec3</A>&amp; norm, const float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.6"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.7"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Plane.html">Plane</A>&amp; operator = (const <!1><A HREF="Plane.html">Plane</A>&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.8"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Plane.html">Plane</A>&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.9"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const float a, const float b, const float c, const float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.10"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Vec4.html">Vec4</A>&amp; vec)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.11"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Vec3.html">Vec3</A>&amp; norm, const float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.12"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Vec3.html">Vec3</A>&amp; v1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; v3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="makeUnitLength"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.13"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void makeUnitLength()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="calculateUpperLowerBBCorners"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.14"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void calculateUpperLowerBBCorners()</B></TT>
<DD>calculate the upper and lower bounding box corners to be used
in the intersect(BoundingBox&) method for speeding calculations
<DL><DT><DD></DL><P>
<A NAME="valid"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.15"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const bool valid() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.16"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html">Vec4</A>&amp; asVec4()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.17"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec4.html">Vec4</A>&amp; asVec4() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.18"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; operator [] (const int i)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.19"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator [] (const int i) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="distance"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.20"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const float distance(const <!1><A HREF="Vec3.html">osg::Vec3</A>&amp; v) const </B></TT>
<DD>calculate the distance between a point and the plane
<DL><DT><DD></DL><P>
<A NAME="intersect"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.21"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int intersect(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; bs) const </B></TT>
2001-12-25 05:56:22 +08:00
<DD>intersection test between plane and bounding sphere.
2001-09-20 05:19:47 +08:00
return 1 if the bs is completely above plane,
return 0 if the bs intersects the plane,
return -1 if the bs is completely below the plane.
<DL><DT><DD></DL><P>
<A NAME="intersect"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.22"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int intersect(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb) const </B></TT>
2001-12-25 05:56:22 +08:00
<DD>intersection test between plane and bounding sphere.
2001-09-20 05:19:47 +08:00
return 1 if the bs is completely above plane,
return 0 if the bs intersects the plane,
return -1 if the bs is completely below the plane.
<DL><DT><DD></DL><P>
<A NAME="transform"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.23"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void transform(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)</B></TT>
<DD>Transform the plane by matrix. Note, this operations carries out
the calculation of the inverse of the matrix since to transforms
planes must be multiplied my the inverse transposed. This
make this operation expensive. If the inverse has been already
calculated elsewhere then use transformProvidingInverse() instead.
See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf
<DL><DT><DD></DL><P>
<A NAME="transformProvidingInverse"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.24"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void transformProvidingInverse(const <!1><A HREF="Matrix.html">osg::Matrix</A>&amp; matrix)</B></TT>
<DD>Transform the plane by provide a pre inverted matrix.
see transform for details.
<DL><DT><DD></DL><P>
<A NAME="_fv"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.25"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec4.html">Vec4</A> _fv</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_upperBBCorner"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.26"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _upperBBCorner</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_lowerBBCorner"></A>
2001-12-25 05:56:22 +08:00
<A NAME="DOC.2.82.27"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _lowerBBCorner</B></TT>
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
2001-12-25 05:56:22 +08:00
<DL><DT><DT><B>Friends:</B><DD> inline std::ostream& operator << (std::ostream& output, const <!1><A HREF="Plane.html">Plane</A>& pl)<BR><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>
2001-09-20 05:19:47 +08:00
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>