Documentation
¶
Index ¶
- func ByteArrayToInt(arr []byte) int
- func ByteArrayToInt64(arr []byte) int64
- func CopyByteArray(src []byte, target []byte, start, length int) error
- func Float32ToByteArray(num float32) []byte
- func Float64ToByteArray(num float64) []byte
- func Int64ToByteArray(num int64) []byte
- func IntToByteArray(num int32) []byte
- type Bytedeprecated
- type ByteArrayCodable
- type ByteArrayDecodable
- type ByteArrayEncodable
- type Color
- type Doubledeprecated
- type Floatdeprecated
- type Intdeprecated
- type Int32Vector2
- type Int32Vector3
- type IntVector2
- type IntVector3
- func (v IntVector3) Add(v2 IntVector3) IntVector3
- func (v IntVector3) EncodeToByteArray() []byte
- func (v IntVector3) Equals(other interface{}) bool
- func (v IntVector3) Multiply(v2 IntVector3) IntVector3
- func (v IntVector3) Ndc(screen IntVector3) Vector3
- func (v IntVector3) SetXYZ(x, y, z int)
- func (v IntVector3) Sub(v2 IntVector3) IntVector3
- func (v IntVector3) ToFloat() Vector3
- func (v IntVector3) ToInt32() Int32Vector3
- func (v IntVector3) ToMap() SiMap
- func (v IntVector3) ToString() string
- type Longdeprecated
- type Mappable
- type SiMap
- type Stringdeprecated
- type Unmappable
- type Vector2
- type Vector3
- func (v Vector3) Add(v2 Vector3) Vector3
- func (v Vector3) EncodeToByteArray() []byte
- func (v Vector3) Equals(other interface{}) bool
- func (v *Vector3) FromMap(siMap SiMap)
- func (v Vector3) Multiply(v2 Vector3) Vector3
- func (v Vector3) Ndc(screen Vector3) Vector3
- func (v Vector3) Round() IntVector3
- func (v Vector3) SetXYZ(x, y, z float32)
- func (v Vector3) Sub(v2 Vector3) Vector3
- func (v Vector3) ToMap() SiMap
- func (v Vector3) ToString() string
- type Vector4
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteArrayToInt ¶
func ByteArrayToInt64 ¶
func Float32ToByteArray ¶
func Float64ToByteArray ¶
func Int64ToByteArray ¶
func IntToByteArray ¶
Types ¶
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 GreenColor ¶
func GreenColor() Color
func TransparentColor ¶
func TransparentColor() Color
func WhiteColor ¶
func WhiteColor() Color
func (Color) EncodeToByteArray ¶
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 SiMap ¶
type SiMap map[string]interface{}
func RequireSiMap ¶
func RequireSiMap(i interface{}) SiMap
type Unmappable ¶
type Unmappable interface {
FromMap(siMap SiMap)
}
type Vector3 ¶
type Vector3 struct {
X, Y, Z float32
}
Represents a point in 3D space
func NewVector3 ¶
func NewVector3FromMap ¶
func ZeroVector ¶
func ZeroVector() Vector3
func (Vector3) EncodeToByteArray ¶
Click to show internal directories.
Click to hide internal directories.