|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.algart.model3d.common.movement.view.SphereShapingRule
public class SphereShapingRule extends java.lang.Object implements ShapingRule
Shaping rule, which converts a sperical item
to a drawable 3D sphere.
More precisely, in this class:
isApplicable(Object item) method returns true if and only if
SphericalisNaN() and isInfinite() returns false
(i.e. it is a normal finite sphere);getShape(Object item) returns the sphereSphere3D(centerX,centerY,centerZ,radius),centerX, centerY,
centerZ, radius
are the corresponding parameters of the given spherical item (Spherical)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 |
|---|
SphereShapingRule()
|
| 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 SphereShapingRule()
| 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 | ||||||||