klampt.vis.gldraw module¶
OpenGL drawing functions for geometric primitives.
-
klampt.vis.gldraw.
bezier_curve
(x1, x2, x3, x4, res=0.01, textured=False)[source]¶ Draws a 3D Bezier curve with control points x1,x2,x3,x4 and resolution res. If textured=True, generate texture coordinates for each point (useful for applying patterns).
-
klampt.vis.gldraw.
box
(a=(0, 0, 0), b=(1, 1, 1), lighting=True, filled=True)[source]¶ Draws a 3D axis-aligned bounding box with lower corner a and upper corner b. If lighting is true, sends gl normal vectors. If filled = True, draws it solidly. Otherwise, only the wireframe is drawn.
-
klampt.vis.gldraw.
centered_box
(dims=(1, 1, 1), lighting=True, filled=True)[source]¶ Draws a box centered around the origin with the given width x height x depth
-
klampt.vis.gldraw.
circle
(center, radius, res=0.01, filled=True)[source]¶ Draws a 2D circle with the given center, radius, and angular resolution. If filled=true, it is drawn filled, otherwise, it is drawn as a wireframe.
-
klampt.vis.gldraw.
hermite_curve
(x1, v1, x2, v2, res=0.01, textured=False)[source]¶ Draws a 3D Hermite curve with control points x1,v1,x2,v2 and resolution res. If textured=True, generate texture coordinates for each point (useful for applying patterns).
-
klampt.vis.gldraw.
quad
(a, b, c, d, lighting=True, filled=True)[source]¶ Draws a 3D quad with points a,b,c,d. If lighting is true, computes a GL normal vector dynamically. If filled=true, it is drawn filled, otherwise, it is drawn as a wireframe.
-
klampt.vis.gldraw.
setcolor
(r, g, b, a=1.0, lighting=True)[source]¶ Sets the current color/material, depending on the lighting flag