VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtLineModelUpdater.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/DtAttachableUpdater.h>
00013 
00014 class DtVector;
00015 class DtTaitBryan;
00016 
00017 namespace makVrv 
00018 {
00019 
00023    class DT_DLL_VRVCORE DtLineModelUpdater : public DtAttachableUpdater
00024    {
00025    public:
00027       DtLineModelUpdater( DtDe& de, DtElementID id, bool doNotAddToMgr = false );
00028 
00030       virtual ~DtLineModelUpdater();
00031 
00033       virtual void setStartPoint( const DtVector& position );
00034 
00037       virtual void attachStartPoint( DtElementID id );
00038 
00040       virtual void setStartPointOffset( const DtVector& offset );
00041 
00043       virtual void setEndPoint( const DtVector& position );
00044 
00047       virtual void attachEndPoint( DtElementID id );
00048 
00050       virtual void setEndPointOffset( const DtVector& offset );
00051 
00053       virtual DtVector calculateStartPoint();
00054 
00056       virtual DtVector calculateEndPoint();
00057 
00059       virtual void setSceneObject( DtSceneObject* sceneObject );
00060 
00064       virtual void update( double simTime );
00065 
00066    protected:
00067 
00068       // \brief Updates the sceneObject
00069       virtual void updateSceneObject() = 0;
00070 
00073 
00074       struct PointInformation;
00075 
00077       virtual void cleanup( PointInformation& pointInfo );
00078 
00084       virtual DtVector offsetPoint( DtVector point, const DtVector& offset,
00085          const DtTaitBryan& ori = DtTaitBryan() ) const;
00086 
00091       virtual DtVector getAttachedPosition( PointInformation& pointInfo );
00092 
00094       virtual void getSceneInformation( const PointInformation& info, DtUniqueID& sceneId );
00095 
00097 
00100 
00102       virtual void slot_attachedSceneObjectToBeDeleted( DtUniqueID, PointInformation* );
00103 
00105       virtual void slot_attachedUpdaterToBeDeleted( DtUniqueID, PointInformation* );
00106 
00108 
00109    protected:
00110 
00111       struct PointInformation
00112       {
00113          PointInformation();
00114 
00115          bool defined;
00116          DtVector position;
00117          DtVector offset;
00118          int modelSet;
00119          DtElementID parentAttachID;
00120          DtSceneObject* sceneObject;
00121          DtUpdater* updater;
00122       };
00123 
00124       PointInformation myStartPoint;
00125       PointInformation myEndPoint;
00126 
00127    };
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)