AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
TriaxialSignalNoiseNode.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 <random>
20
21namespace agxSensor
22{
26
32 {
33 public:
39
44 void setSeed( agx::UInt32 seed );
45
50
52
53 public:
54 virtual TriaxialSignalSystemNodeRef createTriaxialNodeProxy() override;
55 virtual void synchronize( SystemNodeProxy& proxy, const CallbackData& data ) override;
56 virtual void result( SystemNodeProxy& proxy, const CallbackData& data ) override;
57
59 virtual void store( agxStream::OutputArchive& out ) const override;
60 virtual void restore( agxStream::InputArchive& in ) override;
61
63
64 private:
65 agx::UInt32 m_seed;
66 bool m_seedChanged;
67 };
68
74 {
75 public:
76 typedef std::mt19937_64 RandomGenerator;
77 using result_type = RandomGenerator::result_type;
78
79 public:
83 inline static constexpr RandomGenerator::result_type min()
84 {
85 return RandomGenerator::min();
86 }
87
91 inline static constexpr RandomGenerator::result_type max()
92 {
93 return RandomGenerator::max();
94 }
95
96 public:
102
107 void setSeed( agx::UInt32 seed );
108
113
117 RandomGenerator::result_type operator()();
118
120
121 public:
123
124 virtual void cleanup() override;
125
127
129
130 private:
131 agx::UInt32 m_seed;
132 agx::UInt64 m_generatedCount;
133 RandomGenerator m_generator;
134 };
135}
#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
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: agx/Vector.h:34
Interface for implementation details for triaxial signal system nodes carrying a random noise generat...
ITriaxialSignalNoiseNode(agx::UInt32 seed=67089u)
Construct a trixaial signal noise node implementation.
void setSeed(agx::UInt32 seed)
Set the noise seed.
Interface for implementation details for system nodes carrying a triaxial signal.
Proxy system node, representing an instance of an ISystemNodeProxy in the system graph.
A system node in the sensor processing tree carrying a triaxial signal, a random noise generator and ...
void setSeed(agx::UInt32 seed)
Set the noise seed.
static constexpr RandomGenerator::result_type max()
RandomGenerator::result_type operator()()
RandomGenerator::result_type result_type
TriaxialSignalNoiseNode(ITriaxialSignalNoiseNode *implementation)
Construct a triaxial signal noise node instance with the given implementation.
static constexpr RandomGenerator::result_type min()
A system node in the sensor processing tree carrying a triaxial signal and an implementation for how ...
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
#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...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:32