source: GTP/trunk/App/Games/Jungle_Rumble/src/Vector.h @ 1378

Revision 1378, 998 bytes checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#pragma once
2#include <cmath>
3#include "dxstdafx.h"
4#include "NxPhysics.h"
5
6class Vector :
7        public D3DXVECTOR4
8{
9public:
10
11        Vector(void);
12        Vector(float _x, float _y, float _z);
13        Vector(NxVec3 vec);
14
15        void normalize();
16        float length();
17        Vector crossProd(Vector &v2);
18        float dotProd(Vector &v2);
19       
20        NxVec3 getNxVector();
21        D3DXVECTOR3 getD3DXVector3();
22        void setNxVector(NxVec3 &nxv);
23        NxQuat getNxQuatRotation();
24
25        void applyD3DXVector(D3DXVECTOR4 *v);
26
27        // assignment operators
28        Vector operator += ( CONST Vector& v);
29    Vector operator -= ( CONST Vector& v);
30    Vector operator *= ( float a);
31    Vector operator /= ( float a);
32
33    // binary operators
34    Vector operator + ( CONST Vector& v) const;
35    Vector operator - ( CONST Vector& v) const;
36    Vector operator * ( float a) const;
37    Vector operator / ( float a) const;
38
39        void setXYZ(float _x, float _y, float _z);
40        void addXYZ(float _x, float _y, float _z);
41
42protected:
43        NxVec3 nxVector;
44};
45
Note: See TracBrowser for help on using the repository browser.