The mathkit Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The mathkit Reference Manual

This is the mathkit Reference Manual, version 0.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:13:53 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

mathkit

This is a purely math-related utility kit, providing functions which can be useful for games, 3D, and GL in general. Right now this includes additional matrix functionality by @3b on top of sb-cga.

Note: These merely create native Lisp matrices; they do not multiply them like the similar GL functions or in any way set them as GL state like the old fixed-function pipeline.

Additionally:


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 mathkit

Author

3b

License

MIT

Description

Various utilities for math

Version

0.0

Dependencies
Source

mathkit.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 mathkit.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/mathkit-20160208-git/mathkit.asd

Systems

mathkit (system)

Packages

mathkit.asdf


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 mathkit/package.lisp

Parent

mathkit (system)

Location

package.lisp

Packages

kit.math


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 mathkit/math.lisp

Dependency

package.lisp (file)

Parent

mathkit (system)

Location

math.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 mathkit/quat.lisp

Dependency

math.lisp (file)

Parent

mathkit (system)

Location

quat.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 mathkit/vector.lisp

Dependency

quat.lisp (file)

Parent

mathkit (system)

Location

vector.lisp

Exported Definitions
Internal Definitions

define-vecn (macro)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 mathkit.asdf

Source

/home/quickref/quicklisp/dists/quicklisp/software/mathkit-20160208-git/mathkit.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 kit.math

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: copy-matrix M
Package

kit.math

Source

math.lisp (file)

Function: deg-to-rad X

Converts X, a number, from degrees to radians.

Package

kit.math

Source

math.lisp (file)

Function: dvec2 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: dvec3 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: dvec4 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: frustum LEFT RIGHT BOTTOM TOP NEAR FAR

Returns a projection matrix that is similar to the glFrustum matrix.

LEFT, RIGHT, BOTTOM, TOP, NEAR and FAR are numbers representing their respective clipping planes. NEAR and FAR must be positive.

Package

kit.math

Source

math.lisp (file)

Function: ivec2 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: ivec3 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: ivec4 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: look-at EYE TARGET UP

Returns a view matrix that is similar to the gluLookAt matrix.

EYE and TARGET are both three dimensional coordinate vectors, with the former representing the eye’s location and the latter the center of its viewing target.

UP is a direction vector, representing which way is up for the eye.

Package

kit.math

Source

math.lisp (file)

Function: matrix*vec3 VEC MATRIX

Apply transformation MATRIX to VEC, return result as a freshly allocated VEC.

Package

kit.math

Source

/home/quickref/quicklisp/dists/quicklisp/software/sb-cga-20171227-git/vec.lisp

Function: matrix*vec4 MATRIX VECTOR
Package

kit.math

Source

math.lisp (file)

Function: ortho-matrix LEFT RIGHT BOTTOM TOP NEAR FAR

Returns a projection matrix that is similar to the glOrtho matrix.

LEFT, RIGHT, BOTTOM, TOP, NEAR and FAR are numbers representing their respective clipping planes.

Package

kit.math

Source

math.lisp (file)

Function: perspective-matrix FOVY ASPECT Z-NEAR Z-FAR

Returns a projection matrix that is similar to the gluPerspective matrix.

FOVY is the field of view, in degrees.

ASPECT is the aspect ratio of the window, width / height.

Z-NEAR and Z-FAR are positive numbers representing the depth clipping planes.

Package

kit.math

Source

math.lisp (file)

Function: rad-to-deg X

Converts X, a number, from radians to degrees.

Package

kit.math

Source

math.lisp (file)

Function: unproject POINT MODEL-MATRIX PERSPECTIVE-MATRIX VIEWPORT
Package

kit.math

Source

math.lisp (file)

Function: vec2 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: vec3 A &rest R
Package

kit.math

Source

vector.lisp (file)

Function: vec4 A &rest R
Package

kit.math

Source

vector.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Types

Type: dvec2 ()
Package

kit.math

Source

vector.lisp (file)

Type: dvec3 ()
Package

kit.math

Source

vector.lisp (file)

Type: dvec4 ()
Package

kit.math

Source

vector.lisp (file)

Type: ivec2 ()
Package

kit.math

Source

vector.lisp (file)

Type: ivec3 ()
Package

kit.math

Source

vector.lisp (file)

Type: ivec4 ()
Package

kit.math

Source

vector.lisp (file)

Type: vec2 ()
Package

kit.math

Source

vector.lisp (file)

Type: vec3 ()
Package

kit.math

Source

vector.lisp (file)

Type: vec4 ()
Package

kit.math

Source

vector.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: define-vecn N TYPE &optional PREFIX
Package

kit.math

Source

vector.lisp (file)

Macro: defun-qrot NNAME NAME INDEX &optional POST
Package

kit.math

Source

quat.lisp (file)

Macro: floatify (&rest SYMBOLS) &body BODY
Package

kit.math

Source

math.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: %nq* A1 A2 A3 A4 B1 B2 B3 B4

multiply 2 quaternions with elements A{1..4} and B{1..4}, returning result as multiple values.

Package

kit.math

Source

quat.lisp (file)

Function: %quat* A B DEST

multiply quaternions A and B storing result into DEST.

Package

kit.math

Source

quat.lisp (file)

Function: angle-axis->dquaternion ANGLE-RADIANS AXIS

create a quaternion from specified axis and angle in radians

Package

kit.math

Source

quat.lisp (file)

Function: angle-axis->quaternion ANGLE-RADIANS AXIS

create a quaternion from specified axis and angle in radians

Package

kit.math

Source

quat.lisp (file)

Function: copy-quaternion Q
Package

kit.math

Source

quat.lisp (file)

Function: dquat* A B &rest REST

multiply quaternions A and B returning result as a new quaternion.

Package

kit.math

Source

quat.lisp (file)

Function: dquaternion W X Y Z

Allocate dquaternion [W, Xi, Yj, Zk].

Package

kit.math

Source

quat.lisp (file)

Function: nqlerp A B F
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-local-x QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-local-y QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-local-z QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-world-x QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-world-y QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-nrotate-world-z QUAT ANGLE DEST
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-local-x QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-local-y QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-local-z QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-world-x QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-world-y QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: q-rotate-world-z QUAT ANGLE
Package

kit.math

Source

quat.lisp (file)

Function: qi Q
Package

kit.math

Source

quat.lisp (file)

Function: qj Q
Package

kit.math

Source

quat.lisp (file)

Function: qk Q
Package

kit.math

Source

quat.lisp (file)

Function: quat* A B &rest REST

multiply quaternions A and B returning result as a new quaternion.

Package

kit.math

Source

quat.lisp (file)

Function: quat+ A B
Package

kit.math

Source

quat.lisp (file)

Function: quat- A B
Package

kit.math

Source

quat.lisp (file)

Function: quat->axis-angle Q
Package

kit.math

Source

quat.lisp (file)

Function: quat-inverse QUAT
Package

kit.math

Source

quat.lisp (file)

Function: quat-rotate-matrix QUAT &optional MATRIX
Package

kit.math

Source

quat.lisp (file)

Function: quat-rotate-vector QUAT VEC

rotate a vector VEC using specifed rotation quaternion Q, returning result as a new single-float vector.

Package

kit.math

Source

quat.lisp (file)

Function: quaternion W X Y Z

Allocate quaternion [W, Xi, Yj, Zk].

Package

kit.math

Source

quat.lisp (file)

Function: qw Q
Package

kit.math

Source

quat.lisp (file)

Function: v L
Package

kit.math

Source

math.lisp (file)

Function: vx V
Package

kit.math

Source

quat.lisp (file)

Function: vy V
Package

kit.math

Source

quat.lisp (file)

Function: vz V
Package

kit.math

Source

quat.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Types

Type: dquaternion ()

A quaternion of double floats. [W, Xi, Yj, Zk]

Package

kit.math

Source

quat.lisp (file)

Type: quaternion ()

A quaternion of single floats. [W, Xi, Yj, Zk]

Package

kit.math

Source

quat.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, mathkit.asd: The mathkit<dot>asd file
File, Lisp, mathkit/math.lisp: The mathkit/math<dot>lisp file
File, Lisp, mathkit/package.lisp: The mathkit/package<dot>lisp file
File, Lisp, mathkit/quat.lisp: The mathkit/quat<dot>lisp file
File, Lisp, mathkit/vector.lisp: The mathkit/vector<dot>lisp file

L
Lisp File, mathkit.asd: The mathkit<dot>asd file
Lisp File, mathkit/math.lisp: The mathkit/math<dot>lisp file
Lisp File, mathkit/package.lisp: The mathkit/package<dot>lisp file
Lisp File, mathkit/quat.lisp: The mathkit/quat<dot>lisp file
Lisp File, mathkit/vector.lisp: The mathkit/vector<dot>lisp file

M
mathkit.asd: The mathkit<dot>asd file
mathkit/math.lisp: The mathkit/math<dot>lisp file
mathkit/package.lisp: The mathkit/package<dot>lisp file
mathkit/quat.lisp: The mathkit/quat<dot>lisp file
mathkit/vector.lisp: The mathkit/vector<dot>lisp file

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %  
A   C   D   F   I   L   M   N   O   P   Q   R   U   V  
Index Entry  Section

%
%nq*: Internal functions
%quat*: Internal functions

A
angle-axis->dquaternion: Internal functions
angle-axis->quaternion: Internal functions

C
copy-matrix: Exported functions
copy-quaternion: Internal functions

D
define-vecn: Internal macros
defun-qrot: Internal macros
deg-to-rad: Exported functions
dquat*: Internal functions
dquaternion: Internal functions
dvec2: Exported functions
dvec3: Exported functions
dvec4: Exported functions

F
floatify: Internal macros
frustum: Exported functions
Function, %nq*: Internal functions
Function, %quat*: Internal functions
Function, angle-axis->dquaternion: Internal functions
Function, angle-axis->quaternion: Internal functions
Function, copy-matrix: Exported functions
Function, copy-quaternion: Internal functions
Function, deg-to-rad: Exported functions
Function, dquat*: Internal functions
Function, dquaternion: Internal functions
Function, dvec2: Exported functions
Function, dvec3: Exported functions
Function, dvec4: Exported functions
Function, frustum: Exported functions
Function, ivec2: Exported functions
Function, ivec3: Exported functions
Function, ivec4: Exported functions
Function, look-at: Exported functions
Function, matrix*vec3: Exported functions
Function, matrix*vec4: Exported functions
Function, nqlerp: Internal functions
Function, ortho-matrix: Exported functions
Function, perspective-matrix: Exported functions
Function, q-nrotate-local-x: Internal functions
Function, q-nrotate-local-y: Internal functions
Function, q-nrotate-local-z: Internal functions
Function, q-nrotate-world-x: Internal functions
Function, q-nrotate-world-y: Internal functions
Function, q-nrotate-world-z: Internal functions
Function, q-rotate-local-x: Internal functions
Function, q-rotate-local-y: Internal functions
Function, q-rotate-local-z: Internal functions
Function, q-rotate-world-x: Internal functions
Function, q-rotate-world-y: Internal functions
Function, q-rotate-world-z: Internal functions
Function, qi: Internal functions
Function, qj: Internal functions
Function, qk: Internal functions
Function, quat*: Internal functions
Function, quat+: Internal functions
Function, quat-: Internal functions
Function, quat->axis-angle: Internal functions
Function, quat-inverse: Internal functions
Function, quat-rotate-matrix: Internal functions
Function, quat-rotate-vector: Internal functions
Function, quaternion: Internal functions
Function, qw: Internal functions
Function, rad-to-deg: Exported functions
Function, unproject: Exported functions
Function, v: Internal functions
Function, vec2: Exported functions
Function, vec3: Exported functions
Function, vec4: Exported functions
Function, vx: Internal functions
Function, vy: Internal functions
Function, vz: Internal functions

I
ivec2: Exported functions
ivec3: Exported functions
ivec4: Exported functions

L
look-at: Exported functions

M
Macro, define-vecn: Internal macros
Macro, defun-qrot: Internal macros
Macro, floatify: Internal macros
matrix*vec3: Exported functions
matrix*vec4: Exported functions

N
nqlerp: Internal functions

O
ortho-matrix: Exported functions

P
perspective-matrix: Exported functions

Q
q-nrotate-local-x: Internal functions
q-nrotate-local-y: Internal functions
q-nrotate-local-z: Internal functions
q-nrotate-world-x: Internal functions
q-nrotate-world-y: Internal functions
q-nrotate-world-z: Internal functions
q-rotate-local-x: Internal functions
q-rotate-local-y: Internal functions
q-rotate-local-z: Internal functions
q-rotate-world-x: Internal functions
q-rotate-world-y: Internal functions
q-rotate-world-z: Internal functions
qi: Internal functions
qj: Internal functions
qk: Internal functions
quat*: Internal functions
quat+: Internal functions
quat-: Internal functions
quat->axis-angle: Internal functions
quat-inverse: Internal functions
quat-rotate-matrix: Internal functions
quat-rotate-vector: Internal functions
quaternion: Internal functions
qw: Internal functions

R
rad-to-deg: Exported functions

U
unproject: Exported functions

V
v: Internal functions
vec2: Exported functions
vec3: Exported functions
vec4: Exported functions
vx: Internal functions
vy: Internal functions
vz: Internal functions

Jump to:   %  
A   C   D   F   I   L   M   N   O   P   Q   R   U   V  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   D   I   K   M   P   Q   S   T   V  
Index Entry  Section

D
dquaternion: Internal types
dvec2: Exported types
dvec3: Exported types
dvec4: Exported types

I
ivec2: Exported types
ivec3: Exported types
ivec4: Exported types

K
kit.math: The kit<dot>math package

M
mathkit: The mathkit system
mathkit.asdf: The mathkit<dot>asdf package

P
Package, kit.math: The kit<dot>math package
Package, mathkit.asdf: The mathkit<dot>asdf package

Q
quaternion: Internal types

S
System, mathkit: The mathkit system

T
Type, dquaternion: Internal types
Type, dvec2: Exported types
Type, dvec3: Exported types
Type, dvec4: Exported types
Type, ivec2: Exported types
Type, ivec3: Exported types
Type, ivec4: Exported types
Type, quaternion: Internal types
Type, vec2: Exported types
Type, vec3: Exported types
Type, vec4: Exported types

V
vec2: Exported types
vec3: Exported types
vec4: Exported types

Jump to:   D   I   K   M   P   Q   S   T   V