RAMSES Documentation  27.0.130
Information for RAMSES users and developers
MeshNode.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2014 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_MESHNODE_H
10 #define RAMSES_MESHNODE_H
11 
12 #include "ramses-client-api/Node.h"
13 
14 namespace ramses
15 {
16  class Appearance;
17  class GeometryBinding;
18  class Effect;
19 
24  class RAMSES_API MeshNode : public Node
25  {
26  public:
27 
36 
49 
57  status_t setStartIndex(uint32_t startIndex);
58 
63  uint32_t getStartIndex() const;
64 
73  status_t setStartVertex(uint32_t startVertex);
74 
79  uint32_t getStartVertex() const;
80 
88  status_t setIndexCount(uint32_t indexCount);
89 
94  uint32_t getIndexCount() const;
95 
100  const Appearance* getAppearance() const;
101 
109 
115 
121 
127 
137  status_t setInstanceCount(uint32_t instanceCount);
138 
144  uint32_t getInstanceCount() const;
145 
149  class MeshNodeImpl& impl;
150 
151  protected:
155  friend class SceneImpl;
156 
162  explicit MeshNode(MeshNodeImpl& pimpl);
163 
169  MeshNode(const MeshNode& other);
170 
177  MeshNode& operator=(const MeshNode& other);
178 
182  virtual ~MeshNode();
183  };
184 }
185 
186 #endif
#define RAMSES_API
Definition: APIExport.h:35
The Appearance describes how an object should look like. This includes GLSL uniform values,...
Definition: Appearance.h:34
A geometry binding together with an appearance describe how an object will be rendered to the screen.
Definition: GeometryBinding.h:25
The MeshNode holds all information which is needed to render an object to the screen.
Definition: MeshNode.h:25
status_t setAppearance(Appearance &appearance)
Sets the Appearance of the MeshNode.
const Appearance * getAppearance() const
Returns the appearance.
uint32_t getIndexCount() const
Gets the number of indices that will be used for rendering.
uint32_t getStartVertex() const
Gets the first vertex of vertex arrays that will be used for rendering.
MeshNode(MeshNodeImpl &pimpl)
Constructor for MeshNode.
status_t setStartIndex(uint32_t startIndex)
Sets the first index of indices array that will be used for rendering.
Appearance * getAppearance()
Returns the appearance.
uint32_t getInstanceCount() const
Gets the number of instance that will be drawn for this mesh by the renderer.
MeshNode(const MeshNode &other)
Copy constructor of MeshNode.
MeshNode & operator=(const MeshNode &other)
Assignment operator of MeshNode.
status_t removeAppearanceAndGeometry()
Removes the Appearance and GeometryBinding previously set to the MeshNode.
status_t setInstanceCount(uint32_t instanceCount)
Sets the number of instances that will be drawn for this mesh by the renderer.
status_t setGeometryBinding(GeometryBinding &geometry)
Sets the GeometryBinding of the MeshNode.
GeometryBinding * getGeometryBinding()
Returns the geometry binding.
status_t setStartVertex(uint32_t startVertex)
Sets the offset of the first vertex to use from each vertex array that will be used for rendering the...
uint32_t getStartIndex() const
Gets the first index of indices array that will be used for rendering.
const GeometryBinding * getGeometryBinding() const
Returns the geometry binding.
status_t setIndexCount(uint32_t indexCount)
Sets the number of indices that will be used for rendering.
virtual ~MeshNode()
Destructor of the MeshNode.
class MeshNodeImpl & impl
Definition: MeshNode.h:149
The Node is the base class of all nodes and provides scene graph functionality which propagates to it...
Definition: Node.h:23
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26