11 #ifndef SL_HORIZON_NODE_H
12 #define SL_HORIZON_NODE_H
string SLstring
Redefinition of standard types for platform independence.
Mobile device rotation class declaration.
Encapsulation of a mobile device rotation set by the device's IMU sensor.
Encapsulation of an OpenGL shader program object.
Scene node that visualises the horizon estimated from the device rotation.
SLGLProgram * _prog
Program drawing the horizon line.
SLTexFont * _font
Font of the angle label, not owned.
void doUpdate() override
Re-aligns the horizon line and refreshes the angle label.
~SLHorizonNode()
Deletes the program, material and meshes created in the constructor.
SLNode * _horizonNode
Child node carrying the line.
SLHorizonNode(SLstring name, SLDeviceRotation *devRot, SLTexFont *font, SLstring shaderDir, int scrW, int scrH)
Builds the horizon line and its text label.
SLstring _shaderDir
Directory of the line shader.
SLMat3f _sRc
Sensor to camera rotation used by the horizon estimation.
SLPolyline * _line
Mesh of the horizon line.
SLDeviceRotation * _devRot
Rotation sensor, not owned.
SLMaterial * _mat
Material of the horizon line.
SLNode * _textNode
Child node carrying the angle text.
Defines a standard CG material with textures and a shader program.
SLNode represents a node in a hierarchical scene graph.
const SLstring & name() const
SLPolyline creates a polyline object.
Texture Font class inherits SLGLTexture for alpha blended font rendering.