summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/cameras.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
commitbff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch)
tree0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /libdimensionxx/cameras.cpp
parent14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff)
downloaddimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimensionxx/cameras.cpp')
-rw-r--r--libdimensionxx/cameras.cpp6
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)
{ }