Skip to content

Latest commit

 

History

History
438 lines (428 loc) · 37.2 KB

README.md

File metadata and controls

438 lines (428 loc) · 37.2 KB

Function Reference

This is where you will find a reference of all the functions that PyGLM provides.

Most functions are overloaded, i.e. they accept more than one type of argument and may or may not behave differently depending on the type of argument(s).
Where possible, I tried to compromise between exactness and readability of the supported data types.
Therefore there are some types that are placeholders for others.
Here are a few examples:

Name Description
number Can be (any) numerical type, usually float or int.
vecN Can be any or most of the available vector types of any length.
vec3 Can be any or most of the available vector types of length 3.
fvecN A float vector of any length.
matNxM Can be any or most of the available matrix types of any shape.
matSxS Can be any or most of the available matrix types of square shape.
quat Any type of quaternion.

If different combinations of input arguments are possible, multiple ways to call a particular function are presented.

Example:

glm.abs(x: float) -> float

  Returns x if x >= 0; otherwise it returns -x.

glm.abs(x: vecN) -> vecN

  For each component c of x,
  Returns c if c >= 0; otherwise it returns -c.

This means that you can call the glm.abs function with a float "x" and it will return a float value
(as you can tell by the -> float), or you can call it with a vector, e.g. a vec3 and get a vector (vec3 in this case) back.

Table of Contents