Atavism Version 2018.1AGIS API

atavism.server.voice
Class PositionalVoiceGroup.CompareLocations

java.lang.Object
  extended by atavism.server.voice.PositionalVoiceGroup.CompareLocations
All Implemented Interfaces:
java.util.Comparator<GroupMember>
Enclosing class:
PositionalVoiceGroup

public static class PositionalVoiceGroup.CompareLocations
extends java.lang.Object
implements java.util.Comparator<GroupMember>

A comparator class that compares locations of speakers to order the closest ones near the front of the list.


Constructor Summary
PositionalVoiceGroup.CompareLocations(Point center)
           
 
Method Summary
 int compare(GroupMember m1, GroupMember m2)
          Which speaker member is closer to the Listener whose location is center?
 boolean equals(java.lang.Object other)
           
 Point getCenter()
           
 void setCenter(Point center)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionalVoiceGroup.CompareLocations

public PositionalVoiceGroup.CompareLocations(Point center)
Method Detail

compare

public int compare(GroupMember m1,
                   GroupMember m2)
Which speaker member is closer to the Listener whose location is center? Compares first locations, and if they are equal, compares the index values of the speaker members.

Specified by:
compare in interface java.util.Comparator<GroupMember>
Parameters:
m1 - The first member.
m2 - The second member.

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface java.util.Comparator<GroupMember>
Overrides:
equals in class java.lang.Object

getCenter

public Point getCenter()

setCenter

public void setCenter(Point center)


Copyright © 2018 Dragonsan Studios Sp. z o.o.