cuboid()

Draws a cuboid in space. A cuboid is a generalized cube with diverging width, height and depth values. This is a high level alternative to using OpenGL calls directly. Fill color is set with glColor4f().

cuboid(x, y, z, width, height, depth)
  • x, y, z ... coordinates of the cuboid's center point
  • width, height, depth ... of the cuboid

Relevant examples: shape2D.py , shape3D.py , points.py , curve.py , line.py , ALL

In Context

def onDraw(self):
    cuboid(0, 0, 0, 1, 2, 3)
def onDraw(self):
    glColor4f(1.0, 0.5, 0.5, 1.0)
    cuboid(0, 0, 0, 1, 2, 3)
def onDrawOrtho(self):
    cuboid(200, 200, 0, 50, 50, 20)
Initiated by Stephan Hechenberger
Thanks to CADRE's 103