VR-Forces 4.0.4 Class Documentation
include/bhaveSim/bhaveMoveDirectionController.h
Go to the documentation of this file.
00001 
00002 /*******************************************************************************
00003 ** Copyright (c) 2009 MAK Technologies, Inc.
00004 ** All rights reserved.
00005 *******************************************************************************/
00006 /*******************************************************************************
00007 * Copyright 2009 Autodesk, Inc.  All rights reserved.
00008 * Use of this software is subject to the terms of the Autodesk license 
00009 * agreement provided at the time of installation or download, or which otherwise
00010 * accompanies this software in either electronic or hard copy form.
00011 *******************************************************************************/
00012 
00013 /*******************************************************************************
00014 ** $RCSfile: bhaveMoveDirectionController.h,v $ $Revision: 1.3 $ $State: Exp $
00015 *******************************************************************************/
00016 
00019 
00020 #pragma once
00021 
00022 #include <bhaveSim/bhaveSimDefines.h>
00023 #include <vrfmodel/groundMoveDirectionController.h>
00024 
00025 class DtAnalogInputPort;
00026 class DtBooleanInputPort;
00027 class DtInputPortGroup;
00028 
00029 namespace BHAVE
00030 {
00031 class DtGroundMoveDirectionControllerDescriptor;
00032 
00033 const char DtBhaveMoveDirectionControllerType[] = "bhave-move-direction-controller";
00034 
00039 class DT_DLL_bhaveSim DtBhaveMoveDirectionController : public DtGroundMoveDirectionController
00040 {
00041 private:
00043    DtBhaveMoveDirectionController();
00045    DtBhaveMoveDirectionController(const DtBhaveMoveDirectionController & 
00046       orig);
00048    const DtBhaveMoveDirectionController & operator=(const 
00049       DtBhaveMoveDirectionController & orig);
00050 
00051 public:
00054    DtBhaveMoveDirectionController(const DtString& name, 
00055       DtVrfObject* owner,
00056       DtSimManager* simManager, 
00057       DtComponentDescriptor* desc = 0,
00058       DtReaderWriterRegistry* parentRegistry = 0);
00059 
00061    virtual ~DtBhaveMoveDirectionController();
00062 
00063    virtual bool init();
00064 
00067    virtual DtString type() const;
00068 
00070    virtual double calculateSteering(double currentHeading, double 
00071       desiredHeading, bool reverseDirection = false) const;
00072       
00076    static DtSimComponent * creator(const DtString& name, 
00077       DtVrfObject* owner,
00078       DtSimManager* simManager, 
00079       DtComponentDescriptor* desc = 0,
00080       DtReaderWriterRegistry* parentRegistry = 0);
00081 
00082 protected:
00083 
00086    virtual bool createPorts();
00087 
00088    virtual bool createTurningDirectionInputPort();
00089 
00091    virtual void setControlsForNormalMove();
00092 
00093    virtual double approximateThrottle(double speed);
00094 
00095 protected:
00096 
00097    DtBooleanInputPort* myTurningDirectionInputPort;
00098 
00099 };
00100 
00101 } //namespace BHAVE
00102 
00103 
00104 

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)