java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp.registry.EmbeddedSharedObject
de.grogra.imp3d.objects.CloudArray
- All Implemented Interfaces:
NodeContext
,ProducingNode
,BoundedCloud
,Cloud
,CloudContext
,DisposableField
,Manageable
,Shareable
,Disposable
- Direct Known Subclasses:
CloudList
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp.registry.EmbeddedSharedObject
EmbeddedSharedObject.GetExtFromMimeType
Nested classes/interfaces inherited from interface de.grogra.imp3d.objects.Cloud
Cloud.Point
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CloudArray.Type
protected Node
static final SCOType.Field
-
Constructor Summary
ConstructorsConstructorDescriptionCloudArray
(float[] f) CloudArray
(Node cnode, float[] f) CloudArray
(String name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPoints
(Cloud.Point[] p) static CloudArray
create
(Aggregate a, Cloud.Point p) void
dispose()
void
dispose
(boolean removeNode) void
boolean
editable()
A cloud is editable if it is possible to add and remove points.floatsToPoint
(float[] f) float
Returns the center x position of this point cloud.float
Returns the center y position of this point cloud.float
Returns the center z position of this point cloud.getCloud()
float
float
float
Serialization managementfloat
float
float
getNode()
int
The java class name of the object typefloat[]
Warning, this do NOT copy the array.boolean
True 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"boolean
isEmpty()
To be part of the graph a cloud need to be added to a node.peek()
float[]
Convenience methods as most points are/or can be represented as arrays of floatsfloat[]
pointsToFloat
(Cloud.Point[] points) pop()
Add Object to graphvoid
push
(Cloud.Point p) void
void
void
setPoints
(float[] p) void
setPoints
(Cloud.Point[] p) Methods inherited from class de.grogra.imp.registry.EmbeddedSharedObject
getProvider, getProvider, initProvider, manageableReadResolve, manageableWriteReplace
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getStamp, removeReference
-
Field Details
-
cloudNode
-
$TYPE
-
points$FIELD
-
-
Constructor Details
-
CloudArray
public CloudArray() -
CloudArray
public CloudArray(float[] f) -
CloudArray
-
CloudArray
-
-
Method Details
-
editable
public boolean editable()Description copied from interface:Cloud
A 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. -
setNode
- Specified by:
setNode
in interfaceNodeContext
-
getNode
- Specified by:
getNode
in interfaceNodeContext
-
isEmpty
public boolean isEmpty()Description copied from interface:Cloud
To be part of the graph a cloud need to be added to a node. This return the cloudNode associated to this cloud if any. -
getPoints
-
setPoints
-
setPoints
public void setPoints(float[] p) -
getPointsAsFloat
public float[] getPointsAsFloat()Warning, this do NOT copy the array. Modify with care. -
getNumberOfPoints
public int getNumberOfPoints()- Specified by:
getNumberOfPoints
in interfaceCloud
-
getMinimumX
public float getMinimumX()- Specified by:
getMinimumX
in interfaceBoundedCloud
-
getMinimumY
public float getMinimumY()- Specified by:
getMinimumY
in interfaceBoundedCloud
-
getMinimumZ
public float getMinimumZ()- Specified by:
getMinimumZ
in interfaceBoundedCloud
-
getMaximumX
public float getMaximumX()- Specified by:
getMaximumX
in interfaceBoundedCloud
-
getMaximumY
public float getMaximumY()- Specified by:
getMaximumY
in interfaceBoundedCloud
-
getMaximumZ
public float getMaximumZ()- Specified by:
getMaximumZ
in interfaceBoundedCloud
-
dispose
public void dispose(boolean removeNode) -
dispose
public void dispose()- Specified by:
dispose
in interfaceDisposable
-
createNew
-
pointsToFloat
public float[] pointsToFloat()Description copied from interface:Cloud
Convenience methods as most points are/or can be represented as arrays of floats- Specified by:
pointsToFloat
in interfaceCloud
-
pointsToFloat
-
floatsToPoint
- Specified by:
floatsToPoint
in interfaceCloud
-
addPoint
-
addPoints
-
remove
-
remove
-
removeAll
public void removeAll() -
peek
-
pop
-
push
-
getCloud
- Specified by:
getCloud
in interfaceCloudContext
-
getMimeType
Serialization management- Specified by:
getMimeType
in classEmbeddedSharedObject
-
getExtension
- Specified by:
getExtension
in classEmbeddedSharedObject
-
getResourceDirectoryName
- Specified by:
getResourceDirectoryName
in classEmbeddedSharedObject
-
getObjectType
Description copied from class:EmbeddedSharedObject
The java class name of the object type- Specified by:
getObjectType
in classEmbeddedSharedObject
-
hasContent
public boolean hasContent()Description copied from class:EmbeddedSharedObject
True 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"- Specified by:
hasContent
in classEmbeddedSharedObject
-
disposeField
public void disposeField()- Specified by:
disposeField
in interfaceDisposableField
-
create
-
produceNode
Add Object to graph- Specified by:
produceNode
in interfaceProducingNode
-
getCenter
- Specified by:
getCenter
in interfaceBoundedCloud
-
getCenterX
public float getCenterX()Returns the center x position of this point cloud.- Returns:
- The center x position of this point cloud
-
getCenterY
public float getCenterY()Returns the center y position of this point cloud.- Returns:
- The center y position of this point cloud
-
getCenterZ
public float getCenterZ()Returns the center z position of this point cloud.- Returns:
- The center z position of this point cloud
-
getManageableType
- Specified by:
getManageableType
in interfaceManageable
- Overrides:
getManageableType
in classEmbeddedSharedObject
-