Exemple #1
0
  def rotateRight(self, event=None):

    aY = 12.0
    self.yRotation += aY
    R = matrixRotY(aY*DEGREES)
    v = self.view
    C = ( (v[0]+v[1])/2.0, (v[2]+v[3])/2.0, 0.0 )
    if self.cStructure:
      self.cStructureRotate(R, C)
    self.drawStructure()
Exemple #2
0
  def rotateStructureXY(self, aX, aY):

    self.xRotation += aX
    self.yRotation += aY
    
    aX *= DEGREES
    aY *= DEGREES
    
    R1 = matrixRotY(aX)
    R2 = matrixRotX(aY)
    R  = matrixMultiply(R2, R1)
   
    v = self.view
    C = ( (v[0]+v[1])/2.0, (v[2]+v[3])/2.0, 0.0 )
    if self.cStructure:
      self.cStructureRotate(R, C)
    self.drawStructure()