The rtg-math Reference Manual

Table of Contents

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

The rtg-math Reference Manual

This is the rtg-math Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:31:52 2018 GMT+0.


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

1 Introduction

rtg-math

This system provides a selection of the math routines most commonly needed for making realtime graphics in lisp.

Feature Shortlist

The library provides:

And more for all categories.

Documentation

Reference docs can be found here

All the symbols with documentation in the above reference docs als ohave identical doc-strings and so this can be easily queried from your editor.

CHANGELOG

2018-04-18

2018-03-28

2017-09-09

2017-04-28

2017-04-11

2017-02-13

2017-02-12


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 rtg-math

Author

Chris Bagley <techsnuffle@gmail.com>

License

BSD 2 Clause

Description

A selection of the math routines most commonly needed for realtime graphics in lisp

Dependencies
Source

rtg-math.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 rtg-math.asd

Location

rtg-math.asd

Systems

rtg-math (system)


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

3.1.2 rtg-math/package.lisp

Parent

rtg-math (system)

Location

package.lisp

Packages

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

3.1.3 rtg-math/utils.lisp

Dependency

package.lisp (file)

Parent

rtg-math (system)

Location

utils.lisp

Exported Definitions
Internal Definitions

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

3.1.4 rtg-math/deftypes.lisp

Dependency

utils.lisp (file)

Parent

rtg-math (system)

Location

deftypes.lisp

Exported Definitions
Internal Definitions

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

3.1.5 rtg-math/base-maths.lisp

Dependency

deftypes.lisp (file)

Parent

rtg-math (system)

Location

base-maths.lisp

Exported Definitions
Internal Definitions

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

3.1.6 rtg-math/vectors/base/base-vectors.lisp

Dependency

base-maths.lisp (file)

Parent

rtg-math (system)

Location

vectors/base/base-vectors.lisp

Exported Definitions
Internal Definitions

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

3.1.7 rtg-math/vectors/vector2/non-consing.lisp

Dependency

vectors/base/base-vectors.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector2/non-consing.lisp

Exported Definitions
Internal Definitions

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

3.1.8 rtg-math/vectors/vector2/consing.lisp

Dependency

vectors/vector2/non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector2/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.9 rtg-math/vectors/vector3/non-consing.lisp

Dependency

vectors/vector2/consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector3/non-consing.lisp

Exported Definitions
Internal Definitions

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

3.1.10 rtg-math/vectors/vector3/consing.lisp

Dependency

vectors/vector3/non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector3/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.11 rtg-math/vectors/vector4/non-consing.lisp

Dependency

vectors/vector3/consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector4/non-consing.lisp

Exported Definitions
Internal Definitions

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

3.1.12 rtg-math/vectors/vector4/consing.lisp

Dependency

vectors/vector4/non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector4/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.13 rtg-math/vectors/vectors.lisp

Dependency

vectors/vector4/consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vectors.lisp

Exported Definitions
Internal Definitions

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

3.1.14 rtg-math/matrices/matrix2/common.lisp

Dependency

vectors/vectors.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix2/common.lisp

Exported Definitions

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

3.1.15 rtg-math/matrices/matrix2/non-consing.lisp

Dependency

matrices/matrix2/common.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix2/non-consing.lisp

Exported Definitions
Internal Definitions

%* (function)


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

3.1.16 rtg-math/matrices/matrix2/consing.lisp

Dependency

matrices/matrix2/non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix2/consing.lisp

Exported Definitions
Internal Definitions

%* (function)


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

3.1.17 rtg-math/matrices/matrix3/common.lisp

Dependency

matrices/matrix2/consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix3/common.lisp

Exported Definitions

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

3.1.18 rtg-math/matrices/matrix3/non-consing.lisp

Dependency

matrices/matrix3/common.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix3/non-consing.lisp

Exported Definitions
Internal Definitions

%* (function)


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

3.1.19 rtg-math/matrices/matrix3/consing.lisp

Dependency

matrices/matrix3/non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix3/consing.lisp

Exported Definitions
Internal Definitions

%* (function)


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

3.1.20 rtg-math/matrices/matrix4/common.lisp

Dependency

matrices/matrix3/consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix4/common.lisp

Exported Definitions

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

3.1.21 rtg-math/matrices/matrix4/non-consing.lisp

Dependency

matrices/matrix4/common.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix4/non-consing.lisp

Exported Definitions
Internal Definitions

%* (function)


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

3.1.22 rtg-math/matrices/matrix4/consing.lisp

Dependency

matrices/matrix4/non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix4/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.23 rtg-math/matrices/base/base-matrices.lisp

Dependency

matrices/matrix4/consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/base/base-matrices.lisp

Exported Definitions
Internal Definitions

m!one-arg (function)


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

3.1.24 rtg-math/matrices/matrices.lisp

Dependency

matrices/base/base-matrices.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrices.lisp

Exported Definitions
Internal Definitions

melm (function)


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

3.1.25 rtg-math/quaternions/common.lisp

Dependency

matrices/matrices.lisp (file)

Parent

rtg-math (system)

Location

quaternions/common.lisp

Exported Definitions

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

3.1.26 rtg-math/quaternions/non-consing.lisp

Dependency

quaternions/common.lisp (file)

Parent

rtg-math (system)

Location

quaternions/non-consing.lisp

Exported Definitions
Internal Definitions

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

3.1.27 rtg-math/quaternions/consing.lisp

Dependency

quaternions/non-consing.lisp (file)

Parent

rtg-math (system)

Location

quaternions/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.28 rtg-math/projection/orthographic/non-consing.lisp

Dependency

quaternions/consing.lisp (file)

Parent

rtg-math (system)

Location

projection/orthographic/non-consing.lisp

Exported Definitions

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

3.1.29 rtg-math/projection/orthographic/consing.lisp

Dependency

projection/orthographic/non-consing.lisp (file)

Parent

rtg-math (system)

Location

projection/orthographic/consing.lisp

Exported Definitions

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

3.1.30 rtg-math/projection/perspective/non-consing.lisp

Dependency

projection/orthographic/consing.lisp (file)

Parent

rtg-math (system)

Location

projection/perspective/non-consing.lisp

Exported Definitions

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

3.1.31 rtg-math/projection/perspective/consing.lisp

Dependency

projection/perspective/non-consing.lisp (file)

Parent

rtg-math (system)

Location

projection/perspective/consing.lisp

Exported Definitions

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

3.1.32 rtg-math/polar-coords/polar.lisp

Dependency

projection/perspective/consing.lisp (file)

Parent

rtg-math (system)

Location

polar-coords/polar.lisp

Exported Definitions

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

3.1.33 rtg-math/spherical-coords/spherical.lisp

Dependency

polar-coords/polar.lisp (file)

Parent

rtg-math (system)

Location

spherical-coords/spherical.lisp

Exported Definitions
Internal Definitions

unit-spherical->unit-cartesian (function)


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

3.1.34 rtg-math/regions/line3/consing.lisp

Dependency

spherical-coords/spherical.lisp (file)

Parent

rtg-math (system)

Location

regions/line3/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.35 rtg-math/regions/ray3/consing.lisp

Dependency

regions/line3/consing.lisp (file)

Parent

rtg-math (system)

Location

regions/ray3/consing.lisp

Exported Definitions

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

3.1.36 rtg-math/regions/line-segment3/consing.lisp

Dependency

regions/ray3/consing.lisp (file)

Parent

rtg-math (system)

Location

regions/line-segment3/consing.lisp

Exported Definitions
Internal Definitions

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

3.1.37 rtg-math/regions/aab/common.lisp

Dependency

regions/line-segment3/consing.lisp (file)

Parent

rtg-math (system)

Location

regions/aab/common.lisp

Exported Definitions

with-aab (macro)


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

3.1.38 rtg-math/regions/aab/non-consing.lisp

Dependency

regions/aab/common.lisp (file)

Parent

rtg-math (system)

Location

regions/aab/non-consing.lisp

Exported Definitions

merge-point (function)


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

3.1.39 rtg-math/regions/aab/consing.lisp

Dependency

regions/aab/non-consing.lisp (file)

Parent

rtg-math (system)

Location

regions/aab/consing.lisp

Exported Definitions

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

3.1.40 rtg-math/regions/regions.lisp

Dependency

regions/aab/consing.lisp (file)

Parent

rtg-math (system)

Location

regions/regions.lisp

Exported Definitions

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

3.1.41 rtg-math/vectors/base/docs.lisp

Dependency

regions/regions.lisp (file)

Parent

rtg-math (system)

Location

vectors/base/docs.lisp


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

3.1.42 rtg-math/vectors/vector2/docs-non-consing.lisp

Dependency

vectors/base/docs.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector2/docs-non-consing.lisp


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

3.1.43 rtg-math/vectors/vector2/docs-consing.lisp

Dependency

vectors/vector2/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector2/docs-consing.lisp


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

3.1.44 rtg-math/vectors/vector3/docs-non-consing.lisp

Dependency

vectors/vector2/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector3/docs-non-consing.lisp


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

3.1.45 rtg-math/vectors/vector3/docs-consing.lisp

Dependency

vectors/vector3/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector3/docs-consing.lisp


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

3.1.46 rtg-math/vectors/vector4/docs-non-consing.lisp

Dependency

vectors/vector3/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector4/docs-non-consing.lisp


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

3.1.47 rtg-math/vectors/vector4/docs-consing.lisp

Dependency

vectors/vector4/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/vector4/docs-consing.lisp


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

3.1.48 rtg-math/vectors/docs.lisp

Dependency

vectors/vector4/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

vectors/docs.lisp


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

3.1.49 rtg-math/matrices/base/docs.lisp

Dependency

vectors/docs.lisp (file)

Parent

rtg-math (system)

Location

matrices/base/docs.lisp


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

3.1.50 rtg-math/matrices/matrix2/docs-consing.lisp

Dependency

matrices/base/docs.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix2/docs-consing.lisp


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

3.1.51 rtg-math/matrices/matrix3/docs-consing.lisp

Dependency

matrices/matrix2/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix3/docs-consing.lisp


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

3.1.52 rtg-math/matrices/matrix4/docs-consing.lisp

Dependency

matrices/matrix3/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix4/docs-consing.lisp


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

3.1.53 rtg-math/matrices/matrix2/docs-non-consing.lisp

Dependency

matrices/matrix4/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix2/docs-non-consing.lisp


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

3.1.54 rtg-math/matrices/matrix3/docs-non-consing.lisp

Dependency

matrices/matrix2/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix3/docs-non-consing.lisp


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

3.1.55 rtg-math/matrices/matrix4/docs-non-consing.lisp

Dependency

matrices/matrix3/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/matrix4/docs-non-consing.lisp


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

3.1.56 rtg-math/matrices/docs.lisp

Dependency

matrices/matrix4/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

matrices/docs.lisp


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

3.1.57 rtg-math/quaternions/docs-consing.lisp

Dependency

matrices/docs.lisp (file)

Parent

rtg-math (system)

Location

quaternions/docs-consing.lisp


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

3.1.58 rtg-math/quaternions/docs-non-consing.lisp

Dependency

quaternions/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

quaternions/docs-non-consing.lisp


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

3.1.59 rtg-math/polar-coords/docs.lisp

Dependency

quaternions/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

polar-coords/docs.lisp


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

3.1.60 rtg-math/projection/orthographic/docs-non-consing.lisp

Dependency

polar-coords/docs.lisp (file)

Parent

rtg-math (system)

Location

projection/orthographic/docs-non-consing.lisp


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

3.1.61 rtg-math/projection/orthographic/docs-consing.lisp

Dependency

projection/orthographic/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

projection/orthographic/docs-consing.lisp


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

3.1.62 rtg-math/projection/perspective/docs-non-consing.lisp

Dependency

projection/orthographic/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

projection/perspective/docs-non-consing.lisp


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

3.1.63 rtg-math/projection/perspective/docs-consing.lisp

Dependency

projection/perspective/docs-non-consing.lisp (file)

Parent

rtg-math (system)

Location

projection/perspective/docs-consing.lisp


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

3.1.64 rtg-math/types-docs.lisp

Dependency

projection/perspective/docs-consing.lisp (file)

Parent

rtg-math (system)

Location

types-docs.lisp


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

3.1.65 rtg-math/docs.lisp

Dependency

types-docs.lisp (file)

Parent

rtg-math (system)

Location

docs.lisp


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

4 Packages

Packages are listed by definition order.


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

4.1 rtg-math

Source

package.lisp (file)

Use List

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

4.2 rtg-math.region

Source

package.lisp (file)

Nickname

regions

Use List
Exported Definitions

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

4.3 rtg-math.region.axis-aligned-box

Source

package.lisp (file)

Nickname

aab

Use List
Exported Definitions

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

4.4 rtg-math.region.axis-aligned-box.non-consing

Source

package.lisp (file)

Nickname

aab-n

Use List
Exported Definitions

merge-point (function)


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

4.5 %rtg-math.regions.axis-aligned-box.common

Source

package.lisp (file)

Use List
Exported Definitions

with-aab (macro)


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

4.6 rtg-math.region.line-segment3

Source

package.lisp (file)

Nickname

line-seg3

Use List
Exported Definitions
Internal Definitions

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

4.7 rtg-math.region.ray3

Source

package.lisp (file)

Nickname

ray3

Use List
Exported Definitions

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

4.8 rtg-math.region.line3

Source

package.lisp (file)

Nickname

line3

Use List
Exported Definitions
Internal Definitions

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

4.9 rtg-math.projection.non-consing

Source

package.lisp (file)

Use List
Exported Definitions

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

4.10 rtg-math.projection

Source

package.lisp (file)

Use List
Exported Definitions

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

4.11 rtg-math.spherical

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

unit-spherical->unit-cartesian (function)


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

4.12 rtg-math.polar

Source

package.lisp (file)

Use List
Exported Definitions

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

4.13 rtg-math.quaternions

Source

package.lisp (file)

Nickname

q

Use List
Exported Definitions
Internal Definitions

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

4.14 rtg-math.quaternions.non-consing

Source

package.lisp (file)

Nickname

q-n

Use List
Exported Definitions
Internal Definitions

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

4.15 %rtg-math.quaternion.common

Source

package.lisp (file)

Use List
Used By List
Exported Definitions

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

4.16 rtg-math.matrices

Source

package.lisp (file)

Nickname

m

Use List
Exported Definitions
Internal Definitions

melm (function)


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

4.17 rtg-math.matrix4

Source

package.lisp (file)

Nickname

m4

Use List
Exported Definitions
Internal Definitions

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

4.18 rtg-math.matrix4.non-consing

Source

package.lisp (file)

Nickname

m4-n

Use List
Exported Definitions
Internal Definitions

%* (function)


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

4.19 %rtg-math.matrix4.common

Source

package.lisp (file)

Use List
Used By List
Exported Definitions

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

4.20 rtg-math.matrix3

Source

package.lisp (file)

Nickname

m3

Use List
Exported Definitions
Internal Definitions

%* (function)


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

4.21 rtg-math.matrix3.non-consing

Source

package.lisp (file)

Nickname

m3-n

Use List
Exported Definitions
Internal Definitions

%* (function)


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

4.22 %rtg-math.matrix3.common

Source

package.lisp (file)

Use List
Used By List
Exported Definitions

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

4.23 rtg-math.matrix2

Source

package.lisp (file)

Nickname

m2

Use List
Exported Definitions
Internal Definitions

%* (function)


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

4.24 rtg-math.matrix2.non-consing

Source

package.lisp (file)

Nickname

m2-n

Use List
Exported Definitions
Internal Definitions

%* (function)


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

4.25 %rtg-math.matrix2.common

Source

package.lisp (file)

Use List
Used By List
Exported Definitions

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

4.26 rtg-math.vectors

Source

package.lisp (file)

Nickname

v

Use List
Exported Definitions
Internal Definitions

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

4.27 rtg-math.vector4

Source

package.lisp (file)

Nickname

v4

Use List
Exported Definitions
Internal Definitions

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

4.28 rtg-math.vector3

Source

package.lisp (file)

Nickname

v3

Use List
Exported Definitions
Internal Definitions

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

4.29 rtg-math.vector2

Source

package.lisp (file)

Nickname

v2

Use List
Exported Definitions
Internal Definitions

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

4.30 rtg-math.vector4.non-consing

Source

package.lisp (file)

Nickname

v4-n

Use List
Exported Definitions
Internal Definitions

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

4.31 rtg-math.vector3.non-consing

Source

package.lisp (file)

Nickname

v3-n

Use List
Exported Definitions
Internal Definitions

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

4.32 rtg-math.vector2.non-consing

Source

package.lisp (file)

Nickname

v2-n

Use List
Exported Definitions
Internal Definitions

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

4.33 rtg-math.base-matrices

Source

package.lisp (file)

Use List
Used By List

rtg-math

Exported Definitions
Internal Definitions

m!one-arg (function)


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

4.34 rtg-math.base-vectors

Source

package.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

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

4.35 rtg-math.base-maths

Source

package.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

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

4.36 rtg-math.types

Source

package.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

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

4.37 %rtg-math

Source

package.lisp (file)

Use List
Used By 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 Constants

Constant: +inv-pi+

‘(/ 1 pi)‘ as a ‘single-float‘. This is the older naming, it is now prefered to use ‘inv-pi-f‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: +one-degree-in-radians+

The number of degrees in 1 radian as a ‘single-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: +pi+

‘pi‘ as a ‘single-float‘. This is the older naming, it is now prefered to use ‘pi-f‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: 0.5pi

‘(/ pi 2)‘ as a ‘double-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: 0.5pi-f

‘(/ pi 2)‘ as a ‘single-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: 2pi

‘(* PI 2)‘ as a ‘double-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: 2pi-f

‘(* PI 2)‘ as a ‘single-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: inv-pi

‘(/ 1 pi) as a ‘double-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: inv-pi-f

‘(/ 1 pi) as a ‘single-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: pi-f

‘pi‘ as a ‘single-float‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)


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

5.1.2 Macros

Macro: case= FORM &body CASES
Package

%rtg-math

Source

utils.lisp (file)

Macro: decf PLACE &optional DELTA

Decrements the vector in ’place’ by another vector of the same kind

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Macro: decf PLACE &optional DELTA

Decrements the ‘vec4‘ in ’place’ by another ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Macro: decf PLACE &optional DELTA

Decrements the ‘vec3‘ in ’place’ by another ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Macro: decf PLACE &optional DELTA

Decrements the ‘vec2‘ in ’place’ by another ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Macro: defn NAME TYPED-ARGS RESULT-TYPES &body BODY

Define a typed function

Package

%rtg-math

Source

utils.lisp (file)

Macro: defn-inlinable NAME TYPED-ARGS RESULT-TYPES &body BODY

Define a typed function that can be inlined but by default shouldn’t be

Package

%rtg-math

Source

utils.lisp (file)

Macro: defn-inline NAME TYPED-ARGS RESULT-TYPES &body BODY

Define a typed function and request that it be inlined

Package

%rtg-math

Source

utils.lisp (file)

Macro: ecase= FORM &body CASES
Package

%rtg-math

Source

utils.lisp (file)

Macro: incf PLACE &optional DELTA

Increments the vector in ’place’ by another vector of the same kind

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Macro: incf PLACE &optional DELTA

Increments the ‘vec4‘ in ’place’ by another ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Macro: incf PLACE &optional DELTA

Increments the ‘vec3‘ in ’place’ by another ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Macro: incf PLACE &optional DELTA

Increments the ‘vec2‘ in ’place’ by another ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Macro: with-aab (MINA MAXA) AAB &body BODY
Package

%rtg-math.regions.axis-aligned-box.common

Source

regions/aab/common.lisp (file)


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

5.1.3 Compiler macros

Compiler Macro: * &rest MATRICES
Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Compiler Macro: * ACCUM-MAT &rest MAT4S
Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Compiler Macro: * &rest MATRICES
Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Compiler Macro: * ACCUM-MAT &rest MAT4S
Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Compiler Macro: * &rest MATRICES
Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Compiler Macro: * ACCUM-MAT &rest MAT4S
Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Compiler Macro: * &rest VEC4S
Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Compiler Macro: * &rest VEC3S
Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Compiler Macro: * &rest VEC2S
Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Compiler Macro: * ACCUM-VEC &rest VEC4S
Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Compiler Macro: * ACCUM-VEC &rest VEC3S
Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Compiler Macro: * ACCUM-VEC &rest VEC2S
Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Compiler Macro: + &rest COMPONENTS
Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Compiler Macro: + ACCUM-QUAT &rest QUATERNIONS
Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Compiler Macro: + &rest VEC4S
Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Compiler Macro: + &rest VEC3S
Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Compiler Macro: + &rest VEC2S
Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Compiler Macro: + ACCUM-VEC &rest VEC4S
Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Compiler Macro: + ACCUM-VEC &rest VEC3S
Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Compiler Macro: + ACCUM-VEC &rest VEC2S
Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Compiler Macro: - &rest COMPONENTS
Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Compiler Macro: - ACCUM-QUAT &rest QUATERNIONS
Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Compiler Macro: - &rest VEC4S
Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Compiler Macro: - &rest VEC3S
Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Compiler Macro: - &rest VEC2S
Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Compiler Macro: - ACCUM-VEC &rest VEC4S
Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Compiler Macro: - ACCUM-VEC &rest VEC3S
Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Compiler Macro: - ACCUM-VEC &rest VEC2S
Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Compiler Macro: m! &rest COMPONENTS
Package

rtg-math.base-matrices

Source

matrices/base/base-matrices.lisp (file)

Compiler Macro: melm MAT-A ROW COL

Provide access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix4.common

Source

matrices/matrix4/common.lisp (file)

Compiler Macro: melm MAT-A ROW COL

Provide access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix3.common

Source

matrices/matrix3/common.lisp (file)

Compiler Macro: melm MAT-A ROW COL

Provide access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix2.common

Source

matrices/matrix2/common.lisp (file)

Compiler Macro: swizzle VEC PATTERN
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Compiler Macro: s~ VEC PATTERN
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Compiler Macro: v! &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!bool &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!byte &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!double &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!int &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!int8 &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!ubyte &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!uint &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!uint8 &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: w VEC
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: x VEC
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: y VEC
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: z VEC
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)


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

5.1.4 Functions

Function: * QUAT-A QUAT-B

Multiplies (and thus combines) the two ‘quaternion‘s given, returning a new ‘quaternion‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: * QUAT-TO-MUTATE QUAT-B

Destructively multiplies (and thus combines) the second ‘quaternion‘ into the first.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: * MATRIX-A MAT-VEC-OR-SCALAR

Takes any number of matrices (of the same kind) and multiplies them together returning a new matrix of the same kind.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: * &rest MATRICES

Takes any number of ‘mat4‘s and multiplies them together returning a new ‘mat4‘.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: * ACCUM-MAT &rest MAT4S

Takes any number of ‘mat4‘s and multiplies them together destructively writing the result into the first ‘mat4‘.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: * &rest MATRICES

Takes any number of ‘mat3‘s and multiplies them together returning a new ‘mat3‘.

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: * ACCUM-MAT &rest MAT3S

Takes any number of ‘mat3‘s and multiplies them together destructively writing the result into the first ‘mat3‘.

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: * &rest MATRICES

Takes any number of ‘mat2‘s and multiplies them together returning a new ‘mat2‘.

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: * ACCUM-MAT &rest MAT2S

Takes any number of ‘mat2‘s and multiplies them together destructively writing the result into the first ‘mat2‘.

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: * VEC-A SCALAR-OR-VEC

Adds two vectors together and returns the result as a new vector of the same type

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: * &rest VEC4S

Takes any number of ‘vec4‘ and performs component-wise multiplication on them returning a new ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: * &rest VEC3S

Takes any number of ‘vec3‘ and performs component-wise multiplication on them returning a new ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: * &rest VEC2S

Takes any number of ‘vec2‘ and performs component-wise multiplication on them returning a new ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: * ACCUM-VEC &rest VEC4S

Destructively performs component-wise multiplication of the ‘vec4‘s, the first ‘vec4‘ is mutated.

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: * ACCUM-VEC &rest VEC3S

Destructively performs component-wise multiplication of the ‘vec3‘s, the first ‘vec3‘ is mutated.

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: * ACCUM-VEC &rest VEC2S

Destructively performs component-wise multiplication of the ‘vec2‘s, the first ‘vec2‘ is mutated.

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: *s QUAT-A SCALAR

Component-wise multiplication of the ‘quaternion‘ by the scalar

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: *s MAT-A SCALAR

Multiplies the components of the ‘mat4‘ by the scalar provided

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: *s MAT-TO-MUTATE SCALAR

Destructively performs component-wise multiplication of the ‘vec3‘ by the scalar

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: *s MAT-A SCALAR

Multiplies the components of the ‘mat3‘ by the scalar provided

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: *s MAT-TO-MUTATE SCALAR

Multiplies the components of the ‘mat4‘ by the scalar provided

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: *s MAT-A SCALAR

Multiplies the components of the ‘mat2‘ by the scalar provided

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: *s MAT-TO-MUTATE SCALAR
Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: *s VECTOR-A A

Component-wise multiplication of the vector by the scalar

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: *s VECTOR-A A

Component-wise multiplication of the vector by the scalar

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: *s VECTOR-A A

Component-wise multiplication of the vector by the scalar

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: *s VEC4 A

Destructively performs component-wise multiplication of the ‘vec4‘ by the scalar

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: *s VEC3 A

Destructively performs component-wise multiplication of the ‘vec3‘ by the scalar

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: *s VEC2 A

Destructively performs component-wise multiplication of the ‘vec2‘ by the scalar

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: *v MAT-A VEC4

Multiplies the ‘vec4‘ by the ‘mat4‘ and returns the result as a new ‘vec4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: *v MAT-A VEC4-TO-MUTATE

Destructively multiplies the ‘vec3‘ by the top left 3x3 portion of the ‘mat4‘ returning the mutated ‘vec3‘

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: *v MAT-A VEC-A

Multiplies the ‘vec3‘ by the ‘mat3‘ and returns the result as a new ‘vec3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: *v MAT-A VEC3-TO-MUTATE

Destructively multiplies the ‘vec3‘ by the ‘mat3‘ and returning the mutated ‘vec3‘

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: *v MAT-A VEC-A

Multiplies the ‘vec2‘ by the ‘mat2‘ and returns the result as a new ‘vec2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: *v MAT-A VEC2-TO-MUTATE

Destructively multiplies the ‘vec3‘ by the ‘mat2‘ and returning the mutated ‘vec3‘

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: *v3 MAT-A VEC3

Multiplies the ‘vec3‘ by the ‘mat3‘ and returns the result as a new ‘vec3‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: *v3 MAT-A VEC3-TO-MUTATE
Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: + &rest QUATS

Component-wise addition of any number of quaternions.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: + ACCUM-QUAT &rest QUATERNIONS

Destructively performs component-wise addition of the ‘quaternion‘s, the first ‘quaternion‘ is mutated.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: + &rest MATRICES

Takes any number of matrices (of the same kind) and performs component-wise addition them together returning a new matrix of the same kind.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: + MAT-A MAT-B

Adds the 2 matrices component wise and returns the result as a new ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: + MAT-ACCUM MAT-B

Add the second ‘mat4‘ component wise to the first and return the first

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: + MAT-A MAT-B

Adds the 2 matrices component wise and returns the result as a new ‘mat3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: + MAT-ACCUM MAT-B

Add the second ‘mat3‘ component wise to the first and return the first

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: + MAT-A MAT-B

Adds the 2 matrices component wise and returns the result as a new ‘mat2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: + MAT-ACCUM MAT-B

Add the second ‘mat2‘ component wise to the first and return the first

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: + &rest VECS

Adds ’n’ ‘vec2‘, ‘vec3‘ or ‘vec4‘ together, returning a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: + &rest VEC4S

Takes any number of ‘vec4‘ and performs component-wise addition on them returning a new ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: + &rest VEC3S

Takes any number of ‘vec3‘ and performs component-wise addition on them returning a new ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: + &rest VEC2S

Takes any number of ‘vec2‘ and performs component-wise addition on them returning a new ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: + ACCUM-VEC &rest VEC4S

Destructively performs component-wise addition of the ‘vec4‘s, the first ‘vec4‘ is mutated.

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: + ACCUM-VEC &rest VEC3S

Destructively performs component-wise addition of the ‘vec3‘s, the first ‘vec3‘ is mutated.

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: + ACCUM-VEC &rest VEC2S

Destructively performs component-wise addition of the ‘vec2‘s, the first ‘vec2‘ is mutated.

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: +s VEC SCALAR

Componentwise addition of the given scalar to the components of the ‘vec2‘, ‘vec3‘ or ‘vec4‘ provided. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: +s VEC4 SCALAR

Component-wise add of single-float to ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: +s VEC3 SCALAR

Component-wise add of single-float to ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: +s VEC2 SCALAR

Component-wise add of single-float to ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: +s VEC4 SCALAR

Destructive Component-wise add of ‘single-float‘ into the given ‘vec2‘

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: +s VEC3 SCALAR

Destructive Component-wise add of ‘single-float‘ into the given ‘vec3‘

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: +s VEC2 SCALAR

Destructive Component-wise add of ‘single-float‘ into the given ‘vec2‘

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: - QUAT &rest QUATS

Takes any number of ‘quaternion‘ and performs component-wise subtraction on them returning a new ‘quaternion‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: - ACCUM-QUAT &rest QUATERNIONS

Destructively performs component-wise substraction of the ‘quaternion‘s, the first ‘quaternion‘ is mutated.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: - &rest MATRICES

Takes any number of matrices (of the same kind) and performs component-wise negation of them returning a new matrix of the same kind.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: - MAT-A MAT-B

Subtracts the 2 matrices component wise and returns the result as a new ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: - MAT-ACCUM MAT-B

Subtracts the second ‘mat4‘ component wise from the first and return the first

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: - MAT-A MAT-B

Subtracts the 2 matrices component wise and returns the result as a new ‘mat3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: - MAT-ACCUM MAT-B

Subtracts the second ‘mat3‘ component wise from the first and return the first

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: - MAT-A MAT-B

Subtracts the 2 matrices component wise and returns the result as a new ‘mat2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: - MAT-ACCUM MAT-B

Subtracts the second ‘mat2‘ component wise from the first and return the first

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: - &rest VECS

Subtracts ’n’ ‘vec2‘, ‘vec3‘ or ‘vec4‘ from each other, returning a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: - VEC4 &rest VEC4S

Takes any number of ‘vec4‘ and performs component-wise subtraction on them returning a new ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: - VEC3 &rest VEC3S

Takes any number of ‘vec3‘ and performs component-wise subtraction on them returning a new ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: - VEC2 &rest VEC2S

Takes any number of ‘vec2‘ and performs component-wise subtraction on them returning a new ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: - ACCUM-VEC &rest VEC4S

Destructively performs component-wise substraction of the ‘vec4‘s, the first ‘vec4‘ is mutated.

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: - ACCUM-VEC &rest VEC3S

Destructively performs component-wise substraction of the ‘vec3‘s, the first ‘vec3‘ is mutated.

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: - ACCUM-VEC &rest VEC2S

Destructively performs component-wise substraction of the ‘vec2‘s, the first ‘vec2‘ is mutated.

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: -s VEC SCALAR

Componentwise subtractiong of the given scalar from the components of the ‘vec2‘, ‘vec3‘ or ‘vec4‘ provided. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: -s VEC4 SCALAR

Component-wise subtraction of single-float from ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: -s VEC3 SCALAR

Component-wise subtraction of single-float from ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: -s VEC2 SCALAR

Component-wise subtraction of single-float from ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: -s VEC4 SCALAR

Destructive Component-wise subtraction of ‘single-float‘ from the given ‘vec2‘

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: -s VEC3 SCALAR

Destructive Component-wise subtraction of ‘single-float‘ from the given ‘vec3‘

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: -s VEC2 SCALAR

Destructive Component-wise subtraction of ‘single-float‘ from the given ‘vec2‘

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: / VEC-A SCALAR-OR-VEC

Divides the given ‘vec2‘, ‘vec3‘ or ‘vec4‘ by the scalar or vector provided.

If a vector is provided it must be of the same kind as ‘vec-a‘ and the division is performed component-wise.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: / VECTOR-A VECTOR-B

Component-wise division of the two ‘vec4‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: / VECTOR-A VECTOR-B

Component-wise division of the two ‘vec3‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: / VECTOR-A VECTOR-B

Component-wise division of the two ‘vec2‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: / VEC4-A VEC4-B

Destructively performs component-wise division of the ‘vec4‘s, the first ‘vec4‘ is mutated

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: / VEC3-A VEC3-B

Destructively performs component-wise division of the ‘vec3‘s, the first ‘vec3‘ is mutated

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: / VEC2-A VEC2-B

Destructively performs component-wise division of the ‘vec2‘s, the first ‘vec2‘ is mutated

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: /= AAB-0 AAB-1
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: /= LINE-SEG3-A LINE-SEG3-B
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: /= RAY3-A RAY3-B
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: /= Q1 Q2

Component-wise comparison of two quaternions. Returns T if any components are not equal (by =)

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: /= &rest MATRICES

Returns either t if the matrices are equal. Otherwise it returns nil.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: /= &rest VECS

Returns either t if the two vectors are equal. Otherwise it returns nil.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: /s VECTOR-A A

Component-wise division of the vector by the scalar

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: /s VECTOR-A A

Component-wise division of the vector by the scalar

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: /s VECTOR-A A

Component-wise division of the vector by the scalar

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: /s VEC4 A

Destructively performs component-wise division of the ‘vec4‘ by the scalar

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: /s VEC3 A

Destructively performs component-wise division of the ‘vec3‘ by the scalar

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: /s VEC2 A

Destructively performs component-wise division of the ‘vec2‘ by the scalar

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: 0! ()

Returns a new ‘quaternion‘ where every component is 0

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: 0! ()

Return a ‘mat4‘ where every component is 0

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: 0! ()
Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: 0! ()

Return a ‘mat2‘ where all components are zero

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: 0p QUAT

Returns T if all the components of the given ‘quaternion‘ are 0

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: 0p MATRIX

Returns T if all the components of the matrix ‘=‘ 0

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: 0p MAT-A

Returns T if this is a zero matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: 0p MAT-A

Returns T if this is a zero matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: 0p MAT-A

Returns T if this is a zero matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: 0p VEC-A

Returns t if the vector is of zero length

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: 0p VECTOR-A

Checks if the length of the vector is zero. As this is a
floating point number it checks to see if the length is
below a threshold set in the base-maths package

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: 0p VECTOR-A

Checks if the length of the vector is zero. As this is a
floating point number it checks to see if the length is
below a threshold set in the base-maths package

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: 0p VECTOR-A

Checks if the length of the vector is zero. As this is a floating point number it checks to see if the length is below a threshold set in the base-maths package

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: 1+ MATRIX-A MATRIX-B

Returns a new matrix which is equal to the given matrix with every component incremented by 1

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: 1- MATRIX-A MATRIX-B

Returns a new matrix which is equal to the given matrix with every component decremented by 1

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: = AAB-0 AAB-1
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: = LINE-SEG3-A LINE-SEG3-B
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: = RAY3-A RAY3-B
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: = Q1 Q2

Returns T if the two ‘quaternion‘s given are component-wise equal (by cl:=)

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: = &rest MATRICES

Returns either t if the matrices are equal. Otherwise it returns nil.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: = MAT-A MAT-B

Returns T if all elements of both matrices provided are equal

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: = MAT-A MAT-B

Returns T if all elements of both matrices provided are equal

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: = MAT-A MAT-B

Returns T if all elements of both matrices provided are equal

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: = &rest VECS

Returns either t if the vectors are equal. Otherwise it returns nil.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: = VECTOR-A VECTOR-B

Returns either t if the two vectors are equal. Otherwise it returns nil.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: = VECTOR-A VECTOR-B

Returns either t if the two vectors are equal. Otherwise it returns nil.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: = VECTOR-A VECTOR-B

Returns T if the two vectors are equal. Otherwise it returns nil.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: abs VECTOR-A

Return a ‘vec4‘ containing the ‘abs‘ of the original vec4’s components.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: abs VECTOR-A

Return a ‘vec3‘ containing the ‘abs‘ of the original vec3’s components.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: abs VECTOR-A

Return a ‘vec2‘ containing the ‘abs‘ of the original vec2’s components.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: absolute-dot VEC-A VEC-B

Adds two vectors together and returns the result as a new vector of the same type

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: absolute-dot VECTOR-A VECTOR-B

Return the absolute dot product of the vector-a and vector-b.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: absolute-dot VECTOR-A VECTOR-B

Return the absolute dot product of the vector-a and vector-b.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: absolute-dot VECTOR-A VECTOR-B

Return the absolute dot product of the vector-a and vector-b.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: add-point AAB POINT-V3
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: adjoint MAT-A

Returns the adjoint of the provided matrix

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: adjoint MAT-TO-MUTATE

Mutates the given ‘mat4‘ to be it’s own adjoint

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: adjoint MAT-A

Returns the adjoint of the provided matrix

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: adjoint MAT-TO-MUTATE

Mutates the given ‘mat3‘ to be it’s own adjoint

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: adjoint MAT-A

Returns the adjoint of the provided matrix

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: adjoint MAT-TO-MUTATE

Mutates the given ‘mat2‘ to be it’s own adjoint

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: affine-inverse MATRIX-A

Returns a new matrix which is the inverse of the one given.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: affine-inverse MAT-A

returns the inverse of the ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: affine-inverse MAT-TO-INVERT

Mutates the given ‘mat4‘ to be it’s own inverse

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: affine-inverse MAT-A

returns the inverse of the ‘mat3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: affine-inverse MAT-TO-INVERT

Mutates the given ‘mat3‘ to be it’s own inverse

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: angle-between VEC-A VEC-B

Returns the angle between two ‘vec2‘s.

Equivilent to (abs (v2:angle-from a b))

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: angle-from VEC-FROM VEC-TO

Returns the signed angle between the two ‘vec2‘s.

Positive angles are counter-clockwise

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: approx-slerp START-QUAT END-QUAT POS

A faster and less accurate version of ‘slerp‘ for quaternions

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: bezier A1 A2 B1 B2 AMMOUNT

{TODO}

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: bezier A1 A2 B1 B2 AMMOUNT

{TODO}

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: bezier A1 A2 B1 B2 AMMOUNT

{TODO}

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: bezier A1 A2 B1 B2 AMMOUNT

{TODO}

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: cartesian->polar VEC2

Takes a polar coord vector with the layout (θ r) and and converts it to a cartesian ‘vec2‘

Notes:
r - length of υ
θ - angle between υ and y axis
θ>0 means counter-clockwise rotation

Package

rtg-math.polar

Source

polar-coords/polar.lisp (file)

Function: cartesian->spherical VEC3

Takes a cartesian vector3 and converts it to a spherical coord vector with the layout (θ φ ρ).

Notes:
θ - angle between υ and x axis (rotating around z) φ - angle between υ and z axis
ρ - distance from origin (lengh of υ)

Package

rtg-math.spherical

Source

spherical-coords/spherical.lisp (file)

Function: closest-line-points LINE-SEG3 LINE3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: closest-line-points LINE3-A LINE3-B
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: closest-line-segment-points LINE-SEG-A LINE-SEG-B
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: closest-point LINE-SEG3 POINT-V3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: closest-point RAY3 POINT-V3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: closest-point LINE3 POINT-V3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: closest-ray-points LINE-SEG-A RAY3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: closest-ray-points RAY3-A RAY3-B
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: conjugate QUAT

Returns the conjugate of the given quaternion

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: conjugate QUAT-TO-MUTATE

Destructively replaces the given ‘quaternion‘ with it’s conjugate

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: copy QUAT

Returns a fresh ‘quaternion‘ which is = to the one given

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: copy-mat2 MAT2

Returns a fresh ‘mat2‘ which is m2:= to the orignal matrix

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: copy-mat3 MAT3

Returns a fresh ‘mat3‘ which is m3:= to the orignal matrix

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: copy-mat4 MAT4

Returns a fresh ‘mat4‘ which is m4:= to the orignal matrix

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: copy-vec2 VEC2

Returns a fresh ‘vec2‘ which is v2:= to the orignal vector

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: copy-vec3 VEC3

Returns a fresh ‘vec3‘ which is v3:= to the orignal vector

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: copy-vec4 VEC4

Returns a fresh ‘vec4‘ which is v4:= to the orignal vector

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: cross VEC-A VEC-B

Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both. The resulting vector will not be normalized.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: cross VEC-A VEC-B

Calculates the cross-product of 2 ‘vec3‘, i.e. the vector that lies perpendicular to them both. The resulting ‘vec3‘ will not be normalized.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: cross VEC-A VEC-B

Calculates the cross-product of 2 ‘vec2‘s. This results in a ‘single-float‘ which is 2 times the area of the triangle.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: degrees-f RADIANS

Converts a quantity, specified in radians as a ‘single-float‘ into degrees.

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: determinant MATRIX-A

Returns the determinant of the given matrix

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: determinant MAT-A

Returns the determinant of the ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: determinant MAT-A

Returns the determinant of the ‘mat3‘ (uses the cramer method)

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: direction LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: direction RAY3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: direction LINE3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: distance VEC-A VEC-B

Return the distance between 2 points defined by vectors vector-a & vector-b. If comparing distances, use c-distance-squared as it desnt require a sqrt and thus is faster.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: distance VECTOR-A VECTOR-B

Return the distance between 2 points defined by vectors
vector-a & vector-b. If comparing distances, use
c-distance-squared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the ‘distance-squared‘ function as the ‘sqrt‘ required here is (relatively) slow.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: distance VECTOR-A VECTOR-B

Return the distance between 2 points defined by vectors
vector-a & vector-b. If comparing distances, use
c-distance-squared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the ‘distance-squared‘ function as the ‘sqrt‘ required here is (relatively) slow.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: distance VECTOR-A VECTOR-B

Return the distance between 2 points defined by vectors
vector-a & vector-b. If comparing distances, use
c-distance-squared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the ‘distance-squared‘ function as the ‘sqrt‘ required here is (relatively) slow.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: distance-squared VEC-A VEC-B

Returns the squared distance between 2 points defined by vectors vector-a & vector-b

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: distance-squared VECTOR-A VECTOR-B

Finds the squared distance between 2 points defined by ‘vec4‘s vector-a & vector-b

‘distance‘ is the square root of this value. The ‘sqrt‘ function is (relatively) slow so if all thats needs doing is to compare distances then prefer the ‘distance-squared‘ function

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: distance-squared VECTOR-A VECTOR-B

Finds the squared distance between 2 points defined by ‘vec3‘s vector-a & vector-b

‘distance‘ is the square root of this value. The ‘sqrt‘ function is (relatively) slow so if all thats needs doing is to compare distances then prefer the ‘distance-squared‘ function

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: distance-squared VECTOR-A VECTOR-B

Finds the squared distance between 2 points defined by ‘vec2‘s vector-a & vector-b

‘distance‘ is the square root of this value. The ‘sqrt‘ function is (relatively) slow so if all thats needs doing is to compare distances then prefer the ‘distance-squared‘ function

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: distance-squared-to-line-seg3 LINE-SEG-A LINE-SEG-B
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-squared-to-line3 LINE-SEG3 LINE3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-squared-to-line3 RAY3 LINE3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: distance-squared-to-line3 LINE3-A LINE3-B
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: distance-squared-to-point LINE-SEG3 POINT-V3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-squared-to-point RAY3 POINT-V3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: distance-squared-to-point LINE3 POINT-V3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: distance-squared-to-ray3 LINE-SEG3 RAY3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-squared-to-ray3 RAY3-A RAY3-B
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: distance-to-line-seg3 LINE-SEG-A LINE-SEG-B
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-to-line3 LINE-SEG3 LINE3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-to-line3 RAY3 LINE3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: distance-to-line3 LINE3-A LINE3-B
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: distance-to-point LINE-SEG3 POINT-V3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-to-point RAY3 POINT-V3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: distance-to-point LINE3 POINT-V3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: distance-to-ray3 LINE-SEG3 RAY3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: distance-to-ray3 RAY3-A RAY3-B
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: dot QUAT-A QUAT-B

return the dot product of the quat-a and quat-b.

Package

%rtg-math.quaternion.common

Source

quaternions/common.lisp (file)

Function: dot VEC-A VEC-B

Returns the dot product of the 2 given vectors.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: dot VECTOR-A VECTOR-B

Return the dot product of vector-a and vector-b.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: dot VECTOR-A VECTOR-B

Return the dot product of vector-a and vector-b.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: dot VECTOR-A VECTOR-B

Return the dot product of vector-a and vector-b.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: elm MATRIX ROW COL

DEPRECATED: Please use melm

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: elt MATRIX ROW COL

DEPRECATED: Please use melm

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: end-point0 LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: end-point1 LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: face-foreward VEC-A VEC-B

Returns ‘vector-a‘ if ‘(> (v3:dot vector-a vector-b) 0)‘ else returns ‘(v3:negate vector-a)‘

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: face-foreward VECTOR-A VECTOR-B

Returns ‘vector-a‘ if ‘(> (v4:dot vector-a vector-b) 0)‘ else returns ‘(v4:negate vector-a)‘

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: face-foreward VECTOR-A VECTOR-B

Returns ‘vector-a‘ if ‘(> (v3:dot vector-a vector-b) 0)‘ else returns ‘(v3:negate vector-a)‘

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: face-foreward VECTOR-A VECTOR-B

Returns ‘vector-a‘ if ‘(> (v2:dot vector-a vector-b) 0)‘ else returns ‘(v2:negate vector-a)‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: from-aabs &rest AABS
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: from-angle ANGLE

Makes a ‘vec2‘ from an angle in radians.

Angle is in radians turning counterclockwise from ‘(v! 0 1)‘

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: from-axies X-AXIES Y-AXIES Z-AXIES

{TODO}

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-axis-angle AXIS-VEC3 ANGLE

Returns a new ‘quaternion‘ which represents a rotation around the given axis by the given angle

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-axis-angle QUAT-TO-MUTATE AXIS-VEC3 ANGLE

Turns the given ‘quaternion‘ into one which represents a rotation around the given axis by the given angle

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: from-columns COL-1 COL-2 COL-3 COL-4

Make a ‘mat4‘ using the data in the 4 ‘vec4‘s to populate the columns

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: from-columns COL-1 COL-2 COL-3

Make a ‘mat3‘ using the data in the 3 ‘vec3‘s to populate the columns

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: from-columns COL-1 COL-2

Make a ‘mat2‘ using the data in the 2 ‘vec2‘s to populate the columns

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: from-columns-v3 COL-1 COL-2 COL-3

Make a ‘mat4‘ using the data in the 3 ‘vec3‘s provided to populate the columns.

The 4th row & column are filled as an identity matrix would be.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: from-complex C

Makes a ‘vec2‘ from a ‘complex‘. The ‘realpart‘ becomes the ‘x‘ component and the ‘imagpart‘ becomes the ‘y‘ component.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: from-direction UP3 DIR3

Creates a ‘quaternion‘ that would rotate the vector (v! 0 0 -1) to face in the given direction.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-direction UP3 DIR3

Creates a ‘mat4‘ that would rotate the vector (v! 0 0 -1) to face in the given direction.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: from-direction UP3 DIR3

Creates a ‘mat3‘ that would rotate the vector (v! 0 0 -1) to point in the given direction.

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: from-fixed-angles X-ROT Y-ROT Z-ROT

Creates a ‘quaternion‘ that represents a rotation around the given axies by the given angles

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-fixed-angles QUAT-TO-MUTATE X-ROT Y-ROT Z-ROT

Turns the given ‘quaternion‘ into one which represents a rotation around the given axies by the given angles.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: from-fixed-angles-v3 ANGLES

Creates a ‘quaternion‘ that represents a rotation around the given axies by the angles given in the ‘vec3‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-mat3 MAT3

Creates ‘quaternion‘ that represents the same rotation the ‘mat3‘ does.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: from-mat3 QUAT-TO-MUTATE MAT3

Destructively updates of the components of the given ‘quaternion‘ making it represent the rotation from the given ‘mat3‘.

Assumes that this is a rotation matrix. It is critical that this
is true (and elements are between -1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: from-mat3 M-A

Takes a ‘mat3‘ and returns a ‘mat4‘ rotation matrix with the same values.

The 4th row & column are filled as an identity matrix would be.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: from-points LIST-OF-VEC3
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: from-rows ROW-1 ROW-2 ROW-3 ROW-4

Make a ‘mat4‘ using the data in the 4 ‘vec4‘s to populate the rows

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: from-rows ROW-1 ROW-2 ROW-3

Make a ‘mat3‘ using the data in the 3 ‘vec3‘s to populate the rows

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: from-rows ROW-1 ROW-2

Make a ‘mat2‘ using the data in the 2 ‘vec2‘s to populate the rows

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: from-rows-v3 ROW-1 ROW-2 ROW-3

Make a ‘mat4‘ using the data in the 3 ‘vec3‘s provided to populate the rows.

The 4th row & column are filled as an identity matrix would be.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-axis-angle QUAT

Gets one possible axis-angle pair that will generate this ‘quaternion‘

Assumes that this is a normalized quaternion. It is critical that this is true as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: get-axis-angle MAT-A

Gets one possible axis-angle pair that will generate this
‘mat4‘.

Assumes that this is a rotation matrix. It is critical that this
is true (and elements are between -1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-axis-angle MAT-A

Gets one possible axis-angle pair that will generate this
‘mat3‘.

Assumes that this is a rotation matrix. It is critical that this
is true (and elements are between -1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-column MATRIX-A COL-NUM

Returns the specifed column of the matrix as vector

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: get-column MAT-A COL-NUM

Return the specified column of the matrix as a ‘vec4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-column MAT-A COL-NUM

Return the specified column of the matrix as a ‘vec3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-column MAT-A COL-NUM

Return the specified column of the matrix as a ‘vec2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: get-columns MATRIX-A

Returns the columns of the matrix as a list of vectors

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: get-columns MAT-A

Return the columns of the matrix as 4 ‘vec4‘s

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-columns MAT-A

Return the columns of the matrix as 3 ‘vec3‘s

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-columns MAT-A

Return the columns of the matrix as 2 ‘vec2‘s

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: get-fixed-angles MAT-A

Gets one set of possible z-y-x fixed angles that will generate
this ‘mat4‘.

Assumes that this is a rotation matrix. It is critical that this
is true (and elements are between -1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-fixed-angles MAT-A

Gets one set of possible z-y-x fixed angles that will generate
this ‘mat3‘.

Assumes that this is a rotation matrix. It is critical that this
is true (and elements are between -1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-row MATRIX-A ROW-NUM

Returns the specifed row of the matrix as vector

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: get-row MAT-A ROW-NUM

Return the specified row of the matrix as a ‘vec4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-row MAT-A ROW-NUM

Return the specified row of the matrix as a ‘vec3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-row MAT-A ROW-NUM

Return the specified row of the matrix as a ‘vec2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: get-rows MATRIX-A

Returns the rows of the matrix as a list of vectors

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: get-rows MAT-A

Return the rows of the matrix as 4 ‘vec4‘s

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: get-rows MAT-A

Return the rows of the matrix as 3 ‘vec3‘s

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: get-rows MAT-A

Return the rows of the matrix as 2 ‘vec2‘s

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: identity ()

Returns a fresh identity quaternion

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: identity ()

Return a ‘mat4‘ identity matrix

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: identity ()

Return a ‘mat3‘ identity matrix

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: identity ()

Return a ‘mat2‘ identity matrix

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: identity-p QUAT

Returns T if the given ‘quaternion‘ is the identity quaternion

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: identityp MAT-A

Returns T if this is an identity matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: identityp MAT-A

Returns T if this is an identity matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: identityp MAT-A

Returns T if this is an identity matrix

As contents of the matrix are floats the values have an error bound as defined in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: intersects-p AAB-0 AAB-1
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: intersects-with-line-segment-p AAB LINE-SEG3
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: intersects-with-line3-p AAB LINE3
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: intersects-with-ray3-p AAB RAY3
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: inv-sqrt X

Calculates the inverse square root of a number

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: inverse QUAT

Returns a new ‘quaternion‘ that is the inverse of the one given

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: inverse MATRIX-A

Returns the inverse of the given matrix

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: inverse MATRIX

Inverts the matrix.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: length LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: length VEC-A

Returns the length of a vector
If you only need to compare relative lengths then definately stick to length-squared as the sqrt is a slow operation.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: length VECTOR-A

Returns the length of the ‘vec4‘

If you only need to compare relative lengths then prefer the ‘length-squared‘ function as ‘sqrt‘ is a (relatively) slow operation.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: length VECTOR-A

Returns the length of the ‘vec3‘

If you only need to compare relative lengths then prefer the ‘length-squared‘ function as ‘sqrt‘ is a (relatively) slow operation.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: length VECTOR-A

Returns the length of the ‘vec2‘

If you only need to compare relative lengths then prefer the ‘length-squared‘ function as ‘sqrt‘ is a (relatively) slow operation.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: length-squared LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: length-squared VEC-A

Finds the squared distance between 2 points defined by vectors vector-a & vector-b

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: length-squared VECTOR-A

Return the squared length of the ‘vec4‘

‘length‘ is the square root of this value. The ‘sqrt‘ function is (relatively slow so if all thats needs doing is to compare lengths then prefer the ‘length-squared‘ function

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: length-squared VECTOR-A

Return the squared length of the ‘vec3‘

‘length‘ is the square root of this value. The ‘sqrt‘ function is (relatively slow so if all thats needs doing is to compare lengths then prefer the ‘length-squared‘ function

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: length-squared VECTOR-A

Return the squared length of the ‘vec2‘

‘length‘ is the square root of this value. The ‘sqrt‘ function is (relatively slow so if all thats needs doing is to compare lengths then prefer the ‘length-squared‘ function

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: lerp START-QUAT END-QUAT POS

Linearaly interpolate between two quaternions. Note that this will always take the shortest path.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: lerp VECTOR-A VECTOR-B AMMOUNT

Linearly interpolates between the two vectors by the given amount. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: lerp VECTOR-A VECTOR-B AMMOUNT

Linearly interpolates between the two ‘vec4‘s by the ‘single-float‘ amount

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: lerp VECTOR-A VECTOR-B AMMOUNT

Linearly interpolates between the two ‘vec3‘s by the ‘single-float‘ amount

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: lerp VECTOR-A VECTOR-B AMMOUNT

Linearly interpolates between the two ‘vec2‘s by the ‘single-float‘ amount

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: lerp START END AMOUNT

Performs a linear interpolation between ’start’ and ’end’ by the given ‘amount‘

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: look-at UP3 FROM3 TO3

Creates a ‘quaternion‘ that would rotate the vector (v! 0 0 -1) to point in the direction from ‘from3‘ to ‘to3‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: look-at UP3 FROM3 TO3

Creates a ‘mat4‘ that would rotate the vector (v! 0 0 -1) to point in the direction from ‘from3‘ to ‘to3‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: look-at UP3 FROM3 TO3

Creates a ‘mat3‘ that would rotate the vector (v! 0 0 -1) to point in the direction from ‘from3‘ to ‘to3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: m! &rest COMPONENTS

Creates a new ‘mat2‘, ‘mat3‘ or ‘mat4‘ based on the number of components provided.

Package

rtg-math.base-matrices

Source

matrices/base/base-matrices.lisp (file)

Function: magnitude QUAT

Returns the magnitude of the quaternion

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: make MINIMA MAXIMA
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: make END-POINT0 END-POINT1
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: make ORIGIN-V3 DIRECTION-V3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: make ORIGIN-V3 DIRECTION-V3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: make W X Y Z

Make a ‘quaternion‘ from 4 ‘single-float‘s

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: make A B C D E F G H I J K L M N O P

Make a ‘mat4‘. Data must be provided in row major order

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: make A B C D E F G H I

Make a ‘mat3‘. Data must be provided in row major order

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: make A B C D

Make a ‘mat2‘. Data must be provided in row major order

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: make X Y Z W

Make a ‘vec4‘ from 4 ‘single-float‘s

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: make X Y Z

Make a ‘vec3‘ from 3 ‘single-float‘s

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: make X Y

This takes 2 single-floats and give back a ‘vec2‘.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: make-from-point-offset POINT-V3 OFFSET-V3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: maxima AAB
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: melm MAT-A ROW COL
Function: (setf melm) VALUE MAT-A ROW COL

Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix4.common

Source

matrices/matrix4/common.lisp (file)

Function: melm MAT-A ROW COL
Function: (setf melm) VALUE MAT-A ROW COL

Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix3.common

Source

matrices/matrix3/common.lisp (file)

Function: melm MAT-A ROW COL
Function: (setf melm) VALUE MAT-A ROW COL

Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix2.common

Source

matrices/matrix2/common.lisp (file)

Function: merge-into-vector &rest VECTORS

Takes a list of vectors and combines them into a new vector

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: merge-point AAB POINT-V3
Package

rtg-math.region.axis-aligned-box.non-consing

Source

regions/aab/non-consing.lisp (file)

Function: minima AAB
Package

rtg-math.region.axis-aligned-box

Source

regions/aab/consing.lisp (file)

Function: minor MAT-A ROW-0 ROW-1 ROW-2 COL-0 COL-1 COL-2

Returns the minor of the matrix

Package

%rtg-math.matrix4.common

Source

matrices/matrix4/common.lisp (file)

Function: mix VECTOR-A VECTOR-B AMMOUNT

Linearly interpolates between the two vectors by the given amount. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: mref MAT-A COL ROW
Function: (setf mref) VALUE MAT-A COL ROW

Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix4.common

Source

matrices/matrix4/common.lisp (file)

Function: mref MAT-A COL ROW
Function: (setf mref) VALUE MAT-A COL ROW

Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices

Package

%rtg-math.matrix3.common

Source

matrices/matrix3/common.lisp (file)

Function: mrow*vec2 VEC MAT-A

{TODO}

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: mrow*vec2 VEC2-TO-MUTATE MAT-A

{TODO}

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: mrow*vec3 VEC MAT-A

{TODO}

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: mrow*vec3 VEC3-TO-MUTATE MAT-A

{TODO}

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: mrow*vec4 VEC MAT-A

{TODO}

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: mrow*vec4 VEC4-TO-MUTATE MAT-A

{TODO}

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: negate MATRIX-A

Returns a fresh matrix with all the components negated

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: negate MAT-A

Negates the components of the ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: negate MAT-TO-NEGATE

Negates the components of the ‘mat4‘

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: negate MAT-A

Negates the components of the ‘mat3‘

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: negate MAT-TO-NEGATE

Negates the components of the ‘mat3‘

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: negate MAT-A

Negates the components of the ‘mat2‘

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: negate MAT-TO-NEGATE

Negates the components of the ‘mat2‘

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: negate VEC

Negates the given vector. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: negate VECTOR-A

Return a vector that is the negated version of the vector passed in

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: negate VECTOR-A

Return a vector that is the negated version of the vector passed in

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: negate VECTOR-A

Return a vector that is the negated version of the vector passed in

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: negate VECTOR-A

Destructively negates the given vector

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: negate VECTOR-A

Destructively negates the given vector

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: negate VECTOR-A

Destructively negates the given vector

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: norm QUAT

Returns the ’norm’ of the ‘quaternion‘

Note: This is not the normalized verison of the quaternion, that is performed by the ‘normalize‘ function.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: normalize QUAT

Returns a fresh, normalized version of the given vector.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: normalize QUAT-TO-MUTATE

Destructively replaces the given ‘quaternion‘ with the normalized version of itself.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: normalize VEC-A

Normalizes the vector. Returns a new vector of the same kind.

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: normalize VECTOR-A

This normalizes the given ‘vec4‘.

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: normalize VECTOR-A

This normalizes the given ‘vec3‘.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: normalize VECTOR-A

This normalizes the given ‘vec2‘.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: normalize VECTOR-A

Destructively normalizes the vector

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: normalize VECTOR-A

Destructively normalizes the vector

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: normalize VECTOR-A

Destructively normalizes the vector

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: origin RAY3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: origin LINE3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: orthographic MAT4-TO-MUTATE FRAME-WIDTH FRAME-HEIGHT NEAR FAR

Creates a ‘mat4‘ and mutates it to be an orthographic projection matrix

Package

rtg-math.projection.non-consing

Source

projection/orthographic/non-consing.lisp (file)

Function: orthographic FRAME-WIDTH FRAME-HEIGHT NEAR FAR

Creates a new orthographic projection matrix (mat4)

Package

rtg-math.projection

Source

projection/orthographic/consing.lisp (file)

Function: orthographic-v2 MAT4-TO-MUTATE FRAME-SIZE-V2 NEAR FAR

Creates a ‘mat4‘ and mutates it to be an orthographic projection matrix (with the frame size specified by a ‘vec2‘)

Package

rtg-math.projection.non-consing

Source

projection/orthographic/non-consing.lisp (file)

Function: orthographic-v2 FRAME-SIZE-V2 NEAR FAR

Creates a new orthographic projection matrix (mat4) with the frame size specified by a ‘vec2‘

Package

rtg-math.projection

Source

projection/orthographic/consing.lisp (file)

Function: perp-dot VEC-A VEC-B

{TODO}

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: perp-dot VEC-A VEC-B

{TODO}

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: perspective MAT-TO-MUTATE WIDTH HEIGHT NEAR FAR FOV-DEGREES

Takes a ‘mat4‘ and mutates it to be a perspective matrix with the field of view being specified in degrees.

The fact that the primary function form takes degress is unusual
in rtg-math. We keep it this way for backwards compatibility. For
the version specified in radians see ‘perspective-radian-fov‘

Package

rtg-math.projection.non-consing

Source

projection/perspective/non-consing.lisp (file)

Function: perspective WIDTH HEIGHT NEAR FAR FOV-DEGREES

Creates a perspective matrix (‘mat4‘) with the field of view being specified in degrees.

The fact that the primary function form takes degress is unusual in rtg-math. We keep it this way for backwards compatibility. For the version specified in radians see ‘perspective-radian-fov‘

Package

rtg-math.projection

Source

projection/perspective/consing.lisp (file)

Function: perspective-radian-fov MAT-TO-MUTATE WIDTH HEIGHT NEAR FAR FOV

Takes a ‘mat4‘ and mutates it to be a perspective matrix

Package

rtg-math.projection.non-consing

Source

projection/perspective/non-consing.lisp (file)

Function: perspective-radian-fov WIDTH HEIGHT NEAR FAR FOV

Creates a perspective matrix (‘mat4‘).

Package

rtg-math.projection

Source

projection/perspective/consing.lisp (file)

Function: perspective-v2 MAT-TO-MUTATE FRAME-SIZE-V2 NEAR FAR FOV-DEGREES

Takes a ‘mat4‘ and mutates it to be a perspective matrix with the frame size specified using a ‘vec2‘ and the field of view being specified in degrees.

This variant of ‘perspective‘ that is provided as some libraries will provide the framesize as a ‘vec2‘ so it felt right to support that rather
that force unpacking.

The fact that the primary function form takes degress is unusual
in rtg-math. We keep it this way for backwards compatibility. For
the version specified in radians see ‘perspective-radian-fov‘

Package

rtg-math.projection.non-consing

Source

projection/perspective/non-consing.lisp (file)

Function: perspective-v2 FRAME-SIZE-V2 NEAR FAR FOV-DEGREES

Creates a perspective matrix (‘mat4‘) with the frame size specified using a ‘vec2‘ and the field of view being specified in degrees.

This variant of ‘perspective‘ that is provided as some libraries will provide the framesize as a ‘vec2‘ so it felt right to support that rather
that force unpacking.

The fact that the primary function form takes degress is unusual
in rtg-math. We keep it this way for backwards compatibility. For
the version specified in radians see ‘perspective-radian-fov‘

Package

rtg-math.projection

Source

projection/perspective/consing.lisp (file)

Function: perspective-v2-radian-fov MAT-TO-MUTATE FRAME-SIZE-V2 NEAR FAR FOV-DEGREES

Takes a ‘mat4‘ and mutates it to be a perspective matrix with the frame size specified using a ‘vec2‘

This variant of ‘perspective‘ that is provided as some libraries will provide the framesize as a ‘vec2‘ so it felt right to support that rather
that force unpacking.

Package

rtg-math.projection.non-consing

Source

projection/perspective/non-consing.lisp (file)

Function: perspective-v2-radian-fov FRAME-SIZE-V2 NEAR FAR FOV-DEGREES

Creates a perspective matrix (‘mat4‘) with the frame size specified using a ‘vec2‘

This variant of ‘perspective‘ that is provided as some libraries will provide the framesize as a ‘vec2‘ so it felt right to support that rather
that force unpacking.

Package

rtg-math.projection

Source

projection/perspective/consing.lisp (file)

Function: point-at UP3 FROM3 TO3

Creates a ‘quaternion‘ that

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: point-at UP FROM3 TO3

Create the ‘mat4‘ rotation portion to a ’world to view’ ’look-at’ matrix

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: point-at UP FROM3 TO3

Create the ‘mat3‘ rotation portion to a ’world to view’ ’look-at’ matrix

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: polar->cartesian ANGLE-LENGTH-V2
Package

rtg-math.polar

Source

polar-coords/polar.lisp (file)

Function: q! W X Y Z

Make a ‘quaternion‘ from 4 ‘single-float‘s

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: qconjugate QUAT

Deprecated: Please use ‘conjugate‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: radians-f DEGREES

Converts a quantity, specified in degrees as a ‘single-float‘ into radians.

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: rotate VEC3 QUAT

Rotates the given ‘vec3‘ using the ‘quaternion‘.

Assumes the ‘quaternion‘ is normalized.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: rotate VEC3-TO-MUTATE QUAT

Destructively rotates the ‘vec3‘ using the ‘quaternion‘ returning the mutated ‘vec3‘.

ssumes quaternion is normalized.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: rotate VEC ROTATION

Creates a new ‘vec3‘ which is equivilent to the original once rotated in each axis by the radians in the ‘rotation‘ vec3 provided.

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: rotate VEC ANGLE

Creates a new ‘vec2‘ which is equivilent to the original once rotated counterclockwise by ‘angle‘ radians.

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: rotate VEC ROTATION

Rotates the given ‘vec3‘ counterclockwise by the radians in the ‘rotation‘ vec3 provided.

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: rotate VEC ANGLE

Rotates the give ‘vec2‘ counterclockwise by ‘angle‘ radians.

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: rotation-from-axis-angle AXIS3 ANGLE

Returns a ‘mat4‘ which will rotate a point about the axis specified by the angle provided

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-from-axis-angle AXIS3 ANGLE

Returns a ‘mat3‘ which will rotate a point about the axis specified by the angle provided

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: rotation-from-euler VEC3-A

Creates a rotation ‘mat4‘ which represents a anticlockwise rotation.

The angle is specified in radians

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-from-euler VEC3-A

Creates a rotation ‘mat3‘ which represents a anticlockwise rotation.

The angle is specified in radians

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: rotation-from-euler ANGLE

Creates a rotation ‘mat2‘ which represents a anticlockwise rotation.

The angle is specified in radians

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: rotation-from-mat3 M-A

Takes a ‘mat3‘ rotation matrix and returns a ‘mat4‘ rotation matrix with the same values. The 4th row & column are filled as an identity matrix would be.

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-x ANGLE

Returns a ‘mat4‘ which would rotate a point around the x axis by the specified amount

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-x ANGLE

Returns a ‘mat3‘ which would rotate a point around the x axis by the specified amount

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: rotation-y ANGLE

Returns a ‘mat4‘ which would rotate a point around the y axis by the specified amount

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-y ANGLE

Returns a ‘mat3‘ which would rotate a point around the y axis by the specified amount

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: rotation-z ANGLE

Returns a ‘mat4‘ which would rotate a point around the z axis by the specified amount

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: rotation-z ANGLE

Returns a ‘mat3‘ which would rotate a point around the z axis by the specified amount

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: saturate VAL-F

clamps the given ‘single-float‘ between 0.0 and 1.0

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: scale SCALE-VEC3

Returns a matrix which will scale by the amounts specified

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: scale SCALE-VEC3

Returns a matrix which will scale by the amounts specified

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: scale SCALE-VEC2

Returns a matrix which will scale by the amounts specified

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: set-components C00 C01 C02 C03 C10 C11 C12 C13 C20 C21 C22 C23 C30 C31 C32 C33 MAT4-TO-MUTATE

Destructively updates of the components of the given ‘mat4‘ to the new ‘single-float‘s provided.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-components C00 C01 C02 C10 C11 C12 C20 C21 C22 MAT3-TO-MUTATE

Destructively updates of the components of the given ‘mat3‘ to the new ‘single-float‘s provided.

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-components C00 C01 C10 C11 MAT2-TO-MUTATE

Destructively updates of the components of the given ‘mat2‘ to the new ‘single-float‘s provided.

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: set-components X Y Z W VEC

Destructively updates of the components of the given ‘vec2‘ to the new ‘single-float‘s provided.

Package

rtg-math.vector4.non-consing

Source

vectors/vector4/non-consing.lisp (file)

Function: set-components X Y Z VEC

Destructively updates of the components of the given ‘vec3‘ to the new ‘single-float‘s provided.

Package

rtg-math.vector3.non-consing

Source

vectors/vector3/non-consing.lisp (file)

Function: set-components X Y VEC

Destructively updates of the components of the given ‘vec2‘ to the new ‘single-float‘s provided.

Package

rtg-math.vector2.non-consing

Source

vectors/vector2/non-consing.lisp (file)

Function: set-from-columns MAT-TO-MUTATE COL-1 COL-2 COL-3 COL-4

Destructively updates of the components of the given ‘mat4‘ using the 4 ‘vec4‘s provided to populate the columns

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-columns MAT-TO-MUTATE COL-1 COL-2 COL-3

Destructively updates of the components of the given ‘mat3‘ using the 3 ‘vec3‘s provided to populate the columns

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-columns MAT-TO-MUTATE COL-1 COL-2

Destructively updates of the components of the given ‘mat2‘ using the 2 ‘vec2‘s provided to populate the columns

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: set-from-columns-v3 MAT-TO-MUTATE COL-1 COL-2 COL-3

Make a ‘mat4‘ using the data in the 3 ‘vec3‘ provided to populate the columns

The 4th row & column is filled as an identity matrix would be.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-mat3 MAT-TO-MUTATE M-A

Destructively updates of the components of the given ‘mat4‘ making it’s top left 3x3 portion the same as the ‘mat3‘ provided.

The 4th row & column is filled as an identity matrix would be.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-rotation-x MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat4‘ making it a matrix which would rotate a point around the x axis by the specified amount

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-rotation-x MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat3‘ making it a matrix which would rotate a point around the x axis by the specified amount

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-rotation-y MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat4‘ making it a matrix which would rotate a point around the y axis by the specified amount

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-rotation-y MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat3‘ making it a matrix which would rotate a point around the y axis by the specified amount

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-rotation-z MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat4‘ making it a matrix which would rotate a point around the z axis by the specified amount

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-rotation-z MAT-TO-MUTATE ANGLE

Destructively updates of the components of the given ‘mat3‘ making it a matrix which would rotate a point around the z axis by the specified amount

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-rows MAT-TO-MUTATE ROW-1 ROW-2 ROW-3 ROW-4

Destructively updates of the components of the given ‘mat4‘ using the 4 ‘vec4‘s provided to populate the rows

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-rows MAT-TO-MUTATE ROW-1 ROW-2 ROW-3

Destructively updates of the components of the given ‘mat3‘ using the 3 ‘vec3‘s provided to populate the rows

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-rows MAT-TO-MUTATE ROW-1 ROW-2

Destructively updates of the components of the given ‘mat2‘ using the 2 ‘vec2‘s provided to populate the rows

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: set-from-rows-v3 MAT-TO-MUTATE ROW-1 ROW-2 ROW-3

Make a ‘mat4‘ using the data in the 3 ‘vec3‘ provided to populate the rows

The 4th row & column is filled as an identity matrix would be.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-scale MAT-TO-MUTATE SCALE-VEC3

Mutates the given ‘mat4‘ to be a matrix which will scale by the amounts specified

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-from-scale MAT-TO-MUTATE SCALE-VEC3

Mutates the given ‘mat3‘ to be a matrix which will scale by the amounts specified

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-from-scale MAT-TO-MUTATE SCALE-VEC2

Mutates the given ‘mat2‘ to be a which will scale by the amounts specified

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: set-from-translation MAT-TO-MUTATE VEC-A

Destructively updates of the components of the given ‘mat4‘ making it a matrix which which will translate a point by the specified amount

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-rotation-from-axis-angle MAT-TO-MUTATE AXIS3 ANGLE

Destructively updates of the components of the given ‘mat4‘ making it a matrix which will rotate a point about the axis specified by the angle provided

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-rotation-from-axis-angle MAT-TO-MUTATE AXIS3 ANGLE

Destructively updates of the components of the given ‘mat3‘ making it a matrix which will rotate a point about the axis specified by the angle provided

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-rotation-from-euler MAT-TO-MUTATE VEC3-A

Destructively modifies the ‘mat4‘ to be a rotation matrix whos rotation angles come from the ‘vec3‘ provided.

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: set-rotation-from-euler MAT-TO-MUTATE VEC3-A

Destructively modifies the ‘mat3‘ to be a rotation matrix whos rotation angles come from the ‘vec3‘ provided.

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: set-rotation-from-euler MAT-TO-MUTATE ANGLE

Destructively modifies the ‘mat2‘ to be a rotation matrix whos rotation angle comes from the single-float provided.

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: slerp START-QUAT END-QUAT POS

Spherically interpolate between two quaternions. Note that this will always take the shortest path.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: spherical->cartesian SPHERICAL-COORD-V3

Takes a spherical coord vector with the layout (θ φ ρ) and converts it to a cartesian vector3.

Notes:
θ - angle between υ and x axis (rotating around z) φ - angle between υ and z axis
ρ - distance from origin (lengh of υ)

Package

rtg-math.spherical

Source

spherical-coords/spherical.lisp (file)

Function: spline X KNOTS

{TODO}

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: spline X KNOTS

{TODO}

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: spline X KNOTS

{TODO}

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: spline X KNOTS

{TODO}

Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Function: swizzle VEC PATTERN

‘Swizzle‘ allows you to compose a new vector out of an existing one by picking it’s components.

Given a ‘vec3‘ called ‘a‘ = ‘(v! 1 2 3)‘

- ‘(swizzle a :xy)‘ → (v! 1 2)
- ‘(swizzle a :xx)‘ → (v! 1 1)
- ‘(swizzle a :yx)‘ → (v! 2 1)
- ‘(swizzle a :yyyy)‘ → (v! 2 2 2 2)
- ‘(swizzle a :zzyy)‘ → (v! 3 3 2 2)

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Writer

(setf swizzle) (function)

Function: (setf swizzle) VALUE VEC PATTERN
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Reader

swizzle (function)

Function: s~ VEC PATTERN

Shorthand for ‘swizzle‘

‘s~‘ allows you to compose a new vector out of an existing one by picking it’s components.

Given a ‘vec3‘ called ‘a‘ = ‘(v! 1 2 3)‘

- ‘(s~ a :xy)‘ → (v! 1 2)
- ‘(s~ a :xx)‘ → (v! 1 1)
- ‘(s~ a :yx)‘ → (v! 2 1)
- ‘(s~ a :yyyy)‘ → (v! 2 2 2 2)
- ‘(s~ a :zzyy)‘ → (v! 3 3 2 2)

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Writer

(setf s~) (function)

Function: (setf s~) VALUE VEC PATTERN
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Reader

s~ (function)

Function: to-direction QUAT

Returns a new ‘vec3‘ is equal to ‘(v! 0 0 -1)‘ having been rotated by the given ‘quaternion‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: to-direction-vec4 QUAT

Returns a new ‘vec4‘ is equal to ‘(v! 0 0 -1 0)‘ having been rotated by the given ‘quaternion‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: to-mat3 QUAT

Returns a new ‘mat3‘ which represents the same rotation as the given ‘quaternion‘

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: to-mat3 MAT-TO-MUTATE QUAT

Given a ‘quaternion‘ and a ‘mat3‘ to mutate this function will mutate the ‘mat3‘ such that it represents the same rotation as the ‘quaternion‘ does.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: to-mat3 MAT4

Returns a fresh ‘mat3‘ which contains the ’top left’ 3x3 portion of the given ‘mat4‘

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: to-mat4 QUAT

Returns a new ‘mat4‘ which represents the same rotation as the given ‘quaternion‘ (and zero translation)

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: to-mat4 MAT-TO-MUTATE QUAT

Given a ‘quaternion‘ and a ‘mat4‘ to mutate this function will mutate the ‘mat4‘ such that it represents the same rotation as the ‘quaternion‘ does.

Package

rtg-math.quaternions.non-consing

Source

quaternions/non-consing.lisp (file)

Function: to-string MAT

{TODO}

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: trace MATRIX-A

Returns the trace of the given matrix as a vector

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: trace MAT-A

Returns the trace of the matrix (That is the diagonal values)

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: trace MAT-A

Returns the trace of the matrix (That is the diagonal values)

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: trace MAT-A

Returns the trace of the matrix (That is the diagonal values)

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: transform-m3 MATRIX3 LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: transform-m3 MATRIX3 RAY3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: transform-m3 MATRIX3 LINE3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: transform-q QUAT LINE-SEG3
Package

rtg-math.region.line-segment3

Source

regions/line-segment3/consing.lisp (file)

Function: transform-q QUAT RAY3
Package

rtg-math.region.ray3

Source

regions/ray3/consing.lisp (file)

Function: transform-q QUAT LINE3
Package

rtg-math.region.line3

Source

regions/line3/consing.lisp (file)

Function: translation VEC-A

Takes a ‘vec3‘ and returns a ‘mat4‘ which will translate by the specified amount

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: transpose MATRIX-A

Returns the transpose of the given matrix

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: transpose M-A

Returns the transpose of the provided matrix

Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: transpose MAT-TO-TRANSPOSE

Mutates the given ‘mat4‘ to be it’s own transpose

Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: transpose MAT-A

Returns the transpose of the provided matrix

Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: transpose MAT-TO-TRANSPOSE

Mutates the given ‘mat3‘ to be it’s own transpose

Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: transpose MAT-A

Returns the transpose of the provided matrix

Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: transpose MAT-TO-TRANSPOSE

Mutates the given ‘mat2‘ to be it’s own transpose

Package

rtg-math.matrix2.non-consing

Source

matrices/matrix2/non-consing.lisp (file)

Function: unitp QUAT

Returns T if this is a unit quaternion.

Package

rtg-math.quaternions

Source

quaternions/consing.lisp (file)

Function: unitp MATRIX

Returns T if the matrix is the unit matrix.

Package

rtg-math.matrices

Source

matrices/matrices.lisp (file)

Function: unitp VEC-A

Returns T is the given vector has a length eql to 1

Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Function: unitp VECTOR-A

Checks if the vector is of unit length. As this is a
floating point number it checks to see if the length is
within the range of 1 + or - and threshold set in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector4

Source

vectors/vector4/consing.lisp (file)

Function: unitp VECTOR-A

Checks if the vector is of unit length. As this is a
floating point number it checks to see if the length is
within the range of 1 + or - and threshold set in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector3

Source

vectors/vector3/consing.lisp (file)

Function: unitp VECTOR-A

Checks if the vector is of unit length. As this is a
floating point number it checks to see if the length is
within the range of 1 + or - and threshold set in base-maths

Note: Old, float epsilons are tricky, I have a ticket open to review this

Package

rtg-math.vector2

Source

vectors/vector2/consing.lisp (file)

Function: v! &rest COMPONENTS

Create a vec2, vec3 or vec4. The kind of vector returned by this function depends on what is passed as the arguments.

It can take any number of the following..

- floats
- integers
- vec2
- vec3
- vec4

so long as the total number of components is 2, 3 or 4. So any of the following examples are valid:

- ‘(v! 1 2 3 4)‘
- ‘(v! 1.0 2 3.0 4)‘
- ‘(v! 1 (v! 2 3) 4)‘
- ‘(v! (v! 1 2) (v! 3 4))‘
- ‘(v! (v! 1 2 3) 4.0)‘

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!bool &rest COMPONENTS

Create a vector of 2, 3 or 4 booleans out of booleans or other boolean vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!byte &rest COMPONENTS

a vector of 2, 3 or 4 bytes out of bytes or other byte vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!double &rest COMPONENTS

Create a vector of 2, 3 or 4 doubles out of doubles or other double vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!int &rest COMPONENTS

Create a vector of 2, 3 or 4 ints out of ints or other int vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!int8 &rest COMPONENTS

Create a vector of 2, 3 or 4 int8s out of int8s or other int8 vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!ubyte &rest COMPONENTS

Create a vector of 2, 3 or 4 ubytes out of ubytes or other ubyte vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!uint &rest COMPONENTS

Create a vector of 2, 3 or 4 uints out of uints or other uint vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v!uint8 &rest COMPONENTS

Create a vector of 2, 3 or 4 uint8s out of uint8s or other uint8 vectors

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2! X &optional Y

Create vec2 from 1 or 2 floats or ints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!byte X &optional Y

Create vector of two bytes from 1 or 2 bytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!double X &optional Y

Create vector of two doubles from 1 or 2 doubles

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!int X &optional Y

Create vector of two ints from 1 or 2 ints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!int8 X &optional Y

Create vector of two int8s from 1 or 2 int8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!short X &optional Y

Create vector of two shorts from 1 or 2 shorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!ubyte X &optional Y

Create vector of two ubytes from 1 or 2 ubytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!uint X &optional Y

Create vector of two uints from 1 or 2 uints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!uint8 X &optional Y

Create vector of two uint8s from 1 or 2 uint8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v2!ushort X &optional Y

Create vector of two ushorts from 1 or 2 ushorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3! X &optional Y Z

Create a vec3 from 1, 2 or 3 floats or ints.

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!byte X &optional Y Z

Creates a vector of 3 bytes from 1, 2 or 3 bytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!double X &optional Y Z

Creates a vector of 3 doubles from 1, 2 or 3 doubles

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!int X &optional Y Z

Creates a vector of 3 ints from 1, 2 or 3 ints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!int8 X &optional Y Z

Creates a vector of 3 int8s from 1, 2 or 3 int8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!short X &optional Y Z

Creates a vector of 3 shorts from 1, 2 or 3 shorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!ubyte X &optional Y Z

Creates a vector of 3 ubytes from 1, 2 or 3 ubytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!uint X &optional Y Z

Creates a vector of 3 uints from 1, 2 or 3 uints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!uint8 X &optional Y Z

Creates a vector of 3 uint8s from 1, 2 or 3 uint8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v3!ushort X &optional Y Z

Creates a vector of 3 ushorts from 1, 2 or 3 ushorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4! X &optional Y Z W

Create a vec4 from 1, 2, 3 or 4 floats or ints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!byte X &optional Y Z W

Creates a vector of 4 bytes from 1, 2, 3 or 4 bytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!double X &optional Y Z W

Creates a vector of 4 doubles from 1, 2, 3 or 4 doubles

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!int X &optional Y Z W

Creates a vector of 4 ints from 1, 2, 3 or 4 ints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!int8 X &optional Y Z W

Creates a vector of 4 int8s from 1, 2, 3 or 4 int8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!short X &optional Y Z W

Creates a vector of 4 shorts from 1, 2, 3 or 4 shorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!ubyte X &optional Y Z W

Creates a vector of 4 ubytes from 1, 2, 3 or 4 ubytes

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!uint X &optional Y Z W

Creates a vector of 4 uints from 1, 2, 3 or 4 uints

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!uint8 X &optional Y Z W

Creates a vector of 4 uint8s from 1, 2, 3 or 4 uint8s

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: v4!ushort X &optional Y Z W

Creates a vector of 4 ushorts from 1, 2, 3 or 4 ushorts

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Function: w QUAT
Function: (setf w) VALUE QUAT

Returns the w component of the quaternion

Package

%rtg-math.quaternion.common

Source

quaternions/common.lisp (file)

Function: w VEC

Returns the w component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Writer

(setf w) (function)

Function: (setf w) VALUE VEC

Sets the w component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Reader

w (function)

Function: x QUAT
Function: (setf x) VALUE QUAT

Returns the x component of the quaternion

Package

%rtg-math.quaternion.common

Source

quaternions/common.lisp (file)

Function: x VEC

Returns the x component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Writer

(setf x) (function)

Function: (setf x) VALUE VEC

Sets the x component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Reader

x (function)

Function: y QUAT
Function: (setf y) VALUE QUAT

Returns the y component of the quaternion

Package

%rtg-math.quaternion.common

Source

quaternions/common.lisp (file)

Function: y VEC

Returns the y component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Writer

(setf y) (function)

Function: (setf y) VALUE VEC

Sets the y component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Reader

y (function)

Function: z QUAT
Function: (setf z) VALUE QUAT

Returns the z component of the quaternion

Package

%rtg-math.quaternion.common

Source

quaternions/common.lisp (file)

Function: z VEC

Returns the z component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Writer

(setf z) (function)

Function: (setf z) VALUE VEC

Sets the z component of the vector

Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Reader

z (function)


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

5.1.5 Generic functions

Generic Function: closest-point REG-A VEC3
Package

rtg-math.region

Source

regions/regions.lisp (file)

Methods
Method: closest-point (POINT-VEC3 array) (REG line-segment3)
Method: closest-point (REG line-segment3) (POINT-VEC3 array)
Method: closest-point (POINT-VEC3 array) (REG ray3)
Method: closest-point (REG ray3) (POINT-VEC3 array)
Method: closest-point (POINT-VEC3 array) (REG line3)
Method: closest-point (REG line3) (POINT-VEC3 array)
Generic Function: closest-points REG-A REG-B
Package

rtg-math.region

Source

regions/regions.lisp (file)

Methods
Method: closest-points (REG-A line3) (REG-B line-segment3)
Method: closest-points (REG-A line-segment3) (REG-B line3)
Method: closest-points (REG-A ray3) (REG-B line-segment3)
Method: closest-points (REG-A line-segment3) (REG-B ray3)
Method: closest-points (REG-A line-segment3) (REG-B line-segment3)
Method: closest-points (REG-A ray3) (REG-B ray3)
Method: closest-points (REG-A line3) (REG-B line3)
Generic Function: distance REG-A REG-B
Package

rtg-math.region

Source

regions/regions.lisp (file)

Methods
Method: distance (REG-A line-segment3) (REG-B line3)
Method: distance (REG-A line3) (REG-B line-segment3)
Method: distance (REG-A line-segment3) (REG-B ray3)
Method: distance (REG-A ray3) (REG-B line-segment3)
Method: distance (REG-A line3) (REG-B ray3)
Method: distance (REG-A ray3) (REG-B line3)
Method: distance (REG-A line3) (REG-B line3)
Method: distance (REG-A ray3) (REG-B ray3)
Method: distance (REG-A line-segment3) (REG-B line-segment3)
Generic Function: distance-squared REG-A REG-B
Package

rtg-math.region

Source

regions/regions.lisp (file)

Methods
Method: distance-squared (REG-A line-segment3) (REG-B line3)
Method: distance-squared (REG-A line3) (REG-B line-segment3)
Method: distance-squared (REG-A line-segment3) (REG-B ray3)
Method: distance-squared (REG-A ray3) (REG-B line-segment3)
Method: distance-squared (REG-A line3) (REG-B ray3)
Method: distance-squared (REG-A ray3) (REG-B line3)
Method: distance-squared (REG-A line3) (REG-B line3)
Method: distance-squared (REG-A ray3) (REG-B ray3)
Method: distance-squared (REG-A line-segment3) (REG-B line-segment3)
Generic Function: intersects-p REG-A REG-B
Package

rtg-math.region

Source

regions/regions.lisp (file)

Methods
Method: intersects-p (REG-A axis-aligned-box) (REG-B axis-aligned-box)
Method: intersects-p (REG-A line-segment3) (REG-B axis-aligned-box)
Method: intersects-p (REG-A axis-aligned-box) (REG-B line-segment3)
Method: intersects-p (REG-A ray3) (REG-B axis-aligned-box)
Method: intersects-p (REG-A axis-aligned-box) (REG-B ray3)
Method: intersects-p (REG-A line3) (REG-B axis-aligned-box)
Method: intersects-p (REG-A axis-aligned-box) (REG-B line3)

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

5.1.6 Structures

Structure: axis-aligned-box ()
Package

rtg-math.types

Source

deftypes.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: minima
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element -1.0)

Readers

axis-aligned-box-minima (function)

Writers

(setf axis-aligned-box-minima) (function)

Slot: maxima
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 1.0)

Readers

axis-aligned-box-maxima (function)

Writers

(setf axis-aligned-box-maxima) (function)

Structure: line-segment3 ()
Package

rtg-math.types

Source

deftypes.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: end-point0
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 0.0)

Readers

line-segment3-end-point0 (function)

Writers

(setf line-segment3-end-point0) (function)

Slot: offset
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-contents (quote (0.0 1.0 0.0)))

Readers

line-segment3-offset (function)

Writers

(setf line-segment3-offset) (function)

Structure: line3 ()
Package

rtg-math.types

Source

deftypes.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: origin
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 0.0)

Readers

line3-origin (function)

Writers

(setf line3-origin) (function)

Slot: direction
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 1.0)

Readers

line3-direction (function)

Writers

(setf line3-direction) (function)

Structure: ray3 ()
Package

rtg-math.types

Source

deftypes.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: origin
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 0.0)

Readers

ray3-origin (function)

Writers

(setf ray3-origin) (function)

Slot: direction
Type

glsl-symbols.types:vec3

Initform

(make-array 3 :element-type (quote single-float) :initial-element 1.0)

Readers

ray3-direction (function)

Writers

(setf ray3-direction) (function)


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

5.1.7 Types

Type: int8-vec2 ()

A ‘simple-array‘ of 2 ‘(signed-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)

Type: int8-vec3 ()

A ‘simple-array‘ of 3 ‘(signed-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)

Type: int8-vec4 ()

A ‘simple-array‘ of 4 ‘(signed-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)

Type: quaternion ()
Package

rtg-math.types

Source

deftypes.lisp (file)

Type: uint8-vec2 ()

A ‘simple-array‘ of 2 ‘(unsigned-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)

Type: uint8-vec3 ()

A ‘simple-array‘ of 3 ‘(unsigned-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)

Type: uint8-vec4 ()

A ‘simple-array‘ of 4 ‘(unsigned-byte 8)‘s

Package

rtg-math.types

Source

deftypes.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +k-epsilon+
Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Constant: +one-radian-in-degrees+
Package

rtg-math.base-maths

Source

base-maths.lisp (file)


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

5.2.2 Special variables

Special Variable: *coef*
Package

rtg-math.base-maths

Source

base-maths.lisp (file)

Special Variable: *signatures*
Package

%rtg-math

Source

utils.lisp (file)


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

5.2.3 Macros

Macro: def-v! NAME TYPE
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Macro: dvec VAR-LIST EXPRESSION &body BODY
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)

Macro: dvec* VAR-LIST-EXPRESSION-PAIRS &body BODY
Package

rtg-math.vectors

Source

vectors/vectors.lisp (file)


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

5.2.4 Compiler macros

Compiler Macro: v!short &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)

Compiler Macro: v!ushort &rest COMPONENTS
Package

rtg-math.base-vectors

Source

vectors/base/base-vectors.lisp (file)


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

5.2.5 Functions

Function: %* MAT-A MAT-B
Package

rtg-math.matrix4

Source

matrices/matrix4/consing.lisp (file)

Function: %* MAT-ACCUM TO-MULTIPLY-MAT
Package

rtg-math.matrix4.non-consing

Source

matrices/matrix4/non-consing.lisp (file)

Function: %* MAT-A MAT-B
Package

rtg-math.matrix3

Source

matrices/matrix3/consing.lisp (file)

Function: %* MAT-ACCUM TO-MULTIPLY-MAT
Package

rtg-math.matrix3.non-consing

Source

matrices/matrix3/non-consing.lisp (file)

Function: %* MAT-A MAT-B
Package

rtg-math.matrix2

Source

matrices/matrix2/consing.lisp (file)

Function: %* MAT-ACCUM TO-MULTIPLY-MAT
Package