Author Topic: Basics  (Read 4720 times)

Offline Mike Nelson

  • byte
  • *
  • Posts: 6
    • View Profile
Basics
« on: October 17, 2004, 01:38:59 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Basics
« Reply #1 on: October 17, 2004, 01:52:21 pm »
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.

Offline Mike Nelson

  • byte
  • *
  • Posts: 6
    • View Profile
Basics
« Reply #2 on: October 18, 2004, 07:10:16 am »
sweet man this was exactly what i was looking for!

Offline Mike Nelson

  • byte
  • *
  • Posts: 6
    • View Profile
Basics
« Reply #3 on: October 18, 2004, 09:41:12 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Basics
« Reply #4 on: October 19, 2004, 05:21:44 pm »
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.