OpenSceneGraph 3.6.5
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
Vec2f Vec2
Definition Vec2:21
The osgPresentation library is a NodeKit that extends the core scene graph to support 3D scene graph ...
Definition AnimationMaterial:26
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
General group node which maintains a list of children.
Definition Group:29
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
float _size
Definition Cursor:52
Cursor(const std::string &filename, float size)
virtual void traverse(osg::NodeVisitor &nv)
Traverse downwards : calls children's accept method with NodeVisitor.
bool _cursorDirty
Definition Cursor:54
osg::Vec2 _cursorXY
Definition Cursor:58
Cursor(const Cursor &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs 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
#define OSGPRESENTATION_EXPORT
Definition Export:38

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.