drawLine
drawLine(start, end, color)
Draws a line.
start:
Type:
List [ x, y, z]
x = x
world coordinate
Type: float
y = y world coordinate
Type: float
z = z world coordinate
Type: float
end:
Type:
List [ x, y, z]
x = x
world coordinate
Type: float
y = y world coordinate
Type: float
z = z world coordinate
Type: float
color:
Type:
List [ r, g, b]
r =
red color value
Type: float
range: 0.0 - 1.0
g = green color value
Type: float
range: 0.0 - 1.0
b = blue color value
Type: float
range: 0.0 - 1.0
Note:
Line isn't permanent. It has to be redrawn
every time the frame is redrawn.
Sample
Code
# import Rasterizer
import Rasterizer
# draw a red line
start = [0.0, 0.0, 0.0]
end = [100.0, 100.0, 5.0]
color = [ 1.0, 0.0, 0.0]
# draw it
Rasterizer.drawLine( start, end, color)
|