Documentation
¶
Index ¶
- func LoadNode(on *OctreeNode, metadata *Metadata, buf []byte) modeling.Mesh
- func LoadNodeColorDataIntoArray(m *Metadata, buf []byte, colors []vector3.Float64)
- func LoadNodePositionDataIntoArray(m *Metadata, buf []byte, positions []vector3.Float64)
- func ParseEntireHierarchy(root *OctreeNode, buf []byte) error
- func ParseHierarchy(node *OctreeNode, buf []byte) error
- type Attribute
- type AttributeType
- type HierarchyNodeEntry
- type Metadata
- func (m Metadata) Attribute(attribute string) (*Attribute, int)
- func (m Metadata) AttributeOffset(attribute string) int
- func (m Metadata) BytesPerPoint() int
- func (m Metadata) ColorAttributeOffset() int
- func (m Metadata) LoadHierarchy(filepath string) (*OctreeNode, error)
- func (m Metadata) OffsetF() vector3.Float64
- func (m Metadata) PositionAttributeOffset() int
- func (m Metadata) ReadHierarchy(in io.Reader) (*OctreeNode, error)
- type MetadataBounds
- type MetadataHierarchy
- type OctreeNode
- func (on OctreeNode) DescendentCount() int
- func (on OctreeNode) Height() int
- func (on OctreeNode) MaxPointCount() int
- func (on OctreeNode) PointCount() uint64
- func (on OctreeNode) Read(in io.ReadSeeker, buf []byte) (int, error)
- func (on *OctreeNode) Walk(f func(o *OctreeNode) bool)
- func (on OctreeNode) Write(out io.WriteSeeker, buf []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadNodeColorDataIntoArray ¶ added in v0.14.0
func LoadNodePositionDataIntoArray ¶ added in v0.14.0
func ParseEntireHierarchy ¶
func ParseEntireHierarchy(root *OctreeNode, buf []byte) error
func ParseHierarchy ¶
func ParseHierarchy(node *OctreeNode, buf []byte) error
Types ¶
type Attribute ¶
type Attribute struct {
Name string `json:"name"`
Description string `json:"description"`
Size int `json:"size"`
NumElements int `json:"numElements"`
ElementSize int `json:"elementSize"`
Type AttributeType `json:"type"`
Min []float64 `json:"min"`
Max []float64 `json:"max"`
Scale []float64 `json:"scale,omitempty"`
Offset []float64 `json:"offset,omitempty"`
}
func (Attribute) IsPosition ¶
type AttributeType ¶ added in v0.14.0
type AttributeType string
const ( Int8AttributeType AttributeType = "int8" Int16AttributeType AttributeType = "int16" Int32AttributeType AttributeType = "int32" Int64AttributeType AttributeType = "int64" UInt8AttributeType AttributeType = "uint8" UInt16AttributeType AttributeType = "uint16" UInt32AttributeType AttributeType = "uint32" UInt64AttributeType AttributeType = "uint64" FloatAttributeType AttributeType = "float" DoubleAttributeType AttributeType = "double" UndefinedAttributeType AttributeType = "undefined" )
func (AttributeType) Size ¶ added in v0.17.0
func (at AttributeType) Size() int
type HierarchyNodeEntry ¶ added in v0.14.0
type Metadata ¶
type Metadata struct {
Version string `json:"version"`
Name string `json:"name"`
Description string `json:"description"`
Points int64 `json:"points"`
Projection string `json:"projection"`
Hierarchy MetadataHierarchy `json:"hierarchy"`
Offset []float64 `json:"offset"`
Scale []float64 `json:"scale"`
Spacing float64 `json:"spacing"`
BoundingBox MetadataBounds `json:"boundingBox"`
Encoding string `json:"encoding"`
Attributes []Attribute `json:"attributes"`
}
func LoadMetadata ¶
func (Metadata) AttributeOffset ¶ added in v0.14.0
func (Metadata) BytesPerPoint ¶
func (Metadata) ColorAttributeOffset ¶ added in v0.17.0
func (Metadata) LoadHierarchy ¶
func (m Metadata) LoadHierarchy(filepath string) (*OctreeNode, error)
func (Metadata) PositionAttributeOffset ¶ added in v0.17.0
func (Metadata) ReadHierarchy ¶
func (m Metadata) ReadHierarchy(in io.Reader) (*OctreeNode, error)
type MetadataBounds ¶
func (MetadataBounds) MaxF ¶
func (mb MetadataBounds) MaxF() vector3.Float64
func (MetadataBounds) MinF ¶
func (mb MetadataBounds) MinF() vector3.Float64
type MetadataHierarchy ¶
type OctreeNode ¶
type OctreeNode struct {
Name string
Spacing float64
Level int
BoundingBox geometry.AABB
Parent *OctreeNode `json:"-"`
Children []*OctreeNode
NodeType uint8
ChildMask uint8
NumPoints uint32
ByteOffset uint64
ByteSize uint64
HierarchyByteOffset uint64
HierarchyByteSize uint64
}
func (OctreeNode) DescendentCount ¶
func (on OctreeNode) DescendentCount() int
func (OctreeNode) Height ¶
func (on OctreeNode) Height() int
func (OctreeNode) MaxPointCount ¶ added in v0.14.0
func (on OctreeNode) MaxPointCount() int
func (OctreeNode) PointCount ¶
func (on OctreeNode) PointCount() uint64
func (OctreeNode) Read ¶ added in v0.14.0
func (on OctreeNode) Read(in io.ReadSeeker, buf []byte) (int, error)
func (*OctreeNode) Walk ¶
func (on *OctreeNode) Walk(f func(o *OctreeNode) bool)
func (OctreeNode) Write ¶ added in v0.14.0
func (on OctreeNode) Write(out io.WriteSeeker, buf []byte) (int, error)
Click to show internal directories.
Click to hide internal directories.