Exemple #1
0
func (cube *Cube) WriteTo(w io.Writer) error {
	return bit.Write(w,
		&cube.Largest,
		&cube.A, &cube.B, &cube.C,
		&cube.X, &cube.Y, &cube.Z,
		&cube.Interacting,
	)
}
Exemple #2
0
func (cube *Cube) WriteTo(w io.Writer) error {
	interacting := int32(0)
	if cube.Interacting {
		interacting = 1
	}
	return bit.Write(w,
		&cube.Rot.X, &cube.Rot.Y, &cube.Rot.Z, &cube.Rot.W,
		&cube.Pos.X, &cube.Pos.Y, &cube.Pos.Z,
		&interacting,
	)
}