mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Vector3.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9  x = 0,
10  y,
11  z
12 };
13 
15 
21 class Vector3 {
22 public:
23 
24  float x,y,z;
25 
26  Vector3( float x, float y, float z );
27  Vector3( const Vector3 &v );
28  Vector3( void );
29  ~Vector3( void );
30 
31  Vector3 operator +( const Vector3 &v ); // vector addition
32  Vector3 operator -( const Vector3 &v ); // vector subtraction
33  Vector3 operator *( const Vector3 &v ); // vector multiplication
34  Vector3 operator *( float t ); // scalar multiplication
35  Vector3 operator /( float t ); // scalar division
36  Vector3 operator -( void ); // negative
37 
38  Vector3 operator =( const Vector3 &v );// assign value
39 
40  float at( Vector3Index index );
41  float at( unsigned __int8 index );
42 
43  float length( void );
44  void normalize( void );
45  float innerProduct( const Vector3 &v );
46  void copy( const Vector3 &v );
47  void set( float x, float y, float z );
48  Vector3 scalarMult( float a );
49 
50  //void print();
51 };