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

« back to all changes in this revision

Viewing changes to COLLADAMaya/include/COLLADAMayaRotateHelper.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 COLLADAMaya.
 
5
 
 
6
    Portions of the code are:
 
7
    Copyright (c) 2005-2007 Feeling Software Inc.
 
8
    Copyright (c) 2005-2007 Sony Computer Entertainment America
 
9
    Copyright (c) 2004-2005 Alias Systems Corp.
 
10
 
 
11
    Licensed under the MIT Open Source License,
 
12
    for details please see LICENSE file or the website
 
13
    http://www.opensource.org/licenses/mit-license.php
 
14
*/
 
15
 
 
16
#ifndef __COLLADA_MAYA_ROTATE_HELPER_H__
 
17
#define __COLLADA_MAYA_ROTATE_HELPER_H__
 
18
 
 
19
#include "COLLADAMayaPrerequisites.h"
 
20
#include <vector>
 
21
 
 
22
namespace COLLADAMaya
 
23
{
 
24
 
 
25
    /**
 
26
     * Generates the rotation matrix, depending on the rotation order.
 
27
     */
 
28
    class RotateHelper
 
29
    {
 
30
 
 
31
    private:
 
32
 
 
33
        /** The euler rotation with the rotation order to set. */
 
34
        MEulerRotation rotation;
 
35
 
 
36
        /** The rotation matrix to generate, depending on the rotation order. */
 
37
        std::vector< std::vector<double> > rotationMatrix;
 
38
 
 
39
        /** The vector with the rotation parameters in the rotation order. */
 
40
        std::vector<String> rotationParameters;
 
41
 
 
42
    public:
 
43
 
 
44
        /**
 
45
         * Constructor.
 
46
         * @param rotation The euler rotation.
 
47
         */
 
48
        RotateHelper( MEulerRotation rotation );
 
49
 
 
50
        /**
 
51
         * Returns the rotation vector (2x3 matrix).
 
52
         * @return std::vector< std::vector<double> >&
 
53
         */
 
54
        std::vector < std::vector<double> >& getRotationMatrix ()
 
55
        {
 
56
            return rotationMatrix;
 
57
        }
 
58
 
 
59
        /**
 
60
         * Returns the rotation parameters in the rotation order.
 
61
         * @return std::vector<String>&
 
62
         */
 
63
        std::vector<String>& getRotationParameters ()
 
64
        {
 
65
            return rotationParameters;
 
66
        }
 
67
 
 
68
    private:
 
69
 
 
70
        /**
 
71
         * Creates the rotation.
 
72
         */
 
73
        void createRotation ( );
 
74
 
 
75
        void createX ( uint pos );
 
76
 
 
77
        void createY ( uint pos );
 
78
 
 
79
        void createZ ( uint pos );
 
80
 
 
81
    };
 
82
}
 
83
 
 
84
#endif /* __COLLADA_MAYA_ROTATE_HELPER_H__ */
 
85