will be in the range [-1, 1]. */
float w = (axes[i].slope+(1-axes[i].slope)*u*u)*u*0.5f+0.5f;
- /* The interpolate vectors will also be shorter than unit length. At
+ /* The interpolated vectors will also be shorter than unit length. At
the halfway point the length will be equal to the cosine of half the
angle, which was computed earlier. Use a second degree polynomial to
approximate. */
update_object_matrix();
}
-void Camera::set_up_direction(const Vector3 &u)
-{
- up_dir = normalize(u);
- update_object_matrix();
-}
-
void Camera::set_look_direction(const Vector3 &l)
{
look_dir = normalize(l);
set_look_direction(p-position);
}
+void Camera::set_up_direction(const Vector3 &u)
+{
+ up_dir = normalize(u);
+ update_object_matrix();
+}
+
void Camera::set_object_matrix(const Matrix &m)
{
position = m.column(3).slice<3>(0);
namespace Msp {
namespace GL {
-class ProgramData;
-
/**
Represents a single instance of an Object. Thanks to being derived from
Placeable in can be positioned without additional effort. Other instance