Functions for drawing in 3D. More...
Public Member Functions | |
| void | BindVertexBuffer (integer vertexBufferIndex) |
| Binds a vertex buffer. | |
| void | UnbindVertexBuffer () |
| Unbinds the currently bound vertex buffer. | |
| void | BindScene (integer scene3DIndex) |
| Binds a 3D scene for drawing polygons in 3D space. | |
| void | Model (integer modelIndex, integer animation, decimal frame, matrix matrixModel, matrix matrixNormal) |
| Draws a model. | |
| void | ModelSkinned (integer modelIndex, integer armatureIndex, matrix matrixModel, matrix matrixNormal) |
| Draws a skinned model. | |
| void | ModelSimple (integer modelIndex, integer animation, integer frame, number x, number y, number scale, number rx, number ry, number rz) |
| Draws a model without using matrices. | |
| void | Triangle (number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, integer color1, integer color2, integer color3, matrix matrixModel, matrix matrixNormal) |
| Draws a triangle in 3D space. | |
| void | Quad (number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, number x4, number y4, number z4, integer color1, integer color2, integer color3, integer color4, matrix matrixModel, matrix matrixNormal) |
| Draws a quadrilateral in 3D space. | |
| void | Sprite (integer sprite, integer animation, integer frame, number x, number y, number z, integer flipX, integer flipY, number scaleX, number scaleY, matrix matrixModel, matrix matrixNormal) |
| Draws a sprite in 3D space. | |
| void | SpritePart (integer sprite, integer animation, integer frame, number x, number y, number z, integer partX, integer partY, integer partW, integer partH, integer flipX, integer flipY, number scaleX, number scaleY, matrix matrixModel, matrix matrixNormal) |
| Draws part of a sprite in 3D space. | |
| void | Image (integer image, number x, number y, number z, matrix matrixModel, matrix matrixNormal) |
| Draws an image in 3D space. | |
| void | ImagePart (integer image, number x, number y, number z, integer partX, integer partY, integer partW, integer partH, matrix matrixModel, matrix matrixNormal) |
| Draws part of an image in 3D space. | |
| void | Tile (integer ID, number x, number y, number z, integer flipX, integer flipY, matrix matrixModel, matrix matrixNormal) |
| Draws a tile in 3D space. | |
| void | TriangleTextured (integer image, number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, integer color1, integer color2, integer color3, number u1, number v1, number u2, number v2, number u3, number v3, matrix matrixModel, matrix matrixNormal) |
| Draws a textured triangle in 3D space. The texture source should be an image. | |
| void | QuadTextured (integer image, number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, number x4, number y4, number z4, integer color1, integer color2, integer color3, integer color4, number u1, number v1, number u2, number v2, number u3, number v3, number u4, number v4, matrix matrixModel, matrix matrixNormal) |
| Draws a textured quad in 3D space. The texture source should be an image. | |
| void | SpritePoints (integer sprite, integer animation, integer frame, integer flipX, integer flipY, number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, number x4, number y4, number z4, integer color1, integer color2, integer color3, integer color4, matrix matrixModel, matrix matrixNormal) |
| Draws a textured rectangle in 3D space. The texture source should be a sprite. | |
| void | TilePoints (integer ID, integer flipX, integer flipY, number x1, number y1, number z1, number x2, number y2, number z2, number x3, number y3, number z3, number x4, number y4, number z4, integer color1, integer color2, integer color3, integer color4, matrix matrixModel, matrix matrixNormal) |
| Draws a textured rectangle in 3D space. | |
| void | SceneLayer (integer layer, matrix matrixModel, matrix matrixNormal) |
| Draws a scene layer in 3D space. | |
| void | SceneLayerPart (integer layer, integer partX, integer partY, integer partW, integer partH, matrix matrixModel, matrix matrixNormal) |
| Draws part of a scene layer in 3D space. | |
| void | VertexBuffer (integer vertexBufferIndex, matrix matrixModel, matrix matrixNormal) |
| Draws a vertex buffer. | |
| void | RenderScene (integer scene3DIndex, integer drawMode) |
| Draws everything in the 3D scene. | |
Functions for drawing in 3D.
| void Draw3D.BindScene | ( | integer | scene3DIndex | ) |
Binds a 3D scene for drawing polygons in 3D space.
| scene3DIndex | Sets the 3D scene to bind. |
| void Draw3D.BindVertexBuffer | ( | integer | vertexBufferIndex | ) |
Binds a vertex buffer.
| vertexBufferIndex | Sets the vertex buffer to bind. |
| void Draw3D.Image | ( | integer | image, |
| number | x, | ||
| number | y, | ||
| number | z, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws an image in 3D space.
| image | Index of the loaded image. |
| x | X position of where to draw the image. |
| y | Y position of where to draw the image. |
| z | Z position of where to draw the image. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.ImagePart | ( | integer | image, |
| number | x, | ||
| number | y, | ||
| number | z, | ||
| integer | partX, | ||
| integer | partY, | ||
| integer | partW, | ||
| integer | partH, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws part of an image in 3D space.
| image | Index of the loaded image. |
| x | X position of where to draw the image. |
| y | Y position of where to draw the image. |
| z | Z position of where to draw the image. |
| partX | X coordinate of part of image to draw. |
| partY | Y coordinate of part of image to draw. |
| partW | Width of part of image to draw. |
| partH | Height of part of image to draw. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.Model | ( | integer | modelIndex, |
| integer | animation, | ||
| decimal | frame, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a model.
| modelIndex | Index of loaded model. |
| animation | Animation of model to draw. |
| frame | Frame of model to draw. |
| matrixModel | Matrix for transforming model coordinates to world space. |
| matrixNormal | Matrix for transforming model normals. |
| void Draw3D.ModelSimple | ( | integer | modelIndex, |
| integer | animation, | ||
| integer | frame, | ||
| number | x, | ||
| number | y, | ||
| number | scale, | ||
| number | rx, | ||
| number | ry, | ||
| number | rz ) |
Draws a model without using matrices.
| modelIndex | Index of loaded model. |
| animation | Animation of model to draw. |
| frame | Frame of model to draw. |
| x | X position |
| y | Y position |
| scale | Model scale |
| rx | X rotation in radians |
| ry | Y rotation in radians |
| rz | Z rotation in radians |
| void Draw3D.ModelSkinned | ( | integer | modelIndex, |
| integer | armatureIndex, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a skinned model.
| modelIndex | Index of loaded model. |
| armatureIndex | Armature index to skin the model. |
| matrixModel | Matrix for transforming model coordinates to world space. |
| matrixNormal | Matrix for transforming model normals. |
| void Draw3D.Quad | ( | number | x1, |
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| number | x4, | ||
| number | y4, | ||
| number | z4, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| integer | color4, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a quadrilateral in 3D space.
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| x4 | X position of the fourth vertex. |
| y4 | Y position of the fourth vertex. |
| z4 | Z position of the fourth vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| color4 | Color of the fourth vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.QuadTextured | ( | integer | image, |
| number | x1, | ||
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| number | x4, | ||
| number | y4, | ||
| number | z4, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| integer | color4, | ||
| number | u1, | ||
| number | v1, | ||
| number | u2, | ||
| number | v2, | ||
| number | u3, | ||
| number | v3, | ||
| number | u4, | ||
| number | v4, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a textured quad in 3D space. The texture source should be an image.
| image | Index of the loaded image. |
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| x4 | X position of the fourth vertex. |
| y4 | Y position of the fourth vertex. |
| z4 | Z position of the fourth vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| color4 | Color of the fourth vertex. |
| u1 | Texture U of the first vertex. |
| v1 | Texture V of the first vertex. |
| u2 | Texture U of the second vertex. |
| v2 | Texture V of the second vertex. |
| u3 | Texture U of the third vertex. |
| v3 | Texture V of the third vertex. |
| u4 | Texture U of the fourth vertex. |
| v4 | Texture V of the fourth vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.RenderScene | ( | integer | scene3DIndex, |
| integer | drawMode ) |
Draws everything in the 3D scene.
| scene3DIndex | The 3D scene at the index to draw. |
| drawMode | The type of drawing to use for the vertices in the 3D scene. |
| void Draw3D.SceneLayer | ( | integer | layer, |
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a scene layer in 3D space.
| layer | Index of the layer. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.SceneLayerPart | ( | integer | layer, |
| integer | partX, | ||
| integer | partY, | ||
| integer | partW, | ||
| integer | partH, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws part of a scene layer in 3D space.
| layer | Index of the layer. |
| partX | X coordinate (in tiles) of part of layer to draw. |
| partY | Y coordinate (in tiles) of part of layer to draw. |
| partW | Width (in tiles) of part of layer to draw. |
| partH | Height (in tiles) of part of layer to draw. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.Sprite | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame, | ||
| number | x, | ||
| number | y, | ||
| number | z, | ||
| integer | flipX, | ||
| integer | flipY, | ||
| number | scaleX, | ||
| number | scaleY, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a sprite in 3D space.
| sprite | Index of the loaded sprite. |
| animation | Index of the animation entry. |
| frame | Index of the frame in the animation entry. |
| x | X position of where to draw the sprite. |
| y | Y position of where to draw the sprite. |
| z | Z position of where to draw the sprite. |
| flipX | Whether to flip the sprite horizontally. |
| flipY | Whether to flip the sprite vertically. |
| scaleX | Scale multiplier of the sprite horizontally. |
| scaleY | Scale multiplier of the sprite vertically. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.SpritePart | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame, | ||
| number | x, | ||
| number | y, | ||
| number | z, | ||
| integer | partX, | ||
| integer | partY, | ||
| integer | partW, | ||
| integer | partH, | ||
| integer | flipX, | ||
| integer | flipY, | ||
| number | scaleX, | ||
| number | scaleY, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws part of a sprite in 3D space.
| sprite | Index of the loaded sprite. |
| animation | Index of the animation entry. |
| frame | Index of the frame in the animation entry. |
| x | X position of where to draw the sprite. |
| y | Y position of where to draw the sprite. |
| z | Z position of where to draw the sprite. |
| partX | X coordinate of part of frame to draw. |
| partY | Y coordinate of part of frame to draw. |
| partW | Width of part of frame to draw. |
| partH | Height of part of frame to draw. |
| flipX | Whether to flip the sprite horizontally. |
| flipY | Whether to flip the sprite vertically. |
| scaleX | Scale multiplier of the sprite horizontally. |
| scaleY | Scale multiplier of the sprite vertically. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.SpritePoints | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame, | ||
| integer | flipX, | ||
| integer | flipY, | ||
| number | x1, | ||
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| number | x4, | ||
| number | y4, | ||
| number | z4, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| integer | color4, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a textured rectangle in 3D space. The texture source should be a sprite.
| sprite | Index of the loaded sprite. |
| animation | Index of the animation entry. |
| frame | Index of the frame in the animation entry. |
| flipX | Whether to flip the sprite horizontally. |
| flipY | Whether to flip the sprite vertically. |
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| x4 | X position of the fourth vertex. |
| y4 | Y position of the fourth vertex. |
| z4 | Z position of the fourth vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| color4 | Color of the fourth vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.Tile | ( | integer | ID, |
| number | x, | ||
| number | y, | ||
| number | z, | ||
| integer | flipX, | ||
| integer | flipY, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a tile in 3D space.
| ID | ID of the tile to draw. |
| x | X position of where to draw the tile. |
| y | Y position of where to draw the tile. |
| z | Z position of where to draw the tile. |
| flipX | Whether to flip the tile horizontally. |
| flipY | Whether to flip the tile vertically. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.TilePoints | ( | integer | ID, |
| integer | flipX, | ||
| integer | flipY, | ||
| number | x1, | ||
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| number | x4, | ||
| number | y4, | ||
| number | z4, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| integer | color4, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a textured rectangle in 3D space.
| ID | ID of the tile to draw. |
| flipX | Whether to flip the tile horizontally. |
| flipY | Whether to flip the tile vertically. |
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| x4 | X position of the fourth vertex. |
| y4 | Y position of the fourth vertex. |
| z4 | Z position of the fourth vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| color4 | Color of the fourth vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.Triangle | ( | number | x1, |
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a triangle in 3D space.
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.TriangleTextured | ( | integer | image, |
| number | x1, | ||
| number | y1, | ||
| number | z1, | ||
| number | x2, | ||
| number | y2, | ||
| number | z2, | ||
| number | x3, | ||
| number | y3, | ||
| number | z3, | ||
| integer | color1, | ||
| integer | color2, | ||
| integer | color3, | ||
| number | u1, | ||
| number | v1, | ||
| number | u2, | ||
| number | v2, | ||
| number | u3, | ||
| number | v3, | ||
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a textured triangle in 3D space. The texture source should be an image.
| image | Index of the loaded image. |
| x1 | X position of the first vertex. |
| y1 | Y position of the first vertex. |
| z1 | Z position of the first vertex. |
| x2 | X position of the second vertex. |
| y2 | Y position of the second vertex. |
| z2 | Z position of the second vertex. |
| x3 | X position of the third vertex. |
| y3 | Y position of the third vertex. |
| z3 | Z position of the third vertex. |
| color1 | Color of the first vertex. |
| color2 | Color of the second vertex. |
| color3 | Color of the third vertex. |
| u1 | Texture U of the first vertex. |
| v1 | Texture V of the first vertex. |
| u2 | Texture U of the second vertex. |
| v2 | Texture V of the second vertex. |
| u3 | Texture U of the third vertex. |
| v3 | Texture V of the third vertex. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |
| void Draw3D.VertexBuffer | ( | integer | vertexBufferIndex, |
| matrix | matrixModel, | ||
| matrix | matrixNormal ) |
Draws a vertex buffer.
| vertexBufferIndex | The vertex buffer to draw. |
| matrixModel | Matrix for transforming coordinates to world space. |
| matrixNormal | Matrix for transforming normals. |