(self, points=None)
return dict(position=position)
Compound function for the coordinates of the texture.
Compound function for the coordinates of the texture.
Compound function for the coordinates of the texture .
def points_compound(self, points=None):
        """Compound function for the coordinates of the texture."""
        if points is None:
            points = (-1, -1, 1, 1)
        x0, y0, x1, y1 = points
        x0, x1 = min(x0, x1), max(x0, x1)
        y0, y1 = min(y0, y1), max(y0, y1)
        
        position = np.zeros((4,2))
        position[0,:] = (x0, y0)
        position[1,:] = (x1, y0)
        position[2,:] = (x0, y1)
        position[3,:] = (x1, y1)

        return dict(position=position)
def points_compound ( self , points = None ) : if points is None : points = ( - 1 , - 1 , 1 , 1 ) x0 , y0 , x1 , y1 = points x0 , x1 = min ( x0 , x1 ) , max ( x0 , x1 ) y0 , y1 = min ( y0 , y1 ) , max ( y0 , y1 ) position = np . zeros ( ( 4 , 2 ) ) position [ 0 , : ] = ( x0 , y0 ) position [ 1 , : ] = ( x1 , y0 ) position [ 2 , : ] = ( x0 , y1 ) position [ 3 , : ] = ( x1 , y1 ) return dict ( position = position )