a
    V$c	                     @   sh   d dl mZmZmZmZmZ d dlmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZ d dlZdd ZdS )    )divisionabsolute_importwith_statementprint_functionunicode_literals)PY2
basestringbchrbordchropenpystrrangeroundstrtobytesunicodeNc                 C   s.  |   }|  }dg}|D ]\}}}	|d|||	 qtd| g }
g }t|D ]\}}|\}}}}|j||||dd\}}}}|| }|| }||d  d }|d|  d }td||||||||||| |
| || qX|
r*t|
}t|}t	|
}t	|}td	|||| d
S )zw
    Debugs the drawing of geometry by applying `transform` to `mesh`, and
    then projecting it onto the screen.
    zMesh:z{}-{}-{}    )
componentsg      ?g       @zl{:3g}: {: >9.4f} {: >9.4f} {: >3.1f} {: >3.1f} | {: >9.6f} {: >9.6f} {:>3.1f} {:>3.1f} | {:> 9.4f} {:< 9.4f}z4     ({:> 9.4f}, {:< 9.4f}) - ({:> 9.4f}, {:< 9.4f})N)

get_pointsget_trianglesappendformatprintjoin	enumerate	transformminmax)meshr   widthheightpoints	triangleslabcZsxlistZsylistippxpyZpzpwtxtytztwZdtxZdtysxsyZminsxZminsyZmaxsxZmaxsy r4   renpy/gl2\gl2debug.pygeometry   s:    
r6   )
__future__r   r   r   r   r   renpy.compatr   r   r	   r
   r   r   r   r   r   r   r   r   renpyr6   r4   r4   r4   r5   <module>   s   8