- Main Page
- Classes
- Files

- File List

# src/CUDARayCasting/Vector3.h

Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010
    00011
    00012
    00013
    00014
    00015
    00016
    00017
    00018
    00019
    00020
    00025 #ifndef _VECTOR_3_H_
    00026 #define _VECTOR_3_H_
    00027
    00028 namespace CUDARayCasting
    00029 {
    00030
    00031 class Vector3
    00032 {
    00033 public:
    00034         Vector3(void);
    00035
    00036         Vector3(float x, float y, float z);
    00037
    00038         Vector3(const Vector3& vector);
    00039
    00040         ~Vector3(void);
    00041
    00042         Vector3 Cross(const Vector3& v) const;
    00043
    00044         float Dot(const Vector3& v) const;
    00045
    00046         void Normalize(void);
    00047
    00048         float Length(void) const;
    00049
    00050         Vector3& operator=(const Vector3& vector);
    00051
    00052         Vector3 operator-(void);
    00053
    00054         union
    00055         {
    00056                 struct
    00057                 {
    00058                         float m_x;
    00059                         float m_y;
    00060                         float m_z;
    00061                 };
    00062
    00063                 float m_data[3];
    00064         };
    00065 };
    00066
    00067 Vector3 operator+(const Vector3& leftV, const Vector3& rightV);
    00068
    00069 Vector3 operator-(const Vector3& leftV, const Vector3& rightV);
    00070
    00071 Vector3 operator*(const Vector3& leftV, float k);
    00072
    00073 Vector3 Interpolate(const Vector3& leftV, const Vector3& rightV, float k);
    00074
    00075 }
    00076
    00077 #endif