/*****************************************************************************
 * $LastChangedDate: 2011-04-09 21:58:06 -0400 (Sat, 09 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Craft class.
 *//*
 * LEGAL:   COPYRIGHT (C) 2007 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef OBJECT_CRAFT_HH
#define OBJECT_CRAFT_HH 1

#include "object/dyna.hh"

namespace object {

////////////////////////////////////////////////////////////////////////////////
/// @brief Craft class.
///
/// Craft's interface should remain minimal.
/// Purpose of Craft class:
/// - control module defines a "current Craft"
/// - can be controlled by joystick (throttle, physical rotate)
/// - base class for derivatives such as Aircraft, Missile, etc.
///
class Craft : public Dyna
{
PREVENT_COPYING(Craft)
typedef Dyna Parent;
public:                         Craft( shptr<Graph> graph, const WorldVertex& pos );
public:    virtual              ~Craft();
public:    virtual void         Reset( void );
public:    virtual const string GetName( void ) { return string("Craft"); }

public:    virtual void         PhysicalRotate( uint axis, fp controlFraction, Milliseconds controlFreq ) = 0;
public:    virtual void         SetThrottle( const fp throttle );
public:    virtual fp           GetThrottle( void );

// Data:
private:   fp       mThrottle;      ///< {0.0,..,1.0}
public:    DECLARE_TYPESIG( TYPESIG_CRAFT )
};

} // namespace object

#endif // OBJECT_CRAFT_HH
