// (c) MIT 2003.  All rights reserved.

////////////////////////////////////////////////////////////////////////////////
//
// FILE:	WMForce.java
//
// AUTHOR:	Manoj D. Muzumdar
//		archon@ai.mit.edu
//
// DATE:	Mar 99
//
// COPYRIGHT:	Massachusetts Institute of Technology
//		All rights reserved.
//
// PURPOSE:     Mechanical engineering drawing recognition
//
// HISTORY:     Mar 99  archon  created
//
////////////////////////////////////////////////////////////////////////////////

package rec.meche;

import rec.geo.*;

public class WMForce extends WPart
{
  public WMForce( GPoint center, double angle, double size, Cloneable data )
  {
    super( center, angle, size, data );
  }

  //////////////////////////////////////////////////////////////////////////////

  public Object clone()
  {
    return( new WMForce( getCenter(), getAngle(), size(), getData() ) );
  }

  //////////////////////////////////////////////////////////////////////////////

  protected GShape[] create( double size, Cloneable data )
  {
    GShape[] shapes = new GShape[3];

    double unit = size / 8.0;

    // Create the line.

    shapes[0] = new GSegment( new GPoint( unit, 0.0 ),
                              new GPoint( unit, 8.0 * unit ) );

    // Create the arrowhead.

    shapes[1] = new GSegment( new GPoint( 0.0, unit ),
                              new GPoint( unit, 0.0 ) );
    shapes[2] = new GSegment( new GPoint( 2.0 * unit, unit ),
                              new GPoint( unit, 0.0 ) );

    return( shapes );
  }
}

////////////////////////////////////////////////////////////////////////////////
