transform.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef TANGO_GL_TRANSFORM_H_
18 #define TANGO_GL_TRANSFORM_H_
19 
20 #include "glm/glm.hpp"
21 #include "glm/gtc/quaternion.hpp"
22 
23 namespace tango_gl {
24 class Transform {
25  public:
26  Transform();
27  virtual ~Transform();
28 
29  Transform(const Transform& other) = delete;
30  const Transform& operator=(const Transform& rhs) = delete;
31 
32  void SetPosition(const glm::vec3& position);
33  glm::vec3 GetPosition() const;
34 
35  void SetRotation(const glm::quat& rotation);
36  glm::quat GetRotation() const;
37 
38  void SetScale(const glm::vec3& scale);
39  glm::vec3 GetScale() const;
40 
41  void Translate(const glm::vec3& translation);
42 
43  void SetTransformationMatrix(const glm::mat4& transform_mat);
45 
46  void SetParent(Transform* transform);
47 
48  const Transform* GetParent() const ;
49  Transform* GetParent() ;
50 
51  private:
53 
57 };
58 } // namespace tango_gl
59 #endif // TANGO_GL_TRANSFORM_H_
glm::vec3 scale_
Definition: transform.h:56
Transform * parent_
Definition: transform.h:52
void SetRotation(const glm::quat &rotation)
Definition: transform.cpp:43
glm::quat GetRotation() const
Definition: transform.cpp:47
GLM_FUNC_DECL detail::tmat4x4< T, P > scale(detail::tmat4x4< T, P > const &m, detail::tvec3< T, P > const &v)
glm::mat4 GetTransformationMatrix() const
Definition: transform.cpp:67
const Transform & operator=(const Transform &rhs)=delete
glm::vec3 GetPosition() const
Definition: transform.cpp:39
const Transform * GetParent() const
Definition: transform.cpp:84
void Translate(const glm::vec3 &translation)
Definition: transform.cpp:59
translation
void SetParent(Transform *transform)
Definition: transform.cpp:80
virtual ~Transform()
Definition: transform.cpp:31
glm::vec3 position_
Definition: transform.h:54
GLM_FUNC_DECL detail::tquat< T, P > rotation(detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest)
void SetTransformationMatrix(const glm::mat4 &transform_mat)
Definition: transform.cpp:63
glm::quat rotation_
Definition: transform.h:55
void SetPosition(const glm::vec3 &position)
Definition: transform.cpp:35
void SetScale(const glm::vec3 &scale)
Definition: transform.cpp:51
glm::vec3 GetScale() const
Definition: transform.cpp:55


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:38:58