Class TreeMsg

java.lang.Object
  extended by TreeMsg
All Implemented Interfaces:
IMsg

public class TreeMsg
extends java.lang.Object
implements IMsg

Messages sent by agents following tree connectivity protocol.

Since:
1.0

Constructor Summary
protected TreeMsg()
           
  TreeMsg(TreeAgentState state, double[] arrLfPositions, int nIdxMyId)
           
  TreeMsg(TreeMsg src)
           
 
Method Summary
 double[] getLoc()
          Gets origin for parent frame
 double[] getParentDir()
          Gets one basis vector for parent frame
 double[] getPerpDir()
          Gets one basis vector for parent frame
 double[] getPhase1Targ(double lfD1)
           
 double[] getPhase2Targ(double[] arrLfWorld, int nOff, double lfSpeedTimesTcom)
           
 TreeAgentState getState()
          Gets logic var component of message
 TreeMsg makeCopy()
           
 double[] uvToWorld(double[] arrLfUv, int nOff)
           
 double[] worldToUv(double[] arrLfWorld, int nOff)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeMsg

protected TreeMsg()

TreeMsg

public TreeMsg(TreeMsg src)

TreeMsg

public TreeMsg(TreeAgentState state,
               double[] arrLfPositions,
               int nIdxMyId)
Method Detail

makeCopy

public TreeMsg makeCopy()
Specified by:
makeCopy in interface IMsg

getState

public TreeAgentState getState()
Gets logic var component of message


getParentDir

public double[] getParentDir()
Gets one basis vector for parent frame


getPerpDir

public double[] getPerpDir()
Gets one basis vector for parent frame


getLoc

public double[] getLoc()
Gets origin for parent frame


uvToWorld

public double[] uvToWorld(double[] arrLfUv,
                          int nOff)
Parameters:
arrLfUv - array containing uv coordinates
nOff - offset of uv coordinates
Returns:
uv coordinates transformed to world coordinates

worldToUv

public double[] worldToUv(double[] arrLfWorld,
                          int nOff)
Parameters:
arrLfWorld - array containing world coordinates
nOff - offset of world coordinates
Returns:
world coordinates transformed to uv coordinates

getPhase1Targ

public double[] getPhase1Targ(double lfD1)

getPhase2Targ

public double[] getPhase2Targ(double[] arrLfWorld,
                              int nOff,
                              double lfSpeedTimesTcom)