def __init__(self, position=(0., 0., 0.), rotation=(0., 0., 0.), scale=1., orientation0=(1., 0., 0.),
                 **kwargs):
        """XYZ Position, Scale and XYZEuler Rotation Class.

        Args:
            position: (x, y, z) translation values.
            rotation: (x, y, z) rotation values
            scale (float): uniform scale factor. 1 = no scaling.
        """
        super(Physical, self).__init__(**kwargs)

        self.orientation0 = np.array(orientation0, dtype=np.float32)
        self.rotation = coordinates.RotationEulerDegrees(*rotation)
        self.position = coordinates.Translation(*position)
        if hasattr(scale, '__iter__'):
            if 0 in scale:
                raise ValueError("Scale can not be set to 0")
            self.scale = coordinates.Scale(*scale)
        else:
            if scale is 0:
                raise ValueError("Scale can not be set to 0")
            self.scale = coordinates.Scale(scale)

        self._model_matrix = np.identity(4, dtype=np.float32)
        self._normal_matrix = np.identity(4, dtype=np.float32)
        self._view_matrix = np.identity(4, dtype=np.float32)
def __init__ ( self , position = ( 0. , 0. , 0. ) , rotation = ( 0. , 0. , 0. ) , scale = 1. , orientation0 = ( 1. , 0. , 0. ) , ** kwargs ) : super ( Physical , self ) . __init__ ( ** kwargs ) self . orientation0 = np . array ( orientation0 , dtype = np . float32 ) self . rotation = coordinates . RotationEulerDegrees ( * rotation ) self . position = coordinates . Translation ( * position ) if hasattr ( scale , '__iter__' ) : if 0 in scale : raise ValueError ( "Scale can not be set to 0" ) self . scale = coordinates . Scale ( * scale ) else : if scale is 0 : raise ValueError ( "Scale can not be set to 0" ) self . scale = coordinates . Scale ( scale ) self . _model_matrix = np . identity ( 4 , dtype = np . float32 ) self . _normal_matrix = np . identity ( 4 , dtype = np . float32 ) self . _view_matrix = np . identity ( 4 , dtype = np . float32 )
XYZ Position, Scale and XYZEuler Rotation Class.

        Args:
            position: (x, y, z) translation values.
            rotation: (x, y, z) rotation values
            scale (float): uniform scale factor. 1 = no scaling.