VR-Vantage API Documentation
DtOsgWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgWidget.h,v $ $Revision: 1.24 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 #include <vrvOsg/vrvOsg.h>
15 #include <vrvCore/DtWidget.h>
16 #include <osg/ref_ptr>
17 #include <osg/Texture>
18 
19 namespace osg
20 {
21  class Texture;
22 }
23 
24 namespace makVrv
25 {
26  class DtSprite;
27 
31  {
32  public:
33 
35  DtOsgWidget(DtDe& de, DtUniqueID id);
36 
38  virtual ~DtOsgWidget();
39 
41  virtual void setParentId( DtUniqueID id);
42 
44  virtual void setOverlay(unsigned int layer);
45 
47  unsigned int overlay() const;
48 
50  virtual void setOrderGroup(unsigned int group);
51 
53  virtual unsigned int orderGroup() const;
54 
56  virtual void setPosition(float x,float y,float z,float w = 0);
57 
59  virtual void setBackgroundImage(const std::string& filename);
60 
62  virtual void setBackgroundImage(const std::string& filename,
63  float left,float right,float bottom,float top);
64 
66  virtual void setColor(float r,float g,float b, float a);
67 
70  virtual void setOrigin(float originX, float originY);
71 
73  virtual void setSize(float w, float h);
74 
76  virtual void setPadding(float paddingX, float paddingY);
77 
79  virtual void setModelDefinition(const std::string& str);
80 
82  virtual void setEventsEnabled(bool enabled);
83 
85  virtual void setVisible(bool visible);
86 
87  protected:
88 
89  osg::ref_ptr<osg::Texture> myTexture;
91  unsigned int myLayer;
92  unsigned int myGroup;
93  };
94 }


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)