AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Renderable.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXRENDER_RENDERABLE_H
18#define AGXRENDER_RENDERABLE_H
19
20
22#include <agx/Referenced.h>
23#include <agx/Referenced.h>
24
25namespace agxSDK
26{
27 class Simulation;
28}
29
30namespace agxRender
31{
32
33 class RenderManager;
34
36
39 {
40 public:
41 Renderable() : m_simulation( nullptr ), m_enable( true ) {}
42
44 virtual void render( agxRender::RenderManager* mgr ) = 0;
45
49 bool getEnable() const;
50
54 inline bool isEnabled() const { return getEnable(); }
55
59 void setEnable( bool enable );
60
61 protected:
62
64 virtual ~Renderable();
65
66 friend class RenderManager;
67
70
73
75 void setSimulation( agxSDK::Simulation* simulation );
76
78 virtual void addNotification() {}
79
81 virtual void removeNotification() {}
82
83 private:
84 agxSDK::Simulation* m_simulation;
85 bool m_enable;
86 };
87}
88
89#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Inherit from this class and implement the render() method to make it it self during debug rendering.
Definition Renderable.h:39
agxSDK::Simulation * getSimulation()
void setEnable(bool enable)
Enable/disable this Renderable.
bool isEnabled() const
Definition Renderable.h:54
const agxSDK::Simulation * getSimulation() const
virtual void render(agxRender::RenderManager *mgr)=0
Pure virtual method that should implemented to render a derived class during debug rendering.
virtual void removeNotification()
Called when this Renderable is removed from a RenderManager.
Definition Renderable.h:81
void setSimulation(agxSDK::Simulation *simulation)
Set the associated simulation.
bool getEnable() const
virtual ~Renderable()
Destructor.
virtual void addNotification()
Called when this Renderable is added to a RenderManager.
Definition Renderable.h:78
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Base class providing referencing counted objects.
Definition Referenced.h:120
Namespace containing classes for handling debug rendering of collision geometries,...
Definition Constraint.h:36
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31