#include <vector.h>
Public Methods | |
Vector () | |
Vector (GLfloat val) | |
Vector (GLfloat x, GLfloat y, GLfloat z) | |
Vector (Vector v) | |
~Vector () | |
void | operator= (Vector v) |
void | operator= (GLfloat val) |
Vector | operator+ (Vector v) |
Vector | operator+ (GLfloat val) |
Vector | operator- (Vector v) |
Vector | operator- (GLfloat val) |
Vector | operator * (Vector v) |
Vector | operator * (GLfloat val) |
Public Attributes | |
GLfloat | x |
GLfloat | y |
GLfloat | z |
Definition at line 10 of file vector.h.
00010 { 00011 public: 00012 Vector (); // zero vector 00013 Vector (GLfloat val); // x=y=z=val 00014 Vector (GLfloat x, GLfloat y, GLfloat z); 00015 Vector (Vector v); 00016 ~Vector (); 00017 00018 GLfloat x; // public variables to make life easier 00019 GLfloat y; 00020 GLfloat z; 00021 00022 void operator= (Vector v); 00023 void operator= (GLfloat val); 00024 Vector operator+ (Vector v); 00025 Vector operator+ (GLfloat val); 00026 Vector operator- (Vector v); 00027 Vector operator- (GLfloat val); 00028 Vector operator* (Vector v); // vector product 00029 Vector operator* (GLfloat val); // scalar product 00030 }
|
|
|
|
Definition at line 17 of file vector.cpp.
00017 { 00018 x = v.x; 00019 y = v.y; 00020 z = v.z; 00021 }
|
|
Definition at line 84 of file vector.cpp.
00084 { 00085 Vector tmp; 00086 00087 tmp.x = x * val; 00088 tmp.y = y * val; 00089 tmp.z = z * val; 00090 00091 return tmp; 00092 }
|
Definition at line 76 of file vector.cpp.
00076 { 00077 Vector tmp; 00078 00079 // uhm... <blush> I can't remember how to do a vectorproduct... I'll fix this :-) 00080 00081 return tmp; 00082 }
|
Definition at line 46 of file vector.cpp.
00046 { 00047 Vector tmp; 00048 00049 tmp.x = x + val; 00050 tmp.y = y + val; 00051 tmp.z = z + val; 00052 00053 return tmp; 00054 }
|
Definition at line 36 of file vector.cpp.
00036 { 00037 Vector tmp; 00038 00039 tmp.x = x + v.x; 00040 tmp.y = y + v.y; 00041 tmp.z = z + v.z; 00042 00043 return tmp; 00044 }
|
Definition at line 66 of file vector.cpp.
00066 { 00067 Vector tmp; 00068 00069 tmp.x = x - val; 00070 tmp.y = y - val; 00071 tmp.z = z - val; 00072 00073 return tmp; 00074 }
|
Definition at line 56 of file vector.cpp.
00056 { 00057 Vector tmp; 00058 00059 tmp.x = x - v.x; 00060 tmp.y = y - v.y; 00061 tmp.z = z - v.z; 00062 00063 return tmp; 00064 }
|
|
Definition at line 26 of file vector.cpp.
00026 { 00027 x = v.x; 00028 y = v.y; 00029 z = v.z; 00030 }
|
|
|