VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtSegmentedLineModelUpdater.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2010 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 /*****************************************************************************
00006  * $RCSfile: DtSegmentedLineModelUpdater.h,v $ $Revision: 1.0 $ $State: Exp $
00007  *****************************************************************************/
00008 
00012 
00013 #pragma once
00014 
00015 #include <vrvCore/DtAttachableUpdater.h>
00016 
00017 class DtVector;
00018 class DtTaitBryan;
00019 
00020 namespace makVrv 
00021 {
00022 
00026    class DT_DLL_VRVCORE DtSegmentedLineModelUpdater : public DtAttachableUpdater
00027    {
00028    public:
00030       DtSegmentedLineModelUpdater( DtDe& de, DtElementID id, bool doNotAddToMgr = false );
00031 
00033       virtual ~DtSegmentedLineModelUpdater();
00034 
00036       virtual void setStartPoint( const DtVector& position );
00037 
00040       virtual void attachStartPoint( DtElementID id );
00041 
00043       virtual void setStartPointOffset( const DtVector& offset );
00044 
00046       virtual void setEndPoint( const DtVector& position );
00047 
00050       virtual void attachEndPoint( DtElementID id );
00051 
00053       virtual void setEndPointOffset( const DtVector& offset );
00054 
00056       virtual DtVector calculateStartPoint();
00057 
00059       virtual DtVector calculateEndPoint();
00060 
00062       virtual void setSceneObject( DtSceneObject* sceneObject );
00063 
00067       virtual void update( double simTime );
00068 
00069    protected:
00070 
00071       // \brief Updates the sceneObject
00072       virtual void updateSceneObject() = 0;
00073 
00076 
00077       struct PointInformation;
00078 
00080       virtual void cleanup( PointInformation& pointInfo );
00081 
00087       virtual DtVector offsetPoint( DtVector point, const DtVector& offset,
00088          const DtTaitBryan& ori = DtTaitBryan() ) const;
00089 
00094       virtual DtVector getAttachedPosition( PointInformation& pointInfo );
00095 
00097       virtual void getSceneInformation( const PointInformation& info, DtUniqueID& sceneId );
00098 
00100 
00103 
00105       virtual void slot_attachedSceneObjectToBeDeleted( DtUniqueID, PointInformation* );
00106 
00108       virtual void slot_attachedUpdaterToBeDeleted( DtUniqueID, PointInformation* );
00109 
00111 
00112    protected:
00113 
00114       struct PointInformation
00115       {
00116          PointInformation();
00117 
00118          bool defined;
00119          DtVector position;
00120          DtVector offset;
00121          int modelSet;
00122          DtElementID parentAttachID;
00123          DtSceneObject* sceneObject;
00124          DtUpdater* updater;
00125       };
00126 
00127       PointInformation myStartPoint;
00128       PointInformation myEndPoint;
00129 
00130    };
00131 }
00132 

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)