Rasterizer Module -- Blender Game Engine 2.49b



 




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)

 
Blender 3D game developers can use the Blender 3D game engine to create casual video games, first and third person shooters, role playing games, racing simulations and more. The game engine can be used to make both 2D games and 3D games.  Beginning Blender 3D game developers will only need basic knowledge of game design and programming to create rich and complex game models with photo realistic textures to add detail to the graphics of the video game.  Today's games need more than good looking low polygon game models.  Use normal maps and photo realistic textures to create high quality game models.