Main Page -
Class Hierarchy -
Class List -
File List -
Class Members -
Related Pages -

Information | Reference | SourceForge Project | Author
Muli3D

Reference: Muli3D: m3dmath_vector2.h Source File

m3dmath_vector2.h

Go to the documentation of this file.
00001 /* 00002 Muli3D - a software rendering library 00003 Copyright (C) 2004, 2005 Stephan Reiter <streiter@aon.at> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00022 00023 #ifndef __M3DMATH_VECTOR2_H__ 00024 #define __M3DMATH_VECTOR2_H__ 00025 00026 #include "m3dmath_common.h" 00027 00028 struct vector2 00029 { 00030 float32 x, y; 00031 00032 vector2(); 00033 vector2( const vector2 &i_vVal ); 00034 vector2( const float32 i_fX, const float32 i_fY ); 00035 vector2( const struct vector4 &i_vVal ); 00036 vector2( const struct vector3 &i_vVal ); 00037 00038 const vector2 &operator =( const vector2 &i_vVal ); 00039 const vector2 &operator =( const struct vector4 &i_vVal ); 00040 const vector2 &operator =( const struct vector3 &i_vVal ); 00041 const vector2 &operator =( const float32 i_fVal ); 00042 00043 operator float32*(); 00044 operator const float32*() const; 00045 00046 vector2 operator +() const; 00047 vector2 operator -() const; 00048 00049 const vector2 &operator +=( const vector2 &i_vVal ); 00050 const vector2 &operator -=( const vector2 &i_vVal ); 00051 const vector2 &operator *=( const vector2 &i_vVal ); 00052 const vector2 &operator *=( const float32 i_fVal ); 00053 const vector2 &operator /=( const float32 i_fVal ); 00054 00055 vector2 operator +( const vector2 &i_vVal ) const; 00056 vector2 operator -( const vector2 &i_vVal ) const; 00057 vector2 operator *( const vector2 &i_vVal ) const; 00058 vector2 operator *( const float32 i_fVal ) const; 00059 vector2 operator /( const float32 i_fVal ) const; 00060 00061 float32 length() const; 00062 float32 lengthsq() const; 00063 00064 vector2 &normalize(); 00065 }; 00066 00067 float32 fVector2Dot( const vector2 &i_vVecA, const vector2 &i_vVecB ); 00068 vector2 &vVector2Lerp( vector2 &o_vVecOut, const vector2 &i_vVecA, const vector2 &i_vVecB, const float32 i_fInterpolation ); 00069 00070 #include "m3dmath_vector2.inl" 00071 00072 #endif // __M3DMATH_VECTOR2_H__

Documentation created with doxygen SourceForge.net Logo