mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
ok, how about using correct linear algebra
This commit is contained in:
parent
52d5db9c15
commit
f9c10939b1
@ -289,8 +289,8 @@ void GuiButton::adjust_region(void) {
|
||||
// adjust for graph transform
|
||||
LMatrix4f m;
|
||||
this->get_graph_mat(m);
|
||||
LVector3f ul = LVector3f::rfu(_left, 0., _top);
|
||||
LVector3f lr = LVector3f::rfu(_right, 0., _bottom);
|
||||
LPoint3f ul = LVector3f::rfu(_left, 0., _top);
|
||||
LPoint3f lr = LVector3f::rfu(_right, 0., _bottom);
|
||||
ul = m * ul;
|
||||
lr = m * lr;
|
||||
_left = ul.dot(LVector3f::rfu(1., 0., 0.));
|
||||
|
@ -74,8 +74,8 @@ void GuiRollover::adjust_region(void) {
|
||||
// adjust for graph transform
|
||||
LMatrix4f m;
|
||||
this->get_graph_mat(m);
|
||||
LVector3f ul = LVector3f::rfu(_left, 0., _top);
|
||||
LVector3f lr = LVector3f::rfu(_right, 0., _bottom);
|
||||
LPoint3f ul = LVector3f::rfu(_left, 0., _top);
|
||||
LPoint3f lr = LVector3f::rfu(_right, 0., _bottom);
|
||||
ul = m * ul;
|
||||
lr = m * lr;
|
||||
_left = ul.dot(LVector3f::rfu(1., 0., 0.));
|
||||
|
Loading…
x
Reference in New Issue
Block a user