|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.algart.model3d.common.movement.view.BunkerWallShapingRule
public class BunkerWallShapingRule extends java.lang.Object implements ShapingRule
Shaping rule, which converts a bunker wall, on which 3 or more vertices are specified,
to a drawable plane polygon in 3D space.
More precisely, in this class:
isApplicable(Object item) method returns true if and only if
BunkerWallnumber of the vertices, specified at the wall, is ≥3;getShape(Object item) returns the polygonPlanePolygon3D(a,b,c,d,verticesXYZ),a, b, c,
d and verticesXYZ
are the corresponding parameters of the given wall (BunkerWall)item.
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
AlgART Laboratory 2010
| Constructor and Description |
|---|
BunkerWallShapingRule()
|
| Modifier and Type | Method and Description |
|---|---|
Shape3D |
getShape(java.lang.Object item)
Returns the newly created shape of the specified 3D object. |
boolean |
isApplicable(java.lang.Object item)
Checks whether this shaping rule is applicable to the given object (item), i.e. this shaping rule "knows" which 3D shape describes this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BunkerWallShapingRule()
| Method Detail |
|---|
public boolean isApplicable(java.lang.Object item)
ShapingRule3D shape describes this object.
If this method returns false, you should not call ShapingRule.getShape(Object) method of this interface
for this object: it can throw an exception.
If this method returns true, you can freely use ShapingRule.getShape(Object) method.
If this method returns false for the given item for all shaping rules, available
in Drawer3D object, and if this item does not implement Shape3D interface itself,
then this item is not drawn by the Drawer3D.draw(java.util.Collection) method.
The argument of this method can be null; in this case, this method returns false.
isApplicable in interface ShapingRuleitem - the object which you want to draw; can be null, then this method returns false.public Shape3D getShape(java.lang.Object item)
ShapingRuleShapingRule.isApplicable(Object) returns false, this method usually throws
ClassCastException, but other runtime exceptions are also possible.
getShape in interface ShapingRuleitem - some 3D object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||