AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
RaytraceSurfaceMaterial.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
19
20#include <agxTerrain/Terrain.h>
22
23#include <agxWire/Wire.h>
24
26
27namespace agxSensor
28{
33 {
34 public:
41 static void set( agxCollide::Shape* shape, RtSurfaceMaterial surfaceMaterial );
42
50 static void set( agxCollide::Geometry* geometry, RtSurfaceMaterial surfaceMaterial );
51
59 static void set( agx::RigidBody* rb, RtSurfaceMaterial surfaceMaterial );
60
67 static void set( agxSDK::LinkedStructure* linkedStructure, RtSurfaceMaterial surfaceMaterial );
68
74 static void set( agxWire::Wire* wire, RtSurfaceMaterial surfaceMaterial );
75
82 static void set( agxTerrain::Terrain* terrain, RtSurfaceMaterial surfaceMaterial );
83
90 static void set( agxTerrain::TerrainPager* terrainPager, RtSurfaceMaterial surfaceMaterial );
91
95 template<typename T, typename InstanceT>
96 static T getAs( const InstanceT* instance );
97
98 public:
105
113
121
128
134
141
148
149 template<typename T>
150 RtSurfaceMaterial assignTo( T* instance ) const
151 {
152 set( instance, *this );
153 return *this;
154 }
155
156 protected:
157 using RtMaterial::RtMaterial;
158 };
159
160 template<typename T, typename InstanceT>
161 T RtSurfaceMaterial::getAs( const InstanceT* instance )
162 {
163 return T{ getRtMaterial( instance ) };
164 }
165}
#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 ...
Base type for all surface, and transmission, materials used in raytracing.
Surface material of shape instances in the raytrace environment.
static void set(agxSDK::LinkedStructure *linkedStructure, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given linked structure (agxCable::Cable,...
RtSurfaceMaterial assignTo(agxTerrain::TerrainPager *terrainPager) const
Assign/associate a surface material to the given terrain (pager).
static void set(agxTerrain::TerrainPager *terrainPager, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given terrain (pager).
static void set(agxCollide::Geometry *geometry, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given geometry.
RtSurfaceMaterial assignTo(agxTerrain::Terrain *terrain) const
Assign/associate a surface material to the given terrain.
RtSurfaceMaterial assignTo(agx::RigidBody *rb) const
Assign/associate a surface material to the given rigid body.
static void set(agxCollide::Shape *shape, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given shape.
static void set(agxWire::Wire *wire, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given wire.
RtSurfaceMaterial assignTo(agxSDK::LinkedStructure *linkedStructure) const
Assign/associate a surface material to the given linked structure (agxCable::Cable,...
RtSurfaceMaterial assignTo(agxWire::Wire *wire) const
Assign/associate a surface material to the given wire.
static void set(agxTerrain::Terrain *terrain, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given terrain.
RtSurfaceMaterial assignTo(agxCollide::Shape *shape) const
Assign/associate a surface material to the given shape.
static void set(agx::RigidBody *rb, RtSurfaceMaterial surfaceMaterial)
Assign/associate a surface material to the given rigid body.
static T getAs(const InstanceT *instance)
RtSurfaceMaterial assignTo(agxCollide::Geometry *geometry) const
Assign/associate a surface material to the given geometry.
RtSurfaceMaterial assignTo(T *instance) const
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...