![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtDrawModelInstance.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvOsg/vrvOsg.h> 00015 #include <vrvOsg/DtOsgModelInstance.h> 00016 #include <osg/Group> 00017 #include <osg/Geode> 00018 #include <osg/Geometry> 00019 #include <osgText/Text> 00020 00021 namespace makVrv 00022 { 00023 class DtDe; 00024 00027 class DT_DLL_VRVOSG DtDrawModelInstance : public DtOsgModelInstance 00028 { 00029 public: 00031 DtDrawModelInstance(DtDe& de); 00032 00034 ~DtDrawModelInstance(); 00035 00038 virtual void addToConnector( DtOsgSceneConnector* connector ); 00039 00042 virtual bool removeFromConnector( DtOsgSceneConnector* connector ); 00043 00045 virtual void drawLine(const osg::Vec4& color, const double lineWidth); 00046 00047 virtual void setPosition( int vtx, const DtVector& position ); 00048 00050 virtual void setVisible (bool isVisible) {} 00051 00052 protected: 00053 00055 void createText( const std::string& fontName, const osg::Vec4& color, double size ); 00056 00058 virtual void resetGeode(); 00059 00060 protected: 00061 00062 osg::ref_ptr<osg::Group> myGroup; 00063 osg::ref_ptr<osg::Geode> myShapeGeode; 00064 osg::ref_ptr<osg::Geometry> myGeometry; 00065 osg::ref_ptr<osg::Vec3Array> myPoints; 00066 00067 }; 00068 }