![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: CircleVisualHandler.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00009 //\file CircleVisualHandler.h 00010 //\ingroup vrfGuiCore 00011 //\brief Contains makVrv::CircleVisualHandler class. A simple handler 00012 //\that creates ellipse agent used to 00013 //\draw an ellipse based around the selected entity's location. 00014 #pragma once 00015 00016 #include <vrvCore/DtUniqueID.h> 00017 00018 #include <vlutil/vlString.h> 00019 #include <matrix/vlVector.h> 00020 #include <string> 00021 00022 namespace makVrv 00023 { 00024 class DtDe; 00025 class DtBaseConnection; 00026 class DtStateListener; 00027 class DtOverlayEllipseArcModelAgent; 00028 class DtEllipsoidArcModelAgent; 00029 class DtSceneObjectAgent; 00030 } 00031 00032 class Circle; 00033 00034 namespace makVrfUnitStatusExample 00035 { 00036 class CircleVisualHandler 00037 { 00038 public: 00039 CircleVisualHandler(makVrv::DtDe&, makVrv::DtUniqueID id); 00040 virtual ~CircleVisualHandler(); 00041 00042 //\brief Called to update the circle with latest position 00043 virtual void update(const DtVector & geoc); 00044 00045 //Will depend on the model set in use. 00046 //The model set is an interger value that describes the current observer model set. 00047 //0-4 will correspond to 3D versions so we will want to use the 3D version of the ellipse 00048 //otherwise we use the 2D version 00049 virtual void update2D(int modelSet); 00050 virtual void update3D(int modelSet); 00051 static std::string handlerType(); 00052 virtual void init(); 00053 00054 protected: 00055 makVrv::DtDe& myDe; 00056 makVrv::DtUniqueID myUniqueId; 00057 //This is the base scene object 00058 makVrv::DtSceneObjectAgent * mySceneObject; 00059 //This is the agent we attach to the scene object to actually draw the object in the scene 00060 //Whether we use 2D or 3D will depend on what model set we are using 00061 makVrv::DtOverlayEllipseArcModelAgent* my2DEllipseAgent; 00062 makVrv::DtEllipsoidArcModelAgent* my3DEllipseAgent; 00063 //Need to make sure we recreate 3dEllipse agent if we switch observer modes 00064 int my3DModelSet; 00065 makVrv::DtBaseConnection* mySimulation; 00066 }; 00067 00068 class CircleVisualHandlerCreator 00069 { 00070 public: 00071 virtual ~CircleVisualHandlerCreator(); 00072 00073 virtual CircleVisualHandler* create(makVrv::DtDe&, makVrv::DtUniqueID); 00074 }; 00075 }