DS Opera SDK v3.0
Easily add useful functionality to your games for the Nintendo DSi Browser.
Classes:
1. Drawing - Polygon mesh plotting to a canvas
1. ThreeD - 3D matrix math for triangles and hidden surfaces
Drawing
- null = clear( x1,y1, x2,y2 )
Erases all contents of the given canvas section
- null = drawCircle( x,y,rad, fillFlags )
Draws a filled or stroked circle
- null = drawLine( x1,y1, x2,y2 )
Draws a line segment
- null = drawRectangle( x1,y1, x2,y2, fillFlags )
Draws a rectangle
- null = drawScene( Array[ ][x1,y1, x2,y2, x3,y3, r,g,b], fillFlags )
Draws a scene of triangles
- null = initialize( Canvas )
Sets the current canvas object for drawing
- null = setFillColor( r,g,b )
Sets the RGB value of all upcoming fills
- null = setLineColor( r,g,b )
Sets the RGB value of all upcoming lines
- Constants
fillFlags: WIREFRAME,SHADE
ThreeD
- null = backface( )
Removes hidden triangles from the buffered object
- null = explode( x,y,z )
Shifts the buffered triangles along their normals a given distance
- Array[ ][x1,y1,z1, x2,y2,z2, x3,y3,z3, r,g,b] = getPoints( )
Retrieves the buffered mesh
- Array[ ][x1, y1, x2, y2, x3, y3, r, g, b] = getTranslation( )
Retrieves the 2D translation of the buffered triangles for display
- null = loadMesh( meshString )
Loads a pre-made 3D mesh into the triangle buffer
- null = move( x,y,z )
Shifts the buffered triangles
- null = rotate( anglex, angley, anglez )
Rotates the buffered triangles
- null = scale( x,y,z )
Zooms the buffered triangles by a given factor
- null = setCenter( x,y )
Sets the perspective center for 3D to 2D translation
- null = setLight( x,y,z )
Sets the current light source for shading
- null = setPoints( Array[ ][x1,y1,z1, x2,y2,z2, x3,y3,z3, r,g,b] )
Places an array of polygons into the buffer
- null = shade( )
Flat shades the buffered triangles based on SetLight()
- null = zSort( )
Orders the buffered polygons for proper display
- Constants
none