Age | Commit message (Collapse) | Author |
|
Before the normalization function was asserting if it couldn't
normalize now the caller can determine what to do with a failed
normalization.
|
|
The X and Z rotation already follow the convention given in wikipedia,
but the Y axis rotation doesn't (its the negative angle) so I switched
that and updated where that was used.
This allowed stray negatives for angle calls to this function (for Y
rotations) to be removed from other parts of the code (dvector).
In theory this was a non-functional change. In dvector the code was taking
the negative of the angle so it was essentially doing the negative of the
negative, but when it was used once in star_camera it was not
(when it should of been). So That was changed. That part of the code
was used for locking onto the third star after the 2nd was already locked.
I can't tell if the star control puzzle has improved after this change.
It can still have issues locking onto the 2nd star and also not.
Also added lots of todos for things to check.
|
|
Made default constructor col4 construction explicit.
Change amount argument to be angle_deg. Added constant
from dvector that does conversion from degrees to radians".
Also moved conversion constants for angles in dvector to
header file so daffine could use that.
|
|
|
|
It does a rotation around the X axis then Y.
|
|
This function was using two vectors one as a frame rotation and
the other as a vector/point rotation.
This function is only used in when you click on a star in starview.
|
|
replace atan2 implementation
fn3 in dvector returns a vector that stores a magnitude, and 2 angles.
The second angle (the z component of the returned vector) was the angle
that the internal vector was between its z and x axis.
This angle was obtained by doing a poor man 4-quadrant atan implementation
and it gave large values for negative x. This has been replaced with the
atan2 standard function.
|
|
|
|
It does a matrix product with a vector and a z translation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|