28 #pragma warning(disable : 4251)
33 struct LidarRayPatternStorage;
34 struct LidarRayPatternInterval;
89 virtual
RtNode* createNode() override;
92 virtual
void store(
agxStream::OutputArchive& out) const override;
93 virtual
void restore(
agxStream::InputArchive& in) override;
95 void store(
agxStream::OutputArchive& out,
bool storeTransforms) const;
96 void restore(
agxStream::InputArchive& in,
bool restoreTransforms);
99 template <typename ContainerT>
100 static
void writeTransforms(
agxStream::OutputArchive& out, const ContainerT& container);
102 template <typename ContainerT>
103 static
void readTransforms(
agxStream::InputArchive& in, ContainerT& container);
106 LidarRayPatternStorage* getStorage();
107 const LidarRayPatternStorage* getStorage() const;
112 void updateRayTransforms(
RtNode* node,
agx::Real dt);
115 std::shared_ptr<LidarRayPatternStorage> m_storage;
118 template <typename ContainerT>
121 const size_t numRayTransforms = container.size();
124 out.beginSection(
"rayTransforms");
125 out.write(container.data(),
sizeof(
typename ContainerT::value_type) * numRayTransforms);
126 out.endSection(
"rayTransforms");
129 template <
typename ContainerT>
132 size_t numRayTransforms = 0u;
135 container.resize(numRayTransforms);
136 in.beginSection(
"rayTransforms");
137 in.read(container.data(),
sizeof(
typename ContainerT::value_type) * numRayTransforms);
138 in.endSection(
"rayTransforms");
#define AGX_DECLARE_POINTER_TYPES(type)
Interface as RtSystemNode for model specific implementations that is part of the system tree of lidar...
Base of lidar ray pattern implementations responsible of providing a set of ray transforms (ray along...
virtual size_t getNumRays() const
virtual ~LidarRayPatternGenerator()=default
Destructor.
void setRayTransforms(const agx::AffineMatrix4x4Vector &rayTransforms)
Assign all, locally possible, ray transforms.
virtual LidarRayPatternInterval getNextInterval(agx::Real dt)=0
Provides the active ray index range for a given step length dt.
void applyTransform(const agx::AffineMatrix4x4 &rhs)
Apply delta transform to all current ray transforms.
LidarRayPatternGenerator()
Default constructor.
Raytrace system node acting as a clone of model specific implementations.
Vector containing 'raw' data.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Ray pattern interval (index range) with a start index and size.
LidarRayPatternInterval()=default
Default interval of zero size and start index 0.
LidarRayPatternInterval(agx::Int32 first, agx::Int32 numRays)
Construct given start index first and number of size numRays from first.
A node performs a single operation, e.g., raycast, gaussian blur, merging etc.