38 lines
813 B
C++
38 lines
813 B
C++
#pragma once
|
|
#ifndef VECTOR
|
|
#define VECTOR
|
|
|
|
class Xr_Vector3D
|
|
{
|
|
public:
|
|
Xr_Vector3D();
|
|
Xr_Vector3D(float, float, float);
|
|
~Xr_Vector3D();
|
|
|
|
void setCoords(float, float, float);
|
|
void normalize();
|
|
static float dot(Xr_Vector3D const&, Xr_Vector3D const&);
|
|
|
|
float getX() const;
|
|
float getY() const;
|
|
float getZ() const;
|
|
|
|
Xr_Vector3D& operator=(Xr_Vector3D const&);
|
|
Xr_Vector3D& operator+=(Xr_Vector3D const&);
|
|
Xr_Vector3D& operator-=(Xr_Vector3D const&);
|
|
Xr_Vector3D operator+(Xr_Vector3D const&) const;
|
|
Xr_Vector3D operator-(Xr_Vector3D const&) const;
|
|
Xr_Vector3D operator-() const;
|
|
Xr_Vector3D operator*(Xr_Vector3D const&) const;
|
|
Xr_Vector3D operator*(float) const;
|
|
float operator[](unsigned int) const;
|
|
|
|
private:
|
|
float xCoord;
|
|
float yCoord;
|
|
float zCoord;
|
|
|
|
};
|
|
|
|
#endif
|