be even more forgiving of componentwise transforms

This commit is contained in:
David Rose 2002-06-25 18:59:17 +00:00
parent 84291066be
commit 60cc983f84

View File

@ -695,10 +695,12 @@ do_compose(const TransformState *other) const {
nassertr((other->_flags & F_is_invalid) == 0, other);
if (compose_componentwise &&
components_given() && has_uniform_scale() &&
other->components_given()) {
// We will do this operation componentwise if both transforms were
// given componentwise, and no non-uniform scale is involved.
has_uniform_scale() &&
((components_given() && other->has_components()) ||
(other->components_given() && has_components()))) {
// We will do this operation componentwise if *either* transform
// was given componentwise (and there is no non-uniform scale in
// the way).
LVecBase3f pos = get_pos();
LQuaternionf quat = get_quat();
@ -746,11 +748,12 @@ do_invert_compose(const TransformState *other) const {
nassertr((other->_flags & F_is_invalid) == 0, other);
if (compose_componentwise &&
components_given() && has_uniform_scale() &&
(other->is_identity() ||
(other->components_given()))) {
// We will do this operation componentwise if both transforms were
// given componentwise, and no non-uniform scale is involved.
has_uniform_scale() &&
((components_given() && other->has_components()) ||
(other->components_given() && has_components()))) {
// We will do this operation componentwise if *either* transform
// was given componentwise (and there is no non-uniform scale in
// the way).
LVecBase3f pos = get_pos();
LQuaternionf quat = get_quat();