OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Cursor.h
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>
19 #include <osgPresentation/Export>
20 
21 namespace osgPresentation {
22 
24 {
25  public:
26 
27  Cursor();
28 
29  Cursor(const std::string& filename, float size);
30 
32  Cursor(const Cursor& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
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 
48  void initializeCursor();
49  void updatePosition();
50 
51  std::string _filename;
52  float _size;
53 
55 
57 
60 
61 };
62 
63 }
64 
65 #endif
const std::string & getFilename() const
Definition: Cursor.h:37
float getSize() const
Definition: Cursor.h:40
#define OSGPRESENTATION_EXPORT
Definition: Export.h:38
osg::observer_ptr< osg::Camera > _camera
Definition: Cursor.h:59
osg::ref_ptr< osg::AutoTransform > _transform
Definition: Cursor.h:56
META_Node(osgPresentation, Cursor) void setFilename(const std
Definition: Cursor.h:34
typedef void(GL_APIENTRY *GLTexImage3DProc)(GLenum target
std::string _filename
Definition: Cursor.h:51
void setSize(float size)
Definition: Cursor.h:39
osg::Vec2 _cursorXY
Definition: Cursor.h:58