|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.Node | +--javax.media.j3d.Leaf | +--javax.media.j3d.Shape3D | +--unbboolean.bool.Solid | +--unbboolean.solids.CSGSolid | +--unbboolean.solids.CompoundSolid
Class representing a compound solid
Field Summary | |
static int |
DIFFERENCE
difference operation |
static int |
INTERSECTION
intersection operation |
static int |
UNION
union operation |
Fields inherited from class javax.media.j3d.Shape3D |
ALLOW_APPEARANCE_OVERRIDE_READ, ALLOW_APPEARANCE_OVERRIDE_WRITE, ALLOW_APPEARANCE_READ, ALLOW_APPEARANCE_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE, ALLOW_GEOMETRY_READ, ALLOW_GEOMETRY_WRITE |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
CompoundSolid(java.lang.String name,
int operation,
CSGSolid operator1,
CSGSolid operator2)
Constructs a customized CompoundSolid object |
Method Summary | |
CSGSolid |
copy()
Copies the solid |
int |
getOperation()
Gets the operation |
CSGSolid |
getOperator1()
Gets the first operator |
CSGSolid |
getOperator2()
Gets the second operator |
void |
setOperation(int operation)
Sets the operation |
void |
setOperationToInverseDifference()
Sets the operation to inverse difference (invert the operators and apply difference) |
void |
setOperator1(CSGSolid solid)
Sets the first operator |
void |
setOperator2(CSGSolid solid)
Sets the second operator |
java.lang.String |
toString()
String representation of a compound solid (to be used on the CSG Tree) |
void |
updateChildren()
Updates all its descendants (called after some transforms were performed) |
void |
updateItselfAndParents()
Update itself and parents (called when coordinates were changed) |
Methods inherited from class unbboolean.solids.CSGSolid |
getLocation, getName, getParentSolid, isLighted, light, rotate, setName, setParentSolid, translate, unlight, updateLocation, updateParents, zoom |
Methods inherited from class unbboolean.bool.Solid |
getColors, getIndices, getVertices, isEmpty, scale, setColor, setData |
Methods inherited from class javax.media.j3d.Shape3D |
addGeometry, cloneNode, duplicateNode, getAllGeometries, getAppearance, getAppearanceOverrideEnable, getBounds, getCollisionBounds, getGeometry, getGeometry, indexOfGeometry, insertGeometry, intersect, intersect, intersect, numGeometries, removeAllGeometries, removeGeometry, removeGeometry, setAppearance, setAppearanceOverrideEnable, setCollisionBounds, setGeometry, setGeometry |
Methods inherited from class javax.media.j3d.Node |
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNION
public static final int INTERSECTION
public static final int DIFFERENCE
Constructor Detail |
public CompoundSolid(java.lang.String name, int operation, CSGSolid operator1, CSGSolid operator2) throws InvalidBooleanOperationException
name
- solid nameoperation
- operation applied onto the operators - UNION, INTERSECTION or DIFFERENCEoperator1
- first operatoroperator2
- second operator
InvalidBooleanOperationException
- if a boolean operation generates an empty solidMethod Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public int getOperation()
public CSGSolid getOperator1()
public CSGSolid getOperator2()
public void setOperation(int operation) throws InvalidBooleanOperationException
operation
- operation
InvalidBooleanOperationException
- if a boolean operation generates an empty solidpublic void setOperationToInverseDifference() throws InvalidBooleanOperationException
InvalidBooleanOperationException
- if a boolean operation generates an empty solidpublic void setOperator1(CSGSolid solid) throws InvalidBooleanOperationException
solid
- first operator
InvalidBooleanOperationException
- if a boolean operation generates an empty solidpublic void setOperator2(CSGSolid solid) throws InvalidBooleanOperationException
solid
- second operator
InvalidBooleanOperationException
- if a boolean operation generates an empty solidpublic void updateItselfAndParents() throws InvalidBooleanOperationException
InvalidBooleanOperationException
- if a boolean operation generates an empty solidpublic void updateChildren()
public CSGSolid copy()
copy
in class CSGSolid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |