OpenSceneGraph/doc/doc++/osg/Plane.html
Robert Osfield ed10594139 Updated docs
2004-08-06 06:53:36 +00:00

296 lines
16 KiB
HTML

<!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.6">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::Plane</A></H2></H2><BLOCKQUOTE>A plane class.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65>
<param name=classes value="CPlane,MPlane.html,CInfinitePlane,MInfinitePlane.html">
<param name=before value="M,M^_">
<param name=after value="M,M">
<param name=indent value="0,0">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.1">Plane</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.2">Plane</A></B>(const <!1><A HREF="Plane.html#DOC.2.170.2">Plane</A>&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.3">Plane</A></B>(float <!1><A HREF="UByte4.html#DOC.2.258.15">a</A>, float <!1><A HREF="UByte4.html#DOC.2.258.14">b</A>, float c, float d)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.4">Plane</A></B>(const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; vec)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.5">Plane</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, float d)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.170.6">Plane</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v1, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v2, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v3)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Plane.html">Plane</A>&amp; <B><A HREF="#DOC.2.170.7">operator = </A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.8">set</A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; pl)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.9">set</A></B>(float <!1><A HREF="UByte4.html#DOC.2.258.15">a</A>, float <!1><A HREF="UByte4.html#DOC.2.258.14">b</A>, float c, float d)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.10">set</A></B>(const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; vec)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.11">set</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, float d)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.12">set</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v1, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v2, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v3)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.13">set</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; point)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.14">flip</A></B>()
<DD><I>flip/reverse the orientation of the plane</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.15">makeUnitLength</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.16">calculateUpperLowerBBCorners</A></B>()
<DD><I>calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.170.17">valid</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.170.18">operator == </A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.170.19">operator != </A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.170.20">operator < </A></B>(const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float* <B><A HREF="#DOC.2.170.21">ptr</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const float* <B><A HREF="#DOC.2.170.22">ptr</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; <B><A HREF="#DOC.2.170.23">asVec4</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; <B><A HREF="#DOC.2.170.24">asVec4</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.170.25">operator [] </A></B>(unsigned int i)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.170.26">operator [] </A></B>(unsigned int i) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="osg.html#DOC.2.262">osg::Vec3</A> <B><A HREF="#DOC.2.170.27">getNormal</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.170.28">distance</A></B>(const <!1><A HREF="osg.html#DOC.2.262">osg::Vec3</A>&amp; v) const
<DD><I>calculate the distance between a point and the plane</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline int <B><A HREF="#DOC.2.170.29">intersect</A></B>(const std::vector&lt;<!1><A HREF="osg.html#DOC.2.262">Vec3</A>&gt;&amp; vertices) const
<DD><I>intersection test between plane and vertex list 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</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline int <B><A HREF="#DOC.2.170.30">intersect</A></B>(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; bs) const
<DD><I>intersection test between plane and bounding sphere.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline int <B><A HREF="#DOC.2.170.31">intersect</A></B>(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb) const
<DD><I>intersection test between plane and bounding sphere.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.32">transform</A></B>(const <!1><A HREF="osg.html#DOC.2.134">osg::Matrix</A>&amp; matrix)
<DD><I>Transform the plane by matrix.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.170.33">transformProvidingInverse</A></B>(const <!1><A HREF="osg.html#DOC.2.134">osg::Matrix</A>&amp; matrix)
<DD><I>Transform the plane by provide a pre inverted matrix.</I>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="osg.html#DOC.2.270">Vec4</A> <B><A HREF="#DOC.2.170.34">_fv</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.170.35">_upperBBCorner</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.170.36">_lowerBBCorner</A></B>
</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>
<A NAME="DOC.2.170.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
<A NAME="DOC.2.170.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="Plane.html#DOC.2.170.2">Plane</A>&amp; pl)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
<A NAME="DOC.2.170.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(float <!1><A HREF="UByte4.html#DOC.2.258.15">a</A>, float <!1><A HREF="UByte4.html#DOC.2.258.14">b</A>, float c, float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
<A NAME="DOC.2.170.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; vec)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
<A NAME="DOC.2.170.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Plane"></A>
<A NAME="DOC.2.170.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Plane(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v1, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v2, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.2.170.7"></A>
<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>
<A NAME="DOC.2.170.8"></A>
<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>
<A NAME="DOC.2.170.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(float <!1><A HREF="UByte4.html#DOC.2.258.15">a</A>, float <!1><A HREF="UByte4.html#DOC.2.258.14">b</A>, float c, float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.170.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; vec)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.170.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, float d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.170.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v1, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v2, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; v3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.170.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; norm, const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; point)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="flip"></A>
<A NAME="DOC.2.170.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void flip()</B></TT>
<DD>flip/reverse the orientation of the plane
<DL><DT><DD></DL><P>
<A NAME="makeUnitLength"></A>
<A NAME="DOC.2.170.15"></A>
<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>
<A NAME="DOC.2.170.16"></A>
<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>
<A NAME="DOC.2.170.17"></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="operator == "></A>
<A NAME="DOC.2.170.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator != "></A>
<A NAME="DOC.2.170.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator < "></A>
<A NAME="DOC.2.170.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="Plane.html">Plane</A>&amp; plane) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="ptr"></A>
<A NAME="DOC.2.170.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float* ptr()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ptr"></A>
<A NAME="DOC.2.170.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const float* ptr() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.170.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; asVec4()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.170.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="osg.html#DOC.2.270">Vec4</A>&amp; asVec4() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
<A NAME="DOC.2.170.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; operator [] (unsigned int i)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
<A NAME="DOC.2.170.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator [] (unsigned int i) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="getNormal"></A>
<A NAME="DOC.2.170.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="osg.html#DOC.2.262">osg::Vec3</A> getNormal() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="distance"></A>
<A NAME="DOC.2.170.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float distance(const <!1><A HREF="osg.html#DOC.2.262">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>
<A NAME="DOC.2.170.29"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline int intersect(const std::vector&lt;<!1><A HREF="osg.html#DOC.2.262">Vec3</A>&gt;&amp; vertices) const </B></TT>
<DD>intersection test between plane and vertex list
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>
<A NAME="DOC.2.170.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline int intersect(const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; bs) const </B></TT>
<DD>intersection test between plane and bounding sphere.
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>
<A NAME="DOC.2.170.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline int intersect(const <!1><A HREF="BoundingBox.html">BoundingBox</A>&amp; bb) const </B></TT>
<DD>intersection test between plane and bounding sphere.
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>
<A NAME="DOC.2.170.32"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void transform(const <!1><A HREF="osg.html#DOC.2.134">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>
<A NAME="DOC.2.170.33"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void transformProvidingInverse(const <!1><A HREF="osg.html#DOC.2.134">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>
<A NAME="DOC.2.170.34"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="osg.html#DOC.2.270">Vec4</A> _fv</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_upperBBCorner"></A>
<A NAME="DOC.2.170.35"></A>
<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>
<A NAME="DOC.2.170.36"></A>
<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>Direct child classes:
</B><DD><A HREF="InfinitePlane.html">InfinitePlane</A><BR>
</DL>
<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>
<BR>
This page was generated with the help of <A HREF="http://www.linuxsupportline.com/~doc++">DOC++</A>.
</BODY>
</HTML>