Commit ccae23dd authored by CAMP C++ Builder's avatar CAMP C++ Builder
Browse files

comments and cleanup

parent b4cbb590
......@@ -32,9 +32,7 @@
namespace campvis {
/**
* Abstract base class for data handled by a DataHandle and stored in a DataContainer.
*
* \todo
* Data Container to store a position and (optional) rotation as quaternion
*/
class PositionData : public AbstractData {
public:
......@@ -43,8 +41,9 @@ namespace campvis {
* \param position The initial position
* \param quaternion The initial quaternion/orientation
*/
explicit PositionData(const tgt::vec3& position, const tgt::vec4& quaternion)
: _position(position)
explicit PositionData(const tgt::vec3 &position, const tgt::vec4 &quaternion = tgt::vec4(0.f, 0.f, 0.f, 0.f) )
: AbstractData()
, _position(position)
, _quaternion(quaternion)
{ };
......@@ -75,9 +74,9 @@ namespace campvis {
/**
* Sets the quaternion.
* \param val New quaternion matrix
* \param val New quaternion vector
**/
void setQuaternion(tgt::vec4 val) { _quaternion = val; }
void setQuaternion(const tgt::vec4 &val) { _quaternion = val; }
/**
* Gets the position
......@@ -87,9 +86,9 @@ namespace campvis {
/**
* Sets the position.
* \param val New position matrix
* \param val New position vector
**/
void setPosition(tgt::vec3 val) { _position = val; }
void setPosition(const tgt::vec3 &val) { _position = val; }
protected:
......
......@@ -32,9 +32,7 @@
namespace campvis {
/**
* Abstract base class for data handled by a DataHandle and stored in a DataContainer.
*
* \todo
* Data Container class for transforms. Stores a \a tgt::mat4 object.
*/
class TransformData : public AbstractData {
public:
......@@ -42,7 +40,11 @@ namespace campvis {
* Constructor, Creates a new light source.
* \param transform The transformation
*/
explicit TransformData(const tgt::mat4& transform) : _transform(transform) { };
explicit TransformData(const tgt::mat4 & transform)
: AbstractData()
, _transform(transform)
{
};
/**
* Virtual destructor
......@@ -72,7 +74,7 @@ namespace campvis {
* Sets the transformation.
* \param _transformation New transformation matrix
**/
void setTransform(tgt::mat4 val) { _transform = val; }
void setTransform(const tgt::mat4 & val) { _transform = val; }
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment