2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAFramework.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COLLADAFW_TRANSLATE_H__
12
#define __COLLADAFW_TRANSLATE_H__
14
#include "COLLADAFWPrerequisites.h"
15
#include "COLLADAFWTransformation.h"
17
#include "Math/COLLADABUMathVector3.h"
22
/** Describes the transformation of a node
23
Animations for this class must have one of the following animation classes:
29
class Translate : public Transformation
32
/** The vector that represents the translation.*/
33
COLLADABU::Math::Vector3 mTranslationVector;
36
/** Default constructor. Constructs identity translation.*/
39
/** Sets translation to @a vector.*/
40
Translate(const COLLADABU::Math::Vector3& translationVector);
42
/** Sets the components of the translation to @a x, @a y, @a z.*/
43
Translate(double x, double y, double z);
47
/** Returns the translation vector.*/
48
COLLADABU::Math::Vector3& getTranslation() { return mTranslationVector; }
50
/** Returns the translation vector.*/
51
const COLLADABU::Math::Vector3& getTranslation() const { return mTranslationVector; }
53
/** Sets the translation vector.*/
54
void setTranslation(const COLLADABU::Math::Vector3& translationVector) { mTranslationVector = translationVector; }
56
/** Sets the components of the translation to @a x, @a y, @a z.*/
57
void setTranslation(double x, double y, double z) { mTranslationVector = COLLADABU::Math::Vector3(x, y, z); }
59
/** Clones the translation.*/
60
Translate* clone() const { return new Translate(*this); }
63
} // namespace COLLADAFW
65
#endif // __COLLADAFW_TRANSLATE_H__