2003-04-18 00:22:51 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>class osg::Vec2</TITLE>
|
|
|
|
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#ffffff">
|
|
|
|
|
|
|
|
<H2>class <A HREF="#DOC.DOCU">osg::Vec2</A></H2></H2><BLOCKQUOTE>General purpose float pair, uses include representation of texture coordinates.</BLOCKQUOTE>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<DL>
|
|
|
|
<P><DL>
|
|
|
|
<DT><H3>Public Fields</H3><DD><DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.2.223.3">_v</A></B>[2]
|
2003-04-18 00:22:51 +08:00
|
|
|
</DL></P>
|
|
|
|
|
|
|
|
<P><DL>
|
|
|
|
<DT><H3>Public Methods</H3><DD><DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.223.1">Vec2</A></B>()
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.223.2">Vec2</A></B>(float <!1><A HREF="Vec2.html#DOC.2.223.12">x</A>, float <!1><A HREF="Vec2.html#DOC.2.223.13">y</A>)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.223.4">operator == </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& v) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.223.5">operator != </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& v) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.223.6">operator < </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& v) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float* <B><A HREF="#DOC.2.223.7">ptr</A></B>()
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const float* <B><A HREF="#DOC.2.223.8">ptr</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.223.9">set</A></B>( float <!1><A HREF="Vec2.html#DOC.2.223.12">x</A>, float <!1><A HREF="Vec2.html#DOC.2.223.13">y</A> )
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.223.10">operator [] </A></B>(int i)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.11">operator [] </A></B>(int i) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.223.12">x</A></B>()
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.223.13">y</A></B>()
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.14">x</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.15">y</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.223.16">valid</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.223.17">isNaN</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.18">operator * </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>dot product</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec2.html">Vec2</A> <B><A HREF="#DOC.2.223.19">operator * </A></B>(float rhs) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>multiply by scalar</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec2.html">Vec2</A>& <B><A HREF="#DOC.2.223.20">operator *= </A></B>(float rhs)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>unary multiply by scalar</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec2.html">Vec2</A> <B><A HREF="#DOC.2.223.21">operator / </A></B>(float rhs) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>divide by scalar</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec2.html">Vec2</A>& <B><A HREF="#DOC.2.223.22">operator /= </A></B>(float rhs)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>unary divide by scalar</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec2.html">Vec2</A> <B><A HREF="#DOC.2.223.23">operator + </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>binary vector add</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec2.html">Vec2</A>& <B><A HREF="#DOC.2.223.24">operator += </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& rhs)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>unary vector add.</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec2.html">Vec2</A> <B><A HREF="#DOC.2.223.25">operator - </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>binary vector subtract</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec2.html">Vec2</A>& <B><A HREF="#DOC.2.223.26">operator -= </A></B>(const <!1><A HREF="Vec2.html">Vec2</A>& rhs)
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>unary vector subtract</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec2.html">Vec2</A> <B><A HREF="#DOC.2.223.27">operator - </A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>negation operator.</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.28">length</A></B>() const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>Length of the vector = sqrt( vec .</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.29">length2</A></B>( void ) const
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>Length squared of the vector = vec .</I>
|
|
|
|
<DT>
|
2003-10-02 22:28:30 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.223.30">normalize</A></B>()
|
2003-04-18 00:22:51 +08:00
|
|
|
<DD><I>normalize the vector so that it has length unity returns the previous length of the vector</I>
|
|
|
|
</DL></P>
|
|
|
|
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
<A NAME="DOC.DOCU"></A>
|
|
|
|
<HR>
|
|
|
|
<H2>Documentation</H2>
|
|
|
|
<BLOCKQUOTE>General purpose float pair, uses include representation of
|
|
|
|
texture coordinates.
|
|
|
|
No support yet added for float * Vec2 - is it necessary?
|
|
|
|
Need to define a non-member non-friend operator* etc.
|
|
|
|
BTW: Vec2 * float is okay</BLOCKQUOTE>
|
|
|
|
<DL>
|
|
|
|
|
|
|
|
<A NAME="Vec2"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.1"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Vec2()</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="Vec2"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.2"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Vec2(float <!1><A HREF="Vec2.html#DOC.2.223.12">x</A>, float <!1><A HREF="Vec2.html#DOC.2.223.13">y</A>)</B></TT>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="_v"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.3"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float _v[2]</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator == "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.4"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="Vec2.html">Vec2</A>& v) const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator != "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.5"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="Vec2.html">Vec2</A>& v) const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator < "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.6"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="Vec2.html">Vec2</A>& v) const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="ptr"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.7"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.8"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.9"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set( float <!1><A HREF="Vec2.html#DOC.2.223.12">x</A>, float <!1><A HREF="Vec2.html#DOC.2.223.13">y</A> )</B></TT>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator [] "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.10"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& operator [] (int i)</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator [] "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.11"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.12"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& x()</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="y"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.13"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& y()</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="x"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.14"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.15"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float y() const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="valid"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.16"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool valid() const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="isNaN"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.17"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool isNaN() const </B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator * "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.18"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator * (const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const </B></TT>
|
|
|
|
<DD>dot product
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator * "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.19"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec2.html">Vec2</A> operator * (float rhs) const </B></TT>
|
|
|
|
<DD>multiply by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator *= "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.20"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec2.html">Vec2</A>& operator *= (float rhs)</B></TT>
|
|
|
|
<DD>unary multiply by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator / "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.21"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec2.html">Vec2</A> operator / (float rhs) const </B></TT>
|
|
|
|
<DD>divide by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator /= "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.22"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec2.html">Vec2</A>& operator /= (float rhs)</B></TT>
|
|
|
|
<DD>unary divide by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator + "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.23"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec2.html">Vec2</A> operator + (const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const </B></TT>
|
|
|
|
<DD>binary vector add
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator += "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.24"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec2.html">Vec2</A>& operator += (const <!1><A HREF="Vec2.html">Vec2</A>& rhs)</B></TT>
|
|
|
|
<DD>unary vector add. Slightly more efficient because no temporary
|
|
|
|
intermediate object.
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator - "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.25"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec2.html">Vec2</A> operator - (const <!1><A HREF="Vec2.html">Vec2</A>& rhs) const </B></TT>
|
|
|
|
<DD>binary vector subtract
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator -= "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.26"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec2.html">Vec2</A>& operator -= (const <!1><A HREF="Vec2.html">Vec2</A>& rhs)</B></TT>
|
|
|
|
<DD>unary vector subtract
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator - "></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.27"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec2.html">Vec2</A> operator - () const </B></TT>
|
|
|
|
<DD>negation operator. Returns the negative of the Vec2
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="length"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.28"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float length() const </B></TT>
|
|
|
|
<DD>Length of the vector = sqrt( vec . vec )
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="length2"></A>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.29"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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>
|
2003-10-02 22:28:30 +08:00
|
|
|
<A NAME="DOC.2.223.30"></A>
|
2003-04-18 00:22:51 +08:00
|
|
|
<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></DL>
|
|
|
|
|
|
|
|
<HR><DL><DT><B>This class has no child classes.</B></DL>
|
|
|
|
|
|
|
|
<DL><DT><DT><B>Friends:</B><DD> inline std::ostream& operator << (std::ostream& output, const <!1><A HREF="Vec2.html">Vec2</A>& vec)<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://docpp.sourceforge.net">DOC++</A>.
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|