openscenegraph
Cursor
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGPRESENTATION_CURSOR
15#define OSGPRESENTATION_CURSOR 1
16
17#include <osg/AutoTransform>
18#include <osg/Camera>
20
21namespace osgPresentation {
22
24{
25 public:
26
28
29 Cursor(const std::string& filename, float size);
30
33
35
36 void setFilename(const std::string& filename) { _filename = filename; _cursorDirty=true; }
37 const std::string& getFilename() const { return _filename; }
38
39 void setSize(float size) { _size = size; _cursorDirty=true; }
40 float getSize() const { return _size; }
41
42 virtual void traverse(osg::NodeVisitor& nv);
43
44 protected:
45
46 virtual ~Cursor();
47
50
51 std::string _filename;
52 float _size;
53
55
57
60
61};
62
63}
64
65#endif
Definition Cursor:24
float _size
Definition Cursor:52
Cursor(const std::string &filename, float size)
virtual void traverse(osg::NodeVisitor &nv)
bool _cursorDirty
Definition Cursor:54
osg::Vec2 _cursorXY
Definition Cursor:58
Cursor(const Cursor &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osg::observer_ptr< osg::Camera > _camera
Definition Cursor:59
META_Node(osgPresentation, Cursor) void setFilename(const std
Definition Cursor:34
void setSize(float size)
Definition Cursor:39
std::string _filename
Definition Cursor:51
const std::string & getFilename() const
Definition Cursor:37
float getSize() const
Definition Cursor:40
osg::ref_ptr< osg::AutoTransform > _transform
Definition Cursor:56
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition Group:29
Definition NodeVisitor:82
Definition Vec2f:29
Definition observer_ptr:39
Definition ref_ptr:32
Definition AnimationMaterial:26
#define OSGPRESENTATION_EXPORT
Definition osgPresentation/Export:38