51 shaderDir +
"ColorUniformPoint.vert",
52 shaderDir +
"Color.frag");
58 int refLen = std::min(scrW, scrH);
68 cs = (float)refLen * 0.01f;
70 float l = (float)refLen * 0.35f;
104 float horizonAngle = std::atan2(horizon.
y, horizon.
x) *
RAD2DEG;
117 ss << std::fixed << std::setprecision(1) << -horizonAngle;
Container for general algorithm functions.
vector< SLVec3f > SLVVec3f
SLVec3< SLfloat > SLVec3f
Encapsulation of a mobile device rotation set by the device's IMU sensor.
SLMat3f rotationAveraged()
void isUsed(SLbool isUsed)
Setter that turns on the device rotation sensor.
Generic Shader Program class inherited from SLGLProgram.
void addUniform1f(SLGLUniform1f *u)
add float uniform
SLHorizonNode(SLstring name, SLDeviceRotation *devRot, SLTexFont *font, SLstring shaderDir, int scrW, int scrH)
Construct a new SLHorizonNode::SLHorizonNode object.
SLDeviceRotation * _devRot
void rotation(const T angleDEG, const SLVec3< T > &axis)
Sets the rotation components
Defines a standard CG material with textures and a shader program.
SLNode represents a node in a hierarchical scene graph.
void rotation(const SLQuat4f &rot, SLTransformSpace relativeTo=TS_parent)
void addChild(SLNode *child)
SLNode(const SLstring &name="Node")
Construct a new SLNode::SLNode object.
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
SLPolyline creates a polyline object.
Texture Font class inherits SLGLTexture for alpha blended font rendering.
SLVec2f calcTextSize(const SLstring &text, SLfloat maxWidth=0.0f, SLfloat lineHeightFactor=1.5f)
SLText creates a mesh using a textured font from SLTexFont.
bool estimateHorizon(const SLMat3f &enuRs, const SLMat3f &sRc, SLVec3f &horizon)
static const float RAD2DEG