25 output_value(std::ostream &out,
const ACMatrixSwitchType::ValueType &value) {
26 LVecBase3 scale, shear, hpr, translate;
27 if (decompose_matrix(value, scale, shear, hpr, translate)) {
28 if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
29 if (IS_NEARLY_EQUAL(scale[0], scale[1]) &&
30 IS_NEARLY_EQUAL(scale[1], scale[2])) {
31 out <<
" scale " << scale[0];
33 out <<
" scale " << scale;
36 if (!shear.almost_equal(LVecBase3(0.0f, 0.0f, 0.0f))) {
37 out <<
" shear " << shear;
40 if (!hpr.almost_equal(LVecBase3(0.0f, 0.0f, 0.0f))) {
41 out <<
" hpr " << hpr;
44 if (!translate.almost_equal(LVecBase3(0.0f, 0.0f, 0.0f))) {
45 out <<
" trans " << translate;
49 out <<
" mat " << value;
static void output_value(std::ostream &out, const ValueType &value)
Outputs a very brief description of a matrix.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.