VR-Forces 4.0.4 Class Documentation
include/vrvDrawControl/DtLine3DObject.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtLine3DObject.h,v $ $Revision: 1.6 $ $State: Exp $
00007 ******************************************************************************/
00008 #pragma once
00009 
00013 
00014 #include <vector>
00015 
00016 #include <vlutil/vlString.h>
00017 
00018 #include <vrvDrawControl/vrvDrawControlDefines.h>
00019 
00020 #include <vrvDrawControl/Dt3DTwoPositionedObject.h>
00021 #include <vrvDrawControl/DtLineObjectInterface.h>
00022 #include <vrvDrawControl/DtVdc3DAttachPoint.h>
00023 #include <vrvDrawControl/DtVdcLineSegment.h>
00024 
00025 #include <vrvDrawControl/DtVdcColor.h>
00026 
00027 #include <vl/envLine.h>
00028 #include <vrfExtObjects/3dGraphicalObjectLineStateRecord.h>
00029 
00030 namespace vrvControlToolkit
00031 {
00032 
00040    class DT_DLL_VRVDRAWCONTROL DtLine3DObject : public Dt3DTwoPositionedObject, 
00041       public DtLineObjectInterface
00042    {
00043    public:
00087       DtLine3DObject(DtExerciseConn* exConn, unsigned id, const DtVdc3DAttachPoint& startAttachment, 
00088          const DtVdc3DAttachPoint& endAttachment, int numSegments=1, 
00089          const DtVector& offset = DtVector::zero(), 
00090          DtVdcColor color = DtVdcColor::DtVdcWhite, 
00091          DtVdcLineSegment::DtVdcSegmentStyle lineStyle = 
00092          DtVdcLineSegment::DtVdcSegmentStyleStraight,
00093          DtVdcLineSegment::DtVdcSegmentArrowStyle arrowStyle = 
00094          DtVdcLineSegment::DtVdcSegmentArrowStyleNoArrow, 
00095          unsigned thickness=1, unsigned pattern=0xffffff, bool flashing = false,
00096          bool checkLos = false, bool projected = false);
00097 
00098 
00099       virtual ~DtLine3DObject();
00100 
00101    private:
00106       DtLine3DObject();
00107 
00111       DtLine3DObject(const DtLine3DObject& orig);
00112 
00116       DtLine3DObject& operator=(const DtLine3DObject& rhs);
00117 
00118 
00119    public:
00125       virtual const DtVdc3DAttachPoint& startAttachment() const;
00126 
00132       virtual void setStartAttachment(const DtVdc3DAttachPoint& startAttachment);
00133 
00139       virtual const DtVdc3DAttachPoint& endAttachment() const;
00140 
00146       virtual void setEndAttachment(const DtVdc3DAttachPoint& endAttachment);
00147 
00154       virtual const DtVector& offset() const;
00155 
00161       virtual void setOffset(const DtVector& off);
00162 
00168       virtual int numSegments() const;
00169 
00175       virtual void setNumSegments(int numSegments);
00176 
00184       virtual const DtVdcColor& color(int segment) const;
00185       virtual const DtVdcColor& color() const;
00186 
00194       virtual void setColor (const DtVdcColor& color, int segment);
00195       virtual void setColor (const DtVdcColor& color);
00196 
00204       virtual DtVdcLineSegment::DtVdcSegmentStyle lineStyle(int segment=0) const;
00205 
00213       virtual void setLineStyle(DtVdcLineSegment::DtVdcSegmentStyle lineStyle,
00214          int segment=0);
00215 
00224       virtual DtVdcLineSegment::DtVdcSegmentArrowStyle arrowStyle(int segment=0)
00225          const;
00226 
00234       virtual void setArrowStyle(DtVdcLineSegment::DtVdcSegmentArrowStyle arrowStyle,
00235          int segment=0);
00236 
00244       virtual unsigned pattern(int segment=0) const;
00245 
00253       virtual void setPattern(unsigned pattern, int segment=0);
00254 
00262       virtual unsigned thickness(int segment=0) const;
00263 
00273       virtual void setThickness(unsigned thickness, int segment=0);
00274 
00282       virtual double percentage(int segment) const;
00283 
00293       virtual void setPercentage(double percentage, int segment);
00294 
00300       virtual bool flashing() const;
00301 
00307       virtual void setFlashing(bool flashing);
00308 
00315       virtual bool checkLos() const;
00316 
00323       virtual void setCheckLos(bool checkLos);
00324 
00331       virtual bool projected() const;
00332 
00339       virtual void setProjected (bool projected );
00340 
00341       virtual void setRemoteGraphicSet(const std::string& setName);
00342 
00351       virtual void update();
00352 
00353    protected:
00354       void initRecords();
00355 
00356    protected:
00357       DtVdc3DAttachPoint            myStartAttachment;
00358       DtVdc3DAttachPoint            myEndAttachment;
00359       DtVector                      myOffset;
00360       bool                          myFlashing;
00361       bool                          myCheckLos;
00362       bool                          myProjected;
00363       std::vector<DtVdcLineSegment> myLineSegments;
00364 
00365       DtEnvironmentalLineRecord          myLineRecord;
00366       Dt3DGraphicalObjectLineStateRecord myLineStateRecord;
00367    };
00368 
00369 }

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)