Method: CATransform3D#rotate
- Defined in:
- lib/geomotion/ca_transform_3d.rb
#rotate(angle, point = nil, y = nil, z = nil) ⇒ CATransform3D
Applies a rotation transform to the receiver
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/geomotion/ca_transform_3d.rb', line 193 def rotate(angle, point=nil, y=nil, z=nil) if point && y && z x = point elsif point x = point[0] y = point[1] z = point[2] else # default: spins around z-axis x = 0 y = 0 z = 1 end CATransform3DRotate(self, angle, x, y, z) end |