public interface IShape extends Component
Interface describing a type of solid in the geometry editor
Each IShape is a node in the CSG tree and can affect the appearance of the final surface or volume mesh when processed with the MeshKit.
iComponentVisitor
iComponentListener
Modifier and Type | Method and Description |
---|---|
void |
acceptShapeVisitor(IShapeVisitor visitor)
Calls back onto the visitor's visit() operation, revealing the concrete
type of the IShape
|
IShape |
getParent()
Returns the parent associated with this shape, or null if the shape does
not have a parent
|
java.lang.String |
getProperty(java.lang.String key)
Returns the value associated with the property key
|
Transformation |
getTransformation()
Returns a copy of the transformation matrix associated with this shape
node
|
boolean |
removeProperty(java.lang.String key)
Removes the value associated with the key in the properties list
|
boolean |
setProperty(java.lang.String key,
java.lang.String value)
Sets the property value associated with the key string
|
boolean |
setTransformation(Transformation transformation)
Replaces the transformation matrix with a copy of the given Matrix4x4
|
register, unregister, update
clone, equals, getDescription, getId, getName, hashCode, setDescription, setId, setName
Transformation getTransformation()
Returns a copy of the transformation matrix associated with this shape node
The transformation matrix applied to this node in the CSG tree
boolean setTransformation(Transformation transformation)
Replaces the transformation matrix with a copy of the given Matrix4x4
Returns whether the setting was successful
transformation
- The transformation matrix to be applied to the shape
True if setting the transformation was successful, false otherwise
java.lang.String getProperty(java.lang.String key)
Returns the value associated with the property key
If the key does not exist, this operation returns null.
key
- The key corresponding to the desired property value
The desired value, or null if the key does not exist
boolean setProperty(java.lang.String key, java.lang.String value)
Sets the property value associated with the key string
If the key does not yet exist, append the key/value pair to the end of the property list. If it exists, find and replace the property value with the new one.
key
- The new or pre-existing key
value
- The new value
True if the property setting is valid, false otherwise
boolean removeProperty(java.lang.String key)
Removes the value associated with the key in the properties list
This operation returns whether the key was found and removed.
key
- The key associated with the value to remove
True if the value was found and removed, false otherwise
void acceptShapeVisitor(IShapeVisitor visitor)
Calls back onto the visitor's visit() operation, revealing the concrete type of the IShape
The name of this operation is changed from the typical naming conventions of the visitor pattern to avoid conflicts with the Component::accept() operation.
visitor
- The IShapeVisitor to call back in order to reveal the type of this IShape
IShape getParent()
Returns the parent associated with this shape, or null if the shape does not have a parent
The IShape's parent