mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
debug messages
This commit is contained in:
parent
90918d5f6c
commit
1bc836605f
@ -27,14 +27,15 @@ compose_matrix(FLOATNAME(LMatrix3) &mat,
|
|||||||
const FLOATNAME(LVecBase3) &hpr,
|
const FLOATNAME(LVecBase3) &hpr,
|
||||||
CoordinateSystem cs) {
|
CoordinateSystem cs) {
|
||||||
|
|
||||||
// temp_hpr_fix blocks use the correct way. need to keep other way as default until
|
// temp_hpr_fix blocks use the correct way. need to keep other way
|
||||||
// legacy tools are fixed to work with correct way
|
// as default until legacy tools are fixed to work with correct way
|
||||||
|
|
||||||
if (temp_hpr_fix) {
|
if (temp_hpr_fix) {
|
||||||
mat.scale_multiply(scale,
|
mat.scale_multiply(scale,
|
||||||
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[2], FLOATNAME(LVector3)::forward(cs), cs) *
|
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[2], FLOATNAME(LVector3)::forward(cs), cs) *
|
||||||
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[1], FLOATNAME(LVector3)::right(cs), cs) *
|
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[1], FLOATNAME(LVector3)::right(cs), cs) *
|
||||||
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[0], FLOATNAME(LVector3)::up(cs), cs));
|
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[0], FLOATNAME(LVector3)::up(cs), cs));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mat.scale_multiply(scale,
|
mat.scale_multiply(scale,
|
||||||
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[1], FLOATNAME(LVector3)::right(cs), cs) *
|
FLOATNAME(LMatrix3)::rotate_mat_normaxis(hpr[1], FLOATNAME(LVector3)::right(cs), cs) *
|
||||||
@ -523,6 +524,11 @@ decompose_matrix(const FLOATNAME(LMatrix3) &mat,
|
|||||||
cs = default_coordinate_system;
|
cs = default_coordinate_system;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (linmath_cat.is_debug()) {
|
||||||
|
linmath_cat.debug()
|
||||||
|
<< "decomposing " << mat << " via cs " << cs << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Extract the rotation and scale, according to the coordinate
|
// Extract the rotation and scale, according to the coordinate
|
||||||
// system of choice.
|
// system of choice.
|
||||||
bool bMatHasNoShear,bIsLeftHandedMat;
|
bool bMatHasNoShear,bIsLeftHandedMat;
|
||||||
@ -582,6 +588,11 @@ decompose_matrix(const FLOATNAME(LMatrix3) &mat,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (linmath_cat.is_debug()) {
|
||||||
|
linmath_cat.debug()
|
||||||
|
<< "after unwind, mat is " << new_mat << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
scale[2] = new_mat._m.m._22;
|
scale[2] = new_mat._m.m._22;
|
||||||
if(bIsLeftHandedMat) {
|
if(bIsLeftHandedMat) {
|
||||||
scale[0] = -new_mat._m.m._00;
|
scale[0] = -new_mat._m.m._00;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user