mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
-TT x,y,z doesn't work properly with vertex pools under a transform node
This commit is contained in:
parent
447afa95d8
commit
75762f560a
@ -283,9 +283,11 @@ set_coordinate_system(CoordinateSystem new_coordsys) {
|
||||
if (new_coordsys != _coordsys &&
|
||||
(_coordsys != CS_default && _coordsys != CS_invalid)) {
|
||||
// Time to convert the data.
|
||||
r_transform(LMatrix4d::convert_mat(_coordsys, new_coordsys),
|
||||
LMatrix4d::convert_mat(new_coordsys, _coordsys),
|
||||
new_coordsys);
|
||||
LMatrix4d mat = LMatrix4d::convert_mat(_coordsys, new_coordsys);
|
||||
LMatrix4d inv = LMatrix4d::convert_mat(new_coordsys, _coordsys);
|
||||
|
||||
r_transform(mat, inv, new_coordsys);
|
||||
r_transform_vertices(mat);
|
||||
|
||||
// Now we have to update the under_flags to ensure that all the
|
||||
// cached relative matrices are correct.
|
||||
|
@ -971,7 +971,7 @@ adjust_under() {
|
||||
void EggGroup::
|
||||
r_transform(const LMatrix4d &mat, const LMatrix4d &inv,
|
||||
CoordinateSystem to_cs) {
|
||||
if (!transform_is_identity()) {
|
||||
if (has_transform()) {
|
||||
// Since we want to apply this transform to all matrices,
|
||||
// including nested matrices, we can't simply premult it in and
|
||||
// leave it, because that would leave the rotational component in
|
||||
|
@ -318,6 +318,7 @@ transform(const LMatrix4d &mat) {
|
||||
LMatrix4d inv = invert(mat);
|
||||
|
||||
r_transform(mat, inv, CS_default);
|
||||
r_transform_vertices(mat);
|
||||
|
||||
// Now we have to recompute the under_flags to ensure that all the
|
||||
// cached relative matrices are correct.
|
||||
|
@ -415,7 +415,6 @@ write(ostream &out, int indent_level) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void EggVertexPool::
|
||||
r_transform(const LMatrix4d &mat, const LMatrix4d &, CoordinateSystem) {
|
||||
transform(mat);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user