Behaviours
BxSwEdge Class Reference

Public Member Functions

 BxSwEdge ()
 Constructor.
 
float CrossingTime ()
 Compute time, in seconds, for a ball to fully cross this edge.
 
void SetCrossingTime (float t)
 Set the time needed to travel across this edge (a.k.a: deduce speed of balls)
 
bool IsFull ()
 Is the edge full of balls (Can a ball enter the edge?)
 
virtual void InsertBall (BxSwVirtualBall b)
 Event called when a virtual ball enters the node.
 
virtual void BallGettingOut (BxSwVirtualBall b)
 Event called when a virtual ball quits the node.
 
BxSwEdgeSwitch AddSwitch (int slot, float start, float length)
 Add a switch.
 
BxSwEdgeSwitch AddTimeSwitch (int slot, float start, float time)
 Add a switch given activation time.
 
virtual void CheckSwitches (float lastPos, float pos)
 Rolled over/out of a switch? (Continuous detection)
 
void AddBallOnSwitch (BxSwEdgeSwitch sw, BxSwVirtualBall b)
 

Public Attributes

float m_length = 100.0f
 Length of the edge in mm.
 
float m_speed = 0.01f
 Time (in mm/seconds)of a ball along this edge.
 
BxSwNode m_in
 starting node
 
BxSwNode m_out
 ending node
 
string m_name
 name (automatic naming)
 
List< BxSwVirtualBallm_balls =new List<BxSwVirtualBall>()
 Balls running through this edge.
 
List< BxSwEdgeSwitchm_switches = new List<BxSwEdgeSwitch>()
 Switches along the edge.
 

Static Public Attributes

static int s_cpt =0
 static counter for automatic naming
 

The documentation for this class was generated from the following file: