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

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

public interface HavingVelocity
extends HavingCenter

Item which has a velocity: the first derivative of the center vector by time. In other words, in additional to 3 numbers x, y, z, describing coordinates of the item's center in HavingCenter interface, this interface also specifies 3 numbers vx=x'(t), vy=y'(t), vz=z'(t), where t is the time. Only items, implementing this interface, can be moved as a result of physical interaction.

AlgART Laboratory 2010

Since:
JDK 1.5
Version:
1.0
Author:
Daniel Alievsky

Method Summary
Modifier and Type Method and Description
 double getVelocityX()
          Returns x-component of the velocity of the item's center.
 double getVelocityY()
          Returns y-component of the velocity of the item's center.
 double getVelocityZ()
          Returns z-component of the velocity of the item's center.
 void setVelocity(double velocityX, double velocityY, double velocityZ)
          Sets all components of the velocity of the item's center.
 void setVelocityX(double velocityX)
          Sets x-component of the velocity of the item's center.
 void setVelocityY(double velocityY)
          Sets y-component of the velocity of the item's center.
 void setVelocityZ(double velocityZ)
          Sets z-component of the velocity of the item's center.
 
Methods inherited from interface net.algart.model3d.common.movement.model.HavingCenter
getCenterX, getCenterY, getCenterZ, isInfinite, isNaN, setCenter, setCenterX, setCenterY, setCenterZ, squareOfDistance
 

Method Detail

getVelocityX

double getVelocityX()
Returns x-component of the velocity of the item's center.

Returns:
x-component of the velocity of the item's center.

getVelocityY

double getVelocityY()
Returns y-component of the velocity of the item's center.

Returns:
y-component of the velocity of the item's center.

getVelocityZ

double getVelocityZ()
Returns z-component of the velocity of the item's center.

Returns:
z-component of the velocity of the item's center.

setVelocityX

void setVelocityX(double velocityX)
Sets x-component of the velocity of the item's center.

Parameters:
velocityX - new x-component of the new velocity of the item's center.

setVelocityY

void setVelocityY(double velocityY)
Sets y-component of the velocity of the item's center.

Parameters:
velocityY - new y-component of the new velocity of the item's center.

setVelocityZ

void setVelocityZ(double velocityZ)
Sets z-component of the velocity of the item's center.

Parameters:
velocityZ - new z-component of the new velocity of the item's center.

setVelocity

void setVelocity(double velocityX,
                 double velocityY,
                 double velocityZ)
Sets all components of the velocity of the item's center.

Parameters:
velocityX - new x-component of the new velocity of the item's center.
velocityY - new y-component of the new velocity of the item's center.
velocityZ - new z-component of the new velocity of the item's center.