a

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteArrayToInt

func ByteArrayToInt(arr []byte) int

func ByteArrayToInt64

func ByteArrayToInt64(arr []byte) int64

func CopyByteArray

func CopyByteArray(src []byte, target []byte, start, length int) error

func Float32ToByteArray

func Float32ToByteArray(num float32) []byte

func Float64ToByteArray

func Float64ToByteArray(num float64) []byte

func Int64ToByteArray

func Int64ToByteArray(num int64) []byte

func IntToByteArray

func IntToByteArray(num int32) []byte

Types

type Byte deprecated

type Byte byte

Deprecated: use corresponding go type instead

func (Byte) EncodeToByteArray

func (b Byte) EncodeToByteArray() []byte

func (Byte) GetName

func (b Byte) GetName() string

type ByteArrayCodable

type ByteArrayCodable interface {
	ByteArrayEncodable
	ByteArrayDecodable
}

type ByteArrayDecodable

type ByteArrayDecodable interface {
	DecodeFromByteArray([]byte)
}

type ByteArrayEncodable

type ByteArrayEncodable interface {
	EncodeToByteArray() []byte
}

type Color

type Color struct {
	R, G, B, A byte
}

func BlackColor

func BlackColor() Color

func BlueColor

func BlueColor() Color

func GreenColor

func GreenColor() Color

func NewColor

func NewColor(r, g, b, a byte) Color

func PinkColor

func PinkColor() Color

func RedColor

func RedColor() Color

func TransparentColor

func TransparentColor() Color

func WhiteColor

func WhiteColor() Color

func (Color) EncodeToByteArray

func (c Color) EncodeToByteArray() []byte

func (*Color) FromMap

func (c *Color) FromMap(siMap SiMap)

func (Color) Normalize

func (c Color) Normalize() Vector4

func (Color) ToMap

func (c Color) ToMap() SiMap

type Double deprecated

type Double float32

Deprecated: use corresponding go type instead

func (Double) EncodeToByteArray

func (d Double) EncodeToByteArray() []byte

func (Double) GetName

func (d Double) GetName() string

type Float deprecated

type Float float32

Deprecated: use corresponding go type instead

func (Float) EncodeToByteArray

func (f Float) EncodeToByteArray() []byte

func (Float) GetName

func (f Float) GetName() string

type Int deprecated

type Int int32

Deprecated: use corresponding go type instead

func (Int) EncodeToByteArray

func (i Int) EncodeToByteArray() []byte

func (Int) GetName

func (i Int) GetName() string

type Int32Vector2

type Int32Vector2 struct {
	X, Y int32
}

type Int32Vector3

type Int32Vector3 struct {
	X, Y, Z int32
}

type IntVector2

type IntVector2 struct {
	X, Y int
}

func NewIntVector2

func NewIntVector2(x, y int) IntVector2

func (IntVector2) Add

func (v IntVector2) Add(other IntVector2) IntVector2

func (IntVector2) Sub

func (v IntVector2) Sub(other IntVector2) IntVector2

func (IntVector2) ToFloat

func (v IntVector2) ToFloat() Vector2

func (IntVector2) ToFloat3

func (v IntVector2) ToFloat3() Vector3

type IntVector3

type IntVector3 struct {
	X, Y, Z int
}

Represents a point in 3D space only in integer values

func NewIntVector3

func NewIntVector3(x, y, z int) IntVector3

func OneIntVector

func OneIntVector() IntVector3

func ZeroIntVector

func ZeroIntVector() IntVector3

func (IntVector3) Add

func (v IntVector3) Add(v2 IntVector3) IntVector3

Returns a new vector - the sum of two vectors

func (IntVector3) EncodeToByteArray

func (v IntVector3) EncodeToByteArray() []byte

func (IntVector3) Equals

func (v IntVector3) Equals(other interface{}) bool

Checks if the vector is the same as other vector

func (IntVector3) Multiply

func (v IntVector3) Multiply(v2 IntVector3) IntVector3

Returns new vector - multiplication of two vectors

func (IntVector3) Ndc

func (v IntVector3) Ndc(screen IntVector3) Vector3

Transforms vector ro normalized device coordinates vector

func (IntVector3) SetXYZ

func (v IntVector3) SetXYZ(x, y, z int)

func (IntVector3) Sub

func (v IntVector3) Sub(v2 IntVector3) IntVector3

Returns a new vector - v-v2

func (IntVector3) ToFloat

func (v IntVector3) ToFloat() Vector3

func (IntVector3) ToInt32

func (v IntVector3) ToInt32() Int32Vector3

func (IntVector3) ToMap

func (v IntVector3) ToMap() SiMap

func (IntVector3) ToString

func (v IntVector3) ToString() string

type Long deprecated

type Long int64

Deprecated: use corresponding go type instead

func (Long) EncodeToByteArray

func (l Long) EncodeToByteArray() []byte

func (Long) GetName

func (l Long) GetName() string

type Mappable

type Mappable interface {
	ToMap() SiMap
}

type SiMap

type SiMap map[string]interface{}

func RequireSiMap

func RequireSiMap(i interface{}) SiMap

type String deprecated

type String string

Deprecated: use corresponding go type instead

func (String) EncodeToByteArray

func (s String) EncodeToByteArray() []byte

func (String) GetName

func (s String) GetName() string

type Unmappable

type Unmappable interface {
	FromMap(siMap SiMap)
}

type Vector2

type Vector2 struct {
	X, Y float32
}

type Vector3

type Vector3 struct {
	X, Y, Z float32
}

Represents a point in 3D space

func NewVector3

func NewVector3(x, y, z float32) Vector3

func NewVector3FromMap

func NewVector3FromMap(siMap SiMap) Vector3

func OneVector

func OneVector() Vector3

func ZeroVector

func ZeroVector() Vector3

func (Vector3) Add

func (v Vector3) Add(v2 Vector3) Vector3

Returns a new vector - the sum of two vectors

func (Vector3) EncodeToByteArray

func (v Vector3) EncodeToByteArray() []byte

func (Vector3) Equals

func (v Vector3) Equals(other interface{}) bool

Checks if the vector is the same as other vector

func (*Vector3) FromMap

func (v *Vector3) FromMap(siMap SiMap)

func (Vector3) Multiply

func (v Vector3) Multiply(v2 Vector3) Vector3

Returns new vector - multiplication of two vectors

func (Vector3) Ndc

func (v Vector3) Ndc(screen Vector3) Vector3

Transforms vector ro normalized device coordinates vector

func (Vector3) Round

func (v Vector3) Round() IntVector3

Rounds the valued of the vector

func (Vector3) SetXYZ

func (v Vector3) SetXYZ(x, y, z float32)

func (Vector3) Sub

func (v Vector3) Sub(v2 Vector3) Vector3

Returns a new vector - v-v2

func (Vector3) ToMap

func (v Vector3) ToMap() SiMap

func (Vector3) ToString

func (v Vector3) ToString() string

type Vector4

type Vector4 struct {
	X, Y, Z, W float32
}

func NewVector4

func NewVector4(x, y, z, w float32) Vector4

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL