Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3507 Members - Latest Member: Edgebteme

26. May 2012, 07:39:49 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)New Sphere Orientation
Pages: [1]
Print
Author Topic: New Sphere Orientation  (Read 1080 times)
Patheros
Getting respectable
***
Offline Offline

Posts: 267


Dead Dolphin


View Profile WWW Email
« on: 23. January 2007, 04:16:35 pm »

If you make use of the org.xith3d.geometry.Sphere class, you will maybe have to so something to get your code work as before.

There was a bug inside to Sphere class. Well it was not a real bug. But the poles of the Sphere were at front and back (at zero rotation). So it was necessary to put the Planet into a TransformGroup to correct this. This meant wasted GPU power.

I fixed the Sphere class to produce a spheric geometry with top and bottom poles and correct texture coordinates.

If you want the Sphere to be font-back-poled, just set the static boolean flag "frontBackSphere" of the Sphere class to true before you create any Sphere.

Marvin

Wouldn't it make more sense to have a constructor param that allows you to pick any axis? (or even an arbitrary angle?) The reason I say this who is to say what way is up? or what what way they want their planet to be rotated? (or other sphere). Just a thought.
Logged

"I like my method, what was my method again?" - Jon
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 23. January 2007, 06:27:30 pm »

Wouldn't it make more sense to have a constructor param that allows you to pick any axis? (or even an arbitrary angle?) The reason I say this who is to say what way is up? or what what way they want their planet to be rotated? (or other sphere). Just a thought.

Well, with homogenous textures is makes no difference, how the Sphere is initially oriented. But if you have a texture with certina up and down, you will certainly want your Sphere to match it. And in case of planetary Spheres you will certainly want to ratate around the axis through the poles.

But if I really have some spare time, I will look, if I can add some constructors.

Marvin
Logged
Patheros
Getting respectable
***
Offline Offline

Posts: 267


Dead Dolphin


View Profile WWW Email
« Reply #2 on: 23. January 2007, 08:48:56 pm »

Ahh, up down compared to texturing. I was thinking up down compared to x y z. My mistake.
Logged

"I like my method, what was my method again?" - Jon
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 23. January 2007, 09:17:54 pm »

Ahh, up down compared to texturing. I was thinking up down compared to x y z. My mistake.

Well both is correct Wink.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic