![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtGlStudioDrawable.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <vrvGlStudioShared/DtGlStudioShared.h> 00016 #include <vrvGlStudioShared/DtOsgGlStudioCockpit.h> 00017 00018 #include <vrvCore/DtUniqueID.h> 00019 #include <osg/Drawable> 00020 00021 00022 //forward defs 00023 class DtString; 00024 00025 namespace osgGA 00026 { 00027 class GUIEventAdapter; 00028 } 00029 00030 namespace osgViewer 00031 { 00032 class Viewer; 00033 } 00034 namespace disti 00035 { 00036 class ComponentBase; 00037 class DisplayEvent; 00038 } 00039 00040 namespace makVrv 00041 { 00042 00043 class DtDe; 00044 class DtMouseEvent; 00045 00048 class DT_DLL_VRVGLSTUDIOSHARED DtGlStudioDrawable : public osg::Drawable 00049 { 00050 public: 00052 DtGlStudioDrawable(); 00053 00056 DtGlStudioDrawable(disti::ComponentBase *component); 00057 00060 DtGlStudioDrawable(const DtGlStudioDrawable& other, 00061 const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); 00062 00064 virtual ~DtGlStudioDrawable(); 00065 00067 virtual osg::Object* cloneType() const; 00068 virtual osg::Object* clone(const osg::CopyOp& copyop) const; 00069 virtual bool isSameKindAs(const osg::Object* obj) const; 00070 virtual const char* libraryName() const; 00071 virtual const char* className() const; 00072 00074 virtual bool loadLiveComponent(const std::string& fileName, const std::string& className); 00075 00077 virtual void destroyComponent(); 00078 00082 virtual void setComponent(disti::ComponentBase* comp); 00083 00086 virtual disti::ComponentBase* component(); 00087 00089 virtual bool handleMouseInput(const DtMouseEvent& ea); 00090 00092 virtual osg::BoundingBox computeBound() const; 00093 00095 virtual bool supports(osg::PrimitiveFunctor&) const; 00096 00102 virtual void accept(osg::PrimitiveFunctor& functor) const; 00103 00106 virtual void update(osg::NodeVisitor* visitor, osg::Drawable* drawable); 00107 00108 virtual bool cull(osg::NodeVisitor* visitor, osg::Drawable* drawable, osg::State* state=NULL) const; 00109 00110 virtual void drawImplementation(osg::RenderInfo& state) const; 00111 00112 virtual void setProperty(const std::string& prop, const std::string& val); 00113 00114 virtual void setDe(DtDe* de); 00115 virtual void setCockpitObject(DtOsgGlStudioCockpit* cockpitObject); 00116 00117 protected: 00118 DtOsgGlStudioCockpit* myCockpitObject; 00119 disti::ComponentBase* myComponent; 00120 DtDe* myDe; 00121 }; 00122 00123 } //makVrv::