~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to COLLADAFramework/include/COLLADAFWTranslate.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of COLLADAFramework.
 
5
 
 
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
 
9
*/
 
10
 
 
11
#ifndef __COLLADAFW_TRANSLATE_H__
 
12
#define __COLLADAFW_TRANSLATE_H__
 
13
 
 
14
#include "COLLADAFWPrerequisites.h"
 
15
#include "COLLADAFWTransformation.h"
 
16
 
 
17
#include "Math/COLLADABUMathVector3.h"
 
18
 
 
19
 
 
20
namespace COLLADAFW
 
21
{
 
22
        /** Describes the transformation of a node
 
23
                Animations for this class must have one of the following animation classes:
 
24
                POSITION_XYZ
 
25
                POSITION_X
 
26
                POSITION_Y
 
27
                POSITION_Z
 
28
        */
 
29
        class Translate : public Transformation 
 
30
        {
 
31
        private:
 
32
                /** The vector that represents the translation.*/
 
33
                COLLADABU::Math::Vector3 mTranslationVector;
 
34
        
 
35
        public:
 
36
                /** Default constructor. Constructs identity translation.*/ 
 
37
                Translate();
 
38
 
 
39
                /** Sets translation to @a vector.*/ 
 
40
                Translate(const COLLADABU::Math::Vector3& translationVector);
 
41
 
 
42
                /** Sets the components of the translation to @a x, @a y, @a z.*/
 
43
                Translate(double x, double y, double z);
 
44
 
 
45
                virtual ~Translate();
 
46
 
 
47
                /** Returns the translation vector.*/
 
48
                COLLADABU::Math::Vector3& getTranslation() { return mTranslationVector; }
 
49
 
 
50
                /** Returns the translation vector.*/
 
51
                const COLLADABU::Math::Vector3& getTranslation() const { return mTranslationVector; }
 
52
 
 
53
                /** Sets the translation vector.*/
 
54
                void setTranslation(const COLLADABU::Math::Vector3& translationVector) { mTranslationVector = translationVector; }
 
55
 
 
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); }
 
58
 
 
59
                /** Clones the translation.*/
 
60
                Translate* clone() const { return new Translate(*this); }
 
61
 
 
62
        };
 
63
} // namespace COLLADAFW
 
64
 
 
65
#endif // __COLLADAFW_TRANSLATE_H__