AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
RaytraceBrdfExplicitMaterial.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
19
20namespace agxSensor
21{
53 {
54 public:
55 static constexpr RtMaterialHandle::Type Type = RtMaterialHandle::Type::OPAQUE_BRDF_EXPLICIT;
56
57 public:
59
64
69
74
78 static RtBrdfExplicitMaterial get( const agxSDK::LinkedStructure* linkedStructure );
79
84
89
94
95 public:
97
102
106 size_t getResolutionPhiLight() const;
107
112
116 size_t getResolutionPhiView() const;
117
121 std::vector<float> getSamples() const;
122
134 bool reshape( size_t resolutionThetaLight, size_t resolutionPhiLight,
135 size_t resolutionThetaView, size_t resolutionPhiView );
136
146 RtBrdfExplicitMaterial setSamples( size_t resolutionThetaLight, size_t resolutionPhiLight,
147 size_t resolutionThetaView, size_t resolutionPhiView,
148 const std::vector<float>& samples );
149
162 bool setSamplesFromImageFile( const agx::String& filename, size_t resolutionThetaLight,
163 size_t resolutionPhiLight, size_t resolutionThetaView,
164 size_t resolutionPhiView );
165
166 public:
167 void store( agxStream::OutputArchive& out ) const;
169
170 private:
171 using RtSurfaceMaterial::RtSurfaceMaterial;
172 };
173}
#define AGXSENSOR_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
Base class for a shape.
Definition: Shape.h:58
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Opaque surface material reflecting the light according to an explicitly specified bidirectional refle...
static RtBrdfExplicitMaterial get(const agxSDK::LinkedStructure *linkedStructure)
RtBrdfExplicitMaterial(RtMaterialInstance instance)
static RtBrdfExplicitMaterial get(const agxTerrain::Terrain *terrain)
void store(agxStream::OutputArchive &out) const
void restore(agxStream::InputArchive &in)
static RtBrdfExplicitMaterial get(const agxCollide::Shape *shape)
bool reshape(size_t resolutionThetaLight, size_t resolutionPhiLight, size_t resolutionThetaView, size_t resolutionPhiView)
Attempt to reshape the sample array to the specified dimensions.
static RtBrdfExplicitMaterial get(const agxCollide::Geometry *geometry)
static RtBrdfExplicitMaterial get(const agxWire::Wire *wire)
static RtBrdfExplicitMaterial get(const agx::RigidBody *rb)
std::vector< float > getSamples() const
bool setSamplesFromImageFile(const agx::String &filename, size_t resolutionThetaLight, size_t resolutionPhiLight, size_t resolutionThetaView, size_t resolutionPhiView)
Attempt to read the BRDF samples from the specified luminance image file.
RtBrdfExplicitMaterial setSamples(size_t resolutionThetaLight, size_t resolutionPhiLight, size_t resolutionThetaView, size_t resolutionPhiView, const std::vector< float > &samples)
Set the explicit bidirectional reflection distribution function (BRDF) samples.
static RtBrdfExplicitMaterial create()
static RtBrdfExplicitMaterial get(const agxTerrain::TerrainPager *terrainPager)
Surface material of shape instances in the raytrace environment.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:57
A pager that will dynamically handle terrain tiles in a agxSDK::Simulation.
Definition: TerrainPager.h:100
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Definition: Terrain.h:92
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:62
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
Material instance in the raytrace environment, containing handle and type.