FAQ
https://github.com/ungerik/go3d

go3d is a performance oriented vector and matrix math package for 2D and 3D
graphics.

Every type has its own sub-package and is named T. So vec3.T is the 3D
vector type.
For every vector and matrix type there is a String() method and a Parse()
function.
Besides methods of T there are also functions in the packages, like
vec3.Dot(a, b).

Packages under the float64 directory are using float64 values instead of
float32.

Matrices are organized as arrays of columns which is also the way OpenGL
expects matrices.
DirectX expects "arrays of rows" matrices, use the Transpose() to convert.

Methods that don't return a specific value, return a pointer to the struct
to allow method call chaining.

Example:

a := vec3.Zero
b := vec3.UnitX
a.Add(&b).Scale(5)

Method names in the past tense return a copy of the struct instead of a
pointer to it.

Example:

a := vec3.UnitX
b := a.Scaled(5) // a still equals vec3.UnitX



Anyone keen on adding more spline packages in the style of hermit2 and
hermit3?

Have Fun.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 12, '13 at 4:56p
activeOct 13, '13 at 1:39p
posts6
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase