Пример #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
Пример #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))
Пример #3
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
Пример #4
0
 def dot(cls, a, b):
     return __pvector__.dot(a, b)
Пример #5
0
 def dot(cls, a, b):
     return __pvector__.dot(a, b)
Пример #6
0
 def dot(cls, a, b):
     return RealPVector.dot(a, b)
Пример #7
0
 def dot(cls, a, b):
     return RealPVector.dot(a, b)
Пример #8
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))