AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
CompositeRenderer.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#ifndef AGXOSG_COMPOSITERENDERER_H
18#define AGXOSG_COMPOSITERENDERER_H
19
21#include <agx/config.h>
22
23#if AGX_USE_COMPOSITE()
24
26#include <agxWire/Composite/MultiWire.h>
27
28namespace agxOSG
29{
30 class AGXOSG_EXPORT CompositeRenderer : public agxSDK::StepEventListener
31 {
32 public:
38 CompositeRenderer( agxWire::Composite::MultiWire* wire, osg::Group* root );
39
40 void setNumSegmentsPerUnitLength( agx::Real numSegmentsPerUnitLength );
41 void setColor( const agx::Vec4f& color );
42
43 protected:
44 virtual ~CompositeRenderer() {}
45
46 virtual void post(const agx::TimeStamp&);
47 virtual void removeNotification();
48
49 protected:
50 void update();
51
53 agxWire::Composite::MultiWireRef m_wire;
54 osg::ref_ptr< osg::Group > m_root;
55
56 agx::Real m_segmentsPerUnitLength;
57 agx::Vec4f m_color;
58 };
59
60 typedef agx::ref_ptr< CompositeRenderer > CompositeRendererRef;
61}
62
63#endif
64#endif // AGX_USE_COMPOSITE
#define AGXOSG_EXPORT
Derive from this class to implement a listener for simulation step events.
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
Templated vector class.
Definition: agx/Vector.h:53
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
double Real
Definition: Real.h:41
agx::Real TimeStamp
Definition: TimeStamp.h:26