![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtCylinderObject.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 ******************************************************************************/ 00008 #pragma once 00009 00014 00015 #include <vlutil/vlString.h> 00016 #include <matrix/vlVector.h> 00017 #include <matrix/vlTaitBryan.h> 00018 00019 #include <vrvDrawControl/vrvDrawControlDefines.h> 00020 00021 #include <vrvDrawControl/DtDrawControlObject.h> 00022 #include <vrvDrawControl/DtVdc3DAttachPoint.h> 00023 #include <vrvDrawControl/DtVdcVector2D.h> 00024 #include <vrvDrawControl/Dt3DTwoPositionedObject.h> 00025 00026 #include <vrvDrawControl/DtVdcColor.h> 00027 00028 #include <vrfExtObjects/3dGraphicalObjectStateRecord.h> 00029 #include <vrfExtObjects/envFixedCylinderRecord.h> 00030 #include <vrfExtObjects/envArticulatingCylinderRecord.h> 00031 00032 namespace vrvControlToolkit 00033 { 00034 00035 00045 class DT_DLL_VRVDRAWCONTROL DtCylinderObject : public Dt3DTwoPositionedObject 00046 { 00047 public: 00071 00072 00073 DtCylinderObject(DtExerciseConn* exConn, unsigned id, 00074 const DtVdc3DAttachPoint& attachment, double length, 00075 const DtVdcVector2D& diameters, const DtVector& offset = DtVector::zero(), 00076 const DtTaitBryan& rotation = zeros, 00077 DtVdcColor color = DtVdcColor::DtVdcWhite, bool flashing = false); 00078 00100 DtCylinderObject(DtExerciseConn* exConn, unsigned id, 00101 const DtVdc3DAttachPoint& startAttachment, 00102 const DtVdc3DAttachPoint& endAttachment, 00103 const DtVdcVector2D& diameters, 00104 const DtVector& offset = DtVector::zero(), 00105 DtVdcColor color = DtVdcColor::DtVdcWhite, bool flashing = false ); 00106 00107 // \brief Virtual destructor 00108 virtual ~DtCylinderObject(); 00109 00110 private: 00115 DtCylinderObject(); 00116 00120 DtCylinderObject(const DtCylinderObject& orig); 00121 00125 DtCylinderObject& operator=(const DtCylinderObject& rhs); 00126 00127 public: 00134 virtual const DtVdc3DAttachPoint& attachment() const; 00135 00140 virtual void setAttachment(const DtVdc3DAttachPoint& attachment); 00141 00148 virtual const DtVdc3DAttachPoint& startAttachment() const; 00149 00154 virtual void setStartAttachment(const DtVdc3DAttachPoint& startAttachment); 00155 00162 virtual const DtVdc3DAttachPoint& endAttachment() const; 00163 00168 virtual void setEndAttachment(const DtVdc3DAttachPoint& endAttachment); 00169 00176 virtual const DtVector& offset() const; 00177 00183 virtual void setOffset(const DtVector& off); 00184 00190 virtual double length() const; 00191 00197 virtual void setLength(double length); 00198 00205 virtual const DtVdcVector2D& diameters() const; 00206 00212 virtual void setDiameters(const DtVdcVector2D& diameters); 00213 00220 virtual const DtTaitBryan& rotation() const; 00221 00228 virtual void setRotation(const DtTaitBryan& rotation); 00229 00235 virtual const DtVdcColor& color() const; 00236 00242 virtual void setColor (const DtVdcColor& color); 00243 00249 virtual bool flashing() const; 00250 00256 virtual void setFlashing(bool flashing); 00257 00258 virtual void setRemoteGraphicSet(const std::string& setName); 00259 00268 virtual void update(); 00269 00270 protected: 00271 void initRecords(); 00272 00273 private: 00274 // Initializer for DtTaitBryan 00275 static DtTaitBryan zeros; 00276 00277 protected: 00278 DtVdc3DAttachPoint myStartAttachment; // also single attachment 00279 DtVdc3DAttachPoint myEndAttachment; 00280 double myLength; 00281 DtVdcVector2D myDiameters; 00282 DtVector myOffset; 00283 DtVdcColor myColor; 00284 DtTaitBryan myRotation; 00285 bool myFlashing; 00286 00287 Dt3DGraphicalObjectStateRecord myStateRecord; 00288 DtEnvironmentalFixedCylinderRecord myFixedCylinderRecord; 00289 DtEnvironmentalArticulatingCylinderRecord myArticulatingCylinderRecord; 00290 }; 00291 }