Documentation ¶
Index ¶
Constants ¶
View Source
const (
Float32Bytes = 4
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Transform ¶ added in v0.4.0
type Transform struct { Position Vec3 `db:"position" json:"position"` Rotation Vec3 `db:"rotation" json:"rotation"` Scale Vec3 `db:"scale" json:"scale"` }
Transform represent a transformation for an object in 3D space.
func (Transform) MarshalMUS ¶ added in v0.4.0
MarshalMUS fills buf with the MUS encoding of v.
type TransformNoScale ¶ added in v0.4.0
type TransformNoScale struct { Position Vec3 `db:"position" json:"position"` Rotation Vec3 `db:"rotation" json:"rotation"` }
TransformNoScale represents a transformation for an object in 3D space that has no scale. For example, users don't have a scale in the current system.
func (*TransformNoScale) Copy ¶ added in v0.4.0
func (t *TransformNoScale) Copy() TransformNoScale
func (*TransformNoScale) CopyToBuffer ¶ added in v0.4.0
func (t *TransformNoScale) CopyToBuffer(b []byte) error
func (TransformNoScale) MarshalMUS ¶ added in v0.4.0
func (v TransformNoScale) MarshalMUS(buf []byte) int
MarshalMUS fills buf with the MUS encoding of v.
func (TransformNoScale) SizeMUS ¶ added in v0.4.0
func (v TransformNoScale) SizeMUS() int
SizeMUS returns the size of the MUS-encoded v.
func (*TransformNoScale) UnmarshalMUS ¶ added in v0.4.0
func (v *TransformNoScale) UnmarshalMUS(buf []byte) (int, error)
UnmarshalMUS parses the MUS-encoded buf, and sets the result to *v.
type Vec3 ¶
type Vec3 struct { X float32 `json:"x" db:"x"` Y float32 `json:"y" db:"y"` Z float32 `json:"z" db:"z"` }
Vec3 is a three dimensional vector.
func MNan32Vec3 ¶
func MNan32Vec3() Vec3
func (Vec3) MarshalMUS ¶ added in v0.4.0
MarshalMUS fills buf with the MUS encoding of v.
type Vec3f64 ¶
type Vec3f64 struct { X float64 `json:"x" db:"x"` Y float64 `json:"y" db:"y"` Z float64 `json:"z" db:"z"` }
func (Vec3f64) MarshalMUS ¶ added in v0.4.0
MarshalMUS fills buf with the MUS encoding of v.
Click to show internal directories.
Click to hide internal directories.