Force cameraPosition() to return Vector class. (#1799)

* Update GLViewWidget.py

Fix the wrong conversion of QVector3D to numpy array.

* new way to fix the conversion error

* Recover prev. version of pixelSize

Co-authored-by: Jaeyoon Jeong <diem389@gmail.com>
This commit is contained in:
3DAlgoLab 2021-06-02 14:21:50 +09:00 committed by GitHub
parent e29f86578f
commit 28b1499f09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,7 +314,7 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
center = self.opts['center']
dist = self.opts['distance']
if self.opts['rotationMethod'] == "quaternion":
pos = center - self.opts['rotation'].rotatedVector( Vector(0,0,dist) )
pos = Vector(center - self.opts['rotation'].rotatedVector(Vector(0,0,dist) ))
else:
# using 'euler' rotation method
elev = radians(self.opts['elevation'])