Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Bugs
»
Light positions?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Light positions? (Read 5955 times)
mystara
int
Posts: 79
Light positions?
«
on:
July 08, 2007, 12:12:39 pm »
Hi,
I think this is a bug...
Light l = new Light(theWorld);
l.setPosition(new SimpleVector(1.0, 2.0, 3.0));
System.out.println(l.getPosition());
Gives output: (0.0,1.0,2.0)
Whereas I would expect: (1.0,2.0,3.0)
Using version 1.14 of JPCT
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Light positions?
«
Reply #1 on:
July 08, 2007, 12:33:39 pm »
Yes, the getPosition() seems to mix y- and x-coords. I'll correct it for the next version.
Logged
mystara
int
Posts: 79
Re: Light positions?
«
Reply #2 on:
July 08, 2007, 02:19:57 pm »
Is it a simple mix?
The output shows 0.0 which is not one of the inputs. And it loses 3.0 which is one of the inputs.
If it was mixing them, surely the values would be the same, but in the wrong order? Whereas this shows different values.
Logged
Melssj5
double
Posts: 724
Re: Light positions?
«
Reply #3 on:
July 08, 2007, 04:48:33 pm »
It seems like (x, y , z) went into (x-x, y-x, z-x)
Logged
Nada por ahora
EgonOlsen
Administrator
quad
Posts: 12297
Re: Light positions?
«
Reply #4 on:
July 08, 2007, 06:19:01 pm »
No, it's not just a mix. What it actually returns is this:
Code:
[Select]
SimpleVector res=new SimpleVector();
res.z = z;
res.y = x;
res.z = y;
return res;
As you can see, it's complete bogus. I'll fix it.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Bugs
»
Light positions?