filter

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package filter contains Arche's advanced logic filtering API.

See the top level module github.com/mlange-42/arche for an overview.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALL

type ALL ecs.Mask

ALL matches entities that have all the given components.

func All

func All(comps ...ecs.ID) ALL

All matches entities that have all the given components.

Like And for combining individual components.

func (ALL) Matches

func (f ALL) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

func (ALL) Not

func (f ALL) Not() NoneOF

Not inverts this filter to exclude entities with all the given components

type AND

type AND struct {
	L ecs.Filter
	R ecs.Filter
}

AND combines two filters using AND.

func And

func And(l, r ecs.Filter) *AND

And combines two filters using AND.

func (*AND) Matches

func (f *AND) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

type ANY

type ANY ecs.Mask

ANY matches entities that have any of the given components.

func Any

func Any(comps ...ecs.ID) ANY

Any matches entities that have any of the given components.

func (ANY) Matches

func (f ANY) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

func (ANY) Not

func (f ANY) Not() AnyNOT

Not inverts this filter to exclude entities with any of the given components

type AnyNOT

type AnyNOT ecs.Mask

AnyNOT matches entities that are missing any of the given components.

func AnyNot

func AnyNot(comps ...ecs.ID) AnyNOT

AnyNot matches entities that are missing any of the given components.

func (AnyNOT) Matches

func (f AnyNOT) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

type NOT

type NOT struct {
	F ecs.Filter
}

NOT inverts a filter. It matches if the inner filter does not.

func Not

func Not(f ecs.Filter) *NOT

Not inverts a filter. It matches if the inner filter does not.

func (*NOT) Matches

func (f *NOT) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

type NoneOF

type NoneOF ecs.Mask

NoneOF matches entities that are missing all the given components.

func NoneOf

func NoneOf(comps ...ecs.ID) NoneOF

NoneOf matches entities that are missing all the given components.

func (NoneOF) Matches

func (f NoneOF) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

type OR

type OR struct {
	L ecs.Filter
	R ecs.Filter
}

OR combines two filters using OR.

func Or

func Or(l, r ecs.Filter) *OR

Or combines two filters using OR.

func (*OR) Matches

func (f *OR) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

type XOR

type XOR struct {
	L ecs.Filter
	R ecs.Filter
}

XOR combines two filters using XOR.

func XOr

func XOr(l, r ecs.Filter) *XOR

XOr combines two filters using XOR.

func (*XOR) Matches

func (f *XOR) Matches(bits ecs.Mask) bool

Matches matches a filter against a bitmask

Jump to

Keyboard shortcuts

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