AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
RaytraceSystemNodeProxy.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#pragma once
18
19namespace agxSensor
20{
22
30 : public agx::Referenced
32 {
33 public:
35
36 public:
41
43 // Interface like a RtSystemNode.
44
45 public:
46 virtual RtNode* createNode() = 0;
47 virtual void synchronize(RtSystemNodeProxy& node, const CallbackData& data);
48 virtual void execute(RtSystemNodeProxy& node, const CallbackData& data);
49 virtual void complete(RtSystemNodeProxy& node);
50 virtual void result(RtSystemNodeProxy& node, const CallbackData& data);
51 virtual void synchronizeGraphics(RtSystemNodeProxy& node, const agxRender::RenderManager& renderManager);
52 virtual void cleanup(RtSystemNodeProxy& node);
53
55
57 };
58
60
70 {
71 public:
77
81 template <typename T>
82 bool implements() const;
83
85
86 public:
87 virtual RtNode* createNode() final override;
88 virtual void synchronize(const CallbackData& data) final override;
89 virtual void execute(const CallbackData& data) final override;
90 virtual void complete() final override;
91 virtual void result(const CallbackData& data) final override;
92 virtual void synchronizeGraphics(const agxRender::RenderManager& renderManager) final override;
93 virtual void cleanup() final override;
94
96
97 private:
98 // Used during restore.
100
102
103 private:
104 IRtSystemNodeRef m_implementation;
105 };
106
107 template <typename T>
108 bool RtSystemNodeProxy::implements() const
109 {
110 return m_implementation->is<T>();
111 }
112
113 template <typename T>
114 RtSystemNode* RtSystemNode::findChildProxyFor() const
115 {
116 return findChildProxyFor<T>(this);
117 }
118
119 template <typename T>
121 {
122 if (root == nullptr)
123 return nullptr;
124
125 SystemNode* node =
126 root->findChild([](const SystemNode& child)
127 { return child.is<RtSystemNodeProxy>() && child.as<RtSystemNodeProxy>()->implements<T>(); });
128
129 return node != nullptr ? node->as<RtSystemNode>() : nullptr;
130 }
131}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXSENSOR_EXPORT
Interface as RtSystemNode for model specific implementations that is part of the system tree of lidar...
virtual RtSystemNodeRef createProxy()
Raytrace system node acting as a clone of model specific implementations.
RtSystemNodeProxy(IRtSystemNode *implementation)
Construct given an implementation of a raytrace system node.
A system node focused on raytracing.
System node is a separate step/operation in an execution tree representing a sensor (or such) in a se...
Definition: SystemNode.h:44
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
Base class providing referencing counted objects.
Definition: Referenced.h:120
bool is() const
Subclass test.
T * as()
Subclass casting.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
RtSystemNode * findChildProxyFor(const SystemNode *root)
A node performs a single operation, e.g., raycast, gaussian blur, merging etc.