Author Topic: Put an triangle on a sphere  (Read 3183 times)

Offline krausi

  • byte
  • *
  • Posts: 4
    • View Profile
Put an triangle on a sphere
« on: July 25, 2012, 03:41:45 pm »
Hallo,

at first i'm very new to JPCT-AE.
All in all i want to put a filled triangle on the surface of a sphere.

I have the sphere already. But how do i put a triangle on the surface?
Ive tried the addTriangle() method but it didnt works.
Maybe i created wrong SimpleVectors.

I would be very happy if somebody can help me.

PS: Please give a detailed answer because im very new to this topic.



thank you  :)

Offline krausi

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Put an triangle on a sphere
« Reply #1 on: July 25, 2012, 03:44:04 pm »
sry i put it to jpct :(

it belongs to the jpct-ae (android topic)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Put an triangle on a sphere
« Reply #2 on: July 26, 2012, 07:17:14 am »
I'm not quite sure what you are trying to do...you have a sphere (an Object3D..!?) and you want to create new Object3D that contains only one polygon? Or the sphere isn't an object at all? Or it's an object and you want to add a polygon... ???

Offline krausi

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Put an triangle on a sphere
« Reply #3 on: July 26, 2012, 09:45:04 am »
No i have the sphere already. (Object 3D Model load from asc file) The sphere works fine.

But now i want to put a triangle on the surface of the sphere.

Do you know what i mean? :-)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Put an triangle on a sphere
« Reply #4 on: July 26, 2012, 10:26:13 pm »
You want to create an Object3D that contains one triangle that is located on the sphere!?

Offline krausi

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Put an triangle on a sphere
« Reply #5 on: July 27, 2012, 12:22:59 pm »
yes

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Put an triangle on a sphere
« Reply #6 on: July 27, 2012, 12:41:32 pm »
And if you try that, the result isn't visible? If so, try to call setCulling(false); and see if that helps. If it does, your vertex order in the object is wrong.