Package gaiasky.util.camera
Class Proximity
java.lang.Object
gaiasky.util.camera.Proximity
public class Proximity
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Proximity.NearbyRecord
-
Field Summary
Fields Modifier and Type Field Description Proximity.NearbyRecord[]
array0
Proximity.NearbyRecord[]
array1
Proximity.NearbyRecord[]
effective
Proximity.NearbyRecord[]
updating
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Proximity.NearbyRecord
convert(IFocus focus, Proximity.NearbyRecord c, ICamera camera)
Proximity.NearbyRecord
convert(IParticleRecord pr, Proximity.NearbyRecord c, ICamera camera, double deltaYears)
void
insert(int index, IFocus object, ICamera camera)
Inserts the given object at the given index, moving the rest of the values to the rightvoid
insert(int index, Proximity.NearbyRecord record)
Inserts the given record at the given index, moving the rest of the values to the rightvoid
set(int index, IFocus focus, ICamera camera)
void
set(int index, IParticleRecord pr, ICamera camera)
void
set(int index, IParticleRecord pr, ICamera camera, double deltaYears)
void
set(int index, Proximity.NearbyRecord record)
Sets the given record at the given index, overwriting the current valuevoid
swapBuffers()
Swaps the arrays in this double-buffer implementationboolean
update(IFocus object, ICamera camera)
Updates the list of proximal objects with the givenIFocus
boolean
update(Proximity.NearbyRecord object)
Updates the list of proximal objects with the givenProximity.NearbyRecord
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
updating
-
effective
-
array0
-
array1
-
-
Constructor Details
-
Proximity
public Proximity() -
Proximity
public Proximity(int size)
-
-
Method Details
-
set
-
set
-
set
-
set
Sets the given record at the given index, overwriting the current value- Parameters:
index
- The indexrecord
- The nearby record
-
insert
Inserts the given record at the given index, moving the rest of the values to the right- Parameters:
index
- The indexrecord
- The nearby record
-
insert
Inserts the given object at the given index, moving the rest of the values to the right- Parameters:
index
- The indexobject
- The nearby record
-
update
Updates the list of proximal objects with the givenProximity.NearbyRecord
- Parameters:
object
- The record to use for updating- Returns:
- Whether this proximity array was modified
-
update
Updates the list of proximal objects with the givenIFocus
- Parameters:
object
- The record to use for updating- Returns:
- Whether this proximity array was modified
-
swapBuffers
public void swapBuffers()Swaps the arrays in this double-buffer implementation -
convert
public Proximity.NearbyRecord convert(IParticleRecord pr, Proximity.NearbyRecord c, ICamera camera, double deltaYears) -
convert
-