AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
agxOSG/Node.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#include <agxOSG/export.h>
20
21#include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
22#include <osg/Group>
23#include <osg/MatrixTransform>
24#include <osg/Texture2D>
26#include <agx/PopDisableWarnings.h> // End of disabled warnings.
27#include <agx/Vec3.h>
28#include <agx/AffineMatrix4x4.h>
29
30
31
32namespace agxOSG
33{
34
36 public:
37 Texture2D(osg::Texture2D *texture) : m_texture(texture) {}
38
39 operator osg::Texture2D* () { return m_texture.get(); }
40 operator const osg::Texture2D* () const { return m_texture.get(); }
41
42 osg::Texture2D *getTexture() { return m_texture.get(); }
43
44 protected:
45 virtual ~Texture2D() {}
46
47 osg::ref_ptr<osg::Texture2D> m_texture;
48 };
49
50
51 class GeometryNode;
52
53
54
55
56 class AGXOSG_EXPORT Transform : public osg::MatrixTransform
57 {
58 public:
60 void setName( const std::string& name );
61 bool addChild( osg::Node *child );
64 void setScale( const agx::Vec3& scale );
65 protected:
66 virtual ~Transform();
67
68 };
69}
#define AGXOSG_EXPORT
A node that can be associated with a collision geometry so that the transformation of this node is up...
Texture2D(osg::Texture2D *texture)
Definition agxOSG/Node.h:37
osg::ref_ptr< osg::Texture2D > m_texture
Definition agxOSG/Node.h:47
virtual ~Texture2D()
Definition agxOSG/Node.h:45
osg::Texture2D * getTexture()
Definition agxOSG/Node.h:42
bool addChild(osg::Node *child)
void setName(const std::string &name)
void setMatrix(const agx::AffineMatrix4x4 &m)
bool addChild(agxOSG::GeometryNode *child)
void setScale(const agx::Vec3 &scale)
virtual ~Transform()
Base class providing referencing counted objects.
Definition Referenced.h:120
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.