Explorar el Código

Fix Graphic bounding box

Daniel Salvadori hace 3 años
padre
commit
b5c63e94be
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      graphic/graphic.go

+ 2 - 0
graphic/graphic.go

@@ -234,6 +234,8 @@ func (gr *Graphic) BoundingBox() math32.Box3 {
 
 	geom := gr.igeom.GetGeometry()
 	bbox := geom.BoundingBox()
+	m := gr.MatrixWorld()
+	bbox.ApplyMatrix4(&m)
 	for _, inode := range gr.Children() {
 		childGraphic, ok := inode.(*Graphic)
 		if ok {