modulepackage
0.0.0-20170909030607-791261b8bbbf
Repository: https://github.com/jragonmiris/mathgl.git
Documentation: pkg.go.dev
# README
Warning
This repository is no longer maintained. It has been included in the go-gl project and the new repository is kept here:
https://github.com/go-gl/mathgl
This repository is maintained because the new one has a sweeping API change. I will still process bug reports on this repository, but otherwise no development or features will be added.
MathGL
A code-generated 3D math library for the Go language.
# Functions
Returns the point at point t along an n-control point Bezier curve
t must be in the range 0.0 and 1.0 or this function will panic.
Same as the 2D version, except the line is in 3D space.
Does interpolation over a spline of several bezier curves.
Does interpolation over a spline of several bezier curves.
Creates a 2-dimensional Bezier surface of arbitrary degree in 3D Space Like the curve functions, if u or v are not in the range [0.0,1.0] the function will panic, use Clamp[f|d] to ensure it is correct.
Generates a circle centered at (0,0) with a given radius.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FloatEqual is a safe utility function to compare floats.
No description provided by the author
No description provided by the author
No description provided by the author
FloatEqualThreshold is a utility function to compare floats.
No description provided by the author
No description provided by the author
No description provided by the author
Transform from GL's proportional system to pixel coordinates Assumes the pixel coordinate system has its origin in the top left corner.
Same as Rotate2D, except homogeneous (3x3 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate2D, except homogeneous (3x3 with the extra row/col being all zeroes with a one in the bottom right).
HomogRotate3D creates a 3D rotation Matrix that rotates by (radian) angle about some arbitrary axis given by a Vector.
HomogRotate3D creates a 3D rotation Matrix that rotates by (radian) angle about some arbitrary axis given by a Vector.
Same as Rotate3DX, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate3DX, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate3DY, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate3DY, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate3DZ, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
Same as Rotate3DZ, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Generates a bezier curve with controlPoints cPoints.
Same as the 2D version, except with the line in 3D space.
No description provided by the author
Equivalent to Ortho with the near and far planes being -1 and 1, respectively.
Equivalent to Ortho with the near and far planes being -1 and 1, respectively.
No description provided by the author
No description provided by the author
No description provided by the author
Transform a set of coordinates from object space (in obj) to window coordinates (with depth)
Window coordinates are continuous, not discrete (well, as continuous as an IEEE Floating Point can be), so you won't get exact pixel locations without rounding or similar.
Transform a set of coordinates from object space (in obj) to window coordinates (with depth)
Window coordinates are continuous, not discrete (well, as continuous as an IEEE Floating Point can be), so you won't get exact pixel locations without rounding or similar.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Generates a 2-triangle rectangle for use with GL_TRIANGLES.
Reticulates ALL the Splines
For the overly serious: the function is just for fun.
Rotate2D returns a rotation Matrix about a angle in 2-D space.
Rotate2D returns a rotation Matrix about a angle in 2-D space.
Rotate3DX returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the X-axis
Where c is cos(angle) and s is sin(angle) [1 0 0] [0 c -s] [0 s c ].
Rotate3DX returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the X-axis
Where c is cos(angle) and s is sin(angle) [1 0 0] [0 c -s] [0 s c ].
Rotate3DY returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Y-axis
Where c is cos(angle) and s is sin(angle) [c 0 s] [0 1 0] [s 0 c ].
Rotate3DY returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Y-axis
Where c is cos(angle) and s is sin(angle) [c 0 s] [0 1 0] [s 0 c ].
Rotate3DZ returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Z-axis
Where c is cos(angle) and s is sin(angle) [c -s 0] [s c 0] [0 0 1 ].
Rotate3DZ returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Z-axis
Where c is cos(angle) and s is sin(angle) [c -s 0] [s c 0] [0 0 1 ].
Scale2D creates a homogeneous 2D scaling matrix [[ scaleX, 0 , 0 ]] [[ 0 , scaleY, 0 ]] [[ 0 , 0 , 1 ]].
Scale2D creates a homogeneous 2D scaling matrix [[ scaleX, 0 , 0 ]] [[ 0 , scaleY, 0 ]] [[ 0 , 0 , 1 ]].
Scale3D creates a homogeneous 3D scaling matrix [[ scaleX, 0 , 0 , 0 ]] [[ 0 , scaleY, 0 , 0 ]] [[ 0 , 0 , scaleZ, 0 ]] [[ 0 , 0 , 0 , 1 ]].
Scale3D creates a homogeneous 3D scaling matrix [[ scaleX, 0 , 0 , 0 ]] [[ 0 , scaleY, 0 , 0 ]] [[ 0 , 0 , scaleZ, 0 ]] [[ 0 , 0 , 0 , 1 ]].
Transform from pixel coordinates to GL coordinates.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ShearX2D creates a homogeneous 2D shear matrix along the X-axis.
ShearX2D creates a homogeneous 2D shear matrix along the X-axis.
ShearX3D creates a homogeneous 3D shear matrix along the X-axis.
ShearX3D creates a homogeneous 3D shear matrix along the X-axis.
ShearY2D creates a homogeneous 2D shear matrix along the Y-axis.
ShearY2D creates a homogeneous 2D shear matrix along the Y-axis.
ShearY3D creates a homogeneous 3D shear matrix along the Y-axis.
ShearY3D creates a homogeneous 3D shear matrix along the Y-axis.
ShearZ3D creates a homogeneous 3D shear matrix along the Z-axis.
ShearZ3D creates a homogeneous 3D shear matrix along the Z-axis.
Translate2D returns a homogeneous (3x3 for 2D-space) Translation matrix that moves a point by Tx units in the x-direction and Ty units in the y-direction
[[1, 0, Tx]] [[0, 1, Ty]] [[0, 0, 1 ]].
Translate2D returns a homogeneous (3x3 for 2D-space) Translation matrix that moves a point by Tx units in the x-direction and Ty units in the y-direction
[[1, 0, Tx]] [[0, 1, Ty]] [[0, 0, 1 ]].
Translate3D returns a homogeneous (4x4 for 3D-space) Translation matrix that moves a point by Tx units in the x-direction, Ty units in the y-direction, and Tz units in the z-direction
[[1, 0, 0, Tx]] [[0, 1, 0, Ty]] [[0, 0, 1, Tz]] [[0, 0, 0, 1 ]].
Translate3D returns a homogeneous (4x4 for 3D-space) Translation matrix that moves a point by Tx units in the x-direction, Ty units in the y-direction, and Tz units in the z-direction
[[1, 0, 0, Tx]] [[0, 1, 0, Ty]] [[0, 0, 1, Tz]] [[0, 0, 0, 1 ]].
Transform a set of window coordinates to object space.
Transform a set of window coordinates to object space.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author