![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtOsgWidget.h,v $ $Revision: 1.24 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvOsg/vrvOsg.h> 00015 #include <vrvCore/DtWidget.h> 00016 #include <osg/ref_ptr> 00017 #include <osg/Texture> 00018 00019 namespace osg 00020 { 00021 class Texture; 00022 } 00023 00024 namespace makVrv 00025 { 00026 class DtSprite; 00027 00030 class DT_DLL_VRVOSG DtOsgWidget : public DtWidget 00031 { 00032 public: 00033 00035 DtOsgWidget(DtDe& de, DtUniqueID id); 00036 00038 virtual ~DtOsgWidget(); 00039 00041 virtual void setParentId( DtUniqueID id); 00042 00044 virtual void setOverlay(unsigned int layer); 00045 00047 unsigned int overlay() const; 00048 00050 virtual void setOrderGroup(unsigned int group); 00051 00053 virtual unsigned int orderGroup() const; 00054 00056 virtual void setPosition(float x,float y,float z,float w = 0); 00057 00059 virtual void setBackgroundImage(const std::string& filename); 00060 00062 virtual void setBackgroundImage(const std::string& filename, 00063 float left,float right,float bottom,float top); 00064 00066 virtual void setColor(float r,float g,float b, float a); 00067 00070 virtual void setOrigin(float originX, float originY); 00071 00073 virtual void setSize(float w, float h); 00074 00076 virtual void setPadding(float paddingX, float paddingY); 00077 00079 virtual void setModelDefinition(const std::string& str); 00080 00082 virtual void setEventsEnabled(bool enabled); 00083 00085 virtual void setVisible(bool visible); 00086 00087 protected: 00088 00089 osg::ref_ptr<osg::Texture> myTexture; 00090 DtSprite* mySprite; 00091 unsigned int myLayer; 00092 unsigned int myGroup; 00093 }; 00094 }