octree

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package octree implements a octree representation of pointclouds for easy traversal and storage of probability and color data

Index

Constants

View Source
const (
	InternalNode = NodeType(iota)
	LeafNodeEmpty
	LeafNodeFilled
)

Each node in the octree is either an internal node which links to other nodes, is an empty node with no points or further links, or is an occupied node which contains a single point of data that includes location, color and probability information.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaler

type Marshaler interface {
	MarshalOctree() ([]byte, error)
}

Marshaler will convert an octree into a serialized array of bytes.

type NodeType

type NodeType uint8

NodeType represents the possible types of nodes in an octree.

type Octree

type Octree interface {
	pc.PointCloud
	Marshaler
}

Octree is a data structure that recursively partitions 3D space into octants to represent occupancy. It is a storage format for a pointcloud that allows for better searchability and serialization. Each node is either an internal node, empty node or child node. This implementation of an octree is compatible with the pointcloud representation and includes a marshaling function.

func New

func New(ctx context.Context, center r3.Vector, sideLength float64, logger golog.Logger) (Octree, error)

New creates a new basic octree with specified center, side and metadata.

type Unmarshaler

type Unmarshaler interface {
	UnmarshalOctree() (Octree, error)
}

Unmarshaler will convert a serialized octree into an Octree datatype.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL