Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mil.navy.nps.dis.LinearVelocity

java.lang.Object
  |
  +--mil.navy.nps.dis.PduElement
        |
        +--mil.navy.nps.dis.LinearVelocity

public class LinearVelocity
extends PduElement
Version:
1.0
Author:
Don McGregor (http://www.stl.nps.navy.mil/~mcgredo)
Location:
http://www.stl.nps.navy.mil/dis-java-vrml/mil/navy/nps/dis/LinearVelocity.java
Hierarchy Diagram:
Summary:
Linear Velocity shall be represented as a vector with three components. Each vector component shall represent velocity in meters per second.
Explanation
Describes the velocity of an object, in x, y, z 32 bit floating point terms. There are several classes that consist only of three 32-bit quantities, but we split them out to separate classes in the interests of type safety.
History:
16Dec96 /Don McGregor /New
07Mar97 /Don McGregor /Javadoc changes, added setValues method
16Apr97 /Don McGregor /PrintStream passed to printValues
12Aug97 /Don McGregor /elaborated printValues
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changes access methods names from "variable()" to "getVariable()"
References:
DIS Data Dictionary: Linear velocity vector
DIS specification : IEEE 1278.1, 5.3.33.3, 1.3.2
See Also:
PduElement, mil.navy.nps.util.SerializationInterface, LinearAcceleration, EntityCoordinate

Field Summary
int sizeOf
          Constant value--size of a LinearVelocity Record when written out; here :sizeOf = 12 bytes.
float x
          First Velocity Component, along X axis
float y
          Second Velocity Component, along Y axis
float z
          Third Velocity Component, along Z axis
 
Constructor Summary
LinearVelocity()
          Constructs an new LinearVelocity Vector, LinearVelocity's value is 0.
LinearVelocity(float pX, float pY, float pZ)
          Constructs a new LinearVelocity Vector with coordinate values passed in parameters.
 
Method Summary
java.lang.Object clone()
           
void deSerialize(java.io.DataInputStream pInputStream)
           
float getX()
           
float getY()
           
float getZ()
           
int length()
           
void printValues(int indentLevel, java.io.PrintStream printStream)
           
void serialize(java.io.DataOutputStream outputStream)
           
void setValues(float pX, float pY, float pZ)
           
void setX(float pX)
           
void setY(float pY)
           
void setZ(float pZ)
           
 
Methods inherited from class mil.navy.nps.dis.PduElement
clone, deSerialize, length, printValues, serialize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

x

protected float x
First Velocity Component, along X axis

y

protected float y
Second Velocity Component, along Y axis

z

protected float z
Third Velocity Component, along Z axis

sizeOf

public final int sizeOf
Constant value--size of a LinearVelocity Record when written out; here :sizeOf = 12 bytes.
Constructor Detail

LinearVelocity

public LinearVelocity()
Constructs an new LinearVelocity Vector, LinearVelocity's value is 0.

LinearVelocity

public LinearVelocity(float pX,
                      float pY,
                      float pZ)
Constructs a new LinearVelocity Vector with coordinate values passed in parameters.
Parameters:
pX - the first coordinate in the cartesian coordinate system
pY - the second coordinate in the cartesian coordinate system
pZ - the third coordinate in the cartesian coordinate system
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class PduElement

serialize

public void serialize(java.io.DataOutputStream outputStream)
Overrides:
serialize in class PduElement

deSerialize

public void deSerialize(java.io.DataInputStream pInputStream)
Overrides:
deSerialize in class PduElement

length

public int length()
Overrides:
length in class PduElement

printValues

public void printValues(int indentLevel,
                        java.io.PrintStream printStream)
Overrides:
printValues in class PduElement

setValues

public void setValues(float pX,
                      float pY,
                      float pZ)

getX

public float getX()

setX

public void setX(float pX)

getY

public float getY()

setY

public void setY(float pY)

getZ

public float getZ()

setZ

public void setZ(float pZ)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD