Pioneer
ModelNode.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _MODELNODE_H
5 #define _MODELNODE_H
6 /*
7  * Use another model as a submodel
8  */
9 #include "Model.h"
10 #include "Node.h"
11 
12 namespace SceneGraph {
13 
14  class ModelNode : public Node {
15  public:
16  ModelNode(Model *m);
17  ModelNode(const ModelNode &, NodeCopyCache *cache = 0);
18  virtual Node *Clone(NodeCopyCache *cache = 0);
19  virtual const char *GetTypeName() const { return "ModelNode"; }
20  virtual void Render(const matrix4x4f &trans, const RenderData *rd);
21  virtual void Render(const std::vector<matrix4x4f> &trans, const RenderData *rd);
22 
23  protected:
24  virtual ~ModelNode() {}
25 
26  private:
27  Model *m_model;
28  };
29 
30 } // namespace SceneGraph
31 
32 #endif
Definition: ModelNode.h:14
virtual ~ModelNode()
Definition: ModelNode.h:24
virtual const char * GetTypeName() const
Definition: ModelNode.h:19
ModelNode(Model *m)
Definition: ModelNode.cpp:9
virtual void Render(const matrix4x4f &trans, const RenderData *rd)
Definition: ModelNode.cpp:26
virtual Node * Clone(NodeCopyCache *cache=0)
Definition: ModelNode.cpp:21
Definition: Model.h:88
Definition: NodeCopyCache.h:14
Definition: Node.h:72
Definition: CityOnPlanet.h:31
Definition: Node.h:44