1 #ifndef INCLUDE_AL_GNOMON_HPP
2 #define INCLUDE_AL_GNOMON_HPP
4 #include "al/graphics/al_Font.hpp"
5 #include "al/graphics/al_Graphics.hpp"
6 #include "al/graphics/al_Mesh.hpp"
7 #include "al/graphics/al_Shapes.hpp"
8 #include "al/types/al_Color.hpp"
21 const char *labels[3];
43 double scale = 1.0,
Vec3f offset =
Vec3f(0, 0, 0)) {
52 for (
int i = 0; i < 3; i++) {
54 Vec3f xform = gnomonMesh.vertices()[(i * 2) + 1];
63 fontrender.write(labels[i], 0.1);
Interface for loading fonts and rendering text.
void blending(bool doBlend)
Turn blending on/off.
void polygonFill()
Draw filled polygons.
void blendTrans()
Set blend mode to transparent (asymmetric)
Stores buffers related to rendering graphical objects.
A local coordinate frame.
Vec3d uu() const
Get up unit vector.
Vec3d & pos()
Get "position" vector.
static Quat getBillboardRotation(const Vec< 3, double > &forward, const Vec< 3, double > &up)
void rotate(float angle, float x=0., float y=0., float z=1.)
void scale(float x, float y, float z=1.)
Scale current matrix along each dimension.
void translate(float x, float y, float z=0.)
Translate current matrix.
void popMatrix()
Pop current matrix stack.
void pushMatrix()
Push current matrix stack.
Vec & normalize(T scale=T(1))
Set magnitude to one without changing direction.
Vec< 3, double > Vec3d
double 3-vector
Vec< 3, float > Vec3f
float 3-vector
Convenience class to simplify rendering text.
void drawAtPose(Graphics &g, Pose pose, Pose cam_pose=Pose(), double scale=1.0)
Gnomon at any pose.
void drawFloating(Graphics &g, Pose pose=Pose(), double scale=1.0)
floating gnomon in front of camera
void drawAtPos(Graphics &g, Vec3f pos, Pose cam_pose=Pose(), double scale=1.0)
Gnomon at any position.