# PSF-LoginServer - master - net.psforever.objects.zones.blockmap.BlockMap
PSF - LoginServer - master - net.psforever.objects.zones.blockmap.BlockMap
Keywords: PSF LoginServer master net.psforever.objects.zones.blockmap.BlockMap

PSF-LoginServer - master < Back


# Packages

-  package root
  Definition Classes
    root
-  package net
  Definition Classes
    root
-  package psforever
  Definition Classes
    net
-  package objects
  Definition Classes
    psforever
-  package zones
  Definition Classes
    objects
-  package blockmap
  Definition Classes
    zones
- BlockMap
- BlockMapEntity
- BlockMapEntry
- Sector
- SectorGroup
- SectorListOf
- SectorPopulation
- SectorTraits

c

net.psforever.objects.zones.blockmap

# BlockMap 

###
Companion object BlockMap

#### 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

Linear Supertypes
AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. BlockMap
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  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

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  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`

5.  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)`

6.  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`

7.  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)`

8.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
9.  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

10.  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

11.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
14.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
15.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
16.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
17.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
18.  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)

19.  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)`

20.  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)`

21.  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)`

22.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
23.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
24.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
25.  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)`

26.  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)`

27.  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)`

28.  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)`

29.  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`

30.  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`

31.  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

32.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
33.  def toString(): String
    Definition Classes
      AnyRef → Any
34.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
35.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
36.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Inherited from AnyRef

### Inherited from Any

### Ungrouped