Arguments: 1) real: objectType Return Type: real
Creates a Primitive object.
Object types are:
OBJ_PRIMITIVE_2D: primitive (triangle) in the 2D space OBJ_SPRITE_2D: rectangle in the 2D space (usable by the ObjSprite2D_ functions). OBJ_SPRITE_LIST_2D: list of rectangles in the 2D space (usable by the ObjSpriteList2D_ functions). OBJ_PRIMITIVE_3D: primitive (triangle) in the 3D space OBJ_SPRITE_3D: rectangle in the 3D space (usable by the ObjSprite3D_ functions).
Arguments: 1) real: objectID 2) real const: primitiveType
Creates a Primitive object.
Primitive types are:
PRIMITIVE_TRIANGLELIST PRIMITIVE_TRIANGLESTRIP PRIMITIVE_TRIANGLEFAN PRIMITIVE_LINELIST PRIMITIVE_LINESTRIP PRIMITIVE_POINT_LIST
Arguments: 1) real: objectID 2) real: vertexCount
Sets the number of vertices the object contains.
Arguments: 1) real: objectID Return Type: real
Returns the number of vertices the object contains.
Note: When used on a sprite list object, returns the number of vertices added with ObjSpriteList2D_AddVertex * 6
Arguments: 1) real: objectID 2) string: pathTexture
Sets the specified texture on the object.
Loads the texture file if it has not already been loaded.
Arguments: 1) real: objectID 2) real: vertexIndex 3) real: x 4) real: y 5) real: z
Sets the position of the specified vertex.
Arguments: 1) real: objectID 2) real: vertexIndex Return Type: real array
Returns the position of the specified vertex in an array [x,y,z].
Arguments: 1) real: objectID 2) real: vertexIndex 3) real: textureX 4) real: textureY
Sets the UV-coordinates for the specified vertex.
The value for the coordinates must be in the range (0.0-1.0).
For example, if you want a vertex to be at the center-top of a 512×512 texture, you have to set x to 0.5 and y to 1.0.
As it may be troublesome to convert pixels into a 0.0-1.0 value, ObjPrim_SetVertexUVT is recommended.
Arguments: 1) real: objectID 2) real: vertexIndex 3) real: textureX 4) real: textureY
Sets the UV-coordinates for the specified vertex.
You must set the object's texture using ObjPrim_SetTexture beforehand.
Arguments: 1) real: objectID 2) real: red 3) real: green 4) real: blue
Sets the color of the specified vertex (0-255).
Arguments: 1) real: objectID 2) real: alpha
Sets the alpha value of the specified vertex (0-255).