3D Repo Bouncer  1.4
repo_node_transformation.h
1 
21 #pragma once
22 #include "repo_node.h"
23 
24 namespace repo {
25  namespace core {
26  namespace model {
27  //------------------------------------------------------------------------------
28  //
29  // Fields specific to transformation only
30  //
31  //------------------------------------------------------------------------------
32 
33 #define REPO_NODE_LABEL_MATRIX "matrix"
34  //------------------------------------------------------------------------------
35 
36  class REPO_API_EXPORT TransformationNode :public RepoNode
37  {
38  public:
39 
44 
50 
55 
62  bool isIdentity(const float &eps = 10e-5) const;
67  static std::vector<std::vector<float>> identityMat();
68 
73  virtual std::string getType() const
74  {
75  return REPO_NODE_TYPE_TRANSFORMATION;
76  }
77 
82  virtual NodeType getTypeAsEnum() const
83  {
84  return NodeType::TRANSFORMATION;
85  }
86 
96  virtual bool positionDependant() { return true; }
97 
105  virtual bool sEqual(const RepoNode &other) const;
106 
107  /*
108  * ------------- Delusional modifiers --------------
109  * These are like "setters" but not. We are actually
110  * creating a new bson object with the changed field
111  */
112 
120  virtual RepoNode cloneAndApplyTransformation(
121  const std::vector<float> &matrix) const;
122 
132  std::vector<float> getTransMatrix(const bool &rowMajor) const;
133  };
134  } //namespace model
135  } //namespace core
136 } //namespace repo
virtual bool positionDependant()
Definition: repo_node_transformation.h:96
virtual std::string getType() const
Definition: repo_node_transformation.h:73
Definition: repo_connection_pool_mongo.h:32
Definition: repo_node_transformation.h:36
Definition: repo_node.h:33
Definition: repo_bson.h:53
virtual NodeType getTypeAsEnum() const
Definition: repo_node_transformation.h:82