Package gaiasky.util.camera
Class Proximity
java.lang.Object
gaiasky.util.camera.Proximity
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(IFocus focus, Proximity.NearbyRecord c, ICamera camera) convert
(IParticleRecord pr, Proximity.NearbyRecord c, ICamera camera, double deltaYears) void
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
void
set
(int index, int originalIndex, IParticleRecord pr, ICamera camera) void
set
(int index, int originalIndex, 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
Swaps the arrays in this double-buffer implementationboolean
Updates the list of proximal objects with the givenIFocus
.boolean
update
(Proximity.NearbyRecord object) Updates the list of proximal objects with the givenProximity.NearbyRecord
.
-
Field Details
-
updating
-
effective
-
array0
-
array1
-
-
Constructor Details
-
Proximity
public Proximity() -
Proximity
public Proximity(int size)
-
-
Method Details
-
set
-
set
public void set(int index, int originalIndex, IParticleRecord pr, ICamera camera, double deltaYears) -
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.camera
- The camera.- 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
-