3D Repo Bouncer  1.4
repo_node_material.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 mesh only
30  //
31  //------------------------------------------------------------------------------
32 #define REPO_NODE_MATERIAL_LABEL_AMBIENT "ambient"
33 #define REPO_NODE_MATERIAL_LABEL_DIFFUSE "diffuse"
34 #define REPO_NODE_MATERIAL_LABEL_SPECULAR "specular"
35 #define REPO_NODE_MATERIAL_LABEL_EMISSIVE "emissive"
36 #define REPO_NODE_MATERIAL_LABEL_WIREFRAME "wireframe"
37 #define REPO_NODE_MATERIAL_LABEL_TWO_SIDED "two_sided"
38 #define REPO_NODE_MATERIAL_LABEL_OPACITY "opacity"
39 #define REPO_NODE_MATERIAL_LABEL_SHININESS "shininess"
40 #define REPO_NODE_MATERIAL_LABEL_SHININESS_STRENGTH "shininess_strength"
41  //------------------------------------------------------------------------------
42 
43  class REPO_API_EXPORT MaterialNode :public RepoNode
44  {
45  public:
46 
50  MaterialNode();
51 
56  MaterialNode(RepoBSON bson);
57 
61  ~MaterialNode();
62 
67  virtual std::string getType() const
68  {
69  return REPO_NODE_TYPE_MATERIAL;
70  }
71 
76  virtual NodeType getTypeAsEnum() const
77  {
78  return NodeType::MATERIAL;
79  }
80 
88  virtual bool sEqual(const RepoNode &other) const;
89 
98  repo_material_t getMaterialStruct() const;
99 
100  protected:
101  std::vector<float> getDataAsBuffer() const;
102  };
103  } //namespace model
104  } //namespace core
105 } //namespace repo
Definition: repo_connection_pool_mongo.h:32
Definition: repo_node_material.h:43
Definition: repo_node.h:33
Definition: repo_bson.h:53
virtual NodeType getTypeAsEnum() const
Definition: repo_node_material.h:76
Definition: repo_node_utils.h:48
virtual std::string getType() const
Definition: repo_node_material.h:67