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

Functions

local function set (c)
 
local function set_max_vel (v)
 
local function set_rot_axes (a0, a1)
 
local function reset (zoom)
 
local function set_perspective (p)
 
local function set_follow (e)
 
local function move (key, press, mods, keys)
 
local function rotate (x, y)
 

Variables

local nngn_math< const > = require "nngn.lib.math"
 
local utils< const > = require "nngn.lib.utils"
 
local PERSP_ANGLE< const > = math.rad(60)
 
local PERSP_ANGLE_SIN< const > = math.sin(PERSP_ANGLE)
 
local PERSP_ANGLE_COS< const > = math.cos(PERSP_ANGLE)
 
local MAX_VEL = 256
 
local ROT_AXIS0 = 1
 
local ROT_AXIS1 = 3
 
local FOLLOW = nil
 
local CAMERA = nngn:camera()
 
 ROT_VEL = ROT_VEL
 
 ZOOM_VEL = ZOOM_VEL
 
 get = get
 
 set = set
 
 set_max_vel = set_max_vel
 
 set_rot_axes = set_rot_axes
 
 reset = reset
 
 set_perspective = set_perspective
 
 toggle_perspective = toggle_perspective
 
 set_fov_z = set_fov_z
 
 following = following
 
 toggle_follow = toggle_follow
 
 set_follow = set_follow
 
 move = move
 
 rotate = rotate
 
 remove_limits = remove_limits
 

Function Documentation

◆ move()

local function move ( key ,
press ,
mods ,
keys  )

◆ reset()

local function reset ( zoom )

◆ rotate()

local function rotate ( x ,
y  )

◆ set()

local function set ( c )

◆ set_follow()

local function set_follow ( e )

◆ set_max_vel()

local function set_max_vel ( v )

◆ set_perspective()

local function set_perspective ( p )

◆ set_rot_axes()

local function set_rot_axes ( a0 ,
a1  )

Variable Documentation

◆ CAMERA

local CAMERA = nngn:camera()

◆ FOLLOW

local FOLLOW = nil

◆ following

local function following = following

◆ get

local function get = get

◆ MAX_VEL

MAX_VEL = 256

◆ move

move = move

◆ nngn_math< const >

local nngn_math< const > = require "nngn.lib.math"

◆ PERSP_ANGLE< const >

local PERSP_ANGLE< const > = math.rad(60)

◆ PERSP_ANGLE_COS< const >

local PERSP_ANGLE_COS< const > = math.cos(PERSP_ANGLE)

◆ PERSP_ANGLE_SIN< const >

local PERSP_ANGLE_SIN< const > = math.sin(PERSP_ANGLE)

◆ remove_limits

local function remove_limits = remove_limits

◆ reset

reset = reset

◆ ROT_AXIS0

local ROT_AXIS0 = 1

◆ ROT_AXIS1

local ROT_AXIS1 = 3

◆ ROT_VEL

ROT_VEL = ROT_VEL

◆ rotate

rotate = rotate

◆ set

set = set

◆ set_follow

set_follow = set_follow

◆ set_fov_z

local function set_fov_z = set_fov_z

◆ set_max_vel

set_max_vel = set_max_vel

◆ set_perspective

set_perspective = set_perspective

◆ set_rot_axes

set_rot_axes = set_rot_axes

◆ toggle_follow

local function toggle_follow = toggle_follow

◆ toggle_perspective

local function toggle_perspective = toggle_perspective

◆ utils< const >

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

◆ ZOOM_VEL

ZOOM_VEL = ZOOM_VEL