2015-05-11 05:38:07 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
class QAngle
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
float x, y, z;
|
|
|
|
void Init( void )
|
|
|
|
{
|
|
|
|
x = y = z = 0.0f;
|
|
|
|
}
|
|
|
|
void Init( float _x, float _y, float _z )
|
|
|
|
{
|
|
|
|
x = _x;
|
|
|
|
y = _y;
|
|
|
|
z = _z;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class Vector
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
float x, y, z;
|
|
|
|
Vector()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
Vector(float X, float Y, float Z)
|
|
|
|
{
|
|
|
|
x = X; y = Y; z = Z;
|
|
|
|
}
|
|
|
|
void Init( void )
|
|
|
|
{
|
|
|
|
x = y = z = 0.0f;
|
|
|
|
}
|
|
|
|
void Init( float _x, float _y, float _z )
|
|
|
|
{
|
|
|
|
x = _x;
|
|
|
|
y = _y;
|
|
|
|
z = _z;
|
|
|
|
}
|
2015-05-15 23:34:52 +02:00
|
|
|
float& operator[](int i)
|
2015-05-11 05:38:07 +02:00
|
|
|
{
|
|
|
|
assert( (i >= 0) && (i < 3) );
|
|
|
|
return ((float*)this)[i];
|
|
|
|
}
|
2015-05-15 23:34:52 +02:00
|
|
|
float operator[](int i) const
|
2015-05-11 05:38:07 +02:00
|
|
|
{
|
|
|
|
assert( (i >= 0) && (i < 3) );
|
|
|
|
return ((float*)this)[i];
|
|
|
|
}
|
|
|
|
};
|