Beispiel #1
0
 def __constrain(self, vector, axis):
     """
     private constrain (used to constrain axis)
     """
     vector.sub(axis.mult(axis, PVector.dot(axis, vector)))
     vector.normalize()
     return vector
Beispiel #2
0
 def mouseDragged(self, x, y):
     """
     pass in mouse.x and mouse.y parameters from sketch
     """
     self.v_drag = self.__mouse2sphere(x, y)
     self.q_drag.set(PVector.dot(self.v_down, self.v_drag),
                     self.v_down.cross(self.v_drag))
 def __constrain(self, vector, axis):
     """
     private constrain (used to constrain axis)
     """
     vector.sub(axis.mult(axis, PVector.dot(axis, vector)))
     vector.normalize()
     return vector
Beispiel #4
0
 def dot(cls, a, b):
     return __pvector__.dot(a, b)
Beispiel #5
0
 def dot(cls, a, b):
     return __pvector__.dot(a, b)
 def dot(cls, a, b):
     return RealPVector.dot(a, b)
Beispiel #7
0
 def dot(cls, a, b):
     return RealPVector.dot(a, b)
 def mouseDragged(self, x, y):
     """
     pass in mouse.x and mouse.y parameters from sketch
     """
     self.v_drag = self.__mouse2sphere(x, y)
     self.q_drag.set(PVector.dot(self.v_down, self.v_drag), self.v_down.cross(self.v_drag))