box

_images/box.jpg _images/box_axis_up_small.png
box(pos=vec(0, 0, 0), length=3, height=2, width=1, color=color.cyan)
Parameters:
  • pos (vector) – Position of center. Default <0,0,0>.

  • axis (vector) – Extends from left to right end. Default <1,0,0>.

  • color (vector) – Default color.white.

  • length (scalar) – Length of box. Default 1.

  • height (scalar) – Height of box. Default 1.

  • width (scalar) – Width of box. Default 1.

  • size (vector) – Length, width, and height in one vector. An alternative to length, height, width.

Attributes used less often:

box(opacity=0.5, shininess=0.2, texture=textures.wood, make_trail=True, canvas=mycanvas, emissive=False)
Parameters:
  • opacity (scalar) – Default 1.0; Range 0-1.

  • shininess (scalar) – Default 0.6; Range 0-1.

  • emissive (boolean) – Default False. Object glows, losing all shading, if True.

  • texture (class element or path) – Default None.

  • visible (boolean) – If False, object is not displayed. Default: True

  • canvas (object) – Default is scene.

  • make_trail (boolean) – If True, object leaves a trail when moved.

  • up (vector) – A vector perpendicular to the axis.

  • group (object) – The group to which this object belongs.