![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtOsgSimpleModelInstance.h,v $ $Revision: 1.17 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvOsg/vrvOsg.h> 00015 #include <vrvOsg/DtOsgModelInstance.h> 00016 #include <osg/ref_ptr> 00017 #include <osg/Switch> 00018 #include <osg/MatrixTransform> 00019 #include <osg/PositionAttitudeTransform> 00020 00021 namespace makVrv 00022 { 00023 class DtOsgRenderer; 00024 00027 class DT_DLL_VRVOSG DtOsgSimpleModelInstance : public DtOsgModelInstance 00028 { 00029 public: 00030 00032 DtOsgSimpleModelInstance(DtDe& de); 00033 00035 DtOsgSimpleModelInstance(DtDe& de, osg::Node* rootNode); 00036 00038 virtual ~DtOsgSimpleModelInstance(); 00039 00042 virtual bool realize(DtModelDefinition& definition); 00043 00045 virtual bool groundClampable(); 00046 00048 virtual bool alwaysUpright(); 00049 00051 virtual void setVisible(bool isVisible) {} 00052 00054 virtual void setVisibleViaSwitch(bool isVisible) {}; 00055 00056 protected: 00057 00059 osg::ref_ptr<osg::Node> loadNodeFile(DtModelDefinition& definition); 00060 00061 protected: 00062 00063 bool myGroundClampable; 00064 bool myAlwaysUpright; 00065 float myScale; 00066 00067 }; 00068 00071 class DT_DLL_VRVOSG DtOsgSimpleModelInstanceCreator : 00072 public DtModelInstanceCreator 00073 { 00074 public: 00075 00077 static void registerCreator(DtDe& de); 00078 00080 virtual ~DtOsgSimpleModelInstanceCreator(); 00081 00083 virtual DtModelInstance* create(DtDe& de); 00084 00085 protected: 00086 00087 DtOsgSimpleModelInstanceCreator(); 00088 }; 00089 }