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. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
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
.
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
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)