AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
agxOSG/HeightField.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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
20#include <agxOSG/Node.h>
21
22#include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
23#include <osg/Drawable>
24#include <osgViewer/Viewer>
25#include <osgSim/ColorRange>
26#include <osgSim/ScalarsToColors>
27#include <osg/Version>
28#include <agx/PopDisableWarnings.h> // End of disabled warnings.
30
31namespace agxOSG
32{
34
39 class AGXOSG_EXPORT HeightField : public osg::Geode
40 {
41
42 public:
49
54
55
56 osg::Geometry *getGeometry();
57 const osg::Geometry *getGeometry() const ;
58
59
60 protected:
61 bool createVisual(const agxCollide::HeightField *heightField);
62 virtual void traverse(osg::NodeVisitor& nv);
63
64 virtual ~HeightField();
65
66 protected:
68 osg::ref_ptr<osg::Geometry> m_geometry;
69 osg::StateSet* m_stateSet;
71 };
72}
73
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXOSG_EXPORT
A HeightField is a collision shape that can be created from a grid structure, like an image.
Rendering class for the agxCollide::HeightField The visual representation will be updated if the Heig...
agxCollide::HeightFieldConstObserver m_heightField
osg::StateSet * m_stateSet
virtual void traverse(osg::NodeVisitor &nv)
osg::ref_ptr< osg::Geometry > m_geometry
HeightField(const agxCollide::HeightField *heightField)
Construct a renderable height field from the specified collision HeightField.
const osg::Geometry * getGeometry() const
osg::Geometry * getGeometry()
bool createVisual(const agxCollide::HeightField *heightField)
const agxCollide::HeightField * getHeightField() const
virtual ~HeightField()
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
uint32_t UInt32
Definition Integer.h:32