ns-allinone-2.35/nam-1.15/queue.cc
void
QueueItem::locate(float x, float y, float dx, float dy) {
  // Bottom Left Corner
  px_[0] = x;
  py_[0] = y;

  // Bottom Right Corner 
  x += dy;
  y -= dx;
  px_[1] = x;
  py_[1] = y;

  // Top Right Corner
  x += dx;
  y += dy;
  px_[2] = x;
  py_[2] = y;

  // Top  Left Corner
  x -= dy;
  y += dx;
  px_[3] = x;
  py_[3] = y;

  update_bb();
}
//----------------------------------------------------------------------
// void 
// QueueItem::locate(float x, float y, float dx, float dy)
//   - Place a queue item with it's bottom left corner at x,y.
//   - dx, dy are the width and height of the diagonal of the diamond
//     drawn to represent the queue item.
//   - In a vertical queue dx is 0 due to the way the Queue::place()
//     calculates packet height and width.
//----------------------------------------------------------------------
void
QueueItem::locate(float x, float y, float dx, float dy)
Place a queue item with it's bottom left corner at x,y.
dx, dy are the width and height of the diagonal of the diamond
drawn to represent the queue item.
In a vertical queue dx is 0 due to the way the Queue::place()
calculates packet height and width.
void QueueItem :: locate ( float x float y float dx float dy ) Place a queue item with it ' s bottom left corner at x y . dx dy are the width and height of the diagonal of the diamond drawn to represent the queue item . In a vertical queue dx is 0 due to the way the Queue :: place () calculates packet height and width .
void
QueueItem::locate(float x, float y, float dx, float dy) {
  px_[0] = x;
  py_[0] = y;
  x += dy;
  y -= dx;
  px_[1] = x;
  py_[1] = y;
  x += dx;
  y += dy;
  px_[2] = x;
  py_[2] = y;
  x -= dy;
  y += dx;
  px_[3] = x;
  py_[3] = y;
  update_bb();
}
void QueueItem :: locate ( float x , float y , float dx , float dy ) { px_ [ 0 ] = x ; py_ [ 0 ] = y ; x += dy ; y -= dx ; px_ [ 1 ] = x ; py_ [ 1 ] = y ; x += dx ; y += dy ; px_ [ 2 ] = x ; py_ [ 2 ] = y ; x -= dy ; y += dx ; px_ [ 3 ] = x ; py_ [ 3 ] = y ; update_bb ( ) ; }
void
QueueItem::locate(float x, float y, float dx, float dy)
 Place a queue item with it's bottom left corner at x,y.
void QueueItem :: locate ( float x float y float dx float dy ) Place a queue item with it ' s bottom left corner at x y .
// Bottom Left Corner // Bottom Right Corner  // Top Right Corner // Top  Left Corner