Discover Packages
github.com/qbradq/cubit
internal
util
package
Version:
v0.0.0-...-86c6665
Opens a new window with list of versions in this module.
Published: Oct 18, 2024
License: AGPL-3.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
GetBool(r)
GetByte(r)
GetBytes(r)
GetFloat(r)
GetString(r)
GetTime(r)
GetUint16(r)
GetUint32(r)
GetUint64(r)
Pad(w, l)
PutBool(w, v)
PutByte(w, v)
PutBytes(w, d)
PutFloat(w, v)
PutString(w, s)
PutTime(w, t)
PutUint16(w, v)
PutUint32(w, v)
PutUint64(w, v)
Types
Source Files
Documentation
Documentation
¶
func GetBool(r io.Reader) bool
func GetByte(r io.Reader) byte
func GetBytes(r io.Reader) []byte
func GetFloat(r io.Reader) float64
func GetString(r io.Reader) string
func GetTime(r io.Reader) time.Time
func GetUint16(r io.Reader) uint16
func GetUint32(r io.Reader) uint32
func GetUint64(r io.Reader) uint64
func Pad(w io.Writer, l int)
func PutBool(w io.Writer, v bool)
func PutByte(w io.Writer, v byte)
func PutBytes(w io.Writer, d []byte)
func PutFloat(w io.Writer, v float64)
func PutString(w io.Writer, s string)
func PutTime(w io.Writer, t time.Time)
func PutUint16(w io.Writer, v uint16)
func PutUint32(w io.Writer, v uint32)
func PutUint64(w io.Writer, v uint64)
type Vox
GetBool returns the next boolean value in the data buffer.
GetByte is a convenience function that returns the next byte in the buffer.
GetBytes returns the next byte slice in the data buffer.
GetFloat returns the next 64-bit floating-point value.
GetString returns the next null-terminated string in the data buffer.
GetTime returns the next time.Time value in the data buffer.
GetUint16 returns the next unsigned 16-bit integer in the data buffer.
GetUint32 returns the next unsigned 32-bit integer in the data buffer.
GetUint64 returns the next unsigned 64-bit integer in the data buffer.
PutBool writes a boolean value
PutByte writes a single byte
PutBytes puts a slice of bytes to the writer.
PutFloat writes a 64-bit floating-point value.
PutString writes a null-terminated string
PutTime writes a time.Time value to the writer.
PutUint16 writes a 16-bit numeric value
PutUint32 writes a 32-bit numeric value
PutUint64 writes a 64-bit numeric value
type Vox struct {
Width, Height, Depth int
Voxels [][4]uint8
}
Vox represents the contents of a .vox file in a generic format. The internal
voxels are laid out with Z being the up axis and with the Y axis facing
forward.
NewVoxFromReader returns a new Vox structure with the contents loaded from
a MagicaVoxel .vox file.
func (v *Vox ) Dimensions() (w, h, d int )
Dimensions implements the c3d.VoxelSource interface.
Get implements the c3d.VoxelSource interface.
IsEmpty implements the c3d.VoxelSource interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.