public class CollisionPdu extends EntityInformationFamilyPdu implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected EntityID |
collidingEntityID
This field shall identify the entity that has collided with the issuing entity (see 5.3.3.4).
|
protected CollisionType |
collisionType
This field shall identify the type of collision.
|
protected EventIdentifier |
eventID
This field shall contain an identification generated by the issuing simulation application to associate related collision events.
|
protected EntityID |
issuingEntityID
This field shall identify the entity that is issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28).
|
protected Vector3Float |
location
This field shall specify the location of the collision with respect to the entity with which the issuing entity collided.
|
protected float |
mass
This field shall contain the mass of the issuing entity, and shall be represented by a 32-bit floating point number representing kilograms.
|
protected byte |
pad
some padding
|
protected Vector3Float |
velocity
This field shall contain the velocity (at the time the collision is detected) of the issuing entity.
|
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
Constructor and Description |
---|
CollisionPdu()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsImpl(java.lang.Object obj)
Compare all fields that contribute to the state, ignoring
transient and static fields, for
this and the supplied object |
EntityID |
getCollidingEntityID()
Getter for
collidingEntityID |
CollisionType |
getCollisionType()
Getter for
collisionType |
EventIdentifier |
getEventID()
Getter for
eventID |
EntityID |
getIssuingEntityID()
Getter for
issuingEntityID |
Vector3Float |
getLocation()
Getter for
location |
int |
getMarshalledSize()
Returns the size of this serialized object in bytes
|
float |
getMass()
Getter for
mass |
byte |
getPad()
Getter for
pad |
Vector3Float |
getVelocity()
Getter for
velocity |
void |
marshal(java.nio.ByteBuffer buff)
Packs an object into the ByteBuffer.
|
void |
marshal(java.io.DataOutputStream dos)
Serializes an object to a DataOutputStream.
|
CollisionPdu |
setCollidingEntityID(EntityID pCollidingEntityID)
Setter for
collidingEntityID |
CollisionPdu |
setCollisionType(CollisionType pCollisionType)
Setter for
collisionType |
CollisionPdu |
setEventID(EventIdentifier pEventID)
Setter for
eventID |
CollisionPdu |
setIssuingEntityID(EntityID pIssuingEntityID)
Setter for
issuingEntityID |
CollisionPdu |
setLocation(Vector3Float pLocation)
Setter for
location |
CollisionPdu |
setMass(float pMass)
Setter for
mass |
CollisionPdu |
setPad(byte pPad)
Setter for
pad |
CollisionPdu |
setVelocity(Vector3Float pVelocity)
Setter for
velocity |
int |
unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.
|
int |
unmarshal(java.io.DataInputStream dis)
Unserializes an object from a DataInputStream.
|
getPadding, getPduStatus, setPadding, setPduStatus
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, setExerciseID, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
protected EntityID issuingEntityID
protected EntityID collidingEntityID
protected EventIdentifier eventID
protected CollisionType collisionType
protected byte pad
protected Vector3Float velocity
protected float mass
protected Vector3Float location
public int getMarshalledSize()
getMarshalledSize
in class EntityInformationFamilyPdu
public CollisionPdu setIssuingEntityID(EntityID pIssuingEntityID)
issuingEntityID
public EntityID getIssuingEntityID()
issuingEntityID
public CollisionPdu setCollidingEntityID(EntityID pCollidingEntityID)
collidingEntityID
public EntityID getCollidingEntityID()
collidingEntityID
public CollisionPdu setEventID(EventIdentifier pEventID)
eventID
public EventIdentifier getEventID()
eventID
public CollisionPdu setCollisionType(CollisionType pCollisionType)
collisionType
public CollisionType getCollisionType()
collisionType
public CollisionPdu setPad(byte pPad)
pad
public byte getPad()
pad
public CollisionPdu setVelocity(Vector3Float pVelocity)
velocity
public Vector3Float getVelocity()
velocity
public CollisionPdu setMass(float pMass)
mass
public float getMass()
mass
public CollisionPdu setLocation(Vector3Float pLocation)
location
public Vector3Float getLocation()
location
public void marshal(java.io.DataOutputStream dos)
marshal
in class EntityInformationFamilyPdu
dos
- The DataOutputStreamDataOutputStream
public int unmarshal(java.io.DataInputStream dis)
unmarshal
in class EntityInformationFamilyPdu
dis
- The DataInputStreamDataInputStream
public void marshal(java.nio.ByteBuffer buff) throws java.lang.Exception
marshal
in class EntityInformationFamilyPdu
buff
- The ByteBuffer at the position to begin writingjava.nio.BufferOverflowException
- if buff is too smalljava.nio.ReadOnlyBufferException
- if buff is read onlyjava.lang.Exception
- ByteBuffer-generated exceptionByteBuffer
public int unmarshal(java.nio.ByteBuffer buff) throws java.lang.Exception
unmarshal
in class EntityInformationFamilyPdu
buff
- The ByteBuffer at the position to begin readingjava.nio.BufferUnderflowException
- if buff is too smalljava.lang.Exception
- ByteBuffer-generated exceptionByteBuffer
public boolean equals(java.lang.Object obj)
equals
in class EntityInformationFamilyPdu
public boolean equalsImpl(java.lang.Object obj)
Pdu
this
and the supplied objectequalsImpl
in class EntityInformationFamilyPdu
obj
- the object to compare to