AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
RaytraceInstanceData.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
19#include <agx/Referenced.h>
20
21namespace agxSensor
22{
24
25 struct RtShapeInstanceHandle;
26
27 AGX_DECLARE_POINTER_TYPES(RtInstanceData);
28
29 class AGXSENSOR_EXPORT RtInstanceData : public agx::Referenced
30 {
31 public:
32 RtInstanceData() = default;
33 RtInstanceData( RtMaterialInstance materialInstance,
34 RtEntityId entityId = NullRtEntityId );
35
36 void setInstanceHandle( RtShapeInstanceHandle* instanceHandle );
37 RtShapeInstanceHandle* getInstanceHandle() const;
38
39 void setMaterial( RtMaterialInstance materialInstance );
40 RtMaterialInstance getMaterial() const;
41
42 RtEntityId getOrCreateEntityId();
43
44 void setEntityId( RtEntityId id );
45 RtEntityId getEntityId() const;
46 void destroyEntityId();
47
48 protected:
49 virtual ~RtInstanceData();
50
51 private:
52 RtShapeInstanceHandle* m_instanceHandle = nullptr;
53 RtMaterialInstance m_materialInstance{};
54 RtEntityId m_entityId = NullRtEntityId;
55 };
56
58}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSENSOR_EXPORT
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
constexpr RtEntityId NullRtEntityId
Null entity id.
RtEntityId
Entity id > 0 to access user data given raytrace results including ENTITY_ID_I32.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.