net.algart.model3d.common.movement.model
Interface HavingInteractionRadius

All Superinterfaces:
HavingCenter, Item
All Known Implementing Classes:
ElasticBall

public interface HavingInteractionRadius
extends HavingCenter

Item which cannot act to other items, also implementing this interface, if their centers are too far from this one: farther than some interaction radius R. More precisely, there is a guarantee, that if toItem and byItem implement this interface, the distance between their centers Math.sqrt(toItem.squareOfDistance(byItem))>R1+R2 (where R1=toItem.getMaxInteractionRadius() and R2=byItem.getMaxInteractionRadius()), and rule is any InteractionRule, then rule.calculateForce method returns zero force F=0.

This interface extends HavingCenter, because the "interaction radius" concept have no sense for items which have no centers.

AlgART Laboratory 2010

Since:
JDK 1.5
Version:
1.0
Author:
Daniel Alievsky

Method Summary
Modifier and Type Method and Description
 double getMaxInteractionRadius()
          Returns the interaction radius R: maximal distance from the center where this object can affect to other item, also implementing this interface.
 
Methods inherited from interface net.algart.model3d.common.movement.model.HavingCenter
getCenterX, getCenterY, getCenterZ, isInfinite, isNaN, setCenter, setCenterX, setCenterY, setCenterZ, squareOfDistance
 

Method Detail

getMaxInteractionRadius

double getMaxInteractionRadius()
Returns the interaction radius R: maximal distance from the center where this object can affect to other item, also implementing this interface. Can return Double.POSITIVE_INFINITY: it means the same as if the object does not implement this interface.

Returns:
the interaction radius R.