java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp.registry.EmbeddedSharedObject
de.grogra.imp3d.objects.CloudArray
de.grogra.pointcloud.objects.impl.CloudList
- All Implemented Interfaces:
NodeContext,ProducingNode,BoundedCloud,Cloud,CloudContext,DisposableField,Manageable,Shareable,Disposable
An extension of a Cloud array to view point as list.
It also implements some methods for applying clustering tools.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp.registry.EmbeddedSharedObject
EmbeddedSharedObject.GetExtFromMimeTypeNested classes/interfaces inherited from interface de.grogra.imp3d.objects.Cloud
Cloud.Point -
Field Summary
FieldsFields inherited from class de.grogra.imp3d.objects.CloudArray
cloudNode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(ArrayPoint point) Adds a point to this point cloud.voidvoidaddPoints(Cloud.Point[] points) static CloudListcreate(Aggregate a, Cloud.Point p) booleaneditable()A cloud is editable if it is possible to add and remove points.floatsToPoint(float[] f) Returns the center position of this point cloud as a point object.floatReturns the center x position of this point cloud.floatReturns the center y position of this point cloud.floatReturns the center z position of this point cloud.floatgetExtremum(char dimension, char operator) Returns the extremum value of this point cloud.floatReturns the maximum x position of this point cloud.floatReturns the maximum y position of this point cloud.floatReturns the maximum z position of this point cloud.Serialization managementfloatReturns the minimum x position of this point cloud.floatReturns the minimum y position of this point cloud.floatReturns the minimum z position of this point cloud.intReturns the number of points in this point cloud.Returns the list of points of this point cloud.floatgetValue(int index, char dimension) Returns the x, y or z coordinate at the given index.booleanTrue if the object is not "empty" as its persistence depends how the mimetype write content, a java object with some value could be defined as "empty"booleanisEmpty()To be part of the graph a cloud need to be added to a node.peek()float[]Parallel versionpop()Add Object to graphvoidpush(Cloud.Point p) voidvoidsetListPoints(List<ArrayPoint> points) voidstatic voidsetPointCloudOfPoints(CloudList pointCloud, List<ArrayPoint> points) Sets the given point cloud as point cloud of all given points.voidsetPoints(float[] points) voidsetPoints(Cloud.Point[] points) Methods inherited from class de.grogra.imp3d.objects.CloudArray
dispose, dispose, disposeField, getCloud, getExtension, getNode, getObjectType, getPointsAsFloat, getResourceDirectoryName, pointsToFloatMethods inherited from class de.grogra.imp.registry.EmbeddedSharedObject
getProvider, getProvider, initProvider, manageableReadResolve, manageableWriteReplaceMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getStamp, removeReference
-
Field Details
-
$TYPE
-
points$FIELD
-
-
Constructor Details
-
CloudList
public CloudList()A constructor to get an empty point cloud. The point cloud will have a default color and an empty list of points. -
CloudList
-
CloudList
-
CloudList
A constructor to get a point cloud with a list of points. The color will be a default color.- Parameters:
points- The list of points for the point cloud
-
CloudList
public CloudList(float[] f)
-
-
Method Details
-
setNode
- Specified by:
setNodein interfaceNodeContext- Overrides:
setNodein classCloudArray
-
editable
public boolean editable()Description copied from interface:CloudA cloud is editable if it is possible to add and remove points. Being able to setPoint does not make the cloud editable as is change either all or none of hte points.- Specified by:
editablein interfaceCloud- Overrides:
editablein classCloudArray
-
createNew
- Specified by:
createNewin interfaceCloud- Overrides:
createNewin classCloudArray
-
getNumberOfPoints
public int getNumberOfPoints()Returns the number of points in this point cloud.- Specified by:
getNumberOfPointsin interfaceCloud- Overrides:
getNumberOfPointsin classCloudArray- Returns:
- The number of points in this point cloud
-
addPoint
Adds a point to this point cloud. The point cloud reference of the point is replaced with this point cloud.- Parameters:
point- The point to add
-
getPoints
Returns the list of points of this point cloud.- Specified by:
getPointsin interfaceCloud- Overrides:
getPointsin classCloudArray- Returns:
- The list of points in this point cloud
-
getCenter
Returns the center position of this point cloud as a point object. This method does not return the point with the most-centric position, it returns a position with the average position of all points in the point cloud instead.- Specified by:
getCenterin interfaceBoundedCloud- Overrides:
getCenterin classCloudArray- Returns:
- The center position of this point cloud as a point object
-
getCenterX
public float getCenterX()Returns the center x position of this point cloud.- Overrides:
getCenterXin classCloudArray- Returns:
- The center x position of this point cloud
-
getCenterY
public float getCenterY()Returns the center y position of this point cloud.- Overrides:
getCenterYin classCloudArray- Returns:
- The center y position of this point cloud
-
getCenterZ
public float getCenterZ()Returns the center z position of this point cloud.- Overrides:
getCenterZin classCloudArray- Returns:
- The center z position of this point cloud
-
getMinimumX
public float getMinimumX()Returns the minimum x position of this point cloud.- Specified by:
getMinimumXin interfaceBoundedCloud- Overrides:
getMinimumXin classCloudArray- Returns:
- The minimum x position of this point cloud
-
getMaximumX
public float getMaximumX()Returns the maximum x position of this point cloud.- Specified by:
getMaximumXin interfaceBoundedCloud- Overrides:
getMaximumXin classCloudArray- Returns:
- The maximum x position of this point cloud
-
getMinimumY
public float getMinimumY()Returns the minimum y position of this point cloud.- Specified by:
getMinimumYin interfaceBoundedCloud- Overrides:
getMinimumYin classCloudArray- Returns:
- The minimum y position of this point cloud
-
getMaximumY
public float getMaximumY()Returns the maximum y position of this point cloud.- Specified by:
getMaximumYin interfaceBoundedCloud- Overrides:
getMaximumYin classCloudArray- Returns:
- The maximum y position of this point cloud
-
getMinimumZ
public float getMinimumZ()Returns the minimum z position of this point cloud.- Specified by:
getMinimumZin interfaceBoundedCloud- Overrides:
getMinimumZin classCloudArray- Returns:
- The minimum z position of this point cloud
-
getMaximumZ
public float getMaximumZ()Returns the maximum z position of this point cloud.- Specified by:
getMaximumZin interfaceBoundedCloud- Overrides:
getMaximumZin classCloudArray- Returns:
- The maximum z position of this point cloud
-
getExtremum
public float getExtremum(char dimension, char operator) Returns the extremum value of this point cloud. The requested extremum value is specified with the given dimension and the given operator. To get a minimum value, the operator must be '-'. To get a maximum value, the operator must be '+'. To get a minimum in x, y or z direction, the dimension parameter must be 'x', 'y' or 'z'.- Parameters:
dimension- Must be 'x', 'y' or 'z' to get the correct dimensionoperator- Must be '-' to get a minimum or '+' to get a maximum- Returns:
- The minimum or maximum value in the requested dimension
-
getValue
public float getValue(int index, char dimension) Returns the x, y or z coordinate at the given index. The dimension parameter must be 'x', 'y' or 'z' to get the x, y or z coordinate. If the dimension parameter is wrong or the index is outside the point list, an exception is thrown.- Parameters:
index- The index of the returned pointdimension- The dimension (x, y, or z) of the returned point- Returns:
- The dimension value of the requested point
- Throws:
IllegalArgumentException- If the index is invalid input: '<' 0, too high or the dimension parameter is invalid
-
setPointCloudOfPoints
Sets the given point cloud as point cloud of all given points.- Parameters:
pointCloud- The point cloud to set in all pointspoints- The list of points where to set the point cloud
-
isEmpty
public boolean isEmpty()Description copied from interface:CloudTo be part of the graph a cloud need to be added to a node. This return the cloudNode associated to this cloud if any.- Specified by:
isEmptyin interfaceCloud- Overrides:
isEmptyin classCloudArray
-
setPoints
- Specified by:
setPointsin interfaceCloud- Overrides:
setPointsin classCloudArray
-
setPoints
public void setPoints(float[] points) - Overrides:
setPointsin classCloudArray
-
addPoints
- Specified by:
addPointsin interfaceCloud- Overrides:
addPointsin classCloudArray
-
addPoint
- Specified by:
addPointin interfaceCloud- Overrides:
addPointin classCloudArray
-
remove
- Specified by:
removein interfaceCloud- Overrides:
removein classCloudArray
-
remove
- Specified by:
removein interfaceCloud- Overrides:
removein classCloudArray
-
removeAll
public void removeAll()- Specified by:
removeAllin interfaceCloud- Overrides:
removeAllin classCloudArray
-
setListPoints
-
getListPoints
-
peek
- Specified by:
peekin interfaceCloud- Overrides:
peekin classCloudArray
-
pop
- Specified by:
popin interfaceCloud- Overrides:
popin classCloudArray
-
push
- Specified by:
pushin interfaceCloud- Overrides:
pushin classCloudArray
-
pointsToFloat
public float[] pointsToFloat()Parallel version- Specified by:
pointsToFloatin interfaceCloud- Overrides:
pointsToFloatin classCloudArray
-
floatsToPoint
- Specified by:
floatsToPointin interfaceCloud- Overrides:
floatsToPointin classCloudArray
-
getMimeType
Description copied from class:CloudArraySerialization management- Overrides:
getMimeTypein classCloudArray
-
hasContent
public boolean hasContent()Description copied from class:EmbeddedSharedObjectTrue if the object is not "empty" as its persistence depends how the mimetype write content, a java object with some value could be defined as "empty"- Overrides:
hasContentin classCloudArray
-
create
-
produceNode
Description copied from class:CloudArrayAdd Object to graph- Specified by:
produceNodein interfaceProducingNode- Overrides:
produceNodein classCloudArray
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable- Overrides:
getManageableTypein classCloudArray
-