summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/object.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/object.cpp
parent14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff)
downloaddimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimensionxx/object.cpp')
-rw-r--r--libdimensionxx/object.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libdimensionxx/object.cpp b/libdimensionxx/object.cpp
index 61b8b7d..1a43f62 100644
--- a/libdimensionxx/object.cpp
+++ b/libdimensionxx/object.cpp
@@ -26,12 +26,14 @@ namespace Dimension
Object::~Object()
{ }
+ // Get the transformation matrix
Matrix
Object::trans()
{
return Matrix(dmnsn()->trans);
}
+ // Set the transformation matrix
void
Object::trans(const Matrix& trans)
{
@@ -42,14 +44,14 @@ namespace Dimension
Array<double>
Object::intersections(const Line& l)
{
- return Array<double>(dmnsn()->intersections_fn(dmnsn(), l.dmnsn()));
+ return Array<double>((*dmnsn()->intersections_fn)(dmnsn(), l.dmnsn()));
}
// Whether the point `point' is inside the object
bool
Object::inside(const Vector& point)
{
- return dmnsn()->inside_fn(dmnsn(), point.dmnsn());
+ return (*dmnsn()->inside_fn)(dmnsn(), point.dmnsn());
}
// Return the wrapped object
@@ -93,7 +95,7 @@ namespace Dimension
bool
Object::unique() const
{
- return m_object.unique();
+ return m_object && m_object.unique();
}
// Set the wrapped dmnsn_object*