Package gaiasky.data.group
Class PointDataProvider
java.lang.Object
gaiasky.data.group.PointDataProvider
- All Implemented Interfaces:
IParticleGroupDataProvider
Generic data provider for point clouds that reads cartesian positions (XYZ) from a text file.
Consider using
BinaryPointDataProvider
instead, which includes many more features and is more compact.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionloadData
(InputStream is, double factor) Loads the data applying a factor.Loads the data as it is.Loads the data applying a factor.loadDataMapped
(String file, double factor) Loads the data applying a factor using a memory mapped file for improved speed.void
setFileNumberCap
(int cap) Sets a cap on the number of files to load.void
setProviderParams
(Map<String, Object> params) Set provider parameters as a map.void
setStarNumberCap
(int cap) Sets the maximum number of stars to be processed per file.void
setTransformMatrix
(Matrix4d matrix) Sets a transform matrix to apply to all data points.
-
Constructor Details
-
PointDataProvider
public PointDataProvider()
-
-
Method Details
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data as it is.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to load.- Returns:
- The array of particle records.
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to load.factor
- Factor to apply to the positions.- Returns:
- The array of particle records.
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
is
- Input stream to load the data from.factor
- Factor to apply to the positions.- Returns:
- The array of particle records.
-
setFileNumberCap
public void setFileNumberCap(int cap) Description copied from interface:IParticleGroupDataProvider
Sets a cap on the number of files to load. Set to negative for unlimited.- Specified by:
setFileNumberCap
in interfaceIParticleGroupDataProvider
- Parameters:
cap
- The file cap number.
-
setStarNumberCap
public void setStarNumberCap(int cap) Description copied from interface:IParticleGroupDataProvider
Sets the maximum number of stars to be processed per file. Set to negative for unlimited.- Specified by:
setStarNumberCap
in interfaceIParticleGroupDataProvider
- Parameters:
cap
- The star cap number.
-
setProviderParams
Description copied from interface:IParticleGroupDataProvider
Set provider parameters as a map.- Specified by:
setProviderParams
in interfaceIParticleGroupDataProvider
- Parameters:
params
- The parameters map.
-
setTransformMatrix
Description copied from interface:IParticleGroupDataProvider
Sets a transform matrix to apply to all data points.- Specified by:
setTransformMatrix
in interfaceIParticleGroupDataProvider
- Parameters:
matrix
- The transform matrix.
-
loadDataMapped
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor using a memory mapped file for improved speed.- Specified by:
loadDataMapped
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to load.factor
- Factor to apply to the positions.- Returns:
- The array of particle records.
-