diff options
Diffstat (limited to 'libdimensionxx/cameras.cpp')
-rw-r--r-- | libdimensionxx/cameras.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libdimensionxx/cameras.cpp b/libdimensionxx/cameras.cpp index fb11dcf..a7a8255 100644 --- a/libdimensionxx/cameras.cpp +++ b/libdimensionxx/cameras.cpp @@ -22,7 +22,7 @@ namespace Dimension { - // Create a sphere + // Create a perspective camera Perspective_Camera::Perspective_Camera(const Matrix& trans) : Camera(dmnsn_new_perspective_camera(trans.dmnsn())) { @@ -31,9 +31,21 @@ namespace Dimension } } - // Delete a sphere + // Delete a perspective camera Perspective_Camera::~Perspective_Camera() { dmnsn_delete_perspective_camera(m_camera); } + + Matrix + Perspective_Camera::trans() + { + return Matrix(dmnsn_get_perspective_camera_trans(m_camera)); + } + + void + Perspective_Camera::trans(const Matrix& trans) + { + dmnsn_set_perspective_camera_trans(m_camera, trans.dmnsn()); + } } |