class BlockMap extends AnyRef
A data structure which divides coordinate space into buckets or coordinate spans.
The function of the blockmap is to organize the instantiated game objects (entities)
that can be represented in coordinate space into a bucket each or into multiple buckets each
that reflect their locality with other game objects in the same coordinate space.
Polling based on either positions or on entities should be able to recover a lists of entities
that are considered neighbors in the context of that position and a rectangular distance around the position.
The purpose of the blockmap is to improve targeting when making such locality determinations.
The coordinate space of a PlanetSide zone may contain 65535 entities, one of which is the same target entity.
A bucket on the blockmap should contain only a small fraction of the full zone's entities.
- Source
- BlockMap.scala
- Alphabetic
- By Inheritance
- BlockMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BlockMap(fullMapWidth: Int, fullMapHeight: Int, desiredSpanSize: Int)
- fullMapWidth
maximum width of the coordinate space (m)
- fullMapHeight
maximum height of the coordinate space (m)
- desiredSpanSize
the amount of coordinate space attributed to each bucket in the blockmap (m)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addTo(target: BlockMapEntity, toPosition: Vector3, rangeX: Float, rangeY: Float): SectorPopulation
Allocate this entity into appropriate sectors on the blockmap using the provided game world coordinates and the provided axis range.
Allocate this entity into appropriate sectors on the blockmap using the provided game world coordinates and the provided axis range.
- target
the entity
- toPosition
the game world coordinates that indicate the central sector
- rangeX
the distance from the central sector along the major x-axis
- rangeY
the distance from the central sector along the major y-axis
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
BlockMap.findSectorIndices
- def addTo(target: BlockMapEntity, toPosition: Vector3, range: Float): SectorPopulation
Allocate this entity into appropriate sectors on the blockmap using the provided game world coordinates and the provided axis range.
Allocate this entity into appropriate sectors on the blockmap using the provided game world coordinates and the provided axis range.
- target
the entity
- toPosition
the game world coordinates that indicate the central sector
- range
the distance from the central sector along the major axes
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
BlockMap.findSectorIndices
- def addTo(target: BlockMapEntity, range: Float): SectorPopulation
Allocate this entity into appropriate sectors on the blockmap using the provided custom axis range.
Allocate this entity into appropriate sectors on the blockmap using the provided custom axis range.
- target
the entity
- range
the custom distance from the central sector along the major axes
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
addTo(BlockMapEntity, Vector3, Float)
- def addTo(target: BlockMapEntity, toPosition: Vector3): SectorPopulation
Allocate this entity into appropriate sectors on the blockmap at the provided game world coordinates.
Allocate this entity into appropriate sectors on the blockmap at the provided game world coordinates.
- target
the entity
- toPosition
the custom game world coordinates that indicate the central sector
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
addTo(BlockMapEntity, Vector3, Float)
BlockMap.rangeFromEntity
- def addTo(target: BlockMapEntity): SectorPopulation
Allocate this entity into appropriate sectors on the blockmap.
Allocate this entity into appropriate sectors on the blockmap.
- target
the entity
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
addTo(BlockMapEntity, Vector3)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val blocks: ListBuffer[Sector]
the sectors / blocks / buckets into which entities that submit themselves are divided; while the represented region need not be square, the sectors are defined as squares
- val blocksInRow: Int
how many sectors are in a row; the far side sector may run off into un-navigable regions but will always contain a sliver of represented map space, for example, on a 0-10 grid where the span size is 3, the spans will begin at (0, 3, 6, 9) and the last span will only have two-thirds of its region valid; the invalid, not represented regions should be silently ignored
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def move(target: BlockMapEntity, toPosition: Vector3, fromPosition: Vector3, rangeX: Float, rangeY: Float): SectorPopulation
Move an entity on the blockmap structure and update the prerequisite internal information.
Move an entity on the blockmap structure and update the prerequisite internal information.
- target
the entity
- toPosition
the next location of the entity in world coordinates
- fromPosition
the current location of the entity in world coordinates
- rangeX
the distance from the location along the major x-axis
- rangeY
the distance from the location along the major y-axis
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- def move(target: BlockMapEntity, toPosition: Vector3, fromPosition: Vector3, range: Float): SectorPopulation
Move an entity on the blockmap structure and update the prerequisite internal information.
Move an entity on the blockmap structure and update the prerequisite internal information.
- target
the entity
- toPosition
the next location of the entity in world coordinates
- fromPosition
the current location of the entity in world coordinates
- range
the distance from the location along the major axes
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- def move(target: BlockMapEntity, toPosition: Vector3, fromPosition: Vector3): SectorPopulation
Move an entity on the blockmap structure and update the prerequisite internal information.
Move an entity on the blockmap structure and update the prerequisite internal information.
- target
the entity
- toPosition
the next location of the entity in world coordinates
- fromPosition
ignored
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
move(BlockMapEntity, Vector3)
- def move(target: BlockMapEntity, toPosition: Vector3): SectorPopulation
Move an entity on the blockmap structure and update the prerequisite internal information.
Move an entity on the blockmap structure and update the prerequisite internal information.
- target
the entity
- toPosition
the next location of the entity in world coordinates
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
move(BlockMapEntity, Vector3, Vector3, Float)
- def move(target: BlockMapEntity): SectorPopulation
Move an entity on the blockmap structure and update the prerequisite internal information.
Move an entity on the blockmap structure and update the prerequisite internal information.
- target
the entity
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
move(BlockMapEntity, Vector3, Vector3, Float)
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def removeFrom(target: BlockMapEntity, fromPosition: Vector3, range: Float): SectorPopulation
Deallocate this entity from appropriate sectors on the blockmap.
Deallocate this entity from appropriate sectors on the blockmap. Other parameters are included for symmetry with a respective
addto
method, but are ignored since removing an entity from a sector from which it is not represented is ill-advised as is not removing an entity from any sector that it occupies.- target
the entity
- fromPosition
ignored
- range
ignored
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
removeFrom(BlockMapEntity)
- def removeFrom(target: BlockMapEntity, range: Float): SectorPopulation
Deallocate this entity from appropriate sectors on the blockmap.
Deallocate this entity from appropriate sectors on the blockmap. Other parameters are included for symmetry with a respective
addto
method, but are ignored since removing an entity from a sector from which it is not represented is ill-advised as is not removing an entity from any sector that it occupies.- target
the entity
- range
ignored
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
removeFrom(BlockMapEntity)
- def removeFrom(target: BlockMapEntity, fromPosition: Vector3): SectorPopulation
Deallocate this entity from appropriate sectors on the blockmap.
Deallocate this entity from appropriate sectors on the blockmap. Other parameters are included for symmetry with a respective
addto
method, but are ignored since removing an entity from a sector from which it is not represented is ill-advised as is not removing an entity from any sector that it occupies.- target
the entity
- fromPosition
ignored
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
removeFrom(BlockMapEntity)
- def removeFrom(target: BlockMapEntity): SectorPopulation
Deallocate this entity from appropriate sectors on the blockmap.
Deallocate this entity from appropriate sectors on the blockmap.
- target
the entity
- returns
a conglomerate sector which lists all of the entities in the allocated sector(s)
- See also
actuallyRemoveFrom(BlockMapEntity, Vector3, Float)
- def sector(indices: Iterable[Int], range: Float): SectorPopulation
Given a coordinate position within representable space and a range from that representable space, find the sector conglomerate to which this range allocates.
Given a coordinate position within representable space and a range from that representable space, find the sector conglomerate to which this range allocates.
- indices
an enumeration that directly associates with the structure of the block map
- range
the axis distance from the provided coordinates
- returns
a conglomerate sector which lists all of the entities in the discovered sector(s)
- See also
BlockMap.findSectorIndices
BlockMap.quickToSectorGroup
- def sector(p: Vector3, range: Float): SectorPopulation
Given a coordinate position within representable space and a range from that representable space, find the sector conglomerate to which this range allocates.
Given a coordinate position within representable space and a range from that representable space, find the sector conglomerate to which this range allocates.
- p
the game world coordinates
- range
the axis distance from the provided coordinates
- returns
a conglomerate sector which lists all of the entities in the discovered sector(s)
- See also
BlockMap.findSectorIndices
BlockMap.quickToSectorGroup
BlockMap::sector(Iterable[Int], Float)
- def sector(entity: BlockMapEntity): SectorPopulation
Given a blockmap entity, one that is allegedly represented on this blockmap, find the sector conglomerate in which this entity is allocated.
Given a blockmap entity, one that is allegedly represented on this blockmap, find the sector conglomerate in which this entity is allocated.
- entity
the target entity
- returns
a conglomerate sector which lists all of the entities in the discovered sector(s)
- See also
BlockMap.quickToSectorGroup
- val spanSize: Int
a clamping of the desired span size to a realistic value to use for the span size; blocks can not be too small, but also should not be much larger than the width of the representable region a block spanning as wide as the map is an acceptable cap
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()