<s> """<STR_LIT>""" <EOL> import math <EOL> from kraken . core . kraken_system import ks <EOL> from kraken . core . maths . math_object import MathObject <EOL> class RotationOrder ( MathObject ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , order = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> super ( RotationOrder , self ) . __init__ ( ) <EOL> if ks . getRTValTypeName ( order ) == '<STR_LIT>' : <EOL> self . _rtval = order <EOL> else : <EOL> self . _rtval = ks . rtVal ( '<STR_LIT>' ) <EOL> if isinstance ( order , RotationOrder ) : <EOL> self . set ( order = order . order ) <EOL> else : <EOL> self . set ( order = order ) <EOL> def __str__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return "<STR_LIT>" + str ( self . order ) + "<STR_LIT>" <EOL> @ property <EOL> def order ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _rtval . order . getSimpleType ( ) <EOL> @ order . setter <EOL> def order ( self , value ) : <EOL> """<STR_LIT>""" <EOL> self . _rtval . order = ks . rtVal ( '<STR_LIT>' , value ) <EOL> return True <EOL> def __eq__ ( self , other ) : <EOL> return self . order == other . order <EOL> def __ne__ ( self , other ) : <EOL> return not self . order == other . order <EOL> def clone ( self ) : <EOL> """<STR_LIT>""" <EOL> rotOrder = RotationOrder ( ) <EOL> rotOrder . order = self . order <EOL> return rotOrder <EOL> def set ( self , order ) : <EOL> """<STR_LIT>""" <EOL> if type ( order ) == str : <EOL> lowerOrder = order . lower ( ) <EOL> if lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:0> <EOL> elif lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:1> <EOL> elif lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:2> <EOL> elif lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:3> <EOL> elif lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:4> <EOL> elif lowerOrder == '<STR_LIT>' : <EOL> newOrder = <NUM_LIT:5> <EOL> else : <EOL> print "<STR_LIT>" + order + "<STR_LIT>" <EOL> newOrder = <NUM_LIT:0> <EOL> elif type ( order ) == int : <EOL> if order < <NUM_LIT:0> or order > <NUM_LIT:5> : <EOL> print "<STR_LIT>" + str ( order ) + "<STR_LIT>" <EOL> newOrder = <NUM_LIT:0> <EOL> else : <EOL> newOrder = order <EOL> if newOrder == <NUM_LIT:0> : <EOL> self . _rtval . setXYZ ( '<STR_LIT>' ) <EOL> elif newOrder == <NUM_LIT:1> : <EOL> self . _rtval . setYZX ( '<STR_LIT>' ) <EOL> elif newOrder == <NUM_LIT:2> : <EOL> self . _rtval . setZXY ( '<STR_LIT>' ) <EOL> elif newOrder == <NUM_LIT:3> : <EOL> self . _rtval . setXZY ( '<STR_LIT>' ) <EOL> elif newOrder == <NUM_LIT:4> : <EOL> self . _rtval . setZYX ( '<STR_LIT>' ) <EOL> elif newOrder == <NUM_LIT:5> : <EOL> self . _rtval . setYXZ ( '<STR_LIT>' ) <EOL> else : <EOL> raise ValueError ( "<STR_LIT>" + str ( order ) + "<STR_LIT:'>" ) <EOL> return True <EOL> def isXYZ ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:0> <EOL> def isYZX ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:1> <EOL> def isZXY ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:2> <EOL> def isXZY ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:3> <EOL> def isZYX ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:4> <EOL> def isYXZ ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . order == <NUM_LIT:5> <EOL> def isReversed ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . isXZY ( ) or self . isZYX ( ) or self . isYXZ ( ) <EOL> def setXYZ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:0> <EOL> return True <EOL> def setYZX ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:1> <EOL> return True <EOL> def setZXY ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:2> <EOL> return True <EOL> def setXZY ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:3> <EOL> return True <EOL> def setZYX ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:4> <EOL> return True <EOL> def setYXZ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . order = <NUM_LIT:5> <EOL> return True </s>
