draw_box3d(VECTOR* vMin,VECTOR* vMax, COLOR* vColor, var alpha)

Draws a 3D bounding box - an axis aligned wire frame box between two corner vertices.

Parameters:

vMin, vMax - Corner vertices of the bounding box, giving the minimum and maximum coordinates of the box.
vColor - BGR color vector of the box.
alpha - Transparency of the box, 0..100.

Speed:

Fast

Remarks:

Example (lite-C):

function draw_rotated_bbox(ENTITY* ent)
{
  VECTOR vMin,vMax;  	
  while(is(ent,VISIBLE))
  {
    vec_set(vMin,ent.min_x);    
    vec_rotate(vMin,ent.pan);
    vec_add(vMin,ent.x);
	
    vec_set(vMax,ent.max_x);
    vec_rotate(vMax,ent.pan);
    vec_add(vMax,ent.x);
	
    draw_box3d(vMin,vMax,vector(0,0,255),100);
    wait(1); 
  }
}

See also:

draw_text, draw_point3d, draw_line3d

► latest version online