Class BaseballDisSender

java.lang.Object
  extended by BaseballDisSender

public class BaseballDisSender
extends java.lang.Object

Class: BaseballDisSender


Constructor Summary
BaseballDisSender(java.lang.String ipAddr, int portNumber, int timeToLive, java.lang.String marking, boolean rtpHeaderEnabled)
          Constructor; creates and initializes all of the required pdus for the baseball, as well as the BehaviorStreamBuffer to send them out over multicast.
 
Method Summary
 void shutdown()
          shuts the stream buffer down and cleans up the stream for the next use.
 void transmitUpdate(float X, float Y, float Z, float Psi, float Phi, float Theta, float velX, float velY, float velZ, float angularVelocityAboutX, float angularVelocityAboutY, float angularVelocityAboutZ)
          Sets the appropriate values for the espdu and transmits it out the behaviorStreamBuffer These values are oriented according to DIS-coordinates; thus, if you wish to transmit to a VRML world, put 'up' into Y and 'right' into -Z (reverse sign).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseballDisSender

public BaseballDisSender(java.lang.String ipAddr,
                         int portNumber,
                         int timeToLive,
                         java.lang.String marking,
                         boolean rtpHeaderEnabled)
Constructor; creates and initializes all of the required pdus for the baseball, as well as the BehaviorStreamBuffer to send them out over multicast.

Parameters:
ipAddr - The multicast address that the espdus are sent on
portNumber - The port; for DIS, this must match the espdu transform in the VRML scene
timeToLive - Hops an espdu can go before being dropped; 15+ for local area, 100+ worldwide
marking - How the entity should be marked in the receiving environment
rtpHeaderEnabled - whether you wish the rtpHeader to be prepended (false works)
Method Detail

transmitUpdate

public void transmitUpdate(float X,
                           float Y,
                           float Z,
                           float Psi,
                           float Phi,
                           float Theta,
                           float velX,
                           float velY,
                           float velZ,
                           float angularVelocityAboutX,
                           float angularVelocityAboutY,
                           float angularVelocityAboutZ)
Sets the appropriate values for the espdu and transmits it out the behaviorStreamBuffer These values are oriented according to DIS-coordinates; thus, if you wish to transmit to a VRML world, put 'up' into Y and 'right' into -Z (reverse sign). The function calls would look like:

to DIS: bbds.transmitUpdate(x, y, z, etc)

to VRML: bbds.transmitUpdate(x, z, -y, etc)

Similar transformations must be done with the remaining arguments

Parameters:
X - position along the x axis (meters)
Y - position along the y axis (meters)
Z - position along the z axis (meters)
Psi - roll (radians)
Phi - yaw (radians)
Theta - pitch (radians)
velX - velocity on the x axis (meters per second)
velY - velocity on the y axis (meters per second)
velZ - velocity on the z axis (meters per second)
angularVelocityAboutX - rate of roll (radians per second)
angularVelocityAboutY - rate of yaw (radians per second)
angularVelocityAboutZ - rate of pitch (radians per second)

shutdown

public void shutdown()
shuts the stream buffer down and cleans up the stream for the next use.