![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /***************************************************************************** 00002 * Copyright (c) 2012 MAK Technologies, Inc. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 00009 00010 #pragma once 00011 00012 #include <vrvCore/DtLineModelUpdater.h> 00013 00014 #include <vrvCore/DtIntersector.h> 00015 00016 namespace makVrv 00017 { 00022 class DT_DLL_VRVCORE DtAttachableIntervisibilityUpdater : public DtLineModelUpdater 00023 { 00024 public: 00025 00027 DtAttachableIntervisibilityUpdater( DtDe& de, DtElementID id, bool doNotAddToMgr = false ); 00028 00030 virtual ~DtAttachableIntervisibilityUpdater(); 00031 00035 virtual void setFixedDistance( bool ); 00036 00037 protected: 00038 00041 virtual void update( double ); 00042 00044 virtual bool doIntersection(); 00045 00046 // Updates the sceneObject with intervisibility information 00047 virtual void updateSceneObject(); 00048 00050 virtual double calculateDistance( const DtVector& start, 00051 const DtVector& end, DtVector* circleOrigin = 0 ) const; 00052 00054 virtual void calculateFixedDistance(); 00055 00057 virtual DtVector fixedDistanceFrom( const DtVector& start, const DtVector& end, 00058 double heading, double distance ) const; 00059 00061 virtual double calculateHeading( const DtVector& start, 00062 const DtVector& end ) const; 00063 00064 protected: 00065 00066 struct IntersectionInformation 00067 { 00068 bool intersection; 00069 DtVector startPoint; 00070 DtVector endPoint; 00071 DtIntersectorResult result; 00072 }; 00073 00074 IntersectionInformation myIntersectionInformation; 00075 00076 bool myFixDistance; 00077 double myFixedDistance; 00078 double myFixedHeading; 00079 }; 00080 } 00081