Polyvector

Previous topic - Next topic

MrPlow

Hi,

Can someone help explain a Polyvector and how to draw a basic shape like a rock..(5 - 6 sided object)
Plus how the collision detection would work for such a shape...

It would help me a lot! :nw:
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

hardyx

#1
Polyvector allows to draw a polygon object. You must to use STARTPOLY and then the vertices with the order POLYVECTOR, and ENDPOLY to finish the polygon. The polygon is composed of triangles, ordered depending the imode. In the POLYVECTOR order you specify the x,y of the vertex and the RGB colour you want to draw the vertex. You can adjust a sprite (texture) to the polygon area, this is the index parameter of the STARTPOLY; or you can draw a coloured polygon with -1.

http://www.glbasic.com/xmlhelp.php?lang=en&id=67&action=view
http://www.glbasic.com/xmlhelp.php?lang=en&id=66&action=view

MrPlow

Thanks a lot ....

I think i get it now...finally...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs