diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-08 17:12:02 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-08 17:12:02 +0000 |
commit | bff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch) | |
tree | 0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /libdimensionxx/cameras.cpp | |
parent | 14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff) | |
download | dimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz |
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimensionxx/cameras.cpp')
-rw-r--r-- | libdimensionxx/cameras.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdimensionxx/cameras.cpp b/libdimensionxx/cameras.cpp index ea0bca9..dee4df6 100644 --- a/libdimensionxx/cameras.cpp +++ b/libdimensionxx/cameras.cpp @@ -31,7 +31,7 @@ namespace Dimension } } - // Delete a perspective camera + // Delete a perspective camera, if we're the last reference Perspective_Camera::~Perspective_Camera() { if (unique()) { @@ -39,24 +39,28 @@ namespace Dimension } } + // Get the transformation matrix Matrix Perspective_Camera::trans() { return Matrix(dmnsn_get_perspective_camera_trans(dmnsn())); } + // Set the transformation matrix void Perspective_Camera::trans(const Matrix& trans) { dmnsn_set_perspective_camera_trans(dmnsn(), trans.dmnsn()); } + // Shallow-copy this camera Camera* Perspective_Camera::copy() const { return new Perspective_Camera(*this); } + // Private copy-constructor, for copy() implementation Perspective_Camera::Perspective_Camera(const Perspective_Camera& camera) : Camera(camera) { } |