Ejemplo n.º 1
0
    def __init__( self ):
        """Constructs a transform object.
        """
        super( Transform, self ).__init__()

        self._orientation = quaternion.create_identity()        
        self._translation = numpy.zeros( 3, dtype = numpy.float )
        self._scale = numpy.ones( 3, dtype = numpy.float )
        self._matrix = None
Ejemplo n.º 2
0
    def __init__(self):
        """Constructs a transform object.
        """
        super(Transform, self).__init__()

        self._orientation = quaternion.create_identity()
        self._translation = numpy.zeros(3, dtype=numpy.float)
        self._scale = numpy.ones(3, dtype=numpy.float)
        self._matrix = None
Ejemplo n.º 3
0
        def identity():
            quat = quaternion.create_identity()
            result = matrix33.create_from_quaternion( quat )

            expected = numpy.eye( 3 )

            self.assertTrue(
                numpy.array_equal( result, expected ),
                "Matrix33 from quaternion incorrect with identity quaternion"
                )