options

package
v0.0.0-...-313f127 Latest Latest
Warning

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

Go to latest
Published: May 6, 2016 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAllFilterGeometryOptions

func ApplyAllFilterGeometryOptions(objects []rtreego.Spatial, opts ...interface{}) []rtreego.Spatial

ApplyAllFilterGeometryOptions applies all FilterGeometryOption from the opts provided on the unfiltered objects-list given. The filters are applied in the order they are provided.

func VerifyAllAreOptions

func VerifyAllAreOptions(opts ...interface{}) error

VerifyAllAreOptions checks that all provided arguments are valid options.

Types

type FilterGeometryOption

type FilterGeometryOption interface {
	// Apply filters or reshuffles elements by looking at the bounds.
	// Returns indices relative to the collection of bounds of the filtered/reshuffled
	// elements.
	Apply(bounds []*vec3.Box) []int
}

FilterGeometryOption is an interface to operations that filter/reshuffled elements based on geometry (bounds). This can e.g. be operations that cut of small objects far away or sorting objects by distance.

type MockFilterGeometryOption

type MockFilterGeometryOption struct {
	mock.Mock
}

func (*MockFilterGeometryOption) Apply

func (_m *MockFilterGeometryOption) Apply(bounds []*vec3.Box) []int

Apply provides a mock function with given fields: bounds

type SortByDistance

type SortByDistance struct {
	Pivot vec3.T
}

SortByDistance sorts objects returned from e.g. Repository.GetInsideVolume() by distance (nearest first) to some 'pivot location'.

func (SortByDistance) Apply

func (o SortByDistance) Apply(bounds []*vec3.Box) []int

Apply returns a list of indices that can be used to look up in bounds to create an ordered list.

Jump to

Keyboard shortcuts

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