Documentation ¶
Index ¶
- Variables
- type DB
- func (db *DB) DeleteAgent(x id.ID)
- func (db *DB) DeleteFeature(x id.ID)
- func (db *DB) DeleteProjectile(x id.ID)
- func (db *DB) GetAgentOrDie(x id.ID) roagent.RO
- func (db *DB) GetFeatureOrDie(x id.ID) rofeature.RO
- func (db *DB) GetProjectileOrDie(x id.ID) roprojectile.RO
- func (db *DB) InsertAgent(o roagent.O) roagent.RO
- func (db *DB) InsertFeature(o rofeature.O) rofeature.RO
- func (db *DB) InsertProjectile(o roprojectile.O) roprojectile.RO
- func (db *DB) ListAgents() <-chan roagent.RO
- func (db *DB) ListFeatures() <-chan rofeature.RO
- func (db *DB) ListProjectiles() <-chan roprojectile.RO
- func (db *DB) QueryAgents(q hyperrectangle.R, filter func(a roagent.RO) bool) []roagent.RO
- func (db *DB) QueryFeatures(q hyperrectangle.R, filter func(a rofeature.RO) bool) []rofeature.RO
- func (db *DB) SetAgentHeading(x id.ID, v polar.V)
- func (db *DB) SetAgentMoveMode(x id.ID, f move.F)
- func (db *DB) SetAgentPosition(x id.ID, v vector.V)
- func (db *DB) SetAgentTargetPosition(x id.ID, v vector.V)
- func (db *DB) SetAgentTargetVelocity(x id.ID, v vector.V)
- func (db *DB) SetAgentVelocity(x id.ID, v vector.V)
- func (db *DB) SetProjectileHeading(x id.ID, v polar.V)
- func (db *DB) SetProjectilePosition(x id.ID, v vector.V)
- func (db *DB) SetProjectileTargetPosition(x id.ID, v vector.V)
- func (db *DB) SetProjectileTargetVelocity(x id.ID, v vector.V)
- func (db *DB) SetProjectileVelocity(x id.ID, v vector.V)
- type O
- type RO
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultO provides a default set of options for setting up the // database. The values here are tailored to an N = 1000 simulation, and // is dependent on a variety of factors, e.g. surface area coverage. DefaultO = O{ LeafSize: 8, Tolerance: 1.15, } )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) DeleteAgent ¶ added in v0.3.0
DeleteAgent mutates the DB and must be called serially.
func (*DB) DeleteFeature ¶ added in v0.3.0
DeleteFeature mutates the DB and must be called serially.
func (*DB) DeleteProjectile ¶ added in v0.3.0
DeleteProjectile mutates the DB and must be called serially.
func (*DB) GetAgentOrDie ¶ added in v0.3.0
GetAgentOrDie is a read-only operation and may be called concurrently with other read-only operations.
func (*DB) GetFeatureOrDie ¶ added in v0.3.0
GetFeatureOrDie is a read-only operation and may be called concurrently with other read-only operations.
func (*DB) GetProjectileOrDie ¶ added in v0.3.0
func (db *DB) GetProjectileOrDie(x id.ID) roprojectile.RO
GetProjectileOrDie is a read-only operation and may be called concurrently with other read-only operations.
func (*DB) InsertAgent ¶ added in v0.3.0
InsertAgent mutates the DB and must be called serially.
func (*DB) InsertFeature ¶ added in v0.3.0
InsertFeature mutates the DB and must be called serially.
func (*DB) InsertProjectile ¶ added in v0.3.0
func (db *DB) InsertProjectile(o roprojectile.O) roprojectile.RO
InsertProjectile mutates the DB and must be called serially.
func (*DB) ListAgents ¶ added in v0.3.0
ListAgents returns all agents in the DB. There are serveral use-cases for this method which changes the invocation pattern.
- Read-only operations on agents may consume this output concurrently.
- Agent-specific mutations should first iterate over the returned values and create a proposal batch of changes. If these changes do not modify the BVH, they may be run in parallel. Changes to the BVH (e.g. SetAgentPosition) must be done serially.
func (*DB) ListFeatures ¶ added in v0.3.0
ListFeatures returns all features in the DB. There are serveral use-cases for this method which changes the invocation pattern.
See ListAgents for more information.
func (*DB) ListProjectiles ¶ added in v0.3.0
func (db *DB) ListProjectiles() <-chan roprojectile.RO
ListProjectiles returns all projectiles in the DB. There are serveral use-cases for this method which changes the invocation pattern.
See ListAgents for more information.
func (*DB) QueryAgents ¶ added in v0.3.0
QueryAgents is a read-only operation and may be called concurrently with other read-only operations.
func (*DB) QueryFeatures ¶ added in v0.3.0
QueryFeatures is a read-only operation and may be called concurrently with other read-only operations.
func (*DB) SetAgentHeading ¶ added in v0.3.0
SetAgentHeading does not mutate the BVH and may be called concurrently with calls on other agents.
func (*DB) SetAgentMoveMode ¶ added in v0.3.12
SetAgentMoveMode does not mutate the BVH and may be called concurrently with calls on other agents.
func (*DB) SetAgentPosition ¶ added in v0.3.0
SetAgentPosition mutates the BVH and must be called serially.
func (*DB) SetAgentTargetPosition ¶ added in v0.3.2
SetAgentTargetPosition does not mutate the BVH and may be called concurrently with calls on other agents.
func (*DB) SetAgentTargetVelocity ¶ added in v0.3.0
SetAgentTargetVelocity does not mutate the BVH and may be called concurrently with calls on other agents.
func (*DB) SetAgentVelocity ¶ added in v0.3.0
SetAgentVelocity does not mutate the BVH and may be called concurrently with calls on other agents.
func (*DB) SetProjectileHeading ¶ added in v0.3.0
SetProjectileHeading does not mutate the BVH and may be called concurrently with calls on other projectiles.
func (*DB) SetProjectilePosition ¶ added in v0.3.0
SetProjectilePosition does not mutate the BVH and may be called concurrently with calls on other projectiles.
func (*DB) SetProjectileTargetPosition ¶ added in v0.3.2
SetProjectileTargetPosition does not mutate the BVH and may be called concurrently with calls on other projectiles.
func (*DB) SetProjectileTargetVelocity ¶ added in v0.3.0
SetProjectileTargetVelocity does not mutate the BVH and may be called concurrently with calls on other projectiles.
type RO ¶ added in v0.3.9
type RO interface { GetAgentOrDie(x id.ID) roagent.RO GetFeatureOrDie(x id.ID) rofeature.RO GetProjectileOrDie(x id.ID) roprojectile.RO ListAgents() <-chan roagent.RO ListFeatures() <-chan rofeature.RO ListProjectiles() <-chan roprojectile.RO QueryAgents(q hyperrectangle.R, filter func(a roagent.RO) bool) []roagent.RO QueryFeatures(q hyperrectangle.R, filter func(a rofeature.RO) bool) []rofeature.RO }