d3d_draw_cone(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat,closed,steps)
Jump to navigation
Jump to search
Description
Draws a cone by filling a triangle fan with the given number of steps between the given points with the given texture repeated so many times.
Parameters
Parameter | Data Type | Description |
---|---|---|
x1 | gs_scalar | x coordinate of the first vector |
y1 | gs_scalar | y coordinate |
z1 | gs_scalar | z coordinate |
x2 | gs_scalar | x coordinate of the second vector |
y2 | gs_scalar | y coordinate |
z2 | gs_scalar | z coordinate |
texid | integer | index of the texture |
hrepeat | gs_scalar | number of times to repeat the texture horizontally |
vrepeat | gs_scalar | number of times to repeat the texture vertically |
closed | boolean | whether or not the flat part of the cone should be rendered or you should be able to see inside the cone |
steps | integer | how many triangles to make around the center point, higher values result in smoother but slower to render cones, lower values such as 3 and 4 can be used to make pyramids |
Return Values
void: This function does not return anything.
Example Call
// demonstrates drawing a 3 sided pyramid
d3d_draw_cone(x - 5, y - 5, z, x + 5, y + 5, z + 10, texid, 1, 1, true, 3);