61 friend class VBOPrimitives;
67 Vec4() : m_x(0.0
f),m_y(0.0
f),m_z(0.0
f),m_w(1.0
f){}
101 Real dot(
const Vec4 &_b )
const noexcept;
115 void set(
const Vec4& _v ) noexcept;
120 void set(
const Vec3 &_v ) noexcept;
124 void null() noexcept;
138 Real& operator[](
int _i ) noexcept;
152 Vec4 &normalize() noexcept;
158 void cross(
const Vec4& _v1,
const Vec4& _v2) noexcept;
164 Vec4 cross(
const Vec4& _b)
const noexcept;
169 void operator+=(
const Vec4& _v) noexcept;
175 void operator-=(
const Vec4& _v ) noexcept;
189 Vec4 operator +(
const Vec4 &_v)
const noexcept;
196 Vec4 operator/(
Real _v)
const noexcept;
203 void operator/=(
Real _v) noexcept;
209 void operator*=(
Real _v) noexcept;
215 Vec4 operator-(
const Vec4& _v)
const noexcept;
229 Vec4 &operator =(
const Vec4 &_v) noexcept;
235 Vec4 &operator =(
const Vec3 &_v) noexcept;
242 Vec4 &operator =(
Real _v) noexcept;
247 Vec4 &operator-() noexcept;
259 bool operator!=(
const Vec4 &_v)
const noexcept;
265 Vec4 operator/(
const Vec4& _v)
const noexcept;
271 Real angleBetween(
const Vec4 &_v)
const noexcept;
277 Real inner(
const Vec4& _v)
const noexcept;
283 Vec4 outer(
const Vec4& _v)
const noexcept;
288 Real lengthSquared()
const noexcept;
357 return Vec4(_k*_v.m_x, _k*_v.m_y, _k*_v.m_z,_v.m_w);
bool operator==(const ngl::Mat3 &_m1, const ngl::Mat3 &_m2)
Vec4(Real _x, Real _y, Real _z, Real _w=1.0f) noexcept
initialise the constructor from 3 or 4 Real
const Real & operator[](int _i) const noexcept
simple Vec2 encapsulates a 3 float object like glsl Vec2 but not maths use the Vec2 class for maths a...
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions...
main definition of types and namespace
std::array< Real, 4 > m_openGL
array of four floats mapped to the x,y,z,w components of the vector useful for openGL fv data types t...
Vec3 toVec3() const noexcept
get as a Vec3 for glsl etc
Vec4(const Vec3 &_v, float _w=1.0f) noexcept
copy ctor
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
implementation files for RibExport class
GLuint GLsizei GLsizei * length
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
a simple 2 tuple container for compatibility with glsl
a simple 3 tuple container for compatibility with glsl
Vec2 operator*(Real _k, const Vec2 &_v) noexcept
scalar * vector operator
Real * openGL() noexcept
accesor to the m_openGL matrix returns the address of the 0th element
used to load in an alias wave front obj format file and draw using open gl has been completly re-writ...
Matrix Class to do simple matrix operations included operator overloaded functions for maths and matr...
Real m_w
w component 0 for vector 1 for point
Vec2 toVec2() const noexcept
get as a Vec2 for glsl etc