summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/cameras.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-06 16:37:44 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-06 16:37:44 +0000
commitc54af1b6644216335361e61e770037aca1527756 (patch)
tree206f7b14798cec287f8f6112b29840664aaf5758 /libdimensionxx/cameras.cpp
parent4922d448896abe5330f106f21fd6a3b0651ae9eb (diff)
downloaddimension-c54af1b6644216335361e61e770037aca1527756.tar.xz
New GL C++ wrapper.
Diffstat (limited to 'libdimensionxx/cameras.cpp')
-rw-r--r--libdimensionxx/cameras.cpp16
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());
+ }
}