lp0 On Fire!
conversion between polar cordinate and normal 3D cordinate?
I have 3D space with following cordinate system:
unit up vector: 0.0, 0.0, 1.0
unit right vector: 1.0, 0.0, 0.0
unit depth vector: 0.0, 1.0, 0.0
cordinates are floats.
I also have a definition for Light (sun in this case.) as in polar cordinates:
Yaw Angle in radian system
Pitch Angle in radian system
How do I convert Light direction to unit vector in the mentioned 3D cordinate system? I know it is just all about Pythagora's triangle geometry, but while I did a one, I got very badly mixed up because I usually use 3D space where Y -axle points up, not Z.
what for I am doing this? well, I have done a tracer for recalculating vertex shadow information in NFS4 tracks... and it is a bit pointless even test run it if you can't figure out where the light should be.
all help is greatly appriciated.
Nappe1 of Division & Future Vision
Founder of AF3DE