OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
nodeanim.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef NODEANIM_H
19 #define NODEANIM_H
20 
21 #include "index.h"
22 
23 namespace Engine
24 {
25 
32 class NodeAnim
33 {
34  public:
35 
36  explicit NodeAnim();
37  explicit NodeAnim(const std::string &node_name );
38 
39  ~NodeAnim(){}
40 
46  void setRotations( Vector3fv rotations );
47 
54  void setQuanternions( Vector4fv quats );
55 
61  void setPosition( const Vector3f & position );
62 
68  void setNodeName( const std::string & node_name );
69 
75  void setNode( NodeAnim * node );
76 
82  void addQuanternion( const Vector4f & quat );
83 
89  void addRotation( const Vector3f & rotation );
90 
96  const Vector4fv getQuanternions(void) const;
97 
103  const Vector3fv getRotations(void) const;
104 
110  const Vector3f & getPosition(void) const;
111 
117  const std::string & getNodeName(void) const;
118 
125 
130  const NodeAnim * getConstParentNode(void) const;
131 
136  void clear(void);
137 
138  private:
139 
140  std::string mNodeName;
141  NodeAnim * mNode;
142  Vector3f mPosition;
144  Vector4fv mQuanternions;
145  Vector3fv mRotations;
146 };
147 
148 }
149 
150 #endif // NODEANIM_H
void setQuanternions(Vector4fv quats)
setQuanternions
Definition: NodeAnim.cpp:51
const Vector3fv getRotations(void) const
getRotations
Definition: NodeAnim.cpp:56
const NodeAnim * getConstParentNode(void) const
getConstParentNode
Definition: NodeAnim.cpp:81
Definition: element.h:23
void clear(void)
clear
Definition: NodeAnim.cpp:86
The NodeAnim class.
Definition: nodeanim.h:32
void setRotations(Vector3fv rotations)
setRotations
Definition: NodeAnim.cpp:46
void setNode(NodeAnim *node)
setNode
Definition: NodeAnim.cpp:31
const std::string & getNodeName(void) const
getNodeName
Definition: NodeAnim.cpp:71
NodeAnim * getParentNode()
getParentNode
Definition: NodeAnim.cpp:76
void setPosition(const Vector3f &position)
setPosition
Definition: NodeAnim.cpp:41
const Vector3f & getPosition(void) const
getPosition
Definition: NodeAnim.cpp:66
void setNodeName(const std::string &node_name)
setNodeName
Definition: NodeAnim.cpp:36
void addQuanternion(const Vector4f &quat)
addQuanternion
Definition: NodeAnim.cpp:92
const Vector4fv getQuanternions(void) const
getQuanternions
Definition: NodeAnim.cpp:61
void addRotation(const Vector3f &rotation)
addRotation
Definition: NodeAnim.cpp:97