All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jtr.Point3

java.lang.Object
   |
   +----jtr.Point3

public class Point3
extends Object
a 3 dimensional point, and some relevant operations on it


Constructor Index

 o Point3()
Create a point3 without initializing x, y, and z coordinates.
 o Point3(float, float, float)
Create a point3, given the x, y, and z coordinates.

Method Index

 o Add(Point3, Point3)
Create a new point which is the sum of two points.
 o AddTo(Point3)
Add a point to this point.
 o DoMaskAcc(int, float[], Point3[])
Set point to a weighted sum of other points.
 o Get(float[])
 o MaskAcc(int, float[], Point3[])
Create point as a weighted sum of other points.
 o Multiply(Point3, float)
Scale a point by a constant.
 o MultiplyBy(float)
Scale this point by a constant.
 o Set(float[])
 o Set(Point3)

Constructors

 o Point3
 public Point3(float x_,
               float y_,
               float z_)
Create a point3, given the x, y, and z coordinates.

 o Point3
 public Point3()
Create a point3 without initializing x, y, and z coordinates.

Methods

 o Set
 public void Set(Point3 p)
 o Set
 public void Set(float vec[])
 o Get
 public void Get(float vec[])
 o AddTo
 public void AddTo(Point3 p)
Add a point to this point.

Parameters:
p - the point to add
 o Add
 public static Point3 Add(Point3 p1,
                          Point3 p2)
Create a new point which is the sum of two points.

Parameters:
p1 - one point
p2 - another point
Returns:
their sum
 o MultiplyBy
 public void MultiplyBy(float c)
Scale this point by a constant.

Parameters:
c - constant by which components are scaled.
 o Multiply
 public static Point3 Multiply(Point3 p,
                               float c)
Scale a point by a constant.

Parameters:
p - a point
c - a scalar
Returns:
a new point, equal to p scaled by c
 o DoMaskAcc
 public void DoMaskAcc(int len,
                       float mask[],
                       Point3 pts[]) throws ArrayIndexOutOfBoundsException
Set point to a weighted sum of other points.

Parameters:
len - number of the following to use
mask[] - an array of weights
pts[] - an array of points
 o MaskAcc
 public static Point3 MaskAcc(int len,
                              float mask[],
                              Point3 pts[]) throws ArrayIndexOutOfBoundsException
Create point as a weighted sum of other points.

Parameters:
len - number of the following to use
mask[] - an array of weights
pts[] - an array of points
Returns:
the weighted sum of the points

All Packages  Class Hierarchy  This Package  Previous  Next  Index