Main Menu

Basics

Started by Mike Nelson, October 17, 2004, 01:38:59 AM

Previous topic - Next topic

Mike Nelson

Hello all!

first of all, this is a really cool engine man! props to ya.   Second of all. i was wondering if there were any apis or other instructions for creating basic shapes and moving them around and all. i wanted to make a little tank game to figure out how the whole thing works, but im not even sure how to make a square sitting on what looks like flat ground.  Do i build it triangle by triangle? are there functions somewhere like getCube(int size)? or some basic stuff like that?

any help is cool

Mike

EgonOlsen

Yes, there are. Have a look at the Primitives class. To texture the objects  that this class creates (not needed for cube and plane and such as they should already have the correct texture coords assigned), you can use the calcTextureWrapXXX-methods in Object3D.

Hope this helps.

Mike Nelson

sweet man this was exactly what i was looking for!

Mike Nelson

Does anyone have any source code for a really basic scene? just like a plane, with a couple random primitives on it? thats what im trying to do, and i modified the car example, but i guess i did it wrong.  i'll keep at it, but any help would be nice.

Mike

EgonOlsen

Maybe the old terrain example helps. It's not exactly what you want, but at least it should be easier to understand than the car example. Have a look here: http://www.jpct.net/download/TerrainGL.zip

I'm not really sure if it compiles with the latest version of jPCT, but if it doesn't, only minor changes should be required.