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.WorldCoordinate

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

public class WorldCoordinate
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/WorldCoordinate.java
Hierarchy Diagram:
Summary:
Location of the origin of the entity's coordinate system shall be specified by a set of three coordinates: X, Y, and Z.
Explanation
The WorldCoordinate class describes the location of an entity in 64-bit x,y,z coordinates. This crops up often enough to warrant its own class. (This is also known as "World Coordinates", as contrasted to "entity coordinates", which are 32-bit.

History:
12Dec96 /Don McGregor /New
10Mar97 /Don McGregor /changes for javadoc
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()"
11Dec97 /Ronan Fauglas /changed " class" to "public class" (was private by default).
References:
DIS Data Dictionary: World Coordinate Record
DIS specification : IEEE 1278.1, 5.3.34
See Also:
PduElement, mil.navy.nps.util.SerializationInterface, EntityCoordinate

Field Summary
int sizeOf
          Constant value--size of a World Coordinate record when written out; here :sizeOf = 24 bytes.
double x
          First coordinate of the entity's coordinate system , along X axis
double y
          Second coordinate of the entity's coordinate system , along Y axis
double z
          Third coordinate of the entity's coordinate system , along Z axis
 
Constructor Summary
WorldCoordinate()
          Constructs an new WorldCoordinate Object, centered.
WorldCoordinate(double pX, double pY, double pZ)
          Constructs a new WorldCoordinate Object whose coordinate values are passed in parameters.
 
Method Summary
java.lang.Object clone()
           
void deSerialize(java.io.DataInputStream pInputStream)
           
double getX()
           
double getY()
           
double getZ()
           
int length()
           
void printValues(int indentLevel, java.io.PrintStream printStream)
           
void serialize(java.io.DataOutputStream outputStream)
           
void setX(double pX)
           
void setY(double pY)
           
void setZ(double 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 double x
First coordinate of the entity's coordinate system , along X axis

y

protected double y
Second coordinate of the entity's coordinate system , along Y axis

z

protected double z
Third coordinate of the entity's coordinate system , along Z axis

sizeOf

public final int sizeOf
Constant value--size of a World Coordinate record when written out; here :sizeOf = 24 bytes.
Constructor Detail

WorldCoordinate

public WorldCoordinate()
Constructs an new WorldCoordinate Object, centered.

WorldCoordinate

public WorldCoordinate(double pX,
                       double pY,
                       double pZ)
Constructs a new WorldCoordinate Object whose coordinate values are 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)
Throws:
java.lang.RuntimeException - when IO error occurs.
Overrides:
serialize in class PduElement

deSerialize

public void deSerialize(java.io.DataInputStream pInputStream)
Throws:
java.lang.RuntimeException - when IO error occurs.
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

getX

public double getX()

setX

public void setX(double pX)

getY

public double getY()

setY

public void setY(double pY)

getZ

public double getZ()

setZ

public void setZ(double pZ)

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