nngn
Loading...
Searching...
No Matches
pil.lua File Reference

Functions

function disk (cx, cy, r)
 
function rect (left, right, bottom, up)
 
function complement (r)
 
function union (r1, r2)
 
function intersection (r1, r2)
 
function difference (r1, r2)
 
function translate (r, dx, dy)
 
function plot (t, v, r)
 

Variables

 entity< const > = require "nngn.lib.entity"
 
 SIZE< const > = Textures.SIZE
 
 EXTENT< const > = Textures.EXTENT
 
 tex_t< const > = {}
 
 tex_src_v< const > = Compute.create_vector(SIZE / 4)
 
 tex_dst_v< const > = Compute.create_vector(SIZE)
 
 tex< const > = nngn:textures():load_data("lua:pil", tex_dst_v)
 
 renderer = {type = Renderer.SPRITE, tex = tex, size = {EXTENT, EXTENT}}
 
 t< const > = (nngn:timing():now_ms() / 1000 % 10 - 5) / 2
 
 c1< const > = disk(0, 0, 1)
 

Function Documentation

◆ complement()

function complement ( r  )

◆ difference()

function difference ( r1  ,
r2   
)

◆ disk()

function disk ( cx  ,
cy  ,
r   
)

◆ intersection()

function intersection ( r1  ,
r2   
)

◆ plot()

function plot ( ,
v  ,
r   
)

◆ rect()

function rect ( left  ,
right  ,
bottom  ,
up   
)
Here is the caller graph for this function:

◆ translate()

function translate ( r  ,
dx  ,
dy   
)

◆ union()

function union ( r1  ,
r2   
)

Variable Documentation

◆ c1< const >

c1< const > = disk(0, 0, 1)

◆ entity< const >

entity< const > = require "nngn.lib.entity"

◆ EXTENT< const >

EXTENT< const > = Textures.EXTENT

◆ renderer

renderer = {type = Renderer.SPRITE, tex = tex, size = {EXTENT, EXTENT}}

◆ SIZE< const >

SIZE< const > = Textures.SIZE

◆ t< const >

t< const > = (nngn:timing():now_ms() / 1000 % 10 - 5) / 2

◆ tex< const >

tex< const > = nngn:textures():load_data("lua:pil", tex_dst_v)

◆ tex_dst_v< const >

tex_dst_v< const > = Compute.create_vector(SIZE)

◆ tex_src_v< const >

tex_src_v< const > = Compute.create_vector(SIZE / 4)

◆ tex_t< const >

tex_t< const > = {}