AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
Renderable.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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#pragma once
18
19
21#include <agx/Referenced.h>
22#include <agx/Referenced.h>
23
24namespace agxSDK
25{
26 class Simulation;
27}
28
29namespace agxRender
30{
31
32 class RenderManager;
33
35
38 {
39 public:
40 Renderable() : m_simulation( nullptr ), m_enable( true ) {}
41
43 virtual void render( agxRender::RenderManager* mgr ) = 0;
44
48 bool getEnable() const;
49
53 inline bool isEnabled() const { return getEnable(); }
54
58 void setEnable( bool enable );
59
60 protected:
61
63 virtual ~Renderable();
64
65 friend class RenderManager;
66
69
72
74 void setSimulation( agxSDK::Simulation* simulation );
75
77 virtual void addNotification() {}
78
80 virtual void removeNotification() {}
81
82 private:
83 agxSDK::Simulation* m_simulation;
84 bool m_enable;
85 };
86}
#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:38
agxSDK::Simulation * getSimulation()
void setEnable(bool enable)
Enable/disable this Renderable.
bool isEnabled() const
Definition: Renderable.h:53
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:80
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:77
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:131
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