|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmil.navy.nps.dis.PduElement
mil.navy.nps.dis.AngularVelocity
Angular (rotational) velocity.
PduElement
,
SerializationInterface
Field Summary | |
int |
sizeOf
Constant value--size of an Angular Velocity Record when written out; here : sizeOf = 12 bytes . |
protected float |
x
Rate about x-axis. |
protected float |
y
Rate about y-axis. |
protected float |
z
Rate about z-axis. |
Constructor Summary | |
AngularVelocity()
Constructs an new Angular Velocity Vector, velocity's value is 0. |
|
AngularVelocity(float pX,
float pY,
float pZ)
Constructs a new Angular Velocity Vector with coordinate values passed in parameters. |
Method Summary | |
java.lang.Object |
clone()
Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data. |
void |
deSerialize(java.io.DataInputStream pInputStream)
Deserialize our data from the input stream. |
float |
getX()
|
float |
getY()
|
float |
getZ()
|
int |
length()
Returns the length of the object when serialized in a stream. |
void |
printValues(int indentLevel,
java.io.PrintStream printStream)
Prints the generated serialized object for debugging. |
void |
serialize(java.io.DataOutputStream outputStream)
Serialize our data out to the stream. |
void |
setValues(float pX,
float pY,
float pZ)
|
void |
setX(float pX)
|
void |
setY(float pY)
|
void |
setZ(float pZ)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected float x
protected float y
protected float z
public final int sizeOf
sizeOf = 12 bytes
.
Constructor Detail |
public AngularVelocity()
public AngularVelocity(float pX, float pY, float pZ)
pX
- the first coordinate in the cartesian coordinate systempY
- the second coordinate in the cartesian coordinate systempZ
- the third coordinate in the cartesian coordinate systemMethod Detail |
public java.lang.Object clone()
PduElement
clone
in class PduElement
Object
public void serialize(java.io.DataOutputStream outputStream)
PduElement
super.Serialize()
to make sure
the superclasse's data is serialized out. The order
in which instance variables are serialized is significant. They must
be serialized in the same order they appear in the DIS
spec.
Prints out some information during execution if debugging flag is set.
serialize
in interface SerializationInterface
serialize
in class PduElement
outputStream
- the stream to which this object is serialized
java.lang.RuntimeException
- when IO error occurs.public void deSerialize(java.io.DataInputStream pInputStream)
PduElement
super.deSerialize
to make sure
the superclass's data are properly affected. The order
in which instance variables are serialized is significant. They must
be deSerialized in the same order as they have been serialized as specified by the DIS spec.
deSerialize
in interface SerializationInterface
deSerialize
in class PduElement
pInputStream
- the stream from which this object is initialized
java.lang.RuntimeException
- when IO error occurs.public int length()
PduElement
length
in class PduElement
public void printValues(int indentLevel, java.io.PrintStream printStream)
PduElement
printValues
in class PduElement
indentLevel
- number of spaces to indent for visibilitypublic void setValues(float pX, float pY, float pZ)
public float getX()
public void setX(float pX)
public float getY()
public void setY(float pY)
public float getZ()
public void setZ(float pZ)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |