VR-Forces 4.0.4 Class Documentation
include/vrvCore/Dt3DLineStateVisualizer.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2012 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvCore/vrvCore.h>
00013 #include <vrvCore/DtRemoteGraphicVisualizerAttributes.h>
00014 #include <vrvCore/DtSceneObjectVisualizer.h>
00015 #include <matrix/vlVector.h>
00016 #include <vrvCore/Dt3DSegmentedLineModelAgent.hpp>
00017 #include <vrvCore/DtVisibilityAdapter.h>
00018 
00019 namespace makVrv
00020 {
00021    class DtAttachableUpdaterAgent;
00022 
00025    class DT_DLL_VRVCORE Dt3DLineStateVisualizer : public DtSceneObjectVisualizer,
00026       public DtRemoteGraphicVisualizerAttributes
00027    {
00028    public:
00030       Dt3DLineStateVisualizer(DtBaseConnection& simulation, 
00031          DtStateListener& listener, int modelSet);
00032 
00034       virtual ~Dt3DLineStateVisualizer();
00035 
00037       virtual void setStartLocation(const DtVector& pos);
00038 
00040       virtual void setEndLocation(const DtVector& endpoint);
00041 
00043       virtual void setFlashing(bool flashing);
00044 
00046       virtual void setStyleSegments(const std::vector<double>& segmentPercentages);
00047 
00049       virtual void setSegmentColor(unsigned int segmentIndex, float r,
00050          float g, float b, float a);
00051 
00053       virtual void setSegmentLightningStyle(unsigned int segmentIndex,
00054          bool enableLightningStyle);
00055 
00057       virtual void setSegmentStartArrow(unsigned int segmentIndex,
00058          bool enableArrow);
00059 
00061       virtual void setSegmentEndArrow(unsigned int segmentIndex,
00062          bool enableArrow);
00063 
00065       virtual void setSegmentStipplePattern(unsigned int segmentIndex,
00066          unsigned int stipplePattern);
00067 
00069       virtual void setSegmentWidth(unsigned int segmentIndex,double width);
00070 
00073       virtual void setStopOnTerrainIntersection(bool enabled);
00074 
00080       virtual void setAttached(DtUniqueID id, int vtx, double percentage);
00081 
00083       virtual void setHostId(const std::string& id, int vtx, double percentage);
00084 
00086       virtual void setOffset(const DtVector& offset);
00087 
00089       virtual void setProjected(bool projected);
00090 
00092       virtual const DtStateVisualizer::TypeInfo& typeInfo() const;
00093 
00095       static const DtStateVisualizer::TypeInfo& theTypeInfo();
00096 
00097    protected:
00101       virtual void setVisible(bool yesNo);
00102 
00104       virtual void createModelAgents();
00105 
00113       virtual void destroyModelAgents();
00114 
00116       virtual void setModelDefinitionForAgents();
00117 
00118    protected:
00119       Dt3DSegmentedLineModelAgent* myLineModelAgent;
00120       DtAttachableUpdaterAgent* myUpdaterAgent;
00121       DtVisibilityAdapter<Dt3DSegmentedLineModelAgent>* myVisibilityAdapter;
00122       bool myVertex0Attached;
00123       bool myVertex1Attached;
00124    };
00125 
00126    typedef DtStateVisualizerCreatorTemplate<Dt3DLineStateVisualizer>
00127       Dt3DLineStateVisualizerCreator;
00128 }
00129 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)