net.dzzd.access
Interface IPoint3D

All Known Subinterfaces:
ITrack3D, 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 cross(IPoint3D p)
          Compute the cross product with another Point3D
 double dist(IPoint3D p)
          Return the distance with the point p
 IPoint3D div(double n)
          Divide all components (x,y,z) by n
 double dot(IPoint3D p2)
          Compute the dot product with another 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.
 double length()
          Compute and return the length of the vector represented by this point
 double length2()
          Compute and return the length˛ of the vector represented by this point
 IPoint3D mul(double n)
          Multiply all components (x,y,z) by n
 double norm()
          Compute and return the length of the vector represented by this point
 IPoint3D normalize()
          Normalize this Point3D.
 IPoint3D rotateX(double angle)
          Rotate the point around the x axis
 IPoint3D rotateY(double angle)
          Rotate the point around the y axis
 IPoint3D rotateZ(double angle)
          Rotate the point around the z axis
 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.

rotateX

public IPoint3D rotateX(double angle)
Rotate the point around the x axis

Parameters:
angle - radian angle for the rotation
Returns:
the same point rotated

rotateY

public IPoint3D rotateY(double angle)
Rotate the point around the y axis

Parameters:
angle - radian angle for the rotation
Returns:
the same point rotated

rotateZ

public IPoint3D rotateZ(double angle)
Rotate the point around the z axis

Parameters:
angle - radian angle for the rotation
Returns:
the same point rotated

mul

public IPoint3D mul(double n)
Multiply all components (x,y,z) by n

Parameters:
n - value to use for the multiplication
Returns:
same point with multiplied components

div

public IPoint3D div(double n)
Divide all components (x,y,z) by n

Parameters:
n - value to use for the division
Returns:
same point with divided components

cross

public IPoint3D cross(IPoint3D p)
Compute the cross product with another Point3D

Returns:
cross product performed on the point

dot

public double dot(IPoint3D p2)
Compute the dot product with another Point3D

Returns:
dot product

norm

public double norm()
Compute and return the length of the vector represented by this point

Returns:
length of the vector

length

public double length()
Compute and return the length of the vector represented by this point

Returns:
length of the vector

length2

public double length2()
Compute and return the length˛ of the vector represented by this point

Returns:
length˛ of the vector

dist

public double dist(IPoint3D p)
Return the distance with the point p

Parameters:
p - a point
Returns:
distance with the point