dzzd
Interface IPoint3D

All Known Subinterfaces:
IPoint4D, IVertex3D

public interface IPoint3D

Used for accessing to a Point3D.

Since:
1.0
Version:
1.0, 01/01/04
Author:
Bruno Augier
See Also:
IVertex3D

Method Summary
 IPoint3D add(IPoint3D p)
          Add a Point3D to this Point3D.
 IPoint3D copy(IPoint3D point3d)
          Copy values of a Point3D into this Point3D.
 IPoint3D getClone()
          Gets a new instance of this Point3D.
 double getX()
          Gets the x component.
 double getY()
          Gets the y component.
 double getZ()
          Gets the z component.
 IPoint3D normalize()
          Normalize this Point3D.
 void set(double x, double y, double z)
          Sets the x,y,z components.
 void setX(double val)
          Sets the x component.
 void setY(double val)
          Sets the y component.
 void setZ(double val)
          Sets the z component.
 IPoint3D sub(IPoint3D p)
          Substract a Point3D to this Point3D.
 IPoint3D zoom(double x, double y, double z)
          Zoom this Point3D.
 

Method Detail

getX

public double getX()
Gets the x component.

Returns:
x component

getY

public double getY()
Gets the y component.

Returns:
y component

getZ

public double getZ()
Gets the z component.

Returns:
z component

setX

public void setX(double val)
Sets the x component.

Parameters:
val - x component value

setY

public void setY(double val)
Sets the y component.

Parameters:
val - y component value

setZ

public void setZ(double val)
Sets the z component.

Parameters:
val - z component value

set

public void set(double x,
                double y,
                double z)
Sets the x,y,z components.

Parameters:
x - x component value
y - y component value
z - z component value

copy

public IPoint3D copy(IPoint3D point3d)
Copy values of a Point3D into this Point3D.

Parameters:
point3d - source Point3D
Returns:
this point3D

add

public IPoint3D add(IPoint3D p)
Add a Point3D to this Point3D.

Parameters:
p - source Point3D
Returns:
this point3D

sub

public IPoint3D sub(IPoint3D p)
Substract a Point3D to this Point3D.

Parameters:
p - source Point3D
Returns:
this point3D

normalize

public IPoint3D normalize()
Normalize this Point3D. divide all component of the vector represented by this point by its norme : sqrt(x*x+y*y+z*z)

Returns:
this point3D normalized

zoom

public IPoint3D zoom(double x,
                     double y,
                     double z)
Zoom this Point3D.

Parameters:
x - x zoom factor
y - y zoom factor
z - z zoom factor
Returns:
this Point3D.

getClone

public IPoint3D getClone()
Gets a new instance of this Point3D.

Returns:
newly allocated point3D with same values.