Page MenuHomec4science

sktools.h
No OneTemporary

File Metadata

Created
Wed, Jan 22, 12:44

sktools.h

#ifndef SKTOOLS_H
#define SKTOOLS_H
class Positionable;
class Orientable;
class Scalable;
class Renderable;
class Colorable;
class QGLShaderProgram;
class QMatrix4x4;
class Camera;
#include <Qt>
/*
* Same public rendering tools
*/
namespace symkit
{
void loadActorPosition(Positionable*, QMatrix4x4&);
void loadActorOrientation(Orientable*, QMatrix4x4&);
void loadActorScaling(Scalable*, QMatrix4x4&);
void loadActorPolygonMode(Renderable*, bool&);
void loadActorColor(Colorable*, QGLShaderProgram*);
/*
* Mouse event structure
*/
struct mouse_s
{
mouse_s(int x, int y, Camera *, Qt::MouseButton);
mouse_s(const mouse_s&);
int x, y;
Camera * camera;
Qt::MouseButton button;
bool operator==(const mouse_s&) const;
};
/*
* Render args structure
*/
struct render_s
{
QGLShaderProgram * shaderProgram;
Camera * camera;
QMatrix4x4& matrix;
bool& polygonMode;
};
/*
* Color array RGBA
*
* R := red
* G := green
* B := blue
* A := alpha (transparency)
*
* All values must be bound in the range [0, 1]
*/
struct color_s
{
float red, green, blue, alpha;
};
/*
* Enumerator for the shader identities
*/
enum AttributeId
{
vertex = 0, color
};
}
bool operator==(const symkit::mouse_s&, const symkit::mouse_s&);
#define COLOR_ARGS(buf) buf.red, buf.green, buf.blue, buf.alpha
#endif // SKTOOLS_H

Event Timeline