AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
RaytraceComponents.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#define AGXSENSOR_POD_STRUCT( T, POD_T, POD_NAME )\
20 struct T : POD_T { T( const POD_T& value ) : POD_T( value ) {}; using POD_T::POD_NAME; using POD_T::operator=; }
21
22#define AGXSENSOR_SCALAR_STRUCT_T( N, T )\
23 struct N : ::agxSensor::RtScalar<T>\
24 {\
25 using RtScalar::Scalar;\
26 using RtScalar::operator=;\
27 using RtScalar::operator==;\
28 }
29
30#define AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( N, T, DEFAULT )\
31 struct N : ::agxSensor::RtScalar<T>\
32 {\
33 static constexpr T DefaultValue = T{ DEFAULT };\
34 using RtScalar::RtScalar;\
35 using RtScalar::operator=;\
36 using RtScalar::operator==;\
37 }
38
39namespace agxSensor
40{
42
43 template<typename T>
44 struct RtScalar
45 {
46 using value_type = T;
47
48 RtScalar() : value{}
49 {
50 }
51
52 explicit RtScalar( T value )
53 : value{ value }
54 {
55 }
56
57 template<typename T2>
58 RtScalar& operator=( T2 other )
59 {
60 this->value = (T)other;
61 return *this;
62 }
63
64 template<typename T2>
65 bool operator==( const T2& other ) const
66 {
67 return value == (T)other;
68 }
69
70 operator T() const
71 {
72 return value;
73 }
74
75 operator T& ( )
76 {
77 return value;
78 }
79
80 T value;
81 };
82
83
84 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtLambertianOpaqueReflectivity, float, 0.8f );
85
86 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtGgxOrenNayanRefractiveIndexReal, float, 1.4517f ); // SiO2 @ 905 nm
87 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtGgxOrenNayanRefractiveIndexImaginary, float, 0.0f );
88 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtGgxOrenNayanBeckmanRoughness, float, 0.3f );
89 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtGgxOrenNayanOrenNayarRoughness, float, 0.3f );
90 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtGgxOrenNayanDiffuseReflectance, float, 0.8f );
91
92 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtBrdfExplicitResolution, size_t, 1u );
93 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtBrdfExplicitValue, float, RtLambertianOpaqueReflectivity::DefaultValue );
94
95 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtAmbientRefractiveIndex, float, 1.000273f );
96 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtAmbientAttenuationCoefficient, float, 0.000402272f ); // Blickfeld fog @ V = 10 km
97 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtAmbientReturnProbabilityScaling, float, 1.58899e-05f );
98 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtAmbientReturnGammaDistributionShapeParameter, float, 9.5f );
99 AGXSENSOR_SCALAR_STRUCT_T_DEFAULT( RtAmbientReturnGammaDistributionScaleParameter, float, 0.52f );
100
102}
#define AGXSENSOR_SCALAR_STRUCT_T_DEFAULT(N, T, DEFAULT)
#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...