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

Functions

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

Variables

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

Function Documentation

◆ complement()

local function complement ( r )

◆ difference()

local function difference ( r1 ,
r2  )

◆ disk()

local function disk ( cx ,
cy ,
r  )

◆ intersection()

local function intersection ( r1 ,
r2  )

◆ plot()

local function plot ( t ,
v ,
r  )

◆ rect()

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

◆ translate()

local function translate ( r ,
dx ,
dy  )

◆ union()

local function union ( r1 ,
r2  )

Variable Documentation

◆ c1< const >

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

◆ entity< const >

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

◆ EXTENT< const >

local EXTENT< const > = Textures.EXTENT

◆ renderer

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

◆ SIZE< const >

local SIZE< const > = Textures.SIZE

◆ t< const >

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

◆ tex< const >

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

◆ tex_dst_v< const >

local tex_dst_v< const > = Compute.create_vector(SIZE)

◆ tex_src_v< const >

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

◆ tex_t< const >

local tex_t< const > = {}