AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
DeformableShaderGeometry.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
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid 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
20
21namespace agxModel
22{
23 class DeformableObject;
24}
25
26namespace agxOSG
27{
32 {
33 public:
38
39 public:
45 virtual void setAlpha( float newAlpha );
46
47 protected:
55 const agxModel::DeformableObject* deformable,
56 float alpha );
57
58 virtual ~DeformableShaderGeometry() = default;
59
60 protected:
61 float alpha = 1.0f;
62
63 private:
64 const agxModel::DeformableObject* m_deformable;
65 };
66
71 {
77 DeformableEdgeShader( const agxModel::DeformableObject* deformable, float alpha = 1.0f );
78
82 virtual bool initialize() override;
83
88 virtual void update() override;
89
90 protected:
91 virtual ~DeformableEdgeShader() = default;
92 };
93
98 {
104 DeformableFaceShader( const agxModel::DeformableObject* deformable, float alpha = 0.1f );
105
109 virtual bool initialize() override;
110
115 virtual void update() override;
116
117 protected:
118 virtual ~DeformableFaceShader() = default;
119 };
120}
#define AGXOSG_EXPORT
Deformable object containing a tetrahedron mesh and a set of algorithms.
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: Space.h:63
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
uint16_t UInt16
Definition: Integer.h:31
Visualizes each edge of the deformable mesh, each in a unique color.
virtual void update() override
Called automatically when the deformable has changes.
virtual ~DeformableEdgeShader()=default
virtual bool initialize() override
Called automatically.
DeformableEdgeShader(const agxModel::DeformableObject *deformable, float alpha=1.0f)
Construct given deformable.
Visualizes each tetrahedron in the deformable mesh, each in a unique color.
virtual void update() override
Called automatically when the deformable has changes.
DeformableFaceShader(const agxModel::DeformableObject *deformable, float alpha=0.1f)
Construct given deformable.
virtual ~DeformableFaceShader()=default
virtual bool initialize() override
Called automatically.
Shader geometry but with a deformable object.
virtual void setAlpha(float newAlpha)
Set opaqueness [0, 1] to the color array if supported, i.e., a color vertex attribute array has been ...
const agxModel::DeformableObject & getDeformable() const
DeformableShaderGeometry(agx::UInt16 renderOrder, const agxModel::DeformableObject *deformable, float alpha)
Construct given render priority order and deformable object.
virtual ~DeformableShaderGeometry()=default
Empty geometry which can load vertex, geometry and fragment shaders, or create a custom osg::Program.