View Javadoc

1   package cz.cuni.amis.pogamut.usar2004.agent.module.geometry;
2   
3   import cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.GeometryType;
4   import javax.vecmath.Point3d;
5   import javax.vecmath.Vector3d;
6   
7   /**
8    * Geometry message representative for Vehicles - Ground, Aerial, Legged and
9    * Nautic share properties present here.
10   *
11   * @author vejmanm
12   */
13  public abstract class VehicleGeometry extends SuperGeometry
14  {
15      /**
16       * Ctor.
17       *
18       * @param type Geometry type describes particular subject about which we
19       * want to know about. It is used to distinguish incoming message from the
20       * server.
21       */
22      public VehicleGeometry(GeometryType type)
23      {
24          super(type);
25      }
26  
27      /**
28       * Dimension (x,y,z) ‘x’ defines the robot’s length, ‘y’ defines the robot’s
29       * width, and ‘z’ describes the robot’s height. Please note that these
30       * values are in meters.
31       *
32       * @return Returns Dimension of the robot.
33       */
34      public Vector3d getDimensions()
35      {
36          return lastMessage.getDimensions();
37      }
38  
39      /**
40       * COG(x,y,z) ‘x’, ‘y’, and ‘z’ identify the position of the center of
41       * gravity, in meters, calculated from the chassis origin.
42       *
43       * @return Returns center of gravity of the robot
44       */
45      public Point3d getCenterOfGravity()
46      {
47          return lastMessage.getCenterOfGravity();
48      }
49  }