X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvector.h;fp=source%2Fvector.h;h=d1693af101ab04c5806038b247264302704e5295;hp=0000000000000000000000000000000000000000;hb=41339bc44d076569c680b2c24c75b30ef1254c1b;hpb=c112952f156b4ccb820568bca1fd1c59966f708e diff --git a/source/vector.h b/source/vector.h new file mode 100644 index 00000000..d1693af1 --- /dev/null +++ b/source/vector.h @@ -0,0 +1,35 @@ +/* $Id$ + +This file is part of libmspgl +Copyright © 2009 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + +#ifndef MSP_GL_VECTOR_H_ +#define MSP_GL_VECTOR_H_ + +namespace Msp { +namespace GL { + +struct Vector3 +{ + float x, y, z; + + Vector3(): x(0), y(0), z(0) { } + Vector3(float x_, float y_, float z_): x(x_), y(y_), z(z_) { } +}; + +struct Vector4 +{ + float x, y, z, w; + + Vector4(): x(0), y(0), z(0), w(1) { } + Vector4(float x_, float y_, float z_): x(x_), y(y_), z(z_), w(1) { } + Vector4(float x_, float y_, float z_, float w_): x(x_), y(y_), z(z_), w(w_) { } + Vector4(const Vector3 &v): x(v.x), y(v.y), z(v.z), w(1) { } +}; + +} // namespace GL +} // namespace Msp + +#endif