lib/ruby_on_rays/transform.rb
# Checks if the transformation swaps the handedness of the local coordiante
# system.
# @return [Boolean]
Checks if the transformation swaps the handedness of the local coordiante
system.
Checks if the transformation swaps the handedness of the local coordiante system .
def swaps_handedness?
      det33 = @m[0, 0] * (@m[1, 1] * @m[2, 2] - @m[1, 2] * @m[2, 1]) -
              @m[0, 1] * (@m[1, 0] * @m[2, 2] - @m[1, 2] * @m[2, 0]) +
              @m[0, 2] * (@m[1, 0] * @m[2, 1] - @m[1, 1] * @m[2, 0])
      det33 < 0.0
    end
def swaps_handedness? det33 = @m [ 0 , 0 ] * ( @m [ 1 , 1 ] * @m [ 2 , 2 ] - @m [ 1 , 2 ] * @m [ 2 , 1 ] ) - @m [ 0 , 1 ] * ( @m [ 1 , 0 ] * @m [ 2 , 2 ] - @m [ 1 , 2 ] * @m [ 2 , 0 ] ) + @m [ 0 , 2 ] * ( @m [ 1 , 0 ] * @m [ 2 , 1 ] - @m [ 1 , 1 ] * @m [ 2 , 0 ] ) det33 < 0.0 end
Checks if the transformation swaps the handedness of the local coordiante
system.
Checks if the transformation swaps the handedness of the local coordiante system .
# Swaps if the determinant of the upper-left 3x3 matrix is negative!
None
Boolean