edu.nps.moves.dis
Class CollisionElasticPdu

java.lang.Object
  extended by edu.nps.moves.dis.Pdu
      extended by edu.nps.moves.dis.EntityInformationFamilyPdu
          extended by edu.nps.moves.dis.CollisionElasticPdu
All Implemented Interfaces:
java.io.Serializable

@Entity
public class CollisionElasticPdu
extends EntityInformationFamilyPdu
implements java.io.Serializable

5.3.3.3. Information about elastic collisions in a DIS exercise shall be communicated using a Collision-Elastic PDU. COMPLETE Copyright (c) 2008-2010, MOVES Institute, Naval Postgraduate School. All rights reserved. This work is licensed under the BSD open source license, available at https://www.movesinstitute.org/licenses/bsd.html

Author:
DMcG
See Also:
Serialized Form

Field Summary
protected  float coefficientOfRestitution
          This field shall represent the degree to which energy is conserved in a collision
protected  EntityID collidingEntityID
          ID of entity that has collided with the issuing entity ID
protected  EventID collisionEventID
          ID of event
protected  float collisionResultXX
          tensor values
protected  float collisionResultXY
          tensor values
protected  float collisionResultXZ
          tensor values
protected  float collisionResultYY
          tensor values
protected  float collisionResultYZ
          tensor values
protected  float collisionResultZZ
          tensor values
protected  Vector3Float contactVelocity
          velocity at collision
 long fk_collidingEntityID
           
 long fk_collisionEventID
           
 long fk_contactVelocity
           
 long fk_issuingEntityID
           
 long fk_location
           
 long fk_unitSurfaceNormal
           
protected  EntityID issuingEntityID
          ID of the entity that issued the collision PDU
protected  Vector3Float location
          Location with respect to entity the issuing entity collided with
protected  float mass
          mass of issuing entity
protected  short pad
          some padding
protected  Vector3Float unitSurfaceNormal
          This record shall represent the normal vector to the surface at the point of collision detection.
 
Fields inherited from class edu.nps.moves.dis.Pdu
exerciseID, padding, pduLength, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
CollisionElasticPdu()
          Constructor
 
Method Summary
 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
 float getCoefficientOfRestitution()
           
 EntityID getCollidingEntityID()
           
 EventID getCollisionEventID()
           
 float getCollisionResultXX()
           
 float getCollisionResultXY()
           
 float getCollisionResultXZ()
           
 float getCollisionResultYY()
           
 float getCollisionResultYZ()
           
 float getCollisionResultZZ()
           
 Vector3Float getContactVelocity()
           
 EntityID getIssuingEntityID()
           
 Vector3Float getLocation()
           
 int getMarshalledSize()
           
 float getMass()
           
 short getPad()
           
 Vector3Float getUnitSurfaceNormal()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setCoefficientOfRestitution(float pCoefficientOfRestitution)
           
 void setCollidingEntityID(EntityID pCollidingEntityID)
           
 void setCollisionEventID(EventID pCollisionEventID)
           
 void setCollisionResultXX(float pCollisionResultXX)
           
 void setCollisionResultXY(float pCollisionResultXY)
           
 void setCollisionResultXZ(float pCollisionResultXZ)
           
 void setCollisionResultYY(float pCollisionResultYY)
           
 void setCollisionResultYZ(float pCollisionResultYZ)
           
 void setCollisionResultZZ(float pCollisionResultZZ)
           
 void setContactVelocity(Vector3Float pContactVelocity)
           
 void setIssuingEntityID(EntityID pIssuingEntityID)
           
 void setLocation(Vector3Float pLocation)
           
 void setMass(float pMass)
           
 void setPad(short pPad)
           
 void setUnitSurfaceNormal(Vector3Float pUnitSurfaceNormal)
           
 void unmarshal(java.nio.ByteBuffer buff)
          Unpacks a Pdu from the underlying data.
 void unmarshal(java.io.DataInputStream dis)
           
 
Methods inherited from class edu.nps.moves.dis.Pdu
getExerciseID, getLength, getPadding, getPduLength, getPduType, getPduTypeEnum, getPk_Pdu, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, marshalWithDisAbsoluteTimestamp, marshalWithDisAbsoluteTimestamp, marshalWithDisRelativeTimestamp, marshalWithDisRelativeTimestamp, marshalWithNpsTimestamp, marshalWithNpsTimestamp, marshalWithUnixTimestamp, marshalWithUnixTimestamp, readUnsignedInt, readUnsignedInt, setExerciseID, setPadding, setPduLength, setPduType, setPk_Pdu, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

issuingEntityID

protected EntityID issuingEntityID
ID of the entity that issued the collision PDU


collidingEntityID

protected EntityID collidingEntityID
ID of entity that has collided with the issuing entity ID


collisionEventID

protected EventID collisionEventID
ID of event


pad

protected short pad
some padding


contactVelocity

protected Vector3Float contactVelocity
velocity at collision


mass

protected float mass
mass of issuing entity


location

protected Vector3Float location
Location with respect to entity the issuing entity collided with


collisionResultXX

protected float collisionResultXX
tensor values


collisionResultXY

protected float collisionResultXY
tensor values


collisionResultXZ

protected float collisionResultXZ
tensor values


collisionResultYY

protected float collisionResultYY
tensor values


collisionResultYZ

protected float collisionResultYZ
tensor values


collisionResultZZ

protected float collisionResultZZ
tensor values


unitSurfaceNormal

protected Vector3Float unitSurfaceNormal
This record shall represent the normal vector to the surface at the point of collision detection. The surface normal shall be represented in world coordinates.


coefficientOfRestitution

protected float coefficientOfRestitution
This field shall represent the degree to which energy is conserved in a collision


fk_issuingEntityID

public long fk_issuingEntityID

fk_collidingEntityID

public long fk_collidingEntityID

fk_collisionEventID

public long fk_collisionEventID

fk_contactVelocity

public long fk_contactVelocity

fk_location

public long fk_location

fk_unitSurfaceNormal

public long fk_unitSurfaceNormal
Constructor Detail

CollisionElasticPdu

public CollisionElasticPdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class EntityInformationFamilyPdu

setIssuingEntityID

public void setIssuingEntityID(EntityID pIssuingEntityID)

getIssuingEntityID

public EntityID getIssuingEntityID()

setCollidingEntityID

public void setCollidingEntityID(EntityID pCollidingEntityID)

getCollidingEntityID

public EntityID getCollidingEntityID()

setCollisionEventID

public void setCollisionEventID(EventID pCollisionEventID)

getCollisionEventID

public EventID getCollisionEventID()

setPad

public void setPad(short pPad)

getPad

public short getPad()

setContactVelocity

public void setContactVelocity(Vector3Float pContactVelocity)

getContactVelocity

public Vector3Float getContactVelocity()

setMass

public void setMass(float pMass)

getMass

public float getMass()

setLocation

public void setLocation(Vector3Float pLocation)

getLocation

public Vector3Float getLocation()

setCollisionResultXX

public void setCollisionResultXX(float pCollisionResultXX)

getCollisionResultXX

public float getCollisionResultXX()

setCollisionResultXY

public void setCollisionResultXY(float pCollisionResultXY)

getCollisionResultXY

public float getCollisionResultXY()

setCollisionResultXZ

public void setCollisionResultXZ(float pCollisionResultXZ)

getCollisionResultXZ

public float getCollisionResultXZ()

setCollisionResultYY

public void setCollisionResultYY(float pCollisionResultYY)

getCollisionResultYY

public float getCollisionResultYY()

setCollisionResultYZ

public void setCollisionResultYZ(float pCollisionResultYZ)

getCollisionResultYZ

public float getCollisionResultYZ()

setCollisionResultZZ

public void setCollisionResultZZ(float pCollisionResultZZ)

getCollisionResultZZ

public float getCollisionResultZZ()

setUnitSurfaceNormal

public void setUnitSurfaceNormal(Vector3Float pUnitSurfaceNormal)

getUnitSurfaceNormal

public Vector3Float getUnitSurfaceNormal()

setCoefficientOfRestitution

public void setCoefficientOfRestitution(float pCoefficientOfRestitution)

getCoefficientOfRestitution

public float getCoefficientOfRestitution()

marshal

public void marshal(java.io.DataOutputStream dos)
Overrides:
marshal in class EntityInformationFamilyPdu

unmarshal

public void unmarshal(java.io.DataInputStream dis)
Overrides:
unmarshal in class EntityInformationFamilyPdu

marshal

public void marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.

Overrides:
marshal in class EntityInformationFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin writing
Throws:
java.nio.BufferOverflowException - if buff is too small
java.nio.ReadOnlyBufferException - if buff is read only
Since:
??
See Also:
ByteBuffer

unmarshal

public void unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.

Overrides:
unmarshal in class EntityInformationFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin reading
Throws:
java.nio.BufferUnderflowException - if buff is too small
Since:
??
See Also:
ByteBuffer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class EntityInformationFamilyPdu

equalsImpl

public boolean equalsImpl(java.lang.Object obj)
Description copied from class: Pdu
Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object

Overrides:
equalsImpl in class EntityInformationFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.