Difference between revisions of "Geometry"
(Created page with "Slick provides some simple geometry classes in the [http://slick.ninjacave.com/javadoc/org/newdawn/slick/geom/package-frame.html org.newdawn.slick.geom] package. These classes...") |
|||
Line 11: | Line 11: | ||
Each of these shapes is designed to be used (eventually) for collision though at the current time they're under development. Note that by far the most efficient collision checking to be using is circle vs circle, so where possible it's recommended you use circles or collections of circle to approximate your collision shapes. | Each of these shapes is designed to be used (eventually) for collision though at the current time they're under development. Note that by far the most efficient collision checking to be using is circle vs circle, so where possible it's recommended you use circles or collections of circle to approximate your collision shapes. | ||
+ | |||
+ | [[Category:Geometry]] |
Revision as of 16:53, 8 August 2013
Slick provides some simple geometry classes in the org.newdawn.slick.geom package. These classes were originally intended for basic collision detection but the basic rendering Graphics class has been extended to include rendering of the primitives at user's request.
It is not recommended that you render using primitives like rectangles, circles and polygons. While it is possible to render these shapes it isn't particularly efficient to do so in OpenGL especially as lines and so it's recommended that you use images where possible.
The following shapes are implemented/being implemented:
Each of these shapes is designed to be used (eventually) for collision though at the current time they're under development. Note that by far the most efficient collision checking to be using is circle vs circle, so where possible it's recommended you use circles or collections of circle to approximate your collision shapes.