net.dzzd.access
Interface ISolidSphere3DResult


public interface ISolidSphere3DResult

Used for accessing to a SolidSphere3DResult. SolidSphere3DResult are used by SolidSphere3D.

SolidSphere3DResult give information about an impact
Some of the informations given are : the distance to the impact point,new displacement vector for sliding, possible displacement without impact, impact sliding plane equation, impact position on scene and on this SolidSphere3D,etc...

Since:
1.0
Version:
1.0
Author:
Bruno Augier
See Also:
ISolidSphere3D, Copyright Bruno Augier 2005

Method Summary
 double getDistance()
          Gets the distance to impact.
 int getFace3DId()
          Gets id of the Face3D hitted in the Mesh3D.
 int getMesh3DId()
          Gets id of the Mesh3D hitted in the scene.
 IPoint3D getPosition()
          Gets the impact position.
 IPoint3D getResponse()
          Gets a the response displacement vector .
 double getSlideDistanceOver()
          Gets how much the hitted plane is traversed.
 IPoint3D getSlidePlane()
          Gets the hitted face plane normal.
 double getSlidePlaneOffset()
          Gets the plane "d" parameter in the equation a*x+b*y+c*z+d=0 for the hitted face.
 boolean isImpact()
          Gets the impact result.
 void resetImpact()
          Reset object.
 

Method Detail

resetImpact

public void resetImpact()
Reset object.
reset to object default value.

Returns:
interface to acces to x,y,z components of the x axis (ax)
Since:
1.0

isImpact

public boolean isImpact()
Gets the impact result.

Returns:
true if an impact happen.
Since:
1.0

getDistance

public double getDistance()
Gets the distance to impact.
If an impact happened, return the distance to this impact.

Returns:
distance to the impact in scene unit.
Since:
1.0

getSlideDistanceOver

public double getSlideDistanceOver()
Gets how much the hitted plane is traversed.
If an impact happened, return the distance over the plane (shortest distance).

Returns:
distance over the plane for the last move.
Since:
1.0

getSlidePlane

public IPoint3D getSlidePlane()
Gets the hitted face plane normal.
If an impact happened, return normal of the hitted face plane, normal contain the parameter a,b,c of the plane equation: a*x+b*y+c*z+d=0.

Returns:
normal of the hitted face plane.
Since:
1.0

getSlidePlaneOffset

public double getSlidePlaneOffset()
Gets the plane "d" parameter in the equation a*x+b*y+c*z+d=0 for the hitted face.
If an impact happened, return the offset value for the hitted face plane equation.

Returns:
offset of the hitted face plane.
Since:
1.0

getPosition

public IPoint3D getPosition()
Gets the impact position.
If an impact happened, return the position of that impact.

Returns:
position of impact.
Since:
1.0

getResponse

public IPoint3D getResponse()
Gets a the response displacement vector .
If an impact happend, return a vector that can be used recursivly to perform sliding or bouncing displacement.

Returns:
response displacement vector.
Since:
1.0

getMesh3DId

public int getMesh3DId()
Gets id of the Mesh3D hitted in the scene.
If an impact happend, return id of the hitted Mesh3D.

Returns:
id of Mesh3D in Scene3D
Since:
1.0

getFace3DId

public int getFace3DId()
Gets id of the Face3D hitted in the Mesh3D.
If an impact happend, return id of the hitted Face3D.

Returns:
id of Face3D in Mesh3D
Since:
1.0