Documentation ¶
Index ¶
- Variables
- func HexStringFromRGB(rgb [3]float32) string
- func HexStringFromRGBA(rgba [4]float32) string
- func NewConsoleLogger(loglevel any) iLogger
- func NewDummyLogger() iLogger
- func NewWriterLogger(loglevel any, writer io.Writer) iLogger
- func RGBAFromHexString(s string) [4]float32
- func RGBFromHexString(s string) [3]float32
- func SetLogger(logger iLogger) iLogger
- type LogLevel
- type Matrix3
- func (self *Matrix3) Copy() *Matrix3
- func (self *Matrix3) GetElements() *[9]float32
- func (self *Matrix3) MultiplyToTheLeft(matrix *Matrix3) *Matrix3
- func (self *Matrix3) MultiplyToTheRight(matrix *Matrix3) *Matrix3
- func (self *Matrix3) MultiplyVector2(v [2]float32) [2]float32
- func (self *Matrix3) Set(v00 float32, v01 float32, v02 float32, v10 float32, v11 float32, v12 float32, ...) *Matrix3
- func (self *Matrix3) SetCopy(m *Matrix3) *Matrix3
- func (self *Matrix3) SetIdentity() *Matrix3
- func (self *Matrix3) SetMultiplyMatrices(matrices ...*Matrix3) *Matrix3
- func (self *Matrix3) SetRotation(angle_in_degree float32) *Matrix3
- func (self *Matrix3) SetScaling(sx float32, sy float32) *Matrix3
- func (self *Matrix3) SetTranslation(tx float32, ty float32) *Matrix3
- func (self *Matrix3) SetTranspose() *Matrix3
- func (self *Matrix3) Transpose() *Matrix3
- type Matrix4
- func (self *Matrix4) Copy() *Matrix4
- func (self *Matrix4) GetElements() *[16]float32
- func (self *Matrix4) MultiplyToTheLeft(matrix *Matrix4) *Matrix4
- func (self *Matrix4) MultiplyToTheRight(matrix *Matrix4) *Matrix4
- func (self *Matrix4) MultiplyVector3(v [3]float32) [3]float32
- func (self *Matrix4) Set(v00 float32, v01 float32, v02 float32, v03 float32, v10 float32, v11 float32, ...) *Matrix4
- func (self *Matrix4) SetCopy(m *Matrix4) *Matrix4
- func (self *Matrix4) SetIdentity() *Matrix4
- func (self *Matrix4) SetMultiplyMatrices(matrices ...*Matrix4) *Matrix4
- func (self *Matrix4) SetRotationByAxis(axis [3]float32, angle_in_degree float32) *Matrix4
- func (self *Matrix4) SetScaling(sx float32, sy float32, sz float32) *Matrix4
- func (self *Matrix4) SetTranslation(tx float32, ty float32, tz float32) *Matrix4
- func (self *Matrix4) SetTranspose() *Matrix4
- func (self *Matrix4) Transpose() *Matrix4
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger iLogger = &sDummyLogger{} // The Logger
Functions ¶
func HexStringFromRGB ¶
func HexStringFromRGBA ¶
func NewConsoleLogger ¶
func NewConsoleLogger(loglevel any) iLogger
NewConsoleLogger() returns a sConsoleLogger, which prints log messages on os.Stdout.
`loglevel` can be LogLevel/int or string like "none","error","warn","info","debug","trace".
func NewDummyLogger ¶
func NewDummyLogger() iLogger
NewDummyLogger() returns a sDummyLogger, which prints nothing.
func NewWriterLogger ¶
NewWriterLogger() returns a sWriterLogger, which prints log messages to the specified io.Writer.
`loglevel` can be LogLevel/int or string like "none","error","warn","info","debug","trace".
func RGBAFromHexString ¶
func RGBFromHexString ¶
Types ¶
type Matrix3 ¶
type Matrix3 struct {
// contains filtered or unexported fields
}
func NewMatrix3 ¶
func NewMatrix3() *Matrix3
func (*Matrix3) GetElements ¶
func (*Matrix3) MultiplyToTheLeft ¶
func (*Matrix3) MultiplyToTheRight ¶
func (*Matrix3) MultiplyVector2 ¶
func (*Matrix3) SetIdentity ¶
func (*Matrix3) SetMultiplyMatrices ¶
func (*Matrix3) SetRotation ¶
func (*Matrix3) SetTranslation ¶
func (*Matrix3) SetTranspose ¶
type Matrix4 ¶
type Matrix4 struct {
// contains filtered or unexported fields
}
func NewMatrix4 ¶
func NewMatrix4() *Matrix4
func (*Matrix4) GetElements ¶
func (*Matrix4) MultiplyToTheLeft ¶
func (*Matrix4) MultiplyToTheRight ¶
func (*Matrix4) MultiplyVector3 ¶
func (*Matrix4) SetIdentity ¶
func (*Matrix4) SetMultiplyMatrices ¶
func (*Matrix4) SetRotationByAxis ¶
func (*Matrix4) SetScaling ¶
func (*Matrix4) SetTranslation ¶
func (*Matrix4) SetTranspose ¶
Click to show internal directories.
Click to hide internal directories.