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

270 lines
12 KiB
HTML

<HTML>
<HEAD>
<TITLE>class osg::Vec4</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.3">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class <A HREF="#DOC.DOCU">osg::Vec4</A></H2>
<BLOCKQUOTE>General purpose float quad, uses include representation of colour coordinates.</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<A HREF="#DOC.2.61.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>_v</B>[4]
<DD><I></I>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<A HREF="#DOC.2.61.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> <B>Vec4</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> <B>Vec4</B>(float <!1><A HREF="Vec4.html#DOC.2.61.16">x</A>, float <!1><A HREF="Vec4.html#DOC.2.61.17">y</A>, float <!1><A HREF="Vec4.html#DOC.2.61.18">z</A>, float <!1><A HREF="Vec4.html#DOC.2.61.19">w</A>)
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool <B>operator == </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; v) const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float* <B>ptr</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline const float* <B>ptr</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline void <B>set</B>( float <!1><A HREF="Vec4.html#DOC.2.61.16">x</A>, float <!1><A HREF="Vec4.html#DOC.2.61.17">y</A>, float <!1><A HREF="Vec4.html#DOC.2.61.18">z</A>, float <!1><A HREF="Vec4.html#DOC.2.61.19">w</A>)
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float&amp; <B>operator [] </B>(int i)
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>operator [] </B>(int i) const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float&amp; <B>x</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float&amp; <B>y</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float&amp; <B>z</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float&amp; <B>w</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>x</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>y</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>z</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>w</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.61.20"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>operator * </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const
<DD><I>dot product</I>
<DT>
<A HREF="#DOC.2.61.21"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> <B>operator * </B>(const float&amp; rhs) const
<DD><I>multiply by scalar</I>
<DT>
<A HREF="#DOC.2.61.22"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; <B>operator *= </B>(const float&amp; rhs)
<DD><I>unary multiply by scalar</I>
<DT>
<A HREF="#DOC.2.61.23"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> <B>operator / </B>(const float&amp; rhs) const
<DD><I>divide by scalar</I>
<DT>
<A HREF="#DOC.2.61.24"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; <B>operator /= </B>(const float&amp; rhs)
<DD><I>unary divide by scalar</I>
<DT>
<A HREF="#DOC.2.61.25"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> <B>operator + </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const
<DD><I>binary vector add</I>
<DT>
<A HREF="#DOC.2.61.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; <B>operator += </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs)
<DD><I>unary vector add.</I>
<DT>
<A HREF="#DOC.2.61.26"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> <B>operator - </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const
<DD><I>binary vector subract</I>
<DT>
<A HREF="#DOC.2.61.27"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; <B>operator -= </B>(const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs)
<DD><I>unary vector subract</I>
<DT>
<A HREF="#DOC.2.61.28"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> <B>operator - </B>() const
<DD><I>negation operator. Returns the negative of the Vec4</I>
<DT>
<A HREF="#DOC.2.61.29"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>length</B>( void ) const
<DD><I>Length of the vector = sqrt( vec . vec )</I>
<DT>
<A HREF="#DOC.2.61.30"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>length2</B>( void ) const
<DD><I>Length squared of the vector = vec . vec</I>
<DT>
<A HREF="#DOC.2.61.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline float <B>normalize</B>()
<DD><I>normalize the vector so that it has length unity returns the previous length of the vector</I>
<DT>
<A HREF="#DOC.2.61.31"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>inline friend ostream&amp; <B>operator << </B>(ostream&amp; output, const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; vec)
<DD><I></I>
</DL></P>
</DL>
<A NAME="DOC.DOCU">
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>General purpose float quad, uses include representation
of colour coordinates.
No support yet added for float * Vec4 - is it necessary?
Need to define a non-member non-friend operator* etc.
Vec4 * float is okay</BLOCKQUOTE>
<DL>
<A NAME="Vec4">
<A NAME="DOC.2.61.3">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Vec4()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Vec4">
<A NAME="DOC.2.61.4">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Vec4(float <!1><A HREF="Vec4.html#DOC.2.61.16">x</A>, float <!1><A HREF="Vec4.html#DOC.2.61.17">y</A>, float <!1><A HREF="Vec4.html#DOC.2.61.18">z</A>, float <!1><A HREF="Vec4.html#DOC.2.61.19">w</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_v">
<A NAME="DOC.2.61.5">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float _v[4]</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator == ">
<A NAME="DOC.2.61.6">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool operator == (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; v) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="ptr">
<A NAME="DOC.2.61.7">
<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 NAME="DOC.2.61.8">
<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="set">
<A NAME="DOC.2.61.9">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set( float <!1><A HREF="Vec4.html#DOC.2.61.16">x</A>, float <!1><A HREF="Vec4.html#DOC.2.61.17">y</A>, float <!1><A HREF="Vec4.html#DOC.2.61.18">z</A>, float <!1><A HREF="Vec4.html#DOC.2.61.19">w</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] ">
<A NAME="DOC.2.61.10">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; operator [] (int i)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] ">
<A NAME="DOC.2.61.11">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator [] (int i) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="x">
<A NAME="DOC.2.61.12">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; x()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="y">
<A NAME="DOC.2.61.13">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; y()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="z">
<A NAME="DOC.2.61.14">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; z()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="w">
<A NAME="DOC.2.61.15">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; w()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="x">
<A NAME="DOC.2.61.16">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float x() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="y">
<A NAME="DOC.2.61.17">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float y() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="z">
<A NAME="DOC.2.61.18">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float z() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="w">
<A NAME="DOC.2.61.19">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float w() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator * ">
<A NAME="DOC.2.61.20">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator * (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const </B></TT>
<DD>dot product
<DL><DT><DD></DL><P>
<A NAME="operator * ">
<A NAME="DOC.2.61.21">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> operator * (const float&amp; rhs) const </B></TT>
<DD>multiply by scalar
<DL><DT><DD></DL><P>
<A NAME="operator *= ">
<A NAME="DOC.2.61.22">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; operator *= (const float&amp; rhs)</B></TT>
<DD>unary multiply by scalar
<DL><DT><DD></DL><P>
<A NAME="operator / ">
<A NAME="DOC.2.61.23">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> operator / (const float&amp; rhs) const </B></TT>
<DD>divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator /= ">
<A NAME="DOC.2.61.24">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; operator /= (const float&amp; rhs)</B></TT>
<DD>unary divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator + ">
<A NAME="DOC.2.61.25">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> operator + (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const </B></TT>
<DD>binary vector add
<DL><DT><DD></DL><P>
<A NAME="operator += ">
<A NAME="DOC.2.61.1">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; operator += (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs)</B></TT>
<DD>unary vector add. Slightly more efficient because no temporary
intermediate object
<DL><DT><DD></DL><P>
<A NAME="operator - ">
<A NAME="DOC.2.61.26">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> operator - (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs) const </B></TT>
<DD>binary vector subract
<DL><DT><DD></DL><P>
<A NAME="operator -= ">
<A NAME="DOC.2.61.27">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; operator -= (const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; rhs)</B></TT>
<DD>unary vector subract
<DL><DT><DD></DL><P>
<A NAME="operator - ">
<A NAME="DOC.2.61.28">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A> operator - () const </B></TT>
<DD>negation operator. Returns the negative of the Vec4
<DL><DT><DD></DL><P>
<A NAME="length">
<A NAME="DOC.2.61.29">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float length( void ) const </B></TT>
<DD>Length of the vector = sqrt( vec . vec )
<DL><DT><DD></DL><P>
<A NAME="length2">
<A NAME="DOC.2.61.30">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float length2( void ) const </B></TT>
<DD>Length squared of the vector = vec . vec
<DL><DT><DD></DL><P>
<A NAME="normalize">
<A NAME="DOC.2.61.2">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float normalize()</B></TT>
<DD>normalize the vector so that it has length unity
returns the previous length of the vector
<DL><DT><DD></DL><P>
<A NAME="operator << ">
<A NAME="DOC.2.61.31">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline friend ostream&amp; operator << (ostream&amp; output, const <!1><A HREF="Vec4.html#DOC.2.61.3">Vec4</A>&amp; vec)</B></TT>
<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>