Package gaiasky.util.camera
Class Proximity
java.lang.Object
gaiasky.util.camera.Proximity
public class Proximity
extends java.lang.Object
Holds information on the order and properties of nearby particles to the camera.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classProximity.NearbyRecord -
Field Summary
Fields Modifier and Type Field Description Proximity.NearbyRecord[]array0Proximity.NearbyRecord[]array1Proximity.NearbyRecord[]effectiveProximity.NearbyRecord[]updating -
Constructor Summary
-
Method Summary
Modifier and Type Method Description Proximity.NearbyRecordconvert(IFocus focus, Proximity.NearbyRecord c, ICamera camera)Proximity.NearbyRecordconvert(IParticleRecord pr, Proximity.NearbyRecord c, ICamera camera, double deltaYears)voidinsert(int index, IFocus object, ICamera camera)Inserts the given object at the given index, moving the rest of the values to the rightvoidinsert(int index, Proximity.NearbyRecord record)Inserts the given record at the given index, moving the rest of the values to the rightvoidset(int index, IFocus focus, ICamera camera)voidset(int index, IParticleRecord pr, ICamera camera)voidset(int index, IParticleRecord pr, ICamera camera, double deltaYears)voidset(int index, Proximity.NearbyRecord record)Sets the given record at the given index, overwriting the current valuevoidswapBuffers()Swaps the arrays in this double-buffer implementationbooleanupdate(IFocus object, ICamera camera)Updates the list of proximal objects with the givenIFocusbooleanupdate(Proximity.NearbyRecord object)Updates the list of proximal objects with the givenProximity.NearbyRecordMethods 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
-