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/dimensionxx | |
parent | 14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff) | |
download | dimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz |
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimensionxx/dimensionxx')
-rw-r--r-- | libdimensionxx/dimensionxx/cameras.hpp | 2 | ||||
-rw-r--r-- | libdimensionxx/dimensionxx/cookie.hpp | 3 | ||||
-rw-r--r-- | libdimensionxx/dimensionxx/error.hpp | 4 | ||||
-rw-r--r-- | libdimensionxx/dimensionxx/object.hpp | 4 | ||||
-rw-r--r-- | libdimensionxx/dimensionxx/objects.hpp | 2 | ||||
-rw-r--r-- | libdimensionxx/dimensionxx/raytrace.hpp | 1 |
6 files changed, 12 insertions, 4 deletions
diff --git a/libdimensionxx/dimensionxx/cameras.hpp b/libdimensionxx/dimensionxx/cameras.hpp index cabae97..2726a0c 100644 --- a/libdimensionxx/dimensionxx/cameras.hpp +++ b/libdimensionxx/dimensionxx/cameras.hpp @@ -32,9 +32,11 @@ namespace Dimension Perspective_Camera(const Matrix& trans); ~Perspective_Camera(); + // Get/set the transformation matrix Matrix trans(); void trans(const Matrix& trans); + // Shallow-copy the camera Camera* copy() const; private: diff --git a/libdimensionxx/dimensionxx/cookie.hpp b/libdimensionxx/dimensionxx/cookie.hpp index 0d8b4da..9dbe7b8 100644 --- a/libdimensionxx/dimensionxx/cookie.hpp +++ b/libdimensionxx/dimensionxx/cookie.hpp @@ -38,12 +38,15 @@ namespace Dimension FILE_Cookie(std::iostream& iostr); ~FILE_Cookie(); + // Get the magic FILE* FILE* file(); const FILE* file() const; + // Are we an input or output stream? bool is_input() const; bool is_output() const; + // Get the C++ streams std::istream& istr(); const std::istream& istr() const; std::ostream& ostr(); diff --git a/libdimensionxx/dimensionxx/error.hpp b/libdimensionxx/dimensionxx/error.hpp index 7fb0e53..ad61284 100644 --- a/libdimensionxx/dimensionxx/error.hpp +++ b/libdimensionxx/dimensionxx/error.hpp @@ -20,8 +20,8 @@ // Wrappers for libdimension error handling, and an exception class. // dmnsn_error is still used by libdimensionxx whenever an exception shouldn't -// be thrown, like in destructors, and whenever libdimension or libdimension-* -// use it internally. Exceptions are thrown otherwise to report errors. +// be thrown, like in destructors, and whenever libdimension uses it internally. +// Exceptions are thrown otherwise to report errors. #ifndef DIMENSIONXX_ERROR_HPP #define DIMENSIONXX_ERROR_HPP diff --git a/libdimensionxx/dimensionxx/object.hpp b/libdimensionxx/dimensionxx/object.hpp index c56d358..e0b45f4 100644 --- a/libdimensionxx/dimensionxx/object.hpp +++ b/libdimensionxx/dimensionxx/object.hpp @@ -40,10 +40,10 @@ namespace Dimension virtual Array<double> intersections(const Line& l); virtual bool inside(const Vector& point); - // Shallow-copy a derived + // Shallow-copy a derived object virtual Object* copy() const = 0; - // Access the wrapped C object. + // Access the wrapped C object dmnsn_object* dmnsn(); const dmnsn_object* dmnsn() const; diff --git a/libdimensionxx/dimensionxx/objects.hpp b/libdimensionxx/dimensionxx/objects.hpp index 5b43dc4..11e408c 100644 --- a/libdimensionxx/dimensionxx/objects.hpp +++ b/libdimensionxx/dimensionxx/objects.hpp @@ -32,6 +32,7 @@ namespace Dimension Sphere(); ~Sphere(); + // Shallow-copy the sphere Object* copy() const; private: @@ -47,6 +48,7 @@ namespace Dimension Cube(); ~Cube(); + // Shallow-copy the cube Object* copy() const; private: diff --git a/libdimensionxx/dimensionxx/raytrace.hpp b/libdimensionxx/dimensionxx/raytrace.hpp index bfd7e1c..8cf4ee4 100644 --- a/libdimensionxx/dimensionxx/raytrace.hpp +++ b/libdimensionxx/dimensionxx/raytrace.hpp @@ -34,6 +34,7 @@ namespace Dimension Raytracer(Scene& scene); ~Raytracer(); + // Render the scene void render(); Progress render_async(); |