AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
DeformableHeightFieldRenderer.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
18#ifndef AGXOSG_DEFORMABLE_HEIGHTFIELD_RENDERER_H
19#define AGXOSG_DEFORMABLE_HEIGHTFIELD_RENDERER_H
20
21#include <agxOSG/GeometryNode.h>
25#include <agxOSG/utils.h>
26
28
29
30namespace agxOSG
31{
32 class Group;
33 class Node;
34 class GeometryNode;
35}
36
37namespace osg
38{
39 class HeightField;
40 class Geometry;
41}
43
44namespace agxOSG
45{
48 {
49 public:
50
56 DeformableHeightFieldRenderer( agxModel::HeightFieldDeformer* heightFieldDeformer, osg::Group* root );
57
59 virtual void last(const agx::TimeStamp& );
60
62 agxOSG::GeometryNode* getHeightFieldNode();
63
66
68 void setAsDirty();
69
71 bool isValid() const;
72
73 protected:
75
76 private:
77 osg::observer_ptr<osg::Group> m_root;
78 agxModel::HeightFieldDeformerRef m_heightFieldDeformer;
79 osg::observer_ptr<agxOSG::GeometryNode> m_heightFieldNode;
80 osg::observer_ptr<osg::HeightField> m_renderHeightField;
81 bool m_valid;
82 };
83
84
85
86 // Implementations
87
88 AGX_FORCE_INLINE DeformableHeightFieldRenderer::~DeformableHeightFieldRenderer( )
89 {
90 }
91
92
93 AGX_FORCE_INLINE agxOSG::GeometryNode* DeformableHeightFieldRenderer::getHeightFieldNode()
94 {
95 return m_heightFieldNode.get();
96 }
97
98
99 AGX_FORCE_INLINE bool DeformableHeightFieldRenderer::isValid() const
100 {
101 return m_valid;
102 }
103
104}
105
106#endif
#define AGXOSG_EXPORT
HeightFieldDeformer contains a agxCollide::HeightField.
An osg-renderer for a deformable height field.
virtual void last(const agx::TimeStamp &)
Overloading inherited method from StepEventListener.
DeformableHeightFieldRenderer(agxModel::HeightFieldDeformer *heightFieldDeformer, osg::Group *root)
Constructor for DeformableHeightFieldRenderer.
bool forceWireFrameRendering()
Force wire frame rendering of deformable height field.
void setAsDirty()
Set the height field render able as dirty to trigger rendering update.
A node that can be associated with a collision geometry so that the transformation of this node is up...
Definition: GeometryNode.h:42
Derive from this class to implement a listener for simulation step events.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
#define AGX_FORCE_INLINE
Definition: macros.h:58
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
agx::Real TimeStamp
Definition: TimeStamp.h:26