Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100886682
sktools.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 3, 15:21
Size
1 KB
Mime Type
text/x-c
Expires
Wed, Feb 5, 15:21 (2 d)
Engine
blob
Format
Raw Data
Handle
24050893
Attached To
rSYMKIT symkit
sktools.h
View Options
#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
Log In to Comment